Commit fd9b2307 authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

Add build and testing to CI

parent 3edc614e
......@@ -20,7 +20,6 @@ OTB_USE_GLUT:BOOL=OFF
OTB_USE_GSL:BOOL=OFF
OTB_USE_LIBKML:BOOL=OFF
OTB_USE_LIBSVM:BOOL=OFF
OTB_USE_MAPNIK:BOOL=OFF
OTB_USE_MPI:BOOL=OFF
OTB_USE_MUPARSER:BOOL=OFF
OTB_USE_MUPARSERX:BOOL=OFF
......
......@@ -9,8 +9,9 @@ set (CTEST_SOURCE_DIRECTORY "${OTB_SOURCE_DIR}")
set (CTEST_BINARY_DIRECTORY "${OTB_SOURCE_DIR}/build/")
set (CMAKE_COMMAND "cmake")
set (PROJECT_SOURCE_DIR "${OTB_SOURCE_DIR}")
# set (CTEST_BUILD_COMMAND "make")
# number of thread used for compilation
set (CTEST_BUILD_FLAGS "-j8")
set (CTEST_BUILD_COMMAND "make")
set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
set (CTEST_BUILD_NAME "CI_TEST")
......@@ -31,12 +32,22 @@ include ( "${CMAKE_CURRENT_LIST_DIR}/configure_option.cmake" )
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
SOURCE "${OTB_SOURCE_DIR}"
OPTIONS "${CONFIGURE_OPTIONS}"
RETURN_VALUE _configure_rv)
RETURN_VALUE _configure_rv
CAPTURE_CMAKE_ERROR _configure_error)
if ( _configure_rv EQUAL -1 )
message("An error occurs during ctest_configure:
${_configure_error}")
endif()
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
RETURN_VALUE _build_rv]
CAPTURE_CMAKE_ERROR _build_error]
)
if ( _configure_rv EQUAL -1 )
message("An error occurs during ctest_configure ${_configure_rv}")
message("An error occurs during ctest_build:
${_build_error}")
endif()
message("${_configure_rv}")
# ctest_build()
# ctest_test()
\ No newline at end of file
ctest_test()
\ No newline at end of file
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