2020-03-11 18:16:04 +00:00
|
|
|
##=============================================================================
|
|
|
|
##
|
|
|
|
## Copyright (c) Kitware, Inc.
|
|
|
|
## All rights reserved.
|
|
|
|
## See LICENSE.txt for details.
|
|
|
|
##
|
|
|
|
## This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
## PURPOSE. See the above copyright notice for more information.
|
|
|
|
##
|
|
|
|
##=============================================================================
|
|
|
|
|
|
|
|
# Read the files from the build directory that contain
|
|
|
|
# host information ( name, parallel level, etc )
|
|
|
|
include("$ENV{CI_PROJECT_DIR}/build/CIState.cmake")
|
|
|
|
ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
|
|
|
|
|
|
|
|
|
|
|
|
# Pick up from where the configure left off.
|
|
|
|
ctest_start(APPEND)
|
|
|
|
message(STATUS "CTEST_BUILD_FLAGS: ${CTEST_BUILD_FLAGS}")
|
|
|
|
ctest_build(APPEND
|
|
|
|
NUMBER_WARNINGS num_warnings
|
|
|
|
RETURN_VALUE build_result)
|
2020-04-02 19:09:47 +00:00
|
|
|
|
|
|
|
if(NOT DEFINED ENV{GITLAB_CI_EMULATION})
|
2020-05-13 19:15:02 +00:00
|
|
|
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
|
|
|
|
ctest_submit(PARTS Build BUILD_ID build_id)
|
|
|
|
message(STATUS "Build submission build_id: ${build_id}")
|
|
|
|
else()
|
|
|
|
ctest_submit(PARTS Build)
|
|
|
|
endif()
|
2020-04-02 19:09:47 +00:00
|
|
|
endif()
|
2020-03-11 18:16:04 +00:00
|
|
|
|
2023-04-26 22:48:13 +00:00
|
|
|
file(WRITE "${CTEST_BINARY_DIRECTORY}/compile_num_warnings.log" "${num_warnings}")
|
|
|
|
|
2020-03-11 18:16:04 +00:00
|
|
|
if (build_result)
|
2023-04-26 22:48:13 +00:00
|
|
|
message(FATAL_ERROR "Failed to build")
|
2020-03-11 18:16:04 +00:00
|
|
|
endif ()
|