[CMake] ExternalProject_Add, static library, Ninja generator
Nils Gladitz
nilsgladitz at gmail.com
Thu Apr 2 10:17:18 EDT 2015
On 04/02/2015 04:05 PM, Charles Nicholson wrote:
> Thanks for the quick response, Nils, that fixed it!
>
> I'm curious, though, why wasn't simply marking my lib as depending on
> the externalproject_add target enough? I like using the byproducts line
> since it's more exact and descriptive, but shouldn't it work without that?
The target dependency takes care of order which is enough for the other
generators.
Ninja in particular needs to account for the library file that you
depend on in the beginning.
Without marking it a byproduct ninja does not know that it is a file
that will be created later on by one of your targets and assumes it missing.
Nils
More information about the CMake
mailing list