[Cmake] please provide example of use of STRING(REGEX REPLACE ... )

Bitter, Ingmar (NIH/CC/DRD) IBitter at cc.nih.gov
Mon Mar 31 18:35:04 EST 2003


Hi,

Can someone please give an example of the use of STRING(REGEX REPLACE ... )

I am trying to name my workspace according to the full path, as MSVC++ is
usually not telling me that anywhere.

Here is what I would like to do:

FIND_PATH(BUILD_PATH CMakeLists.txt . ) 
STRING("\\" REPLACE "_" BUILD_PATH PROJECT_NAME)
PROJECT(${PROJECT_NAME})

But my use of the STRING command is wrong.
How do I use it correctly?

-Ingmar



More information about the CMake mailing list