mirror of
https://github.com/ckb-next/ckb-next.git
synced 2026-10-10 12:27:21 -04:00
cmake: Add WERROR option
It is meant to be used for CI
This commit is contained in:
@@ -121,6 +121,7 @@ option(DEBUG_MUTEX "Show debugging information regarding thread synchronisat
|
||||
option(NO_FAIR_MUTEX_QUEUEING "Disable fair mutex queueing. Debugging only." OFF)
|
||||
option(DEBUG_INPUT_SYNC "Print a debug message every time an event bundle is delivered to the OS." OFF)
|
||||
option(FPS_COUNTER "Enable FPS counters." OFF)
|
||||
option(WERROR "Enable Werror (for CI)" OFF)
|
||||
|
||||
# Make sure NO_FAIR_MUTEX_QUEUEING is set if TSAN is enabled
|
||||
# Otherwise you end up with threading issues that are not detected
|
||||
|
||||
@@ -82,3 +82,14 @@ list(APPEND CKB_NEXT_EXTRA_CXX_FLAGS
|
||||
|
||||
string(REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
string(REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
|
||||
if(WERROR)
|
||||
list(APPEND CKB_NEXT_EXTRA_C_FLAGS
|
||||
-Werror
|
||||
-Wno-error=cpp
|
||||
)
|
||||
list(APPEND CKB_NEXT_EXTRA_CXX_FLAGS
|
||||
-Werror
|
||||
-Wno-error=cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user