Is it possible to add an external project in CMake but to exclude it from the all
build target?
I've looked at the EXCLUDE_FROM_ALL
option which is used with ADD_EXECUTABLE
but I don't think this works with an external project.
Alternatively I'd be happy if I could change the default target for CMake, but I I think that's hard-coded to all
.
For the project that I'm working on I am generating Unix Makefiles with CMake and right now I'm using CMake version 2.8.10.2.
Even if the option EXCLUDE_FROM_ALL
is not used upon adding the target by the ExternalProject_add
command, the option can be activated retroactively by setting the EXCLUDE_FROM_ALL
property of the external project target, i.e.:
ExternalProject_add(MyExternal URL ... ) set_target_properties(MyExternal PROPERTIES EXCLUDE_FROM_ALL TRUE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With