Skip to content

Commit

Permalink
Simple test case working built by cmake
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6951 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 21, 2007
1 parent 9e7c8c2 commit a1b7d7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ SET( QT_USE_QTXML TRUE )
SET( QT_USE_QTNETWORK TRUE )
SET( QT_USE_QTSVG TRUE )
IF (ENABLE_TESTS)
SET( QT_USE_QTTESTS TRUE )
SET( QT_USE_QTTEST TRUE )
ENABLE_TESTING()
ENDIF (ENABLE_TESTS)
# TODO: should not be needed, report it to CMake devs
Expand Down
10 changes: 6 additions & 4 deletions tests/src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
# application test

SET(applicationtest_SRCS testqgsapplication.cpp)
QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/testqgsapplication.cpp testqgsapplication.moc)
#SET(applicationtest_MOC_CPPS testqgsapplication.cpp)
#QT4_WRAP_CPP(applicationtest_MOC_SRCS ${applicationtest_MOC_CPPS})
#ADD_CUSTOM_TARGET(applicationtestmoc ALL DEPENDS ${applicationtest_MOC_SRCS})
#QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/testqgsapplication.cpp testqgsapplication.moc)
#SET_SOURCE_FILES_PROPERTIES(testqgsapplication.moc PROPERTIES GENERATED TRUE)
SET(applicationtest_MOC_CPPS testqgsapplication.cpp)
QT4_WRAP_CPP(applicationtest_MOC_SRCS ${applicationtest_MOC_CPPS})
ADD_CUSTOM_TARGET(applicationtestmoc ALL DEPENDS ${applicationtest_MOC_SRCS})
#QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/testqgsapplication.cpp moc_testqgsapplication.cxx)

#####################################################
Expand Down Expand Up @@ -58,6 +59,7 @@ ENDIF (WIN32)
ADD_EXECUTABLE(applicationtest
${applicationtest_SRCS}
)
ADD_DEPENDENCIES(applicationtest applicationtestmoc)
TARGET_LINK_LIBRARIES(applicationtest
${QT_LIBRARIES}
qgis_core
Expand Down
5 changes: 1 addition & 4 deletions tests/src/core/testqgsapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,5 @@ class TestQgsApplication: public QObject
};

QTEST_MAIN(TestQgsApplication)
#include "testqgsapplication.moc.cpp"



#include "moc_testqgsapplication.cxx"

0 comments on commit a1b7d7f

Please sign in to comment.