From: Neal Gompa Date: Mon, 19 Dec 2016 18:30:13 +0000 (-0500) Subject: CMake: Switch to --std=gnu++11 to fix builds with POWER X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=commitdiff_plain;h=b32cd80b243d77cd80e026c7ae73e33ec39b1de9 CMake: Switch to --std=gnu++11 to fix builds with POWER On POWER architectures (ppc64/ppc64le), the AltiVec SIMD instructions overload bool with vector ints, causing builds to fail because vector data cannot be cast to scalar data. However, this only happens on c++11 mode. In gnu+11 mode, the usage of AltiVec overload attributes is contextual, so it doesn't cause builds to fail anymore. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b9fb85..ef94e17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT CMAKE_BUILD_TYPE) endif(NOT CMAKE_BUILD_TYPE) message("CMake build type: ${CMAKE_BUILD_TYPE}") -set(CMAKE_CXX_FLAGS "-Wall -Wno-parentheses -pedantic --std=c++11 ${CMAKE_CXX_FLAGS}") +set(CMAKE_CXX_FLAGS "-Wall -Wno-parentheses -pedantic --std=gnu++11 ${CMAKE_CXX_FLAGS}") if(APPLE) set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX")