Re: [CMake] Pre-install targets?
Hi all, After some hallway conversation, here is a follow-up: The consensus was that there were 2 options for the documentation target: + Leave documentation out of the install step when documentation is not built as part of the ALL target. + Change the configuration option for documentation from a boolean to a tri-state enum, i.e., set(${PROJECT}_BUILD_DOCUMENTATION "never" CACHE STRING "When to build documentation.") set_property(CACHE ${PROJECT}_BUILD_DOCUMENTATION PROPERTY STRINGS never manual always) so that automated builds for continuous integration can function (using "always" or "never") while developers can enable documentation but not be forced to refresh it every time they modify source code (using "manual"). For the latter, a recent change[1] to CMake has made the execution of install-rules consistently ordered when processing subdirectories, so it is possible to make the INSTALL target build documentation as needed with something like: if (${PROJECT}_BUILD_DOCUMENTATION STREQUAL "manual") install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" cmake --build \"${CMAKE_BINARY_DIR}\" --target docs --config $)") endif() so long as care is taken within each directory's CMakeLists.txt to place the above before any install() directives related to the generated documentation. David [1]: https://gitlab.kitware.com/cmake/cmake/merge_requests/2434 > On Oct 11, 2018, at 09:09, David Thompson wrote: > > Hi all, > > Is there a way to force a custom target (i.e., ADD_CUSTOM_TARGET) to be built > just before installation? > > We have documentation added as a custom target that is **not** passed the > "ALL" keyword because generating the documentation is slow. However, that > target creates files that have a matching INSTALL, so "make install" or > "ninja install" will fail unless the target is built before installation. We > want to encourage developers to configure with documentation turned on, but > want buildbot/dashboard builds to work without magic options or special > configuration. > > Along those lines: > > 1. Is there any ordering of INSTALL(CODE ...) relative to INSTALL(FILES ...)? > If it is guaranteed to run first, we could force the target to build that way. > > 2. Is there really nothing to replace the deprecated PRE_INSTALL_SCRIPT > property? > > Thanks, > David -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] [ANNOUNCE] CMake 3.13.0-rc1 is ready for testing
Thanks for spotting this and this will need to be handled for 3.13. I have opened an issue to track the progress of the fix: https://gitlab.kitware.com/cmake/cmake/issues/18466 On Wed, Oct 17, 2018 at 9:37 AM Hendrik Sattler wrote: > > Zitat von Robert Maynard : > > * The "BundleUtilities" module may no longer be included at > > configure time. This was always a bug anyway. See policy "CMP0080". > > This now warns about the use of DeployQt4.cmake that ships with CMake. > So this module should be fixed? > At least it should set this policy to OLD for itself to avoid warnings > for users that cannot change anything about it -> annoying. > > HS > > > -- > > 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: > https://cmake.org/mailman/listinfo/cmake -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] [ANNOUNCE] CMake 3.13.0-rc1 is ready for testing
Zitat von Robert Maynard : * The "BundleUtilities" module may no longer be included at configure time. This was always a bug anyway. See policy "CMP0080". This now warns about the use of DeployQt4.cmake that ships with CMake. So this module should be fixed? At least it should set this policy to OLD for itself to avoid warnings for users that cannot change anything about it -> annoying. HS -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] Error using sudo ./bootstrap && make && make install
Le 16/10/2018 à 23:04, Frank Tocci a écrit : Hello, I am trying to install Cmake and I am running into an error when I enter the install directory and run sudo ./bootstrap && make && make install as specified in the README file Hello, You're not supposed to do sudo bootstrap. You should always build as your user. Only make install has to be run as root. So do the following: ./boostrap make sudo make install I'll update the README. regards -- 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: https://cmake.org/mailman/listinfo/cmake