mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
a40a2706a9
The output is currently very verbose and includes many false positives. Adding a mapping file should solve this. See https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUMappings.md
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
cmake_minimum_required(VERSION 3.2.2)
|
|
|
|
get_filename_component(CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/../.." ABSOLUTE)
|
|
get_filename_component(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build/experimental" ABSOLUTE)
|
|
|
|
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
|
|
set(CTEST_COVERAGE_COMMAND "gcov")
|
|
|
|
if(EXISTS "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
|
|
ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
|
|
endif()
|
|
|
|
include("${CTEST_SCRIPT_DIRECTORY}/../modules/GetGitRevisionDescription.cmake")
|
|
# get_git_head_revision expects CMAKE_CURRENT_BINARY_DIR to exist.
|
|
set(CMAKE_BINARY_DIR "${CTEST_BINARY_DIRECTORY}")
|
|
set(CMAKE_CURRENT_BINARY_DIR "${CTEST_BINARY_DIRECTORY}")
|
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
|
string(SUBSTRING "${GIT_SHA1}" 0 8 SHORT_COMMIT)
|
|
|
|
set(CTEST_SITE "${CMAKE_SYSTEM_NAME}")
|
|
set(CTEST_BUILD_NAME "experimental_script-${SHORT_COMMIT}")
|
|
|
|
ctest_start("Experimental")
|
|
ctest_configure(
|
|
OPTIONS
|
|
"-DBUILD_VIEWER=1;-DBUILD_TESTS=1;-DTEST_COVERAGE=1;-DRW_VERBOSE_DEBUG_MESSAGES=1;-DSEPERATE_TEST_SUITES=1;-DCHECK_INCLUDES=1"
|
|
)
|
|
ctest_build()
|
|
ctest_test()
|
|
ctest_coverage()
|
|
ctest_coverage()
|
|
ctest_submit(
|
|
RETURN_VALUE SUBMIT_RESULT
|
|
)
|
|
|
|
message("Site: ${CTEST_SITE}")
|
|
message("Build Name: ${CTEST_BUILD_NAME}")
|
|
|
|
if(NOT SUBMIT_RESULT EQUAL "0")
|
|
message("Uploading results failed.")
|
|
message("Execute the next command to submit later.")
|
|
message("make -C \"${CTEST_BINARY_DIRECTORY}\" ExperimentalSubmit")
|
|
endif()
|