conditional compilation

This commit is contained in:
Sébastien Loriot 2024-01-04 14:44:27 +01:00
parent 7139a34f44
commit b59250bfeb
2 changed files with 8 additions and 9 deletions

View File

@ -6,11 +6,10 @@ project(Envelope_3_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)
# 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("triangles_test.cpp")
if (CGAL_Core_FOUND)
create_single_source_cgal_program("spheres_test.cpp")
else()
message("NOTICE: A test requires CGAL_Core, and will not be compiled.")
endif()

View File

@ -5,7 +5,7 @@
int main ()
{
bool UNTESTED_TRAITS_AS_CORE_IS_NOT_ISTALLED;
bool UNTESTED_TRAITS_AS_CORE_IS_NOT_INSTALLED;
std::cout << std::endl
<< "WARNING: Core is not installed, "
<< "skipping the test ..."