fix dependencies

This commit is contained in:
Sébastien Loriot 2024-01-03 18:11:50 +01:00
parent c5d8089232
commit 29fcec6b3a
2 changed files with 16 additions and 23 deletions

View File

@ -5,21 +5,10 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
find_package(LEDA QUIET)
if(CGAL_Core_FOUND OR LEDA_FOUND)
if(MSVC)
# Turn off a boost related warning that appears with VC2015
# boost_1_65_1\boost\graph\named_function_params.hpp(240) :
# warning C4172: returning address of local variable or temporary
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4172")
endif()
# create a target per cppfile
file(
GLOB cppfiles
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
foreach(cppfile ${cppfiles})
create_single_source_cgal_program("${cppfile}")
endforeach()
create_single_source_cgal_program("compute_cones.cpp")
create_single_source_cgal_program("theta_io.cpp")
else()
message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.")
endif()
create_single_source_cgal_program("dijkstra_theta.cpp")

View File

@ -5,12 +5,16 @@ cmake_minimum_required(VERSION 3.1...3.23)
project(Cone_spanners_2_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)
find_package(LEDA QUIET)
# create a target per cppfile
file(
GLOB cppfiles
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
foreach(cppfile ${cppfiles})
create_single_source_cgal_program("${cppfile}")
endforeach()
create_single_source_cgal_program("cones_inexact.cpp")
create_single_source_cgal_program("theta_inexact.cpp")
create_single_source_cgal_program("yao_inexact.cpp")
if(CGAL_Core_FOUND OR LEDA_FOUND)
create_single_source_cgal_program("cones_exact.cpp")
create_single_source_cgal_program("theta_exact.cpp")
create_single_source_cgal_program("yao_exact.cpp")
else()
message("NOTICE: Some tests require the CGAL_Core library (or LEDA), and will not be compiled.")
endif()