[CMake] CMAKE_PROJECT_NAME

Josef Karthauser joe.karthauser at geomerics.com
Thu Oct 18 06:17:59 EDT 2007


Isn't the value of CMAKE_PROJECT_NAME supposed to contain the name given
to the last PROJECT() call?  It appears with the current version of
CMAKE that it gets the value of the first call to PROJECT, and isn't
subsequently updated.

For example:

    CMakeLists.txt:
	Project(foo)
	MESSAGE(${CMAKE_PROJECT_NAME})

	Project(bar)
	MESSAGE(${CMAKE_PROJECT_NAME})

Outputs:

    foo
    foo

when run.

Joe


More information about the CMake mailing list