-no-unused-XXX options added for selective build mode (#3702)
This commit is contained in:
parent
2ebae7cf30
commit
a67a72084f
@ -51,6 +51,15 @@ elseif(SELECTIVE_BUILD STREQUAL "ON")
|
|||||||
|
|
||||||
target_compile_definitions(${TARGET_NAME} INTERFACE SELECTIVE_BUILD)
|
target_compile_definitions(${TARGET_NAME} INTERFACE SELECTIVE_BUILD)
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
||||||
|
OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
|
||||||
|
# After disabling a block of code, some variables might be unused.
|
||||||
|
target_compile_options(${TARGET_NAME} INTERFACE
|
||||||
|
-Wno-unused-function
|
||||||
|
-Wno-unused-parameter
|
||||||
|
-Wunused-local-typedefs)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(GENERATED_HEADER ${CMAKE_CURRENT_BINARY_DIR}/conditional_compilation_gen.h)
|
set(GENERATED_HEADER ${CMAKE_CURRENT_BINARY_DIR}/conditional_compilation_gen.h)
|
||||||
set(GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ccheader.py)
|
set(GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ccheader.py)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user