[CMake] User generated header file
Eric Noulard
eric.noulard at gmail.com
Sun Sep 18 11:43:43 EDT 2011
2011/9/18 Perry Ismangil <perry at pjsip.org>:
> I'm converting Visual Studio project files to CMake.
>
> On of our project, one of the header file included in the project is
> deliberately missing, the user have to manually create it before
> building for the first time.
>
> When I tried this with cmake, it complained that it couldn't find the
> header file specified, which is of course true.
>
> How do I suppress this behaviour?
You may tell CMake that this file is generated as part of the build:
set_source_files_properties(your_header.h PROPERTIES GENERATED TRUE)
This should enable you to run CMake without the file
but the build should fail if it is not there at build time.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list