X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=CMakeLists.txt;h=8ce5b58371c0804f5ff99368987b438c9306422d;hb=74d9aadcd4bf2136e7057a908de8fd7401dee8f7;hp=684ccd3e7b9a32d266b217e602acf0248d45c2de;hpb=c40ac37f710af0f81e598a9942b925ac50649d8e;p=clitk.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 684ccd3..8ce5b58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,15 @@ PROJECT(clitk) INCLUDE(cmake/common.cmake) #========================================================= +#========================================================= +#Support for the CTest dashboard testing system +OPTION(BUILD_TESTING "Build the testing tree" OFF) +IF (BUILD_TESTING) + OPTION(CLITK_BUILD_TESTING "Test ITK" ON) + INCLUDE(CTest) +ENDIF(BUILD_TESTING) +#========================================================= + #========================================================= # Find ITK (required) FIND_PACKAGE(ITK) @@ -80,9 +89,9 @@ INCLUDE_DIRECTORIES(itk filters segmentation registration tools ${PROJECT_BINARY # Select what is compiled ADD_SUBDIRECTORY(common) -add_subdirectory(tools) -add_subdirectory(segmentation) -add_subdirectory(registration) +ADD_SUBDIRECTORY(tools) +ADD_SUBDIRECTORY(segmentation) +ADD_SUBDIRECTORY(registration) # Compilation options @@ -98,14 +107,7 @@ ENDIF(CLITK_BUILD_VV) #========================================================= -#Support for the CTest dashboard testing system -OPTION(CLITK_BUILD_TESTING "Build the testing tree" OFF) -#========================================================= -IF (CLITK_BUILD_TESTING) - ENABLE_TESTING() +# Build test when vv has been compiled +IF(BUILD_TESTING) ADD_SUBDIRECTORY(tests) -ENDIF(CLITK_BUILD_TESTING) -#========================================================= - -#========================================================= - +ENDIF(BUILD_TESTING)