Visual Studio solution incorrectly depends on custom target
Hello,
in the following code the add_dependencies
adds target first
to the solution build targets:
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(testcase NONE)
add_custom_target(first COMMAND ${CMAKE_COMMAND} -E echo "!!! first !!!")
add_custom_target(second COMMAND ${CMAKE_COMMAND} -E echo "??? second ???")
add_dependencies(second first)
But it should not be added because the ALL
keyword has not been set.
Configuration managers shows that solution depends on first
:
The ALL_BUILD
target correctly does not depend on either first
or second
:
Thanks, Gregor