aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjith Saya <ajith.saya@ni.com>2020-03-17 14:27:43 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-04-02 13:08:46 -0500
commit49ca8112c2777fcc4b81eff72ce59fb40fa0024d (patch)
tree5f15d79e4e82fa83f5d173d171612fa23b5272ef
parent1383fde3457168ed759d6ed3b913dfae8a6085ef (diff)
downloaduhd-49ca8112c2777fcc4b81eff72ce59fb40fa0024d.tar.gz
uhd-49ca8112c2777fcc4b81eff72ce59fb40fa0024d.tar.bz2
uhd-49ca8112c2777fcc4b81eff72ce59fb40fa0024d.zip
cmake: Add ability to pass CXXFLAGS to CMake environment
CMAKE_CXX_FLAGS will now respect $CXX_FLAGS.
-rw-r--r--host/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
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)