mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Add option to skip headers check
In some configuration, such as our docker build, there's no need to perform headers check, as it is handled by a different job already.
This commit is contained in:
parent
155f5ae2f5
commit
05d125efbf
3 changed files with 4 additions and 3 deletions
|
@ -113,9 +113,10 @@ option(DISABLE_TTF "Disable support for TTF provided by freetype2.")
|
|||
option(ENABLE_SCRIPTING "Enable script / plugin support." ON)
|
||||
option(ENABLE_ASAN "Enable the AddressSanitizer.")
|
||||
option(ENABLE_UBSAN "Enable the UndefinedBehaviourSanitizer.")
|
||||
|
||||
option(ENABLE_HEADERS_CHECK "Check if include directives in header files are correct. Only works with clang" ON)
|
||||
option(DISABLE_GUI "Don't build GUI. (Headless only.)")
|
||||
|
||||
|
||||
if (FORCE32)
|
||||
set(TARGET_M "-m32")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_M}")
|
||||
|
|
|
@ -158,7 +158,7 @@ endif ()
|
|||
# Only valid for Clang for now:
|
||||
# - GCC 8 does not support -Wno-pragma-once-outside-header
|
||||
# - Other compilers status unknown
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
if (ENABLE_HEADERS_CHECK AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(OPENRCT2_HEADERS_CHECK ${OPENRCT2_UI_HEADERS})
|
||||
# OpenGLAPIProc.h is not meant to be included directly.
|
||||
list(REMOVE_ITEM OPENRCT2_HEADERS_CHECK "${CMAKE_CURRENT_LIST_DIR}/drawing/engines/opengl/OpenGLAPIProc.h")
|
||||
|
|
|
@ -262,7 +262,7 @@ endif()
|
|||
# Only valid for Clang for now:
|
||||
# - GCC 8 does not support -Wno-pragma-once-outside-header
|
||||
# - Other compilers status unknown
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
if (ENABLE_HEADERS_CHECK AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
add_library(${PROJECT_NAME}-headers-check OBJECT ${OPENRCT2_CORE_HEADERS})
|
||||
set_target_properties(${PROJECT_NAME}-headers-check PROPERTIES LINKER_LANGUAGE CXX)
|
||||
set_source_files_properties(${OPENRCT2_CORE_HEADERS} PROPERTIES LANGUAGE CXX)
|
||||
|
|
Loading…
Reference in a new issue