From kwrobot at kitware.com Wed May 1 00:03:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 May 2019 00:03:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-799-gf4e2fac Message-ID: <20190501040303.9B085FAA7C@public.kitware.com> 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 f4e2face6f867601f8a73754d627a81b26cdfd60 (commit) from e138207c42f39e8cc49a7f954a75b2a8da522e6a (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=f4e2face6f867601f8a73754d627a81b26cdfd60 commit f4e2face6f867601f8a73754d627a81b26cdfd60 Author: Kitware Robot AuthorDate: Wed May 1 00:01:05 2019 -0400 Commit: Kitware Robot CommitDate: Wed May 1 00:01:05 2019 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a7e8ee1..dd166e0 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 14) -set(CMake_VERSION_PATCH 20190430) +set(CMake_VERSION_PATCH 20190501) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed May 1 11:53:05 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 May 2019 11:53:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-801-g87120b9 Message-ID: <20190501155305.48708101311@public.kitware.com> 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 87120b9c2a1aae4671b674ad3e06cd9666d91752 (commit) via 3d3713121b55320ce8031b838ba5ca5b844f2975 (commit) from f4e2face6f867601f8a73754d627a81b26cdfd60 (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=87120b9c2a1aae4671b674ad3e06cd9666d91752 commit 87120b9c2a1aae4671b674ad3e06cd9666d91752 Merge: f4e2fac 3d37131 Author: Brad King AuthorDate: Wed May 1 15:50:23 2019 +0000 Commit: Kitware Robot CommitDate: Wed May 1 11:50:33 2019 -0400 Merge topic 'out-of-dir-linking-private-deps' 3d3713121b target_link_libraries: Fix static library private deps in other dirs Acked-by: Kitware Robot Merge-request: !3276 diff --cc Source/cmTargetLinkLibrariesCommand.cxx index 5c7b95c,ded6831..3883b52 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@@ -452,12 -449,11 +452,12 @@@ bool cmTargetLinkLibrariesCommand::Hand // STATIC library.) if (this->CurrentProcessingState == ProcessingKeywordPrivateInterface || this->CurrentProcessingState == ProcessingPlainPrivateInterface) { - if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { + if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY || + this->Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::string configLib = this->Target->GetDebugGeneratorExpressions(libRef, llt); - if (cmGeneratorExpression::IsValidTargetName(libRef) || - cmGeneratorExpression::Find(libRef) != std::string::npos) { + if (cmGeneratorExpression::IsValidTargetName(lib) || + cmGeneratorExpression::Find(lib) != std::string::npos) { configLib = "$"; } this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES", https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d3713121b55320ce8031b838ba5ca5b844f2975 commit 3d3713121b55320ce8031b838ba5ca5b844f2975 Author: Brad King AuthorDate: Tue Apr 30 13:18:47 2019 -0400 Commit: Brad King CommitDate: Tue Apr 30 13:53:10 2019 -0400 target_link_libraries: Fix static library private deps in other dirs In commit a1ad0a699b (target_link_libraries: Allow use with targets in other directories, 2018-09-07, v3.13.0-rc1~94^2) we accidentally broke the logic that adds `$` to private dependencies of static libraries in their `INTERFACE_LINK_LIBRARIES` in the case that the dependency is added from outside the directory creating the library. The check for a valid target name should apply to the original name specified by the caller and not the encoded cross-directory reference. Fixes: #19197 diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index ad33f98..ded6831 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -452,8 +452,8 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string configLib = this->Target->GetDebugGeneratorExpressions(libRef, llt); - if (cmGeneratorExpression::IsValidTargetName(libRef) || - cmGeneratorExpression::Find(libRef) != std::string::npos) { + if (cmGeneratorExpression::IsValidTargetName(lib) || + cmGeneratorExpression::Find(lib) != std::string::npos) { configLib = "$"; } this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES", diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt index 85ce1f7..5c704ac 100644 --- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt @@ -134,11 +134,15 @@ assert_property(newsignature1 LINK_LIBRARIES "depC;depB;subdirlib") #---------------------------------------------------------------------------- # Test cross-directory linking. cmake_policy(PUSH) +cmake_policy(SET CMP0022 NEW) cmake_policy(SET CMP0079 NEW) add_executable(TopDir TopDir.c) add_subdirectory(SubDirA) add_subdirectory(SubDirB) target_link_libraries(SubDirB TopDirImported) +add_subdirectory(SubDirC) +target_link_libraries(SubDirC PRIVATE SubDirC2) +target_link_libraries(TopDir SubDirC) add_library(TopDirImported IMPORTED INTERFACE) target_compile_definitions(TopDirImported INTERFACE DEF_TopDirImported) cmake_policy(POP) diff --git a/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt new file mode 100644 index 0000000..54bcc51 --- /dev/null +++ b/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(SubDirC STATIC SubDirC.c) + +add_library(SubDirC1 INTERFACE) +target_compile_definitions(SubDirC1 INTERFACE DEF_SubDirC1) + +add_library(SubDirC2 INTERFACE) +target_compile_definitions(SubDirC2 INTERFACE DEF_SubDirC2) + +target_link_libraries(SubDirC PRIVATE SubDirC1) diff --git a/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c b/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c new file mode 100644 index 0000000..c5536dc --- /dev/null +++ b/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c @@ -0,0 +1,11 @@ +#ifndef DEF_SubDirC1 +# error "DEF_SubDirC1 not defined" +#endif +#ifndef DEF_SubDirC2 +# error "DEF_SubDirC2 not defined" +#endif + +int SubDirC(void) +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_link_libraries/TopDir.c b/Tests/CMakeCommands/target_link_libraries/TopDir.c index 4706bb9..d8066e5 100644 --- a/Tests/CMakeCommands/target_link_libraries/TopDir.c +++ b/Tests/CMakeCommands/target_link_libraries/TopDir.c @@ -7,6 +7,12 @@ #ifdef DEF_TopDirImported # error "DEF_TopDirImported is defined but should not be!" #endif +#ifdef DEF_SubDirC1 +# error "DEF_SubDirC1 defined but should not be" +#endif +#ifdef DEF_SubDirC2 +# error "DEF_SubDirC2 defined but should not be" +#endif int main(void) { ----------------------------------------------------------------------- Summary of changes: Source/cmTargetLinkLibrariesCommand.cxx | 4 ++-- Tests/CMakeCommands/target_link_libraries/CMakeLists.txt | 4 ++++ .../target_link_libraries/SubDirC/CMakeLists.txt | 9 +++++++++ Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c | 11 +++++++++++ Tests/CMakeCommands/target_link_libraries/TopDir.c | 6 ++++++ 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt create mode 100644 Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c hooks/post-receive -- CMake From kwrobot at kitware.com Wed May 1 12:03:02 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 May 2019 12:03:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-808-g6dbc12d Message-ID: <20190501160302.C0014FA5B0@public.kitware.com> 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 6dbc12df684e146d15e9d5f9a68972f0a2196e10 (commit) via a1709057ef6fa557d9106bac0da54899952d5cba (commit) via 24e7554e15f12233b6e2fd294b9be4c1f8c24a06 (commit) via f06bf0fa5740a82a4205b95a5de3e2a0e4eb865a (commit) via 684338aff6cecad6e9ef32e321dd318081edb721 (commit) via c9469c78a5545b5a04ecf0f27b50500140aca5e9 (commit) via 68c8201711b93b6db224318404b14e62e04b462d (commit) from 87120b9c2a1aae4671b674ad3e06cd9666d91752 (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=6dbc12df684e146d15e9d5f9a68972f0a2196e10 commit 6dbc12df684e146d15e9d5f9a68972f0a2196e10 Merge: a170905 68c8201 Author: Brad King AuthorDate: Wed May 1 16:00:35 2019 +0000 Commit: Kitware Robot CommitDate: Wed May 1 12:02:07 2019 -0400 Merge topic 'FindPython-NumPy-fix-dependencies-management' 68c8201711 FindPython: NumPy: fix erroneous dependencies management Acked-by: Kitware Robot Merge-request: !3274 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1709057ef6fa557d9106bac0da54899952d5cba commit a1709057ef6fa557d9106bac0da54899952d5cba Merge: 24e7554 f06bf0f Author: Brad King AuthorDate: Wed May 1 16:00:26 2019 +0000 Commit: Kitware Robot CommitDate: Wed May 1 12:00:54 2019 -0400 Merge topic 'FindBoost-fix-fiber-compiler-features' f06bf0fa57 FindBoost: Fix compiler features for `fiber` and `context` 684338aff6 FindBoost: Record compiler features for Boost 1.67 and above Acked-by: Kitware Robot Merge-request: !3266 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24e7554e15f12233b6e2fd294b9be4c1f8c24a06 commit 24e7554e15f12233b6e2fd294b9be4c1f8c24a06 Merge: 87120b9 c9469c7 Author: Brad King AuthorDate: Wed May 1 11:59:52 2019 -0400 Commit: Brad King CommitDate: Wed May 1 11:59:52 2019 -0400 Merge branch 'release-3.13' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f06bf0fa5740a82a4205b95a5de3e2a0e4eb865a commit f06bf0fa5740a82a4205b95a5de3e2a0e4eb865a Author: Alex Turbov AuthorDate: Fri Apr 26 14:46:17 2019 +0800 Commit: Brad King CommitDate: Tue Apr 30 14:26:07 2019 -0400 FindBoost: Fix compiler features for `fiber` and `context` diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index cd79f24..552c2fd 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1072,6 +1072,8 @@ function(_Boost_COMPILER_FEATURES component _ret) cxx_thread_local cxx_variadic_templates ) + # Compiler feature for `context` same as for `fiber`. + set(_Boost_CONTEXT_COMPILER_FEATURES ${_Boost_FIBER_COMPILER_FEATURES}) endif() string(TOUPPER ${component} uppercomponent) set(${_ret} ${_Boost_${uppercomponent}_COMPILER_FEATURES} PARENT_SCOPE) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=684338aff6cecad6e9ef32e321dd318081edb721 commit 684338aff6cecad6e9ef32e321dd318081edb721 Author: Alex Turbov AuthorDate: Fri Apr 26 14:46:17 2019 +0800 Commit: Brad King CommitDate: Tue Apr 30 14:25:51 2019 -0400 FindBoost: Record compiler features for Boost 1.67 and above Remove the 1.67 upper-bound on compiler feature computation so that with newer versions we at least get it mostly right. Leave a comment with notes about updating features for future versions. diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index b5cc4cf..cd79f24 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1048,11 +1048,17 @@ endfunction() # Some boost libraries may require particular set of compler features. # The very first one was `boost::fiber` introduced in Boost 1.62. # One can check required compiler features of it in -# `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`. +# - `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`; +# - `${Boost_ROOT}/libs/context/build/Jamfile.v2`. +# +# TODO (Re)Check compiler features on (every?) release ??? +# One may use the following command to get the files to check: +# +# $ find . -name Jamfile.v2 | grep build | xargs grep -l cxx1 # function(_Boost_COMPILER_FEATURES component _ret) - # Boost >= 1.62 and < 1.67 - if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700) + # Boost >= 1.62 + if(NOT Boost_VERSION VERSION_LESS 106200) set(_Boost_FIBER_COMPILER_FEATURES cxx_alias_templates cxx_auto_type https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9469c78a5545b5a04ecf0f27b50500140aca5e9 commit c9469c78a5545b5a04ecf0f27b50500140aca5e9 Merge: 0c2469e 3d37131 Author: Brad King AuthorDate: Tue Apr 30 13:55:48 2019 -0400 Commit: Brad King CommitDate: Tue Apr 30 13:55:48 2019 -0400 Merge branch 'out-of-dir-linking-private-deps' into release-3.13 Merge-request: !3276 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68c8201711b93b6db224318404b14e62e04b462d commit 68c8201711b93b6db224318404b14e62e04b462d Author: Marc Chevrier AuthorDate: Tue Apr 30 10:43:34 2019 +0200 Commit: Marc Chevrier CommitDate: Tue Apr 30 16:02:18 2019 +0200 FindPython: NumPy: fix erroneous dependencies management diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 1236bf8..8f67082 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -305,9 +305,9 @@ unset (_${_PYTHON_PREFIX}_CACHED_VARS) # first step, search for the interpreter if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) if (${_PYTHON_PREFIX}_FIND_REQUIRED_Interpreter) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_EXECUTABLE) endif() set (_${_PYTHON_PREFIX}_HINTS "${${_PYTHON_PREFIX}_ROOT_DIR}" ENV ${_PYTHON_PREFIX}_ROOT_DIR) @@ -548,9 +548,9 @@ endif() # second step, search for compiler (IronPython) if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_COMPILER) if (${_PYTHON_PREFIX}_FIND_REQUIRED_Compiler) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_COMPILER) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_COMPILER) endif() # IronPython specific artifacts @@ -659,15 +659,15 @@ endif() ## Development environment is not compatible with IronPython interpreter if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND NOT ${_PYTHON_PREFIX}_INTERPRETER_ID STREQUAL "IronPython") + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_LIBRARY + ${_PYTHON_PREFIX}_LIBRARY_RELEASE + ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE + ${_PYTHON_PREFIX}_LIBRARY_DEBUG + ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG + ${_PYTHON_PREFIX}_INCLUDE_DIR) if (${_PYTHON_PREFIX}_FIND_REQUIRED_Development) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_LIBRARY ${_PYTHON_PREFIX}_INCLUDE_DIR) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_LIBRARY - ${_PYTHON_PREFIX}_LIBRARY_RELEASE - ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_RELEASE - ${_PYTHON_PREFIX}_LIBRARY_DEBUG - ${_PYTHON_PREFIX}_RUNTIME_LIBRARY_DEBUG - ${_PYTHON_PREFIX}_INCLUDE_DIR) endif() # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES @@ -1127,9 +1127,9 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS endif() if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Interpreter_FOUND) + list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) if (${_PYTHON_PREFIX}_FIND_REQUIRED_NumPy) list (APPEND _${_PYTHON_PREFIX}_REQUIRED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) - list (APPEND _${_PYTHON_PREFIX}_CACHED_VARS ${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR) endif() execute_process( COMMAND "${${_PYTHON_PREFIX}_EXECUTABLE}" -c @@ -1158,6 +1158,10 @@ if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Inte set(${_PYTHON_PREFIX}_NumPy_VERSION "${_${_PYTHON_PREFIX}_NumPy_VERSION}") endif() endif() + # final step: set NumPy founded only if Development component is founded as well + if (NOT ${_PYTHON_PREFIX}_Development_FOUND) + set(${_PYTHON_PREFIX}_NumPy_FOUND FALSE) + endif() endif() # final validation ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 14 +++++++++++--- Modules/FindPython/Support.cmake | 22 +++++++++++++--------- 2 files changed, 24 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed May 1 12:13:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 May 2019 12:13:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-812-ga6c78c0 Message-ID: <20190501161303.1792E101311@public.kitware.com> 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 a6c78c049ab01dbfee34b639364d8b1b05adeb0d (commit) via 463e20c5c6a5c23aeedbe6cf5d163592e783a6d7 (commit) via d4a79a6ab3c8c0ca8c968f4d220b2540cb1f7f30 (commit) via b947113b429b80bd6b3b14a62d2123718308e14a (commit) from 6dbc12df684e146d15e9d5f9a68972f0a2196e10 (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=a6c78c049ab01dbfee34b639364d8b1b05adeb0d commit a6c78c049ab01dbfee34b639364d8b1b05adeb0d Merge: 6dbc12d 463e20c Author: Brad King AuthorDate: Wed May 1 12:03:46 2019 -0400 Commit: Brad King CommitDate: Wed May 1 12:03:46 2019 -0400 Merge branch 'release-3.14' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed May 1 12:13:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 May 2019 12:13:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.14.3-7-g463e20c Message-ID: <20190501161303.613CD103114@public.kitware.com> 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 463e20c5c6a5c23aeedbe6cf5d163592e783a6d7 (commit) via d4a79a6ab3c8c0ca8c968f4d220b2540cb1f7f30 (commit) via f06bf0fa5740a82a4205b95a5de3e2a0e4eb865a (commit) via 684338aff6cecad6e9ef32e321dd318081edb721 (commit) via b947113b429b80bd6b3b14a62d2123718308e14a (commit) via 3d3713121b55320ce8031b838ba5ca5b844f2975 (commit) via 68c8201711b93b6db224318404b14e62e04b462d (commit) from 7700df9b1ef66761cad08cfc08344d5b27660e9f (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: Modules/FindBoost.cmake | 14 +++++++++++--- Modules/FindPython/Support.cmake | 22 +++++++++++++--------- Source/cmTargetLinkLibrariesCommand.cxx | 4 ++-- .../target_link_libraries/CMakeLists.txt | 4 ++++ .../target_link_libraries/SubDirC/CMakeLists.txt | 9 +++++++++ .../target_link_libraries/SubDirC/SubDirC.c | 11 +++++++++++ Tests/CMakeCommands/target_link_libraries/TopDir.c | 6 ++++++ 7 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt create mode 100644 Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c hooks/post-receive -- CMake From kwrobot at kitware.com Wed May 1 12:43:04 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 1 May 2019 12:43:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-819-gfb325da Message-ID: <20190501164304.47C06103114@public.kitware.com> 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 fb325daa55b1bd6aa2b2b7f2c615214378224938 (commit) via 13b73ff65f2a6107f1257bac92df94fed31c25f8 (commit) via 34d67a24058477dfb0ec69faca7847dd6b1847be (commit) via 8d45a2ffe0439187ba3873e81ebf894906745bc5 (commit) via 4d78bea5dfa53958a1317f655b1e761e457a54c7 (commit) via 0b684524ac657b03ea233e039aad5c8e43a52f2c (commit) via 01a4eec446496f52146949a959fab2f1fab6e654 (commit) from a6c78c049ab01dbfee34b639364d8b1b05adeb0d (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=fb325daa55b1bd6aa2b2b7f2c615214378224938 commit fb325daa55b1bd6aa2b2b7f2c615214378224938 Merge: 13b73ff 4d78bea Author: Brad King AuthorDate: Wed May 1 16:40:47 2019 +0000 Commit: Kitware Robot CommitDate: Wed May 1 12:42:29 2019 -0400 Merge topic 'IAR_6_x_fix' 4d78bea5df IAR: Fail early in case of IAR ARM 4.XX 0b684524ac IAR: Fix building with IAR ARM 6.X Acked-by: Kitware Robot Merge-request: !3263 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13b73ff65f2a6107f1257bac92df94fed31c25f8 commit 13b73ff65f2a6107f1257bac92df94fed31c25f8 Merge: 34d67a2 01a4eec Author: Brad King AuthorDate: Wed May 1 16:40:45 2019 +0000 Commit: Kitware Robot CommitDate: Wed May 1 12:41:30 2019 -0400 Merge topic 'iar-binutils' 01a4eec446 IAR: Changes required for Linux Acked-by: Kitware Robot Merge-request: !3262 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34d67a24058477dfb0ec69faca7847dd6b1847be commit 34d67a24058477dfb0ec69faca7847dd6b1847be Merge: a6c78c0 8d45a2f Author: Brad King AuthorDate: Wed May 1 16:39:37 2019 +0000 Commit: Kitware Robot CommitDate: Wed May 1 12:40:15 2019 -0400 Merge topic 'memorize_cxx_compilers_with_full_CXX11_support' 8d45a2ffe0 CompileFeatures: Record when compilers gained full CXX11 support Acked-by: Kitware Robot Merge-request: !3232 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d45a2ffe0439187ba3873e81ebf894906745bc5 commit 8d45a2ffe0439187ba3873e81ebf894906745bc5 Author: Robert Maynard AuthorDate: Tue Apr 16 14:11:20 2019 -0400 Commit: Robert Maynard CommitDate: Mon Apr 29 17:18:45 2019 -0400 CompileFeatures: Record when compilers gained full CXX11 support Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++11 feature support when the running compiler is known to have all features. diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index d34d494..2042360 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -28,4 +28,9 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z") endif() + +if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) + set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) +endif() + __compiler_check_default_language_standard(CXX 4.0 98) diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 34ffd66..6fb0200 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -17,9 +17,10 @@ if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") endif() if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1) + set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") - set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON) + set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1) set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x") set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x") diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index 7202607..1253291 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -17,15 +17,19 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) endif() if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) + set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") - set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON) elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) # 4.3 supports 0x variants set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x") set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x") endif() +if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8.1) + set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) +endif() + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 471dd4a..032071c 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -54,6 +54,10 @@ else() set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") endif() + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0) + set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) + endif() + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0) set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake index 691926f..787c17e 100644 --- a/Modules/Compiler/MSVC-CXX.cmake +++ b/Modules/Compiler/MSVC-CXX.cmake @@ -17,6 +17,7 @@ if ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0.24215.1 AND set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std:c++14") set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std:c++14") if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.11.25505) + set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++17") set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++17") else() @@ -30,21 +31,6 @@ if ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0.24215.1 AND __compiler_check_default_language_standard(CXX 19.0 14) - # All features that we define are available in the base mode, except - # for meta-features for C++14 and above. Override the default macro - # to avoid doing unnecessary work. - macro(cmake_record_cxx_compile_features) - if (DEFINED CMAKE_CXX20_STANDARD_COMPILE_OPTION) - list(APPEND CMAKE_CXX20_COMPILE_FEATURES cxx_std_20) - endif() - # The main cmake_record_cxx_compile_features macro makes all - # these conditional on CMAKE_CXX##_STANDARD_COMPILE_OPTION, - # but we can skip the conditions because we set them above. - list(APPEND CMAKE_CXX17_COMPILE_FEATURES cxx_std_17) - list(APPEND CMAKE_CXX14_COMPILE_FEATURES cxx_std_14) - list(APPEND CMAKE_CXX98_COMPILE_FEATURES cxx_std_11) # no flag needed for 11 - _record_compiler_features_cxx(98) - endmacro() elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) # MSVC has no specific options to set language standards, but set them as # empty strings anyways so the feature test infrastructure can at least check https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d78bea5dfa53958a1317f655b1e761e457a54c7 commit 4d78bea5dfa53958a1317f655b1e761e457a54c7 Author: Daniel Sch?rmann AuthorDate: Thu Apr 25 15:07:08 2019 +0200 Commit: Daniel Sch?rmann CommitDate: Fri Apr 26 10:15:01 2019 +0200 IAR: Fail early in case of IAR ARM 4.XX This version is not yet supported because it uses xlink unsetad of ilink. diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake index d19b502..af5874c 100644 --- a/Modules/Compiler/IAR-C.cmake +++ b/Modules/Compiler/IAR-C.cmake @@ -27,6 +27,10 @@ endif() # Architecture specific if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") + if(CMAKE_C_COMPILER_VERSION_INTERNAL VERSION_LESS 7) + # IAR ARM 4.X uses xlink.exe, detection is not yet implemented + message(FATAL_ERROR "CMAKE_C_COMPILER_VERSION = ${CMAKE_C_COMPILER_VERSION} not supported by CMake.") + endif() __compiler_iar_ilink(C) __compiler_check_default_language_standard(C 1.10 90 6.10 99 8.10 11) diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index b338de8..04ccbe5 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -34,6 +34,10 @@ endif() # Architecture specific if("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM") + if(CMAKE_CXX_COMPILER_VERSION_INTERNAL VERSION_LESS 7) + # IAR ARM 4.X uses xlink.exe, detection is not yet implemented + message(FATAL_ERROR "CMAKE_CXX_COMPILER_VERSION = ${CMAKE_C_COMPILER_VERSION} not supported by CMake.") + endif() __compiler_iar_ilink(CXX) __compiler_check_default_language_standard(CXX 6.10 98 8.10 14) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b684524ac657b03ea233e039aad5c8e43a52f2c commit 0b684524ac657b03ea233e039aad5c8e43a52f2c Author: Daniel Sch?rmann AuthorDate: Thu Apr 25 15:04:26 2019 +0200 Commit: Daniel Sch?rmann CommitDate: Thu Apr 25 15:25:16 2019 +0200 IAR: Fix building with IAR ARM 6.X Use the correct version macros and version numbers. diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake index cb10020..d19b502 100644 --- a/Modules/Compiler/IAR-C.cmake +++ b/Modules/Compiler/IAR-C.cmake @@ -10,7 +10,7 @@ endif() set(CMAKE_C_EXTENSION_COMPILE_OPTION -e) -if(CMAKE_CXX_COMPILER_VERSION_INTERNAL VERSION_GREATER 7) +if(CMAKE_C_COMPILER_VERSION_INTERNAL VERSION_GREATER 7) set(CMAKE_C90_STANDARD_COMPILE_OPTION --c89) set(CMAKE_C90_EXTENSION_COMPILE_OPTION --c89 -e) set(CMAKE_C99_STANDARD_COMPILE_OPTION "") @@ -20,7 +20,7 @@ elseif() set(CMAKE_C90_EXTENSION_COMPILE_OPTION -e) endif() -if(CMAKE_CXX_COMPILER_VERSION_INTERNAL VERSION_GREATER 8) +if(CMAKE_C_COMPILER_VERSION_INTERNAL VERSION_GREATER 8) set(CMAKE_C11_STANDARD_COMPILE_OPTION "") set(CMAKE_C11_EXTENSION_COMPILE_OPTION -e) endif() diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index eb27e3c..b338de8 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -8,7 +8,8 @@ if(NOT CMAKE_IAR_CXX_FLAG) if(NOT CMAKE_CXX_COMPILER_VERSION) message(FATAL_ERROR "CMAKE_CXX_COMPILER_VERSION not detected. This should be automatic.") endif() - if(CMAKE_CXX_COMPILER_VERSION_INTERNAL VERSION_GREATER 8) + + if(CMAKE_CXX_COMPILER_VERSION_INTERNAL VERSION_GREATER 7) set(CMAKE_IAR_CXX_FLAG --c++) else() set(CMAKE_IAR_CXX_FLAG --eec++) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01a4eec446496f52146949a959fab2f1fab6e654 commit 01a4eec446496f52146949a959fab2f1fab6e654 Author: Stefan Andersson AuthorDate: Thu Apr 25 11:28:58 2019 +0200 Commit: Stefan Andersson CommitDate: Thu Apr 25 11:28:58 2019 +0200 IAR: Changes required for Linux diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake index e8f5e6b..7fc6b59 100644 --- a/Modules/Compiler/IAR-FindBinUtils.cmake +++ b/Modules/Compiler/IAR-FindBinUtils.cmake @@ -2,7 +2,7 @@ if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set") endif() -# Try to find tools in the same directory as Clang itself +# Try to find tools in the same directory as the compiler itself get_filename_component(__iar_hint_1 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" REALPATH) get_filename_component(__iar_hint_1 "${__iar_hint_1}" DIRECTORY) @@ -12,20 +12,23 @@ set(__iar_hints "${__iar_hint_1}" "${__iar_hint_2}") if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM" OR "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX") - # could allow using normal binutils ar, since objects are normal ELF files? - find_program(CMAKE_IAR_LINKER ilink${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}.exe HINTS ${__iar_hints} + + string(TOLOWER "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" _archid_lower) + + # Find linker + find_program(CMAKE_IAR_LINKER ilink${_archid_lower} HINTS ${__iar_hints} DOC "The IAR ILINK linker") - find_program(CMAKE_IAR_ARCHIVE iarchive.exe HINTS ${__iar_hints} + find_program(CMAKE_IAR_ARCHIVE iarchive HINTS ${__iar_hints} DOC "The IAR archiver") - # find auxiliary tools - find_program(CMAKE_IAR_ELFTOOL ielftool.exe HINTS ${__iar_hints} + # Find utility tools + find_program(CMAKE_IAR_ELFTOOL ielftool HINTS ${__iar_hints} DOC "The IAR ELF Tool") - find_program(CMAKE_IAR_ELFDUMP ielfdump${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}.exe HINTS ${__iar_hints} + find_program(CMAKE_IAR_ELFDUMP ielfdump${_archid_lower} HINTS ${__iar_hints} DOC "The IAR ELF Dumper") - find_program(CMAKE_IAR_OBJMANIP iobjmanip.exe HINTS ${__iar_hints} + find_program(CMAKE_IAR_OBJMANIP iobjmanip HINTS ${__iar_hints} DOC "The IAR ELF Object Tool") - find_program(CMAKE_IAR_SYMEXPORT isymexport.exe HINTS ${__iar_hints} + find_program(CMAKE_IAR_SYMEXPORT isymexport HINTS ${__iar_hints} DOC "The IAR Absolute Symbol Exporter") mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_ARCHIVE CMAKE_IAR_ELFTOOL CMAKE_IAR_ELFDUMP CMAKE_IAR_OBJMANIP CMAKE_IAR_SYMEXPORT) @@ -41,9 +44,9 @@ set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\") elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") # For AVR and AVR32, IAR uses the "xlink" linker and the "xar" archiver: - find_program(CMAKE_IAR_LINKER xlink.exe HINTS ${__iar_hints} + find_program(CMAKE_IAR_LINKER xlink HINTS ${__iar_hints} DOC "The IAR XLINK linker") - find_program(CMAKE_IAR_AR xar.exe HINTS ${__iar_hints} + find_program(CMAKE_IAR_AR xar HINTS ${__iar_hints} DOC "The IAR archiver") mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_AR) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/AppleClang-CXX.cmake | 5 +++++ Modules/Compiler/Clang-CXX.cmake | 3 ++- Modules/Compiler/GNU-CXX.cmake | 6 +++++- Modules/Compiler/IAR-C.cmake | 8 ++++++-- Modules/Compiler/IAR-CXX.cmake | 7 ++++++- Modules/Compiler/IAR-FindBinUtils.cmake | 25 ++++++++++++++----------- Modules/Compiler/Intel-CXX.cmake | 4 ++++ Modules/Compiler/MSVC-CXX.cmake | 16 +--------------- 8 files changed, 43 insertions(+), 31 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu May 2 00:03:06 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 2 May 2019 00:03:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-820-g3ee16ef Message-ID: <20190502040306.254F310EED1@public.kitware.com> 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 3ee16ef31b78ff73d7a0c569fdb87b41f2a5e97d (commit) from fb325daa55b1bd6aa2b2b7f2c615214378224938 (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=3ee16ef31b78ff73d7a0c569fdb87b41f2a5e97d commit 3ee16ef31b78ff73d7a0c569fdb87b41f2a5e97d Author: Kitware Robot AuthorDate: Thu May 2 00:01:07 2019 -0400 Commit: Kitware Robot CommitDate: Thu May 2 00:01:07 2019 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index dd166e0..1b34ba5 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 14) -set(CMake_VERSION_PATCH 20190501) +set(CMake_VERSION_PATCH 20190502) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu May 2 09:43:06 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 2 May 2019 09:43:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-827-g3b4315d Message-ID: <20190502134306.37398107655@public.kitware.com> 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 3b4315dc23bdedb3163a0c84b9fdbae2324470c6 (commit) via 1ee21c6ec5ef783d2b960fc3e13161582cf22e10 (commit) via b7b66919a3952a3a2c31d659fcbe3bebf7e5887e (commit) via cab5471a7ba0f45273f293104f5d00d1af8284ac (commit) via 75643755a1492f3d07e811541207769341eb2b9e (commit) via 615fb2633cd6f4e7543eb172e10f32f09cad6d88 (commit) via 30c98db61be3e0079305514b98b2d3d07b6877cc (commit) from 3ee16ef31b78ff73d7a0c569fdb87b41f2a5e97d (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=3b4315dc23bdedb3163a0c84b9fdbae2324470c6 commit 3b4315dc23bdedb3163a0c84b9fdbae2324470c6 Merge: 1ee21c6 7564375 Author: Brad King AuthorDate: Thu May 2 13:41:59 2019 +0000 Commit: Kitware Robot CommitDate: Thu May 2 09:42:08 2019 -0400 Merge topic 'code-cleanup-3' 75643755a1 cmGlobalVisualStudioGenerator: remove redundant variables 615fb2633c cmGlobalVisualStudioGenerator: use cmJoin to join the filenames 30c98db61b cmGlobalVisualStudioGenerator: use auto instead of iterator types Acked-by: Kitware Robot Merge-request: !3257 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ee21c6ec5ef783d2b960fc3e13161582cf22e10 commit 1ee21c6ec5ef783d2b960fc3e13161582cf22e10 Merge: 3ee16ef b7b6691 Author: Brad King AuthorDate: Thu May 2 13:33:23 2019 +0000 Commit: Kitware Robot CommitDate: Thu May 2 09:33:33 2019 -0400 Merge topic 'fix-swiftmix-test-for-xcode-10.2' b7b66919a3 SwiftMix: properly export SwiftMain method cab5471a7b SwiftMix: Get rid of pointer types mismatch warning Acked-by: Kitware Robot Merge-request: !3279 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7b66919a3952a3a2c31d659fcbe3bebf7e5887e commit b7b66919a3952a3a2c31d659fcbe3bebf7e5887e Author: Gregor Jasny AuthorDate: Wed May 1 13:24:34 2019 +0200 Commit: Gregor Jasny CommitDate: Wed May 1 13:30:14 2019 +0200 SwiftMix: properly export SwiftMain method diff --git a/Tests/SwiftMix/CMakeLists.txt b/Tests/SwiftMix/CMakeLists.txt index 5e50470..6d8e48b 100644 --- a/Tests/SwiftMix/CMakeLists.txt +++ b/Tests/SwiftMix/CMakeLists.txt @@ -3,3 +3,4 @@ project(SwiftMix C Swift) add_executable(SwiftMix CMain.c ObjCMain.m SwiftMain.swift ObjC-Swift.h) set_property(TARGET SwiftMix PROPERTY XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER "ObjC-Swift.h") +target_compile_options(SwiftMix PRIVATE "$<$:-Werror=objc-method-access>") diff --git a/Tests/SwiftMix/SwiftMain.swift b/Tests/SwiftMix/SwiftMain.swift index a4a0a62..d9c8cd7 100644 --- a/Tests/SwiftMix/SwiftMain.swift +++ b/Tests/SwiftMix/SwiftMain.swift @@ -1,7 +1,7 @@ import Foundation @objc class SwiftMainClass : NSObject { - class func SwiftMain() -> Int32 { + @objc class func SwiftMain() -> Int32 { dump("Hello World!"); return 0; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cab5471a7ba0f45273f293104f5d00d1af8284ac commit cab5471a7ba0f45273f293104f5d00d1af8284ac Author: Gregor Jasny AuthorDate: Wed May 1 13:23:23 2019 +0200 Commit: Gregor Jasny CommitDate: Wed May 1 13:30:14 2019 +0200 SwiftMix: Get rid of pointer types mismatch warning diff --git a/Tests/SwiftMix/CMain.c b/Tests/SwiftMix/CMain.c index 8877da4..519058e 100644 --- a/Tests/SwiftMix/CMain.c +++ b/Tests/SwiftMix/CMain.c @@ -1,5 +1,5 @@ -extern int ObjCMain(int argc, char const* const argv[]); -int main(int argc, char* argv[]) +extern int ObjCMain(void); +int main(void) { - return ObjCMain(argc, argv); + return ObjCMain(); } diff --git a/Tests/SwiftMix/ObjCMain.m b/Tests/SwiftMix/ObjCMain.m index 20f0bf1..afc92438 100644 --- a/Tests/SwiftMix/ObjCMain.m +++ b/Tests/SwiftMix/ObjCMain.m @@ -1,4 +1,4 @@ #import "SwiftMix-Swift.h" -int ObjCMain(int argc, char const* const argv[]) { +int ObjCMain(void) { return [SwiftMainClass SwiftMain]; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75643755a1492f3d07e811541207769341eb2b9e commit 75643755a1492f3d07e811541207769341eb2b9e Author: Leonid Pospelov AuthorDate: Wed Apr 24 17:18:11 2019 +0300 Commit: Leonid Pospelov CommitDate: Wed Apr 24 17:18:11 2019 +0300 cmGlobalVisualStudioGenerator: remove redundant variables diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index d457cc3..cd0355f 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -203,9 +203,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() // Now make all targets depend on the ALL_BUILD target for (cmLocalGenerator const* i : gen) { - std::vector const& targets = - i->GetGeneratorTargets(); - for (cmGeneratorTarget* tgt : targets) { + for (cmGeneratorTarget* tgt : i->GetGeneratorTargets()) { if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET || tgt->IsImported()) { continue; @@ -392,11 +390,8 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() return false; } for (auto const& it : this->ProjectMap) { - std::vector const& gen = it.second; - for (const cmLocalGenerator* i : gen) { - std::vector const& targets = - i->GetGeneratorTargets(); - for (cmGeneratorTarget* ti : targets) { + for (const cmLocalGenerator* i : it.second) { + for (cmGeneratorTarget* ti : i->GetGeneratorTargets()) { this->ComputeVSTargetDepends(ti); } } @@ -448,8 +443,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( std::set linkDepends; if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { for (cmTargetDepend const& di : depends) { - cmTargetDepend dep = di; - if (dep.IsLink()) { + if (di.IsLink()) { this->FollowLinkDepends(di, linkDepends); } } @@ -458,8 +452,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // Collect explicit util dependencies (add_dependencies). std::set utilDepends; for (cmTargetDepend const& di : depends) { - cmTargetDepend dep = di; - if (dep.IsUtil()) { + if (di.IsUtil()) { this->FollowLinkDepends(di, utilDepends); } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=615fb2633cd6f4e7543eb172e10f32f09cad6d88 commit 615fb2633cd6f4e7543eb172e10f32f09cad6d88 Author: Leonid Pospelov AuthorDate: Tue Apr 23 00:54:05 2019 +0300 Commit: Leonid Pospelov CommitDate: Tue Apr 23 00:54:05 2019 +0300 cmGlobalVisualStudioGenerator: use cmJoin to join the filenames diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index aa70522..d457cc3 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -318,17 +318,7 @@ void cmGlobalVisualStudioGenerator::CallVisualStudioMacro( std::vector filenames; this->GetFilesReplacedDuringGenerate(filenames); if (!filenames.empty()) { - // Convert vector to semi-colon delimited string of filenames: - std::string projects; - std::vector::iterator it = filenames.begin(); - if (it != filenames.end()) { - projects = *it; - ++it; - } - for (; it != filenames.end(); ++it) { - projects += ";"; - projects += *it; - } + std::string projects = cmJoin(filenames, ";"); cmCallVisualStudioMacro::CallMacro( topLevelSlnName, CMAKE_VSMACROS_RELOAD_MACRONAME, projects, this->GetCMakeInstance()->GetDebugOutput()); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30c98db61be3e0079305514b98b2d3d07b6877cc commit 30c98db61be3e0079305514b98b2d3d07b6877cc Author: Leonid Pospelov AuthorDate: Tue Apr 23 00:52:33 2019 +0300 Commit: Leonid Pospelov CommitDate: Tue Apr 23 00:52:33 2019 +0300 cmGlobalVisualStudioGenerator: use auto instead of iterator types diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 39c325c..aa70522 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -368,7 +368,7 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure( cmGlobalVisualStudioGenerator::TargetSet const& cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target) { - TargetSetMap::iterator i = this->TargetLinkClosure.find(target); + auto i = this->TargetLinkClosure.find(target); if (i == this->TargetLinkClosure.end()) { TargetSetMap::value_type entry(target, TargetSet()); i = this->TargetLinkClosure.insert(entry).first; @@ -513,7 +513,7 @@ bool cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf) std::string cmGlobalVisualStudioGenerator::GetUtilityDepend( cmGeneratorTarget const* target) { - UtilityDependsMap::iterator i = this->UtilityDepends.find(target); + auto i = this->UtilityDepends.find(target); if (i == this->UtilityDepends.end()) { std::string name = this->WriteUtilityDepend(target); UtilityDependsMap::value_type entry(target, name); @@ -939,11 +939,10 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand( std::vector objs; for (cmSourceFile const* it : objectSources) { // Find the object file name corresponding to this source file. - std::map::const_iterator map_it = - mapping.find(it); // It must exist because we populated the mapping just above. - assert(!map_it->second.empty()); - std::string objFile = obj_dir + map_it->second; + const auto& v = mapping[it]; + assert(!v.empty()); + std::string objFile = obj_dir + v; objs.push_back(objFile); } std::vector externalObjectSources; ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudioGenerator.cxx | 40 +++++++++----------------------- Tests/SwiftMix/CMain.c | 6 ++--- Tests/SwiftMix/CMakeLists.txt | 1 + Tests/SwiftMix/ObjCMain.m | 2 +- Tests/SwiftMix/SwiftMain.swift | 2 +- 5 files changed, 17 insertions(+), 34 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu May 2 09:53:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 2 May 2019 09:53:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-842-gce79364 Message-ID: <20190502135303.8DAED107655@public.kitware.com> 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 ce79364581643700ab88ee4c442e0cf1736c926e (commit) via eef1dacf51ea32b98596608e6d4dab0f18b1457b (commit) via e08efc36eb17992f4bb8697b4173ede913aafab4 (commit) via 4783b842baf0e081b3385b00d696b6635eee655d (commit) via 5f5e3062cf2394f4e28e078817e074892e9c508d (commit) via 94c5fa5f7a189c1a99891bbacc6a3b291f399d7a (commit) via 101135069425a1f3af85aa7d1fedf2656d9674f0 (commit) via d9beea0ccacc8c3cdc14b71b660a73a458f09650 (commit) via 3d856eba16fae90f66dd142f91c21d4121b760d0 (commit) via 9e1df5df5479b78d65d37e58b5cd0c93d70838ae (commit) via 36f36d6a49976527a13a77d1ffff1fcdc5c3f5ba (commit) via 3f57787dffa629b7c10ca2a02229b7e1a4bfe1f9 (commit) via 20d7c5631e88d80cb683a5e120c0c1e1f077945a (commit) via abd62201bd7d10f8eb27229ac3f5e55d52d0659e (commit) via f2c8ff825995c1425a134e24eee6c4fb73c3a6b2 (commit) from 3b4315dc23bdedb3163a0c84b9fdbae2324470c6 (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=ce79364581643700ab88ee4c442e0cf1736c926e commit ce79364581643700ab88ee4c442e0cf1736c926e Merge: eef1dac 4783b84 Author: Brad King AuthorDate: Thu May 2 13:46:32 2019 +0000 Commit: Kitware Robot CommitDate: Thu May 2 09:46:39 2019 -0400 Merge topic 'ios_fixes' 4783b842ba iOS: Only set the CMAKE_FIND_ROOT_PATH_MODE_* variables when not defined 5f5e3062cf iOS: Only look for packages in the provided CMAKE_FIND_ROOT_PATHs 94c5fa5f7a iOS: Allow setting multiple CMAKE_FIND_ROOT_PATH values 1011350694 iOS: Allow specifying CMAKE_MACOSX_BUNDLE in toolchain file Acked-by: Kitware Robot Merge-request: !3273 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eef1dacf51ea32b98596608e6d4dab0f18b1457b commit eef1dacf51ea32b98596608e6d4dab0f18b1457b Merge: e08efc3 d9beea0 Author: Brad King AuthorDate: Thu May 2 13:43:52 2019 +0000 Commit: Kitware Robot CommitDate: Thu May 2 09:44:13 2019 -0400 Merge topic 'cpackrpm.debug' d9beea0cca CPackRPM: Hide CPACK_RPM_ROOTDIR debug if not CPACK_RPM_PACKAGE_DEBUG Acked-by: Kitware Robot Merge-request: !3271 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e08efc36eb17992f4bb8697b4173ede913aafab4 commit e08efc36eb17992f4bb8697b4173ede913aafab4 Merge: 3b4315d 3d856eb Author: Brad King AuthorDate: Thu May 2 13:42:59 2019 +0000 Commit: Kitware Robot CommitDate: Thu May 2 09:43:09 2019 -0400 Merge topic 'genex-code-cleanup' 3d856eba16 cmGeneratorExpressionNode: refactor TargetPropertyNode 9e1df5df54 cmGeneratorExpressionNode: use ctor arguments instead of macro 36f36d6a49 cmGeneratorExpressionNode: add VersionNode 3f57787dff cmGeneratorExpressionNode: remove structs CompilerId*, CompilerVersion* 20d7c5631e cmGeneratorExpressionNode: add CharacterNode abd62201bd cmGeneratorExpressionNode: simplify code in EqualNode f2c8ff8259 cmGeneratorExpressionNode: Simplify static string constant Acked-by: Kitware Robot Merge-request: !3234 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4783b842baf0e081b3385b00d696b6635eee655d commit 4783b842baf0e081b3385b00d696b6635eee655d Author: Alexandru Croitor AuthorDate: Tue Apr 30 19:10:08 2019 +0200 Commit: Alexandru Croitor CommitDate: Tue Apr 30 19:10:08 2019 +0200 iOS: Only set the CMAKE_FIND_ROOT_PATH_MODE_* variables when not defined This allows overriding them in a toolchain file. diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 27e5e81..7e02814 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -6,9 +6,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAK endif() list(APPEND CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}") - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + endif() + if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + endif() + if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + endif() endif() # Darwin versions: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f5e3062cf2394f4e28e078817e074892e9c508d commit 5f5e3062cf2394f4e28e078817e074892e9c508d Author: Alexandru Croitor AuthorDate: Tue Apr 30 18:55:28 2019 +0200 Commit: Alexandru Croitor CommitDate: Tue Apr 30 18:55:28 2019 +0200 iOS: Only look for packages in the provided CMAKE_FIND_ROOT_PATHs Both CMAKE_FIND_ROOT_PATH_MODE_INCLUDE and CMAKE_FIND_ROOT_PATH_MODE_LIBRARY are set to "ONLY" when cross building to iOS, but appears that CMAKE_FIND_ROOT_PATH_MODE_PACKAGE was overlooked. This causes packages to be searched for in the host system as well, which is incorrect and can lead to linking issues. Set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to "ONLY" as well. CMAKE_FIND_ROOT_PATH_MODE_PROGRAM is not touched, because a user might want to find programs / tools on the host system. diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index ab650ef..27e5e81 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -8,6 +8,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAK list(APPEND CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}") set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) endif() # Darwin versions: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94c5fa5f7a189c1a99891bbacc6a3b291f399d7a commit 94c5fa5f7a189c1a99891bbacc6a3b291f399d7a Author: Alexandru Croitor AuthorDate: Tue Apr 30 13:34:47 2019 +0200 Commit: Alexandru Croitor CommitDate: Tue Apr 30 13:40:31 2019 +0200 iOS: Allow setting multiple CMAKE_FIND_ROOT_PATH values Currently the value is hardcoded to contain only the sysroot for the respective darwin platform. This means that it can not be changed in a custom toolchain file. Instead of overriding the value, simply append it. This is similar to how it is done in the Google provided Android toolchain file. The usecase is to allow specifying addiitonal roots to look for 3rd party packages which are definitely not present in the default sysroot. diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 9301ec9..ab650ef 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -5,7 +5,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAK set(CMAKE_MACOSX_BUNDLE ON) endif() - set(CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}") + list(APPEND CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}") set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=101135069425a1f3af85aa7d1fedf2656d9674f0 commit 101135069425a1f3af85aa7d1fedf2656d9674f0 Author: Alexandru Croitor AuthorDate: Tue Apr 30 13:31:16 2019 +0200 Commit: Alexandru Croitor CommitDate: Tue Apr 30 13:40:31 2019 +0200 iOS: Allow specifying CMAKE_MACOSX_BUNDLE in toolchain file Currently CMAKE_MACOSX_BUNDLE is always set to true when compiling for iOS. This poses a problem when using the source file variant of try_compile. Even if a custom value is passed via the CMAKE_FLAGS option, it would still be overridden by the Darwin.cmake file. Only set the value in case no other value was provided before. diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 5590433..9301ec9 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -1,7 +1,9 @@ set(APPLE 1) if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "watchOS") - set(CMAKE_MACOSX_BUNDLE ON) + if(NOT DEFINED CMAKE_MACOSX_BUNDLE) + set(CMAKE_MACOSX_BUNDLE ON) + endif() set(CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}") set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9beea0ccacc8c3cdc14b71b660a73a458f09650 commit d9beea0ccacc8c3cdc14b71b660a73a458f09650 Author: Harry Mallon AuthorDate: Tue Apr 30 10:46:57 2019 +0100 Commit: Harry Mallon CommitDate: Tue Apr 30 10:52:53 2019 +0100 CPackRPM: Hide CPACK_RPM_ROOTDIR debug if not CPACK_RPM_PACKAGE_DEBUG diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 26b2517..ffb24e2 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -1158,7 +1158,9 @@ function(cpack_rpm_generate_package) # Now we may create the RPM build tree structure set(CPACK_RPM_ROOTDIR "${CPACK_TOPLEVEL_DIRECTORY}") - message(STATUS "CPackRPM:Debug: Using CPACK_RPM_ROOTDIR=${CPACK_RPM_ROOTDIR}") + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: Using CPACK_RPM_ROOTDIR=${CPACK_RPM_ROOTDIR}") + endif() # Prepare RPM build tree file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}) file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/tmp) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d856eba16fae90f66dd142f91c21d4121b760d0 commit 3d856eba16fae90f66dd142f91c21d4121b760d0 Author: Leonid Pospelov AuthorDate: Mon Apr 15 16:34:08 2019 +0300 Commit: Brad King CommitDate: Mon Apr 22 10:44:31 2019 -0400 cmGeneratorExpressionNode: refactor TargetPropertyNode Re-order logic to improve readability and de-duplicate conditions. Factor out error message generation into a helper. diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 5b4e4ed..f661a75 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1029,62 +1029,44 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode // This node handles errors on parameter count itself. int NumExpectedParameters() const override { return OneOrMoreParameters; } + static const char* GetErrorText(std::string const& targetName, + std::string const& propertyName) + { + static cmsys::RegularExpression propertyNameValidator("^[A-Za-z0-9_]+$"); + if (targetName.empty() && propertyName.empty()) { + return "$ expression requires a non-empty " + "target name and property name."; + } + if (targetName.empty()) { + return "$ expression requires a non-empty " + "target name."; + } + if (!cmGeneratorExpression::IsValidTargetName(targetName)) { + if (!propertyNameValidator.find(propertyName)) { + return "Target name and property name not supported."; + } + return "Target name not supported."; + } + return nullptr; + } + std::string Evaluate( const std::vector& parameters, cmGeneratorExpressionContext* context, const GeneratorExpressionContent* content, cmGeneratorExpressionDAGChecker* dagCheckerParent) const override { - if (parameters.size() != 1 && parameters.size() != 2) { - reportError( - context, content->GetOriginalExpression(), - "$ expression requires one or two parameters"); - return std::string(); - } static cmsys::RegularExpression propertyNameValidator("^[A-Za-z0-9_]+$"); - cmGeneratorTarget const* target = context->HeadTarget; - std::string propertyName = parameters.front(); - - if (parameters.size() == 1) { - context->HadHeadSensitiveCondition = true; - } - if (!target && parameters.size() == 1) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. " - "It may not be used with add_custom_command or add_custom_target. " - "Specify the target to read a property from using the " - "$ signature instead."); - return std::string(); - } + cmGeneratorTarget const* target = nullptr; + std::string targetName, propertyName; if (parameters.size() == 2) { - if (parameters.front().empty() && parameters[1].empty()) { - reportError( - context, content->GetOriginalExpression(), - "$ expression requires a non-empty " - "target name and property name."); - return std::string(); - } - if (parameters.front().empty()) { - reportError( - context, content->GetOriginalExpression(), - "$ expression requires a non-empty " - "target name."); - return std::string(); - } - - std::string targetName = parameters.front(); + targetName = parameters[0]; propertyName = parameters[1]; - if (!cmGeneratorExpression::IsValidTargetName(targetName)) { - if (!propertyNameValidator.find(propertyName)) { - ::reportError(context, content->GetOriginalExpression(), - "Target name and property name not supported."); - return std::string(); - } - ::reportError(context, content->GetOriginalExpression(), - "Target name not supported."); + + if (const char* e = GetErrorText(targetName, propertyName)) { + reportError(context, content->GetOriginalExpression(), e); return std::string(); } if (propertyName == "ALIASED_TARGET"_s) { @@ -1094,7 +1076,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode return tgt->GetName(); } } - return ""; + return std::string(); } target = context->LG->FindGeneratorTargetToUse(targetName); @@ -1105,15 +1087,34 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode return std::string(); } context->AllTargets.insert(target); - } - if (target == context->HeadTarget) { + } else if (parameters.size() == 1) { + target = context->HeadTarget; + propertyName = parameters[0]; + // Keep track of the properties seen while processing. // The evaluation of the LINK_LIBRARIES generator expressions // will check this to ensure that properties have one consistent // value for all evaluations. context->SeenTargetProperties.insert(propertyName); + + context->HadHeadSensitiveCondition = true; + if (!target) { + reportError( + context, content->GetOriginalExpression(), + "$ may only be used with binary targets. " + "It may not be used with add_custom_command or add_custom_target. " + "Specify the target to read a property from using the " + "$ signature instead."); + return std::string(); + } + } else { + reportError( + context, content->GetOriginalExpression(), + "$ expression requires one or two parameters"); + return std::string(); } + if (propertyName == "SOURCES") { context->SourceSensitiveTargets.insert(target); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e1df5df5479b78d65d37e58b5cd0c93d70838ae commit 9e1df5df5479b78d65d37e58b5cd0c93d70838ae Author: Leonid Pospelov AuthorDate: Mon Apr 15 22:55:07 2019 +0300 Commit: Brad King CommitDate: Mon Apr 22 10:41:28 2019 -0400 cmGeneratorExpressionNode: use ctor arguments instead of macro diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 306c9c7..5b4e4ed 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -99,36 +99,42 @@ static const struct OneNode buildInterfaceNode; static const struct ZeroNode installInterfaceNode; -#define BOOLEAN_OP_NODE(OPNAME, OP, SUCCESS_VALUE, FAILURE_VALUE) \ - static const struct OP##Node : public cmGeneratorExpressionNode \ - { \ - OP##Node() {} /* NOLINT(modernize-use-equals-default) */ \ - virtual int NumExpectedParameters() const { return OneOrMoreParameters; } \ - \ - std::string Evaluate(const std::vector& parameters, \ - cmGeneratorExpressionContext* context, \ - const GeneratorExpressionContent* content, \ - cmGeneratorExpressionDAGChecker*) const \ - { \ - for (std::string const& param : parameters) { \ - if (param == #FAILURE_VALUE) { \ - return #FAILURE_VALUE; \ - } \ - if (param != #SUCCESS_VALUE) { \ - reportError(context, content->GetOriginalExpression(), \ - "Parameters to $<" #OP \ - "> must resolve to either '0' or '1'."); \ - return std::string(); \ - } \ - } \ - return #SUCCESS_VALUE; \ - } \ - } OPNAME; - -BOOLEAN_OP_NODE(andNode, AND, 1, 0) -BOOLEAN_OP_NODE(orNode, OR, 0, 1) - -#undef BOOLEAN_OP_NODE +struct BooleanOpNode : public cmGeneratorExpressionNode +{ + BooleanOpNode(const char* op_, const char* successVal_, + const char* failureVal_) + : op(op_) + , successVal(successVal_) + , failureVal(failureVal_) + { + } + + int NumExpectedParameters() const override { return OneOrMoreParameters; } + + std::string Evaluate(const std::vector& parameters, + cmGeneratorExpressionContext* context, + const GeneratorExpressionContent* content, + cmGeneratorExpressionDAGChecker*) const override + { + for (std::string const& param : parameters) { + if (param == this->failureVal) { + return this->failureVal; + } + if (param != this->successVal) { + std::ostringstream e; + e << "Parameters to $<" << this->op; + e << "> must resolve to either '0' or '1'."; + reportError(context, content->GetOriginalExpression(), e.str()); + return std::string(); + } + } + return this->successVal; + } + + const char *const op, *const successVal, *const failureVal; +}; + +static const BooleanOpNode andNode("AND", "1", "0"), orNode("OR", "0", "1"); static const struct NotNode : public cmGeneratorExpressionNode { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36f36d6a49976527a13a77d1ffff1fcdc5c3f5ba commit 36f36d6a49976527a13a77d1ffff1fcdc5c3f5ba Author: Leonid Pospelov AuthorDate: Mon Apr 15 15:38:16 2019 +0300 Commit: Brad King CommitDate: Mon Apr 22 10:41:28 2019 -0400 cmGeneratorExpressionNode: add VersionNode diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 5db46dd..306c9c7 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -792,9 +792,10 @@ struct PlatformIdNode : public cmGeneratorExpressionNode } } platformIdNode; -static const struct VersionGreaterNode : public cmGeneratorExpressionNode +template +struct VersionNode : public cmGeneratorExpressionNode { - VersionGreaterNode() {} // NOLINT(modernize-use-equals-default) + VersionNode() {} // NOLINT(modernize-use-equals-default) int NumExpectedParameters() const override { return 2; } @@ -804,93 +805,18 @@ static const struct VersionGreaterNode : public cmGeneratorExpressionNode const GeneratorExpressionContent* /*content*/, cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override { - return cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER, - parameters.front().c_str(), - parameters[1].c_str()) - ? "1" - : "0"; - } -} versionGreaterNode; - -static const struct VersionGreaterEqNode : public cmGeneratorExpressionNode -{ - VersionGreaterEqNode() {} // NOLINT(modernize-use-equals-default) - - int NumExpectedParameters() const override { return 2; } - - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* /*context*/, - const GeneratorExpressionContent* /*content*/, - cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override - { - return cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL, - parameters.front().c_str(), - parameters[1].c_str()) - ? "1" - : "0"; - } -} versionGreaterEqNode; - -static const struct VersionLessNode : public cmGeneratorExpressionNode -{ - VersionLessNode() {} // NOLINT(modernize-use-equals-default) - - int NumExpectedParameters() const override { return 2; } - - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* /*context*/, - const GeneratorExpressionContent* /*content*/, - cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override - { - return cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, - parameters.front().c_str(), + return cmSystemTools::VersionCompare(Op, parameters.front().c_str(), parameters[1].c_str()) ? "1" : "0"; } -} versionLessNode; - -static const struct VersionLessEqNode : public cmGeneratorExpressionNode -{ - VersionLessEqNode() {} // NOLINT(modernize-use-equals-default) - - int NumExpectedParameters() const override { return 2; } - - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* /*context*/, - const GeneratorExpressionContent* /*content*/, - cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override - { - return cmSystemTools::VersionCompare(cmSystemTools::OP_LESS_EQUAL, - parameters.front().c_str(), - parameters[1].c_str()) - ? "1" - : "0"; - } -} versionLessEqNode; - -static const struct VersionEqualNode : public cmGeneratorExpressionNode -{ - VersionEqualNode() {} // NOLINT(modernize-use-equals-default) - - int NumExpectedParameters() const override { return 2; } +}; - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* /*context*/, - const GeneratorExpressionContent* /*content*/, - cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override - { - return cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL, - parameters.front().c_str(), - parameters[1].c_str()) - ? "1" - : "0"; - } -} versionEqualNode; +static const VersionNode versionGreaterNode; +static const VersionNode versionGreaterEqNode; +static const VersionNode versionLessNode; +static const VersionNode versionLessEqNode; +static const VersionNode versionEqualNode; static const struct LinkOnlyNode : public cmGeneratorExpressionNode { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f57787dffa629b7c10ca2a02229b7e1a4bfe1f9 commit 3f57787dffa629b7c10ca2a02229b7e1a4bfe1f9 Author: Leonid Pospelov AuthorDate: Mon Apr 15 03:56:02 2019 +0300 Commit: Brad King CommitDate: Mon Apr 22 10:41:28 2019 -0400 cmGeneratorExpressionNode: remove structs CompilerId*, CompilerVersion* diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index a665974..5db46dd 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -621,10 +621,31 @@ static const CharacterNode<';'> semicolonNode; struct CompilerIdNode : public cmGeneratorExpressionNode { - CompilerIdNode() {} // NOLINT(modernize-use-equals-default) + CompilerIdNode(const char* compilerLang) + : CompilerLanguage(compilerLang) + { + } int NumExpectedParameters() const override { return OneOrZeroParameters; } + std::string Evaluate( + const std::vector& parameters, + cmGeneratorExpressionContext* context, + const GeneratorExpressionContent* content, + cmGeneratorExpressionDAGChecker* dagChecker) const override + { + if (!context->HeadTarget) { + std::ostringstream e; + e << "$<" << this->CompilerLanguage + << "_COMPILER_ID> may only be used with binary targets. It may " + "not be used with add_custom_command or add_custom_target."; + reportError(context, content->GetOriginalExpression(), e.str()); + return {}; + } + return this->EvaluateWithLanguage(parameters, context, content, dagChecker, + this->CompilerLanguage); + } + std::string EvaluateWithLanguage(const std::vector& parameters, cmGeneratorExpressionContext* context, const GeneratorExpressionContent* content, @@ -671,77 +692,21 @@ struct CompilerIdNode : public cmGeneratorExpressionNode } return "0"; } -}; - -static const struct CCompilerIdNode : public CompilerIdNode -{ - CCompilerIdNode() {} // NOLINT(modernize-use-equals-default) - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* context, - const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* dagChecker) const override - { - if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. It may " - "not be used with add_custom_command or add_custom_target."); - return std::string(); - } - return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "C"); - } -} cCompilerIdNode; - -static const struct CXXCompilerIdNode : public CompilerIdNode -{ - CXXCompilerIdNode() {} // NOLINT(modernize-use-equals-default) + const char* const CompilerLanguage; +}; - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* context, - const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* dagChecker) const override - { - if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. It may " - "not be used with add_custom_command or add_custom_target."); - return std::string(); - } - return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "CXX"); - } -} cxxCompilerIdNode; +static const CompilerIdNode cCompilerIdNode("C"), cxxCompilerIdNode("CXX"), + cudaCompilerIdNode("CUDA"), fortranCompilerIdNode("Fortran"); -static const struct CUDACompilerIdNode : public CompilerIdNode +struct CompilerVersionNode : public cmGeneratorExpressionNode { - CUDACompilerIdNode() {} // NOLINT(modernize-use-equals-default) - - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* context, - const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* dagChecker) const override + CompilerVersionNode(const char* compilerLang) + : CompilerLanguage(compilerLang) { - if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. It may " - "not be used with add_custom_command or add_custom_target."); - return std::string(); - } - return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "CUDA"); } -} cudaCompilerIdNode; -static const struct FortranCompilerIdNode : public CompilerIdNode -{ - FortranCompilerIdNode() {} // NOLINT(modernize-use-equals-default) + int NumExpectedParameters() const override { return OneOrZeroParameters; } std::string Evaluate( const std::vector& parameters, @@ -750,22 +715,16 @@ static const struct FortranCompilerIdNode : public CompilerIdNode cmGeneratorExpressionDAGChecker* dagChecker) const override { if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. It may " - "not be used with add_custom_command or add_custom_target."); - return std::string(); + std::ostringstream e; + e << "$<" << this->CompilerLanguage + << "_COMPILER_VERSION> may only be used with binary targets. It " + "may not be used with add_custom_command or add_custom_target."; + reportError(context, content->GetOriginalExpression(), e.str()); + return {}; } return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "Fortran"); + this->CompilerLanguage); } -} fortranCompilerIdNode; - -struct CompilerVersionNode : public cmGeneratorExpressionNode -{ - CompilerVersionNode() {} // NOLINT(modernize-use-equals-default) - - int NumExpectedParameters() const override { return OneOrZeroParameters; } std::string EvaluateWithLanguage(const std::vector& parameters, cmGeneratorExpressionContext* context, @@ -784,7 +743,7 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode if (!compilerIdValidator.find(parameters.front())) { reportError(context, content->GetOriginalExpression(), "Expression syntax not recognized."); - return std::string(); + return {}; } if (compilerVersion.empty()) { return parameters.front().empty() ? "1" : "0"; @@ -796,95 +755,13 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode ? "1" : "0"; } -}; -static const struct CCompilerVersionNode : public CompilerVersionNode -{ - CCompilerVersionNode() {} // NOLINT(modernize-use-equals-default) - - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* context, - const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* dagChecker) const override - { - if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. It " - "may not be used with add_custom_command or add_custom_target."); - return std::string(); - } - return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "C"); - } -} cCompilerVersionNode; - -static const struct CXXCompilerVersionNode : public CompilerVersionNode -{ - CXXCompilerVersionNode() {} // NOLINT(modernize-use-equals-default) - - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* context, - const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* dagChecker) const override - { - if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. It " - "may not be used with add_custom_command or add_custom_target."); - return std::string(); - } - return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "CXX"); - } -} cxxCompilerVersionNode; - -static const struct CUDACompilerVersionNode : public CompilerVersionNode -{ - CUDACompilerVersionNode() {} // NOLINT(modernize-use-equals-default) - - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* context, - const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* dagChecker) const override - { - if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. It " - "may not be used with add_custom_command or add_custom_target."); - return std::string(); - } - return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "CUDA"); - } -} cudaCompilerVersionNode; - -static const struct FortranCompilerVersionNode : public CompilerVersionNode -{ - FortranCompilerVersionNode() {} // NOLINT(modernize-use-equals-default) + const char* const CompilerLanguage; +}; - std::string Evaluate( - const std::vector& parameters, - cmGeneratorExpressionContext* context, - const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* dagChecker) const override - { - if (!context->HeadTarget) { - reportError( - context, content->GetOriginalExpression(), - "$ may only be used with binary targets. " - "It may not be used with add_custom_command or add_custom_target."); - return std::string(); - } - return this->EvaluateWithLanguage(parameters, context, content, dagChecker, - "Fortran"); - } -} fortranCompilerVersionNode; +static const CompilerVersionNode cCompilerVersionNode("C"), + cxxCompilerVersionNode("CXX"), cudaCompilerVersionNode("CUDA"), + fortranCompilerVersionNode("Fortran"); struct PlatformIdNode : public cmGeneratorExpressionNode { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20d7c5631e88d80cb683a5e120c0c1e1f077945a commit 20d7c5631e88d80cb683a5e120c0c1e1f077945a Author: Leonid Pospelov AuthorDate: Mon Apr 15 03:36:41 2019 +0300 Commit: Brad King CommitDate: Mon Apr 22 10:41:28 2019 -0400 cmGeneratorExpressionNode: add CharacterNode diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 38da8ef..a665974 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -599,9 +599,10 @@ static const struct MakeCIdentifierNode : public cmGeneratorExpressionNode } } makeCIdentifierNode; -static const struct Angle_RNode : public cmGeneratorExpressionNode +template +struct CharacterNode : public cmGeneratorExpressionNode { - Angle_RNode() {} // NOLINT(modernize-use-equals-default) + CharacterNode() {} // NOLINT(modernize-use-equals-default) int NumExpectedParameters() const override { return 0; } @@ -611,41 +612,12 @@ static const struct Angle_RNode : public cmGeneratorExpressionNode const GeneratorExpressionContent* /*content*/, cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override { - return ">"; + return { C }; } -} angle_rNode; - -static const struct CommaNode : public cmGeneratorExpressionNode -{ - CommaNode() {} // NOLINT(modernize-use-equals-default) - - int NumExpectedParameters() const override { return 0; } - - std::string Evaluate( - const std::vector& /*parameters*/, - cmGeneratorExpressionContext* /*context*/, - const GeneratorExpressionContent* /*content*/, - cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override - { - return ","; - } -} commaNode; - -static const struct SemicolonNode : public cmGeneratorExpressionNode -{ - SemicolonNode() {} // NOLINT(modernize-use-equals-default) - - int NumExpectedParameters() const override { return 0; } - - std::string Evaluate( - const std::vector& /*parameters*/, - cmGeneratorExpressionContext* /*context*/, - const GeneratorExpressionContent* /*content*/, - cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override - { - return ";"; - } -} semicolonNode; +}; +static const CharacterNode<'>'> angle_rNode; +static const CharacterNode<','> commaNode; +static const CharacterNode<';'> semicolonNode; struct CompilerIdNode : public cmGeneratorExpressionNode { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abd62201bd7d10f8eb27229ac3f5e55d52d0659e commit abd62201bd7d10f8eb27229ac3f5e55d52d0659e Author: Leonid Pospelov AuthorDate: Mon Apr 15 03:30:50 2019 +0300 Commit: Brad King CommitDate: Mon Apr 22 10:41:28 2019 -0400 cmGeneratorExpressionNode: simplify code in EqualNode diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 1d3295d..38da8ef 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -215,69 +215,44 @@ static const struct EqualNode : public cmGeneratorExpressionNode const GeneratorExpressionContent* content, cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override { - char* pEnd; - - int base = 0; - bool flipSign = false; - - const char* lhs = parameters[0].c_str(); - if (cmHasLiteralPrefix(lhs, "0b") || cmHasLiteralPrefix(lhs, "0B")) { - base = 2; - lhs += 2; - } - if (cmHasLiteralPrefix(lhs, "-0b") || cmHasLiteralPrefix(lhs, "-0B")) { - base = 2; - lhs += 3; - flipSign = true; - } - if (cmHasLiteralPrefix(lhs, "+0b") || cmHasLiteralPrefix(lhs, "+0B")) { - base = 2; - lhs += 3; - } - - long lnum = strtol(lhs, &pEnd, base); - if (pEnd == lhs || *pEnd != '\0' || errno == ERANGE) { - reportError(context, content->GetOriginalExpression(), - "$ parameter " + parameters[0] + - " is not a valid integer."); - return std::string(); - } - - if (flipSign) { - lnum = -lnum; + long numbers[2]; + for (int i = 0; i < 2; ++i) { + if (!ParameterToLong(parameters[i].c_str(), &numbers[i])) { + reportError(context, content->GetOriginalExpression(), + "$ parameter " + parameters[i] + + " is not a valid integer."); + return {}; + } } + return numbers[0] == numbers[1] ? "1" : "0"; + } - base = 0; - flipSign = false; + static bool ParameterToLong(const char* param, long* outResult) + { + const char isNegative = param[0] == '-'; - const char* rhs = parameters[1].c_str(); - if (cmHasLiteralPrefix(rhs, "0b") || cmHasLiteralPrefix(rhs, "0B")) { - base = 2; - rhs += 2; - } - if (cmHasLiteralPrefix(rhs, "-0b") || cmHasLiteralPrefix(rhs, "-0B")) { + int base = 0; + if (cmHasLiteralPrefix(param, "0b") || cmHasLiteralPrefix(param, "0B")) { base = 2; - rhs += 3; - flipSign = true; - } - if (cmHasLiteralPrefix(rhs, "+0b") || cmHasLiteralPrefix(rhs, "+0B")) { + param += 2; + } else if (cmHasLiteralPrefix(param, "-0b") || + cmHasLiteralPrefix(param, "-0B") || + cmHasLiteralPrefix(param, "+0b") || + cmHasLiteralPrefix(param, "+0B")) { base = 2; - rhs += 3; + param += 3; } - long rnum = strtol(rhs, &pEnd, base); - if (pEnd == rhs || *pEnd != '\0' || errno == ERANGE) { - reportError(context, content->GetOriginalExpression(), - "$ parameter " + parameters[1] + - " is not a valid integer."); - return std::string(); + char* pEnd; + long result = strtol(param, &pEnd, base); + if (pEnd == param || *pEnd != '\0' || errno == ERANGE) { + return false; } - - if (flipSign) { - rnum = -rnum; + if (isNegative && result > 0) { + result *= -1; } - - return lnum == rnum ? "1" : "0"; + *outResult = result; + return true; } } equalNode; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2c8ff825995c1425a134e24eee6c4fb73c3a6b2 commit f2c8ff825995c1425a134e24eee6c4fb73c3a6b2 Author: Brad King AuthorDate: Mon Apr 22 10:40:26 2019 -0400 Commit: Brad King CommitDate: Mon Apr 22 10:41:10 2019 -0400 cmGeneratorExpressionNode: Simplify static string constant Use our `""_s` user-defined literal to avoid initializing a static std::string. diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index af409e4..1d3295d 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -21,10 +21,13 @@ #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" +#include "cm_static_string_view.hxx" +#include "cm_string_view.hxx" #include "cmake.h" #include "cmsys/RegularExpression.hxx" #include "cmsys/String.h" + #include #include #include @@ -1328,8 +1331,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode "Target name not supported."); return std::string(); } - static const std::string propALIASED_TARGET = "ALIASED_TARGET"; - if (propertyName == propALIASED_TARGET) { + if (propertyName == "ALIASED_TARGET"_s) { if (context->LG->GetMakefile()->IsAlias(targetName)) { if (cmGeneratorTarget* tgt = context->LG->FindGeneratorTargetToUse(targetName)) { ----------------------------------------------------------------------- Summary of changes: Modules/Internal/CPack/CPackRPM.cmake | 4 +- Modules/Platform/Darwin.cmake | 17 +- Source/cmGeneratorExpressionNode.cxx | 591 ++++++++++------------------------ 3 files changed, 191 insertions(+), 421 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri May 3 00:03:05 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 3 May 2019 00:03:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-843-g713f1a0 Message-ID: <20190503040305.AD359F5B3D@public.kitware.com> 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 713f1a0e7da7c76b0502b4ee885a74eb2e07c3b4 (commit) from ce79364581643700ab88ee4c442e0cf1736c926e (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=713f1a0e7da7c76b0502b4ee885a74eb2e07c3b4 commit 713f1a0e7da7c76b0502b4ee885a74eb2e07c3b4 Author: Kitware Robot AuthorDate: Fri May 3 00:01:06 2019 -0400 Commit: Kitware Robot CommitDate: Fri May 3 00:01:06 2019 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1b34ba5..a6c9d01 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 14) -set(CMake_VERSION_PATCH 20190502) +set(CMake_VERSION_PATCH 20190503) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri May 3 11:33:05 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 3 May 2019 11:33:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-845-g784dd90 Message-ID: <20190503153305.39D15100527@public.kitware.com> 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 784dd90fd40ff3cdc9fb44d37c0eef992ed05a92 (commit) via 3dbec532555eb4d088f35b4a2593ca1cc247dab0 (commit) from 713f1a0e7da7c76b0502b4ee885a74eb2e07c3b4 (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=784dd90fd40ff3cdc9fb44d37c0eef992ed05a92 commit 784dd90fd40ff3cdc9fb44d37c0eef992ed05a92 Merge: 713f1a0 3dbec53 Author: Brad King AuthorDate: Fri May 3 15:29:41 2019 +0000 Commit: Kitware Robot CommitDate: Fri May 3 11:30:04 2019 -0400 Merge topic 'memorize_cxx_compilers_with_full_CXX14_support' 3dbec53255 CompileFeatures: Record when compilers gained full CXX14 support Acked-by: Kitware Robot Merge-request: !3280 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dbec532555eb4d088f35b4a2593ca1cc247dab0 commit 3dbec532555eb4d088f35b4a2593ca1cc247dab0 Author: Robert Maynard AuthorDate: Mon Apr 29 17:20:14 2019 -0400 Commit: Robert Maynard CommitDate: Thu May 2 10:23:25 2019 -0400 CompileFeatures: Record when compilers gained full CXX14 support Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++14 feature support when the running compiler is known to have all features. diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 6fb0200..c116078 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -29,9 +29,11 @@ if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14") + set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") + set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) endif() set(_clang_version_std17 5.0) diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index 1253291..fcaaeab 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -38,6 +38,10 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") endif() +if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) +endif() + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17") set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 032071c..44b0c3d 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -40,6 +40,16 @@ else() set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17") endif() + # While full C++14 support was first introduced in Intel 17, + # Intel 18.0.0-4 don't have full support as they broke + # support for cxx_relaxed_constexpr. + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 18.0.4) + set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) + elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.0.0 + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.0) + set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) + endif() + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Clang-CXX.cmake | 2 ++ Modules/Compiler/GNU-CXX.cmake | 4 ++++ Modules/Compiler/Intel-CXX.cmake | 10 ++++++++++ 3 files changed, 16 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Fri May 3 11:43:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 3 May 2019 11:43:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-848-g323c4fb Message-ID: <20190503154303.E4F2BF69E4@public.kitware.com> 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 323c4fb989e0259c733f5a34044c693667a31842 (commit) via 6e5ccabe9ba1b92bb5244683c4315964b01e0df7 (commit) via 1f4c9aa7d2c93f2377a6d1cb4cf2c1137466e927 (commit) from 784dd90fd40ff3cdc9fb44d37c0eef992ed05a92 (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=323c4fb989e0259c733f5a34044c693667a31842 commit 323c4fb989e0259c733f5a34044c693667a31842 Merge: 784dd90 6e5ccab Author: Brad King AuthorDate: Fri May 3 15:42:37 2019 +0000 Commit: Kitware Robot CommitDate: Fri May 3 11:42:47 2019 -0400 Merge topic 'genex-TARGET_FILE_BASE_NAME-manage-postfix' 6e5ccabe9b Genex: Update $: take care of POSTFIX 1f4c9aa7d2 Refactor: introduce method cmGeneratorTarget::GetFilePostfix Acked-by: Kitware Robot Merge-request: !3267 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e5ccabe9ba1b92bb5244683c4315964b01e0df7 commit 6e5ccabe9ba1b92bb5244683c4315964b01e0df7 Author: Marc Chevrier AuthorDate: Thu Apr 25 18:48:43 2019 +0200 Commit: Marc Chevrier CommitDate: Thu May 2 11:01:10 2019 +0200 Genex: Update $: take care of POSTFIX This capability complement MR !3190 and !3207 and is also needed to solve issue #18771. diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 3dc3221..ce62893 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -404,16 +404,25 @@ Target-Dependent Queries :prop_tgt:`LIBRARY_OUTPUT_NAME_` and :prop_tgt:`RUNTIME_OUTPUT_NAME_`. + The :prop_tgt:`_POSTFIX` and :prop_tgt:`DEBUG_POSTFIX` target + properties can also be considered. + Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on. ``$`` Prefix of main file where ``tgt`` is the name of a target. + See also the :prop_tgt:`PREFIX` target property. + Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on. ``$`` Suffix of main file where ``tgt`` is the name of a target. + The suffix corresponds to the file extension (such as ".so" or ".exe"). + + See also the :prop_tgt:`SUFFIX` target property. + Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on. ``$`` @@ -435,16 +444,27 @@ Target-Dependent Queries :prop_tgt:`ARCHIVE_OUTPUT_NAME_` and :prop_tgt:`LIBRARY_OUTPUT_NAME_`. + The :prop_tgt:`_POSTFIX` and :prop_tgt:`DEBUG_POSTFIX` target + properties can also be considered. + Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on. ``$`` Prefix of file used to link where ``tgt`` is the name of a target. + See also the :prop_tgt:`PREFIX` and :prop_tgt:`IMPORT_PREFIX` target + properties. + Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on. ``$`` Suffix of file used to link where ``tgt`` is the name of a target. + The suffix corresponds to the file extension (such as ".so" or ".lib"). + + See also the :prop_tgt:`SUFFIX` and :prop_tgt:`IMPORT_SUFFIX` target + properties. + Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on. ``$`` @@ -475,6 +495,9 @@ Target-Dependent Queries See also the :prop_tgt:`PDB_NAME` target property and its configuration specific variant :prop_tgt:`PDB_NAME_`. + The :prop_tgt:`_POSTFIX` and :prop_tgt:`DEBUG_POSTFIX` target + properties can also be considered. + Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on. ``$`` diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 8803830..a207b5f 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -2202,7 +2202,8 @@ struct TargetOutputNameArtifactResultGetter const GeneratorExpressionContent* /*unused*/) { return target->GetOutputName(context->Config, - cmStateEnums::RuntimeBinaryArtifact); + cmStateEnums::RuntimeBinaryArtifact) + + target->GetFilePostfix(context->Config); } }; @@ -2224,7 +2225,8 @@ struct TargetOutputNameArtifactResultGetter target->HasImportLibrary(context->Config) ? cmStateEnums::ImportLibraryArtifact : cmStateEnums::RuntimeBinaryArtifact; - return target->GetOutputName(context->Config, artifact); + return target->GetOutputName(context->Config, artifact) + + target->GetFilePostfix(context->Config); } }; @@ -2264,7 +2266,8 @@ struct TargetOutputNameArtifactResultGetter return std::string(); } - return target->GetPDBOutputName(context->Config); + return target->GetPDBOutputName(context->Config) + + target->GetFilePostfix(context->Config); } }; diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 477b593..a491e99 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -41,8 +41,8 @@ run_cmake(TARGET_FILE_SUFFIX) run_cmake(TARGET_FILE_SUFFIX-imported-target) run_cmake(TARGET_FILE_SUFFIX-non-valid-target) run_cmake(TARGET_LINKER_FILE_SUFFIX-non-valid-target) -run_cmake(TARGET_FILE_BASE_NAME) -run_cmake(TARGET_FILE_BASE_NAME-imported-target) +run_cmake_with_options(TARGET_FILE_BASE_NAME -DCMAKE_BUILD_TYPE:STRING=Debug) +run_cmake_with_options(TARGET_FILE_BASE_NAME-imported-target -DCMAKE_BUILD_TYPE:STRING=Debug) run_cmake(TARGET_FILE_BASE_NAME-non-valid-target) run_cmake(TARGET_LINKER_FILE_BASE_NAME-non-valid-target) run_cmake(TARGET_PROPERTY-LOCATION) diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME-imported-target.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME-imported-target.cmake index aa54b31..40f7c66 100644 --- a/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME-imported-target.cmake +++ b/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME-imported-target.cmake @@ -46,17 +46,14 @@ add_executable (exec3 IMPORTED) set_property (TARGET exec3 PROPERTY RUNTIME_OUTPUT_NAME exec3_runtime) set_property (TARGET exec3 PROPERTY LIBRARY_OUTPUT_NAME exec3_library) set_property (TARGET exec3 PROPERTY ARCHIVE_OUTPUT_NAME exec3_archive) -set_property (TARGET exec3 PROPERTY PDB_NAME exec3_pdb) add_library (shared3 SHARED IMPORTED) set_property (TARGET shared3 PROPERTY RUNTIME_OUTPUT_NAME shared3_runtime) set_property (TARGET shared3 PROPERTY LIBRARY_OUTPUT_NAME shared3_library) set_property (TARGET shared3 PROPERTY ARCHIVE_OUTPUT_NAME shared3_archive) -set_property (TARGET shared3 PROPERTY PDB_NAME shared3_pdb) add_library (static3 STATIC IMPORTED) set_property (TARGET static3 PROPERTY RUNTIME_OUTPUT_NAME static3_runtime) set_property (TARGET static3 PROPERTY LIBRARY_OUTPUT_NAME static3_library) set_property (TARGET static3 PROPERTY ARCHIVE_OUTPUT_NAME static3_archive) -set_property (TARGET static3 PROPERTY PDB_NAME static3_pdb) string (APPEND GENERATE_CONTENT [[ @@ -73,7 +70,37 @@ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) list(GET CMAKE_CONFIGURATION_TYPES 0 FIRST_CONFIG) set(GENERATE_CONDITION CONDITION $) +else() + set (FIRST_CONFIG ${CMAKE_BUILD_TYPE}) endif() +string (TOUPPER "${FIRST_CONFIG}" FIRST_CONFIG) + + +add_executable (exec4 IMPORTED) +set_property (TARGET exec4 PROPERTY RUNTIME_OUTPUT_NAME exec4_runtime) +set_property (TARGET exec4 PROPERTY LIBRARY_OUTPUT_NAME exec4_library) +set_property (TARGET exec4 PROPERTY ARCHIVE_OUTPUT_NAME exec4_archive) +set_property (TARGET exec4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix) +add_library (shared4 SHARED IMPORTED) +set_property (TARGET shared4 PROPERTY RUNTIME_OUTPUT_NAME shared4_runtime) +set_property (TARGET shared4 PROPERTY LIBRARY_OUTPUT_NAME shared4_library) +set_property (TARGET shared4 PROPERTY ARCHIVE_OUTPUT_NAME shared4_archive) +set_property (TARGET shared4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix) +add_library (static4 STATIC IMPORTED) +set_property (TARGET static4 PROPERTY RUNTIME_OUTPUT_NAME static4_runtime) +set_property (TARGET static4 PROPERTY LIBRARY_OUTPUT_NAME static4_library) +set_property (TARGET static4 PROPERTY ARCHIVE_OUTPUT_NAME static4_archive) +set_property (TARGET static4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix) + +string (APPEND GENERATE_CONTENT [[ + +check_value ("TARGET_FILE_BASE_NAME executable all properties + postfix" "$" "exec4_runtime_postfix") +check_value ("TARGET_FILE_BASE_NAME shared all properties + postfix" "$" "$,Windows$CYGWIN>,shared4_runtime,shared4_library>_postfix") +check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties + postfix" "$" "$,Windows$CYGWIN>,shared4_archive,shared4_library>_postfix") +check_value ("TARGET_FILE_BASE_NAME static all properties + postfix" "$" "static4_archive_postfix") +check_value ("TARGET_LINKER_FILE_BASE_NAME static linker all properties + postfix" "$" "static4_archive_postfix") +]]) + file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/TARGET_FILE_BASE_NAME-generated.cmake" CONTENT "${GENERATE_CONTENT}" ${GENERATE_CONDITION}) diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME.cmake index 5ea53a0..f88d710 100644 --- a/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME.cmake +++ b/Tests/RunCMake/GeneratorExpression/TARGET_FILE_BASE_NAME.cmake @@ -90,7 +90,46 @@ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) list(GET CMAKE_CONFIGURATION_TYPES 0 FIRST_CONFIG) set(GENERATE_CONDITION CONDITION $) +else() + set (FIRST_CONFIG ${CMAKE_BUILD_TYPE}) endif() +string (TOUPPER "${FIRST_CONFIG}" FIRST_CONFIG) + + +add_executable (exec4 empty.c) +set_property (TARGET exec4 PROPERTY RUNTIME_OUTPUT_NAME exec4_runtime) +set_property (TARGET exec4 PROPERTY LIBRARY_OUTPUT_NAME exec4_library) +set_property (TARGET exec4 PROPERTY ARCHIVE_OUTPUT_NAME exec4_archive) +set_property (TARGET exec4 PROPERTY PDB_NAME exec4_pdb) +set_property (TARGET exec4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix) +add_library (shared4 SHARED empty.c) +set_property (TARGET shared4 PROPERTY RUNTIME_OUTPUT_NAME shared4_runtime) +set_property (TARGET shared4 PROPERTY LIBRARY_OUTPUT_NAME shared4_library) +set_property (TARGET shared4 PROPERTY ARCHIVE_OUTPUT_NAME shared4_archive) +set_property (TARGET shared4 PROPERTY PDB_NAME shared4_pdb) +set_property (TARGET shared4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix) +add_library (static4 STATIC empty.c) +set_property (TARGET static4 PROPERTY RUNTIME_OUTPUT_NAME static4_runtime) +set_property (TARGET static4 PROPERTY LIBRARY_OUTPUT_NAME static4_library) +set_property (TARGET static4 PROPERTY ARCHIVE_OUTPUT_NAME static4_archive) +set_property (TARGET static4 PROPERTY PDB_NAME static4_pdb) +set_property (TARGET static4 PROPERTY ${FIRST_CONFIG}_POSTFIX _postfix) + +string (APPEND GENERATE_CONTENT [[ + +check_value ("TARGET_FILE_BASE_NAME executable all properties + postfix" "$" "exec4_runtime_postfix") +check_value ("TARGET_FILE_BASE_NAME shared all properties + postfix" "$" "$,Windows$CYGWIN>,shared4_runtime,shared4_library>_postfix") +check_value ("TARGET_LINKER_FILE_BASE_NAME shared linker all properties + postfix" "$" "$,Windows$CYGWIN>,shared4_archive,shared4_library>_postfix") +check_value ("TARGET_FILE_BASE_NAME static all properties + postfix" "$" "static4_archive_postfix") +check_value ("TARGET_LINKER_FILE_BASE_NAME static linker all properties + postfix" "$" "static4_archive_postfix") +]]) +if (CMAKE_C_LINKER_SUPPORTS_PDB) + string (APPEND GENERATE_CONTENT [[ +check_value ("TARGET_PDB_FILE_BASE_NAME executable PDB all properties + postfix" "$" "exec4_pdb_postfix") +check_value ("TARGET_PDB_FILE_BASE_NAME shared PDB all properties + postfix" "$" "shared4_pdb_postfix") +]]) +endif() + file (GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/TARGET_FILE_BASE_NAME-generated.cmake" CONTENT "${GENERATE_CONTENT}" ${GENERATE_CONDITION}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f4c9aa7d2c93f2377a6d1cb4cf2c1137466e927 commit 1f4c9aa7d2c93f2377a6d1cb4cf2c1137466e927 Author: Marc Chevrier AuthorDate: Fri Apr 19 13:30:03 2019 +0200 Commit: Marc Chevrier CommitDate: Thu May 2 10:06:04 2019 +0200 Refactor: introduce method cmGeneratorTarget::GetFilePostfix diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 3fb95bf..036a07d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -491,6 +491,22 @@ std::string cmGeneratorTarget::GetFileSuffix( return suffix; } +std::string cmGeneratorTarget::GetFilePostfix(const std::string& config) const +{ + const char* postfix = nullptr; + if (!config.empty()) { + std::string configProp = cmSystemTools::UpperCase(config); + configProp += "_POSTFIX"; + postfix = this->GetProperty(configProp); + // Mac application bundles and frameworks have no postfix. + if (!this->IsImported() && postfix && + (this->IsAppBundleOnApple() || this->IsFrameworkOnApple())) { + postfix = nullptr; + } + } + return postfix ? postfix : std::string(); +} + const char* cmGeneratorTarget::GetFilePrefixInternal( cmStateEnums::ArtifactType artifact, const std::string& language) const { @@ -3930,17 +3946,7 @@ void cmGeneratorTarget::GetFullNameInternal( } // Compute the full name for main target types. - const char* configPostfix = nullptr; - if (!config.empty()) { - std::string configProp = cmSystemTools::UpperCase(config); - configProp += "_POSTFIX"; - configPostfix = this->GetProperty(configProp); - // Mac application bundles and frameworks have no postfix. - if (configPostfix && - (this->IsAppBundleOnApple() || this->IsFrameworkOnApple())) { - configPostfix = nullptr; - } - } + const std::string configPostfix = this->GetFilePostfix(config); // frameworks have directory prefix but no suffix std::string fw_prefix; @@ -3965,7 +3971,7 @@ void cmGeneratorTarget::GetFullNameInternal( outBase += this->GetOutputName(config, artifact); // Append the per-configuration postfix. - outBase += configPostfix ? configPostfix : ""; + outBase += configPostfix; // Name shared libraries with their version number on some platforms. if (const char* soversion = this->GetProperty("SOVERSION")) { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 81f5255..0e0ee6a 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -543,6 +543,9 @@ public: cmStateEnums::ArtifactType artifact = cmStateEnums::RuntimeBinaryArtifact) const; + /** Get target file postfix */ + std::string GetFilePostfix(const std::string& config) const; + /** Clears cached meta data for local and external source files. * The meta data will be recomputed on demand. */ ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-generator-expressions.7.rst | 23 +++++++++++++ Source/cmGeneratorExpressionNode.cxx | 9 +++-- Source/cmGeneratorTarget.cxx | 30 ++++++++++------- Source/cmGeneratorTarget.h | 3 ++ .../GeneratorExpression/RunCMakeTest.cmake | 4 +-- .../TARGET_FILE_BASE_NAME-imported-target.cmake | 33 ++++++++++++++++-- .../TARGET_FILE_BASE_NAME.cmake | 39 ++++++++++++++++++++++ 7 files changed, 121 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri May 3 11:53:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 3 May 2019 11:53:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-856-g186ca17 Message-ID: <20190503155303.99E4FF5B3D@public.kitware.com> 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 186ca170da51d64a50bb15bfd067ca9b4c987327 (commit) via 6f242acfcb72881d184f5b2468fd4ddcadce01d8 (commit) via 9713154cf609691dfe9b8484c16cc034ea52d799 (commit) via cd285b749615c64e72ddadda0ba014c91829529c (commit) via c85524a94ace9ee400229fede179a605b1c144e3 (commit) via c474fb2777ea3e675237fccf23f64fe37371a5b0 (commit) via c846dbf89ee5b11a74dceb1c19fd7472eb8b075d (commit) via 6ad699358b6b421da6c49cf540b30eb8b0a3a996 (commit) from 323c4fb989e0259c733f5a34044c693667a31842 (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=186ca170da51d64a50bb15bfd067ca9b4c987327 commit 186ca170da51d64a50bb15bfd067ca9b4c987327 Merge: 6f242ac c85524a Author: Brad King AuthorDate: Fri May 3 15:48:33 2019 +0000 Commit: Kitware Robot CommitDate: Fri May 3 11:48:46 2019 -0400 Merge topic 'std-pipes-always' c85524a94a Ensure stdin, stdout, and stderr pipes are always open Acked-by: Kitware Robot Acked-by: Kyle Edwards Merge-request: !3282 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f242acfcb72881d184f5b2468fd4ddcadce01d8 commit 6f242acfcb72881d184f5b2468fd4ddcadce01d8 Merge: 9713154 c474fb2 Author: Brad King AuthorDate: Fri May 3 15:46:05 2019 +0000 Commit: Kitware Robot CommitDate: Fri May 3 11:46:25 2019 -0400 Merge topic 'cpack-ifw-stylesheet' c474fb2777 CPack/IFW: Add StyleSheet field Acked-by: Kitware Robot Merge-request: !3270 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9713154cf609691dfe9b8484c16cc034ea52d799 commit 9713154cf609691dfe9b8484c16cc034ea52d799 Merge: cd285b7 6ad6993 Author: Brad King AuthorDate: Fri May 3 15:45:22 2019 +0000 Commit: Kitware Robot CommitDate: Fri May 3 11:45:32 2019 -0400 Merge topic 'jobs-positive-value' 6ad699358b cmake: --build -j should not accept 0. Acked-by: Kitware Robot Merge-request: !3255 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd285b749615c64e72ddadda0ba014c91829529c commit cd285b749615c64e72ddadda0ba014c91829529c Merge: 323c4fb c846dbf Author: Brad King AuthorDate: Fri May 3 15:43:42 2019 +0000 Commit: Kitware Robot CommitDate: Fri May 3 11:43:50 2019 -0400 Merge topic 'DetermineCompilerId-versioned-llvm-for-vs' c846dbf89e CMakeDetermineCompilerId: Support versioned LLVM for Visual Studio. Acked-by: Kitware Robot Merge-request: !3281 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c85524a94ace9ee400229fede179a605b1c144e3 commit c85524a94ace9ee400229fede179a605b1c144e3 Author: Brad King AuthorDate: Thu May 2 11:11:28 2019 -0400 Commit: Brad King CommitDate: Thu May 2 14:34:58 2019 -0400 Ensure stdin, stdout, and stderr pipes are always open On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219 diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 3ceb824..58b9e70 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -98,6 +98,7 @@ static void cpackProgressCallback(const std::string& message, float /*unused*/) // this is CPack. int main(int argc, char const* const* argv) { + cmSystemTools::EnsureStdPipes(); #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) // Replace streambuf so we can output Unicode to console cmsys::ConsoleBuf::Manager consoleOut(std::cout); diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 745c6bb..7caed0c 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -67,6 +67,7 @@ void onsig(int /*unused*/) int main(int argc, char const* const* argv) { + cmSystemTools::EnsureStdPipes(); cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); argc = encoding_args.argc(); diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 8d9a50c..c9ebba8 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -55,6 +55,7 @@ Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin); int main(int argc, char** argv) { + cmSystemTools::EnsureStdPipes(); cmsys::Encoding::CommandLineArguments encoding_args = cmsys::Encoding::CommandLineArguments::Main(argc, argv); int argc2 = encoding_args.argc(); diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index bc853b7..17ed3f6 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -56,8 +57,6 @@ # include // include wincrypt.h after windows.h # include - -# include /* _O_TEXT */ #else # include # include @@ -2007,6 +2006,71 @@ int cmSystemTools::WaitForLine(cmsysProcess* process, std::string& line, } } +#ifdef _WIN32 +static void EnsureStdPipe(DWORD fd) +{ + if (GetStdHandle(fd) != INVALID_HANDLE_VALUE) { + return; + } + SECURITY_ATTRIBUTES sa; + sa.nLength = sizeof(sa); + sa.lpSecurityDescriptor = NULL; + sa.bInheritHandle = TRUE; + + HANDLE h = CreateFileW( + L"NUL", + fd == STD_INPUT_HANDLE ? FILE_GENERIC_READ + : FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES, + FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING, 0, NULL); + + if (h == INVALID_HANDLE_VALUE) { + LPSTR message = NULL; + DWORD size = FormatMessageA( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&message, 0, NULL); + std::string msg = std::string(message, size); + LocalFree(message); + std::cerr << "failed to open NUL for missing stdio pipe: " << msg; + abort(); + } + + SetStdHandle(fd, h); +} + +void cmSystemTools::EnsureStdPipes() +{ + EnsureStdPipe(STD_INPUT_HANDLE); + EnsureStdPipe(STD_OUTPUT_HANDLE); + EnsureStdPipe(STD_ERROR_HANDLE); +} +#else +static void EnsureStdPipe(int fd) +{ + if (fcntl(fd, F_GETFD) != -1 || errno != EBADF) { + return; + } + + int f = open("/dev/null", fd == STDIN_FILENO ? O_RDONLY : O_WRONLY); + if (f == -1) { + perror("failed to open /dev/null for missing stdio pipe"); + abort(); + } + if (f != fd) { + dup2(f, fd); + close(f); + } +} + +void cmSystemTools::EnsureStdPipes() +{ + EnsureStdPipe(STDIN_FILENO); + EnsureStdPipe(STDOUT_FILENO); + EnsureStdPipe(STDERR_FILENO); +} +#endif + void cmSystemTools::DoNotInheritStdPipes() { #ifdef _WIN32 diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 05bd351..8a87a37 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -435,6 +435,8 @@ public: // not get stuck waiting for all the output on the pipes. static void DoNotInheritStdPipes(); + static void EnsureStdPipes(); + /** Copy the file create/access/modify times from the file named by the first argument to that named by the second. */ static bool CopyFileTime(const std::string& fromFile, diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 5631d10..b137327 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -183,6 +183,7 @@ static void cmakemainProgressCallback(const std::string& m, float prog, int main(int ac, char const* const* av) { + cmSystemTools::EnsureStdPipes(); #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) // Replace streambuf so we can output Unicode to console cmsys::ConsoleBuf::Manager consoleOut(std::cout); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 461021b..3b3630f 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -143,6 +143,7 @@ static const char* cmDocumentationOptions[][2] = { // this is a test driver program for cmCTest. int main(int argc, char const* const* argv) { + cmSystemTools::EnsureStdPipes(); #if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) // Replace streambuf so we can output Unicode to console cmsys::ConsoleBuf::Manager consoleOut(std::cout); diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index ea749ea..1e74bb0 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -443,4 +443,8 @@ function(reject_fifo) endfunction() if(CMAKE_HOST_UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") reject_fifo() + run_cmake_command(closed_stdin sh -c "\"${CMAKE_COMMAND}\" --version <&-") + run_cmake_command(closed_stdout sh -c "\"${CMAKE_COMMAND}\" --version >&-") + run_cmake_command(closed_stderr sh -c "\"${CMAKE_COMMAND}\" --version 2>&-") + run_cmake_command(closed_stdall sh -c "\"${CMAKE_COMMAND}\" --version <&- >&- 2>&-") endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c474fb2777ea3e675237fccf23f64fe37371a5b0 commit c474fb2777ea3e675237fccf23f64fe37371a5b0 Author: Zaytsev Yuriy AuthorDate: Mon Apr 29 22:08:08 2019 +0300 Commit: Brad King CommitDate: Thu May 2 13:01:31 2019 -0400 CPack/IFW: Add StyleSheet field diff --git a/Help/cpack_gen/ifw.rst b/Help/cpack_gen/ifw.rst index e43b1d6..feccd3d 100644 --- a/Help/cpack_gen/ifw.rst +++ b/Help/cpack_gen/ifw.rst @@ -135,6 +135,10 @@ Package Wizard style to be used ("Modern", "Mac", "Aero" or "Classic"). +.. variable:: CPACK_IFW_PACKAGE_STYLE_SHEET + + Filename for a stylesheet. + .. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH Default width of the wizard in pixels. Setting a banner image will override this. diff --git a/Help/release/dev/cpackifw-package-style-sheet.rst b/Help/release/dev/cpackifw-package-style-sheet.rst new file mode 100644 index 0000000..cf99244 --- /dev/null +++ b/Help/release/dev/cpackifw-package-style-sheet.rst @@ -0,0 +1,6 @@ +cpackifw-package-style-sheet +---------------------------- + +* The :cpack_gen:`CPack IFW Generator` gained a new + :variable:`CPACK_IFW_PACKAGE_STYLE_SHEET` variable to customize the + installer stylesheet. diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 01e3ea4..a075a17 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -152,6 +152,15 @@ void cmCPackIFWInstaller::ConfigureFromOptions() } } + // StyleSheet + if (const char* option = this->GetOption("CPACK_IFW_PACKAGE_STYLE_SHEET")) { + if (cmSystemTools::FileExists(option)) { + this->StyleSheet = option; + } else { + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_STYLE_SHEET", option); + } + } + // WizardDefaultWidth if (const char* option = this->GetOption("CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH")) { @@ -381,6 +390,14 @@ void cmCPackIFWInstaller::GenerateInstallerFile() xout.Element("WizardStyle", this->WizardStyle); } + // Stylesheet + if (!this->StyleSheet.empty()) { + std::string name = cmSystemTools::GetFilenameName(this->StyleSheet); + std::string path = this->Directory + "/config/" + name; + cmsys::SystemTools::CopyFileIfDifferent(this->StyleSheet, path); + xout.Element("StyleSheet", name); + } + // WizardDefaultWidth if (!this->WizardDefaultWidth.empty()) { xout.Element("WizardDefaultWidth", this->WizardDefaultWidth); diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index 37ad339..be51fa5 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -72,6 +72,9 @@ public: /// Wizard style name std::string WizardStyle; + /// Filename for a style sheet + std::string StyleSheet; + /// Wizard width std::string WizardDefaultWidth; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c846dbf89ee5b11a74dceb1c19fd7472eb8b075d commit c846dbf89ee5b11a74dceb1c19fd7472eb8b075d Author: Zufu Liu AuthorDate: Thu May 2 10:45:53 2019 +0800 Commit: Zufu Liu CommitDate: Thu May 2 10:57:37 2019 +0800 CMakeDetermineCompilerId: Support versioned LLVM for Visual Studio. Supports versioned LLVM toolsets like LLVM_v142, LLVM_v141, LLVM_v141_xp, etc. for Visual Studio (2010 and later). The name for versioned LLVM toolsets has "LLVM_" prefix plus MSVC toolset name (i.e. v142, v141, v141_xp, etc.). Fixes: #19203 diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index c1c9982..746a806 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -189,7 +189,7 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(id_platform ${CMAKE_VS_PLATFORM_NAME}) set(id_lang "${lang}") set(id_PostBuildEvent_Command "") - if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Ll][Ll][Vv][Mm]$") + if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Ll][Ll][Vv][Mm](_v[0-9]+(_xp)?)?$") set(id_cl_var "ClangClExecutable") elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") set(id_cl clang.exe) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ad699358b6b421da6c49cf540b30eb8b0a3a996 commit 6ad699358b6b421da6c49cf540b30eb8b0a3a996 Author: Fred Baksik AuthorDate: Mon Apr 22 11:01:24 2019 -0400 Commit: Fred Baksik CommitDate: Wed May 1 09:15:51 2019 -0400 cmake: --build -j should not accept 0. Fixes #19059 diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 5b88694..ba47885 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -280,6 +280,9 @@ following options: The :envvar:`CMAKE_BUILD_PARALLEL_LEVEL` environment variable, if set, specifies a default parallel level when this option is not given. + Some native build tools always build in parallel. The use of ```` + value of ``1`` can be used to limit to a single job. + ``--target ..., -t ...`` Build ```` instead of default targets. May be specified multiple times. diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index d70c9d9..d96d956 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -24,6 +24,7 @@ #endif #include +#include #include #include #include @@ -69,7 +70,7 @@ static const char* cmDocumentationUsageNote[][2] = { " --config = For multi-configuration tools, choose .\n" \ " --clean-first = Build target 'clean' first, then build.\n" \ " (To clean only, use --target 'clean'.)\n" \ - " --verbose, -v = Enable verbose output - if supported - including\n" \ + " --verbose, -v = Enable verbose output - if supported - including\n" \ " the build commands to be executed. \n" \ " -- = Pass remaining options to the native tool.\n" @@ -393,7 +394,14 @@ int extract_job_number(int& index, char const* current, char const* next, if (jobString.empty()) { jobs = cmake::DEFAULT_BUILD_PARALLEL_LEVEL; } else if (cmSystemTools::StringToULong(jobString.c_str(), &numJobs)) { - jobs = int(numJobs); + if (numJobs == 0) { + std::cerr + << "The value requires a positive integer argument.\n\n"; + } else if (numJobs > INT_MAX) { + std::cerr << "The value is too large.\n\n"; + } else { + jobs = int(numJobs); + } } else { std::cerr << "'" << command.substr(0, len_of_flag) << "' invalid number '" << jobString << "' given.\n\n"; @@ -505,7 +513,17 @@ static int do_build(int ac, char const* const* av) } else { unsigned long numJobs = 0; if (cmSystemTools::StringToULong(parallel.c_str(), &numJobs)) { - jobs = int(numJobs); + if (numJobs == 0) { + std::cerr << "The CMAKE_BUILD_PARALLEL_LEVEL environment variable " + "requires a positive integer argument.\n\n"; + dir.clear(); + } else if (numJobs > INT_MAX) { + std::cerr << "The CMAKE_BUILD_PARALLEL_LEVEL environment variable " + "is too large.\n\n"; + dir.clear(); + } else { + jobs = int(numJobs); + } } else { std::cerr << "'CMAKE_BUILD_PARALLEL_LEVEL' environment variable\n" << "invalid number '" << parallel << "' given.\n\n"; diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt new file mode 100644 index 0000000..94fc157 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-large-stderr.txt @@ -0,0 +1,3 @@ +^The value is too large\. ++ +Usage: cmake --build \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt new file mode 100644 index 0000000..8ed4fee --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build--parallel-zero-stderr.txt @@ -0,0 +1,3 @@ +^The value requires a positive integer argument\. ++ +Usage: cmake --build \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt new file mode 100644 index 0000000..94fc157 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-large-stderr.txt @@ -0,0 +1,3 @@ +^The value is too large\. ++ +Usage: cmake --build \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt new file mode 100644 index 0000000..8ed4fee --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-jobs-zero-stderr.txt @@ -0,0 +1,3 @@ +^The value requires a positive integer argument\. ++ +Usage: cmake --build \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index ea749ea..49d3608 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -149,6 +149,14 @@ function(run_BuildDir) ${CMAKE_COMMAND} --build BuildDir-build --parallel2) run_cmake_command(BuildDir--build--parallel-no-space-good-number-trailing--target ${CMAKE_COMMAND} -E chdir .. ${CMAKE_COMMAND} --build BuildDir-build --parallel2 --target CustomTarget) + run_cmake_command(BuildDir--build-jobs-zero ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build -j 0) + run_cmake_command(BuildDir--build--parallel-zero ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build --parallel 0) + run_cmake_command(BuildDir--build-jobs-large ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build -j 4294967293) + run_cmake_command(BuildDir--build--parallel-large ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build --parallel 4294967293) # No default jobs for Xcode and FreeBSD build command if(NOT RunCMake_GENERATOR MATCHES "Xcode" AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD") ----------------------------------------------------------------------- Summary of changes: Help/cpack_gen/ifw.rst | 4 ++ Help/manual/cmake.1.rst | 3 + Help/release/dev/cpackifw-package-style-sheet.rst | 6 ++ Modules/CMakeDetermineCompilerId.cmake | 2 +- Source/CPack/IFW/cmCPackIFWInstaller.cxx | 17 ++++++ Source/CPack/IFW/cmCPackIFWInstaller.h | 3 + Source/CPack/cpack.cxx | 1 + Source/CursesDialog/ccmake.cxx | 1 + Source/QtDialog/CMakeSetup.cxx | 1 + Source/cmSystemTools.cxx | 68 +++++++++++++++++++++- Source/cmSystemTools.h | 2 + Source/cmakemain.cxx | 25 +++++++- Source/ctest.cxx | 1 + .../BuildDir--build--parallel-large-result.txt} | 0 ... => BuildDir--build--parallel-large-stderr.txt} | 2 +- .../BuildDir--build--parallel-zero-result.txt} | 0 ...t => BuildDir--build--parallel-zero-stderr.txt} | 2 +- .../BuildDir--build-jobs-large-result.txt} | 0 ...r.txt => BuildDir--build-jobs-large-stderr.txt} | 2 +- .../BuildDir--build-jobs-zero-result.txt} | 0 ...rr.txt => BuildDir--build-jobs-zero-stderr.txt} | 2 +- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 12 ++++ 22 files changed, 144 insertions(+), 10 deletions(-) create mode 100644 Help/release/dev/cpackifw-package-style-sheet.rst copy Tests/RunCMake/{while/MissingArgument-result.txt => CommandLine/BuildDir--build--parallel-large-result.txt} (100%) copy Tests/RunCMake/CommandLine/{BuildDir--build-jobs-no-space-bad-number-stderr.txt => BuildDir--build--parallel-large-stderr.txt} (65%) copy Tests/RunCMake/{while/MissingArgument-result.txt => CommandLine/BuildDir--build--parallel-zero-result.txt} (100%) copy Tests/RunCMake/CommandLine/{BuildDir--build-jobs-no-space-bad-number-stderr.txt => BuildDir--build--parallel-zero-stderr.txt} (54%) copy Tests/RunCMake/{while/MissingArgument-result.txt => CommandLine/BuildDir--build-jobs-large-result.txt} (100%) copy Tests/RunCMake/CommandLine/{BuildDir--build-jobs-no-space-bad-number-stderr.txt => BuildDir--build-jobs-large-stderr.txt} (65%) copy Tests/RunCMake/{while/MissingArgument-result.txt => CommandLine/BuildDir--build-jobs-zero-result.txt} (100%) copy Tests/RunCMake/CommandLine/{BuildDir--build-jobs-no-space-bad-number-stderr.txt => BuildDir--build-jobs-zero-stderr.txt} (54%) hooks/post-receive -- CMake From kwrobot at kitware.com Sat May 4 00:03:07 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 4 May 2019 00:03:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-857-gd3a0582 Message-ID: <20190504040307.E54CC103498@public.kitware.com> 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 d3a0582b0c0095ab95c3610ba93f3d38b5a13620 (commit) from 186ca170da51d64a50bb15bfd067ca9b4c987327 (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=d3a0582b0c0095ab95c3610ba93f3d38b5a13620 commit d3a0582b0c0095ab95c3610ba93f3d38b5a13620 Author: Kitware Robot AuthorDate: Sat May 4 00:01:05 2019 -0400 Commit: Kitware Robot CommitDate: Sat May 4 00:01:05 2019 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a6c9d01..50edb3c 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 14) -set(CMake_VERSION_PATCH 20190503) +set(CMake_VERSION_PATCH 20190504) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun May 5 00:03:04 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 5 May 2019 00:03:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-858-g3771a75 Message-ID: <20190505040304.6DA32F9AE3@public.kitware.com> 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 3771a75d58c253efdbc4579a098e318649aace2b (commit) from d3a0582b0c0095ab95c3610ba93f3d38b5a13620 (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=3771a75d58c253efdbc4579a098e318649aace2b commit 3771a75d58c253efdbc4579a098e318649aace2b Author: Kitware Robot AuthorDate: Sun May 5 00:01:03 2019 -0400 Commit: Kitware Robot CommitDate: Sun May 5 00:01:03 2019 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 50edb3c..9d3f09f 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 14) -set(CMake_VERSION_PATCH 20190504) +set(CMake_VERSION_PATCH 20190505) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon May 6 00:03:05 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 6 May 2019 00:03:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-859-g0f27e7d Message-ID: <20190506040305.CF6411032DD@public.kitware.com> 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 0f27e7d165c96f2c3ada1695df4f6cfaa44afe51 (commit) from 3771a75d58c253efdbc4579a098e318649aace2b (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=0f27e7d165c96f2c3ada1695df4f6cfaa44afe51 commit 0f27e7d165c96f2c3ada1695df4f6cfaa44afe51 Author: Kitware Robot AuthorDate: Mon May 6 00:01:05 2019 -0400 Commit: Kitware Robot CommitDate: Mon May 6 00:01:05 2019 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9d3f09f..6bedd4e 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 14) -set(CMake_VERSION_PATCH 20190505) +set(CMake_VERSION_PATCH 20190506) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon May 6 09:23:05 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 6 May 2019 09:23:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-863-g1820c7e Message-ID: <20190506132305.7194EFADD9@public.kitware.com> 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 1820c7e780e827a509a340835229d7075f5d1d1e (commit) via b9ee95fe5e621037f415de675eb378504170a056 (commit) via e3919bae17d3442e18b5ec1f4a1ae994c87c455b (commit) via 541f079bd7ba7f141218ed93177af4d848e516fa (commit) from 0f27e7d165c96f2c3ada1695df4f6cfaa44afe51 (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=1820c7e780e827a509a340835229d7075f5d1d1e commit 1820c7e780e827a509a340835229d7075f5d1d1e Merge: b9ee95f e3919ba Author: Brad King AuthorDate: Mon May 6 13:18:21 2019 +0000 Commit: Kitware Robot CommitDate: Mon May 6 09:19:38 2019 -0400 Merge topic 'SWIG' e3919bae17 UseSWIG: Manage alternate library name Acked-by: Kitware Robot Merge-request: !3241 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9ee95fe5e621037f415de675eb378504170a056 commit b9ee95fe5e621037f415de675eb378504170a056 Merge: 0f27e7d 541f079 Author: Brad King AuthorDate: Mon May 6 13:18:02 2019 +0000 Commit: Kitware Robot CommitDate: Mon May 6 09:18:28 2019 -0400 Merge topic 'findice-clang-cl' 541f079bd7 FindIce: Support clang-cl by checking CMAKE_CXX_SIMULATE_ID Acked-by: Kitware Robot Merge-request: !3284 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3919bae17d3442e18b5ec1f4a1ae994c87c455b commit e3919bae17d3442e18b5ec1f4a1ae994c87c455b Author: Marc Chevrier AuthorDate: Wed Apr 17 12:23:15 2019 +0200 Commit: Marc Chevrier CommitDate: Fri May 3 18:20:17 2019 +0200 UseSWIG: Manage alternate library name Manage alternate library name by passing -interface for python language or -dllimport for CSharp language to the SWIG compiler. Fixes: #18771 diff --git a/Help/release/dev/UseSWIG-alternate-library-name.rst b/Help/release/dev/UseSWIG-alternate-library-name.rst new file mode 100644 index 0000000..8e58b8d --- /dev/null +++ b/Help/release/dev/UseSWIG-alternate-library-name.rst @@ -0,0 +1,7 @@ +UseSWIG-alternate-library-name +------------------------------ + +* The :module:`UseSWIG` module learned to manage alternate library names by + passing ``-interface `` for ``python`` language or + ``-dllimport `` for ``CSharp`` language to the ``SWIG`` + compiler. diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 18ea55c..c136b05 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -466,7 +466,14 @@ function(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) if(NOT ("-dllimport" IN_LIST swig_source_file_flags OR "-dllimport" IN_LIST SWIG_MODULE_${name}_EXTRA_FLAGS)) # This makes sure that the name used in the generated DllImport # matches the library name created by CMake - list (APPEND SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport" "${name}") + list (APPEND SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport" "$$") + endif() + endif() + if (SWIG_MODULE_${name}_LANGUAGE STREQUAL "PYTHON" AND NOT SWIG_MODULE_${name}_NOPROXY) + if(NOT ("-interface" IN_LIST swig_source_file_flags OR "-interface" IN_LIST SWIG_MODULE_${name}_EXTRA_FLAGS)) + # This makes sure that the name used in the proxy code + # matches the library name created by CMake + list (APPEND SWIG_MODULE_${name}_EXTRA_FLAGS "-interface" "$$") endif() endif() list (APPEND swig_extra_flags ${SWIG_MODULE_${name}_EXTRA_FLAGS}) diff --git a/Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt b/Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt new file mode 100644 index 0000000..a2c239c --- /dev/null +++ b/Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.14...3.15) + +project(TestAlternateLibraryName CXX) + +include(CTest) + +find_package(SWIG REQUIRED) +include(${SWIG_USE_FILE}) + +find_package(Python2 REQUIRED COMPONENTS Interpreter Development) + +# Path separator +if (WIN32) + set (PS "$") +else() + set (PS ":") +endif() + +unset(CMAKE_SWIG_FLAGS) + +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../example.i" PROPERTY CPLUSPLUS ON) +set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../example.i" PROPERTY COMPILE_OPTIONS -includeall) + +swig_add_library(example_python + LANGUAGE python + SOURCES ../example.i ../example.cxx) +set_target_properties (example_python PROPERTIES + INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/.." + SWIG_USE_TARGET_INCLUDE_DIRECTORIES TRUE) +target_link_libraries(example_python PRIVATE Python2::Python) + + +add_test (NAME AlternateLibraryName.example1 + COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}${PS}$" + "${Python2_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py") diff --git a/Tests/UseSWIG/CMakeLists.txt b/Tests/UseSWIG/CMakeLists.txt index 434895e..3cc910f 100644 --- a/Tests/UseSWIG/CMakeLists.txt +++ b/Tests/UseSWIG/CMakeLists.txt @@ -123,3 +123,15 @@ add_test(NAME UseSWIG.SwigSrcFileExtension COMMAND --build-options ${build_options} --test-command ${CMAKE_CTEST_COMMAND} -V -C $ ) + + +add_test(NAME UseSWIG.AlternateLibraryName COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/UseSWIG/AlternateLibraryName" + "${CMake_BINARY_DIR}/Tests/UseSWIG/AlternateLibraryName" + ${build_generator_args} + --build-project TestAlternateLibraryName + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=541f079bd7ba7f141218ed93177af4d848e516fa commit 541f079bd7ba7f141218ed93177af4d848e516fa Author: jspam <5172-jspam at users.noreply.gitlab.kitware.com> AuthorDate: Fri May 3 01:32:14 2019 -0400 Commit: jspam <5172-jspam at users.noreply.gitlab.kitware.com> CommitDate: Fri May 3 01:32:14 2019 -0400 FindIce: Support clang-cl by checking CMAKE_CXX_SIMULATE_ID This applies commit d48bf97f, which does the same for FindBoost, to FindIce. diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index 1e0f0b8..5ce2b42 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -259,7 +259,7 @@ function(_Ice_FIND) endif() unset(vcvers) - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") if(MSVC_TOOLSET_VERSION GREATER_EQUAL 141) set(vcvers "141;140") elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 100) @@ -435,7 +435,7 @@ function(_Ice_FIND) set(component_library "${component}") unset(component_library_release_names) unset(component_library_debug_names) - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") string(REGEX MATCH ".+\\+\\+11$" component_library_cpp11 "${component_library}") if(component_library_cpp11) string(REGEX REPLACE "^(.+)(\\+\\+11)$" "\\1" component_library "${component_library}") ----------------------------------------------------------------------- Summary of changes: .../release/dev/UseSWIG-alternate-library-name.rst | 7 +++++ Modules/FindIce.cmake | 4 +-- Modules/UseSWIG.cmake | 9 +++++- Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt | 35 ++++++++++++++++++++++ Tests/UseSWIG/CMakeLists.txt | 12 ++++++++ 5 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 Help/release/dev/UseSWIG-alternate-library-name.rst create mode 100644 Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt hooks/post-receive -- CMake From kwrobot at kitware.com Mon May 6 09:33:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 6 May 2019 09:33:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-865-gf0185ff Message-ID: <20190506133304.0633BFADD9@public.kitware.com> 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 f0185ff14a1c25dc603e207fbf3cc73457c5990c (commit) via 275b6b3194e09a77247dc863ad5259cee316d6dc (commit) from 1820c7e780e827a509a340835229d7075f5d1d1e (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=f0185ff14a1c25dc603e207fbf3cc73457c5990c commit f0185ff14a1c25dc603e207fbf3cc73457c5990c Merge: 1820c7e 275b6b3 Author: Brad King AuthorDate: Mon May 6 13:32:16 2019 +0000 Commit: Kitware Robot CommitDate: Mon May 6 09:32:25 2019 -0400 Merge topic 'fix_ios_try_compile' 275b6b3194 iOS: Fix try_compile FILE_COPY not to fail Acked-by: Kitware Robot Merge-request: !3272 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=275b6b3194e09a77247dc863ad5259cee316d6dc commit 275b6b3194e09a77247dc863ad5259cee316d6dc Author: Alexandru Croitor AuthorDate: Tue Apr 30 12:41:06 2019 +0200 Commit: Brad King CommitDate: Mon May 6 09:23:27 2019 -0400 iOS: Fix try_compile FILE_COPY not to fail When building for iOS, the compiled target is placed into a bundle. If a single-configuration generator is used, like Makefiles or Ninja, the try_compile FILE_COPY behavior fails to find the bundle, because it only looks for the bundle inside a Debug subfolder (presumably to support a multi-configuration generator like Xcode). Consider looking for the bundle in the root try_compile folder, as well as in the location specified by CMAKE_TRY_COMPILE_CONFIGURATION. Closes: #19211 diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 3892011..037d415 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -1040,7 +1040,14 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName, } searchDirs.emplace_back("/Debug"); #if defined(__APPLE__) - std::string app = "/Debug/" + targetName + ".app"; + std::string app = "/" + targetName + ".app"; + if (config && config[0]) { + std::string tmp = "/"; + tmp += config + app; + searchDirs.push_back(std::move(tmp)); + } + std::string tmp = "/Debug" + app; + searchDirs.emplace_back(std::move(tmp)); searchDirs.push_back(std::move(app)); #endif searchDirs.emplace_back("/Development"); ----------------------------------------------------------------------- Summary of changes: Source/cmCoreTryCompile.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon May 6 09:43:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 6 May 2019 09:43:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-870-gc6f6e2b Message-ID: <20190506134303.C6D5F2121@public.kitware.com> 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 c6f6e2b3053de02de149e80bd6a0f686a6731f68 (commit) via aae79c2d7057fbf20519db857cca6ba3c896a5ed (commit) via 6399e2246ffd1b28d6748730abfd893b6642609b (commit) via 2951d711114d35b7538bf91e38128ea2864772ba (commit) via 34c0293532768e2092fd9fa2ef75e193c04c25f3 (commit) from f0185ff14a1c25dc603e207fbf3cc73457c5990c (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=c6f6e2b3053de02de149e80bd6a0f686a6731f68 commit c6f6e2b3053de02de149e80bd6a0f686a6731f68 Merge: aae79c2 6399e22 Author: Brad King AuthorDate: Mon May 6 09:40:12 2019 -0400 Commit: Brad King CommitDate: Mon May 6 09:40:12 2019 -0400 Merge branch 'release-3.14' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aae79c2d7057fbf20519db857cca6ba3c896a5ed commit aae79c2d7057fbf20519db857cca6ba3c896a5ed Merge: f0185ff 34c0293 Author: Brad King AuthorDate: Mon May 6 13:32:45 2019 +0000 Commit: Kitware Robot CommitDate: Mon May 6 09:33:45 2019 -0400 Merge topic 'FindPython-fix-Python_RUNTIME_LIBRARY_DIRS-variable' 34c0293532 FindPython: ensure variable Python_RUNTIME_LIBRARY_DIRS is set correctly Acked-by: Kitware Robot Merge-request: !3287 ----------------------------------------------------------------------- Summary of changes: Modules/FindPython/Support.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon May 6 09:43:03 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 6 May 2019 09:43:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.14.3-11-g6399e22 Message-ID: <20190506134303.E864FFA5B0@public.kitware.com> 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 6399e2246ffd1b28d6748730abfd893b6642609b (commit) via 2951d711114d35b7538bf91e38128ea2864772ba (commit) via 275b6b3194e09a77247dc863ad5259cee316d6dc (commit) via 34c0293532768e2092fd9fa2ef75e193c04c25f3 (commit) from 463e20c5c6a5c23aeedbe6cf5d163592e783a6d7 (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: Modules/FindPython/Support.cmake | 9 ++++++--- Source/cmCoreTryCompile.cxx | 9 ++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue May 7 00:03:06 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 7 May 2019 00:03:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-871-g9bf6cbc Message-ID: <20190507040306.9F9F91135D8@public.kitware.com> 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 9bf6cbc8f78c616087ded2154c6cb7e04ef33db1 (commit) from c6f6e2b3053de02de149e80bd6a0f686a6731f68 (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=9bf6cbc8f78c616087ded2154c6cb7e04ef33db1 commit 9bf6cbc8f78c616087ded2154c6cb7e04ef33db1 Author: Kitware Robot AuthorDate: Tue May 7 00:01:05 2019 -0400 Commit: Kitware Robot CommitDate: Tue May 7 00:01:05 2019 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6bedd4e..4e8066a 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 14) -set(CMake_VERSION_PATCH 20190506) +set(CMake_VERSION_PATCH 20190507) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue May 7 04:23:05 2019 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 7 May 2019 04:23:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.14.3-873-g37bf503 Message-ID: <20190507082305.9FA0724C9@public.kitware.com> 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 37bf503db268c41d5a337265300357c76bda34ea (commit) via a6a543ced6b29ed32dc6e944dc0aee63db27f17d (commit) from 9bf6cbc8f78c616087ded2154c6cb7e04ef33db1 (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=37bf503db268c41d5a337265300357c76bda34ea commit 37bf503db268c41d5a337265300357c76bda34ea Merge: 9bf6cbc a6a543c Author: Marc Chevrier AuthorDate: Tue May 7 08:15:14 2019 +0000 Commit: Kitware Robot CommitDate: Tue May 7 04:15:46 2019 -0400 Merge topic 'docs-static-lib-link-options' a6a543ced6 Help: Clarify that link options don't apply to static library targets Acked-by: Kitware Robot Merge-request: !3285 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6a543ced6b29ed32dc6e944dc0aee63db27f17d commit a6a543ced6b29ed32dc6e944dc0aee63db27f17d Author: Craig Scott AuthorDate: Sat May 4 15:17:59 2019 +1000 Commit: Craig Scott CommitDate: Sun May 5 19:05:14 2019 +1000 Help: Clarify that link options don't apply to static library targets diff --git a/Help/command/add_link_options.rst b/Help/command/add_link_options.rst index 1b02bee..a83005b 100644 --- a/Help/command/add_link_options.rst +++ b/Help/command/add_link_options.rst @@ -1,20 +1,25 @@ add_link_options ---------------- -Add options to the link of shared library, module and executable targets. +Add options to the link step for executable, shared library or module +library targets in the current directory and below that are added after +this command is invoked. .. code-block:: cmake add_link_options(