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.

+2 -1
+2 -1
pkgs/applications/misc/gnuradio/default.nix
··· 67 68 # patch wxgui and pygtk check due to python importerror in a headless environment 69 preConfigure = '' 70 - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11" 71 sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt 72 sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt 73 ''; 74 75 # Framework path needed for qwt6_qt4 but not qwt5
··· 67 68 # patch wxgui and pygtk check due to python importerror in a headless environment 69 preConfigure = '' 70 + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable ${stdenv.lib.optionalString (!stdenv.isDarwin) "-std=c++11"}" 71 sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt 72 sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt 73 + find . -name "CMakeLists.txt" -exec sed -i '1iadd_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++11>)' "{}" ";" 74 ''; 75 76 # Framework path needed for qwt6_qt4 but not qwt5