On 9/10/2019 2:43 PM, Roy Musselman via Boost-users wrote:
It would be convenient if the compiler flag cxxflags=-std=c++1 worked. It's specified in the spec used on the spack install command but it seems that, for boost, the spack compiler wrappers are being bypassed. Even the CXXFLAGS environment variable is being ignored. However the option *"cxxstd=11"*made it all the way from the spack install command down to the invocation of b2. But the underlying xlcpp.jam file was not respecting that option, unlike jam files for other compilers.
'./bootstrap.sh' '--prefix=${path_to_boost}/boost-1.70.0-urzwfgarnvpznbxfbwzgh4b7u5xfs5dz' '--with-toolset=xlcpp' '--with-libraries=locale,random,wave,atomic,serialization,mpi,iostreams,regex,date_time,exception,log,thread,chrono,graph,system,timer,python,program_options,filesystem,test,math,graph_parallel' '--with-python=/usr/tce/packages/python/python-3.7.2/bin/python3.7' Building Boost.Build engine with toolset xlcpp... tools/build/src/engine/bin.linuxppc/b2 . . . './b2' 'install' 'threading=multi' '-j' '32' '--user-config=${path_to_boost}/boost-1.70.0-urzwfgarnvpznbxfbwzgh4b7u5xfs5dz/spack-src/user-config.jam' 'variant=release' '-s' 'BZIP2_INCLUDE=/usr/bin/include' '-s' 'BZIP2_LIBPATH=/usr/bin/lib' '-s' 'ZLIB_INCLUDE=/usr/lib64/include' '-s' 'ZLIB_LIBPATH=/usr/lib64/lib' 'link=static,shared' '--layout=system' 'toolset=xlcpp' '*cxxstd=11*' 'visibility=hidden'
Here are the various options for the -std= flag supported by the XL compilers.
-std syntax (C only) -std= gnu9x gnu99 c89 c90 c99 c9x c11 c1x iso9899:1990 iso9899:199409 iso9899:1999 iso9899:199x iso9899:2011 gnu89 gnu90 gnu11
-std syntax (C++ only) -std= gnu++98 gnu++03 c++98 c++03 gnu++11 c++0x gnu++0x c++11 c++1y
I assume "c++1y" implements the c++14 standard. I created a pull request for Boost Build on the 'develop' branch. Thanks for bringing this up.