Not sure whether the behavior I describe in the following is a bug. To my
limited view it appears as one.
Running CMake with Visual Studio 2013 generator.
Consider a build tree like:
build/
top.sln
alib/
alib.sln
alib.vxproj
aexe/
aexe.sln
aexe.vcxproj
The source directs CMake with something like:
source/alib/CMakeLists.txt
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.c
COMMAND ${GENERATOR}
DEPENDS generate.in)
add_custom_target(run_generator
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/generated.c)
add_library(alib ${SRC})
add_dependencies(alib run_generator)
source/aexe/CMakeLists.txt
add_exe(aexe ${SRC})
target_link_libraries(aexe alib)
A closer look at the resulting configuration of top.sln and aexe.sln shows:
top.sln : 'run_generator' is marked for build
aexe.sln: 'run_generator' is not marked for build
This means that building aexe.sln will never the generator although the
dependency
aexe <-- alib <-- run_generator <-- generated.c
is recorded correctly.
On the other hand, when building either top.sln or aexe.vcxproj the
generator will be run when necessary.
I would expect 'run_generator' to be marked for build in aexe.sln (as it is
in top.sln). Right???
All the best, Dirk
--
Dirk Steenpass
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake