X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tests%2Ftools%2FCMakeLists.txt;h=ad57d590876a8ac5f1d4b6a7eeba817c35303a26;hb=55afdca9b39feebaf984e2d41096b430537c38fe;hp=950194e4b0d9d898c538e3ff7135eea12dac97f3;hpb=4a97517996cc04de6f0285cdd4fbbb40b269a6b3;p=clitk.git diff --git a/tests/tools/CMakeLists.txt b/tests/tools/CMakeLists.txt index 950194e..ad57d59 100644 --- a/tests/tools/CMakeLists.txt +++ b/tests/tools/CMakeLists.txt @@ -1,17 +1,14 @@ -# Add test apps and test executions to this part -# Test apps are compiled as any other app in the -# project. Test executions are run using "make test" -# -IF(CLITK_BUILD_TESTING) +include_directories( + ${PROJECT_SOURCE_DIR}/common + ${PROJECT_SOURCE_DIR}/tools + ${GTEST_DIR}/include +) - # clitkImageInfo - ADD_EXECUTABLE(clitkImageInfoTest clitkImageInfoTest.cxx) - TARGET_LINK_LIBRARIES(clitkImageInfoTest ITKIO) - ADD_TEST(NAME clitkImageInfoTest COMMAND clitkImageInfoTest) +FILE(GLOB srcs *.cxx) +ADD_EXECUTABLE(toolsTest ${srcs}) +ADD_DEFINITIONS(-DTOOLS_PATH=\"${PROJECT_BINARY_DIR}/bin/\") +target_link_libraries(toolsTest vvLib ${vvExternalLibs} gtest) - # clitkWriteDicomSeries - ADD_EXECUTABLE(clitkWriteDicomSeriesTest clitkWriteDicomSeriesTest.cxx) - TARGET_LINK_LIBRARIES(clitkWriteDicomSeriesTest ITKIO) - ADD_TEST(NAME clitkWriteDicomSeriesTest COMMAND clitkWriteDicomSeriesTest) - -ENDIF(CLITK_BUILD_TESTING) +# Add all tests found in the source code, calling the executable to run them +add_google_tests ( ${EXECUTABLE_OUTPUT_PATH}/toolsTest ${srcs}) +SET(BUILDNAME ${BUILDNAME}_tools CACHE INTERNAL DOCSTRING) \ No newline at end of file