[Cmake-commits] CMake branch, master, updated. v3.5.2-654-g80a2f87
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 80a2f87968a980de498473babe2892c9f9228401 (commit) from b952336902e9206ba51e1d77b8e489bdd759f73f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80a2f87968a980de498473babe2892c9f9228401 commit 80a2f87968a980de498473babe2892c9f9228401 Author: Kitware Robot <kwro...@kitware.com> AuthorDate: Sun May 15 00:01:05 2016 -0400 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Sun May 15 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a4a5727..d6cc236 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 5) -set(CMake_VERSION_PATCH 20160514) +set(CMake_VERSION_PATCH 20160515) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.5.2-1409-gbf71c37
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via bf71c37095f7aafb7942386196fdb470a79f13fb (commit) via 44ee2d717a0f0552d4d1d5978c473d60625a0b3c (commit) from d758f127cf059e974f9e88c9e0e70a1db352bef3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf71c37095f7aafb7942386196fdb470a79f13fb commit bf71c37095f7aafb7942386196fdb470a79f13fb Merge: d758f12 44ee2d7 Author: Domen VrankarAuthorDate: Sat May 14 21:03:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat May 14 21:03:04 2016 -0400 Merge topic 'cpack-rpm-different-package-names' into next 44ee2d71 CPack/RPM different package names diff --cc Tests/RunCMake/CPack/RunCMakeTest.cmake index f143150,d34e751..759295f --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@@ -10,8 -10,6 +10,9 @@@ run_cpack_test(DEB_EXTRA "DEB" false run_cpack_test(DEPENDENCIES "RPM;DEB" true) run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true) + run_cpack_test(RPM_CUSTOM_NAMES "RPM" true) run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false) +run_cpack_test(RPM_DIST "RPM" false) run_cpack_test(INSTALL_SCRIPTS "RPM" false) +run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) +run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44ee2d717a0f0552d4d1d5978c473d60625a0b3c commit 44ee2d717a0f0552d4d1d5978c473d60625a0b3c Author: Domen Vrankar AuthorDate: Sun May 15 03:01:34 2016 +0200 Commit: Domen Vrankar CommitDate: Sun May 15 03:01:34 2016 +0200 CPack/RPM different package names Packagers may now set their own rpm package file names or request that rpmbuild tool chooses one for them. It also supports handing of situations where one spec file may produce multiple rpm packages. diff --git a/Help/release/dev/cpack-rpm-different-package-names.rst b/Help/release/dev/cpack-rpm-different-package-names.rst new file mode 100644 index 000..48679e1 --- /dev/null +++ b/Help/release/dev/cpack-rpm-different-package-names.rst @@ -0,0 +1,9 @@ +cpack-rpm-different-package-names +- + +* The :module:`CPackRPM` module learned how to set user defined package file + names, how to specify that rpmbuild should decide on file name format as + well as handling of multiple rpm packages generated by a single user defined + spec file. + See :variable:`CPACK_RPM_PACKAGE_NAME` and + :variable:`CPACK_RPM__PACKAGE_NAME`. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 768d64f..dca5f00 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -54,6 +54,30 @@ # * Mandatory : YES # * Default : CPACK_PACKAGE_NAME # +# .. variable:: CPACK_RPM_FILE_NAME +# CPACK_RPM__FILE_NAME +# +# Package file name. +# +# * Mandatory : YES +# * Default : ``[-].rpm`` with spaces +#replaced by '-' +# +# This may be set to ``RPM-DEFAULT`` to allow rpmbuild tool to generate package +# file name by itself. +# Alternatively provided package file name must end with ".rpm" suffix. +# +# .. note:: +# +#By using user provided spec file, rpm macro extensions such as for +#generating debuginfo packages or by simply using multiple components more +#than one rpm file may be generated, either from a single spec file or from +#multiple spec files (each component execution produces it's own spec file). +#In such cases duplicate file names may occur as a result of this variable +#setting or spec file content structure. Duplicate files get overwritten +#and it is up to the packager to set the variables in a manner that will +#prevent such errors. +# # .. variable:: CPACK_RPM_PACKAGE_VERSION # # The RPM package version. @@ -1534,8 +1558,6 @@ function(cpack_rpm_generate_package) file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SPECS) file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SRPMS) - #set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") - set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") # it seems rpmbuild can't handle spaces in the path # neither escaping (as below) nor putting quotes around the path seem to help #string(REGEX REPLACE " " " " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") @@ -1716,6 +1738,28 @@ function(cpack_rpm_generate_package)
Re: [cmake-developers] Make CPACK_RPM_PACKAGE_RELEASE match Fedora/RHOS/CentOS recommended behaviour
> That is infinitely simpler. Looks like a good addition to me. > > Applied to next: https://cmake.org/gitweb?p=cmake.git;a=commit;h=d758f12 Thanks, Domen -- 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
[Cmake-commits] CMake branch, next, updated. v3.5.2-1407-gd758f12
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d758f127cf059e974f9e88c9e0e70a1db352bef3 (commit) via f5089cfccd96f2c94838faa1736fa452ae4bb853 (commit) via f7003a60557e828f08ee893c5da78b24423b5223 (commit) from 35e272d8abbedcaa2ea60db978fcb4b458d14777 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d758f127cf059e974f9e88c9e0e70a1db352bef3 commit d758f127cf059e974f9e88c9e0e70a1db352bef3 Merge: 35e272d f5089cf Author: Domen VrankarAuthorDate: Sat May 14 14:22:35 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat May 14 14:22:35 2016 -0400 Merge topic 'cpack-rpm-adding-dist-to-release-tag' into next f5089cfc CPack/RPM adding dist to release tag test f7003a60 CPack/RPM release dist tag support diff --cc Tests/RunCMake/CPack/RunCMakeTest.cmake index 2e358f0,7f756c4..f143150 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@@ -11,6 -11,5 +11,7 @@@ run_cpack_test(DEPENDENCIES "RPM;DEB" t run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false) + run_cpack_test(RPM_DIST "RPM" false) run_cpack_test(INSTALL_SCRIPTS "RPM" false) +run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) +run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5089cfccd96f2c94838faa1736fa452ae4bb853 commit f5089cfccd96f2c94838faa1736fa452ae4bb853 Author: Domen Vrankar AuthorDate: Wed May 11 21:14:26 2016 +0200 Commit: Domen Vrankar CommitDate: Sat May 14 20:21:32 2016 +0200 CPack/RPM adding dist to release tag test Tests and release notes diff --git a/Help/release/dev/cpack-rpm-adding-dist-to-release-tag.rst b/Help/release/dev/cpack-rpm-adding-dist-to-release-tag.rst new file mode 100644 index 000..42599a9 --- /dev/null +++ b/Help/release/dev/cpack-rpm-adding-dist-to-release-tag.rst @@ -0,0 +1,7 @@ +cpack-rpm-adding-dist-to-release-tag + + +* The :module:`CPackRPM` module learned how to set RPM ``dist`` tag as part of + RPM ``Release:`` tag when enabled (mandatory on some Linux distributions for + e.g. on Fedora). + See :variable:`CPACK_RPM_PACKAGE_RELEASE_DIST`. diff --git a/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake new file mode 100644 index 000..3b5a347 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "rpm_dist*.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/RPM_DIST-VerifyResult.cmake b/Tests/RunCMake/CPack/RPM/RPM_DIST-VerifyResult.cmake new file mode 100644 index 000..7375ecc --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/RPM_DIST-VerifyResult.cmake @@ -0,0 +1,11 @@ +execute_process(COMMAND ${RPMBUILD_EXECUTABLE} -E %{?dist} +OUTPUT_VARIABLE DIST_TAG +ERROR_QUIET +OUTPUT_STRIP_TRAILING_WHITESPACE) + +set(whitespaces_ "[\t\n\r ]*") + +getPackageInfo("${FOUND_FILE_1}" "FILE_INFO_") +if(NOT FILE_INFO_ MATCHES ".*Release${whitespaces_}:${whitespaces_}1${DIST_TAG}") + message(FATAL_ERROR "Unexpected Release in '${FOUND_FILE_1}'; file info: '${FILE_INFO_}'") +endif() diff --git a/Tests/RunCMake/CPack/RPM_DIST.cmake b/Tests/RunCMake/CPack/RPM_DIST.cmake new file mode 100644 index 000..eb2a123 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM_DIST.cmake @@ -0,0 +1,4 @@ +install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) +set(CPACK_PACKAGE_NAME "rpm_dist") diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index ee4112d..7f756c4 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -11,4 +11,5 @@ run_cpack_test(DEPENDENCIES "RPM;DEB" true) run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false) +run_cpack_test(RPM_DIST "RPM" false) run_cpack_test(INSTALL_SCRIPTS "RPM" false) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7003a60557e828f08ee893c5da78b24423b5223 commit f7003a60557e828f08ee893c5da78b24423b5223 Author: Harry Mallon
Re: [CMake] Debug vs Release "install" area
Just for the archives.. if and when anyone has the same (or a similar) problem this, solved it for me.. INSTALL( CODE " MESSAGE( STATUS \"Making a \${CMAKE_INSTALL_CONFIG_NAME} install area\" ) IF(\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\") SET( CMAKE_INSTALL_PREFIX \${CMAKE_INSTALL_PREFIX}.debug ) ENDIF() MESSAGE( STATUS \"Installing to \${CMAKE_INSTALL_PREFIX}\" ) ") The Regex I used, came directly from code that was generated into the cmake_install.cmake file by install(FILES foo.txt DESTINATION . CONFIGURATIONS Debug ) Do I figured it was the best way to do it Scott -Original Message- From: Scott Aron Bloom Sent: Saturday, May 14, 2016 10:41 AM To: 'J Decker'; Roman Wüger Cc: cmake@cmake.org Subject: RE: [CMake] Debug vs Release "install" area I was able to use the ${BUILD_TYPE} and the ${CMAKE_INSTALL_CONFIG_NAME} using a INSTALL( CODE Call. Thanks for all the help Scott -Original Message- From: J Decker [mailto:d3c...@gmail.com] Sent: Friday, May 13, 2016 6:52 PM To: Roman Wüger Cc: Scott Aron Bloom; cmake@cmake.org Subject: Re: [CMake] Debug vs Release "install" area there is also BUILD_TYPE (not CMAKE_BUILD_TYPE, which is the initial condition) that often gets translated into. BUILD_TYPE seems to get set to the current building configuration. http://cmake.limitpoint.com/installing-multiple-build-types-in-cmake-generated-visual-studio-projects-2/ https://cmake.org/pipermail/cmake/2011-June/044851.html if(SUPPORTS_PARALLEL_BUILD_TYPE) >>> >>> CMAKE_INSTALL_CONFIG_NAME is set to the current configuration name >>> (DEbug, release, minsizerel) as chosen in the visual studio >>> environment so to choose which you build - you choose which you >>> build. >>> >>> It doesn't package multiple configurations at once into a single >>> NSIS, but it will package any single configuration. On Fri, May 13, 2016 at 1:43 PM, Roman Wügerwrote: > You could use conditional generator expressions e.g $ with a > combination of add_custom_command stuff like "${CMAKE_COMMAND} -P > yourscript.cmake " to handle the rest. > > Best Regards > Roman > > Am 12.05.2016 um 22:07 schrieb Scott Aron Bloom : > > Looking for some advice. > > > > In order to make our Visual Studio debugging environment, as > self-contained (and easy to use for the developers) as possible, we > use developers must run an install. We also use the resulting release > based Install for our packaging into our installer. > > > > We change the prefix variable CMAKE_INSTALL_PREFIX, to > ${CMAKE_BINARY_DIR}/Install, as well as having a each application call > a function that places a .user.vcxproj that sets the PATH appropriately. > > > > It really works great, except there is one caveat. VC++ has libraries > that are debug vs release dependent, so if your debug build happens to > pick up a release DLL (or vice versa) you can (will) be in trouble in random > ways. > > > > Typically, when I change over, I simply delete the install, and re-install. > > > > Ideally, I would like to know is there any way to set the > CMAKE_INSTALL_PREFIX variable separately for debug vs release? If so how? > > > > A second option, which I thought of… > > > > Is to generate a file “DEBUG.BUILD.TXT” and then at the START of the > installation process, run a script for debug builds, that says if the > file doesn’t exist, delete everything and carry on. If running for a > release install, if it DOES exist delete and carry on. > > > > > > Any thoughts on this? > > Thanks > > > Scott > > > > > > -- > > 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 > > > -- > > 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 -- Powered by
Re: [CMake] Debug vs Release "install" area
I was able to use the ${BUILD_TYPE} and the ${CMAKE_INSTALL_CONFIG_NAME} using a INSTALL( CODE Call. Thanks for all the help Scott -Original Message- From: J Decker [mailto:d3c...@gmail.com] Sent: Friday, May 13, 2016 6:52 PM To: Roman Wüger Cc: Scott Aron Bloom; cmake@cmake.org Subject: Re: [CMake] Debug vs Release "install" area there is also BUILD_TYPE (not CMAKE_BUILD_TYPE, which is the initial condition) that often gets translated into. BUILD_TYPE seems to get set to the current building configuration. http://cmake.limitpoint.com/installing-multiple-build-types-in-cmake-generated-visual-studio-projects-2/ https://cmake.org/pipermail/cmake/2011-June/044851.html if(SUPPORTS_PARALLEL_BUILD_TYPE) >>> >>> CMAKE_INSTALL_CONFIG_NAME is set to the current configuration name >>> (DEbug, release, minsizerel) as chosen in the visual studio >>> environment so to choose which you build - you choose which you >>> build. >>> >>> It doesn't package multiple configurations at once into a single >>> NSIS, but it will package any single configuration. On Fri, May 13, 2016 at 1:43 PM, Roman Wügerwrote: > You could use conditional generator expressions e.g $ with a > combination of add_custom_command stuff like "${CMAKE_COMMAND} -P > yourscript.cmake " to handle the rest. > > Best Regards > Roman > > Am 12.05.2016 um 22:07 schrieb Scott Aron Bloom : > > Looking for some advice. > > > > In order to make our Visual Studio debugging environment, as > self-contained (and easy to use for the developers) as possible, we > use developers must run an install. We also use the resulting release > based Install for our packaging into our installer. > > > > We change the prefix variable CMAKE_INSTALL_PREFIX, to > ${CMAKE_BINARY_DIR}/Install, as well as having a each application call > a function that places a .user.vcxproj that sets the PATH appropriately. > > > > It really works great, except there is one caveat. VC++ has libraries > that are debug vs release dependent, so if your debug build happens to > pick up a release DLL (or vice versa) you can (will) be in trouble in random > ways. > > > > Typically, when I change over, I simply delete the install, and re-install. > > > > Ideally, I would like to know is there any way to set the > CMAKE_INSTALL_PREFIX variable separately for debug vs release? If so how? > > > > A second option, which I thought of… > > > > Is to generate a file “DEBUG.BUILD.TXT” and then at the START of the > installation process, run a script for debug builds, that says if the > file doesn’t exist, delete everything and carry on. If running for a > release install, if it DOES exist delete and carry on. > > > > > > Any thoughts on this? > > Thanks > > > Scott > > > > > > -- > > 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 > > > -- > > 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 -- 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
Re: [CMake] in source makefile / helper script that enables building out of source?
On 11-May-16 16:58, Steve Lorimer wrote: I've recently changed over from using boost-build (http://www.boost.org/build/) to cmake. Boost build builds in-source. I've become quite used to building and searching etc from the source root ~/src $ b2 module ~/src $ git grep foo This work flow has been broken because I'm not using out of source builds ~/src/build $ make module ~/src/build $ git grep... dang it! ~/src/build $ cd .. ~/src $ git grep foo ~/src $ make modu... dang it! ~/src $ cd build ~/src/build $ make module I can't be the only one who wants to have the benefit of out of source builds and be able to build from in-source. Will `-C` help? ~/src $ make -C build module or in cross-platform fashion: ~/src $ cmake --build build ~/src $ cmake --build build --target foo --config Debug Ruslo I imagine it would be relatively simple to create a makefile which navigates to a known build directory (eg: build or debug or...), executes make there, and then changes directory back to where it was called from. Before I do just this, I thought it better to try leverage the open source community - hence asking the question. Does anyone have a script or makefile which does just this? TIA Steve -- 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
[Cmake-commits] CMake branch, next, updated. v3.5.2-1401-gbcab2b3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via bcab2b312b0033fb1c0aab3ca67f642d8668582b (commit) via 4129bf0188c4e97c6239919d7eb08d5deeba6d2a (commit) from 238b58f12eaf04539a5e5d23aea474dfe3259b77 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bcab2b312b0033fb1c0aab3ca67f642d8668582b commit bcab2b312b0033fb1c0aab3ca67f642d8668582b Merge: 238b58f 4129bf0 Author: Rolf Eike BeerAuthorDate: Sat May 14 03:31:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat May 14 03:31:21 2016 -0400 Merge topic 'findpkgconfig-target' into next 4129bf01 FindPkgConfig target: remove accidentially introduced REQUIRED from test https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4129bf0188c4e97c6239919d7eb08d5deeba6d2a commit 4129bf0188c4e97c6239919d7eb08d5deeba6d2a Author: Rolf Eike Beer AuthorDate: Sat May 14 09:31:00 2016 +0200 Commit: Rolf Eike Beer CommitDate: Sat May 14 09:31:00 2016 +0200 FindPkgConfig target: remove accidentially introduced REQUIRED from test diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake index 134648f..00cbb7b 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) project(FindPkgConfig_IMPORTED_TARGET C) find_package(PkgConfig REQUIRED) -pkg_check_modules(NCURSES IMPORTED_TARGET QUIET REQUIRED ncurses) +pkg_check_modules(NCURSES IMPORTED_TARGET QUIET ncurses) if (NCURSES_FOUND) set(tgt PkgConfig::NCURSES) --- Summary of changes: Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v3.5.2-1404-g35e272d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 35e272d8abbedcaa2ea60db978fcb4b458d14777 (commit) via df97b9793fac50a3ec533f26b05dea7d745b080c (commit) via b952336902e9206ba51e1d77b8e489bdd759f73f (commit) from bcab2b312b0033fb1c0aab3ca67f642d8668582b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35e272d8abbedcaa2ea60db978fcb4b458d14777 commit 35e272d8abbedcaa2ea60db978fcb4b458d14777 Merge: bcab2b3 df97b97 Author: Rolf Eike BeerAuthorDate: Sat May 14 03:31:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat May 14 03:31:52 2016 -0400 Merge topic 'findpkgconfig-target' into next df97b979 FindPkgConfig: optionally create imported target for the found libraries b9523369 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df97b9793fac50a3ec533f26b05dea7d745b080c commit df97b9793fac50a3ec533f26b05dea7d745b080c Author: Rolf Eike Beer AuthorDate: Wed May 11 23:45:26 2016 +0200 Commit: Rolf Eike Beer CommitDate: Sat May 14 09:31:41 2016 +0200 FindPkgConfig: optionally create imported target for the found libraries diff --git a/Help/release/dev/FindPkgConfig-targets.rst b/Help/release/dev/FindPkgConfig-targets.rst new file mode 100644 index 000..b18cb7b --- /dev/null +++ b/Help/release/dev/FindPkgConfig-targets.rst @@ -0,0 +1,5 @@ +FindPkgConfig-targets +- + +* The :module:`FindPkgConfig` module learned to optionally create imported + targets for the libraries it has found. diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 447c526..644687c 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -16,6 +16,7 @@ # Copyright 2006-2014 Kitware, Inc. # Copyright 2014 Christoph Grüninger # Copyright 2006 Enrico Scholz +# Copyright 2016 Rolf Eike Beer # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -119,11 +120,12 @@ macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp) endmacro() # Splits given arguments into options and a package list -macro(_pkgconfig_parse_options _result _is_req _is_silent _no_cmake_path _no_cmake_environment_path) +macro(_pkgconfig_parse_options _result _is_req _is_silent _no_cmake_path _no_cmake_environment_path _imp_target) set(${_is_req} 0) set(${_is_silent} 0) set(${_no_cmake_path} 0) set(${_no_cmake_environment_path} 0) + set(${_imp_target} 0) if(DEFINED PKG_CONFIG_USE_CMAKE_PREFIX_PATH) if(NOT PKG_CONFIG_USE_CMAKE_PREFIX_PATH) set(${_no_cmake_path} 1) @@ -147,6 +149,9 @@ macro(_pkgconfig_parse_options _result _is_req _is_silent _no_cmake_path _no_cma if (_pkg STREQUAL "NO_CMAKE_ENVIRONMENT_PATH") set(${_no_cmake_environment_path} 1) endif() +if (_pkg STREQUAL "IMPORTED_TARGET") + set(${_imp_target} 1) +endif() endforeach() set(${_result} ${ARGN}) @@ -154,6 +159,7 @@ macro(_pkgconfig_parse_options _result _is_req _is_silent _no_cmake_path _no_cma list(REMOVE_ITEM ${_result} "QUIET") list(REMOVE_ITEM ${_result} "NO_CMAKE_PATH") list(REMOVE_ITEM ${_result} "NO_CMAKE_ENVIRONMENT_PATH") + list(REMOVE_ITEM ${_result} "IMPORTED_TARGET") endmacro() # Add the content of a variable or an environment variable to a list of @@ -181,8 +187,63 @@ function(_pkgconfig_add_extra_path _extra_paths_var _var) set(${_extra_paths_var} ${${_extra_paths_var}} PARENT_SCOPE) endfunction() +# scan the LDFLAGS returned by pkg-config for library directories and +# libraries, figure out the absolute paths of that libraries in the +# given directories, and create an imported target from them +function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_path) + unset(_libs) + unset(_find_opts) + + # set the options that are used as long as the .pc file does not provide a library + # path to look into + if(_no_cmake_path) +set(_find_opts "NO_CMAKE_PATH") + endif() + if(_no_cmake_environment_path) +set(_find_opts "${_find_opts} NO_CMAKE_ENVIRONMENT_PATH") + endif() + + foreach (flag IN LISTS ${_prefix}_LDFLAGS) +if (flag MATCHES "^-L(.*)") + # only look into the given paths from now on + set(_find_opts "HINTS ${${CMAKE_MATCH_1}} NO_DEFAULT_PATH") + continue() +endif() +if (flag MATCHES "^-l(.*)") + set(_pkg_search "${CMAKE_MATCH_1}") +