Skip to content
Snippets Groups Projects
Commit 26cbfc29 authored by Dominic Kempf's avatar Dominic Kempf Committed by Markus Blatt
Browse files

[cmake] Fixes headercheck for modules in a directory path with special characters.

Using variables as part of regex does not work with special characters.
Therefore previously the headercheck failed during configure if e.g.
the modules were located in $HOME/C++/. This patch fixes this by not
using regex to strip the location of the modules from the path any more.

This log message was amended by the pusher.
parent fe532b79
Branches
Tags
No related merge requests found
......@@ -49,7 +49,7 @@ macro(finalize_headercheck)
foreach(header ${headerlist})
#do some name conversion
string(REGEX REPLACE ".*/([^/]*)" "\\1" simple ${header})
string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/(.*)" "\\1" rel ${header})
string(REPLACE ${PROJECT_SOURCE_DIR} "" rel ${header})
string(REGEX REPLACE "(.*)/[^/]*" "\\1" relpath ${rel})
string(REGEX REPLACE "/" "_" targname ${rel})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment