[Cmake-commits] CMake branch, master, updated. v3.12.0-rc1-72-g03fc200
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 03fc2000c9e1bf81ee2fa883cdbf6a01fb4ef14d (commit) from 3f7cf0389c942cb4267b4e68d6b38495c8222649 (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=03fc2000c9e1bf81ee2fa883cdbf6a01fb4ef14d commit 03fc2000c9e1bf81ee2fa883cdbf6a01fb4ef14d Author: Kitware Robot AuthorDate: Thu Jun 21 00:01:08 2018 -0400 Commit: Kitware Robot CommitDate: Thu Jun 21 00:01:08 2018 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 42188bd..19aa2b0 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 12) -set(CMake_VERSION_PATCH 20180620) +set(CMake_VERSION_PATCH 20180621) #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 https://cmake.org/mailman/listinfo/cmake-commits
Re: [CMake] target_sources and multiple subdirs
On Thu, Jun 21, 2018 at 2:47 AM, Michael Jackson < mike.jack...@bluequartz.net> wrote: > I have a project where we have a bunch of plugins that are compiled. We > are currently wrapping with Pybind11 to access those libraries from Python. > The issue on windows is that we get a multiple DLL load error and our > thought was to create 1 enormous python module library (Not sure if this is > the right idea or not….) > > > > So my question has to do with how to add files to a target that might > initially get created about 3 subdirs down from the top level > CMakeLists.txt file but each time cmake runs through a CMake file that > would configure a plugin can we just keep adding files to the python module > target through the use of target_sources() command. Not sure how that works > or if that idea would work. > > > > Thoughts or pointers would be very much welcome. > > > You should be able to use target_sources() to do that, although I'd recommend you create the target higher up rather than burying it deeper down in the subdirs. It would seem more logical to create the target at the point above where all the subdirs that add sources are. Maybe have a read of the following article for a more detailed discussion of using target_sources() in this way: https://crascit.com/2016/01/31/enhanced-source-file-handling-with-target_sources/ -- Craig Scott Melbourne, Australia https://crascit.com -- 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] [cmake-developers] Performance profiling for CMake scripts?
I've used the following a few times recently to get a sense of hotspots: https://gist.github.com/ihnorton/05f1dea38e596e75ba106855d490e66a On Wed, Jun 20, 2018 at 10:17 AM Robert Dailey wrote: > I set my minimum required version to 3.6, which should enable those > policies by default (if they're truly in 3.1 as you indicated). > > My CMake scripts do a lot of work to build a "tree" of properties > connecting targets, so that I can recurse the targets my system > generates to process things. CMake does not natively offer the ability > to recurse targets created AFAIK. I suspect a lot of this logic is > what is causing the slow down, but at this point I have no tooling to > help me prove that. > > I have included the developer list, maybe the CMake developers have > some insight for me as this doesn't seem to be a common user issue > from what I can tell. > > On Wed, Jun 20, 2018 at 7:39 AM, Robert Maynard > wrote: > > I am not aware of any built in functionality that can generate > > performance numbers for a project. > > > > Have you made sure that the performance/parsing policies are set to > > NEW or your cmake_minimum_required is sufficiently high, those can > > have a significant improvement on configuration time. > > > > Polices ( both in CMake 3.1 ) > > - CMP0054 'if parsing' > > - CMP0053 'simplified variable reference and escape parsing' > > > > On Tue, Jun 19, 2018 at 2:12 PM Robert Dailey > wrote: > >> > >> So I noticed over the years my CMake scripts take longer and longer to > >> configure/generate. Is there a mechanism to tell which parts of my > >> CMake scripts are slowest? I'd like to know how to optimize my CMake > >> scripts to reduce the time it takes to generate projects. > >> -- > >> > >> 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-developers > -- 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-developers] [CMake] Performance profiling for CMake scripts?
I've used the following a few times recently to get a sense of hotspots: https://gist.github.com/ihnorton/05f1dea38e596e75ba106855d490e66a On Wed, Jun 20, 2018 at 10:17 AM Robert Dailey wrote: > I set my minimum required version to 3.6, which should enable those > policies by default (if they're truly in 3.1 as you indicated). > > My CMake scripts do a lot of work to build a "tree" of properties > connecting targets, so that I can recurse the targets my system > generates to process things. CMake does not natively offer the ability > to recurse targets created AFAIK. I suspect a lot of this logic is > what is causing the slow down, but at this point I have no tooling to > help me prove that. > > I have included the developer list, maybe the CMake developers have > some insight for me as this doesn't seem to be a common user issue > from what I can tell. > > On Wed, Jun 20, 2018 at 7:39 AM, Robert Maynard > wrote: > > I am not aware of any built in functionality that can generate > > performance numbers for a project. > > > > Have you made sure that the performance/parsing policies are set to > > NEW or your cmake_minimum_required is sufficiently high, those can > > have a significant improvement on configuration time. > > > > Polices ( both in CMake 3.1 ) > > - CMP0054 'if parsing' > > - CMP0053 'simplified variable reference and escape parsing' > > > > On Tue, Jun 19, 2018 at 2:12 PM Robert Dailey > wrote: > >> > >> So I noticed over the years my CMake scripts take longer and longer to > >> configure/generate. Is there a mechanism to tell which parts of my > >> CMake scripts are slowest? I'd like to know how to optimize my CMake > >> scripts to reduce the time it takes to generate projects. > >> -- > >> > >> 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-developers > -- 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-developers
[CMake] target_sources and multiple subdirs
I have a project where we have a bunch of plugins that are compiled. We are currently wrapping with Pybind11 to access those libraries from Python. The issue on windows is that we get a multiple DLL load error and our thought was to create 1 enormous python module library (Not sure if this is the right idea or not….) So my question has to do with how to add files to a target that might initially get created about 3 subdirs down from the top level CMakeLists.txt file but each time cmake runs through a CMake file that would configure a plugin can we just keep adding files to the python module target through the use of target_sources() command. Not sure how that works or if that idea would work. Thoughts or pointers would be very much welcome. -- Michael Jackson | Owner, President BlueQuartz Software [e] mike.jack...@bluequartz.net [w] www.bluequartz.net -- 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] Performance profiling for CMake scripts?
I set my minimum required version to 3.6, which should enable those policies by default (if they're truly in 3.1 as you indicated). My CMake scripts do a lot of work to build a "tree" of properties connecting targets, so that I can recurse the targets my system generates to process things. CMake does not natively offer the ability to recurse targets created AFAIK. I suspect a lot of this logic is what is causing the slow down, but at this point I have no tooling to help me prove that. I have included the developer list, maybe the CMake developers have some insight for me as this doesn't seem to be a common user issue from what I can tell. On Wed, Jun 20, 2018 at 7:39 AM, Robert Maynard wrote: > I am not aware of any built in functionality that can generate > performance numbers for a project. > > Have you made sure that the performance/parsing policies are set to > NEW or your cmake_minimum_required is sufficiently high, those can > have a significant improvement on configuration time. > > Polices ( both in CMake 3.1 ) > - CMP0054 'if parsing' > - CMP0053 'simplified variable reference and escape parsing' > > On Tue, Jun 19, 2018 at 2:12 PM Robert Dailey > wrote: >> >> So I noticed over the years my CMake scripts take longer and longer to >> configure/generate. Is there a mechanism to tell which parts of my >> CMake scripts are slowest? I'd like to know how to optimize my CMake >> scripts to reduce the time it takes to generate projects. >> -- >> >> 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-developers] [CMake] Performance profiling for CMake scripts?
I set my minimum required version to 3.6, which should enable those policies by default (if they're truly in 3.1 as you indicated). My CMake scripts do a lot of work to build a "tree" of properties connecting targets, so that I can recurse the targets my system generates to process things. CMake does not natively offer the ability to recurse targets created AFAIK. I suspect a lot of this logic is what is causing the slow down, but at this point I have no tooling to help me prove that. I have included the developer list, maybe the CMake developers have some insight for me as this doesn't seem to be a common user issue from what I can tell. On Wed, Jun 20, 2018 at 7:39 AM, Robert Maynard wrote: > I am not aware of any built in functionality that can generate > performance numbers for a project. > > Have you made sure that the performance/parsing policies are set to > NEW or your cmake_minimum_required is sufficiently high, those can > have a significant improvement on configuration time. > > Polices ( both in CMake 3.1 ) > - CMP0054 'if parsing' > - CMP0053 'simplified variable reference and escape parsing' > > On Tue, Jun 19, 2018 at 2:12 PM Robert Dailey > wrote: >> >> So I noticed over the years my CMake scripts take longer and longer to >> configure/generate. Is there a mechanism to tell which parts of my >> CMake scripts are slowest? I'd like to know how to optimize my CMake >> scripts to reduce the time it takes to generate projects. >> -- >> >> 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-developers
[Cmake-commits] CMake branch, release, updated. v3.12.0-rc1-13-gecbaed7
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, release has been updated via ecbaed7ad6483f9a679855def48a70f1c1a43077 (commit) via 735529f505b5200295d50b3378092f5f3b5b5606 (commit) via 543b6826eefe2df5af824186c38cae5f1cdf4146 (commit) via 4d3a3d74591a294a233dedb4e0bd914d1afb595d (commit) via a7074007a7e739a788a3b7abc691fae8f7cf40aa (commit) via ca6920689300249f67c4914cef521963c72a0d3f (commit) via 71fa78ff7af90c8384f1697ea1d0c2df0e0877c9 (commit) via 057ecb8f6fe8178d8d50fc9dbf04d1d6027ddc42 (commit) via 985d3a162ca7edcb26f35a06ca4754179335c7d3 (commit) from a044006a3241c5606f61a0a5037fad244533db31 (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 - --- Summary of changes: Source/Checks/cm_cxx_features.cmake| 2 ++ Source/cmGlobalXCodeGenerator.cxx | 33 +++-- Source/cmGlobalXCodeGenerator.h| 4 +++- Source/cmVS10CudaFlagTable.h | 3 +++ Source/cmVisualStudio10TargetGenerator.cxx | 1 + Tests/BuildDepends/Project/CMakeLists.txt | 34 +++--- Tests/CMakeLists.txt | 4 Tests/RunCMake/RunCMake.cmake | 1 + 8 files changed, 53 insertions(+), 29 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v3.12.0-rc1-71-g3f7cf03
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 3f7cf0389c942cb4267b4e68d6b38495c8222649 (commit) via 6a55c8c6033144c1794fc828b0d09414000c0c6d (commit) via d1a37c25f5f30ba19a462af0cd0dde1a2a43983b (commit) via ecbaed7ad6483f9a679855def48a70f1c1a43077 (commit) via 735529f505b5200295d50b3378092f5f3b5b5606 (commit) via 543b6826eefe2df5af824186c38cae5f1cdf4146 (commit) via 4d3a3d74591a294a233dedb4e0bd914d1afb595d (commit) via a7074007a7e739a788a3b7abc691fae8f7cf40aa (commit) from e11f660ae1b31f730212af43e1094f8dc3d42ef8 (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=3f7cf0389c942cb4267b4e68d6b38495c8222649 commit 3f7cf0389c942cb4267b4e68d6b38495c8222649 Merge: 6a55c8c ecbaed7 Author: Brad King AuthorDate: Wed Jun 20 09:48:11 2018 -0400 Commit: Brad King CommitDate: Wed Jun 20 09:48:11 2018 -0400 Merge branch 'release-3.12' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a55c8c6033144c1794fc828b0d09414000c0c6d commit 6a55c8c6033144c1794fc828b0d09414000c0c6d Merge: d1a37c2 543b682 Author: Brad King AuthorDate: Wed Jun 20 13:46:36 2018 + Commit: Kitware Robot CommitDate: Wed Jun 20 09:46:58 2018 -0400 Merge topic 'vs-cuda-no-host-includes' 543b6826ee VS: Avoid duplication of CUDA include directories Acked-by: Kitware Robot Merge-request: !2158 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1a37c25f5f30ba19a462af0cd0dde1a2a43983b commit d1a37c25f5f30ba19a462af0cd0dde1a2a43983b Merge: e11f660 4d3a3d7 Author: Brad King AuthorDate: Wed Jun 20 13:46:23 2018 + Commit: Kitware Robot CommitDate: Wed Jun 20 09:46:29 2018 -0400 Merge topic 'vs-cuda-maxrregcount' 4d3a3d7459 VS: Add CUDA flag table entry for -maxrregcount Acked-by: Kitware Robot Merge-request: !2156 --- Summary of changes: Source/cmVS10CudaFlagTable.h | 3 +++ Source/cmVisualStudio10TargetGenerator.cxx | 1 + 2 files changed, 4 insertions(+) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v3.12.0-rc1-63-ge11f660
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 e11f660ae1b31f730212af43e1094f8dc3d42ef8 (commit) via ca6920689300249f67c4914cef521963c72a0d3f (commit) via 71fa78ff7af90c8384f1697ea1d0c2df0e0877c9 (commit) via 057ecb8f6fe8178d8d50fc9dbf04d1d6027ddc42 (commit) via 985d3a162ca7edcb26f35a06ca4754179335c7d3 (commit) from 20f042374730b2e1ee756c3b5939b63d6769cac3 (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=e11f660ae1b31f730212af43e1094f8dc3d42ef8 commit e11f660ae1b31f730212af43e1094f8dc3d42ef8 Merge: 20f0423 ca69206 Author: Brad King AuthorDate: Wed Jun 20 13:42:16 2018 + Commit: Kitware Robot CommitDate: Wed Jun 20 09:42:25 2018 -0400 Merge topic 'xcode-10-legacy-build-system' ca69206893 Tests: Do not use i386 architecture with Xcode 10 and above 71fa78ff7a Tests: Teach RunCMake to ignore Xcode missing file type warnings 057ecb8f6f C++ feature checks: Ignore Xcode warnings 985d3a162c Xcode: Use legacy build system Acked-by: Kitware Robot Merge-request: !2151 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca6920689300249f67c4914cef521963c72a0d3f commit ca6920689300249f67c4914cef521963c72a0d3f Author: Brad King AuthorDate: Tue Jun 19 11:12:50 2018 -0400 Commit: Brad King CommitDate: Tue Jun 19 11:14:43 2018 -0400 Tests: Do not use i386 architecture with Xcode 10 and above Xcode 10 dropped support for i386 builds. diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt index 3aa57fc..127b365 100644 --- a/Tests/BuildDepends/Project/CMakeLists.txt +++ b/Tests/BuildDepends/Project/CMakeLists.txt @@ -1,30 +1,30 @@ cmake_minimum_required(VERSION 2.6) project(testRebuild) -function(test_for_xcode4 result_var) - set(${result_var} 0 PARENT_SCOPE) - if(APPLE) -execute_process(COMMAND xcodebuild -version - OUTPUT_VARIABLE ov RESULT_VARIABLE rv +if(APPLE) + set(CMake_TEST_XCODE_VERSION 0) + if(XCODE_VERSION) +set(CMake_TEST_XCODE_VERSION "${XCODE_VERSION}") + else() +execute_process( + COMMAND xcodebuild -version + OUTPUT_VARIABLE _version ERROR_VARIABLE _version ) -if("${rv}" STREQUAL "0" AND ov MATCHES "^Xcode ([0-9]+)\\.") - if(NOT CMAKE_MATCH_1 VERSION_LESS 4) -set(${result_var} 1 PARENT_SCOPE) - endif() +if(_version MATCHES "^Xcode ([0-9]+(\\.[0-9]+)*)") + set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}") endif() endif() -endfunction() - -if(APPLE) # only use multi-arch if the sysroot exists on this machine # Ninja needs -M which could not be used with multiple -arch flags if(EXISTS "${CMAKE_OSX_SYSROOT}" AND NOT "${CMAKE_GENERATOR}" MATCHES "Ninja") -set(CMAKE_OSX_ARCHITECTURES "ppc;i386") -test_for_xcode4(is_xcode4) -if(is_xcode4) - # Xcode 4, use modern architectures as defaults - # Arch 'ppc' no longer works: tools no longer available starting with Xcode 4 +if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 10) + # Arch 'i386' no longer works in Xcode 10. + set(CMAKE_OSX_ARCHITECTURES x86_64) +elseif(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 4) + # Arch 'ppc' no longer works in Xcode 4. set(CMAKE_OSX_ARCHITECTURES i386 x86_64) +else() + set(CMAKE_OSX_ARCHITECTURES ppc i386) endif() endif() endif() diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 886e392..b8b724e 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -252,6 +252,10 @@ if(BUILD_TESTING) set(CMake_TEST_XCODE_VERSION "${CMAKE_MATCH_1}") endif() endif() +if(NOT CMake_TEST_XCODE_VERSION VERSION_LESS 10) + # Since Xcode 10 we do not have two supported architectures for the host. + set(CTEST_TEST_OSX_ARCH 0) +endif() if(CMAKE_OSX_SYSROOT) execute_process( COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version ProductName https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71fa78ff7af90c8384f1697ea1d0c2df0e0877c9 commit 71fa78ff7af90c8384f1697ea1d0c2df0e0877c9 Author: Brad King AuthorDate: Mon Jun 18 10:31:42 2018 -0400 Commit: Brad King CommitDate: Tue Jun 19 10:56:50 2018 -0400 Tests: Teach RunCMake to ignore Xcode missing file type warnings Xcode 10 beta warns xcodebuild... warning: file type '::com.apple.instruments.instrdst' is based on missing file type 'default::com.apple.package' Teach RunCMake to drop such lines before matching against expected output. diff --git
[CMake] FindBoost with MSVC and LLVM Toolset
Hello! I got a problem while trying to use CMake 3.11.3 to configure a project that uses Boost.Exception library and LLVM-vs2014 toolset with MSVS 2017 v15.7.4. I configure the project using cmake-gui. I select the Visual Studio 15 2017 generator and set optional toolset option to LLVM-vs2014. I have LLVM 6.0 x64 installed. CMakeLists.txt: # Boost settings if (WIN32) # According to documentation: # # On Visual Studio and Borland compilers Boost headers request automatically # linking to corresponding libraries. This requires matching libraries to be # linked explicitly or available in the link library search path. In this case # setting Boost_USE_STATIC_LIBS to OFF may not achieve dynamic linking. Boost # automatic linking typically requests static libraries with a few exceptions # (such as Boost.Python). # # That's why for static libraries it is required to explicitly enable static # libraries usage. set (Boost_USE_STATIC_LIBS ON) endif (WIN32) find_package (Boost 1.38.0 REQUIRED COMPONENTS exception) Error message: CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindBoost.cmake:2044 (message): Unable to find the requested Boost libraries. Boost version: 1.67.0 Boost include path: W:/boost/1.67.0 Could not find the following static Boost libraries: boost_exception No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. Call Stack (most recent call first): ... I performed a little investigation. It seems that FindBoost module the is distributed with CMake does not support using an alternative toolset with MSVS generator. The function _Boost_GUESS_COMPILER_PREFIX (line 451) checks Intel, MSVC, Borland and MinGW compilers (and general UNIX case). The thing is that CMAKE_CXX_COMPILER_ID for the LLVM-v140 toolset is Clang. As a result, an empty Boost compiler prefix is returned by the function. I managed to workaround the issue by adding the following check before the other checks performed by the _Boost_GUESS_COMPILER_PREFIX function: if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang") if("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "LLVM-vs2010") set(_boost_COMPILER "-vc100") elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "LLVM-vs2012") set(_boost_COMPILER "-vc110") elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "LLVM-vs2013") set(_boost_COMPILER "-vc120") elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "LLVM-vs2014") set(_boost_COMPILER "-vc141;-vc140") endif() else I am not sure that this is the right solution in general, but it has resolved the issue that I had. What is the correct solution for the problem. Best regards, Innokentiy Alaytsev -- 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] Performance profiling for CMake scripts?
I am not aware of any built in functionality that can generate performance numbers for a project. Have you made sure that the performance/parsing policies are set to NEW or your cmake_minimum_required is sufficiently high, those can have a significant improvement on configuration time. Polices ( both in CMake 3.1 ) - CMP0054 'if parsing' - CMP0053 'simplified variable reference and escape parsing' On Tue, Jun 19, 2018 at 2:12 PM Robert Dailey wrote: > > So I noticed over the years my CMake scripts take longer and longer to > configure/generate. Is there a mechanism to tell which parts of my > CMake scripts are slowest? I'd like to know how to optimize my CMake > scripts to reduce the time it takes to generate projects. > -- > > 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