how to pass -std=c++14 to b2 while building boost libraries
Hi, I would like to build a c++14 version of boost libraries on my system. I have the intel compiler (15.0.3) on a x86_64 linux machine (2.6.32-279.19.1.el6.x86_64). I do the following: 1. build b2 CC="icc" CFLAGS="-O2 -DNDEBUG -xhost" CXX="icpc" CXXFLAGS="-O2 -DNDEBUG -xhost -std=c++14" AR="ar" AS="as" RANLIB="ranlib" ./bootstrap.sh --without-icu --prefix=/myusr/icc-15.0.3-c++14-release/boost --with-toolset=intel-linux 2. edit user-config.jam My user-config.jam, located in the boost source directory contains: using intel-linux : : icpc : <compilerflags>-xhost <compilerflags>-std=c++14 ; 3. run b2 ./b2 -d2 -j16 -sBZIP2_INCLUDE=/myusr/icc-15.0.3-c++14-release/bzip2/include -sBZIP2_LIBPATH=/myusr/icc-15.0.3-c++14-release/bzip2/lib -sZLIB_INCLUDE=/myusr/icc-15.0.3-c++14-release/zlib/include -sZLIB_LIBPATH=/myusr/icc-15.0.3-c++14-release/zlib/lib --layout=system --user-config=user-config.jam --without-mpi --without-python --without-context --without-coroutine link=static threading=multi runtime-link=shared target-os=linux address-model=64 variant=release install The problem I see is that the flag -std=c++14 is not passed to the compiler. For example, this is an output of b2: "icpc" -c -xc++ -w1 -inline-level=2 -O3 -ip -pthread -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/filesystem/build/intel-linux/release/link-static/threading-multi/codecvt_error_category.o" "libs/filesystem/src/codecvt_error_category.cpp" no trace of -std=c++14 flag. How can I send that flag to the compiler? Apparently, the problem is the same when using g++ 5.2.0. Frédéric
On 9/30/2015 4:38 AM, Frédéric Bron wrote:
Hi,
I would like to build a c++14 version of boost libraries on my system. I have the intel compiler (15.0.3) on a x86_64 linux machine (2.6.32-279.19.1.el6.x86_64).
I do the following:
1. build b2
CC="icc" CFLAGS="-O2 -DNDEBUG -xhost" CXX="icpc" CXXFLAGS="-O2 -DNDEBUG -xhost -std=c++14" AR="ar" AS="as" RANLIB="ranlib" ./bootstrap.sh --without-icu --prefix=/myusr/icc-15.0.3-c++14-release/boost --with-toolset=intel-linux
2. edit user-config.jam
My user-config.jam, located in the boost source directory contains: using intel-linux : : icpc : <compilerflags>-xhost <compilerflags>-std=c++14 ;
Should be "compileflags" and not "compilerflags".
My user-config.jam, located in the boost source directory contains: using intel-linux : : icpc : <compilerflags>-xhost <compilerflags>-std=c++14 ;
Should be "compileflags" and not "compilerflags".
That was it and cxxflags is even better. Many thanks, Frédéric
participants (2)
-
Edward Diener
-
Frédéric Bron