Commit 2dd18c3a authored by Julien Michel's avatar Julien Michel

ENH: Fixing standalone testing: macro definition must reside before subdirs,...

ENH: Fixing standalone testing: macro definition must reside before subdirs, and CtestConfig.cmake is missing at testing level
parent f1aab7c7
......@@ -39,6 +39,23 @@ ELSE(OTB_BINARY_DIR)
FIND_PATH(OTB_DATA_LARGEINPUT_ROOT OTBData.readme $ENV{OTB_DATA_LARGEINPUT_ROOT})
MARK_AS_ADVANCED(OTB_DATA_LARGEINPUT_ROOT)
ENDIF(OTB_DATA_USE_LARGEINPUT)
MACRO(OTB_ADD_EXECUTABLE name sources libraries)
ADD_EXECUTABLE(${name} ${sources})
TARGET_LINK_LIBRARIES(${name} ${libraries})
IF(OTB_CPP_CHECK_SOURCE_FILE)
FOREACH( file ${sources})
ADD_CUSTOM_COMMAND( TARGET ${name}
PRE_BUILD
COMMAND ${OTB_CPP_CHECK_PROG}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
DEPENDS ${libraries}
COMMENT "============== C++ checking ${file} source file... =================="
VERBATIM )
ENDFOREACH(file)
ENDIF(OTB_CPP_CHECK_SOURCE_FILE)
ENDMACRO(OTB_ADD_EXECUTABLE)
# Find OTB and load its settings.
FIND_PACKAGE(OTB)
IF(OTB_FOUND)
......@@ -68,23 +85,6 @@ ELSE(OTB_BINARY_DIR)
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_BIN_DIR_CM24 "${OTB_INSTALL_BIN_DIR}")
STRING(REGEX REPLACE "^/" "" OTB_INSTALL_INCLUDE_DIR_CM24 "${OTB_INSTALL_INCLUDE_DIR}")
MACRO(OTB_ADD_EXECUTABLE name sources libraries)
ADD_EXECUTABLE(${name} ${sources})
TARGET_LINK_LIBRARIES(${name} ${libraries})
IF(OTB_CPP_CHECK_SOURCE_FILE)
FOREACH( file ${sources})
ADD_CUSTOM_COMMAND( TARGET ${name}
PRE_BUILD
COMMAND ${OTB_CPP_CHECK_PROG}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
DEPENDS ${libraries}
COMMENT "============== C++ checking ${file} source file... =================="
VERBATIM )
ENDFOREACH(file)
ENDIF(OTB_CPP_CHECK_SOURCE_FILE)
ENDMACRO(OTB_ADD_EXECUTABLE)
ENDIF(OTB_BINARY_DIR)
IF(OTB_COMPILE_WITH_FULL_WARNING)
......
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(Dart)
set(CTEST_PROJECT_NAME "OTB")
set(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
set(CTEST_NIGHTLY_IDENT_LOCATION "http://www.orfeo-toolbox.org/nightly/libNightlyNumber")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "dash.orfeo-toolbox.org")
set(CTEST_DROP_LOCATION "/submit.php?project=OTB")
set(CTEST_DROP_SITE_CDASH TRUE)
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