[CMake] Help debug crazy Windows MSVC issue

David Cole dlrdave at aol.com
Sun Feb 16 22:38:08 EST 2014


> How can I structure my cmake file to avoid
> this double build?


Put the custom command in a custom target, and make the libraries using 
the generated file depend on the custom target.

That works, even for parallel builds.

Google around for examples and similar advice. You'll end up using 
add_custom_target and add_dependencies in addition to what you already 
have.


HTH,
David C.



More information about the CMake mailing list