From b32cd80b243d77cd80e026c7ae73e33ec39b1de9 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 19 Dec 2016 13:30:13 -0500 Subject: [PATCH] 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. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- 2.39.5