mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-23 22:30:51 +00:00
Don't overwrite user-specified CFLAGS and CXXFLAGS (#51)
* Check C and C++ compiler separately It's possible (however unlikely) that the C++ compiler might be clang but the C compiler might not be. * Don't overwrite user-specified CFLAGS and CXXFLAGS
This commit is contained in:
parent
a76287876c
commit
b8d17f4481
@ -11,8 +11,12 @@ set(CMAKE_C_EXTENSIONS FALSE)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
# Clang or AppleClang
|
||||
set(CMAKE_CXX_FLAGS "-Wall")
|
||||
set(CMAKE_C_FLAGS "-Wall")
|
||||
set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
||||
# Clang or AppleClang
|
||||
set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user