set cmake_minimum_required to proper values (broke testing before)

This commit is contained in:
Sven Oesau 2024-01-11 10:52:24 +01:00
parent ddcbd5c53f
commit c4678fae18
2 changed files with 24 additions and 54 deletions

View File

@ -1,39 +1,24 @@
# Created by the script cgal_create_CMakeLists. # Created by the script cgal_create_CMakeLists.
# This is the CMake script for compiling a set of CGAL applications. # This is the CMake script for compiling a set of CGAL applications.
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.1)
project(Kinetic_space_partition_Examples) project(Kinetic_space_partition_Examples)
set(CMAKE_CXX_STANDARD 14) find_package(CGAL REQUIRED)
find_package(CGAL REQUIRED COMPONENTS Core)
include(CGAL_CreateSingleSourceCGALProgram) include(CGAL_CreateSingleSourceCGALProgram)
find_package(Boost REQUIRED) find_package(Eigen3 3.1.0 REQUIRED)
if(Boost_FOUND) if(Eigen3_FOUND)
message(STATUS "Found Boost") message(STATUS "Found Eigen")
include(CGAL_Eigen_support)
find_package(Eigen3 3.1.0 REQUIRED) set(targets kinetic_partition)
if(Eigen3_FOUND)
message(STATUS "Found Eigen")
include(CGAL_Eigen_support)
set(targets kinetic_partition) foreach(target ${targets})
create_single_source_cgal_program("${target}.cpp")
set(project_linked_libraries) target_link_libraries(${target} PUBLIC CGAL::Eigen_support)
set(project_compilation_definitions) endforeach()
foreach(target ${targets})
create_single_source_cgal_program("${target}.cpp")
if(TARGET ${target})
target_link_libraries(${target} PUBLIC ${project_linked_libraries} CGAL::Eigen_support)
target_compile_definitions(${target} PUBLIC ${project_compilation_definitions})
endif()
endforeach()
else()
message(ERROR "This program requires the Eigen library, and will not be compiled.")
endif()
else() else()
message(ERROR "This program requires the Boost library, and will not be compiled.") message(ERROR "This program requires the Eigen library, and will not be compiled.")
endif() endif()

View File

@ -1,39 +1,24 @@
# Created by the script cgal_create_CMakeLists. # Created by the script cgal_create_CMakeLists.
# This is the CMake script for compiling a set of CGAL applications. # This is the CMake script for compiling a set of CGAL applications.
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.1)
project(Kinetic_space_partition_Tests) project(Kinetic_space_partition_Tests)
set(CMAKE_CXX_STANDARD 14) find_package(CGAL REQUIRED)
find_package(CGAL QUIET COMPONENTS Core)
include(CGAL_CreateSingleSourceCGALProgram) include(CGAL_CreateSingleSourceCGALProgram)
find_package(Boost REQUIRED) find_package(Eigen3 3.1.0 REQUIRED)
if(Boost_FOUND) if(Eigen3_FOUND)
message(STATUS "Found Boost") message(STATUS "Found Eigen")
include(CGAL_Eigen_support)
find_package(Eigen3 3.1.0 REQUIRED) set(targets kinetic_2d_stress_test kinetic_3d_test_all)
if(Eigen3_FOUND)
message(STATUS "Found Eigen")
include(CGAL_Eigen_support)
set(targets kinetic_2d_stress_test kinetic_3d_test_all) foreach(target ${targets})
create_single_source_cgal_program("${target}.cpp")
set(project_linked_libraries) target_link_libraries(${target} PUBLIC CGAL::Eigen_support)
set(project_compilation_definitions) endforeach()
foreach(target ${targets})
create_single_source_cgal_program("${target}.cpp")
if(TARGET ${target})
target_link_libraries(${target} PUBLIC ${project_linked_libraries} CGAL::Eigen_support)
target_compile_definitions(${target} PUBLIC ${project_compilation_definitions})
endif()
endforeach()
else()
message(ERROR "This program requires the Eigen library, and will not be compiled.")
endif()
else() else()
message(ERROR "This program requires the Boost library, and will not be compiled.") message(ERROR "This program requires the Eigen library, and will not be compiled.")
endif() endif()