Commit b040178b authored by Rashad Kanavath's avatar Rashad Kanavath

BUG: check only dependent thirdparty is activated when building example

parent 9b896a88
...@@ -28,7 +28,7 @@ add_executable(LeeImageFilter LeeImageFilter.cxx) ...@@ -28,7 +28,7 @@ add_executable(LeeImageFilter LeeImageFilter.cxx)
target_link_libraries(LeeImageFilter ${OTB_LIBRARIES}) target_link_libraries(LeeImageFilter ${OTB_LIBRARIES})
#OTBMeanShift depends OTBMathParser. But OTB_USE_MUPARSER is OFF #OTBMeanShift depends OTBMathParser. But OTB_USE_MUPARSER is OFF
if(OTBMeanShift_LOADED) if(OTBMathParser_LOADED)
add_executable(MeanShiftSegmentationFilterExample MeanShiftSegmentationFilterExample.cxx) add_executable(MeanShiftSegmentationFilterExample MeanShiftSegmentationFilterExample.cxx)
target_link_libraries(MeanShiftSegmentationFilterExample ${OTB_LIBRARIES}) target_link_libraries(MeanShiftSegmentationFilterExample ${OTB_LIBRARIES})
endif() endif()
......
...@@ -84,7 +84,7 @@ otb_add_test(NAME bfTeIndexedToRGBExampleTest COMMAND ${OTB_TEST_DRIVER} ...@@ -84,7 +84,7 @@ otb_add_test(NAME bfTeIndexedToRGBExampleTest COMMAND ${OTB_TEST_DRIVER}
${TEMP}/buildingExtractionRGB.png ${TEMP}/buildingExtractionRGB.png
${TEMP}/buildingExtractionIndexed_scaled.png ${TEMP}/buildingExtractionIndexed_scaled.png
) )
if(OTBMeanShift_LOADED) if(OTBMathParser_LOADED)
otb_add_test(NAME bfTeMeanShiftSegmentationFilterExampleTest COMMAND ${OTB_TEST_DRIVER} otb_add_test(NAME bfTeMeanShiftSegmentationFilterExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-n-images ${NOTOL} 4 --compare-n-images ${NOTOL} 4
${BASELINE}/MSClusteredOutput.tif ${BASELINE}/MSClusteredOutput.tif
......
...@@ -7,7 +7,7 @@ add_executable(ClassificationMapRegularizationExample ClassificationMapRegulariz ...@@ -7,7 +7,7 @@ add_executable(ClassificationMapRegularizationExample ClassificationMapRegulariz
target_link_libraries(ClassificationMapRegularizationExample ${OTB_LIBRARIES}) target_link_libraries(ClassificationMapRegularizationExample ${OTB_LIBRARIES})
#OTBDempsterShafer depends OTBMathParser. But OTB_USE_MUPARSER is OFF #OTBDempsterShafer depends OTBMathParser. But OTB_USE_MUPARSER is OFF
if(OTBDempsterShafer_LOADED) if(OTBMathParser_LOADED)
add_executable(DempsterShaferFusionOfClassificationMapsExample DempsterShaferFusionOfClassificationMapsExample.cxx) add_executable(DempsterShaferFusionOfClassificationMapsExample DempsterShaferFusionOfClassificationMapsExample.cxx)
target_link_libraries(DempsterShaferFusionOfClassificationMapsExample ${OTB_LIBRARIES}) target_link_libraries(DempsterShaferFusionOfClassificationMapsExample ${OTB_LIBRARIES})
endif() endif()
......
...@@ -18,7 +18,8 @@ target_link_libraries(CorrelationLineDetectorExample ${OTB_LIBRARIES}) ...@@ -18,7 +18,8 @@ target_link_libraries(CorrelationLineDetectorExample ${OTB_LIBRARIES})
add_executable(EdgeDensityExample EdgeDensityExample.cxx) add_executable(EdgeDensityExample EdgeDensityExample.cxx)
target_link_libraries(EdgeDensityExample ${OTB_LIBRARIES}) target_link_libraries(EdgeDensityExample ${OTB_LIBRARIES})
if(OTBRoadExtraction_LOADED) #OTBRoadExtraction depends OTBMathParser. But OTB_USE_MUPARSER is OFF
if(OTBMathParser_LOADED)
add_executable(ExtractRoadByStepsExample ExtractRoadByStepsExample.cxx) add_executable(ExtractRoadByStepsExample ExtractRoadByStepsExample.cxx)
target_link_libraries(ExtractRoadByStepsExample ${OTB_LIBRARIES}) target_link_libraries(ExtractRoadByStepsExample ${OTB_LIBRARIES})
......
...@@ -107,7 +107,7 @@ otb_add_test(NAME feTeRatioLineDetectorExampleTest COMMAND ${OTB_TEST_DRIVER} ...@@ -107,7 +107,7 @@ otb_add_test(NAME feTeRatioLineDetectorExampleTest COMMAND ${OTB_TEST_DRIVER}
) )
# ------- AlignmentsExampleTest---------- # ------- AlignmentsExampleTest----------
if(OTBRoadExtraction_LOADED) if(OTBMathParser_LOADED)
otb_add_test(NAME feTeAlignmentsExampleTest COMMAND ${OTB_TEST_DRIVER} otb_add_test(NAME feTeAlignmentsExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-n-images ${NOTOL} 1 --compare-n-images ${NOTOL} 1
${BASELINE}/QB_SuburbAlign.png ${BASELINE}/QB_SuburbAlign.png
......
...@@ -30,7 +30,7 @@ target_link_libraries(ImageReadWrite ${OTB_LIBRARIES}) ...@@ -30,7 +30,7 @@ target_link_libraries(ImageReadWrite ${OTB_LIBRARIES})
add_executable(ImageSeriesIOExample ImageSeriesIOExample.cxx) add_executable(ImageSeriesIOExample ImageSeriesIOExample.cxx)
target_link_libraries(ImageSeriesIOExample ${OTB_LIBRARIES}) target_link_libraries(ImageSeriesIOExample ${OTB_LIBRARIES})
if(OTBKMZWriter_LOADED) if(OTBlibkml_LOADED)
add_executable(ImageToKmzAndMapFileProductExample ImageToKmzAndMapFileProductExample.cxx) add_executable(ImageToKmzAndMapFileProductExample ImageToKmzAndMapFileProductExample.cxx)
target_link_libraries(ImageToKmzAndMapFileProductExample ${OTB_LIBRARIES}) target_link_libraries(ImageToKmzAndMapFileProductExample ${OTB_LIBRARIES})
endif() endif()
......
...@@ -43,7 +43,7 @@ otb_add_test(NAME prTeDEMHandlerExampleTest COMMAND ${OTB_TEST_DRIVER} ...@@ -43,7 +43,7 @@ otb_add_test(NAME prTeDEMHandlerExampleTest COMMAND ${OTB_TEST_DRIVER}
0.001 0.001
) )
if(OTBKMZWriter_LOADED) if(OTBlibkml_LOADED)
otb_add_test(NAME ioTeImageToKmzAndMapFileProductExample COMMAND ${OTB_TEST_DRIVER} otb_add_test(NAME ioTeImageToKmzAndMapFileProductExample COMMAND ${OTB_TEST_DRIVER}
Execute $<TARGET_FILE:ImageToKmzAndMapFileProductExample> Execute $<TARGET_FILE:ImageToKmzAndMapFileProductExample>
${OTB_DATA_ROOT}/Input/Haiti1_sr10.jpeg ${OTB_DATA_ROOT}/Input/Haiti1_sr10.jpeg
......
...@@ -12,7 +12,7 @@ target_link_libraries(SOMClassifierExample ${OTB_LIBRARIES}) ...@@ -12,7 +12,7 @@ target_link_libraries(SOMClassifierExample ${OTB_LIBRARIES})
add_executable(SOMExample SOMExample.cxx) add_executable(SOMExample SOMExample.cxx)
target_link_libraries(SOMExample ${OTB_LIBRARIES}) target_link_libraries(SOMExample ${OTB_LIBRARIES})
if(OTBSVMLearning_LOADED) if(OTBLibSVM_LOADED)
add_executable(SVMImageClassificationExample SVMImageClassificationExample.cxx) add_executable(SVMImageClassificationExample SVMImageClassificationExample.cxx)
target_link_libraries(SVMImageClassificationExample ${OTB_LIBRARIES}) target_link_libraries(SVMImageClassificationExample ${OTB_LIBRARIES})
......
...@@ -3,7 +3,7 @@ set(INPUTDATA ${OTB_DATA_ROOT}/Examples) ...@@ -3,7 +3,7 @@ set(INPUTDATA ${OTB_DATA_ROOT}/Examples)
# ------- SVMImageClassificationExampleTest---------- # ------- SVMImageClassificationExampleTest----------
if(OTBSVMLearning_LOADED) if(OTBLibSVM_LOADED)
otb_add_test(NAME leTeSVMImageClassificationExampleTest COMMAND ${OTB_TEST_DRIVER} otb_add_test(NAME leTeSVMImageClassificationExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-n-images ${NOTOL} 1 --compare-n-images ${NOTOL} 1
${BASELINE}/ROI_QB_MUL_1_SVN_CLASS.png ${BASELINE}/ROI_QB_MUL_1_SVN_CLASS.png
......
...@@ -12,7 +12,7 @@ target_link_libraries(KeepNObjects ${OTB_LIBRARIES}) ...@@ -12,7 +12,7 @@ target_link_libraries(KeepNObjects ${OTB_LIBRARIES})
add_executable(LabelMapToVectorData LabelMapToVectorData.cxx) add_executable(LabelMapToVectorData LabelMapToVectorData.cxx)
target_link_libraries(LabelMapToVectorData ${OTB_LIBRARIES}) target_link_libraries(LabelMapToVectorData ${OTB_LIBRARIES})
if(OTBMeanShift_LOADED) if(OTBMathParser_LOADED)
add_executable(RadiometricAttributesLabelMapFilterExample RadiometricAttributesLabelMapFilterExample.cxx) add_executable(RadiometricAttributesLabelMapFilterExample RadiometricAttributesLabelMapFilterExample.cxx)
target_link_libraries(RadiometricAttributesLabelMapFilterExample ${OTB_LIBRARIES}) target_link_libraries(RadiometricAttributesLabelMapFilterExample ${OTB_LIBRARIES})
endif() endif()
......
...@@ -22,7 +22,7 @@ otb_add_test(NAME trTeOBIAShapeAttributeComputationTest COMMAND ${OTB_TEST_DRIVE ...@@ -22,7 +22,7 @@ otb_add_test(NAME trTeOBIAShapeAttributeComputationTest COMMAND ${OTB_TEST_DRIVE
${TEMP}/OBIAShapeAttribute.txt ${TEMP}/OBIAShapeAttribute.txt
) )
if(OTBMeanShift_LOADED) if(OTBMathParser_LOADED)
otb_add_test(NAME trTeOBIARadiometricAttributesLabelMapFilterTest COMMAND ${OTB_TEST_DRIVER} otb_add_test(NAME trTeOBIARadiometricAttributesLabelMapFilterTest COMMAND ${OTB_TEST_DRIVER}
--compare-image ${NOTOL} --compare-image ${NOTOL}
${BASELINE}/OBIARadiometricAttributes.png ${BASELINE}/OBIARadiometricAttributes.png
......
...@@ -3,7 +3,8 @@ project(RadiometryExamples) ...@@ -3,7 +3,8 @@ project(RadiometryExamples)
add_executable(ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx) add_executable(ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx)
target_link_libraries(ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter ${OTB_LIBRARIES}) target_link_libraries(ARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter ${OTB_LIBRARIES})
if(OTBOpticalCalibration_LOADED) #OTBOpticalCalibration -> OTB6S
if(OTB6S_LOADED)
add_executable(AtmosphericCorrectionSequencement AtmosphericCorrectionSequencement.cxx) add_executable(AtmosphericCorrectionSequencement AtmosphericCorrectionSequencement.cxx)
target_link_libraries(AtmosphericCorrectionSequencement ${OTB_LIBRARIES}) target_link_libraries(AtmosphericCorrectionSequencement ${OTB_LIBRARIES})
endif() endif()
......
...@@ -24,9 +24,9 @@ target_link_libraries(OtsuMultipleThresholdImageFilter ${OTB_LIBRARIES}) ...@@ -24,9 +24,9 @@ target_link_libraries(OtsuMultipleThresholdImageFilter ${OTB_LIBRARIES})
add_executable(OtsuThresholdImageFilter OtsuThresholdImageFilter.cxx) add_executable(OtsuThresholdImageFilter OtsuThresholdImageFilter.cxx)
target_link_libraries(OtsuThresholdImageFilter ${OTB_LIBRARIES}) target_link_libraries(OtsuThresholdImageFilter ${OTB_LIBRARIES})
if(OTBMeanShift_LOADED) if(OTBMathParser_LOADED)
add_executable(StreamingMeanShiftSegmentation StreamingMeanShiftSegmentation.cxx) add_executable(StreamingMeanShiftSegmentation StreamingMeanShiftSegmentation.cxx)
target_link_libraries(StreamingMeanShiftSegmentation ${OTB_LIBRARIES}) target_link_libraries(StreamingMeanShiftSegmentation ${OTB_LIBRARIES})
endif() endif()
add_executable(VectorConfidenceConnected VectorConfidenceConnected.cxx) add_executable(VectorConfidenceConnected VectorConfidenceConnected.cxx)
......
...@@ -272,7 +272,7 @@ otb_add_test(NAME seTeLabelizeNeighborhoodConnectedImageFilterTest COMMAND ${OTB ...@@ -272,7 +272,7 @@ otb_add_test(NAME seTeLabelizeNeighborhoodConnectedImageFilterTest COMMAND ${OTB
# ------- StreamingMeanShiftSegmentationTest ---------- # ------- StreamingMeanShiftSegmentationTest ----------
if(OTBMeanShift_LOADED) if(OTBMathParser_LOADED)
otb_add_test(NAME seTeStreamingMeanShiftSegmentationTest COMMAND ${OTB_TEST_DRIVER} otb_add_test(NAME seTeStreamingMeanShiftSegmentationTest COMMAND ${OTB_TEST_DRIVER}
# --compare-ogr ${NOTOL} # --compare-ogr ${NOTOL}
# ${BASELINE_FILES}/seTeStreamingMeanShiftSegmentationTest.shp # ${BASELINE_FILES}/seTeStreamingMeanShiftSegmentationTest.shp
......
project(SimulationExamples) project(SimulationExamples)
if(OTBSimulation_LOADED) #OTBSimulation -> OTBOpticalCalibration -> OTB6S
if(OTB6S_LOADED)
add_executable(LAIAndPROSAILToSensorResponse LAIAndPROSAILToSensorResponse.cxx) add_executable(LAIAndPROSAILToSensorResponse LAIAndPROSAILToSensorResponse.cxx)
target_link_libraries(LAIAndPROSAILToSensorResponse ${OTB_LIBRARIES}) target_link_libraries(LAIAndPROSAILToSensorResponse ${OTB_LIBRARIES})
......
...@@ -3,7 +3,8 @@ set(INPUTDATA ${OTB_DATA_ROOT}/Examples) ...@@ -3,7 +3,8 @@ set(INPUTDATA ${OTB_DATA_ROOT}/Examples)
# ------- ProsailModelExampleTest ---------- # ------- ProsailModelExampleTest ----------
if(OTBSimulation_LOADED) #OTBSimulation -> OTBOpticalCalibration -> OTB6S
if(OTB6S_LOADED)
otb_add_test(NAME siTvProsailModelExampleTest COMMAND ${OTB_TEST_DRIVER} otb_add_test(NAME siTvProsailModelExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-ascii ${EPSILON_3} --compare-ascii ${EPSILON_3}
${BASELINE}/siTvProsailModelExampleTest.txt ${BASELINE}/siTvProsailModelExampleTest.txt
......
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