Commit 7c6ed8b2 authored by Jeremy Cohen's avatar Jeremy Cohen

Updating CMake changes to move min version to 3.5.1

parent 9e4f8b36
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.3)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build,
options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
RelWithDebInfo MinSizeRel.")
......@@ -14,26 +14,10 @@ IF (POLICY CMP0074)
CMAKE_POLICY(SET CMP0074 OLD)
ENDIF()
# Nektar++ requires C++11. Try to infer this for older CMake versions (less than
# 3.1.0)
IF ("${CMAKE_VERSION}" VERSION_LESS "3.1")
IF (NOT MSVC)
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSE()
MESSAGE(FATAL_ERROR "Nektar++ requires a compiler with C++11 support.")
ENDIF()
ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
MESSAGE(FATAL_ERROR "Nektar++ requires full C++11 support: please upgrade to Visual Studio 2013 or later")
ENDIF()
ELSE()
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
ENDIF()
# Nektar++ requires C++11.
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
INCLUDE(CheckLanguage)
......
......@@ -33,10 +33,6 @@ IF (NEKTAR_USE_HDF5)
"NEKTAR_USE_HDF5" OFF)
IF(THIRDPARTY_BUILD_HDF5)
IF (CMAKE_VERSION VERSION_LESS 3.1.0)
MESSAGE(FATAL_ERROR "HDF5 compilation requires CMake 3.1.0 or later.")
ENDIF()
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
hdf5-1.8.16
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
PROJECT(libccmio)
# compile in Release mode by default
......
......@@ -4,8 +4,7 @@
# projects are marked below.
######################################################
# Require at least CMake 3.1 for CMAKE_CXX_STANDARD.
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
# TODO - Put the name of your project here.
PROJECT(ExampleSolver)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment