[cmake-developers] Question about ALIAS targets

Brad King brad.king at kitware.com
Mon Jun 5 16:38:21 EDT 2017


On 06/05/2017 04:10 PM, David Cole via cmake-developers wrote:
> Why is there any restriction on ALIAS targets about what sorts of
> targets they may be aliases of?

Adding Steve (who added ALIAS targets) to Cc.

The use case in the documentation:

 https://cmake.org/cmake/help/v3.9/manual/cmake-buildsystem.7.html#alias-targets

is the only one that was really designed.  It is for making in-project
build targets available to other directories in the project under the
same name that an externally-built project might see it as an imported
target.  This allows tests and examples to use the name that client code
would.  Of course only in-project build targets need to be aliased for this.

Steve, is there any reason for the restriction other than not implementing
more use cases up front?

Thanks,
-Brad



More information about the cmake-developers mailing list