[CMake] Make project name a target

Marcel Loose loose at astron.nl
Fri Sep 11 03:51:17 EDT 2009


Hi all,

I was wondering whether it's a good idea to make the project name (i.e.
the argument to the 'project' command) a target. 

Rationale: I have a project that consists of numerous sub-projects and I
would like to be able to build some of these separately. Wrapping the
'project' command in a macro is not a solution, because AFAIK CMake
*must* see a 'project' command in the top-level CMakeLists.txt file; a
'myproject' macro, wrapping the 'project' command, will not do.

Any comments?

Best regards,
Marcel Loose.




More information about the CMake mailing list