From 6df18b668c4ac990eacc07943954e2970e986ce4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 6 Feb 2023 12:04:57 +0100 Subject: [PATCH 1/2] CGAL CTest support: rename the test names Now that CTest test names can contain whitespace, we can have better looking names. That is also more practicle because we can now copy-paste the target name in `compilation of `. --- .../test/Circular_kernel_2/CMakeLists.txt | 4 +- .../cmake/modules/CGAL_add_test.cmake | 80 +++++++++---------- ...GAL_enable_end_of_configuration_hook.cmake | 4 +- Installation/test/Installation/CMakeLists.txt | 2 +- Mesh_3/test/Mesh_3/CMakeLists.txt | 28 +++---- Nef_3/test/Nef_3/CMakeLists.txt | 20 ++--- .../Polygon_mesh_processing/CMakeLists.txt | 4 +- .../Plugins/Classification/CMakeLists.txt | 2 +- .../Plugins/Convex_hull/CMakeLists.txt | 2 +- .../Polyhedron/Plugins/PCA/CMakeLists.txt | 2 +- .../Polyhedron/Plugins/PMP/CMakeLists.txt | 22 ++--- .../Plugins/Surface_mesh/CMakeLists.txt | 4 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Polyhedron/polyhedron_demo_macros.cmake | 18 ++--- .../test/Triangulation_2/CMakeLists.txt | 22 ++--- .../examples/Triangulation_3/CMakeLists.txt | 6 +- .../test/Triangulation_3/CMakeLists.txt | 16 ++-- 17 files changed, 119 insertions(+), 119 deletions(-) diff --git a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt index c271340b266..c59104595f1 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt +++ b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt @@ -24,7 +24,7 @@ create_single_source_cgal_program("test_Exact_circular_kernel_basic.cpp") if(BUILD_TESTING) set_tests_properties( - execution___of__test_Circular_kernel_basic - execution___of__test_Exact_circular_kernel_basic + "execution of test_Circular_kernel_basic" + "execution of test_Exact_circular_kernel_basic" PROPERTIES RESOURCE_LOCK Circular_kernel_basic) endif() diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index a5c8b2bc83a..984922a772f 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -76,31 +76,31 @@ endfunction() function(cgal_add_compilation_test exe_name) cmake_policy(SET CMP0064 NEW) if(NOT CMAKE_VS_MSBUILD_COMMAND) - if(TEST compilation_of__${exe_name}) + if(TEST "compilation of ${exe_name}") return() endif() - add_test(NAME "compilation_of__${exe_name}" + add_test(NAME "compilation of ${exe_name}" COMMAND ${TIME_COMMAND} "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "${exe_name}" --config "$") - set_property(TEST "compilation_of__${exe_name}" + set_property(TEST "compilation of ${exe_name}" APPEND PROPERTY LABELS "${PROJECT_NAME}") - set_property(TEST "compilation_of__${exe_name}" + set_property(TEST "compilation of ${exe_name}" APPEND PROPERTY FIXTURES_REQUIRED "check_build_system_SetupFixture") - elseif(NOT TARGET compilation_of__${PROJECT_NAME})#CMAKE_VS_MSBUILD_COMMAND + elseif(NOT TARGET "compilation of ${PROJECT_NAME}")#CMAKE_VS_MSBUILD_COMMAND #this target is just a flag, to deal with the scope problem with the tests - add_custom_target(compilation_of__${PROJECT_NAME}) - add_test(NAME "compilation_of__${PROJECT_NAME}" + add_custom_target("compilation of ${PROJECT_NAME}") + add_test(NAME "compilation of ${PROJECT_NAME}" COMMAND ${TIME_COMMAND} "${CMAKE_VS_MSBUILD_COMMAND}" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.sln" "-m:$ENV{NUMBER_OF_PROCESSORS}" "/t:Build" "/p:Configuration=$") - set_property(TEST "compilation_of__${PROJECT_NAME}" + set_property(TEST "compilation of ${PROJECT_NAME}" APPEND PROPERTY LABELS "${PROJECT_NAME}") - set_property(TEST "compilation_of__${PROJECT_NAME}" + set_property(TEST "compilation of ${PROJECT_NAME}" APPEND PROPERTY FIXTURES_REQUIRED "check_build_system_SetupFixture") - set_tests_properties("compilation_of__${PROJECT_NAME}" + set_tests_properties("compilation of ${PROJECT_NAME}" PROPERTIES RUN_SERIAL TRUE) #because of the scope of the tests, this part cannot go in the relevant CMakeLists if("${PROJECT_NAME}" STREQUAL "Polyhedron_Demo") - set_tests_properties(compilation_of__Polyhedron_Demo PROPERTIES TIMEOUT 2400) + set_tests_properties("compilation of Polyhedron_Demo" PROPERTIES TIMEOUT 2400) elseif("${PROJECT_NAME}" STREQUAL "Mesh_3_Tests" OR "${PROJECT_NAME}" STREQUAL "Mesh_3_Examples") - set_tests_properties(compilation_of__${PROJECT_NAME} PROPERTIES TIMEOUT 1600) + set_tests_properties("compilation of ${PROJECT_NAME}" PROPERTIES TIMEOUT 1600) endif() endif()#CMAKE_VS_MSBUILD_COMMAND @@ -110,11 +110,11 @@ function(cgal_add_compilation_test exe_name) if(NOT TARGET cgal_check_build_system) add_custom_target(cgal_check_build_system) add_dependencies( ALL_CGAL_TARGETS cgal_check_build_system ) - add_test(NAME "check_build_system" + add_test(NAME "check build system" COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$") - set_property(TEST "check_build_system" + set_property(TEST "check build system" APPEND PROPERTY LABELS "CGAL_build_system") - set_property(TEST "check_build_system" + set_property(TEST "check build system" PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture") endif() if(TARGET CGAL_Qt5_moc_and_resources) # if CGAL_Qt5 was searched, and is header-only @@ -122,19 +122,19 @@ function(cgal_add_compilation_test exe_name) # message(STATUS "${exe_name} depends on ${linked_libraries}") string(FIND "${linked_libraries}" "CGAL::CGAL_Qt5" link_with_CGAL_Qt5) if(link_with_CGAL_Qt5 STRGREATER "-1" AND - NOT TARGET compilation_of__CGAL_Qt5_moc_and_resources) + NOT TARGET "compilation_of__CGAL_Qt5_moc_and_resources") # This custom target is useless. It is used only as a flag to # detect that the test has already been created. - add_custom_target(compilation_of__CGAL_Qt5_moc_and_resources) - add_dependencies( compilation_of__CGAL_Qt5_moc_and_resources CGAL_Qt5_moc_and_resources ) - add_test(NAME "compilation_of__CGAL_Qt5_moc_and_resources" + add_custom_target("compilation_of__CGAL_Qt5_moc_and_resources") + add_dependencies( "compilation_of__CGAL_Qt5_moc_and_resources" CGAL_Qt5_moc_and_resources ) + add_test(NAME "compilation of CGAL_Qt5_moc_and_resources" COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "CGAL_Qt5_moc_and_resources" --config "$") - set_property(TEST "compilation_of__CGAL_Qt5_moc_and_resources" + set_property(TEST "compilation of CGAL_Qt5_moc_and_resources" APPEND PROPERTY LABELS "CGAL_build_system") - set_property(TEST "compilation_of__CGAL_Qt5_moc_and_resources" + set_property(TEST "compilation of CGAL_Qt5_moc_and_resources" PROPERTY FIXTURES_SETUP "CGAL_Qt5_moc_and_resources_Fixture") - set_property(TEST "compilation_of__CGAL_Qt5_moc_and_resources" - APPEND PROPERTY DEPENDS "check_build_system") + set_property(TEST "compilation of CGAL_Qt5_moc_and_resources" + APPEND PROPERTY DEPENDS "check build system") endif() endif() endfunction(cgal_add_compilation_test) @@ -158,10 +158,10 @@ function(cgal_setup_test_properties test_name) if(exe_name) if(NOT CMAKE_VS_MSBUILD_COMMAND) set_property(TEST "${test_name}" - APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + APPEND PROPERTY DEPENDS "compilation of ${exe_name}") else()#CMAKE_VS_MSBUILD_COMMAND set_property(TEST "${test_name}" - APPEND PROPERTY DEPENDS "compilation_of__${PROJECT_NAME}") + APPEND PROPERTY DEPENDS "compilation of ${PROJECT_NAME}") endif()#CMAKE_VS_MSBUILD_COMMAND endif() @@ -170,9 +170,9 @@ function(cgal_setup_test_properties test_name) string(FIND "${_binary_dir_abs}" "${_source_dir_abs}" _search_binary_in_source) if(_search_binary_in_source EQUAL "-1") - if(NOT TEST ${PROJECT_NAME}_SetupFixture) + if(NOT TEST "copy source_dir of ${PROJECT_NAME}") if(ANDROID) - add_test(NAME ${PROJECT_NAME}_SetupFixture + add_test(NAME "copy source_dir of ${PROJECT_NAME}" COMMAND ${adb_executable} push ${CMAKE_CURRENT_SOURCE_DIR} @@ -185,51 +185,51 @@ function(cgal_setup_test_properties test_name) ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) set_property(TEST ${PROJECT_NAME}_copy_GMP_MPFR - APPEND PROPERTY DEPENDS ${PROJECT_NAME}_SetupFixture) + APPEND PROPERTY DEPENDS "copy source_dir of ${PROJECT_NAME}") set_property(TEST ${PROJECT_NAME}_copy_GMP_MPFR PROPERTY FIXTURES_SETUP ${PROJECT_NAME}) elseif(CGAL_RUN_TESTS_THROUGH_SSH) - add_test(NAME ${PROJECT_NAME}_SetupFixture + add_test(NAME "copy source_dir of ${PROJECT_NAME}" COMMAND ${scp_executable} -r ${CMAKE_CURRENT_SOURCE_DIR} ${SSH_HOST}:${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) else() - add_test(NAME ${PROJECT_NAME}_SetupFixture + add_test(NAME "copy source_dir of ${PROJECT_NAME}" COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir ) endif() - set_property(TEST ${PROJECT_NAME}_SetupFixture + set_property(TEST "copy source_dir of ${PROJECT_NAME}" PROPERTY FIXTURES_SETUP ${PROJECT_NAME}) if(ANDROID) - add_test(NAME ${PROJECT_NAME}_CleanupFixture + add_test(NAME "cleanup of ${PROJECT_NAME}" COMMAND ${adb_executable} shell rm -rf ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) elseif(CGAL_RUN_TESTS_THROUGH_SSH) - add_test(NAME ${PROJECT_NAME}_CleanupFixture + add_test(NAME "cleanup of ${PROJECT_NAME}" COMMAND ${ssh_executable} ${SSH_HOST} rm -rf ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) else() - add_test(NAME ${PROJECT_NAME}_CleanupFixture + add_test(NAME "cleanup of ${PROJECT_NAME}" COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir ) endif() - set_property(TEST ${PROJECT_NAME}_CleanupFixture + set_property(TEST "cleanup of ${PROJECT_NAME}" PROPERTY FIXTURES_CLEANUP ${PROJECT_NAME}) set_property(TEST - ${PROJECT_NAME}_CleanupFixture ${PROJECT_NAME}_SetupFixture + "cleanup of ${PROJECT_NAME}" "copy source_dir of ${PROJECT_NAME}" APPEND PROPERTY LABELS "${PROJECT_NAME}") endif() if(NOT ANDROID AND NOT CGAL_RUN_TESTS_THROUGH_SSH) @@ -244,10 +244,10 @@ function(cgal_setup_test_properties test_name) set_property(TEST ${test_name} APPEND PROPERTY FIXTURES_REQUIRED "${exe_name}") if(NOT CMAKE_VS_MSBUILD_COMMAND) - set_property(TEST "compilation_of__${exe_name}" + set_property(TEST "compilation of ${exe_name}" PROPERTY FIXTURES_SETUP "${exe_name}") else()#CMAKE_VS_MSBUILD_COMMAND - set_property(TEST "compilation_of__${PROJECT_NAME}" + set_property(TEST "compilation of ${PROJECT_NAME}" PROPERTY FIXTURES_SETUP "${exe_name}") endif()#CMAKE_VS_MSBUILD_COMMAND if((ANDROID OR CGAL_RUN_TESTS_THROUGH_SSH) AND NOT TEST push_of__${exe_name}) @@ -259,7 +259,7 @@ function(cgal_setup_test_properties test_name) COMMAND ${scp_executable} $ ${SSH_HOST}:${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/) endif() set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + APPEND PROPERTY DEPENDS "compilation of ${exe_name}") set_property(TEST "push_of__${exe_name}" APPEND PROPERTY FIXTURES_SETUP "${exe_name}") set_property(TEST "push_of__${exe_name}" @@ -283,7 +283,7 @@ function(cgal_add_test exe_name) set(test_name ${cgal_add_test_TEST_NAME}) # message(" test_name: ${test_name}") if(NOT test_name) - set(test_name "execution___of__${exe_name}") + set(test_name "execution of ${exe_name}") endif() # message(" test_name: ${test_name}") if(cgal_add_test_NO_EXECUTION OR TEST ${test_name}) diff --git a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake index 70716d226c2..81f62d9aab4 100644 --- a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake +++ b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake @@ -106,12 +106,12 @@ endfunction() function(CGAL_hook_fix_ctest_depending_on_Qt5) get_property(_targets DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS) foreach(_target ${_targets}) - if(NOT TEST compilation_of__${_target}) + if(NOT TEST "compilation of ${_target}") continue() endif() get_property(_target_links TARGET ${_target} PROPERTY LINK_LIBRARIES) if("CGAL_Qt5" IN_LIST _target_links OR "CGAL::CGAL_Qt5" IN_LIST _target_links) - set_property(TEST compilation_of__${_target} APPEND PROPERTY FIXTURES_REQUIRED CGAL_Qt5_moc_and_resources_Fixture) + set_property(TEST "compilation of ${_target}" APPEND PROPERTY FIXTURES_REQUIRED CGAL_Qt5_moc_and_resources_Fixture) endif() endforeach() endfunction() diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index 2560f75d5c8..ad6166865a1 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -44,7 +44,7 @@ create_single_source_cgal_program("test_use_h.cpp") create_single_source_cgal_program(will_fail.cpp will_fail_aux.cpp) if(BUILD_TESTING) - set_property(TEST execution___of__will_fail PROPERTY WILL_FAIL TRUE) + set_property(TEST "execution of will_fail" PROPERTY WILL_FAIL TRUE) endif() find_package(TBB QUIET) diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index a776e87da72..e3e04ac9f47 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -112,21 +112,21 @@ if ( CGAL_FOUND ) if(BUILD_TESTING) set_property(TEST - execution___of__test_meshing_verbose - execution___of__test_meshing_polyhedron_with_features - execution___of__test_meshing_implicit_function - execution___of__test_meshing_unit_tetrahedron - execution___of__test_meshing_polyhedron - execution___of__test_meshing_polyhedral_complex - execution___of__test_mesh_capsule_var_distance_bound - execution___of__test_mesh_3_issue_1554 - execution___of__test_mesh_polyhedral_domain_with_features_deprecated - execution___of__test_mesh_cell_base_3 + "execution of test_meshing_verbose" + "execution of test_meshing_polyhedron_with_features" + "execution of test_meshing_implicit_function" + "execution of test_meshing_unit_tetrahedron" + "execution of test_meshing_polyhedron" + "execution of test_meshing_polyhedral_complex" + "execution of test_mesh_capsule_var_distance_bound" + "execution of test_mesh_3_issue_1554" + "execution of test_mesh_polyhedral_domain_with_features_deprecated" + "execution of test_mesh_cell_base_3" PROPERTY RUN_SERIAL 1) if(TARGET test_meshing_3D_image) set_property(TEST - execution___of__test_meshing_3D_image - execution___of__test_meshing_3D_gray_image + "execution of test_meshing_3D_image" + "execution of test_meshing_3D_gray_image" PROPERTY RUN_SERIAL 1) endif() endif() @@ -140,8 +140,8 @@ if ( CGAL_FOUND ) if(BUILD_TESTING) set_tests_properties( - execution___of__test_meshing_polyhedron_with_features - execution___of__test_meshing_verbose + "execution of test_meshing_polyhedron_with_features" + "execution of test_meshing_verbose" PROPERTIES RESOURCE_LOCK Mesh_3_Tests_IO) endif() else() diff --git a/Nef_3/test/Nef_3/CMakeLists.txt b/Nef_3/test/Nef_3/CMakeLists.txt index cb2d078472c..4e41d32b5c2 100644 --- a/Nef_3/test/Nef_3/CMakeLists.txt +++ b/Nef_3/test/Nef_3/CMakeLists.txt @@ -19,15 +19,15 @@ endforeach() if(BUILD_TESTING) set_tests_properties( - execution___of__Nef_3_problematic_construction - execution___of__test_nef_3_io_Cartesian - execution___of__test_nef_3_io_Cartesian_Lazy - execution___of__test_nef_3_io_EPEC - execution___of__test_nef_3_io_EPIC - execution___of__test_nef_3_io_Homogeneous - execution___of__test_nef_3_io_Homogenoeus_Lazy - execution___of__test_with_extended_homogeneous - execution___of__test_with_homogeneous - execution___of__test_with_lazy + "execution of Nef_3_problematic_construction" + "execution of test_nef_3_io_Cartesian" + "execution of test_nef_3_io_Cartesian_Lazy" + "execution of test_nef_3_io_EPEC" + "execution of test_nef_3_io_EPIC" + "execution of test_nef_3_io_Homogeneous" + "execution of test_nef_3_io_Homogenoeus_Lazy" + "execution of test_with_extended_homogeneous" + "execution of test_with_homogeneous" + "execution of test_with_lazy" PROPERTIES RESOURCE_LOCK Nef_3_Tests_IO) endif() diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 909dd292063..ccd0894ac8d 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -150,7 +150,7 @@ endif(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) if(BUILD_TESTING) set_tests_properties( - execution___of__triangulate_hole_Polyhedron_3_no_delaunay_test - execution___of__triangulate_hole_Polyhedron_3_test + "execution of triangulate_hole_Polyhedron_3_no_delaunay_test" + "execution of triangulate_hole_Polyhedron_3_test" PROPERTIES RESOURCE_LOCK Triangulation_with_hole) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index a44ae7fd8b4..baac0c98a0a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -49,7 +49,7 @@ if(TARGET CGAL::Eigen3_support) if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__classification_plugin + "compilation of classification_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt index 3c923aab368..0bbbd363345 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt @@ -12,6 +12,6 @@ target_link_libraries(kernel_plugin PUBLIC scene_surface_mesh_item) if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__convex_hull_plugin + "compilation of convex_hull_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/PCA/CMakeLists.txt index 4171347a6dc..8ede27ca7ed 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/CMakeLists.txt @@ -40,6 +40,6 @@ target_link_libraries( if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__create_obb_mesh_plugin + "compilation of create_obb_mesh_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt index 53cfdc9b825..3ff3f653fdf 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt @@ -55,12 +55,12 @@ if(TARGET CGAL::Eigen3_support) if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__extrude_plugin - compilation_of__fairing_plugin + "compilation of extrude_plugin" + "compilation of fairing_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) set_tests_properties( - compilation_of__hole_filling_plugin - compilation_of__smoothing_plugin + "compilation of hole_filling_plugin" + "compilation of smoothing_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() else() @@ -167,12 +167,12 @@ target_link_libraries( if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__join_and_split_plugin - compilation_of__selection_plugin - compilation_of__triangulate_facets_plugin - compilation_of__isotropic_remeshing_plugin - compilation_of__random_perturbation_plugin - compilation_of__engrave_text_plugin - compilation_of__degenerated_faces_plugin + "compilation of join_and_split_plugin" + "compilation of selection_plugin" + "compilation of triangulate_facets_plugin" + "compilation of isotropic_remeshing_plugin" + "compilation of random_perturbation_plugin" + "compilation of engrave_text_plugin" + "compilation of degenerated_faces_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt index 682998322e0..52943788da1 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt @@ -18,7 +18,7 @@ if(NOT CGAL_DISABLE_GMP) if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__parameterization_plugin + "compilation of parameterization_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() @@ -36,7 +36,7 @@ if(NOT CGAL_DISABLE_GMP) if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__mesh_segmentation_plugin + "compilation of mesh_segmentation_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt index 0954a8c13c3..a9ef41bc0e3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -7,7 +7,7 @@ if(EIGEN3_FOUND AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( - compilation_of__edit_plugin + "compilation of edit_plugin" PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() diff --git a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake index 0e20273faa7..02cff1948ad 100644 --- a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake +++ b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake @@ -36,19 +36,19 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) target_link_libraries( ${plugin_name} PUBLIC demo_framework) add_dependencies(${plugin_name} demo_framework) if(BUILD_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) - if(NOT TARGET compilation_of__demo_framework) + if(NOT TARGET "compilation_of__demo_framework") # This custom target is useless. It is used only as a flag to # detect that the test has already been created. - add_custom_target(compilation_of__demo_framework) - add_dependencies( compilation_of__demo_framework demo_framework ) - add_test(NAME "compilation_of__demo_framework" + add_custom_target("compilation_of__demo_framework") + add_dependencies( "compilation_of__demo_framework" demo_framework ) + add_test(NAME "compilation of demo_framework" COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "demo_framework" --config "$") - set_property(TEST "compilation_of__demo_framework" + set_property(TEST "compilation of demo_framework" APPEND PROPERTY LABELS "CGAL_build_system") - set_property(TEST "compilation_of__demo_framework" + set_property(TEST "compilation of demo_framework" APPEND PROPERTY FIXTURES_SETUP "demo_framework_SetupFixture") - set_property(TEST "compilation_of__demo_framework" + set_property(TEST "compilation of demo_framework" APPEND PROPERTY DEPENDS "compilation_of__CGAL_Qt5_moc_and_resources") endif() endif() @@ -56,8 +56,8 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) target_link_libraries( ${plugin_name} PUBLIC Polyhedron_demo_framework) add_dependencies(${plugin_name} Polyhedron_demo_framework) endif() - if(TARGET compilation_of__demo_framework) - set_property(TEST compilation_of__${plugin_name} APPEND PROPERTY FIXTURES_REQUIRED demo_framework_SetupFixture) + if(TARGET "compilation_of__demo_framework") + set_property(TEST "compilation of ${plugin_name}" APPEND PROPERTY FIXTURES_REQUIRED demo_framework_SetupFixture) endif() # Link with CGAL target_link_libraries( ${plugin_name} PUBLIC ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) diff --git a/Triangulation_2/test/Triangulation_2/CMakeLists.txt b/Triangulation_2/test/Triangulation_2/CMakeLists.txt index bad1f2455bf..4d907809237 100644 --- a/Triangulation_2/test/Triangulation_2/CMakeLists.txt +++ b/Triangulation_2/test/Triangulation_2/CMakeLists.txt @@ -19,16 +19,16 @@ endforeach() if(BUILD_TESTING) set_tests_properties( - execution___of__test_constrained_triangulation_2 - execution___of__test_delaunay_triangulation_2 - execution___of__test_triangulation_geom_traits - execution___of__test_triangulation_2 - execution___of__test_triangulation_2_bis - execution___of__test_delaunay_hierarchy_2 - execution___of__test_const_triang_plus_2 - execution___of__test_regular_triangulation_2 - execution___of__test_const_del_triangulation_2 - execution___of__test_regular_hierarchy_2 - execution___of__test_deprecated_projection_traits + "execution of test_constrained_triangulation_2" + "execution of test_delaunay_triangulation_2" + "execution of test_triangulation_geom_traits" + "execution of test_triangulation_2" + "execution of test_triangulation_2_bis" + "execution of test_delaunay_hierarchy_2" + "execution of test_const_triang_plus_2" + "execution of test_regular_triangulation_2" + "execution of test_const_del_triangulation_2" + "execution of test_regular_hierarchy_2" + "execution of test_deprecated_projection_traits" PROPERTIES RESOURCE_LOCK Triangulation_2_Tests_IO) endif() diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 94b035fc9d0..bb57a112d02 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -43,9 +43,9 @@ if(TARGET CGAL::TBB_support) if(BUILD_TESTING) set_property(TEST - execution___of__parallel_insertion_and_removal_in_regular_3 - execution___of__parallel_insertion_in_delaunay_3 - execution___of__sequential_parallel + "execution of parallel_insertion_and_removal_in_regular_3" + "execution of parallel_insertion_in_delaunay_3" + "execution of sequential_parallel" PROPERTY RUN_SERIAL 1) endif() else() diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index a820549bf20..3d5393a36bf 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -37,19 +37,19 @@ if(TARGET CGAL::TBB_support) endforeach() if(BUILD_TESTING) set_property(TEST - execution___of__test_delaunay_3 - execution___of__test_regular_3 - execution___of__test_regular_insert_range_with_info + "execution of test_delaunay_3" + "execution of test_regular_3" + "execution of test_regular_insert_range_with_info" PROPERTY RUN_SERIAL 1) endif() endif() if(BUILD_TESTING) set_tests_properties( - execution___of__test_delaunay_hierarchy_3 - execution___of__test_delaunay_hierarchy_3_old - execution___of__test_regular_as_delaunay_3 - execution___of__test_triangulation_3 - execution___of__test_delaunay_3 + "execution of test_delaunay_hierarchy_3" + "execution of test_delaunay_hierarchy_3_old" + "execution of test_regular_as_delaunay_3" + "execution of test_triangulation_3" + "execution of test_delaunay_3" PROPERTIES RESOURCE_LOCK Triangulation_3_Tests_IO) endif() From 12c8e60e6eef2c3ced0145aac6bb1c18df0021ac Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 17 Apr 2023 10:07:35 +0200 Subject: [PATCH 2/2] fix name of a custom target on Windows --- Installation/cmake/modules/CGAL_add_test.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 984922a772f..0591b7266d6 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -85,9 +85,9 @@ function(cgal_add_compilation_test exe_name) APPEND PROPERTY LABELS "${PROJECT_NAME}") set_property(TEST "compilation of ${exe_name}" APPEND PROPERTY FIXTURES_REQUIRED "check_build_system_SetupFixture") - elseif(NOT TARGET "compilation of ${PROJECT_NAME}")#CMAKE_VS_MSBUILD_COMMAND + elseif(NOT TARGET "compilation_of__${PROJECT_NAME}")#CMAKE_VS_MSBUILD_COMMAND #this target is just a flag, to deal with the scope problem with the tests - add_custom_target("compilation of ${PROJECT_NAME}") + add_custom_target("compilation_of__${PROJECT_NAME}") add_test(NAME "compilation of ${PROJECT_NAME}" COMMAND ${TIME_COMMAND} "${CMAKE_VS_MSBUILD_COMMAND}" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.sln" "-m:$ENV{NUMBER_OF_PROCESSORS}" "/t:Build" "/p:Configuration=$") set_property(TEST "compilation of ${PROJECT_NAME}"