forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstarlight-r193-allow-setting-CMAKE_CXX_FLAGS.patch
30 lines (30 loc) · 1.65 KB
/
starlight-r193-allow-setting-CMAKE_CXX_FLAGS.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d6c856..e51b906 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,21 +84,21 @@ if (CMAKE_COMPILER_IS_GNUCC)
if (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6)
message(STATUS "GCC_VERSION>=4.6")
if(CPP11)
- set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno-error=maybe-uninitialized -Wno-error=unused-variable -std=c++11")
+ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno-error=maybe-uninitialized -Wno-error=unused-variable -std=c++11 ${CMAKE_CXX_FLAGS}")
message(STATUS "Enabling usage of C++11 features")
else()
- set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno-error=maybe-uninitialized -Wno-error=unused-variable")
+ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno-error=maybe-uninitialized -Wno-error=unused-variable ${CMAKE_CXX_FLAGS}")
endif()
else()
message(STATUS "GCC_VERSION<4.6")
- set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror")
+ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror ${CMAKE_CXX_FLAGS}")
if(CPP11)
message(WARNING "C++11 feautures not supported for your compiler")
endif()
endif()
else()
message(STATUS "Not GCC")
- set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror")
+ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror ${CMAKE_CXX_FLAGS}")
if(CPP11)
message(WARNING "C++11 feautures not supported for your compiler")
endif()