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:
Philip Hyunsu Cho
2020-07-21 23:34:03 -07:00
committed by GitHub
parent 9b688aca3b
commit 627cf41a60
6 changed files with 28 additions and 1 deletions

View File

@@ -2,6 +2,9 @@ find_package(JNI REQUIRED)
add_library(xgboost4j SHARED
${PROJECT_SOURCE_DIR}/jvm-packages/xgboost4j/src/native/xgboost4j.cpp)
if (ENABLE_ALL_WARNINGS)
target_compile_options(xgboost4j PUBLIC -Wall -Wextra)
endif (ENABLE_ALL_WARNINGS)
target_link_libraries(xgboost4j PRIVATE objxgboost)
target_include_directories(xgboost4j
PRIVATE