gnuradio: Resolve darwin c++11 issues

-std=c++11 causes errors with OBJ-C files on Darwin. Inject dynamic compiler flag into every cmake file to work around this.
This commit is contained in:
Luke Adams 2017-11-10 18:26:09 -06:00
parent 6e9140d5c3
commit 5d75dbe5e5

View File

@ -67,9 +67,10 @@ stdenv.mkDerivation rec {
# patch wxgui and pygtk check due to python importerror in a headless environment
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable ${stdenv.lib.optionalString (!stdenv.isDarwin) "-std=c++11"}"
sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt
sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt
find . -name "CMakeLists.txt" -exec sed -i '1iadd_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++11>)' "{}" ";"
'';
# Framework path needed for qwt6_qt4 but not qwt5