From f7aed637f82111736996337babae2719459d3563 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Wed, 23 Sep 2020 14:26:12 +0200 Subject: [PATCH] Require CMake 3.6 --- ApplicationCode/CMakeLists.txt | 2 +- ApplicationCode/Commands/CMakeLists.txt | 2 +- .../GeoMech/GeoMechDataModel/CMakeLists.txt | 2 +- ApplicationCode/GeoMech/OdbReader/CMakeLists.txt | 2 +- ApplicationCode/GrpcInterface/CMakeLists.cmake | 2 +- .../ResultStatisticsCache/CMakeLists.txt | 2 +- CMakeLists.txt | 13 +++++-------- Fwk/AppFwk/CommonCode/CMakeLists.txt | 2 +- Fwk/AppFwk/cafAnimControl/CMakeLists.txt | 2 +- Fwk/AppFwk/cafCommand/CMakeLists.txt | 2 +- Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt | 2 +- Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt | 2 +- Fwk/AppFwk/cafPdmCvf/CMakeLists.txt | 2 +- Fwk/AppFwk/cafPdmScripting/CMakeLists.txt | 2 +- Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt | 2 +- .../cafProjectDataModel/cafPdmCore/CMakeLists.txt | 2 +- .../cafProjectDataModel/cafPdmUiCore/CMakeLists.txt | 2 +- .../cafProjectDataModel/cafPdmXml/CMakeLists.txt | 2 +- Fwk/AppFwk/cafTensor/CMakeLists.txt | 2 +- Fwk/AppFwk/cafUserInterface/CMakeLists.txt | 2 +- Fwk/AppFwk/cafViewer/CMakeLists.txt | 2 +- Fwk/AppFwk/cafVizExtensions/CMakeLists.txt | 2 +- Fwk/VizFwk/LibGeometry/CMakeLists.txt | 2 +- Fwk/VizFwk/LibGuiQt/CMakeLists.txt | 2 +- Fwk/VizFwk/LibRender/CMakeLists.txt | 2 +- Fwk/VizFwk/LibViewing/CMakeLists.txt | 2 +- 26 files changed, 30 insertions(+), 33 deletions(-) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index a023385881..b882820d1d 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (ApplicationCode) diff --git a/ApplicationCode/Commands/CMakeLists.txt b/ApplicationCode/Commands/CMakeLists.txt index b9ed0bc8bb..e789cac926 100644 --- a/ApplicationCode/Commands/CMakeLists.txt +++ b/ApplicationCode/Commands/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (Commands) diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt index 088f9648aa..1e9e5057c1 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt +++ b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (RigGeoMechDataModel) diff --git a/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt b/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt index 8067d41959..0738f4dfa2 100644 --- a/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt +++ b/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (RifOdbReader) diff --git a/ApplicationCode/GrpcInterface/CMakeLists.cmake b/ApplicationCode/GrpcInterface/CMakeLists.cmake index 47bd7e7ac1..1f2ea4e7f2 100644 --- a/ApplicationCode/GrpcInterface/CMakeLists.cmake +++ b/ApplicationCode/GrpcInterface/CMakeLists.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) set ( SOURCE_GROUP_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/RiaGrpcServer.h diff --git a/ApplicationCode/ResultStatisticsCache/CMakeLists.txt b/ApplicationCode/ResultStatisticsCache/CMakeLists.txt index d3385421c2..22a5f33c95 100644 --- a/ApplicationCode/ResultStatisticsCache/CMakeLists.txt +++ b/ApplicationCode/ResultStatisticsCache/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (ResultStatisticsCache) diff --git a/CMakeLists.txt b/CMakeLists.txt index d047184bb5..d343f14e7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) include (CheckCSourceCompiles) project (ResInsight) @@ -13,11 +13,8 @@ SET(BUILD_SHARED_LIBS OFF CACHE BOOL "ERT: Build shared libraries") list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") # Use CMake to enforce C++11 when using CMake 3 or newer. -# The check can be removed when the minimum version is 3. -if( (${CMAKE_MAJOR_VERSION} GREATER 3) OR (${CMAKE_MAJOR_VERSION} EQUAL 3)) - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) -endif() +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) ################################################################################ # Setup the main platform defines @@ -27,11 +24,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") add_definitions(-DCVF_OSX) elseif(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /std:c++14") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") endif() if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -Wno-unused-parameter -std=c++11") + set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -Wno-unused-parameter") set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -g3 -O0 -DDEBUG -D_DEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG") endif() diff --git a/Fwk/AppFwk/CommonCode/CMakeLists.txt b/Fwk/AppFwk/CommonCode/CMakeLists.txt index 1ea643d9a5..abfdb41127 100644 --- a/Fwk/AppFwk/CommonCode/CMakeLists.txt +++ b/Fwk/AppFwk/CommonCode/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (CommonCode) diff --git a/Fwk/AppFwk/cafAnimControl/CMakeLists.txt b/Fwk/AppFwk/cafAnimControl/CMakeLists.txt index 9e938a822d..b3f58d8d8b 100644 --- a/Fwk/AppFwk/cafAnimControl/CMakeLists.txt +++ b/Fwk/AppFwk/cafAnimControl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafAnimControl) diff --git a/Fwk/AppFwk/cafCommand/CMakeLists.txt b/Fwk/AppFwk/cafCommand/CMakeLists.txt index c10eef5441..6e42544d61 100644 --- a/Fwk/AppFwk/cafCommand/CMakeLists.txt +++ b/Fwk/AppFwk/cafCommand/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafCommand) diff --git a/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt b/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt index 28a627eb23..6ba7eef923 100644 --- a/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt +++ b/Fwk/AppFwk/cafCommandFeatures/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafCommandFeatures) diff --git a/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt b/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt index 50c854478b..d7415fa8dd 100644 --- a/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt +++ b/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafHexInterpolator) diff --git a/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt b/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt index 4804f1a0bc..2c70742c38 100644 --- a/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt +++ b/Fwk/AppFwk/cafPdmCvf/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafPdmCvf) diff --git a/Fwk/AppFwk/cafPdmScripting/CMakeLists.txt b/Fwk/AppFwk/cafPdmScripting/CMakeLists.txt index 880c195877..ede5814388 100644 --- a/Fwk/AppFwk/cafPdmScripting/CMakeLists.txt +++ b/Fwk/AppFwk/cafPdmScripting/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafPdmScripting) diff --git a/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt index 5a0ab3fdce..97b3b9816d 100644 --- a/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafProjectDataModel) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt index bcbda5f15d..839976859e 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafPdmCore) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt index 6013497913..f5f5465268 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafPdmUiCore) diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt index 6ca0170127..ef35b89291 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafPdmXml) diff --git a/Fwk/AppFwk/cafTensor/CMakeLists.txt b/Fwk/AppFwk/cafTensor/CMakeLists.txt index d15a356c04..e55912fc91 100644 --- a/Fwk/AppFwk/cafTensor/CMakeLists.txt +++ b/Fwk/AppFwk/cafTensor/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafTensor) diff --git a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt index 57717fb092..f7a885d72a 100644 --- a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt +++ b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafUserInterface) diff --git a/Fwk/AppFwk/cafViewer/CMakeLists.txt b/Fwk/AppFwk/cafViewer/CMakeLists.txt index 014354b431..159dd37f4c 100644 --- a/Fwk/AppFwk/cafViewer/CMakeLists.txt +++ b/Fwk/AppFwk/cafViewer/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafViewer) diff --git a/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt b/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt index 2dbc5e6f2b..b1b8e0ddb6 100644 --- a/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt +++ b/Fwk/AppFwk/cafVizExtensions/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.6) project (cafVizExtensions) diff --git a/Fwk/VizFwk/LibGeometry/CMakeLists.txt b/Fwk/VizFwk/LibGeometry/CMakeLists.txt index 9c9ac5600d..d6ac4d56ac 100644 --- a/Fwk/VizFwk/LibGeometry/CMakeLists.txt +++ b/Fwk/VizFwk/LibGeometry/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.6) project(LibGeometry) diff --git a/Fwk/VizFwk/LibGuiQt/CMakeLists.txt b/Fwk/VizFwk/LibGuiQt/CMakeLists.txt index 82925f3448..85bed3be29 100644 --- a/Fwk/VizFwk/LibGuiQt/CMakeLists.txt +++ b/Fwk/VizFwk/LibGuiQt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.6) project(LibGuiQt) diff --git a/Fwk/VizFwk/LibRender/CMakeLists.txt b/Fwk/VizFwk/LibRender/CMakeLists.txt index 3bad1f675f..3970cc0d66 100644 --- a/Fwk/VizFwk/LibRender/CMakeLists.txt +++ b/Fwk/VizFwk/LibRender/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.6) project(LibRender) diff --git a/Fwk/VizFwk/LibViewing/CMakeLists.txt b/Fwk/VizFwk/LibViewing/CMakeLists.txt index 1b28829451..060d42fb26 100644 --- a/Fwk/VizFwk/LibViewing/CMakeLists.txt +++ b/Fwk/VizFwk/LibViewing/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.6) project(LibViewing)