iso2mesh uses ancient CMake declarations like cmake_minimum_required(VERSION 2.6.2) whereas CGAL requires at least CMake-3.4, and recently 3.14. In particular, that triggers a hard error because of `CMP0064` (introduced by CMake-3.4). See also the upstream PR https://github.com/CGAL/cgal/pull/5859 for another workaround.
This commit is contained in:
parent
37f56fcc4c
commit
1ab5c7d79b
|
@ -0,0 +1,113 @@
|
|||
diff -up iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt~ iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt
|
||||
--- iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt~ 2020-09-05 21:56:08.000000000 +0200
|
||||
+++ iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt 2021-07-20 11:17:50.726256258 +0200
|
||||
@@ -4,12 +4,7 @@
|
||||
|
||||
project( Mesh_3_example )
|
||||
|
||||
-cmake_minimum_required(VERSION 2.6.2)
|
||||
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
|
||||
- cmake_policy(VERSION 2.8.4)
|
||||
-else()
|
||||
- cmake_policy(VERSION 2.6)
|
||||
-endif()
|
||||
+cmake_minimum_required(VERSION 3.1...3.21)
|
||||
|
||||
include_directories(../../include)
|
||||
include_directories(../../../Triangulation_3/include)
|
||||
@@ -32,7 +27,7 @@ if ( CGAL_FOUND )
|
||||
option(ACTIVATE_CONCURRENT_MESH_3
|
||||
"Activate parallelism in Mesh_3"
|
||||
OFF)
|
||||
-
|
||||
+
|
||||
# And add -DCGAL_CONCURRENT_MESH_3 if that option is ON
|
||||
if( ACTIVATE_CONCURRENT_MESH_3 OR ENV{ACTIVATE_CONCURRENT_MESH_3} )
|
||||
add_definitions( -DCGAL_CONCURRENT_MESH_3 )
|
||||
@@ -45,7 +40,7 @@ if ( CGAL_FOUND )
|
||||
find_package( TBB )
|
||||
endif( LINK_WITH_TBB )
|
||||
endif()
|
||||
-
|
||||
+
|
||||
if( TBB_FOUND )
|
||||
include(${TBB_USE_FILE})
|
||||
list(APPEND CGAL_3RD_PARTY_LIBRARIES ${TBB_LIBRARIES})
|
||||
@@ -74,4 +69,3 @@ if ( CGAL_FOUND )
|
||||
else()
|
||||
message(STATUS "This program requires the CGAL library, and will not be compiled.")
|
||||
endif()
|
||||
-
|
||||
diff -up iso2mesh-1.9.6/tools/cgalsimp2/CMakeLists.txt~ iso2mesh-1.9.6/tools/cgalsimp2/CMakeLists.txt
|
||||
--- iso2mesh-1.9.6/tools/cgalsimp2/CMakeLists.txt~ 2020-09-05 21:56:08.000000000 +0200
|
||||
+++ iso2mesh-1.9.6/tools/cgalsimp2/CMakeLists.txt 2021-07-20 11:18:34.737708589 +0200
|
||||
@@ -4,22 +4,9 @@
|
||||
project( Surface_mesh_simplification )
|
||||
|
||||
|
||||
-cmake_minimum_required(VERSION 2.6.2)
|
||||
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
|
||||
- if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
|
||||
- cmake_policy(VERSION 2.8.4)
|
||||
- else()
|
||||
- cmake_policy(VERSION 2.6)
|
||||
- endif()
|
||||
-endif()
|
||||
+cmake_minimum_required(VERSION 3.1...3.21)
|
||||
|
||||
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
|
||||
-
|
||||
-if ( COMMAND cmake_policy )
|
||||
-
|
||||
- cmake_policy( SET CMP0003 NEW )
|
||||
-
|
||||
-endif()
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET COMPONENTS )
|
||||
@@ -27,7 +14,7 @@ find_package( CGAL QUIET COMPONENTS )
|
||||
if ( NOT CGAL_FOUND )
|
||||
|
||||
message(STATUS "This project requires the CGAL library, and will not be compiled.")
|
||||
- return()
|
||||
+ return()
|
||||
|
||||
endif()
|
||||
|
||||
@@ -42,7 +29,7 @@ if ( NOT Boost_FOUND )
|
||||
|
||||
message(STATUS "This project requires the Boost library, and will not be compiled.")
|
||||
|
||||
- return()
|
||||
+ return()
|
||||
|
||||
endif()
|
||||
|
||||
diff -up iso2mesh-1.9.6/tools/cgalsurf/CMakeLists.txt~ iso2mesh-1.9.6/tools/cgalsurf/CMakeLists.txt
|
||||
--- iso2mesh-1.9.6/tools/cgalsurf/CMakeLists.txt~ 2020-09-05 21:56:08.000000000 +0200
|
||||
+++ iso2mesh-1.9.6/tools/cgalsurf/CMakeLists.txt 2021-07-20 11:18:16.986526147 +0200
|
||||
@@ -3,12 +3,7 @@
|
||||
|
||||
project( Surface_mesher_example )
|
||||
|
||||
-cmake_minimum_required(VERSION 2.6.2)
|
||||
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
|
||||
- cmake_policy(VERSION 2.8.4)
|
||||
-else()
|
||||
- cmake_policy(VERSION 2.6)
|
||||
-endif()
|
||||
+cmake_minimum_required(VERSION 3.1...3.21)
|
||||
|
||||
include_directories(../../include)
|
||||
|
||||
@@ -26,8 +21,7 @@ else()
|
||||
if(RUNNING_CGAL_AUTO_TEST)
|
||||
# Just to avoid a warning from CMake if that variable is set on the command line...
|
||||
endif()
|
||||
-
|
||||
+
|
||||
message(STATUS "NOTICE: This program requires the CGAL and CGAL ImageIO libraries, and will not be compiled.")
|
||||
-
|
||||
-endif()
|
||||
|
||||
+endif()
|
|
@ -0,0 +1,12 @@
|
|||
diff -up iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt~ iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt
|
||||
--- iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt~ 2021-07-20 11:24:07.950132510 +0200
|
||||
+++ iso2mesh-1.9.6/tools/cgalmesh/CMakeLists.txt 2021-07-20 11:25:30.913983853 +0200
|
||||
@@ -47,7 +47,7 @@ if ( CGAL_FOUND )
|
||||
endif()
|
||||
|
||||
|
||||
- if ( Boost_FOUND AND Boost_VERSION GREATER 103400 )
|
||||
+ if ( Boost_FOUND )
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
# Compilable examples
|
|
@ -18,6 +18,14 @@ Source1: https://github.com/fangq/cork/archive/v0.9.1/cork-0.9.1.tar.gz
|
|||
Source2: https://github.com/fangq/meshfix/archive/v1.2.2/meshfix-1.2.2.tar.gz
|
||||
Source3: http://ftp.mcs.anl.gov/pub/petsc/externalpackages/tetgen1.5.1.tar.gz
|
||||
|
||||
# Policy CMP0064 is not set: Support new TEST if() operator.
|
||||
# See also https://github.com/CGAL/cgal/issues/5857
|
||||
Patch0: iso2mesh-1.9.6-CMakeCMP0064.patch
|
||||
|
||||
# Fix the incorrect detection of Boost version
|
||||
# > -- NOTICE: This program requires Boost >= 1.34.1, and will not be compiled.
|
||||
Patch1: iso2mesh-1.9.6-recent_Boost_version.patch
|
||||
|
||||
ExcludeArch: armv7hl
|
||||
BuildRequires: make
|
||||
BuildRequires: cmake CGAL-devel SuperLU-devel blas-static gcc-c++ zlib-devel octave-devel
|
||||
|
@ -58,6 +66,8 @@ This package contains the demo script and sample datasets for octave-%{octpkg}.
|
|||
%setup -q -b 1 -n %{octpkg}-%{version}
|
||||
%setup -q -T -D -b 2 -n meshfix-1.2.2
|
||||
%setup -q -T -D -b 3 -n %{octpkg}-%{version}
|
||||
%patch -P 0 -z .bak -p1
|
||||
%patch -P 1 -z .bak -p1
|
||||
rm -rf tools/cork
|
||||
rm -rf tools/meshfix
|
||||
rm -rf tools/tetgen
|
||||
|
|
Loading…
Reference in New Issue