mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-21 03:12:41 +08:00
cmake: use -Wall on GCC and Clang
These checks come from [1]. The `MATCHES` operator is used for clang because of Apple's special string. [1] http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang/10055571#10055571
This commit is contained in:
parent
1c31800210
commit
f058d3aa74
@ -10,6 +10,10 @@ include(CTest)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
add_library(spdlog INTERFACE)
|
||||
|
||||
option(SPDLOG_BUILD_EXAMPLES "Build examples" OFF)
|
||||
|
Loading…
Reference in New Issue
Block a user