diff --git a/libs/cpp/parse/CMakeLists.txt b/libs/cpp/parse/CMakeLists.txt index f3e9ae4..7cefa24 100644 --- a/libs/cpp/parse/CMakeLists.txt +++ b/libs/cpp/parse/CMakeLists.txt @@ -3,14 +3,17 @@ include(GNUInstallDirs) add_library(libevents_parser parser.cpp ) -target_compile_options(libevents_parser - PRIVATE - -Wall - -Wextra - -Werror - -Wconversion - -Wpedantic -) + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(libevents_parser + PRIVATE + -Wall + -Wextra + -Werror + -Wconversion + -Wpedantic + ) +endif() set_target_properties(libevents_parser PROPERTIES PUBLIC_HEADER parser.h) install(TARGETS libevents_parser EXPORT libevents diff --git a/libs/cpp/tests/CMakeLists.txt b/libs/cpp/tests/CMakeLists.txt index ad99302..83862c8 100644 --- a/libs/cpp/tests/CMakeLists.txt +++ b/libs/cpp/tests/CMakeLists.txt @@ -33,14 +33,16 @@ add_custom_target(libevents_test_header DEPENDS ${generated_events_header}) add_executable(parser_test parser.cpp ) -target_compile_options(parser_test - PRIVATE - -Wall - -Wextra - -Werror - -Wconversion - -Wpedantic -) +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(parser_test + PRIVATE + -Wall + -Wextra + -Werror + -Wconversion + -Wpedantic + ) +endif() target_link_libraries(parser_test PRIVATE libevents_parser GTest::gtest_main