Skip to content

Commit

Permalink
Merge pull request #7869 from lrineau/Installation-fix_CMake_REGEXP_R…
Browse files Browse the repository at this point in the history
…EPLACE-GF

CMake: fix incorrect use of string(REGEX REPLACE...)
  • Loading branch information
lrineau committed Nov 29, 2023
2 parents 44e740c + 25ebbab commit 19e4840
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 19e4840

Please sign in to comment.