From 25ebbab854da2ce6f59ff0e0be536cdbde9f9a28 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 17 Nov 2023 15:29:24 +0100 Subject: [PATCH] Fix incorrect use of string(REGEX REPLACE...) --- Installation/cmake/modules/CGAL_Macros.cmake | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 6cc009ec9aad..a89aa1d7fda1 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -579,15 +579,9 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() - function(process_CGAL_subdirectory entry subdir type_name) # For example, subdir can be "examples", type_name "example", and entry "Mesh_2" - - if ( CGAL_BRANCH_BUILD ) - string( REGEX REPLACE "${CMAKE_SOURCE_DIR}/.*/${subdir}/" "" ENTRY_DIR_NAME "${entry}" ) - else() - string( REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" ENTRY_DIR_NAME "${entry}" ) - endif() + get_filename_component(ENTRY_DIR_NAME "${entry}" NAME) if( NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") # out-of-source make_directory("${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")