2018-02-10 02:07:35 +01:00
|
|
|
cmake_minimum_required(VERSION 3.2.2)
|
|
|
|
|
|
|
|
set(MODEL_NAME "continuous")
|
|
|
|
|
|
|
|
include("${CTEST_SCRIPT_DIRECTORY}/utils.ctest")
|
|
|
|
|
|
|
|
openrw_src_dir(CTEST_SOURCE_DIRECTORY)
|
|
|
|
if($ENV{DOCKER})
|
|
|
|
set(CTEST_BINARY_DIRECTORY "/build")
|
|
|
|
else()
|
|
|
|
openrw_bin_dir_default(CTEST_BINARY_DIRECTORY)
|
|
|
|
endif()
|
|
|
|
set(CTEST_COMMAND "${CMAKE_CTEST_COMMAND}")
|
|
|
|
|
2018-06-07 02:19:53 +02:00
|
|
|
message(STATUS "CTEST_SOURCE_DIRECTORY=${CTEST_SOURCE_DIRECTORY}")
|
|
|
|
message(STATUS "CTEST_BINARY_DIRECTORY=${CTEST_BINARY_DIRECTORY}")
|
|
|
|
|
2018-02-10 02:07:35 +01:00
|
|
|
openrw_build_name(BUILDER_NAME_BASE BUILD_NAME)
|
|
|
|
set(BUILDER_NAME_BASE "${BUILDER_NAME_BASE}-$ENV{NAME_SUFFIX}")
|
|
|
|
|
2018-06-07 02:19:53 +02:00
|
|
|
message(STATUS "Removing binary directory '${CTEST_BINARY_DIRECTORY}'...")
|
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
|
|
|
|
message(STATUS "CMakeCache.txt file exists ==> removing")
|
|
|
|
ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
|
|
|
|
endif()
|
|
|
|
file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
|
|
|
|
|
2018-02-10 02:07:35 +01:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
message(STATUS "Linux detected")
|
|
|
|
|
|
|
|
include("${CTEST_SCRIPT_DIRECTORY}/configure_linux.ctest")
|
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
|
|
message(STATUS "Windows detected")
|
|
|
|
|
|
|
|
include("${CTEST_SCRIPT_DIRECTORY}/configure_windows.ctest")
|
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
|
|
message(STATUS "MacOS X detected")
|
|
|
|
|
|
|
|
include("${CTEST_SCRIPT_DIRECTORY}/configure_darwin.ctest")
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unknown CMAKE_SYSTEM_NAME detected '${CMAKE_SYSTEM_NAME}'")
|
|
|
|
endif()
|
|
|
|
|
2018-06-07 02:19:53 +02:00
|
|
|
if($ENV{USE_CONAN})
|
|
|
|
set(USE_CONAN TRUE)
|
|
|
|
else()
|
|
|
|
set(USE_CONAN FALSE)
|
|
|
|
endif()
|
|
|
|
|
2018-02-10 02:07:35 +01:00
|
|
|
set(SEPARATE_TEST_SUITES FALSE)
|
|
|
|
set(RUN_MEMCHECK FALSE)
|
2018-06-07 14:22:09 +02:00
|
|
|
openrw_should_submit_ci(SUBMIT)
|
2018-02-10 02:07:35 +01:00
|
|
|
|
|
|
|
# Build with no data and test
|
2019-01-18 02:29:59 +01:00
|
|
|
set(BUILDER_NAME "${BUILDER_NAME_BASE}")
|
2018-02-10 02:07:35 +01:00
|
|
|
set(APPEND_RESULTS FALSE)
|
|
|
|
set(RUN_TESTS TRUE)
|
2018-11-20 06:51:34 +01:00
|
|
|
if($ENV{TEST_COVERAGE})
|
|
|
|
set(TEST_COVERAGE TRUE)
|
|
|
|
else()
|
|
|
|
set(TEST_COVERAGE FALSE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CODECOV_FLAGS "nodata")
|
2018-02-10 02:07:35 +01:00
|
|
|
|
|
|
|
include("${CTEST_SCRIPT_DIRECTORY}/build.ctest")
|
|
|
|
|
2018-11-20 06:51:34 +01:00
|
|
|
handle_warnings_errors()
|