Skip to content

Commit

Permalink
Add compiler warnings flags
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-le-cam committed May 31, 2024
1 parent 53adedf commit 7b03366
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ find_package(spdlog CONFIG REQUIRED)
add_library(khiopsdriver_file_gcs MODULE src/gcsplugin.h src/gcsplugin.cpp)
set_target_properties(khiopsdriver_file_gcs PROPERTIES LINK_FLAGS_RELEASE -s)
target_link_libraries(khiopsdriver_file_gcs PRIVATE google-cloud-cpp::storage spdlog::spdlog)
target_compile_options(khiopsdriver_file_gcs
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:-Wall>
PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-Wall;-Wextra;-pedantic>
)

add_library(khiopsdriver_file_gcs_test SHARED src/gcsplugin.h src/gcsplugin.cpp)
set_target_properties(khiopsdriver_file_gcs_test PROPERTIES LINK_FLAGS_RELEASE -s)
target_link_libraries(khiopsdriver_file_gcs_test PRIVATE google-cloud-cpp::storage spdlog::spdlog)
target_compile_options(khiopsdriver_file_gcs_test
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:-Wall>
PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-Wall;-Wextra;-pedantic>
)

add_executable(KhiopsPluginTest src/khiopsplugintest.cpp)
target_link_libraries(KhiopsPluginTest PRIVATE fmt::fmt)
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target_sources( basic_test

target_compile_options(basic_test
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:-Wall>
PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-Wall;-Wextra;-pedantic>
)

target_link_libraries(basic_test GTest::gtest khiopsdriver_file_gcs_test)
Expand Down

0 comments on commit 7b03366

Please sign in to comment.