Why does this:
SET( PLATFORM_FILTER *Windows.* )
FOREACH(INP ${PLATFORM_FILTER})
MESSAGE( "INP=" ${INP} )
IF("abc_Windows.cpp" MATCHES "${INP}" )
MESSAGE( "found a match!" )
ENDIF("abc_Windows.cpp" MATCHES "${INP}" )
ENDFOREACH(INP ${PLATFORM_FILTER})
Produce this:
S:\software\foo\build> cmake ..
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
INP=*Windows.*
RegularExpression::compile(): ?+* follows nothing.
RegularExpression::compile(): Error in compile.
CMake Error: Error in cmake code at
S:/software/data/cmake/allfiles2.cmake:11:
IF had incorrect arguments: "abc_Windows.cpp" MATCHES "${INP}" (Regular
expression "*Windows.*" cannot compile).
Current CMake stack:
[2] S:/software/data/cmake/allfiles2.cmake
[1] S:/software/foo/CMakeLists.txt
found a match!
-- Configuring done
S:\software\foo\build>
I have tried all kinds of variations with regards to using quotes around
different parts, and I can't get it to compile cleanly.
-phil
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake