mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-25 15:16:02 +00:00
GH-1052 switch over to C++14 everywhere
This commit is contained in:
parent
db69a3dacd
commit
678da0b639
@ -32,7 +32,7 @@ endif()
|
||||
set(CMAKE_JAVA_TARGET_OUTPUT_DIR ${PROJECT_BINARY_DIR}/jars)
|
||||
|
||||
######## Set compiler flags ########
|
||||
include(UseCXX11)
|
||||
include(UseCXX14)
|
||||
include(Coverage)
|
||||
set(CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
|
||||
|
13
cmake/UseCXX14.cmake
Normal file
13
cmake/UseCXX14.cmake
Normal file
@ -0,0 +1,13 @@
|
||||
if(__USECXX14_CMAKE__)
|
||||
return()
|
||||
endif()
|
||||
set(__USECXX14_CMAKE__ TRUE)
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++14")
|
||||
elseif(UNIX)
|
||||
# assume GCC, add C++0x/C++11 stuff
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
elseif(MINGW)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
|
||||
endif()
|
@ -1,6 +1,6 @@
|
||||
project(libUtil)
|
||||
|
||||
include(UseCXX11)
|
||||
include(UseCXX14)
|
||||
include(Coverage)
|
||||
|
||||
# Find Qt
|
||||
|
Loading…
Reference in New Issue
Block a user