Skip to content

Commit 61fda12

Browse files
Fix compiler detection for AppleClang and compiler flags for catch_main on OSX
1 parent d7a2b6b commit 61fda12

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmake/CompilerWarnings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function(set_project_warnings project_name)
7979

8080
if(MSVC)
8181
set(PROJECT_WARNINGS ${MSVC_WARNINGS})
82-
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
82+
elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
8383
set(PROJECT_WARNINGS ${CLANG_WARNINGS})
8484
else()
8585
set(PROJECT_WARNINGS ${GCC_WARNINGS})

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ endif()
88

99
add_library(catch_main STATIC catch_main.cpp)
1010
target_link_libraries(catch_main PUBLIC CONAN_PKG::catch2)
11+
target_link_libraries(catch_main PRIVATE project_options)
1112

1213
add_executable(tests tests.cpp)
1314
target_link_libraries(tests PRIVATE project_warnings project_options

0 commit comments

Comments
 (0)