[Cmake] Problem seen in CMake 2.0.1 not seen in 1.8.3

Karelitz, David B dbkarel at sandia.gov
Thu Jun 17 18:29:12 EDT 2004


> Hi,
> 
> I'm having a problem with CMake 2.0.1. The following line:
> ADD_DEFINITIONS( -DFOO="${PROJECT_SOURCE_DIR}/Foo" )
> used to compile using CMake 1.8.3. In Cmake 2.0.1 $(PROJECT_SOURCE_DIR)
> either has a space at the beginning of the name or a space is added
> somehow, so the compiler option is no longer correct. i.e. instead of
> "-DFOO=path/to/foo" the result is "-DFOO= /path/to/foo". The result is
> that the program no longer compiles.
> 
> Is there some workaround for this, or a better way to have the same
> functionality?
> 
> Thanks,
> Dave Karelitz



More information about the Cmake mailing list