How to create alias for targets using CMake?

alias, cmake, makefile

Solution

add_library(foo foo.cpp )
add_custom_target(bar DEPENDS foo)

Problem

Suppose that I've got the following library: ``` add_library(myLib STATIC ${SRC_FILES}) ``` In order to make this lib, I have to execute the following command: ``` make myLib ``` How can I create an alias for `myLib`, like `lib`, so that executing the following line makes the same target? ``` make lib ```

Original source

Related problems