On 29.04.2015 09:11, Nils Gladitz wrote:
The policy will likely have to be removed or replaced.

I reverted the MAIN_DEPENDENCY specific CMP0057 commits and replaced the policy with an unrelated one that is part of my "if-IN_LIST" topic to fill the gap.

This leaves the original issues that prompted the creation of CMP0057 open for now.

Two related but distinct issues are triggered by the following test cases with the Makefile generator:

1) The following causes the given custom command to be emitted for both the foo and bar target which can lead to parallel build errors:

  cmake_minimum_required(VERSION 3.2)

  file(WRITE test.in)
  file(WRITE dummy.cpp "int main() {}")

  add_custom_command(
      OUTPUT test.out
      COMMAND ${CMAKE_COMMAND} -E echo Hello World
      MAIN_DEPENDENCY test.in
  )

  add_executable(foo dummy.cpp test.in)
  add_executable(bar dummy.cpp test.in)

2) The following causes the compile step for the dummy.cpp source file to fail in presence of the custom command:

  cmake_minimum_required(VERSION 3.2)

  file(WRITE dummy.cpp "int main() {}")

  add_custom_command(
      OUTPUT test.out
      COMMAND ${CMAKE_COMMAND} -E echo Hello World
      MAIN_DEPENDENCY dummy.cpp
  )

  add_executable(foo dummy.cpp)

Nils
--

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://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to