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

Andy Cedilnik andy.cedilnik at kitware.com
Tue Apr 1 07:24:50 EST 2003


Hi Ingmar,

The command would be:

STRING(REGEX REPLACE "\\" "_" PROJECT_NAME ${BUILD_PATH})

			Andy

On Mon, 2003-03-31 at 18:35, Bitter, Ingmar (NIH/CC/DRD) wrote:
> 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?





More information about the CMake mailing list