From 102f22f974c1476150523e7f3f4d15dcb9948e7b Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Mon, 15 Mar 2021 15:52:42 -0500 Subject: [PATCH] Append CXXFLAGS env. variable to CMAKE_CXX_FLAGS This facilitates address sanitizer builds via env. variable. Change-Id: I69fc9a5782ca80d7bdbf2b1ec0c89cccc4a5ca11 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 112d1d7734..d8052a9aa9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,8 +129,9 @@ add_definitions(-DLITTLEENDIAN_CPU=1) # # Linux Compiler options # -set(CMAKE_CXX_FLAGS "-std=c++11 ") +set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno")