diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-25 17:59:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-30 18:12:24 +0300 |
commit | 885cc4cf9a1d5c167e4cbd26c3294d8b1ad400d8 (patch) | |
tree | cb7f2b6ef98c6ce346f2378096bc9d32a3e5606e /build_files/build_environment/install_deps.sh | |
parent | b59d85b5a56c020c7b86b0cca4dc38e4950550f9 (diff) |
Build: require C11/C++11 for all operating systems in master.
This is in preparation of upgrading our library dependencies, some of which
need C++11. We already use C++11 in blender2.8 and for Windows and macOS, so
this just affects Linux.
On many distributions this will not require any changes, on some
install_deps.sh will need to be run again to rebuild libraries.
Differential Revision: https://developer.blender.org/D3568
Diffstat (limited to 'build_files/build_environment/install_deps.sh')
-rwxr-xr-x | build_files/build_environment/install_deps.sh | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 6cd725494b3..8d277ac787e 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -290,7 +290,7 @@ SUDO="sudo" NO_BUILD=false NO_CONFIRM=false -USE_CXX11=false +USE_CXX11=true PYTHON_VERSION="3.6.2" PYTHON_VERSION_MIN="3.6" @@ -501,9 +501,6 @@ while true; do --no-confirm) NO_CONFIRM=true; shift; continue ;; - --use-cxx11) - USE_CXX11=true; shift; continue - ;; --with-all) WITH_ALL=true; shift; continue ;; @@ -802,20 +799,10 @@ OPENCOLLADA_REPO_BRANCH="master" FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" ) +# C++11 is required now CXXFLAGS_BACK=$CXXFLAGS -if [ "$USE_CXX11" = true ]; then - WARNING "You are trying to use c++11, this *should* go smoothely with any very recent distribution -However, if you are experiencing linking errors (also when building Blender itself), please try the following: - * Re-run this script with '--build-all --force-all' options. - * Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above. - -Please note that until the transition to C++11-built libraries if completed in your distribution, situation will -remain fuzzy and incompatibilities may happen..." - PRINT "" - PRINT "" - CXXFLAGS="$CXXFLAGS -std=c++11" - export CXXFLAGS -fi +CXXFLAGS="$CXXFLAGS -std=c++11" +export CXXFLAGS #### Show Dependencies #### @@ -1690,9 +1677,7 @@ compile_OIIO() { # fi cmake_d="$cmake_d -D USE_OCIO=OFF" - if [ "$USE_CXX11" = true ]; then - cmake_d="$cmake_d -D OIIO_BUILD_CPP11=ON" - fi + cmake_d="$cmake_d -D OIIO_BUILD_CPP11=ON" if file /bin/cp | grep -q '32-bit'; then cflags="-fPIC -m32 -march=i686" @@ -1905,9 +1890,7 @@ compile_OSL() { cmake_d="$cmake_d -D OSL_BUILD_PLUGINS=OFF" cmake_d="$cmake_d -D OSL_BUILD_TESTS=OFF" cmake_d="$cmake_d -D USE_SIMD=sse2" - if [ "$USE_CXX11" = true ]; then - cmake_d="$cmake_d -D OSL_BUILD_CPP11=1" - fi + cmake_d="$cmake_d -D OSL_BUILD_CPP11=1" #~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION" @@ -2293,12 +2276,6 @@ compile_ALEMBIC() { cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst" - # Without Boost or TR1, Alembic requires C++11. - if [ "$USE_CXX11" != true ]; then - cmake_d="$cmake_d -D ALEMBIC_LIB_USES_BOOST=ON" - cmake_d="$cmake_d -D ALEMBIC_LIB_USES_TR1=OFF" - fi - if [ -d $INST/boost ]; then if [ -d $INST/boost ]; then cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost" @@ -4235,12 +4212,6 @@ print_info() { _buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*" _buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*" - if [ "$USE_CXX11" = true ]; then - _1="-D WITH_CXX11=ON" - PRINT " $_1" - _buildargs="$_buildargs $_1" - fi - _1="-D WITH_CODEC_SNDFILE=ON" PRINT " $_1" _buildargs="$_buildargs $_1" |