[Cmake] Regular expression ++ nesting problem

David Svoboda xsvobod2 at informatics.muni.cz
Thu, 26 Feb 2004 13:19:09 +0100


Hello,

I used the following construction:

IF ("${MY_STRING_PATH}" MATCHES "${CHOSEN_PATH}.*")
	...


to test, whether CHOSEN_PATH is included in MY_STRING_PATH. Everything had
worked well until I tried SET(CHOSEN_PATH /usr/local/packages/g++-3.0).
Here the variable CHOSEN_PATH contains the "+" sign (twice) and causes
errors in CMake:


***
-- Check for working C compiler: gcc -- works
-- Check for working CXX compiler: g++-3.0 -- works
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
-- Configuring done
-- Generating done
***


I tried some "\" or "'" signs, but it did not work. Could anybody help me?

 David