Commit 19a4e158 authored by Mark Olesen's avatar Mark Olesen

CONFIG: increase cmake requirement for build

- building paraview-5.7 and later requires cmake >= 3.10 itself
  but cmake-3.8 appears to work adequately for building dependent
  components

- use VERSION_GREATER_EQUAL instead of GREATER_EQUAL
parent 26f5a091
......@@ -12,7 +12,7 @@ if (${ParaView_VERSION} LESS 5.6)
message(WARNING "==== CAUTION: Catalyst without chdir capability ====")
endif()
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
if (TARGET "VTK::ParallelMPI")
set(FOAM_USING_VTK_MPI TRUE)
endif()
......
#------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.8)
cmake_policy(SET CMP0002 NEW) # For cmake >= 3
cmake_policy(SET CMP0057 NEW) # For cmake >= 3.10.2
......@@ -19,7 +19,7 @@ else()
endif()
# Define pv_api as MAJ.MIN
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
string(REGEX MATCH [0-9]+[.][0-9]+ pv_api ${ParaView_VERSION})
set(pv_version "${ParaView_VERSION}")
else()
......@@ -27,7 +27,7 @@ else()
set(pv_version "${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}.${PARAVIEW_VERSION_PATCH}")
endif()
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
find_package(ParaView REQUIRED
COMPONENTS PythonCatalyst
OPTIONAL_COMPONENTS VTK::ParallelMPI)
......
#-----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
#------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.8)
cmake_policy(SET CMP0002 NEW) # For cmake >= 3
cmake_policy(SET CMP0057 NEW) # For cmake >= 3.10.2
......@@ -19,7 +19,7 @@ find_package(ParaView REQUIRED)
if (DEFINED ENV{PARAVIEW_API})
set(pv_api "$ENV{PARAVIEW_API}")
else()
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
string(REGEX MATCH [0-9]+[.][0-9]+ pv_api ${ParaView_VERSION})
message("The PARAVIEW_API env was unset, "
"extracted value from version="
......@@ -50,7 +50,7 @@ message("OpenFOAM api = ${foam_api}, libs = ${foamPvLibQualifier}")
include(CMakeLists-OpenFOAM.txt)
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt)
else()
......
#-----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
#------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.8)
cmake_policy(SET CMP0002 NEW) # For cmake >= 3
cmake_policy(SET CMP0057 NEW) # For cmake >= 3.10.2
......@@ -19,7 +19,7 @@ find_package(ParaView REQUIRED)
if (DEFINED ENV{PARAVIEW_API})
set(pv_api "$ENV{PARAVIEW_API}")
else()
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
string(REGEX MATCH [0-9]+[.][0-9]+ pv_api ${ParaView_VERSION})
message("The PARAVIEW_API env was unset, "
"extracted value from version="
......@@ -48,7 +48,7 @@ message("OpenFOAM api = ${foam_api}, libs = ${foamPvLibQualifier}")
include(CMakeLists-OpenFOAM.txt)
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt)
else()
......
......@@ -13,7 +13,7 @@ unset(FOAM_USING_VTK_MPI)
# Test some characteristics
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
if (TARGET "VTK::ParallelMPI")
set(FOAM_USING_VTK_MPI TRUE)
endif()
......
#------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.8)
cmake_policy(SET CMP0002 NEW) # For cmake >= 3
cmake_policy(SET CMP0057 NEW) # For cmake >= 3.10.2
......@@ -24,7 +24,7 @@ elseif (EXISTS "$ENV{ParaView_DIR}")
message("Building with Paraview from $ENV{ParaView_DIR}")
find_package(ParaView REQUIRED)
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
find_package(ParaView REQUIRED
OPTIONAL_COMPONENTS VTK::ParallelMPI)
endif()
......
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