2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #1936 from jroweboy/qt5.7-fix

CMake: Fix for QT 5.7 overwriting -std=c++1y flag
This commit is contained in:
bunnei 2016-08-08 10:52:05 -04:00 committed by GitHub
commit 3c3a6cb2af
2 changed files with 8 additions and 6 deletions

View file

@ -9,7 +9,7 @@ if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
export CXX=g++-6 export CXX=g++-6
mkdir -p $HOME/.local mkdir -p $HOME/.local
curl -L http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-i386.tar.gz \ curl -L http://www.cmake.org/files/v3.2/cmake-3.2.0-Linux-i386.tar.gz \
| tar -xz -C $HOME/.local --strip-components=1 | tar -xz -C $HOME/.local --strip-components=1
( (
@ -21,6 +21,6 @@ if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update > /dev/null # silence the very verbose output brew update > /dev/null # silence the very verbose output
brew unlink cmake brew unlink cmake
brew install cmake31 qt5 sdl2 dylibbundler brew install cmake qt5 sdl2 dylibbundler
gem install xcpretty gem install xcpretty
fi fi

View file

@ -1,6 +1,5 @@
# CMake 3.1 required for Qt5 settings to be applied automatically on # CMake 3.2 required for cmake to know the right flags for CXX standard on OSX
# dependent libraries and IMPORTED targets. cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.1)
function(download_bundled_external remote_path lib_name prefix_var) function(download_bundled_external remote_path lib_name prefix_var)
set(prefix "${CMAKE_BINARY_DIR}/externals/${lib_name}") set(prefix "${CMAKE_BINARY_DIR}/externals/${lib_name}")
@ -63,8 +62,11 @@ if (NOT DEFINED ARCHITECTURE)
endif() endif()
message(STATUS "Target architecture: ${ARCHITECTURE}") message(STATUS "Target architecture: ${ARCHITECTURE}")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT MSVC) if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -Wno-attributes") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
else() else()
# Silence "deprecation" warnings # Silence "deprecation" warnings