diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-27 14:10:11 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-27 14:10:11 -0400 |
commit | 477a6e1d0385f28117f1be23320841672e922c63 (patch) | |
tree | 9fb759fd16c7a196cee7856824e7cf4d738999a2 | |
parent | 03ed337f220d1ca133433473fe63813b1d19c9e2 (diff) | |
download | spmc-477a6e1d0385f28117f1be23320841672e922c63.tar.gz |
Fix compiler warnings not triggering
-rw-r--r-- | lib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 3ec0f68..fd5c905 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -44,9 +44,9 @@ if (LINUX) endif() if(MSVC) - target_compile_options(libspm PRIVATE /W4 /WX) + target_compile_options(libspm PUBLIC /W4 /WX) else() - target_compile_options(libspm PRIVATE -Wall -Wextra -fstack-protector) + target_compile_options(libspm PUBLIC -Wall -Wextra -fstack-protector) endif() set_target_properties(libspm PROPERTIES OUTPUT_NAME "spm") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0eb8e34..e4d069c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,6 +10,9 @@ file(GLOB files "test_*.c") foreach(file ${files}) string(REGEX REPLACE "(^.*/|\\.[^.]*$)" "" file_without_ext ${file}) add_executable(${file_without_ext} ${file}) + if(NOT(MSVC)) + target_compile_options(${file_without_ext} PRIVATE -Wno-unused-parameter) + endif() target_link_libraries(${file_without_ext} libspm ${PROJECT_LIBS}) add_test(${file_without_ext} ${file_without_ext}) set_tests_properties(${file_without_ext} |