Skip to content

Commit

Permalink
Fix incorrect use of string(REGEX REPLACE...)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Nov 17, 2023
1 parent 24a8000 commit 25ebbab
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Installation/cmake/modules/CGAL_Macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 25ebbab

Please sign in to comment.