Hi All,

I have a superbuild style project consisting of a few external projects. I wish to build the install target of one of them as part of the install target of the parent project. I had it working by adding a step target called install and adding a custom target to the parent project that depends on the child step target. E.g.

ExternalProject_Add (xxx
  SVN_REPOSITORY ${xxx_repo}
  CMAKE_ARGS
    -D CMAKE_INSTALL_PATH=<INSTALL_DIR>
  INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
  STEP_TARGETS install)

add_custom_target (install DEPENDS xxx-install)

This arrangement allowed me to 'cmake --build . --target install' and have the child project install target run.

Now CMake complains about policy CMP0037, because I cannot define a reserved target name, so it seems I cannot abuse the 'install' target by adding extra dependencies any more.

Is there a better way to link child and parent targets that doesn't invoke this error?

Regards
Bill Somerville.
--

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

Reply via email to