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