Skip to content

Commit

Permalink
Add compile options for GNU and Clang only
Browse files Browse the repository at this point in the history
  • Loading branch information
sweemer authored and lballabio committed May 8, 2023
1 parent f8fb06b commit ca413d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if (QL_ENABLE_DEFAULT_WARNING_LEVEL)
# warning level 3
# There are also specific warnings disabled for MSCV in cmake/Platform.cmake.
add_compile_options(-W3)
else()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# lots of warnings
add_compile_options(-Wall -Wno-unknown-pragmas)
endif()
Expand All @@ -125,7 +125,7 @@ if (QL_COMPILE_WARNING_AS_ERROR)
# or set them manually
if (MSVC)
add_compile_options(-WX)
else()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Werror)
endif()
endif()
Expand Down

0 comments on commit ca413d2

Please sign in to comment.