From 49ca8112c2777fcc4b81eff72ce59fb40fa0024d Mon Sep 17 00:00:00 2001 From: Ajith Saya Date: Tue, 17 Mar 2020 14:27:43 -0500 Subject: cmake: Add ability to pass CXXFLAGS to CMake environment CMAKE_CXX_FLAGS will now respect $CXX_FLAGS. --- host/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 2d966fd22..8f72ece76 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -223,6 +223,9 @@ set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "") #force UHD_RELEASE_MODE to be a string for cmake-gui set(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE STRING "UHD Release Mode") +# Add any additional C++ compiler flags passed into CMake through NIUHD_CXXFLAGS variable +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NIUHD_CXXFLAGS}") + if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") if(STRIP_BINARIES) -- cgit v1.2.3