Commit 973d0e70 authored by Thomas Feuvrier's avatar Thomas Feuvrier

Ajout option dans le CMakeLists.txt : OTB_DISABLE_CXX_EXAMPLES_TESTING

Cette option offre la possibilité de compiler les examples sans vouloir lancer les tests associés.
parent 0e2d175b
......@@ -256,6 +256,10 @@ IF( OTB_SHOW_ALL_MSG_DEBUG )
ADD_DEFINITIONS(-DOTB_ACTIVE_MSG_DEV_MACRO)
ENDIF( OTB_SHOW_ALL_MSG_DEBUG )
#-----------------------------------------------------------------------------
# Option for disable example testing
OPTION(OTB_DISABLE_CXX_EXAMPLES_TESTING "Disable examples testing." OFF)
MARK_AS_ADVANCED(OTB_DISABLE_CXX_EXAMPLES_TESTING)
#-----------------------------------------------------------------------------
# Option for generate Patented examples !!!
......
......@@ -7,7 +7,7 @@ TARGET_LINK_LIBRARIES(LeeImageFilter OTBCommon OTBIO ITKCommon ITKIO ITKNumerics
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING)
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/BasicFilters)
......@@ -37,4 +37,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbBasicFiltersExamplesTests otbBasicFiltersExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbBasicFiltersExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -20,7 +20,7 @@ ADD_EXECUTABLE(JHMIChDet JHMIChDet.cxx)
TARGET_LINK_LIBRARIES(JHMIChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING)
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/ChangeDetection)
......@@ -77,4 +77,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbChangeDetectionExamplesTests otbChangeDetectionExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbChangeDetectionExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -107,7 +107,7 @@ TARGET_LINK_LIBRARIES(ScalarImageMarkovRandomField1 OTBIO OTBCommon ITKIO ITKCom
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Classification)
......@@ -150,4 +150,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbClassificationExamplesTests otbClassificationExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbClassificationExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -38,7 +38,8 @@ TARGET_LINK_LIBRARIES(ImageAdaptor4 OTBCommon ITKCommon OTBIO ITKIO)
ADD_EXECUTABLE(ImageListExample ImageListExample.cxx )
TARGET_LINK_LIBRARIES(ImageListExample OTBCommon ITKCommon OTBIO ITKIO)
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/DataRepresentation/Image)
......@@ -80,4 +81,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbImageExamplesTests otbImageExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbImageExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -47,7 +47,7 @@ ADD_EXECUTABLE(ExtractSegmentsExample
ExtractSegmentsExample.cxx)
TARGET_LINK_LIBRARIES(ExtractSegmentsExample OTBFeatureExtraction OTBCommon OTBIO ITKCommon ITKIO)
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/FeatureExtraction)
......@@ -181,4 +181,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbFeatureExtractionExamplesTests otbFeatureExtractionExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbFeatureExtractionExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -246,10 +246,8 @@ IF(NOT BORLAND)
#TARGET_LINK_LIBRARIES(ResampleImageFilter7 ITKCommon ITKBasicFilters ITKIO)
ENDIF(NOT BORLAND)
ENDIF( NOT ITK_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Filtering)
......@@ -511,4 +509,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbFilteringExamplesTests otbFilteringExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbFilteringExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -83,7 +83,7 @@ TARGET_LINK_LIBRARIES(MetadataExample OTBCommon OTBIO ITKCommon ITKIO)
#ADD_EXECUTABLE(TransformReadWrite TransformReadWrite.cxx )
#TARGET_LINK_LIBRARIES(TransformReadWrite ITKCommon ITKIO)
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/IO)
......@@ -116,4 +116,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbIOExamplesTests otbIOExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbIOExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -53,7 +53,7 @@ TARGET_LINK_LIBRARIES(IteratorsExamples OTBIO OTBCommon ITKIO ITKBasicFilters )
ENDIF(NOT BORLAND)
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Iterators)
......@@ -198,4 +198,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbIteratorsExamplesTests otbIteratorsExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbIteratorsExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -33,7 +33,7 @@ ADD_EXECUTABLE(SOMExample SOMExample.cxx )
TARGET_LINK_LIBRARIES(SOMExample ITKIO OTBIO OTBCommon ITKCommon OTBLearning gdal)
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Learning)
......@@ -99,4 +99,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbLearningExamplesTests otbLearningExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbLearningExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -10,7 +10,7 @@ TARGET_LINK_LIBRARIES(FuzzyConnectednessImageFilter OTBIO OTBCommon ITKNumerics
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Patented)
......@@ -40,4 +40,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbPatentedExamplesTests otbPatentedExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbPatentedExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
......@@ -124,7 +124,7 @@ TARGET_LINK_LIBRARIES(WatershedSegmentation OTBCommon OTBIO ITKAlgorithms ITKNum
IF( NOT OTB_DISABLE_CXX_TESTING )
IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Segmentation)
......@@ -363,4 +363,4 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
ADD_EXECUTABLE(otbSegmentationExamplesTests otbSegmentationExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbSegmentationExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment