From 4dfc44016ae3eff3ea878b68ba59b4caeec2fe4c Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Tue, 13 Nov 2012 20:53:12 -0600 Subject: [PATCH] ENH: Slicer requires special treatment. --- AutoWorkup/CMakeLists.txt | 2 +- BRAINSABC/CMakeLists.txt | 2 +- BRAINSCommonLib/CMakeLists.txt | 2 +- BRAINSConstellationDetector/CMakeLists.txt | 2 +- BRAINSContinuousClass/CMakeLists.txt | 2 +- BRAINSCut/CMakeLists.txt | 2 +- BRAINSDemonWarp/CMakeLists.txt | 2 +- BRAINSFit/CMakeLists.txt | 2 +- .../BRAINSPosteriorToContinuousClass/CMakeLists.txt | 2 +- BRAINSLandmarkInitializer/CMakeLists.txt | 2 +- BRAINSMultiModeSegment/CMakeLists.txt | 2 +- BRAINSMush/CMakeLists.txt | 2 +- BRAINSROIAuto/CMakeLists.txt | 2 +- BRAINSResample/CMakeLists.txt | 2 +- BRAINSSnapShotWriter/CMakeLists.txt | 2 +- BRAINSSurfaceTools/BRAINSSurfaceRegister/CMakeLists.txt | 2 +- BRAINSTransformConvert/CMakeLists.txt | 2 +- Common.cmake | 2 ++ ICCDEF/CMakeLists.txt | 2 +- ImageCalculator/CMakeLists.txt | 2 +- SuperBuild.cmake | 2 +- 21 files changed, 22 insertions(+), 20 deletions(-) diff --git a/AutoWorkup/CMakeLists.txt b/AutoWorkup/CMakeLists.txt index 6f7fd2d7..c073c140 100644 --- a/AutoWorkup/CMakeLists.txt +++ b/AutoWorkup/CMakeLists.txt @@ -3,6 +3,6 @@ #----------------------------------------------------------------------------- # Output directories. # -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSABC/CMakeLists.txt b/BRAINSABC/CMakeLists.txt index ebe2aeec..f58d5ac6 100644 --- a/BRAINSABC/CMakeLists.txt +++ b/BRAINSABC/CMakeLists.txt @@ -6,7 +6,7 @@ ### add_subdirectory(brainseg) -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSCommonLib/CMakeLists.txt b/BRAINSCommonLib/CMakeLists.txt index d9c6cdf7..90d1bff9 100644 --- a/BRAINSCommonLib/CMakeLists.txt +++ b/BRAINSCommonLib/CMakeLists.txt @@ -77,7 +77,7 @@ install(FILES ${TESTFILES_TO_INSTALL} ##HACK NEED BETTER TESTS add_directory( TestLargestForegroundFilledMaskImageFilter ) ##HACK NEED BETTER TESTS add_directory( Test_FindCenterOfBrainFilter ) -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSConstellationDetector/CMakeLists.txt b/BRAINSConstellationDetector/CMakeLists.txt index 3a75d9cf..e401f3c4 100644 --- a/BRAINSConstellationDetector/CMakeLists.txt +++ b/BRAINSConstellationDetector/CMakeLists.txt @@ -14,7 +14,7 @@ if(BUILD_WITH_GUI OR BRAINS3_USE_QT OR BRAINSTools_USE_QT) endif() # Build test option -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSContinuousClass/CMakeLists.txt b/BRAINSContinuousClass/CMakeLists.txt index 70f4e1b4..4db63a18 100755 --- a/BRAINSContinuousClass/CMakeLists.txt +++ b/BRAINSContinuousClass/CMakeLists.txt @@ -11,7 +11,7 @@ foreach(prog ${ALL_PROGS_LIST}) endforeach() ### Add the Testing Subdirectory. -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSCut/CMakeLists.txt b/BRAINSCut/CMakeLists.txt index c1177824..aed7f041 100644 --- a/BRAINSCut/CMakeLists.txt +++ b/BRAINSCut/CMakeLists.txt @@ -58,7 +58,7 @@ if(1) ## HACK Regina many tests are failing and needs investigation, ## HACK Regina some tests are segmentation faulting add_subdirectory(TestSuite) endif() -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_executable(TestHashKey TestHashKey.cxx) target_link_libraries(TestHashKey BRAINSCutCOMMONLIB) endif() diff --git a/BRAINSDemonWarp/CMakeLists.txt b/BRAINSDemonWarp/CMakeLists.txt index bf9639bd..c1a3b6d5 100644 --- a/BRAINSDemonWarp/CMakeLists.txt +++ b/BRAINSDemonWarp/CMakeLists.txt @@ -50,6 +50,6 @@ foreach(prog ${ALL_PROGS_LIST}) endforeach() ### Add the Testing Subdirectory. -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSFit/CMakeLists.txt b/BRAINSFit/CMakeLists.txt index 3eeb3c2c..4c635841 100644 --- a/BRAINSFit/CMakeLists.txt +++ b/BRAINSFit/CMakeLists.txt @@ -19,6 +19,6 @@ foreach(prog ${ALL_PROGS_LIST}) StandardBRAINSBuildMacro(NAME ${prog} TARGET_LIBRARIES ${BRAINSFitLibraries}) endforeach() -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSImageConvert/BRAINSPosteriorToContinuousClass/CMakeLists.txt b/BRAINSImageConvert/BRAINSPosteriorToContinuousClass/CMakeLists.txt index ea1f8baf..348eab20 100644 --- a/BRAINSImageConvert/BRAINSPosteriorToContinuousClass/CMakeLists.txt +++ b/BRAINSImageConvert/BRAINSPosteriorToContinuousClass/CMakeLists.txt @@ -3,6 +3,6 @@ StandardBRAINSBuildMacro(NAME BRAINSPosteriorToContinuousClass TARGET_LIBRARIES ${ITK_LIBRARIES}) #CLI_XML_FILE BRAINSPosteriorToContinuousClass.xml) -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSLandmarkInitializer/CMakeLists.txt b/BRAINSLandmarkInitializer/CMakeLists.txt index b6c8b075..a6fb6a00 100644 --- a/BRAINSLandmarkInitializer/CMakeLists.txt +++ b/BRAINSLandmarkInitializer/CMakeLists.txt @@ -10,6 +10,6 @@ foreach(prog ${ALL_PROGS_LIST}) StandardBRAINSBuildMacro(NAME ${prog} TARGET_LIBRARIES BRAINSCommonLib ) endforeach() -#if(BUILD_TESTING) +#if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) # add_subdirectory(TestSuite) #endif() diff --git a/BRAINSMultiModeSegment/CMakeLists.txt b/BRAINSMultiModeSegment/CMakeLists.txt index 3ebbd051..daf7388b 100644 --- a/BRAINSMultiModeSegment/CMakeLists.txt +++ b/BRAINSMultiModeSegment/CMakeLists.txt @@ -10,6 +10,6 @@ foreach(prog ${ALL_PROGS_LIST}) StandardBRAINSBuildMacro(NAME ${prog} TARGET_LIBRARIES BRAINSCommonLib ) endforeach() -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) # add_subdirectory(TestSuite) endif() diff --git a/BRAINSMush/CMakeLists.txt b/BRAINSMush/CMakeLists.txt index 4f0d294f..3bb46002 100755 --- a/BRAINSMush/CMakeLists.txt +++ b/BRAINSMush/CMakeLists.txt @@ -11,7 +11,7 @@ foreach(prog ${ALL_PROGS_LIST}) endforeach() if(0) -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() endif() diff --git a/BRAINSROIAuto/CMakeLists.txt b/BRAINSROIAuto/CMakeLists.txt index 849418b4..0ea75382 100644 --- a/BRAINSROIAuto/CMakeLists.txt +++ b/BRAINSROIAuto/CMakeLists.txt @@ -16,6 +16,6 @@ foreach(prog ${ALL_PROGS_LIST}) StandardBRAINSBuildMacro(NAME ${prog} TARGET_LIBRARIES BRAINSCommonLib ) endforeach() -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSResample/CMakeLists.txt b/BRAINSResample/CMakeLists.txt index d6f523fe..a8f98fd8 100644 --- a/BRAINSResample/CMakeLists.txt +++ b/BRAINSResample/CMakeLists.txt @@ -17,6 +17,6 @@ foreach(prog ${ALL_PROGS_LIST}) endforeach() ### Add the Testing Subdirectory. -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSSnapShotWriter/CMakeLists.txt b/BRAINSSnapShotWriter/CMakeLists.txt index 7c5ee762..e4fa8a0d 100644 --- a/BRAINSSnapShotWriter/CMakeLists.txt +++ b/BRAINSSnapShotWriter/CMakeLists.txt @@ -10,6 +10,6 @@ foreach(prog ${ALL_PROGS_LIST}) StandardBRAINSBuildMacro(NAME ${prog} TARGET_LIBRARIES BRAINSCommonLib ) endforeach() -#if(BUILD_TESTING) +#if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) # add_subdirectory(TestSuite) #endif() diff --git a/BRAINSSurfaceTools/BRAINSSurfaceRegister/CMakeLists.txt b/BRAINSSurfaceTools/BRAINSSurfaceRegister/CMakeLists.txt index 944e742c..c98b25c6 100644 --- a/BRAINSSurfaceTools/BRAINSSurfaceRegister/CMakeLists.txt +++ b/BRAINSSurfaceTools/BRAINSSurfaceRegister/CMakeLists.txt @@ -19,6 +19,6 @@ add_subdirectory( ProbabilityLabels ) add_subdirectory( ResampleQuadEdgeMesh ) add_subdirectory( QuadEdgeMeshSimilarity ) -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/BRAINSTransformConvert/CMakeLists.txt b/BRAINSTransformConvert/CMakeLists.txt index ed07e6d1..19f8c3ae 100644 --- a/BRAINSTransformConvert/CMakeLists.txt +++ b/BRAINSTransformConvert/CMakeLists.txt @@ -11,6 +11,6 @@ foreach(prog ${ALL_PROGS_LIST}) StandardBRAINSBuildMacro(NAME ${prog} TARGET_LIBRARIES BRAINSCommonLib ) endforeach() -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/Common.cmake b/Common.cmake index 88b5f044..4c96fa80 100644 --- a/Common.cmake +++ b/Common.cmake @@ -49,7 +49,9 @@ option(USE_BRAINSCut "Build BRAINSCut" option(USE_BRAINSLandmarkInitializer "Build BRAINSLandmarkInitializer" ON) option(USE_ImageCalculator "Build ImageCalculator" ON) option(USE_BRAINSSnapShotWriter "Build BRAINSSnapShotWriter" ON) +if( NOT USE_ANTS ) option(USE_ANTS "Build ANTS" ON) +endif() ## These are not yet ready for prime time. option(USE_BRAINSContinuousClass "Build BRAINSContinuousClass " OFF) diff --git a/ICCDEF/CMakeLists.txt b/ICCDEF/CMakeLists.txt index 8b337d8f..4b14ada3 100644 --- a/ICCDEF/CMakeLists.txt +++ b/ICCDEF/CMakeLists.txt @@ -51,6 +51,6 @@ foreach(prog ${ALL_PROGS_LIST}) StandardBRAINSBuildMacro(NAME ${prog} TARGET_LIBRARIES ${ICCDEFLibraries}) endforeach() -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_subdirectory(TestSuite) endif() diff --git a/ImageCalculator/CMakeLists.txt b/ImageCalculator/CMakeLists.txt index c7aaa8f6..f337c6cb 100644 --- a/ImageCalculator/CMakeLists.txt +++ b/ImageCalculator/CMakeLists.txt @@ -10,7 +10,7 @@ target_link_libraries(ImageCalculator ${ITK_LIBRARIES} ) add_executable(ImageGenerate ImageGenerate.cxx ) target_link_libraries(ImageGenerate ${ITK_LIBRARIES}) -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) add_executable(ImageCalculatorTests ImageCalculatorTests.cxx ImageCalculatorUtils.cxx diff --git a/SuperBuild.cmake b/SuperBuild.cmake index a72dd820..453714bf 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -313,7 +313,7 @@ endif() #----------------------------------------------------------------------------- # CTestCustom #----------------------------------------------------------------------------- -if(BUILD_TESTING) +if(BUILD_TESTING AND NOT Slicer_BUILD_BRAINSTOOLS) configure_file( CMake/CTestCustom.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake