apply CMAKE_CXX_STANDARD

This commit is contained in:
Jack Andersen 2017-06-17 16:50:29 -10:00
parent f10c7c0ee3
commit b1f73f0c33
1 changed files with 3 additions and 5 deletions

View File

@ -1,6 +1,8 @@
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) # because of CMAKE_CXX_STANDARD
project(athena) project(athena)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif() endif()
################## ##################
@ -21,10 +23,6 @@ add_subdirectory(extern)
include_directories(include ${LZO_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) include_directories(include ${LZO_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif()
if(WIN32) if(WIN32)
list(APPEND CORE_EXTRA src/win32_largefilewrapper.c include/win32_largefilewrapper.h list(APPEND CORE_EXTRA src/win32_largefilewrapper.c include/win32_largefilewrapper.h
src/athena/FileWriterWin32.cpp src/athena/FileReaderWin32.cpp) src/athena/FileWriterWin32.cpp src/athena/FileReaderWin32.cpp)