Add option to enable all compiler warnings in GCC/Clang (#5897)
* Add option to enable all compiler warnings in GCC/Clang * Fix -Wall for CUDA sources * Make -Wall private req for xgboost-r
This commit is contained in:
committed by
GitHub
parent
9b688aca3b
commit
627cf41a60
@@ -72,6 +72,11 @@ if (MSVC)
|
||||
)
|
||||
endif (MSVC)
|
||||
|
||||
if (ENABLE_ALL_WARNINGS)
|
||||
target_compile_options(objxgboost PUBLIC
|
||||
$<IF:$<COMPILE_LANGUAGE:CUDA>,-Xcompiler=-Wall -Xcompiler=-Wextra,-Wall -Wextra>)
|
||||
endif (ENABLE_ALL_WARNINGS)
|
||||
|
||||
set_target_properties(objxgboost PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
CXX_STANDARD 14
|
||||
|
||||
Reference in New Issue
Block a user