From kwrobot at kitware.com Fri Dec 1 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Dec 2017 00:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-472-g6287365 Message-ID: <20171201050507.93DD2102B3E@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 6287365ab090078be306b3199f2e42d8e423311f (commit) from 92b212e87542552a8dd095608098609a3ebe1d6d (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=6287365ab090078be306b3199f2e42d8e423311f commit 6287365ab090078be306b3199f2e42d8e423311f Author: Kitware Robot AuthorDate: Fri Dec 1 00:01:20 2017 -0500 Commit: Kitware Robot CommitDate: Fri Dec 1 00:01:20 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index afba743..305aa87 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 10) -set(CMake_VERSION_PATCH 20171130) +set(CMake_VERSION_PATCH 20171201) #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 Dec 1 08:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Dec 2017 08:05:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-478-g4d0bcc9 Message-ID: <20171201130506.B7E841030C7@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 4d0bcc94c4b965dc08f826d2242248fa3db885b7 (commit) via 340fae777a45c318cf71cd0fbd51bf30194761f2 (commit) via b2f612a0fabfb87e79b60f440c05a2cecde424f0 (commit) via d094b6796a3d9ee91a00f9541416e5d1e9304da8 (commit) via 5fa414594eb4c1ca9e7041eb443d503ff495d90d (commit) via a3e029effd84dc185a9cc12e9b4efd48c70dffa6 (commit) from 6287365ab090078be306b3199f2e42d8e423311f (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=4d0bcc94c4b965dc08f826d2242248fa3db885b7 commit 4d0bcc94c4b965dc08f826d2242248fa3db885b7 Merge: 340fae7 b2f612a Author: Brad King AuthorDate: Fri Dec 1 13:04:17 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:04:21 2017 -0500 Merge topic 'simplify-fallthrough' b2f612a0 Simplify CM_FALLTHROUGH implementation Acked-by: Kitware Robot Merge-request: !1540 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=340fae777a45c318cf71cd0fbd51bf30194761f2 commit 340fae777a45c318cf71cd0fbd51bf30194761f2 Merge: 6287365 d094b67 Author: Brad King AuthorDate: Fri Dec 1 13:03:46 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:03:53 2017 -0500 Merge topic 'update-kwsys' d094b679 Merge branch 'upstream-KWSys' into update-kwsys 5fa41459 KWSys 2017-11-30 (fa1ab7b8) a3e029ef cmStandardLexer.h: Do not include a C++ header Acked-by: Kitware Robot Merge-request: !1539 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2f612a0fabfb87e79b60f440c05a2cecde424f0 commit b2f612a0fabfb87e79b60f440c05a2cecde424f0 Author: Brad King AuthorDate: Thu Nov 30 08:58:01 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 09:50:39 2017 -0500 Simplify CM_FALLTHROUGH implementation Use the macro now provided by KWSys instead of using `try_compile` checks. It will no longer consider the `__attribute__((fallthrough))` variant, but compilers that don't have one of the modern attributes shouldn't warn about not using one anyway. diff --git a/Source/Checks/cm_cxx_attribute_fallthrough.cxx b/Source/Checks/cm_cxx_attribute_fallthrough.cxx deleted file mode 100644 index 50605b7..0000000 --- a/Source/Checks/cm_cxx_attribute_fallthrough.cxx +++ /dev/null @@ -1,11 +0,0 @@ -int main(int argc, char* []) -{ - int i = 3; - switch (argc) { - case 1: - i = 0; - __attribute__((fallthrough)); - default: - return i; - } -} diff --git a/Source/Checks/cm_cxx_fallthrough.cxx b/Source/Checks/cm_cxx_fallthrough.cxx deleted file mode 100644 index 2825bed..0000000 --- a/Source/Checks/cm_cxx_fallthrough.cxx +++ /dev/null @@ -1,11 +0,0 @@ -int main(int argc, char* []) -{ - int i = 3; - switch (argc) { - case 1: - i = 0; - [[fallthrough]]; - default: - return i; - } -} diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index a30a5e6..2704c40 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -41,13 +41,6 @@ function(cm_check_cxx_feature name) endif() endfunction() -cm_check_cxx_feature(fallthrough) -if(NOT CMake_HAVE_CXX_FALLTHROUGH) - cm_check_cxx_feature(gnu_fallthrough) - if(NOT CMake_HAVE_CXX_GNU_FALLTHROUGH) - cm_check_cxx_feature(attribute_fallthrough) - endif() -endif() cm_check_cxx_feature(make_unique) if(CMake_HAVE_CXX_MAKE_UNIQUE) set(CMake_HAVE_CXX_UNIQUE_PTR 1) diff --git a/Source/Checks/cm_cxx_gnu_fallthrough.cxx b/Source/Checks/cm_cxx_gnu_fallthrough.cxx deleted file mode 100644 index ebc15f4..0000000 --- a/Source/Checks/cm_cxx_gnu_fallthrough.cxx +++ /dev/null @@ -1,11 +0,0 @@ -int main(int argc, char* []) -{ - int i = 3; - switch (argc) { - case 1: - i = 0; - [[gnu::fallthrough]]; - default: - return i; - } -} diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 9a78aca..c80439b 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -19,22 +19,11 @@ #cmakedefine HAVE_UNSETENV #cmakedefine CMAKE_USE_ELF_PARSER #cmakedefine CMAKE_USE_MACH_PARSER -#cmakedefine CMake_HAVE_CXX_FALLTHROUGH -#cmakedefine CMake_HAVE_CXX_GNU_FALLTHROUGH -#cmakedefine CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH #cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE #define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@" #define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@" -#if defined(CMake_HAVE_CXX_FALLTHROUGH) -#define CM_FALLTHROUGH [[fallthrough]] -#elif defined(CMake_HAVE_CXX_GNU_FALLTHROUGH) -#define CM_FALLTHROUGH [[gnu::fallthrough]] -#elif defined(CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH) -#define CM_FALLTHROUGH __attribute__((fallthrough)) -#else -#define CM_FALLTHROUGH -#endif +#define CM_FALLTHROUGH cmsys_FALLTHROUGH #define CM_DISABLE_COPY(Class) \ Class(Class const&) = delete; \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d094b6796a3d9ee91a00f9541416e5d1e9304da8 commit d094b6796a3d9ee91a00f9541416e5d1e9304da8 Merge: a3e029e 5fa4145 Author: Brad King AuthorDate: Thu Nov 30 08:52:45 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 08:52:45 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-11-30 (fa1ab7b8) diff --cc Source/kwsys/testConfigure.cxx index 0000000,916dcc1..916dcc1 mode 000000,100644..100644 --- a/Source/kwsys/testConfigure.cxx +++ b/Source/kwsys/testConfigure.cxx https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fa414594eb4c1ca9e7041eb443d503ff495d90d commit 5fa414594eb4c1ca9e7041eb443d503ff495d90d Author: KWSys Upstream AuthorDate: Thu Nov 30 08:15:37 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 08:52:44 2017 -0500 KWSys 2017-11-30 (fa1ab7b8) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit fa1ab7b8d790498359ab1b1bff522a7401a918fc (master). Upstream Shortlog ----------------- Brad King (1): 1b09cf0d Configure: Add KWSYS_FALLTHROUGH macro for C++ code diff --git a/CMakeLists.txt b/CMakeLists.txt index 51f4088..64b6484 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1033,6 +1033,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ) ENDIF() SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} + testConfigure testSystemTools testCommandLineArguments testCommandLineArguments1 diff --git a/Configure.hxx.in b/Configure.hxx.in index 1c07a4e..1e67874 100644 --- a/Configure.hxx.in +++ b/Configure.hxx.in @@ -12,6 +12,31 @@ #define @KWSYS_NAMESPACE at _CXX_HAS_EXT_STDIO_FILEBUF_H \ @KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@ +#if defined(__SUNPRO_CC) && __SUNPRO_CC > 0x5130 && defined(__has_attribute) +#define @KWSYS_NAMESPACE at __has_cpp_attribute(x) __has_attribute(x) +#elif defined(__has_cpp_attribute) +#define @KWSYS_NAMESPACE at __has_cpp_attribute(x) __has_cpp_attribute(x) +#else +#define @KWSYS_NAMESPACE at __has_cpp_attribute(x) 0 +#endif + +#ifndef @KWSYS_NAMESPACE at _FALLTHROUGH +#if __cplusplus >= 201703L && @KWSYS_NAMESPACE at __has_cpp_attribute(fallthrough) +#define @KWSYS_NAMESPACE at _FALLTHROUGH [[fallthrough]] +#elif __cplusplus >= 201103L && \ + @KWSYS_NAMESPACE at __has_cpp_attribute(gnu::fallthrough) +#define @KWSYS_NAMESPACE at _FALLTHROUGH [[gnu::fallthrough]] +#elif __cplusplus >= 201103L && \ + @KWSYS_NAMESPACE at __has_cpp_attribute(clang::fallthrough) +#define @KWSYS_NAMESPACE at _FALLTHROUGH [[clang::fallthrough]] +#endif +#endif +#ifndef @KWSYS_NAMESPACE at _FALLTHROUGH +#define @KWSYS_NAMESPACE at _FALLTHROUGH static_cast(0) +#endif + +#undef @KWSYS_NAMESPACE at __has_cpp_attribute + /* If building a C++ file in kwsys itself, give the source file access to the macros without a configured namespace. */ #if defined(KWSYS_NAMESPACE) @@ -22,6 +47,7 @@ #define KWSYS_STL_HAS_WSTRING @KWSYS_NAMESPACE at _STL_HAS_WSTRING #define KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H \ @KWSYS_NAMESPACE at _CXX_HAS_EXT_STDIO_FILEBUF_H +#define KWSYS_FALLTHROUGH @KWSYS_NAMESPACE at _FALLTHROUGH #endif #endif diff --git a/testConfigure.cxx b/testConfigure.cxx new file mode 100644 index 0000000..916dcc1 --- /dev/null +++ b/testConfigure.cxx @@ -0,0 +1,30 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying +file Copyright.txt or https://cmake.org/licensing#kwsys for details. */ +#include "kwsysPrivate.h" +#include KWSYS_HEADER(Configure.hxx) + +// Work-around CMake dependency scanning limitation. This must +// duplicate the above list of headers. +#if 0 +#include "Configure.hxx.in" +#endif + +static bool testFallthrough(int n) +{ + int r = 0; + switch (n) { + case 1: + ++r; + KWSYS_FALLTHROUGH; + default: + ++r; + } + return r == 2; +} + +int testConfigure(int, char* []) +{ + bool res = true; + res = testFallthrough(1) && res; + return res ? 0 : 1; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3e029effd84dc185a9cc12e9b4efd48c70dffa6 commit a3e029effd84dc185a9cc12e9b4efd48c70dffa6 Author: Brad King AuthorDate: Thu Nov 30 08:46:06 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 08:46:06 2017 -0500 cmStandardLexer.h: Do not include a C++ header This header is meant for inclusion in lexer `.c` files. diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h index c9f42e4..b212c7e 100644 --- a/Source/cmStandardLexer.h +++ b/Source/cmStandardLexer.h @@ -3,7 +3,7 @@ #ifndef cmStandardLexer_h #define cmStandardLexer_h -#include "cmConfigure.h" // IWYU pragma: keep +#include "cmsys/Configure.h" // IWYU pragma: keep /* Disable some warnings. */ #if defined(_MSC_VER) ----------------------------------------------------------------------- Summary of changes: Source/Checks/cm_cxx_attribute_fallthrough.cxx | 11 --------- Source/Checks/cm_cxx_fallthrough.cxx | 11 --------- Source/Checks/cm_cxx_features.cmake | 7 ------ Source/Checks/cm_cxx_gnu_fallthrough.cxx | 11 --------- Source/cmConfigure.cmake.h.in | 13 +--------- Source/cmStandardLexer.h | 2 +- Source/kwsys/CMakeLists.txt | 1 + Source/kwsys/Configure.hxx.in | 26 ++++++++++++++++++++ Source/kwsys/testConfigure.cxx | 30 ++++++++++++++++++++++++ 9 files changed, 59 insertions(+), 53 deletions(-) delete mode 100644 Source/Checks/cm_cxx_attribute_fallthrough.cxx delete mode 100644 Source/Checks/cm_cxx_fallthrough.cxx delete mode 100644 Source/Checks/cm_cxx_gnu_fallthrough.cxx create mode 100644 Source/kwsys/testConfigure.cxx hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 1 08:15:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Dec 2017 08:15:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-480-g006a495 Message-ID: <20171201131503.5E73D10294C@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 006a4956a296ed5a9c01fbd5c242c240dc3aac99 (commit) via 4a3c19a5835de0049cdb2acea7be8ffeaff08aba (commit) from 4d0bcc94c4b965dc08f826d2242248fa3db885b7 (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=006a4956a296ed5a9c01fbd5c242c240dc3aac99 commit 006a4956a296ed5a9c01fbd5c242c240dc3aac99 Merge: 4d0bcc9 4a3c19a Author: Brad King AuthorDate: Fri Dec 1 13:11:01 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:11:07 2017 -0500 Merge topic 'fixCMakeVersionRC' 4a3c19a5 Windows: Fix version embedding in CMake binaries Acked-by: Kitware Robot Merge-request: !1536 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a3c19a5835de0049cdb2acea7be8ffeaff08aba commit 4a3c19a5835de0049cdb2acea7be8ffeaff08aba Author: Justin Goshi AuthorDate: Wed Nov 29 12:48:26 2017 -0800 Commit: Brad King CommitDate: Thu Nov 30 10:42:26 2017 -0500 Windows: Fix version embedding in CMake binaries In commit 5b9da05b7a (Windows: Embed version information into CMake binaries, 2017-10-25) we left out `` since MinGW does not have the header, but it is needed for the `VS_VERSION_INFO` macro. Provide the macro ourselves. Suggested-by: Christian Pfeiffer diff --git a/Source/CMakeVersion.rc.in b/Source/CMakeVersion.rc.in index f4ca3d5..60e14e5 100644 --- a/Source/CMakeVersion.rc.in +++ b/Source/CMakeVersion.rc.in @@ -7,6 +7,9 @@ #define VER_PRODUCTVERSION @CMake_VERSION_MAJOR@, at CMake_VERSION_MINOR@, at CMake_VERSION_PATCH@ #define VER_PRODUCTVERSION_STR "@CMake_VERSION@\0" +/* Version-information resource identifier. */ +#define VS_VERSION_INFO 1 + VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION PRODUCTVERSION VER_PRODUCTVERSION ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.rc.in | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 1 08:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Dec 2017 08:25:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-492-g22e67bc Message-ID: <20171201132506.6BE9C102E92@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 22e67bc6bb138d1fb09555f1fdeaaba14312d3da (commit) via e61c1cf64c4f39b00e0f8ed81466e85c773d9ba2 (commit) via 47c326c36bff1669f17ea2d89c49dc9152f8268a (commit) via 3c6dab8b72c1a0736a5ddb4c470cf7b7b544ceb1 (commit) via 375eca7881bceabf591a4fc278c198657aafbd5e (commit) via 3bcaa870078d875b65f17d82661a133f6d5cbdfc (commit) via dd700e9bfb2a498632845e76ce95dd38bb866a7b (commit) via 8112059ee7f38f0eb5cdcaba8185aec659abcbfc (commit) via 32cfa7b324de799eefb2f7370fb54b700d1a87a5 (commit) via 9af5f6727716ab8b9b61815ec67e1c4ffe1213b6 (commit) via b0e2f1415e680337f4b70b19e319efeba0eb6f12 (commit) via 85457b63c859f238ef324757f1042cc846cedbc7 (commit) from 006a4956a296ed5a9c01fbd5c242c240dc3aac99 (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=22e67bc6bb138d1fb09555f1fdeaaba14312d3da commit 22e67bc6bb138d1fb09555f1fdeaaba14312d3da Merge: e61c1cf 8112059 Author: Brad King AuthorDate: Fri Dec 1 13:24:05 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:24:08 2017 -0500 Merge topic 'simplify_target_link_libraries' 8112059e target_link_libraries: Simplify implementation and add comments. b0e2f141 target_link_libraries: Slightly fix some error-messages. 85457b63 target_link_libraries: Return earlier on some error. Acked-by: Kitware Robot Merge-request: !1531 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e61c1cf64c4f39b00e0f8ed81466e85c773d9ba2 commit e61c1cf64c4f39b00e0f8ed81466e85c773d9ba2 Merge: 47c326c 3bcaa87 Author: Brad King AuthorDate: Fri Dec 1 13:22:43 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:22:49 2017 -0500 Merge topic 'libuv-raii' 3bcaa870 cmUVHandlePtr: Add uv_process_ptr dd700e9b cmUVHandlePtr: Add uv_timer_ptr 32cfa7b3 cmUVHandlePtr: Move to CMakeLib to make it available everywhere Acked-by: Kitware Robot Merge-request: !1541 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47c326c36bff1669f17ea2d89c49dc9152f8268a commit 47c326c36bff1669f17ea2d89c49dc9152f8268a Merge: 3c6dab8 375eca7 Author: Brad King AuthorDate: Fri Dec 1 13:18:08 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:18:12 2017 -0500 Merge topic 'bootstrap-clang-5' 375eca78 bootstrap: Check support for unordered_map from compiler mode Acked-by: Kitware Robot Merge-request: !1542 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c6dab8b72c1a0736a5ddb4c470cf7b7b544ceb1 commit 3c6dab8b72c1a0736a5ddb4c470cf7b7b544ceb1 Merge: 006a495 9af5f67 Author: Brad King AuthorDate: Fri Dec 1 13:15:40 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:15:51 2017 -0500 Merge topic 'fix-cmake-server-bad-buffering-test' 9af5f672 test: Updated server test harness to try to cause fragmentation Acked-by: Kitware Robot Merge-request: !1508 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=375eca7881bceabf591a4fc278c198657aafbd5e commit 375eca7881bceabf591a4fc278c198657aafbd5e Author: Adam Ciarci?ski AuthorDate: Thu Nov 30 13:57:12 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 14:01:26 2017 -0500 bootstrap: Check support for unordered_map from compiler mode Some versions of clang 5 (with libc++) have a problem with `unordered_map` under `-std=gnu++1z`: /usr/include/c++/__hash_table:1134:43: error: conflicting types for '__hash_table<_Tp, _Hash, _Equal, _Alloc>' Include `unordered_map` in our test source so that we reject this combination and fall back to an older C++ standard flag. Fixes: #17526 diff --git a/bootstrap b/bootstrap index 47f7e76..6da87e7 100755 --- a/bootstrap +++ b/bootstrap @@ -1056,6 +1056,7 @@ TMPFILE=`cmake_tmp_file` echo ' #include #include +#include #if __cplusplus < 201103L #error "Compiler is not in a mode aware of C++11." https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3bcaa870078d875b65f17d82661a133f6d5cbdfc commit 3bcaa870078d875b65f17d82661a133f6d5cbdfc Author: Brad King AuthorDate: Thu Nov 30 11:26:25 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 13:43:43 2017 -0500 cmUVHandlePtr: Add uv_process_ptr diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx index 78819a5..d7e38c3 100644 --- a/Source/cmUVHandlePtr.cxx +++ b/Source/cmUVHandlePtr.cxx @@ -172,6 +172,13 @@ uv_pipe_ptr::operator uv_stream_t*() const } #ifdef CMAKE_BUILD_WITH_CMAKE +int uv_process_ptr::spawn(uv_loop_t& loop, uv_process_options_t const& options, + void* data) +{ + allocate(data); + return uv_spawn(&loop, *this, &options); +} + int uv_timer_ptr::init(uv_loop_t& loop, void* data) { allocate(data); @@ -211,6 +218,8 @@ UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(stream) #ifdef CMAKE_BUILD_WITH_CMAKE UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(async) +UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(process) + UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(timer) UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(tty) diff --git a/Source/cmUVHandlePtr.h b/Source/cmUVHandlePtr.h index d3df69c..a6ce565 100644 --- a/Source/cmUVHandlePtr.h +++ b/Source/cmUVHandlePtr.h @@ -165,6 +165,14 @@ struct uv_pipe_ptr : public uv_handle_ptr_ int init(uv_loop_t& loop, int ipc, void* data = nullptr); }; +struct uv_process_ptr : public uv_handle_ptr_ +{ + CM_PERFECT_FWD_CTOR(uv_process_ptr, uv_handle_ptr_); + + int spawn(uv_loop_t& loop, uv_process_options_t const& options, + void* data = nullptr); +}; + struct uv_timer_ptr : public uv_handle_ptr_ { CM_PERFECT_FWD_CTOR(uv_timer_ptr, uv_handle_ptr_); @@ -200,6 +208,8 @@ UV_HANDLE_PTR_INSTANTIATE_EXTERN(signal) UV_HANDLE_PTR_INSTANTIATE_EXTERN(pipe) +UV_HANDLE_PTR_INSTANTIATE_EXTERN(process) + UV_HANDLE_PTR_INSTANTIATE_EXTERN(stream) UV_HANDLE_PTR_INSTANTIATE_EXTERN(timer) diff --git a/Tests/CMakeLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx index bb3493f..44def25 100644 --- a/Tests/CMakeLib/testUVRAII.cxx +++ b/Tests/CMakeLib/testUVRAII.cxx @@ -157,6 +157,7 @@ static bool testAllMoves() uv_stream_ptr _7; uv_timer_ptr _8; uv_tty_ptr _9; + uv_process_ptr _11; uv_pipe_ptr _12; uv_async_ptr _13; uv_signal_ptr _14; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd700e9bfb2a498632845e76ce95dd38bb866a7b commit dd700e9bfb2a498632845e76ce95dd38bb866a7b Author: Brad King AuthorDate: Thu Nov 30 11:19:04 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 13:26:35 2017 -0500 cmUVHandlePtr: Add uv_timer_ptr diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx index 8ba93e5..78819a5 100644 --- a/Source/cmUVHandlePtr.cxx +++ b/Source/cmUVHandlePtr.cxx @@ -172,6 +172,18 @@ uv_pipe_ptr::operator uv_stream_t*() const } #ifdef CMAKE_BUILD_WITH_CMAKE +int uv_timer_ptr::init(uv_loop_t& loop, void* data) +{ + allocate(data); + return uv_timer_init(&loop, *this); +} + +int uv_timer_ptr::start(uv_timer_cb cb, uint64_t timeout, uint64_t repeat) +{ + assert(handle); + return uv_timer_start(*this, cb, timeout, repeat); +} + uv_tty_ptr::operator uv_stream_t*() const { return reinterpret_cast(handle.get()); @@ -199,6 +211,8 @@ UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(stream) #ifdef CMAKE_BUILD_WITH_CMAKE UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(async) +UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(timer) + UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(tty) #endif } diff --git a/Source/cmUVHandlePtr.h b/Source/cmUVHandlePtr.h index a251c5f..d3df69c 100644 --- a/Source/cmUVHandlePtr.h +++ b/Source/cmUVHandlePtr.h @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -164,6 +165,15 @@ struct uv_pipe_ptr : public uv_handle_ptr_ int init(uv_loop_t& loop, int ipc, void* data = nullptr); }; +struct uv_timer_ptr : public uv_handle_ptr_ +{ + CM_PERFECT_FWD_CTOR(uv_timer_ptr, uv_handle_ptr_); + + int init(uv_loop_t& loop, void* data = nullptr); + + int start(uv_timer_cb cb, uint64_t timeout, uint64_t repeat); +}; + struct uv_tty_ptr : public uv_handle_ptr_ { CM_PERFECT_FWD_CTOR(uv_tty_ptr, uv_handle_ptr_); @@ -192,6 +202,8 @@ UV_HANDLE_PTR_INSTANTIATE_EXTERN(pipe) UV_HANDLE_PTR_INSTANTIATE_EXTERN(stream) +UV_HANDLE_PTR_INSTANTIATE_EXTERN(timer) + UV_HANDLE_PTR_INSTANTIATE_EXTERN(tty) #undef UV_HANDLE_PTR_INSTANTIATE_EXTERN diff --git a/Tests/CMakeLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx index 7ecef39..bb3493f 100644 --- a/Tests/CMakeLib/testUVRAII.cxx +++ b/Tests/CMakeLib/testUVRAII.cxx @@ -155,6 +155,7 @@ static bool testAllMoves() struct allTypes { uv_stream_ptr _7; + uv_timer_ptr _8; uv_tty_ptr _9; uv_pipe_ptr _12; uv_async_ptr _13; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8112059ee7f38f0eb5cdcaba8185aec659abcbfc commit 8112059ee7f38f0eb5cdcaba8185aec659abcbfc Author: Deniz Bahadir AuthorDate: Mon Nov 27 22:30:26 2017 +0100 Commit: Deniz Bahadir CommitDate: Thu Nov 30 17:35:25 2017 +0100 target_link_libraries: Simplify implementation and add comments. The implementation of `target_link_libraries` did grow over the years when new features where added. This commit cleans up the implementation and adds comments to better document its intention. The behavior of `target_link_libraries` itself is left untouched. diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 65ab544..97bb0a2 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -25,16 +25,17 @@ const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] = { bool cmTargetLinkLibrariesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - // must have one argument + // Must have at least one argument. if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } - + // Alias targets cannot be on the LHS of this command. if (this->Makefile->IsAlias(args[0])) { this->SetError("can not be used on an ALIAS target."); return false; } + // Lookup the target for which libraries are specified. this->Target = this->Makefile->GetCMakeInstance()->GetGlobalGenerator()->FindTarget( @@ -78,8 +79,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( break; } } - - // now actually print the message + // Now actually print the message. switch (t) { case cmake::AUTHOR_WARNING: this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, e.str()); @@ -94,6 +94,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( return true; } + // OBJECT libraries are not allowed on the LHS of the command. if (this->Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Object library target \"" << args[0] << "\" " @@ -103,6 +104,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( return true; } + // Having a UTILITY library on the LHS is a bug. if (this->Target->GetType() == cmStateEnums::UTILITY) { std::ostringstream e; const char* modal = nullptr; @@ -129,7 +131,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( } } - // but we might not have any libs after variable expansion + // But we might not have any libs after variable expansion. if (args.size() < 2) { return true; } @@ -142,8 +144,8 @@ bool cmTargetLinkLibrariesCommand::InitialPass( // specification if the keyword is encountered as the first argument. this->CurrentProcessingState = ProcessingLinkLibraries; - // add libraries, note that there is an optional prefix - // of debug and optimized that can be used + // Add libraries, note that there is an optional prefix + // of debug and optimized that can be used. for (unsigned int i = 1; i < args.size(); ++i) { if (args[i] == "LINK_INTERFACE_LIBRARIES") { this->CurrentProcessingState = ProcessingPlainLinkInterface; @@ -366,10 +368,13 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, } } - // Handle normal case first. + // Handle normal case where the command was called with another keyword than + // INTERFACE / LINK_INTERFACE_LIBRARIES or none at all. (The "LINK_LIBRARIES" + // property of the target on the LHS shall be populated.) if (this->CurrentProcessingState != ProcessingKeywordLinkInterface && this->CurrentProcessingState != ProcessingPlainLinkInterface) { + // Assure that the target on the LHS was created in the current directory. cmTarget* t = this->Makefile->FindLocalNonAliasTarget(this->Target->GetName()); if (!t) { @@ -408,72 +413,80 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, } this->Target->AddLinkLibrary(*this->Makefile, lib, llt); + } - if (this->CurrentProcessingState == ProcessingLinkLibraries) { - this->Target->AppendProperty( - "INTERFACE_LINK_LIBRARIES", - this->Target->GetDebugGeneratorExpressions(lib, llt).c_str()); - return true; - } - if (this->CurrentProcessingState != ProcessingKeywordPublicInterface && - this->CurrentProcessingState != ProcessingPlainPublicInterface) { - if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { - std::string configLib = - this->Target->GetDebugGeneratorExpressions(lib, llt); - if (cmGeneratorExpression::IsValidTargetName(lib) || - cmGeneratorExpression::Find(lib) != std::string::npos) { - configLib = "$"; - } - this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES", - configLib.c_str()); + // Handle (additional) case where the command was called with PRIVATE / + // LINK_PRIVATE and stop its processing. (The "INTERFACE_LINK_LIBRARIES" + // property of the target on the LHS shall only be populated if it is a + // STATIC library.) + if (this->CurrentProcessingState == ProcessingKeywordPrivateInterface || + this->CurrentProcessingState == ProcessingPlainPrivateInterface) { + if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { + std::string configLib = + this->Target->GetDebugGeneratorExpressions(lib, llt); + if (cmGeneratorExpression::IsValidTargetName(lib) || + cmGeneratorExpression::Find(lib) != std::string::npos) { + configLib = "$"; } - // Not a 'public' or 'interface' library. Do not add to interface - // property. - return true; + this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES", + configLib.c_str()); } + return true; } + // Handle general case where the command was called with another keyword than + // PRIVATE / LINK_PRIVATE or none at all. (The "INTERFACE_LINK_LIBRARIES" + // property of the target on the LHS shall be populated.) this->Target->AppendProperty( "INTERFACE_LINK_LIBRARIES", this->Target->GetDebugGeneratorExpressions(lib, llt).c_str()); + // Stop processing if called without any keyword. + if (this->CurrentProcessingState == ProcessingLinkLibraries) { + return true; + } + // Stop processing if policy CMP0022 is set to NEW. const cmPolicies::PolicyStatus policy22Status = this->Target->GetPolicyStatusCMP0022(); - if (policy22Status != cmPolicies::OLD && policy22Status != cmPolicies::WARN) { return true; } - + // Stop processing if called with an INTERFACE library on the LHS. if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { return true; } - // Get the list of configurations considered to be DEBUG. - std::vector debugConfigs = - this->Makefile->GetCMakeInstance()->GetDebugConfigs(); - std::string prop; - - // Include this library in the link interface for the target. - if (llt == DEBUG_LibraryType || llt == GENERAL_LibraryType) { - // Put in the DEBUG configuration interfaces. - for (std::string const& dc : debugConfigs) { - prop = "LINK_INTERFACE_LIBRARIES_"; - prop += dc; - this->Target->AppendProperty(prop, lib.c_str()); + // Handle (additional) backward-compatibility case where the command was + // called with PUBLIC / INTERFACE / LINK_PUBLIC / LINK_INTERFACE_LIBRARIES. + // (The policy CMP0022 is not set to NEW.) + { + // Get the list of configurations considered to be DEBUG. + std::vector debugConfigs = + this->Makefile->GetCMakeInstance()->GetDebugConfigs(); + std::string prop; + + // Include this library in the link interface for the target. + if (llt == DEBUG_LibraryType || llt == GENERAL_LibraryType) { + // Put in the DEBUG configuration interfaces. + for (std::string const& dc : debugConfigs) { + prop = "LINK_INTERFACE_LIBRARIES_"; + prop += dc; + this->Target->AppendProperty(prop, lib.c_str()); + } } - } - if (llt == OPTIMIZED_LibraryType || llt == GENERAL_LibraryType) { - // Put in the non-DEBUG configuration interfaces. - this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib.c_str()); - - // Make sure the DEBUG configuration interfaces exist so that the - // general one will not be used as a fall-back. - for (std::string const& dc : debugConfigs) { - prop = "LINK_INTERFACE_LIBRARIES_"; - prop += dc; - if (!this->Target->GetProperty(prop)) { - this->Target->SetProperty(prop, ""); + if (llt == OPTIMIZED_LibraryType || llt == GENERAL_LibraryType) { + // Put in the non-DEBUG configuration interfaces. + this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib.c_str()); + + // Make sure the DEBUG configuration interfaces exist so that the + // general one will not be used as a fall-back. + for (std::string const& dc : debugConfigs) { + prop = "LINK_INTERFACE_LIBRARIES_"; + prop += dc; + if (!this->Target->GetProperty(prop)) { + this->Target->SetProperty(prop, ""); + } } } } diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h index f41af49..a2f3ecd 100644 --- a/Source/cmTargetLinkLibrariesCommand.h +++ b/Source/cmTargetLinkLibrariesCommand.h @@ -20,6 +20,9 @@ class cmTarget; * cmTargetLinkLibrariesCommand is used to specify a list of libraries to link * into executable(s) or shared objects. The names of the libraries * should be those defined by the LIBRARY(library) command(s). + * + * Additionally, it allows to propagate usage-requirements (including link + * libraries) from one target into another. */ class cmTargetLinkLibrariesCommand : public cmCommand { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32cfa7b324de799eefb2f7370fb54b700d1a87a5 commit 32cfa7b324de799eefb2f7370fb54b700d1a87a5 Author: Brad King AuthorDate: Thu Nov 30 11:11:54 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 11:19:31 2017 -0500 cmUVHandlePtr: Move to CMakeLib to make it available everywhere diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 88c63e1..5611e55 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -348,6 +348,8 @@ set(SRCS cmTestGenerator.cxx cmTestGenerator.h cmUuid.cxx + cmUVHandlePtr.cxx + cmUVHandlePtr.h cmVariableWatch.cxx cmVariableWatch.h cmVersion.cxx @@ -1029,7 +1031,6 @@ list(APPEND _tools cmake) target_link_libraries(cmake CMakeLib) add_library(CMakeServerLib - cmUVHandlePtr.h cmUVHandlePtr.cxx cmConnection.h cmConnection.cxx cmFileMonitor.cxx cmFileMonitor.h cmPipeConnection.cxx cmPipeConnection.h diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx index 214c7b2..8ba93e5 100644 --- a/Source/cmUVHandlePtr.cxx +++ b/Source/cmUVHandlePtr.cxx @@ -82,6 +82,7 @@ uv_handle_ptr_::operator T*() const return this->handle.get(); } +#ifdef CMAKE_BUILD_WITH_CMAKE template <> struct uv_handle_deleter { @@ -126,6 +127,7 @@ int uv_async_ptr::init(uv_loop_t& loop, uv_async_cb async_cb, void* data) allocate(data); return uv_async_init(&loop, handle.get(), async_cb); } +#endif template <> struct uv_handle_deleter @@ -169,6 +171,7 @@ uv_pipe_ptr::operator uv_stream_t*() const return reinterpret_cast(handle.get()); } +#ifdef CMAKE_BUILD_WITH_CMAKE uv_tty_ptr::operator uv_stream_t*() const { return reinterpret_cast(handle.get()); @@ -179,6 +182,7 @@ int uv_tty_ptr::init(uv_loop_t& loop, int fd, int readable, void* data) allocate(data); return uv_tty_init(&loop, *this, fd, readable); } +#endif template class uv_handle_ptr_base_; @@ -186,13 +190,15 @@ template class uv_handle_ptr_base_; template class uv_handle_ptr_base_; \ template class uv_handle_ptr_; -UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(async) - UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(signal) UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(pipe) UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(stream) +#ifdef CMAKE_BUILD_WITH_CMAKE +UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(async) + UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(tty) +#endif } diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index d1a1df5..9f09185 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -12,6 +12,7 @@ set(CMakeLib_TESTS testXMLParser testXMLSafe testFindPackageCommand + testUVRAII ) set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR}) @@ -31,6 +32,9 @@ create_test_sourcelist(CMakeLib_TEST_SRCS CMakeLibTests.cxx ${CMakeLib_TESTS}) add_executable(CMakeLibTests ${CMakeLib_TEST_SRCS}) target_link_libraries(CMakeLibTests CMakeLib) +set_property(TARGET CMakeLibTests PROPERTY C_CLANG_TIDY "") +set_property(TARGET CMakeLibTests PROPERTY CXX_CLANG_TIDY "") + add_executable(testEncoding testEncoding.cxx) target_link_libraries(testEncoding cmsys) diff --git a/Tests/CMakeServerLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx similarity index 100% rename from Tests/CMakeServerLib/testUVRAII.cxx rename to Tests/CMakeLib/testUVRAII.cxx diff --git a/Tests/CMakeServerLib/CMakeLists.txt b/Tests/CMakeServerLib/CMakeLists.txt index f1ca2a4..5e1ad0c 100644 --- a/Tests/CMakeServerLib/CMakeLists.txt +++ b/Tests/CMakeServerLib/CMakeLists.txt @@ -6,7 +6,6 @@ include_directories( set(CMakeServerLib_TESTS testServerBuffering - testUVRAII ) create_test_sourcelist(CMakeLib_TEST_SRCS CMakeServerLibTests.cxx ${CMakeServerLib_TESTS}) diff --git a/bootstrap b/bootstrap index ab087e9..45f9c2d 100755 --- a/bootstrap +++ b/bootstrap @@ -418,6 +418,7 @@ CMAKE_CXX_SOURCES="\ cmTryRunCommand \ cmUnexpectedCommand \ cmUnsetCommand \ + cmUVHandlePtr \ cmVersion \ cmWhileCommand \ cmWorkingDirectory \ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9af5f6727716ab8b9b61815ec67e1c4ffe1213b6 commit 9af5f6727716ab8b9b61815ec67e1c4ffe1213b6 Author: Justin Berger AuthorDate: Mon Nov 20 08:31:56 2017 -0700 Commit: Justin Berger CommitDate: Wed Nov 29 12:35:42 2017 -0700 test: Updated server test harness to try to cause fragmentation diff --git a/Tests/Server/cmakelib.py b/Tests/Server/cmakelib.py index 39e3618..6e8761a 100644 --- a/Tests/Server/cmakelib.py +++ b/Tests/Server/cmakelib.py @@ -100,6 +100,14 @@ def waitForRawMessage(cmakeCommand): return jsonPayload stdoutdata = stdoutdata[(end+len(']== "CMake Server" ==]')):] +# Python2 has no problem writing the output of encodes directly, +# but Python3 returns only 'int's for encode and so must be turned +# into bytes. We use the existence of 'to_bytes' on an int to +# determine which behavior is appropriate. It might be more clear +# to do this in the code which uses the flag, but introducing +# this lookup cost at every byte sent isn't ideal. +has_to_bytes = "to_bytes" in dir(10) + def writeRawData(cmakeCommand, content): writeRawData.counter += 1 payload = """ @@ -116,7 +124,25 @@ def writeRawData(cmakeCommand, content): if print_communication: printClient(content, "(Use \\r\\n:", rn, ")") - cmakeCommand.write(payload.encode('utf-8')) + # To stress test how cmake deals with fragmentation in the + # communication channel, we send only one byte at a time. + # Certain communication methods / platforms might still buffer + # it all into one message since its so close together, but in + # general this will catch places where we assume full buffers + # come in all at once. + encoded_payload = payload.encode('utf-8') + + # Python version 3+ can't write ints directly; but 'to_bytes' + # for int was only added in python 3.2. If this is a 3+ version + # of python without that conversion function; just write the whole + # thing out at once. + if sys.version_info[0] > 2 and not has_to_bytes: + cmakeCommand.write(encoded_payload) + else: + for c in encoded_payload: + if has_to_bytes: + c = c.to_bytes(1, byteorder='big') + cmakeCommand.write(c) writeRawData.counter = 0 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0e2f1415e680337f4b70b19e319efeba0eb6f12 commit b0e2f1415e680337f4b70b19e319efeba0eb6f12 Author: Deniz Bahadir AuthorDate: Mon Nov 27 22:11:11 2017 +0100 Commit: Deniz Bahadir CommitDate: Wed Nov 29 17:01:47 2017 +0100 target_link_libraries: Slightly fix some error-messages. Some error-messages are slightly adjusted to better tell what invocation would be correct instead. Tests are adjusted accordingly. diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index ec060cd..65ab544 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -160,8 +160,9 @@ bool cmTargetLinkLibrariesCommand::InitialPass( this->CurrentProcessingState != ProcessingKeywordPublicInterface && this->CurrentProcessingState != ProcessingKeywordLinkInterface) { this->Makefile->IssueMessage( - cmake::FATAL_ERROR, "The INTERFACE option must appear as the second " - "argument, just after the target name."); + cmake::FATAL_ERROR, + "The INTERFACE, PUBLIC or PRIVATE option must appear as the second " + "argument, just after the target name."); return true; } this->CurrentProcessingState = ProcessingKeywordLinkInterface; @@ -183,7 +184,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( this->CurrentProcessingState != ProcessingKeywordLinkInterface) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, - "The PUBLIC or PRIVATE option must appear as the second " + "The INTERFACE, PUBLIC or PRIVATE option must appear as the second " "argument, just after the target name."); return true; } @@ -206,7 +207,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( this->CurrentProcessingState != ProcessingKeywordLinkInterface) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, - "The PUBLIC or PRIVATE option must appear as the second " + "The INTERFACE, PUBLIC or PRIVATE option must appear as the second " "argument, just after the target name."); return true; } @@ -349,12 +350,11 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, // form must be the plain form. const char* existingSig = (sig == cmTarget::KeywordTLLSignature ? "plain" : "keyword"); - e << "The " << existingSig << " signature for target_link_libraries " - "has already been used with the target \"" - << this->Target->GetName() << "\". All uses of " - "target_link_libraries with a target " - << modal << " be either " - "all-keyword or all-plain.\n"; + e << "The " << existingSig << " signature for target_link_libraries has " + "already been used with the target \"" + << this->Target->GetName() + << "\". All uses of target_link_libraries with a target " << modal + << " be either all-keyword or all-plain.\n"; this->Target->GetTllSignatureTraces(e, sig == cmTarget::KeywordTLLSignature ? cmTarget::PlainTLLSignature @@ -401,9 +401,9 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, std::ostringstream e; e << "Target \"" << lib << "\" of type " << cmState::GetTargetTypeName(tgt->GetType()) - << " may not be linked into another target. " - << "One may link only to STATIC or SHARED libraries, or " - << "to executables with the ENABLE_EXPORTS property set."; + << " may not be linked into another target. One may link only to " + "INTERFACE, STATIC or SHARED libraries, or to executables with the " + "ENABLE_EXPORTS property set."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } diff --git a/Tests/RunCMake/ObjectLibrary/LinkObjRHS1-stderr.txt b/Tests/RunCMake/ObjectLibrary/LinkObjRHS1-stderr.txt index 8809f89..d5ee4f9 100644 --- a/Tests/RunCMake/ObjectLibrary/LinkObjRHS1-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/LinkObjRHS1-stderr.txt @@ -1,6 +1,6 @@ CMake Error at LinkObjRHS1.cmake:3 \(target_link_libraries\): Target "AnObjLib" of type OBJECT_LIBRARY may not be linked into another - target. One may link only to STATIC or SHARED libraries, or to executables - with the ENABLE_EXPORTS property set. + target. One may link only to INTERFACE, STATIC or SHARED libraries, or to + executables with the ENABLE_EXPORTS property set. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt b/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt index a0c66db..c6237f4 100644 --- a/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt @@ -1,5 +1,5 @@ CMake Error at MixedSignature.cmake:6 \(target_link_libraries\): - The PUBLIC or PRIVATE option must appear as the second argument, just after - the target name. + The INTERFACE, PUBLIC or PRIVATE option must appear as the second argument, + just after the target name. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85457b63c859f238ef324757f1042cc846cedbc7 commit 85457b63c859f238ef324757f1042cc846cedbc7 Author: Deniz Bahadir AuthorDate: Mon Nov 27 22:02:43 2017 +0100 Commit: Deniz Bahadir CommitDate: Wed Nov 29 17:00:56 2017 +0100 target_link_libraries: Return earlier on some error. diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 37bcb70..ec060cd 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -388,27 +388,27 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, << this->Target->GetName() << "\" which is not built in this directory."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - } else { + return false; + } - cmTarget* tgt = this->Makefile->GetGlobalGenerator()->FindTarget(lib); - - if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) && - (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) && - (tgt->GetType() != cmStateEnums::UNKNOWN_LIBRARY) && - (tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) && - !tgt->IsExecutableWithExports()) { - std::ostringstream e; - e << "Target \"" << lib << "\" of type " - << cmState::GetTargetTypeName(tgt->GetType()) - << " may not be linked into another target. " - << "One may link only to STATIC or SHARED libraries, or " - << "to executables with the ENABLE_EXPORTS property set."; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - } + cmTarget* tgt = this->Makefile->GetGlobalGenerator()->FindTarget(lib); - this->Target->AddLinkLibrary(*this->Makefile, lib, llt); + if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) && + (tgt->GetType() != cmStateEnums::SHARED_LIBRARY) && + (tgt->GetType() != cmStateEnums::UNKNOWN_LIBRARY) && + (tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) && + !tgt->IsExecutableWithExports()) { + std::ostringstream e; + e << "Target \"" << lib << "\" of type " + << cmState::GetTargetTypeName(tgt->GetType()) + << " may not be linked into another target. " + << "One may link only to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } + this->Target->AddLinkLibrary(*this->Makefile, lib, llt); + if (this->CurrentProcessingState == ProcessingLinkLibraries) { this->Target->AppendProperty( "INTERFACE_LINK_LIBRARIES", ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 3 +- Source/cmTargetLinkLibrariesCommand.cxx | 175 +++++++++++--------- Source/cmTargetLinkLibrariesCommand.h | 3 + Source/cmUVHandlePtr.cxx | 33 +++- Source/cmUVHandlePtr.h | 22 +++ Tests/CMakeLib/CMakeLists.txt | 4 + Tests/{CMakeServerLib => CMakeLib}/testUVRAII.cxx | 2 + Tests/CMakeServerLib/CMakeLists.txt | 1 - .../RunCMake/ObjectLibrary/LinkObjRHS1-stderr.txt | 4 +- .../MixedSignature-stderr.txt | 4 +- Tests/Server/cmakelib.py | 28 +++- bootstrap | 2 + 12 files changed, 191 insertions(+), 90 deletions(-) rename Tests/{CMakeServerLib => CMakeLib}/testUVRAII.cxx (98%) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 1 08:35:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Dec 2017 08:35:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-496-ga13cc4d Message-ID: <20171201133504.7413F102F23@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 a13cc4d7028f7240ce4ff4c5f43e90ef8f61bba0 (commit) via 5cb64508a3c2c17f3a8c798d60ad426e286cf39e (commit) via f223a7caf494949c241133b7a7a1408738d6b376 (commit) via cbd37fbec37b7fdd05925c46f2d252ad368ebe76 (commit) from 22e67bc6bb138d1fb09555f1fdeaaba14312d3da (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=a13cc4d7028f7240ce4ff4c5f43e90ef8f61bba0 commit a13cc4d7028f7240ce4ff4c5f43e90ef8f61bba0 Merge: 22e67bc 5cb6450 Author: Brad King AuthorDate: Fri Dec 1 13:26:31 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 1 08:26:34 2017 -0500 Merge topic 'update-gitsetup' 5cb64508 Merge branch 'upstream-GitSetup' into update-gitsetup f223a7ca GitSetup 2017-10-26 (1639317d) cbd37fbe GitSetup: Restrict import to files we need Acked-by: Kitware Robot Acked-by: Ben Boeckel Merge-request: !1543 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cb64508a3c2c17f3a8c798d60ad426e286cf39e commit 5cb64508a3c2c17f3a8c798d60ad426e286cf39e Merge: cbd37fb f223a7c Author: Brad King AuthorDate: Thu Nov 30 14:55:34 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 14:55:34 2017 -0500 Merge branch 'upstream-GitSetup' into update-gitsetup * upstream-GitSetup: GitSetup 2017-10-26 (1639317d) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f223a7caf494949c241133b7a7a1408738d6b376 commit f223a7caf494949c241133b7a7a1408738d6b376 Author: GitSetup Upstream AuthorDate: Thu Oct 26 11:31:16 2017 -0400 Commit: Brad King CommitDate: Thu Nov 30 14:55:33 2017 -0500 GitSetup 2017-10-26 (1639317d) Code extracted from: https://gitlab.kitware.com/utils/gitsetup.git at commit 1639317d0774f7729118138e978ca6eec9cf984e (setup). diff --git a/config.sample b/config.sample deleted file mode 100644 index eeb468b..0000000 --- a/config.sample +++ /dev/null @@ -1,32 +0,0 @@ -# Kitware Local Git Setup Scripts - Sample Project Configuration -# -# Copy to "config" and edit as necessary. - -[hooks] - url = http://public.kitware.com/GitSetup.git - #branch = hooks - -[ssh] - host = public.kitware.com - key = id_git_public - request-url = https://www.kitware.com/Admin/SendPassword.cgi - -[stage] - #url = git://public.kitware.com/stage/Project.git - #pushurl = git at public.kitware.com:stage/Project.git - -[gerrit] - #project = Project - site = http://review.source.kitware.com - # pushurl placeholder "$username" is literal - pushurl = $username at review.source.kitware.com:Project - -[upstream] - url = git://public.kitware.com/Project.git - -[gitlab] - host = gitlab.kitware.com - group-path = group - group-name = Group - project-path = project - project-name = Project diff --git a/git-gerrit-push b/git-gerrit-push deleted file mode 100755 index b46f753..0000000 --- a/git-gerrit-push +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright 2010-2015 Kitware, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= - -USAGE="[] [--no-topic] [--dry-run] [--]" -OPTIONS_SPEC= -SUBDIRECTORY_OK=Yes -. "$(git --exec-path)/git-sh-setup" - -#----------------------------------------------------------------------------- - -remote='' -refspecs='' -no_topic='' -dry_run='' - -# Parse the command line options. -while test $# != 0; do - case "$1" in - --no-topic) no_topic=1 ;; - --dry-run) dry_run=--dry-run ;; - --) shift; break ;; - -*) usage ;; - *) test -z "$remote" || usage ; remote="$1" ;; - esac - shift -done -test $# = 0 || usage - -# Default remote. -test -n "$remote" || remote="gerrit" - -if test -z "$no_topic"; then - # Identify and validate the topic branch name. - head="$(git symbolic-ref HEAD)" && topic="${head#refs/heads/}" || topic='' - if test -z "$topic" -o "$topic" = "master"; then - die 'Please name your topic: - git checkout -b descriptive-name' - fi - # The topic branch will be pushed by name. - refspecs="HEAD:refs/for/master/$topic $refspecs" -fi - -# Fetch the current upstream master branch head. -# This helps computation of a minimal pack to push. -echo "Fetching $remote master" -fetch_out=$(git fetch "$remote" master 2>&1) || die "$fetch_out" - -# Exit early if we have nothing to push. -if test -z "$refspecs"; then - echo 'Nothing to push!' - exit 0 -fi - -# Push. Save output and exit code. -echo "Pushing to $remote" -push_stdout=$(git push --porcelain $dry_run "$remote" $refspecs); push_exit=$? -echo "$push_stdout" - -# Reproduce the push exit code. -exit $push_exit diff --git a/git-gitlab-push b/git-gitlab-push deleted file mode 100755 index 768f853..0000000 --- a/git-gitlab-push +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright 2010-2015 Kitware, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= - -USAGE='[] [...] [--] - -OPTIONS - ---dry-run - Show what would be pushed without actually updating the destination - --f,--force - Force-push the topic HEAD to rewrite the destination branch - ---no-default - Do not push the default branch (e.g. master) - ---no-topic - Do not push the topic HEAD. -' -OPTIONS_SPEC= -SUBDIRECTORY_OK=Yes -. "$(git --exec-path)/git-sh-setup" - -egrep-q() { - egrep "$@" >/dev/null 2>/dev/null -} - -# Load the project configuration. -gitlab_upstream='' && -gitlab_configured='' && -config="${BASH_SOURCE%/*}/config" && -protocol=$(git config -f "$config" --get gitlab.protocol || - echo "https") && -host=$(git config -f "$config" --get gitlab.host) && -site=$(git config -f "$config" --get gitlab.site || - echo "$protocol://$host") && -group_path=$(git config -f "$config" --get gitlab.group-path) && -project_path=$(git config -f "$config" --get gitlab.project-path) && -gitlab_upstream="$site/$group_path/$project_path.git" && -gitlab_pushurl=$(git config --get remote.gitlab.pushurl || - git config --get remote.gitlab.url) && -gitlab_configured=1 - -#----------------------------------------------------------------------------- - -remote='' -refspecs='' -force='' -lease=false -lease_flag='' -no_topic='' -no_default='' -dry_run='' - -# Parse the command line options. -while test $# != 0; do - case "$1" in - -f|--force) force='+'; lease=true ;; - --no-topic) no_topic=1 ;; - --dry-run) dry_run=--dry-run ;; - --no-default) no_default=1 ;; - --) shift; break ;; - -*) usage ;; - *) test -z "$remote" || usage ; remote="$1" ;; - esac - shift -done -test $# = 0 || usage - -# Default remote. -test -n "$remote" || remote="gitlab" - -if test -z "$no_topic"; then - # Identify and validate the topic branch name. - head="$(git symbolic-ref HEAD)" && topic="${head#refs/heads/}" || topic='' - if test -z "$topic" -o "$topic" = "master"; then - die 'Please name your topic: - git checkout -b descriptive-name' - fi - - if $lease; then - have_ref=false - remoteref="refs/remotes/$remote/$topic" - if git rev-parse --verify -q "$remoteref"; then - have_ref=true - else - die "It seems that a local ref for the branch is -missing; forcing a push is dangerous and may overwrite -previous work. Fetch from the $remote remote first or -push without '-f' or '--force'." - fi - - have_lease_flag=false - if git push -h | egrep-q -e '--force-with-lease'; then - have_lease_flag=true - fi - - if $have_lease_flag && $have_ref; then - # Set the lease flag. - lease_flag="--force-with-lease=$topic:$remoteref" - # Clear the force string. - force='' - fi - fi - - # The topic branch will be pushed by name. - refspecs="${force}HEAD:refs/heads/$topic $refspecs" -fi - -# Fetch the current remote master branch head. -# This helps computation of a minimal pack to push. -echo "Fetching $remote master" -fetch_out=$(git fetch "$remote" master 2>&1) || die "$fetch_out" -gitlab_head=$(git rev-parse FETCH_HEAD) || exit - -# Fetch the current upstream master branch head. -if origin_fetchurl=$(git config --get remote.origin.url) && - test "$origin_fetchurl" = "$gitlab_upstream"; then - upstream_remote='origin' -else - upstream_remote="$gitlab_upstream" -fi -echo "Fetching $upstream_remote master" -fetch_out=$(git fetch "$upstream_remote" master 2>&1) || die "$fetch_out" -upstream_head=$(git rev-parse FETCH_HEAD) || exit - -# Add a refspec to keep the remote master up to date if possible. -if test -z "$no_default" && - base=$(git merge-base "$gitlab_head" "$upstream_head") && - test "$base" = "$gitlab_head"; then - refspecs="$upstream_head:refs/heads/master $refspecs" -fi - -# Exit early if we have nothing to push. -if test -z "$refspecs"; then - echo 'Nothing to push!' - exit 0 -fi - -# Push. Save output and exit code. -echo "Pushing to $remote" -push_config='-c advice.pushUpdateRejected=false' -push_stdout=$(git $push_config push $lease_flag --porcelain $dry_run "$remote" $refspecs); push_exit=$? -echo "$push_stdout" - -if test "$push_exit" -ne 0 && test -z "$force"; then - # Advise the user to fetch if needed. - if echo "$push_stdout" | egrep-q 'stale info'; then - echo " -You have pushed to your branch from another machine; you may be overwriting -commits unintentionally. Fetch from the $remote remote and check that you are -not pushing an outdated branch." - fi - - # Advise the user to force-push if needed. - if echo "$push_stdout" | egrep-q 'non-fast-forward'; then - echo ' -Add "-f" or "--force" to push a rewritten topic.' - fi -fi - -# Reproduce the push exit code. -exit $push_exit diff --git a/setup-gerrit b/setup-gerrit deleted file mode 100755 index 6d46e3c..0000000 --- a/setup-gerrit +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright 2010-2012 Kitware, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= - -# Run this script to set up the local Git repository to push to -# a Gerrit Code Review instance for this project. - -# Project configuration instructions: -# -# - Run a Gerrit Code Review server -# -# - Populate adjacent "config" file with: -# gerrit.site = Top Gerrit URL (not project-specific) -# gerrit.project = Name of project in Gerrit -# gerrit.pushurl = Review site push URL with "$username" placeholder -# gerrit.remote = Gerrit remote name, if not "gerrit" -# gerrit.url = Gerrit project URL, if not "$site/p/$project" -# optionally with "$username" placeholder - -die() { - echo 1>&2 "$@" ; exit 1 -} - -# Make sure we are inside the repository. -cd "${BASH_SOURCE%/*}" && - -# Load the project configuration. -site=$(git config -f config --get gerrit.site) && -project=$(git config -f config --get gerrit.project) && -remote=$(git config -f config --get gerrit.remote || - echo "gerrit") && -fetchurl_=$(git config -f config --get gerrit.url || - echo "$site/p/$project") && -pushurl_=$(git config -f config --get gerrit.pushurl || - git config -f config --get gerrit.url) || -die 'This project is not configured to use Gerrit.' - -# Get current gerrit push URL. -pushurl=$(git config --get remote."$remote".pushurl || - git config --get remote."$remote".url || echo '') && - -# Tell user about current configuration. -if test -n "$pushurl"; then - echo 'Remote "'"$remote"'" is currently configured to push to - - '"$pushurl"' -' && - read -ep 'Reconfigure Gerrit? [y/N]: ' ans && - if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then - setup=1 - else - setup='' - fi -else - echo 'Remote "'"$remote"'" is not yet configured. - -'"$project"' changes must be pushed to our Gerrit Code Review site: - - '"$site/p/$project"' - -Register a Gerrit account and select a username (used below). -You will need an OpenID: - - http://openid.net/get-an-openid/ -' && - read -ep 'Configure Gerrit? [Y/n]: ' ans && - if [ "$ans" == "n" ] || [ "$ans" == "N" ]; then - exit 0 - else - setup=1 - fi -fi && - -# Perform setup if necessary. -if test -n "$setup"; then - echo 'Sign-in to Gerrit to get/set your username at - - '"$site"'/#/settings - -Add your SSH public keys at - - '"$site"'/#/settings/ssh-keys -' && - read -ep "Gerrit username? [$USER]: " gu && - if test -z "$gu"; then - gu="$USER" - fi && - fetchurl="${fetchurl_/\$username/$gu}" && - if test -z "$pushurl"; then - git remote add "$remote" "$fetchurl" - else - git config remote."$remote".url "$fetchurl" - fi && - pushurl="${pushurl_/\$username/$gu}" && - if test "$pushurl" != "$fetchurl"; then - git config remote."$remote".pushurl "$pushurl" - fi && - echo 'Remote "'"$remote"'" is now configured to push to - - '"$pushurl"' -' -fi && - -# Optionally test Gerrit access. -if test -n "$pushurl"; then - read -ep 'Test access to Gerrit (SSH)? [y/N]: ' ans && - if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then - echo -n 'Testing Gerrit access by SSH...' - if git ls-remote --heads "$pushurl" >/dev/null; then - echo 'passed.' - else - echo 'failed.' && - die 'Could not access Gerrit. Add your SSH public keys at - - '"$site"'/#/settings/ssh-keys -' - fi - fi -fi && - -# Set up GerritId hook. -hook=$(git config --get hooks.GerritId || echo '') && -if test -z "$hook"; then - echo ' -Enabling GerritId hook to add a "Change-Id" footer to commit -messages for interaction with Gerrit. Run - - git config hooks.GerritId false - -to disable this feature (but you will be on your own).' && - git config hooks.GerritId true -else - echo 'GerritId hook already configured to "'"$hook"'".' -fi diff --git a/setup-gitlab b/setup-gitlab deleted file mode 100755 index 9c7574d..0000000 --- a/setup-gitlab +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright 2010-2015 Kitware, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= - -# Run this script to set up the local Git repository to push to -# a personal fork for this project in GitLab. - -# Project configuration instructions: -# -# - Run a GitLab server -# -# - Populate adjacent "config" file with: -# gitlab.protocol = Top GitLab protocol, if not 'https' -# gitlab.host = Top GitLab fully qualified host name -# gitlab.site = Top GitLab URL, if not "://" -# gitlab.group-name = Name of group containing project in GitLab -# gitlab.group-path = Path of group containing project in GitLab -# gitlab.project-name = Name of project within GitLab group -# gitlab.project-path = Path of project within GitLab group -# gitlab.url = GitLab push URL with "$username" placeholder, -# if not "/$username/.git" -# gitlab.pushurl = GitLab push URL with "$username" placeholder, -# if not "git@:$username/.git" -# gitlab.remote = GitLab remote name, if not "gitlab" - -die() { - echo 1>&2 "$@" ; exit 1 -} - -# Make sure we are inside the repository. -cd "${BASH_SOURCE%/*}" && - -# Load the project configuration. -protocol=$(git config -f config --get gitlab.protocol || - echo "https") && -host=$(git config -f config --get gitlab.host) && -site=$(git config -f config --get gitlab.site || - echo "$protocol://$host") && -group_path=$(git config -f config --get gitlab.group-path) && -group_name=$(git config -f config --get gitlab.group-name) && -project_name=$(git config -f config --get gitlab.project-name) && -project_path=$(git config -f config --get gitlab.project-path) && -pushurl_=$(git config -f config --get gitlab.pushurl || - echo "git@$host:\$username/$project_path.git") && -remote=$(git config -f config --get gitlab.remote || - echo "gitlab") && -fetchurl_=$(git config -f config --get gitlab.url || - echo "$site/\$username/$project_path.git") || -die 'This project is not configured to use GitLab.' - -# Get current gitlab push URL. -pushurl=$(git config --get remote."$remote".pushurl || - git config --get remote."$remote".url || echo '') && - -# Tell user about current configuration. -if test -n "$pushurl"; then - echo 'Remote "'"$remote"'" is currently configured to push to - - '"$pushurl"' -' && - read -ep 'Reconfigure GitLab? [y/N]: ' ans && - if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then - setup=1 - else - setup='' - fi -else - echo 'Remote "'"$remote"'" is not yet configured. -' && - read -ep 'Configure GitLab to contribute to '"$project_name"'? [Y/n]: ' ans && - if [ "$ans" == "n" ] || [ "$ans" == "N" ]; then - exit 0 - else - setup=1 - fi -fi && - -setup_instructions='Add your SSH public keys at - - '"$site"'/profile/keys - -Then visit the main repository at: - - '"$site/$group_path/$project_path"' - -and use the Fork button in the upper right. -' - -# Perform setup if necessary. -if test -n "$setup"; then - echo 'Sign-in to GitLab to get/set your username at - - '"$site/profile/account"' - -'"$setup_instructions" && - read -ep "GitLab username? [$USER]: " gu && - if test -z "$gu"; then - gu="$USER" - fi && - fetchurl="${fetchurl_/\$username/$gu}" && - if test -z "$pushurl"; then - git remote add "$remote" "$fetchurl" - else - git config remote."$remote".url "$fetchurl" - fi && - pushurl="${pushurl_/\$username/$gu}" && - git config remote."$remote".pushurl "$pushurl" && - echo 'Remote "'"$remote"'" is now configured to push to - - '"$pushurl"' -' -fi && - -# Optionally test GitLab access. -if test -n "$pushurl"; then - read -ep 'Test access to GitLab (SSH)? [y/N]: ' ans && - if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then - echo -n 'Testing GitLab access by SSH...' - if git ls-remote --heads "$pushurl" >/dev/null; then - echo 'passed.' - else - echo 'failed.' && - die 'Could not access your GitLab fork of this project. -'"$setup_instructions" - fi - fi -fi diff --git a/setup-hooks b/setup-hooks index ca07712..6a17b10 100755 --- a/setup-hooks +++ b/setup-hooks @@ -26,7 +26,7 @@ # hooks.url = Repository URL publishing "hooks" branch # hooks.branch = Repository branch instead of "hooks" -egrep-q() { +egrep_q() { egrep "$@" >/dev/null 2>/dev/null } @@ -42,7 +42,7 @@ if url=$(git config --get hooks.url); then # Fetch hooks from locally configured repository. branch=$(git config hooks.branch || echo hooks) elif git for-each-ref refs/remotes/origin/hooks 2>/dev/null | - egrep-q 'refs/remotes/origin/hooks$'; then + egrep_q 'refs/remotes/origin/hooks$'; then # Use hooks cloned from origin. url=.. && branch=remotes/origin/hooks elif url=$(git config -f config --get hooks.url); then diff --git a/setup-ssh b/setup-ssh deleted file mode 100755 index 8920a5b..0000000 --- a/setup-ssh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright 2010-2012 Kitware, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= - -# Run this script to set up ssh push access to the repository host. - -# Project configuration instructions: -# -# - Populate adjacent "config" file with: -# ssh.host = Repository host name -# ssh.user = Username on host, if not "git" -# ssh.key = Local ssh key name -# ssh.request-url = Web page URL to request ssh access - -egrep-q() { - egrep "$@" >/dev/null 2>/dev/null -} - -die() { - echo 1>&2 "$@" ; exit 1 -} - -# Make sure we are inside the repository. -cd "${BASH_SOURCE%/*}" && - -# Load the project configuration. -host=$(git config -f config --get ssh.host) && -user=$(git config -f config --get ssh.user || echo git) && -key=$(git config -f config --get ssh.key) && -request_url=$(git config -f config --get ssh.request-url) || -die 'This project is not configured for ssh push access.' - -# Check for existing configuration. -if test -r ~/.ssh/config && - egrep-q 'Host[= ]'"${host//\./\\.}" ~/.ssh/config; then - echo 'Host "'"$host"'" is already in ~/.ssh/config' && - setup= && - question='Test' -else - echo 'Host "'"$host"'" not found in ~/.ssh/config' && - setup=1 && - question='Setup and test' -fi && - -# Ask the user whether to make changes. -echo '' && -read -ep "${question} push access by ssh to $user@$host? [y/N]: " access && -if test "$access" != "y" -a "$access" != "Y"; then - exit 0 -fi && - -# Setup host configuration if necessary. -if test -n "$setup"; then - if ! test -d ~/.ssh; then - mkdir -p ~/.ssh && - chmod 700 ~/.ssh - fi && - if ! test -f ~/.ssh/config; then - touch ~/.ssh/config && - chmod 600 ~/.ssh/config - fi && - ssh_config='Host='"$host"' - IdentityFile ~/.ssh/'"$key" && - echo "Adding to ~/.ssh/config: - -$ssh_config -" && - echo "$ssh_config" >> ~/.ssh/config && - if ! test -e ~/.ssh/"$key"; then - if test -f ~/.ssh/id_rsa; then - # Take care of the common case. - ln -s id_rsa ~/.ssh/"$key" - echo ' -Assuming ~/.ssh/id_rsa is the private key corresponding to the public key for - - '"$user@$host"' - -If this is incorrect place private key at "~/.ssh/'"$key"'".' - else - echo ' -Place the private key corresponding to the public key registered for - - '"$user@$host"' - -at "~/.ssh/'"$key"'".' - fi - read -e -n 1 -p 'Press any key to continue...' - fi -fi || exit 1 - -# Test access configuration. -echo 'Testing ssh push access to "'"$user@$host"'"...' && -if ! ssh "$user@$host" info; then - die 'No ssh push access to "'"$user@$host"'". You may need to request access at - - '"$request_url"' -' -fi diff --git a/setup-stage b/setup-stage deleted file mode 100755 index ce6ec45..0000000 --- a/setup-stage +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright 2010-2012 Kitware, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= - -# Run this script to set up the topic stage for pushing changes. - -# Project configuration instructions: -# -# - Run a Topic Stage repository next to the main project repository. -# -# - Populate adjacent "config" file with: -# stage.url = Topic Stage repository URL -# stage.pushurl = Topic Stage push URL if not "$url" - -egrep-q() { - egrep "$@" >/dev/null 2>/dev/null -} - -die() { - echo 1>&2 "$@" ; exit 1 -} - -# Make sure we are inside the repository. -cd "${BASH_SOURCE%/*}" && - -# Load the project configuration. -fetchurl_=$(git config -f config --get stage.url) && -pushurl_=$(git config -f config --get stage.pushurl || echo "$fetchurl_") && -remote=$(git config -f config --get stage.remote || echo 'stage') || -die 'This project is not configured to use a topic stage.' - -# Get current stage push URL. -pushurl=$(git config --get remote."$remote".pushurl || - git config --get remote."$remote".url || echo '') && - -# Tell user about current configuration. -if test -n "$pushurl"; then - echo 'Remote "'"$remote"'" is currently configured to push to - - '"$pushurl"' -' && - read -ep 'Reconfigure Topic Stage? [y/N]: ' ans && - if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then - setup=1 - else - setup='' - fi -else - setup=1 -fi - -# Perform setup if necessary. -if test -n "$setup"; then - echo 'Setting up the topic stage...' && - fetchurl="${fetchurl_}" && - if test -z "$pushurl"; then - git remote add "$remote" "$fetchurl" - else - git config remote."$remote".url "$fetchurl" - fi && - pushurl="${pushurl_}" && - if test "$pushurl" != "$fetchurl"; then - git config remote."$remote".pushurl "$pushurl" - fi && - echo 'Remote "'"$remote"'" is now configured to push to - - '"$pushurl"' -' -fi || die 'Could not configure the topic stage remote.' diff --git a/setup-upstream b/setup-upstream deleted file mode 100755 index 92ce1da..0000000 --- a/setup-upstream +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash -#============================================================================= -# Copyright 2010-2015 Kitware, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= - -# Run this script to set up the local Git repository to use the -# preferred upstream repository URLs. - -# Project configuration instructions: -# -# - Populate adjacent "config" file with: -# upstream.url = Preferred fetch url for upstream remote -# upstream.remote = Preferred name for upstream remote, if not "origin" - -die() { - echo 1>&2 "$@" ; exit 1 -} - -# Make sure we are inside the repository. -cd "${BASH_SOURCE%/*}" && - -# Load the project configuration. -url=$(git config -f config --get upstream.url) && -remote=$(git config -f config --get upstream.remote || - echo 'origin') || -die 'This project is not configured to use a preferred upstream repository.' - -# Get current upstream URLs. -fetchurl=$(git config --get remote."$remote".url || echo '') && -pushurl=$(git config --get remote."$remote".pushurl || echo '') && - -if test "$fetchurl" = "$url"; then - echo 'Remote "'"$remote"'" already uses recommended upstream repository.' - exit 0 -fi - -upstream_recommend=' -We recommended configuring the "'"$remote"'" remote to fetch from upstream at - - '"$url"' -' - -# Tell user about current configuration. -if test -n "$fetchurl"; then - echo 'Remote "'"$remote"'" is currently configured to fetch from - - '"$fetchurl"' -' && - if test -n "$pushurl"; then - echo 'and push to - - '"$pushurl" - fi && - echo "$upstream_recommend" && - if test -n "$pushurl"; then - echo 'and to never push to it directly. -' - fi && - - read -ep 'Reconfigure "'"$remote"'" remote as recommended? [y/N]: ' ans && - if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then - setup=1 - else - setup='' - fi -else - echo 'Remote "'"$remote"'" is not yet configured.' && - echo "$upstream_recommend" && - read -ep 'Configure "'"$remote"'" remote as recommended? [Y/n]: ' ans && - if [ "$ans" == "n" ] || [ "$ans" == "N" ]; then - exit 0 - else - setup=1 - fi -fi && - -# Perform setup if necessary. -if test -n "$setup"; then - if test -z "$fetchurl"; then - git remote add "$remote" "$url" - else - git config remote."$remote".url "$url" && - if old=$(git config --get remote."$remote".pushurl); then - git config --unset remote."$remote".pushurl || - echo 'Warning: failed to unset remote.'"$remote"'.pushurl' - fi - fi && - echo 'Remote "'"$remote"'" is now configured to fetch from - - '"$url"' -' -fi diff --git a/tips b/tips index 784e1ed..f47d84c 100755 --- a/tips +++ b/tips @@ -19,7 +19,7 @@ # Project configuration instructions: NONE -egrep-q() { +egrep_q() { egrep "$@" >/dev/null 2>/dev/null } @@ -33,7 +33,7 @@ One may enable color output from Git commands with fi # Suggest bash completion. -if ! bash -i -c 'echo $PS1' | egrep-q '__git_ps1'; then +if ! bash -i -c 'echo $PS1' | egrep_q '__git_ps1'; then echo ' A dynamic, informative Git shell prompt can be obtained by sourcing the git bash-completion script in your "~/.bashrc". Set the PS1 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbd37fbec37b7fdd05925c46f2d252ad368ebe76 commit cbd37fbec37b7fdd05925c46f2d252ad368ebe76 Author: Brad King AuthorDate: Thu Nov 30 14:55:01 2017 -0500 Commit: Brad King CommitDate: Thu Nov 30 14:55:16 2017 -0500 GitSetup: Restrict import to files we need diff --git a/Utilities/Scripts/update-gitsetup.bash b/Utilities/Scripts/update-gitsetup.bash index 8f0da76..70fb165 100755 --- a/Utilities/Scripts/update-gitsetup.bash +++ b/Utilities/Scripts/update-gitsetup.bash @@ -11,6 +11,13 @@ readonly repo="https://gitlab.kitware.com/utils/gitsetup.git" readonly tag="setup" readonly shortlog=false readonly paths=" + .gitattributes + LICENSE + NOTICE + README + setup-hooks + setup-user + tips " extract_source () { ----------------------------------------------------------------------- Summary of changes: Utilities/GitSetup/config.sample | 32 ------ Utilities/GitSetup/git-gerrit-push | 74 ------------- Utilities/GitSetup/git-gitlab-push | 177 -------------------------------- Utilities/GitSetup/setup-gerrit | 147 -------------------------- Utilities/GitSetup/setup-gitlab | 140 ------------------------- Utilities/GitSetup/setup-hooks | 4 +- Utilities/GitSetup/setup-ssh | 111 -------------------- Utilities/GitSetup/setup-stage | 82 --------------- Utilities/GitSetup/setup-upstream | 104 ------------------- Utilities/GitSetup/tips | 4 +- Utilities/Scripts/update-gitsetup.bash | 7 ++ 11 files changed, 11 insertions(+), 871 deletions(-) delete mode 100644 Utilities/GitSetup/config.sample delete mode 100755 Utilities/GitSetup/git-gerrit-push delete mode 100755 Utilities/GitSetup/git-gitlab-push delete mode 100755 Utilities/GitSetup/setup-gerrit delete mode 100755 Utilities/GitSetup/setup-gitlab delete mode 100755 Utilities/GitSetup/setup-ssh delete mode 100755 Utilities/GitSetup/setup-stage delete mode 100755 Utilities/GitSetup/setup-upstream hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 1 08:55:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Dec 2017 08:55:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-498-ga4faf86 Message-ID: <20171201135505.91EE1102DF7@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 a4faf8638744edf7e3dd8931b55ba87e8f7738be (commit) via 085bdf5aad5c9b0da2c5b3a831a3276b68535be0 (commit) from a13cc4d7028f7240ce4ff4c5f43e90ef8f61bba0 (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=a4faf8638744edf7e3dd8931b55ba87e8f7738be commit a4faf8638744edf7e3dd8931b55ba87e8f7738be Merge: a13cc4d 085bdf5 Author: Brad King AuthorDate: Fri Dec 1 08:48:59 2017 -0500 Commit: Brad King CommitDate: Fri Dec 1 08:48:59 2017 -0500 Merge branch 'release-3.10' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 1 08:55:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 1 Dec 2017 08:55:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-8-g085bdf5 Message-ID: <20171201135505.AB6BD102DF8@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 085bdf5aad5c9b0da2c5b3a831a3276b68535be0 (commit) via 375eca7881bceabf591a4fc278c198657aafbd5e (commit) from 79ad921a38190e38d10c89f9c7dad1fc78b52986 (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: bootstrap | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 2 00:16:51 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 2 Dec 2017 00:16:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-499-gbfbe4aa Message-ID: <20171202051651.7726C102CD4@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 bfbe4aaeb8d31676960175d07d6f412277d8cd9d (commit) from a4faf8638744edf7e3dd8931b55ba87e8f7738be (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=bfbe4aaeb8d31676960175d07d6f412277d8cd9d commit bfbe4aaeb8d31676960175d07d6f412277d8cd9d Author: Kitware Robot AuthorDate: Sat Dec 2 00:03:10 2017 -0500 Commit: Kitware Robot CommitDate: Sat Dec 2 00:03:10 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 305aa87..9a95bba 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 10) -set(CMake_VERSION_PATCH 20171201) +set(CMake_VERSION_PATCH 20171202) #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 Dec 3 00:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 3 Dec 2017 00:05:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-500-g2f8711d Message-ID: <20171203050509.5BE8B102C5C@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 2f8711d9583ced09fc1b7e3a733a32988e6c9d88 (commit) from bfbe4aaeb8d31676960175d07d6f412277d8cd9d (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=2f8711d9583ced09fc1b7e3a733a32988e6c9d88 commit 2f8711d9583ced09fc1b7e3a733a32988e6c9d88 Author: Kitware Robot AuthorDate: Sun Dec 3 00:01:17 2017 -0500 Commit: Kitware Robot CommitDate: Sun Dec 3 00:01:17 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9a95bba..1b2de66 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 10) -set(CMake_VERSION_PATCH 20171202) +set(CMake_VERSION_PATCH 20171203) #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 Dec 4 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 4 Dec 2017 00:05:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-501-g7f881d1 Message-ID: <20171204050505.C3CF2102D96@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 7f881d159ceb2de70f7d648ad3c113ce18d1a3a7 (commit) from 2f8711d9583ced09fc1b7e3a733a32988e6c9d88 (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=7f881d159ceb2de70f7d648ad3c113ce18d1a3a7 commit 7f881d159ceb2de70f7d648ad3c113ce18d1a3a7 Author: Kitware Robot AuthorDate: Mon Dec 4 00:01:08 2017 -0500 Commit: Kitware Robot CommitDate: Mon Dec 4 00:01:08 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1b2de66..3e5972d 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 10) -set(CMake_VERSION_PATCH 20171203) +set(CMake_VERSION_PATCH 20171204) #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 Dec 4 10:45:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 4 Dec 2017 10:45:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-503-g5f87ea1 Message-ID: <20171204154508.44FACFD448@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 5f87ea160378265c70c97d1f627c23e6faf02378 (commit) via 07185055d57f28347a1850a1f06787ac93f20afd (commit) from 7f881d159ceb2de70f7d648ad3c113ce18d1a3a7 (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=5f87ea160378265c70c97d1f627c23e6faf02378 commit 5f87ea160378265c70c97d1f627c23e6faf02378 Merge: 7f881d1 0718505 Author: Brad King AuthorDate: Mon Dec 4 15:38:43 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 4 10:38:51 2017 -0500 Merge topic 'cmake-job-pool' 07185055 Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLS Acked-by: Kitware Robot Merge-request: !1514 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07185055d57f28347a1850a1f06787ac93f20afd commit 07185055d57f28347a1850a1f06787ac93f20afd Author: Matt McCormick AuthorDate: Mon Nov 20 16:49:41 2017 -0500 Commit: Matt McCormick CommitDate: Wed Nov 29 15:13:36 2017 -0500 Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLS This enables configuration of build parallelism with the Ninja generator by passing arguments on the command line to CMake. For example, cmake \ '-DCMAKE_JOB_POOLS:STRING=compile=5;link=2' \ -DCMAKE_JOB_POOL_COMPILE:STRING=compile \ -DCMAKE_JOB_POOL_LINK:STRING=link \ ~/src/MyProject diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 0451466..0938253 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -50,6 +50,7 @@ Variables that Provide Information /variable/CMAKE_IMPORT_LIBRARY_SUFFIX /variable/CMAKE_JOB_POOL_COMPILE /variable/CMAKE_JOB_POOL_LINK + /variable/CMAKE_JOB_POOLS /variable/CMAKE_LANG_COMPILER_AR /variable/CMAKE_LANG_COMPILER_RANLIB /variable/CMAKE_LINK_LIBRARY_SUFFIX diff --git a/Help/prop_gbl/JOB_POOLS.rst b/Help/prop_gbl/JOB_POOLS.rst index 2ce74b8..b904f7a 100644 --- a/Help/prop_gbl/JOB_POOLS.rst +++ b/Help/prop_gbl/JOB_POOLS.rst @@ -19,5 +19,8 @@ Defined pools could be used globally by setting or per target by setting the target properties :prop_tgt:`JOB_POOL_COMPILE` and :prop_tgt:`JOB_POOL_LINK`. +If not set, this property uses the value of the :variable:`CMAKE_JOB_POOLS` +variable. + Build targets provided by CMake that are meant for individual interactive use, such as ``install``, are placed in the ``console`` pool automatically. diff --git a/Help/release/dev/cmake-job-pool.rst b/Help/release/dev/cmake-job-pool.rst new file mode 100644 index 0000000..836d9c1 --- /dev/null +++ b/Help/release/dev/cmake-job-pool.rst @@ -0,0 +1,7 @@ +cmake-job-pool +-------------- + +* A :variable:`CMAKE_JOB_POOLS` variable was added specify a value to use for + the :prop_gbl:`JOB_POOLS` property. This enables control over build + parallelism with command line configuration parameters when using the Ninja + generator. diff --git a/Help/variable/CMAKE_JOB_POOLS.rst b/Help/variable/CMAKE_JOB_POOLS.rst new file mode 100644 index 0000000..72b50b4 --- /dev/null +++ b/Help/variable/CMAKE_JOB_POOLS.rst @@ -0,0 +1,6 @@ +CMAKE_JOB_POOLS +--------------- + +If the :prop_gbl:`JOB_POOLS` global property is not set, the value +of this variable is used in its place. See :prop_gbl:`JOB_POOLS` +for additional information. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 477ce51..2d969d2 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -207,6 +207,9 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os) const char* jobpools = this->GetCMakeInstance()->GetState()->GetGlobalProperty("JOB_POOLS"); + if (!jobpools) { + jobpools = this->GetMakefile()->GetDefinition("CMAKE_JOB_POOLS"); + } if (jobpools) { cmGlobalNinjaGenerator::WriteComment( os, "Pools defined by global property JOB_POOLS"); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/prop_gbl/JOB_POOLS.rst | 3 +++ Help/release/dev/cmake-job-pool.rst | 7 +++++++ Help/variable/CMAKE_JOB_POOLS.rst | 6 ++++++ Source/cmLocalNinjaGenerator.cxx | 3 +++ 5 files changed, 20 insertions(+) create mode 100644 Help/release/dev/cmake-job-pool.rst create mode 100644 Help/variable/CMAKE_JOB_POOLS.rst hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 4 10:55:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 4 Dec 2017 10:55:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-516-ge841ae8 Message-ID: <20171204155504.AA999102CDC@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 e841ae823edc3021aaa5b297be715344a9bca47e (commit) via d5681e353ad94db8cfd0343bd50b090a6cda8c71 (commit) via 8c97382c8e2f5699be72089371c67949c7e49461 (commit) via d8290531a9c98773ef233c23b81af76e8a7e099c (commit) via caa1c4967a29feee1789a7fc548f5bdf1eb44781 (commit) via 411397f913d93e988da9bf1b1a4305c55fe78d5f (commit) via 64713d4ca0ae864958ecdeaee9642488c3f2cbc7 (commit) via f25d87db9e406eda77aa62f583e1ceeb7b145381 (commit) via 4c40ab261c94a72ba5dcd9fab47c035d94a22964 (commit) via be8ec418965b89dd4b05412d78be7395ad4b4a56 (commit) via 740ccb1f1de5d7d764bf98bd3c322e5c6b07f70b (commit) via 4d611868dfe37e73aaba4cdfde37b17e8a2ec7c1 (commit) via 8e654a37857b7cefabf142b16fe8a6e03b75b5df (commit) from 5f87ea160378265c70c97d1f627c23e6faf02378 (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=e841ae823edc3021aaa5b297be715344a9bca47e commit e841ae823edc3021aaa5b297be715344a9bca47e Merge: d5681e3 4c40ab2 Author: Brad King AuthorDate: Mon Dec 4 15:53:02 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 4 10:53:07 2017 -0500 Merge topic 'add_library-mention-xcode-objlib-behavior' 4c40ab26 add_library: mention that Xcode requires a real source file Acked-by: Kitware Robot Acked-by: Tom Hughes Merge-request: !1549 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5681e353ad94db8cfd0343bd50b090a6cda8c71 commit d5681e353ad94db8cfd0343bd50b090a6cda8c71 Merge: 8c97382 4d61186 Author: Brad King AuthorDate: Mon Dec 4 15:52:41 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 4 10:52:47 2017 -0500 Merge topic 'pragma-once' 4d611868 Check*: Added include guards Acked-by: Kitware Robot Merge-request: !1327 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c97382c8e2f5699be72089371c67949c7e49461 commit 8c97382c8e2f5699be72089371c67949c7e49461 Merge: d829053 64713d4 Author: Brad King AuthorDate: Mon Dec 4 10:50:55 2017 -0500 Commit: Brad King CommitDate: Mon Dec 4 10:50:55 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8290531a9c98773ef233c23b81af76e8a7e099c commit d8290531a9c98773ef233c23b81af76e8a7e099c Merge: caa1c49 f25d87d Author: Brad King AuthorDate: Mon Dec 4 15:50:08 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 4 10:50:33 2017 -0500 Merge topic 'cpack-pkg-fix' f25d87db CPack: Fix macOS PKG component dependency information Acked-by: Kitware Robot Merge-request: !1547 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=caa1c4967a29feee1789a7fc548f5bdf1eb44781 commit caa1c4967a29feee1789a7fc548f5bdf1eb44781 Merge: 411397f 8e654a3 Author: Brad King AuthorDate: Mon Dec 4 15:48:46 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 4 10:48:53 2017 -0500 Merge topic 'csharp_project_without_sources' 8e654a37 VS: Enable generation of CSharp projects without initial .cs files Acked-by: Kitware Robot Merge-request: !1521 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=411397f913d93e988da9bf1b1a4305c55fe78d5f commit 411397f913d93e988da9bf1b1a4305c55fe78d5f Merge: 5f87ea1 be8ec41 Author: Brad King AuthorDate: Mon Dec 4 15:46:32 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 4 10:46:36 2017 -0500 Merge topic 'update-kwsys' be8ec418 Merge branch 'upstream-KWSys' into update-kwsys 740ccb1f KWSys 2017-12-01 (0f0023b1) Acked-by: Kitware Robot Merge-request: !1548 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c40ab261c94a72ba5dcd9fab47c035d94a22964 commit 4c40ab261c94a72ba5dcd9fab47c035d94a22964 Author: Ben Boeckel AuthorDate: Fri Dec 1 10:36:01 2017 -0500 Commit: Ben Boeckel CommitDate: Fri Dec 1 10:37:15 2017 -0500 add_library: mention that Xcode requires a real source file The docs mentioned that it happened, but not when. Mention Xcode since it is the culprit today. See #16524. diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 4e85d8c..3706153 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -111,9 +111,9 @@ may contain only sources that compile, header files, and other files that would not affect linking of a normal library (e.g. ``.txt``). They may contain custom commands generating such sources, but not ``PRE_BUILD``, ``PRE_LINK``, or ``POST_BUILD`` commands. Object libraries -cannot be linked. Some native build systems may not like targets that -have only object files, so consider adding at least one real source file -to any target that references ``$``. +cannot be linked. Some native build systems (such as Xcode) may not like +targets that have only object files, so consider adding at least one real +source file to any target that references ``$``. Alias Libraries ^^^^^^^^^^^^^^^ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be8ec418965b89dd4b05412d78be7395ad4b4a56 commit be8ec418965b89dd4b05412d78be7395ad4b4a56 Merge: a4faf86 740ccb1 Author: Brad King AuthorDate: Fri Dec 1 08:52:33 2017 -0500 Commit: Brad King CommitDate: Fri Dec 1 08:52:33 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-12-01 (0f0023b1) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=740ccb1f1de5d7d764bf98bd3c322e5c6b07f70b commit 740ccb1f1de5d7d764bf98bd3c322e5c6b07f70b Author: KWSys Upstream AuthorDate: Fri Dec 1 07:54:10 2017 -0500 Commit: Brad King CommitDate: Fri Dec 1 08:52:29 2017 -0500 KWSys 2017-12-01 (0f0023b1) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 0f0023b1be404cb4a4f893c116c2f8b5190bd743 (master). Upstream Shortlog ----------------- Brad King (1): 7b6fa277 ConsoleBuf: Add explicit switch case fallthrough markup diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in index 46d65a8..cf68146 100644 --- a/ConsoleBuf.hxx.in +++ b/ConsoleBuf.hxx.in @@ -264,6 +264,7 @@ private: if (m_isConsoleInput) { break; } + @KWSYS_NAMESPACE at _FALLTHROUGH; case FILE_TYPE_PIPE: m_activeInputCodepage = input_pipe_codepage; break; @@ -290,6 +291,7 @@ private: if (m_isConsoleOutput) { break; } + @KWSYS_NAMESPACE at _FALLTHROUGH; case FILE_TYPE_PIPE: m_activeOutputCodepage = output_pipe_codepage; break; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d611868dfe37e73aaba4cdfde37b17e8a2ec7c1 commit 4d611868dfe37e73aaba4cdfde37b17e8a2ec7c1 Author: Cristian Adam AuthorDate: Fri Sep 29 02:37:00 2017 +0200 Commit: Cristian Adam CommitDate: Fri Dec 1 13:05:02 2017 +0200 Check*: Added include guards diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index 5a7298b..9d2c74d 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module. in such variables may cause a false negative for this check. #]=======================================================================] +include_guard(GLOBAL) include(CheckCSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index 56e68d5..114213a 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -60,6 +60,7 @@ Check if given C source compiles and links into an executable. #]=======================================================================] +include_guard(GLOBAL) macro(CHECK_C_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake index 8da9f1e..fa51346 100644 --- a/Modules/CheckCSourceRuns.cmake +++ b/Modules/CheckCSourceRuns.cmake @@ -60,6 +60,8 @@ subsequently be run. #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_C_SOURCE_RUNS SOURCE VAR) if(NOT DEFINED "${VAR}") set(MACRO_CHECK_FUNCTION_DEFINITIONS diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake index f731b70..dd60835 100644 --- a/Modules/CheckCXXCompilerFlag.cmake +++ b/Modules/CheckCXXCompilerFlag.cmake @@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module. in such variables may cause a false negative for this check. #]=======================================================================] +include_guard(GLOBAL) include(CheckCXXSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index 4634a7b..ed8661b 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -60,6 +60,8 @@ Check if given C++ source compiles and links into an executable. #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") set(_FAIL_REGEX) diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake index 558708c..83bf2f2 100644 --- a/Modules/CheckCXXSourceRuns.cmake +++ b/Modules/CheckCXXSourceRuns.cmake @@ -60,6 +60,8 @@ subsequently be run. #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR) if(NOT DEFINED "${VAR}") set(MACRO_CHECK_FUNCTION_DEFINITIONS diff --git a/Modules/CheckCXXSymbolExists.cmake b/Modules/CheckCXXSymbolExists.cmake index 8552154..117a458 100644 --- a/Modules/CheckCXXSymbolExists.cmake +++ b/Modules/CheckCXXSymbolExists.cmake @@ -32,6 +32,7 @@ # CMAKE_REQUIRED_LIBRARIES = list of libraries to link # CMAKE_REQUIRED_QUIET = execute quietly without messages +include_guard(GLOBAL) include(CheckSymbolExists) macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE) diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake index 8a1a8b9..2cb2532 100644 --- a/Modules/CheckFortranCompilerFlag.cmake +++ b/Modules/CheckFortranCompilerFlag.cmake @@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module. in such variables may cause a false negative for this check. #]=======================================================================] +include_guard(GLOBAL) include(CheckFortranSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake index 5fc740a..f3ced93 100644 --- a/Modules/CheckFortranFunctionExists.cmake +++ b/Modules/CheckFortranFunctionExists.cmake @@ -24,6 +24,8 @@ # # CMAKE_REQUIRED_LIBRARIES = list of libraries to link +include_guard(GLOBAL) + macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT DEFINED ${VARIABLE}) message(STATUS "Looking for Fortran ${FUNCTION}") diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake index 4df17e3..d2b0cca 100644 --- a/Modules/CheckFortranSourceCompiles.cmake +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -66,6 +66,7 @@ Check if given Fortran source compiles and links into an executable. #]=======================================================================] +include_guard(GLOBAL) macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index ef08062..d00aa8a 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -38,6 +38,8 @@ # * ``check_function_exists()`` only verifies linking, it does not verify # that the function is declared in system headers. +include_guard(GLOBAL) + macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}") set(MACRO_CHECK_FUNCTION_DEFINITIONS diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index c566e14..e5554c4 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -34,6 +34,8 @@ # at once. See the :module:`CheckIncludeFileCXX` module to check for headers # using the ``CXX`` language. +include_guard(GLOBAL) + macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) if(NOT DEFINED "${VARIABLE}") if(CMAKE_REQUIRED_INCLUDES) diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index 19b1ef6..7948bab 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -33,6 +33,8 @@ # See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFiles` # to check for one or more ``C`` headers. +include_guard(GLOBAL) + macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}") if(CMAKE_REQUIRED_INCLUDES) diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index bef11a5..56b7e32 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -34,6 +34,8 @@ # See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFileCXX` # to check for a single header file in ``C`` or ``CXX`` languages. +include_guard(GLOBAL) + macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) if(NOT DEFINED "${VARIABLE}") set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake index 70c14d7..ce92bfe 100644 --- a/Modules/CheckLanguage.cmake +++ b/Modules/CheckLanguage.cmake @@ -31,6 +31,8 @@ # message(STATUS "No Fortran support") # endif() +include_guard(GLOBAL) + macro(check_language lang) if(NOT DEFINED CMAKE_${lang}_COMPILER) set(_desc "Looking for a ${lang} compiler") diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 528a450..487cc59 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -29,6 +29,8 @@ # CMAKE_REQUIRED_LIBRARIES = list of libraries to link # CMAKE_REQUIRED_QUIET = execute quietly without messages +include_guard(GLOBAL) + macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) if(NOT DEFINED "${VARIABLE}") set(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake index 7859594..ceb4d88 100644 --- a/Modules/CheckPrototypeDefinition.cmake +++ b/Modules/CheckPrototypeDefinition.cmake @@ -41,9 +41,9 @@ # - get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) +include_guard(GLOBAL) function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE) diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake index 085b464..8689a5c 100644 --- a/Modules/CheckStructHasMember.cmake +++ b/Modules/CheckStructHasMember.cmake @@ -38,6 +38,7 @@ # Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h # HAVE_TIMEVAL_TV_SEC LANGUAGE C) +include_guard(GLOBAL) include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 6d52d56..d9c9ae4 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -43,6 +43,8 @@ the way the check is run: execute quietly without messages #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) if(CMAKE_C_COMPILER_LOADED) __CHECK_SYMBOL_EXISTS_IMPL("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" ) diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index fcf1df7..2b5deec 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -71,11 +71,13 @@ include(CheckIncludeFile) include(CheckIncludeFileCXX) +get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) + +include_guard(GLOBAL) + cmake_policy(PUSH) cmake_policy(SET CMP0054 NEW) -get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) - #----------------------------------------------------------------------------- # Helper function. DO NOT CALL DIRECTLY. function(__check_type_size_impl type var map builtin language) diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index fd5c36c..ab456d1 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -32,6 +32,8 @@ # CMAKE_REQUIRED_LIBRARIES = list of libraries to link # CMAKE_REQUIRED_QUIET = execute quietly without messages +include_guard(GLOBAL) + macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) if(NOT DEFINED "${VARIABLE}") set(MACRO_CHECK_VARIABLE_DEFINITIONS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e654a37857b7cefabf142b16fe8a6e03b75b5df commit 8e654a37857b7cefabf142b16fe8a6e03b75b5df Author: Michael St?rmer AuthorDate: Thu Nov 23 14:18:23 2017 +0100 Commit: Michael St?rmer CommitDate: Wed Nov 29 18:06:08 2017 +0100 VS: Enable generation of CSharp projects without initial .cs files fixes #17388 diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index caeeeb9..540d877 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -66,11 +66,14 @@ static bool cmVS10IsTargetsFile(std::string const& path) return cmSystemTools::Strucmp(ext.c_str(), ".targets") == 0; } -static std::string computeProjectFileExtension(cmGeneratorTarget const* t) +static std::string computeProjectFileExtension(cmGeneratorTarget const* t, + const std::string& config) { std::string res; res = ".vcxproj"; - if (cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(t)) { + std::string lang = t->GetLinkerLanguage(config); + if (cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(t) || + lang == "CSharp") { res = ".csproj"; } return res; @@ -199,8 +202,8 @@ void cmVisualStudio10TargetGenerator::Generate() this->GeneratorTarget->GetProperty("EXTERNAL_MSPROJECT")) { return; } - this->ProjectFileExtension = - computeProjectFileExtension(this->GeneratorTarget); + this->ProjectFileExtension = computeProjectFileExtension( + this->GeneratorTarget, *this->Configurations.begin()); if (this->ProjectFileExtension == ".vcxproj") { this->ProjectType = vcxproj; this->Managed = false; @@ -1393,7 +1396,8 @@ void cmVisualStudio10TargetGenerator::WriteGroups() std::string path = this->LocalGenerator->GetCurrentBinaryDirectory(); path += "/"; path += this->Name; - path += computeProjectFileExtension(this->GeneratorTarget); + path += computeProjectFileExtension(this->GeneratorTarget, + *this->Configurations.begin()); path += ".filters"; cmGeneratedFileStream fout(path.c_str()); fout.SetCopyIfDifferent(true); @@ -3670,7 +3674,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() path = lg->GetCurrentBinaryDirectory(); path += "/"; path += dt->GetName(); - path += computeProjectFileExtension(dt); + path += computeProjectFileExtension(dt, *this->Configurations.begin()); } this->ConvertToWindowsSlash(path); (*this->BuildFileStream) << cmVS10EscapeXML(path) << "\">\n"; diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake index 6e7c2f3..7100b31 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -5,3 +5,4 @@ run_cmake(VsCustomProps) run_cmake(VsDebuggerWorkingDir) run_cmake(VsCSharpCustomTags) run_cmake(VsCSharpReferenceProps) +run_cmake(VsCSharpWithoutSources) diff --git a/Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake new file mode 100644 index 0000000..90ae7c3 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake @@ -0,0 +1,5 @@ +set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj") +if(NOT EXISTS "${csProjectFile}") + set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.") + return() +endif() diff --git a/Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake new file mode 100644 index 0000000..5fdeaa0 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake @@ -0,0 +1,7 @@ +enable_language(CSharp) + +add_library(foo SHARED + "${CMAKE_CURRENT_LIST_FILE}") + +set_target_properties(foo PROPERTIES + LINKER_LANGUAGE CSharp) ----------------------------------------------------------------------- Summary of changes: Help/command/add_library.rst | 6 +++--- Modules/CheckCCompilerFlag.cmake | 1 + Modules/CheckCSourceCompiles.cmake | 1 + Modules/CheckCSourceRuns.cmake | 2 ++ Modules/CheckCXXCompilerFlag.cmake | 1 + Modules/CheckCXXSourceCompiles.cmake | 2 ++ Modules/CheckCXXSourceRuns.cmake | 2 ++ Modules/CheckCXXSymbolExists.cmake | 1 + Modules/CheckFortranCompilerFlag.cmake | 1 + Modules/CheckFortranFunctionExists.cmake | 2 ++ Modules/CheckFortranSourceCompiles.cmake | 1 + Modules/CheckFunctionExists.cmake | 2 ++ Modules/CheckIncludeFile.cmake | 2 ++ Modules/CheckIncludeFileCXX.cmake | 2 ++ Modules/CheckIncludeFiles.cmake | 2 ++ Modules/CheckLanguage.cmake | 2 ++ Modules/CheckLibraryExists.cmake | 2 ++ Modules/CheckPrototypeDefinition.cmake | 2 +- Modules/CheckStructHasMember.cmake | 1 + Modules/CheckSymbolExists.cmake | 2 ++ Modules/CheckTypeSize.cmake | 6 ++++-- Modules/CheckVariableExists.cmake | 2 ++ Source/CPack/cmCPackPKGGenerator.cxx | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 16 ++++++++++------ Source/kwsys/ConsoleBuf.hxx.in | 2 ++ Tests/RunCMake/VS10Project/RunCMakeTest.cmake | 1 + .../VS10Project/VsCSharpWithoutSources-check.cmake | 5 +++++ .../RunCMake/VS10Project/VsCSharpWithoutSources.cmake | 7 +++++++ 28 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake create mode 100644 Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 4 10:55:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 4 Dec 2017 10:55:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-10-g64713d4 Message-ID: <20171204155504.B80E4102CDE@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 64713d4ca0ae864958ecdeaee9642488c3f2cbc7 (commit) via f25d87db9e406eda77aa62f583e1ceeb7b145381 (commit) from 085bdf5aad5c9b0da2c5b3a831a3276b68535be0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackPKGGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 5 00:05:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 5 Dec 2017 00:05:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-517-g8616e9b Message-ID: <20171205050512.C7CA9102B1B@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 8616e9ba246242ff39d166afd2458fc78031918e (commit) from e841ae823edc3021aaa5b297be715344a9bca47e (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=8616e9ba246242ff39d166afd2458fc78031918e commit 8616e9ba246242ff39d166afd2458fc78031918e Author: Kitware Robot AuthorDate: Tue Dec 5 00:01:13 2017 -0500 Commit: Kitware Robot CommitDate: Tue Dec 5 00:01:13 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3e5972d..abb6e38 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 10) -set(CMake_VERSION_PATCH 20171204) +set(CMake_VERSION_PATCH 20171205) #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 Dec 5 08:15:13 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 5 Dec 2017 08:15:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-524-g0236e50 Message-ID: <20171205131513.71B651023FE@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 0236e5080229e5ce05c43077a56dc5b58fc644fd (commit) via 0b7822f49aef20ad758c637abe813463652cf9b0 (commit) via b8e7af979d3d6dfef05fcebefe18907963221220 (commit) via 21541bb5ccde705afa8400a9a2b6f4454580fa5e (commit) via 66419bc04620c5748df77e2b563d65b0e97b623a (commit) via bfcc20343c966ee031426e04c5eab504a0af8e27 (commit) via 923b8fadd5fe6af56197cf3916a3292b60c0e8db (commit) from 8616e9ba246242ff39d166afd2458fc78031918e (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=0236e5080229e5ce05c43077a56dc5b58fc644fd commit 0236e5080229e5ce05c43077a56dc5b58fc644fd Merge: 0b7822f bfcc203 Author: Brad King AuthorDate: Tue Dec 5 13:14:30 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 5 08:14:39 2017 -0500 Merge topic 'update-cpplint' bfcc2034 Update cpplint support to return 0 and mark warnings for CDash. Acked-by: Kitware Robot Merge-request: !1544 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b7822f49aef20ad758c637abe813463652cf9b0 commit 0b7822f49aef20ad758c637abe813463652cf9b0 Merge: b8e7af9 21541bb Author: Brad King AuthorDate: Tue Dec 5 13:13:09 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 5 08:13:34 2017 -0500 Merge topic 'win-fallthrough' 21541bb5 Use CM_FALLTHROUGH in Windows-specific code Acked-by: Kitware Robot Merge-request: !1555 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8e7af979d3d6dfef05fcebefe18907963221220 commit b8e7af979d3d6dfef05fcebefe18907963221220 Merge: 8616e9b 66419bc Author: Brad King AuthorDate: Tue Dec 5 13:12:40 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 5 08:12:52 2017 -0500 Merge topic 'ctest-chrono' 66419bc0 CTest: convert timeouts to std::chrono::duration 923b8fad IWYU: Add mappings for std::enable_if on chrono durations Acked-by: Kitware Robot Merge-request: !1513 diff --cc Source/CTest/cmCTestRunTest.cxx index 5443494,830ebdf..a056f4b --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@@ -432,8 -451,10 +451,8 @@@ bool cmCTestRunTest::StartTest(size_t t return false; } - this->ComputeArguments(); - std::vector& args = this->TestProperties->Args; this->TestResult.Properties = this->TestProperties; - this->TestResult.ExecutionTime = 0; + this->TestResult.ExecutionTime = std::chrono::duration::zero(); this->TestResult.CompressOutput = false; this->TestResult.ReturnValue = -1; this->TestResult.CompletionStatus = "Failed to start"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21541bb5ccde705afa8400a9a2b6f4454580fa5e commit 21541bb5ccde705afa8400a9a2b6f4454580fa5e Author: Brad King AuthorDate: Mon Dec 4 10:57:30 2017 -0500 Commit: Brad King CommitDate: Mon Dec 4 10:58:15 2017 -0500 Use CM_FALLTHROUGH in Windows-specific code Some cases were missed by earlier sweeps due to not compiling Windows-specific code. diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f01ed7a..d2c62be 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -615,6 +615,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( switch (target->GetType()) { case cmStateEnums::OBJECT_LIBRARY: targetBuilds = false; // no manifest tool for object library + CM_FALLTHROUGH; case cmStateEnums::STATIC_LIBRARY: projectType = "typeStaticLibrary"; configType = "4"; @@ -630,6 +631,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( case cmStateEnums::UTILITY: case cmStateEnums::GLOBAL_TARGET: configType = "10"; + CM_FALLTHROUGH; default: targetBuilds = false; break; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 540d877..d2f21cd 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -52,6 +52,7 @@ static std::string cmVS10EscapeComment(std::string comment) case '>': /* no break */ case '^': echoable += '^'; /* no break */ + CM_FALLTHROUGH; default: echoable += *c; break; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66419bc04620c5748df77e2b563d65b0e97b623a commit 66419bc04620c5748df77e2b563d65b0e97b623a Author: Wouter Klouwen AuthorDate: Mon Nov 20 20:55:13 2017 +0000 Commit: Brad King CommitDate: Mon Dec 4 10:43:14 2017 -0500 CTest: convert timeouts to std::chrono::duration This commit continues the refactoring of CTest to adopt std::chrono. After the last sets of changes that introduced std::chrono::steady_clock and std::chrono::system_clock respectively, it makes sense to have all the timeouts be stored as std::chrono::duration. No functional change intended. diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index b603758..672087d 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -337,7 +337,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) } int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, nullptr, - remainingTime.count(), nullptr); + remainingTime, nullptr); if (runTestRes != cmsysProcess_State_Exited || retval != 0) { out << "Test command failed: " << testCommand[0] << "\n"; diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 79446e8..ef4d3c6 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -282,7 +282,7 @@ int cmCTestBuildHandler::ProcessHandler() this->Quiet); // do we have time for this - if (this->CTest->GetRemainingTimeAllowed() < 120) { + if (this->CTest->GetRemainingTimeAllowed() < std::chrono::minutes(2)) { return 0; } diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index 7c5b3b0..eb067e5 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -62,8 +62,9 @@ int cmCTestConfigureHandler::ProcessHandler() cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: " << cCommand << std::endl, this->Quiet); - res = this->CTest->RunMakeCommand(cCommand.c_str(), output, &retVal, - buildDirectory.c_str(), 0, ofs); + res = this->CTest->RunMakeCommand( + cCommand.c_str(), output, &retVal, buildDirectory.c_str(), + std::chrono::duration::zero(), ofs); if (ofs) { ofs.close(); diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 69cd08c..39b90d8 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -11,6 +11,7 @@ #include "cmParseGTMCoverage.h" #include "cmParseJacocoCoverage.h" #include "cmParsePHPCoverage.h" +#include "cmProcess.h" #include "cmSystemTools.h" #include "cmWorkingDirectory.h" #include "cmXMLWriter.h" @@ -40,7 +41,7 @@ public: { this->Process = cmsysProcess_New(); this->PipeState = -1; - this->TimeOut = -1; + this->TimeOut = std::chrono::duration(-1); } ~cmCTestRunProcess() { @@ -64,7 +65,7 @@ public: } } void SetWorkingDirectory(const char* dir) { this->WorkingDirectory = dir; } - void SetTimeout(double t) { this->TimeOut = t; } + void SetTimeout(std::chrono::duration t) { this->TimeOut = t; } bool StartProcess() { std::vector args; @@ -79,7 +80,7 @@ public: } cmsysProcess_SetOption(this->Process, cmsysProcess_Option_HideWindow, 1); - if (this->TimeOut != -1) { + if (this->TimeOut >= std::chrono::duration::zero()) { cmsysProcess_SetTimeout(this->Process, this->TimeOut); } cmsysProcess_Execute(this->Process); @@ -108,7 +109,7 @@ private: cmsysProcess* Process; std::vector CommandLineStrings; std::string WorkingDirectory; - double TimeOut; + std::chrono::duration TimeOut; }; cmCTestCoverageHandler::cmCTestCoverageHandler() @@ -276,7 +277,7 @@ int cmCTestCoverageHandler::ProcessHandler() this->CTest->ClearSubmitFiles(cmCTest::PartCoverage); int error = 0; // do we have time for this - if (this->CTest->GetRemainingTimeAllowed() < 120) { + if (this->CTest->GetRemainingTimeAllowed() < std::chrono::minutes(2)) { return error; } @@ -1022,8 +1023,9 @@ int cmCTestCoverageHandler::HandleGCovCoverage( int retVal = 0; *cont->OFS << "* Run coverage for: " << fileDir << std::endl; *cont->OFS << " Command: " << command << std::endl; - int res = this->CTest->RunCommand(covargs, &output, &errors, &retVal, - tempDir.c_str(), 0 /*this->TimeOut*/); + int res = this->CTest->RunCommand( + covargs, &output, &errors, &retVal, tempDir.c_str(), + std::chrono::duration::zero() /*this->TimeOut*/); *cont->OFS << " Output: " << output << std::endl; *cont->OFS << " Errors: " << errors << std::endl; @@ -1386,8 +1388,9 @@ int cmCTestCoverageHandler::HandleLCovCoverage( int retVal = 0; *cont->OFS << "* Run coverage for: " << fileDir << std::endl; *cont->OFS << " Command: " << command << std::endl; - int res = this->CTest->RunCommand(covargs, &output, &errors, &retVal, - fileDir.c_str(), 0 /*this->TimeOut*/); + int res = this->CTest->RunCommand( + covargs, &output, &errors, &retVal, fileDir.c_str(), + std::chrono::duration::zero() /*this->TimeOut*/); *cont->OFS << " Output: " << output << std::endl; *cont->OFS << " Errors: " << errors << std::endl; diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 99531af..830ebdf 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -1,5 +1,9 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ +#ifdef _WIN32 +/* windows.h defines min() and max() macros that interfere. */ +#define NOMINMAX +#endif #include "cmCTestRunTest.h" #include "cmCTest.h" @@ -14,6 +18,7 @@ #include "cmsys/Base64.h" #include "cmsys/Process.h" #include "cmsys/RegularExpression.hxx" +#include #include #include #include @@ -26,7 +31,7 @@ cmCTestRunTest::cmCTestRunTest(cmCTestTestHandler* handler) this->CTest = handler->CTest; this->TestHandler = handler; this->TestProcess = nullptr; - this->TestResult.ExecutionTime = 0; + this->TestResult.ExecutionTime = std::chrono::duration::zero(); this->TestResult.ReturnValue = 0; this->TestResult.Status = cmCTestTestHandler::NOT_RUN; this->TestResult.TestCount = 0; @@ -52,7 +57,7 @@ bool cmCTestRunTest::CheckOutput() std::string line; while ((timeout = timeEnd - std::chrono::steady_clock::now(), timeout > std::chrono::seconds(0))) { - int p = this->TestProcess->GetNextOutputLine(line, timeout.count()); + int p = this->TestProcess->GetNextOutputLine(line, timeout); if (p == cmsysProcess_Pipe_None) { // Process has terminated and all output read. return false; @@ -71,7 +76,9 @@ bool cmCTestRunTest::CheckOutput() cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->GetIndex() << ": " << "Test timeout changed to " - << this->TestProperties->AlternateTimeout + << std::chrono::duration_cast( + this->TestProperties->AlternateTimeout) + .count() << std::endl); this->TestProcess->ResetStartTime(); this->TestProcess->ChangeTimeout( @@ -259,7 +266,11 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) passed = this->TestResult.Status == cmCTestTestHandler::COMPLETED; char buf[1024]; - sprintf(buf, "%6.2f sec", this->TestProcess->GetTotalTime()); + sprintf(buf, "%6.2f sec", + double(std::chrono::duration_cast( + this->TestProcess->GetTotalTime()) + .count()) / + 1000.0); cmCTestLog(this->CTest, HANDLER_OUTPUT, buf << "\n"); if (outputTestErrorsToConsole) { @@ -295,12 +306,16 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) reasonType = "Test Fail Reason"; pass = false; } - double ttime = this->TestProcess->GetTotalTime(); - int hours = static_cast(ttime / (60 * 60)); - int minutes = static_cast(ttime / 60) % 60; - int seconds = static_cast(ttime) % 60; + auto ttime = this->TestProcess->GetTotalTime(); + auto hours = std::chrono::duration_cast(ttime); + ttime -= hours; + auto minutes = std::chrono::duration_cast(ttime); + ttime -= minutes; + auto seconds = std::chrono::duration_cast(ttime); char buffer[100]; - sprintf(buffer, "%02d:%02d:%02d", hours, minutes, seconds); + sprintf(buffer, "%02d:%02d:%02d", static_cast(hours.count()), + static_cast(minutes.count()), + static_cast(seconds.count())); *this->TestHandler->LogFile << "----------------------------------------------------------" << std::endl; @@ -380,7 +395,11 @@ void cmCTestRunTest::ComputeWeightedCost() { double prev = static_cast(this->TestProperties->PreviousRuns); double avgcost = static_cast(this->TestProperties->Cost); - double current = this->TestResult.ExecutionTime; + double current = + double(std::chrono::duration_cast( + this->TestResult.ExecutionTime) + .count()) / + 1000.0; if (this->TestResult.Status == cmCTestTestHandler::COMPLETED) { this->TestProperties->Cost = @@ -418,7 +437,7 @@ bool cmCTestRunTest::StartTest(size_t total) // Return immediately if test is disabled if (this->TestProperties->Disabled) { this->TestResult.Properties = this->TestProperties; - this->TestResult.ExecutionTime = 0; + this->TestResult.ExecutionTime = std::chrono::duration::zero(); this->TestResult.CompressOutput = false; this->TestResult.ReturnValue = -1; this->TestResult.CompletionStatus = "Disabled"; @@ -435,7 +454,7 @@ bool cmCTestRunTest::StartTest(size_t total) this->ComputeArguments(); std::vector& args = this->TestProperties->Args; this->TestResult.Properties = this->TestProperties; - this->TestResult.ExecutionTime = 0; + this->TestResult.ExecutionTime = std::chrono::duration::zero(); this->TestResult.CompressOutput = false; this->TestResult.ReturnValue = -1; this->TestResult.CompletionStatus = "Failed to start"; @@ -512,7 +531,7 @@ bool cmCTestRunTest::StartTest(size_t total) } this->StartTime = this->CTest->CurrentTime(); - double timeout = this->ResolveTimeout(); + auto timeout = this->ResolveTimeout(); if (this->StopTimePassed) { return false; @@ -593,9 +612,9 @@ void cmCTestRunTest::DartProcessing() } } -double cmCTestRunTest::ResolveTimeout() +std::chrono::duration cmCTestRunTest::ResolveTimeout() { - double timeout = this->TestProperties->Timeout; + auto timeout = this->TestProperties->Timeout; if (this->CTest->GetStopTime().empty()) { return timeout; @@ -625,31 +644,37 @@ double cmCTestRunTest::ResolveTimeout() lctime->tm_mon + 1, lctime->tm_mday, this->CTest->GetStopTime().c_str(), tzone_offset); - time_t stop_time = curl_getdate(buf, ¤t_time); - if (stop_time == -1) { + time_t stop_time_t = curl_getdate(buf, ¤t_time); + if (stop_time_t == -1) { return timeout; } + auto stop_time = std::chrono::system_clock::from_time_t(stop_time_t); + // the stop time refers to the next day if (this->CTest->NextDayStopTime) { - stop_time += 24 * 60 * 60; + stop_time += std::chrono::hours(24); } - int stop_timeout = - static_cast(stop_time - current_time) % (24 * 60 * 60); + auto stop_timeout = + (stop_time - std::chrono::system_clock::from_time_t(current_time)) % + std::chrono::hours(24); this->CTest->LastStopTimeout = stop_timeout; - if (stop_timeout <= 0 || stop_timeout > this->CTest->LastStopTimeout) { + if (stop_timeout <= std::chrono::duration::zero() || + stop_timeout > this->CTest->LastStopTimeout) { cmCTestLog(this->CTest, ERROR_MESSAGE, "The stop time has been passed. " "Stopping all tests." << std::endl); this->StopTimePassed = true; - return 0; + return std::chrono::duration::zero(); } - return timeout == 0 ? stop_timeout - : (timeout < stop_timeout ? timeout : stop_timeout); + return timeout == std::chrono::duration::zero() + ? stop_timeout + : (timeout < stop_timeout ? timeout : stop_timeout); } -bool cmCTestRunTest::ForkProcess(double testTimeOut, bool explicitTimeout, +bool cmCTestRunTest::ForkProcess(std::chrono::duration testTimeOut, + bool explicitTimeout, std::vector* environment) { this->TestProcess = new cmProcess; @@ -660,26 +685,37 @@ bool cmCTestRunTest::ForkProcess(double testTimeOut, bool explicitTimeout, this->TestProcess->SetCommandArguments(this->Arguments); // determine how much time we have - double timeout = this->CTest->GetRemainingTimeAllowed() - 120; - if (this->CTest->GetTimeOut() > 0 && this->CTest->GetTimeOut() < timeout) { + std::chrono::duration timeout = + std::min>( + this->CTest->GetRemainingTimeAllowed(), std::chrono::minutes(2)); + if (this->CTest->GetTimeOut() > std::chrono::duration::zero() && + this->CTest->GetTimeOut() < timeout) { timeout = this->CTest->GetTimeOut(); } - if (testTimeOut > 0 && + if (testTimeOut > std::chrono::duration::zero() && testTimeOut < this->CTest->GetRemainingTimeAllowed()) { timeout = testTimeOut; } // always have at least 1 second if we got to here - if (timeout <= 0) { - timeout = 1; + if (timeout <= std::chrono::duration::zero()) { + timeout = std::chrono::seconds(1); } // handle timeout explicitly set to 0 - if (testTimeOut == 0 && explicitTimeout) { - timeout = 0; - } - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index - << ": " - << "Test timeout computed to be: " << timeout << "\n", - this->TestHandler->GetQuiet()); + if (testTimeOut == std::chrono::duration::zero() && + explicitTimeout) { + timeout = std::chrono::duration::zero(); + } + cmCTestOptionalLog( + this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index + << ": " + << "Test timeout computed to be: " + << (timeout == std::chrono::duration::max() + ? std::string("infinite") + : std::to_string( + std::chrono::duration_cast(timeout) + .count())) + << "\n", + this->TestHandler->GetQuiet()); this->TestProcess->SetTimeout(timeout); diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index d3bb229..cd380ca 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include @@ -78,8 +79,9 @@ private: void DartProcessing(); void ExeNotFound(std::string exe); // Figures out a final timeout which is min(STOP_TIME, NOW+TIMEOUT) - double ResolveTimeout(); - bool ForkProcess(double testTimeOut, bool explicitTimeout, + std::chrono::duration ResolveTimeout(); + bool ForkProcess(std::chrono::duration testTimeOut, + bool explicitTimeout, std::vector* environment); void WriteLogOutputTop(size_t completed, size_t total); // Run post processing of the process output for MemCheck diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index d2ad8c5..922f5c7 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -1,5 +1,12 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ + +#ifdef _WIN32 +/* windows.h defines min() and max() macros, unless told to otherwise. This + * interferes with std::min() and std::max() at the very least. */ +#define NOMINMAX +#endif + #include "cmCTestScriptHandler.h" #include "cmsys/Directory.hxx" @@ -960,21 +967,21 @@ bool cmCTestScriptHandler::TryToRemoveBinaryDirectoryOnce( return cmSystemTools::RemoveADirectory(directoryPath); } -double cmCTestScriptHandler::GetRemainingTimeAllowed() +std::chrono::duration cmCTestScriptHandler::GetRemainingTimeAllowed() { if (!this->Makefile) { - return 1.0e7; + return std::chrono::duration::max(); } const char* timelimitS = this->Makefile->GetDefinition("CTEST_TIME_LIMIT"); if (!timelimitS) { - return 1.0e7; + return std::chrono::duration::max(); } auto timelimit = std::chrono::duration(atof(timelimitS)); auto duration = std::chrono::duration_cast>( std::chrono::steady_clock::now() - this->ScriptStartTime); - return (timelimit - duration).count(); + return (timelimit - duration); } diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h index 2090d04..9b7fa75 100644 --- a/Source/CTest/cmCTestScriptHandler.h +++ b/Source/CTest/cmCTestScriptHandler.h @@ -94,9 +94,9 @@ public: /** * Return the time remaianing that the script is allowed to run in * seconds if the user has set the variable CTEST_TIME_LIMIT. If that has - * not been set it returns 1e7 seconds + * not been set it returns a very large value. */ - double GetRemainingTimeAllowed(); + std::chrono::duration GetRemainingTimeAllowed(); cmCTestScriptHandler(); ~cmCTestScriptHandler() override; diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx index febd39e..232bd58 100644 --- a/Source/CTest/cmCTestTestCommand.cxx +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -7,6 +7,7 @@ #include "cmMakefile.h" #include "cmSystemTools.h" +#include #include #include #include @@ -36,14 +37,14 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() const char* ctestTimeout = this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT"); - double timeout; + std::chrono::duration timeout; if (ctestTimeout) { - timeout = atof(ctestTimeout); + timeout = std::chrono::duration(atof(ctestTimeout)); } else { timeout = this->CTest->GetTimeOut(); - if (timeout <= 0) { + if (timeout <= std::chrono::duration::zero()) { // By default use timeout of 10 minutes - timeout = 600; + timeout = std::chrono::minutes(10); } } this->CTest->SetTimeOut(timeout); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 6d8180c..1e15cc5 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -653,7 +653,11 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject) for (std::string const& l : p.Labels) { // only use labels found in labels if (labels.find(l) != labels.end()) { - labelTimes[l] += result.ExecutionTime * result.Properties->Processors; + labelTimes[l] += + double(std::chrono::duration_cast( + result.ExecutionTime) + .count()) / + 1000.0 * result.Properties->Processors; ++labelCounts[l]; } } @@ -1239,7 +1243,9 @@ void cmCTestTestHandler::ProcessDirectory(std::vector& passed, p.Cost = static_cast(rand()); } - if (p.Timeout == 0 && this->CTest->GetGlobalTimeout() != 0) { + if (p.Timeout == std::chrono::duration::zero() && + this->CTest->GetGlobalTimeout() != + std::chrono::duration::zero()) { p.Timeout = this->CTest->GetGlobalTimeout(); } @@ -1321,7 +1327,11 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.StartElement("NamedMeasurement"); xml.Attribute("type", "numeric/double"); xml.Attribute("name", "Execution Time"); - xml.Element("Value", result.ExecutionTime); + xml.Element("Value", + double(std::chrono::duration_cast( + result.ExecutionTime) + .count()) / + 1000.0); xml.EndElement(); // NamedMeasurement if (!result.Reason.empty()) { const char* reasonType = "Pass Reason"; @@ -2142,7 +2152,7 @@ bool cmCTestTestHandler::SetTestsProperties( rt.FixturesRequired.insert(lval.begin(), lval.end()); } if (key == "TIMEOUT") { - rt.Timeout = atof(val.c_str()); + rt.Timeout = std::chrono::duration(atof(val.c_str())); rt.ExplicitTimeout = true; } if (key == "COST") { @@ -2222,7 +2232,8 @@ bool cmCTestTestHandler::SetTestsProperties( "TIMEOUT_AFTER_MATCH expects two arguments, found " << propArgs.size() << std::endl); } else { - rt.AlternateTimeout = atof(propArgs[0].c_str()); + rt.AlternateTimeout = + std::chrono::duration(atof(propArgs[0].c_str())); std::vector lval; cmSystemTools::ExpandListArgument(propArgs[1], lval); for (std::string const& cr : lval) { @@ -2340,7 +2351,7 @@ bool cmCTestTestHandler::AddTest(const std::vector& args) test.WillFail = false; test.Disabled = false; test.RunSerial = false; - test.Timeout = 0; + test.Timeout = std::chrono::duration::zero(); test.ExplicitTimeout = false; test.Cost = 0; test.Processors = 1; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 8572e7b..19b345e 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -124,9 +124,9 @@ public: float Cost; int PreviousRuns; bool RunSerial; - double Timeout; + std::chrono::duration Timeout; bool ExplicitTimeout; - double AlternateTimeout; + std::chrono::duration AlternateTimeout; int Index; // Requested number of process slots int Processors; @@ -147,7 +147,7 @@ public: std::string Path; std::string Reason; std::string FullCommandLine; - double ExecutionTime; + std::chrono::duration ExecutionTime; int ReturnValue; int Status; std::string ExceptionStatus; diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index c889174..69ffb33 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -5,11 +5,21 @@ #include "cmProcessOutput.h" #include +void cmsysProcess_SetTimeout(cmsysProcess* process, + std::chrono::duration timeout) +{ + cmsysProcess_SetTimeout( + process, + double( + std::chrono::duration_cast(timeout).count()) / + 1000.0); +}; + cmProcess::cmProcess() { this->Process = nullptr; - this->Timeout = 0; - this->TotalTime = 0; + this->Timeout = std::chrono::duration::zero(); + this->TotalTime = std::chrono::duration::zero(); this->ExitValue = 0; this->Id = 0; this->StartTime = std::chrono::steady_clock::time_point(); @@ -100,10 +110,15 @@ bool cmProcess::Buffer::GetLast(std::string& line) return false; } -int cmProcess::GetNextOutputLine(std::string& line, double timeout) +int cmProcess::GetNextOutputLine(std::string& line, + std::chrono::duration timeout) { cmProcessOutput processOutput(cmProcessOutput::UTF8); std::string strdata; + double waitTimeout = + double( + std::chrono::duration_cast(timeout).count()) / + 1000.0; for (;;) { // Look for lines already buffered. if (this->Output.GetLine(line)) { @@ -113,7 +128,8 @@ int cmProcess::GetNextOutputLine(std::string& line, double timeout) // Check for more data from the process. char* data; int length; - int p = cmsysProcess_WaitForData(this->Process, &data, &length, &timeout); + int p = + cmsysProcess_WaitForData(this->Process, &data, &length, &waitTimeout); if (p == cmsysProcess_Pipe_Timeout) { return cmsysProcess_Pipe_Timeout; } @@ -136,23 +152,19 @@ int cmProcess::GetNextOutputLine(std::string& line, double timeout) } // No more data. Wait for process exit. - if (!cmsysProcess_WaitForExit(this->Process, &timeout)) { + if (!cmsysProcess_WaitForExit(this->Process, &waitTimeout)) { return cmsysProcess_Pipe_Timeout; } // Record exit information. this->ExitValue = cmsysProcess_GetExitValue(this->Process); - this->TotalTime = - static_cast(std::chrono::duration_cast( - std::chrono::steady_clock::now() - this->StartTime) - .count()) / - 1000.0; + this->TotalTime = std::chrono::steady_clock::now() - this->StartTime; // Because of a processor clock scew the runtime may become slightly // negative. If someone changed the system clock while the process was // running this may be even more. Make sure not to report a negative // duration here. - if (this->TotalTime <= 0.0) { - this->TotalTime = 0.0; + if (this->TotalTime <= std::chrono::duration::zero()) { + this->TotalTime = std::chrono::duration::zero(); } // std::cerr << "Time to run: " << this->TotalTime << "\n"; return cmsysProcess_Pipe_None; @@ -225,7 +237,7 @@ int cmProcess::ReportStatus() return result; } -void cmProcess::ChangeTimeout(double t) +void cmProcess::ChangeTimeout(std::chrono::duration t) { this->Timeout = t; cmsysProcess_SetTimeout(this->Process, this->Timeout); diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index ddd69b6..cbb611d 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -10,6 +10,13 @@ #include #include +/* + * A wrapper function for cmsysProcess_SetTimeout that takes an + * std::chrono::duration. For convenience only. + */ +void cmsysProcess_SetTimeout(cmsysProcess* process, + std::chrono::duration timeout); + /** \class cmProcess * \brief run a process with c++ * @@ -24,8 +31,8 @@ public: void SetCommand(const char* command); void SetCommandArguments(std::vector const& arg); void SetWorkingDirectory(const char* dir) { this->WorkingDirectory = dir; } - void SetTimeout(double t) { this->Timeout = t; } - void ChangeTimeout(double t); + void SetTimeout(std::chrono::duration t) { this->Timeout = t; } + void ChangeTimeout(std::chrono::duration t); void ResetStartTime(); // Return true if the process starts bool StartProcess(); @@ -37,7 +44,7 @@ public: int GetId() { return this->Id; } void SetId(int id) { this->Id = id; } int GetExitValue() { return this->ExitValue; } - double GetTotalTime() { return this->TotalTime; } + std::chrono::duration GetTotalTime() { return this->TotalTime; } int GetExitException(); std::string GetExitExceptionString(); /** @@ -47,12 +54,13 @@ public: * cmsysProcess_Pipe_STDOUT = Line came from stdout or stderr * cmsysProcess_Pipe_Timeout = Timeout expired while waiting */ - int GetNextOutputLine(std::string& line, double timeout); + int GetNextOutputLine(std::string& line, + std::chrono::duration timeout); private: - double Timeout; + std::chrono::duration Timeout; std::chrono::steady_clock::time_point StartTime; - double TotalTime; + std::chrono::duration TotalTime; cmsysProcess* Process; class Buffer : public std::vector { diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d358e3d..a4ca301 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1,5 +1,11 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ +#ifdef _WIN32 +/* windows.h defines min() and max() macros by default. This interferes with + * C++ functions names. + */ +#define NOMINMAX +#endif #include "cmCTest.h" #include "cm_curl.h" @@ -44,6 +50,7 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmProcess.h" #include "cmProcessOutput.h" #include "cmState.h" #include "cmStateSnapshot.h" @@ -278,9 +285,9 @@ cmCTest::cmCTest() this->TestModel = cmCTest::EXPERIMENTAL; this->MaxTestNameWidth = 30; this->InteractiveDebugMode = true; - this->TimeOut = 0; - this->GlobalTimeout = 0; - this->LastStopTimeout = 24 * 60 * 60; + this->TimeOut = std::chrono::duration::zero(); + this->GlobalTimeout = std::chrono::duration::zero(); + this->LastStopTimeout = std::chrono::hours(24); this->CompressXMLFiles = false; this->ScheduleType.clear(); this->StopTime.clear(); @@ -678,7 +685,8 @@ bool cmCTest::UpdateCTestConfiguration() this->BinaryDir = this->GetCTestConfiguration("BuildDirectory"); cmSystemTools::ChangeDirectory(this->BinaryDir); } - this->TimeOut = atoi(this->GetCTestConfiguration("TimeOut").c_str()); + this->TimeOut = + std::chrono::seconds(atoi(this->GetCTestConfiguration("TimeOut").c_str())); std::string const& testLoad = this->GetCTestConfiguration("TestLoad"); if (!testLoad.empty()) { unsigned long load; @@ -836,7 +844,8 @@ int cmCTest::ProcessSteps() for (Part p = PartStart; notest && p != PartCount; p = Part(p + 1)) { notest = !this->Parts[p]; } - if (this->Parts[PartUpdate] && (this->GetRemainingTimeAllowed() - 120 > 0)) { + if (this->Parts[PartUpdate] && + (this->GetRemainingTimeAllowed() > std::chrono::minutes(2))) { cmCTestGenericHandler* uphandler = this->GetHandler("update"); uphandler->SetPersistentOption( "SourceDirectory", @@ -850,33 +859,34 @@ int cmCTest::ProcessSteps() return 0; } if (this->Parts[PartConfigure] && - (this->GetRemainingTimeAllowed() - 120 > 0)) { + (this->GetRemainingTimeAllowed() > std::chrono::minutes(2))) { if (this->GetHandler("configure")->ProcessHandler() < 0) { res |= cmCTest::CONFIGURE_ERRORS; } } - if (this->Parts[PartBuild] && (this->GetRemainingTimeAllowed() - 120 > 0)) { + if (this->Parts[PartBuild] && + (this->GetRemainingTimeAllowed() > std::chrono::minutes(2))) { this->UpdateCTestConfiguration(); if (this->GetHandler("build")->ProcessHandler() < 0) { res |= cmCTest::BUILD_ERRORS; } } if ((this->Parts[PartTest] || notest) && - (this->GetRemainingTimeAllowed() - 120 > 0)) { + (this->GetRemainingTimeAllowed() > std::chrono::minutes(2))) { this->UpdateCTestConfiguration(); if (this->GetHandler("test")->ProcessHandler() < 0) { res |= cmCTest::TEST_ERRORS; } } if (this->Parts[PartCoverage] && - (this->GetRemainingTimeAllowed() - 120 > 0)) { + (this->GetRemainingTimeAllowed() > std::chrono::minutes(2))) { this->UpdateCTestConfiguration(); if (this->GetHandler("coverage")->ProcessHandler() < 0) { res |= cmCTest::COVERAGE_ERRORS; } } if (this->Parts[PartMemCheck] && - (this->GetRemainingTimeAllowed() - 120 > 0)) { + (this->GetRemainingTimeAllowed() > std::chrono::minutes(2))) { this->UpdateCTestConfiguration(); if (this->GetHandler("memcheck")->ProcessHandler() < 0) { res |= cmCTest::MEMORY_ERRORS; @@ -955,7 +965,8 @@ int cmCTest::GetTestModelFromString(const char* str) //###################################################################### int cmCTest::RunMakeCommand(const char* command, std::string& output, - int* retVal, const char* dir, int timeout, + int* retVal, const char* dir, + std::chrono::duration timeout, std::ostream& ofs, Encoding encoding) { // First generate the command and arguments @@ -1071,26 +1082,37 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output, //###################################################################### int cmCTest::RunTest(std::vector argv, std::string* output, - int* retVal, std::ostream* log, double testTimeOut, + int* retVal, std::ostream* log, + std::chrono::duration testTimeOut, std::vector* environment, Encoding encoding) { bool modifyEnv = (environment && !environment->empty()); // determine how much time we have - double timeout = this->GetRemainingTimeAllowed() - 120; - if (this->TimeOut > 0 && this->TimeOut < timeout) { + std::chrono::duration timeout = + std::min>(this->GetRemainingTimeAllowed(), + std::chrono::minutes(2)); + if (this->TimeOut > std::chrono::duration::zero() && + this->TimeOut < timeout) { timeout = this->TimeOut; } - if (testTimeOut > 0 && testTimeOut < this->GetRemainingTimeAllowed()) { + if (testTimeOut > std::chrono::duration::zero() && + testTimeOut < this->GetRemainingTimeAllowed()) { timeout = testTimeOut; } // always have at least 1 second if we got to here - if (timeout <= 0) { - timeout = 1; + if (timeout <= std::chrono::duration::zero()) { + timeout = std::chrono::seconds(1); } - cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, - "Test timeout computed to be: " << timeout << "\n"); + cmCTestLog( + this, HANDLER_VERBOSE_OUTPUT, "Test timeout computed to be: " + << (timeout == std::chrono::duration::max() + ? std::string("infinite") + : std::to_string( + std::chrono::duration_cast(timeout) + .count())) + << "\n"); if (cmSystemTools::SameFile(argv[0], cmSystemTools::GetCTestCommand()) && !this->ForceNewCTestProcess) { cmCTest inst; @@ -1107,10 +1129,12 @@ int cmCTest::RunTest(std::vector argv, std::string* output, // make sure we pass the timeout in for any build and test // invocations. Since --build-generator is required this is a // good place to check for it, and to add the arguments in - if (strcmp(i, "--build-generator") == 0 && timeout > 0) { + if (strcmp(i, "--build-generator") == 0 && + timeout > std::chrono::duration::zero()) { args.push_back("--test-timeout"); std::ostringstream msg; - msg << timeout; + msg << std::chrono::duration_cast(timeout) + .count(); args.push_back(msg.str()); } args.push_back(i); @@ -1757,7 +1781,7 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, if (this->CheckArgument(arg, "--timeout") && i < args.size() - 1) { i++; - double timeout = atof(args[i].c_str()); + auto timeout = std::chrono::duration(atof(args[i].c_str())); this->GlobalTimeout = timeout; } @@ -2564,7 +2588,9 @@ bool cmCTest::SetCTestConfigurationFromCMakeVariable( bool cmCTest::RunCommand(std::vector const& args, std::string* stdOut, std::string* stdErr, int* retVal, - const char* dir, double timeout, Encoding encoding) + const char* dir, + std::chrono::duration timeout, + Encoding encoding) { std::vector argv; argv.reserve(args.size() + 1); @@ -2775,10 +2801,10 @@ void cmCTest::Log(int logType, const char* file, int line, const char* msg, } } -double cmCTest::GetRemainingTimeAllowed() +std::chrono::duration cmCTest::GetRemainingTimeAllowed() { if (!this->GetHandler("script")) { - return 1.0e7; + return std::chrono::duration::max(); } cmCTestScriptHandler* ch = diff --git a/Source/cmCTest.h b/Source/cmCTest.h index a2d6fc3..ba94866 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -7,6 +7,7 @@ #include "cmProcessOutput.h" #include "cmsys/String.hxx" +#include #include #include #include @@ -139,10 +140,13 @@ public: /** what is the configuraiton type, e.g. Debug, Release etc. */ std::string const& GetConfigType(); - double GetTimeOut() { return this->TimeOut; } - void SetTimeOut(double t) { this->TimeOut = t; } + std::chrono::duration GetTimeOut() { return this->TimeOut; } + void SetTimeOut(std::chrono::duration t) { this->TimeOut = t; } - double GetGlobalTimeout() { return this->GlobalTimeout; } + std::chrono::duration GetGlobalTimeout() + { + return this->GlobalTimeout; + } /** how many test to run at the same time */ int GetParallelLevel() { return this->ParallelLevel; } @@ -200,9 +204,9 @@ public: /** * Return the time remaining that the script is allowed to run in * seconds if the user has set the variable CTEST_TIME_LIMIT. If that has - * not been set it returns 1e7 seconds + * not been set it returns a very large duration. */ - double GetRemainingTimeAllowed(); + std::chrono::duration GetRemainingTimeAllowed(); /** * Open file in the output directory and set the stream @@ -248,7 +252,9 @@ public: */ bool RunCommand(std::vector const& args, std::string* stdOut, std::string* stdErr, int* retVal = nullptr, - const char* dir = nullptr, double timeout = 0.0, + const char* dir = nullptr, + std::chrono::duration timeout = + std::chrono::duration::zero(), Encoding encoding = cmProcessOutput::Auto); /** @@ -268,7 +274,8 @@ public: * and retVal is return value or exception. */ int RunMakeCommand(const char* command, std::string& output, int* retVal, - const char* dir, int timeout, std::ostream& ofs, + const char* dir, std::chrono::duration timeout, + std::ostream& ofs, Encoding encoding = cmProcessOutput::Auto); /** Return the current tag */ @@ -315,7 +322,7 @@ public: * environment variables are restored to their previous values. */ int RunTest(std::vector args, std::string* output, int* retVal, - std::ostream* logfile, double testTimeOut, + std::ostream* logfile, std::chrono::duration testTimeOut, std::vector* environment, Encoding encoding = cmProcessOutput::Auto); @@ -503,11 +510,11 @@ private: int TestModel; std::string SpecificTrack; - double TimeOut; + std::chrono::duration TimeOut; - double GlobalTimeout; + std::chrono::duration GlobalTimeout; - int LastStopTimeout; + std::chrono::duration LastStopTimeout; int MaxTestNameWidth; diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 221da06..5408402 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -64,6 +64,7 @@ { symbol: [ "std::__decay_and_strip::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip<__gnu_cxx::__normal_iterator > > &>::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__success_type > >::type", private, "\"cmConfigure.h\"", public ] }, + { symbol: [ "std::__success_type > >::type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::enable_if > >::type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::enable_if > >::type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::enable_if > >::type", private, "\"cmConfigure.h\"", public ] }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bfcc20343c966ee031426e04c5eab504a0af8e27 commit bfcc20343c966ee031426e04c5eab504a0af8e27 Author: Bill Hoffman AuthorDate: Thu Nov 30 17:36:43 2017 -0500 Commit: Bill Hoffman CommitDate: Fri Dec 1 16:23:45 2017 -0500 Update cpplint support to return 0 and mark warnings for CDash. This commit makes cpplint act like the other compiler mirroring tools. It will always return 0 even if it reports warnings and will only return non zero if there is a problem running the command. In addition, it will now add some extra text to allow CTest to recognize the warnings and report them correctly to CDash. diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 3d9f65a..b78fbe6 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -270,10 +270,12 @@ static int HandleCppLint(const std::string& runCmd, << "\n"; return 1; } - + std::cerr << "Warning: cpplint diagnostics:\n"; // Output the output from cpplint to stderr std::cerr << stdOut; - return ret; + // always return 0 so the build can continue as cpplint returns non-zero + // for any warning + return 0; } static int HandleCppCheck(const std::string& runCmd, diff --git a/Tests/RunCMake/Cpplint/C-error-Build-result.txt b/Tests/RunCMake/Cpplint/C-error-Build-result.txt index d197c91..573541a 100644 --- a/Tests/RunCMake/Cpplint/C-error-Build-result.txt +++ b/Tests/RunCMake/Cpplint/C-error-Build-result.txt @@ -1 +1 @@ -[^0] +0 diff --git a/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt b/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt index d197c91..573541a 100644 --- a/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt +++ b/Tests/RunCMake/Cpplint/C-error-launch-Build-result.txt @@ -1 +1 @@ -[^0] +0 diff --git a/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt b/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt index d197c91..573541a 100644 --- a/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt +++ b/Tests/RunCMake/Cpplint/CXX-error-Build-result.txt @@ -1 +1 @@ -[^0] +0 diff --git a/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt b/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt index d197c91..573541a 100644 --- a/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt +++ b/Tests/RunCMake/Cpplint/CXX-error-launch-Build-result.txt @@ -1 +1 @@ -[^0] +0 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=923b8fadd5fe6af56197cf3916a3292b60c0e8db commit 923b8fadd5fe6af56197cf3916a3292b60c0e8db Author: Brad King AuthorDate: Tue Nov 28 10:45:44 2017 -0500 Commit: Brad King CommitDate: Tue Nov 28 10:50:44 2017 -0500 IWYU: Add mappings for std::enable_if on chrono durations IWYU incorrectly classifies this internal STL type as not internal, and suggests including `` for it. Work around the problem by mapping the offending names to a file that we always include. See include-what-you-use issue 434. diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index f25c9c3..79446e8 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -17,7 +17,6 @@ #include #include #include -#include static const char* cmCTestErrorMatches[] = { "^[Bb]us [Ee]rror", diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index ab77986..7c5b3b0 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -9,7 +9,6 @@ #include #include #include -#include cmCTestConfigureHandler::cmCTestConfigureHandler() { diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index bbfe9bd..69cd08c 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include class cmMakefile; diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 2e7874d..57d2489 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -14,7 +14,6 @@ #include #include #include -#include struct CatToErrorType { diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 3bf27a0..d2ad8c5 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -10,7 +10,6 @@ #include #include #include -#include #include #include "cmCTest.h" diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index e7c719c..6d8180c 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include "cmAlgorithms.h" #include "cmCTest.h" diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index f86d4a3..809abd1 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -20,7 +20,6 @@ #include #include // IWYU pragma: keep #include -#include static const char* cmCTestUpdateHandlerUpdateStrings[] = { "Unknown", "CVS", "SVN", "BZR", "GIT", "HG", "P4" diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 78dd598..c889174 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -4,7 +4,6 @@ #include "cmProcessOutput.h" #include -#include cmProcess::cmProcess() { diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 6477d59..221da06 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -63,6 +63,10 @@ { symbol: [ "std::__decay_and_strip &>::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip<__gnu_cxx::__normal_iterator > > &>::__type", private, "\"cmConfigure.h\"", public ] }, + { symbol: [ "std::__success_type > >::type", private, "\"cmConfigure.h\"", public ] }, + { symbol: [ "std::enable_if > >::type", private, "\"cmConfigure.h\"", public ] }, + { symbol: [ "std::enable_if > >::type", private, "\"cmConfigure.h\"", public ] }, + { symbol: [ "std::enable_if > >::type", private, "\"cmConfigure.h\"", public ] }, # KWIML { include: [ "", public, "\"cm_kwiml.h\"", public ] }, ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestBuildAndTestHandler.cxx | 2 +- Source/CTest/cmCTestBuildHandler.cxx | 3 +- Source/CTest/cmCTestConfigureHandler.cxx | 6 +- Source/CTest/cmCTestCoverageHandler.cxx | 22 ++-- Source/CTest/cmCTestMemCheckHandler.cxx | 1 - Source/CTest/cmCTestRunTest.cxx | 110 +++++++++++++------- Source/CTest/cmCTestRunTest.h | 6 +- Source/CTest/cmCTestScriptHandler.cxx | 16 ++- Source/CTest/cmCTestScriptHandler.h | 4 +- Source/CTest/cmCTestTestCommand.cxx | 9 +- Source/CTest/cmCTestTestHandler.cxx | 24 +++-- Source/CTest/cmCTestTestHandler.h | 6 +- Source/CTest/cmCTestUpdateHandler.cxx | 1 - Source/CTest/cmProcess.cxx | 39 ++++--- Source/CTest/cmProcess.h | 20 ++-- Source/cmCTest.cxx | 76 +++++++++----- Source/cmCTest.h | 29 ++++-- Source/cmLocalVisualStudio7Generator.cxx | 2 + Source/cmVisualStudio10TargetGenerator.cxx | 1 + Source/cmcmd.cxx | 6 +- Tests/RunCMake/Cpplint/C-error-Build-result.txt | 2 +- .../Cpplint/C-error-launch-Build-result.txt | 2 +- Tests/RunCMake/Cpplint/CXX-error-Build-result.txt | 2 +- .../Cpplint/CXX-error-launch-Build-result.txt | 2 +- Utilities/IWYU/mapping.imp | 5 + 25 files changed, 256 insertions(+), 140 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 5 08:25:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 5 Dec 2017 08:25:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-531-gd06b826 Message-ID: <20171205132504.27D3A102C32@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 d06b8264212c893b5da8d7499328eb403aaaad37 (commit) via 83068cb1edb3258af9315b5e73e674717a829531 (commit) via 729dda542010ed584d08630d2e5ab1ff3129e5e8 (commit) via 2c06e9e73ed2214f0f96e392ca2a35f74ee6efa6 (commit) via c89e8522bbe0d5526b2d2e6751511fe9737b37e8 (commit) via 6bffc13ef1c85ec565273d25e811fd6c326533f0 (commit) via 3519c8f2473c40fd6d2ce86e29742ef30b7e11f1 (commit) from 0236e5080229e5ce05c43077a56dc5b58fc644fd (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=d06b8264212c893b5da8d7499328eb403aaaad37 commit d06b8264212c893b5da8d7499328eb403aaaad37 Merge: 83068cb 3519c8f Author: Brad King AuthorDate: Tue Dec 5 13:18:06 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 5 08:18:13 2017 -0500 Merge topic 'update-cm-thread' 3519c8f2 utilities: Swapped to use std C++11 mutex/threading constructs Acked-by: Kitware Robot Merge-request: !1551 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83068cb1edb3258af9315b5e73e674717a829531 commit 83068cb1edb3258af9315b5e73e674717a829531 Merge: 729dda5 2c06e9e Author: Brad King AuthorDate: Tue Dec 5 13:17:24 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 5 08:17:30 2017 -0500 Merge topic 'include_external_ms_project_support_non_windows_target' 2c06e9e7 include_external_msproject: Support non-Windows target platforms c89e8522 cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported method Acked-by: Kitware Robot Merge-request: !1525 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=729dda542010ed584d08630d2e5ab1ff3129e5e8 commit 729dda542010ed584d08630d2e5ab1ff3129e5e8 Merge: 0236e50 6bffc13 Author: Brad King AuthorDate: Tue Dec 5 13:15:36 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 5 08:15:40 2017 -0500 Merge topic 'src-genex-refactoring' 6bffc13e Refactor per-source generator expression evaluation Acked-by: Kitware Robot Merge-request: !1550 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c06e9e73ed2214f0f96e392ca2a35f74ee6efa6 commit 2c06e9e73ed2214f0f96e392ca2a35f74ee6efa6 Author: Tomoki Imai AuthorDate: Sun Nov 26 20:29:03 2017 +0900 Commit: Brad King CommitDate: Mon Dec 4 11:23:38 2017 -0500 include_external_msproject: Support non-Windows target platforms Allow the command on any generator that supports it, even if the target platform does not define `WIN32`. Fixes: #17511 diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index bd16b1d..85e8cd3 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -3,6 +3,7 @@ #include "cmIncludeExternalMSProjectCommand.h" #ifdef _WIN32 +#include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmStateTypes.h" #include "cmSystemTools.h" @@ -22,7 +23,9 @@ bool cmIncludeExternalMSProjectCommand::InitialPass( } // only compile this for win32 to avoid coverage errors #ifdef _WIN32 - if (this->Makefile->GetDefinition("WIN32")) { + if (this->Makefile->GetDefinition("WIN32") || + this->Makefile->GetGlobalGenerator() + ->IsIncludeExternalMSProjectSupported()) { enum Doing { DoingNone, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c89e8522bbe0d5526b2d2e6751511fe9737b37e8 commit c89e8522bbe0d5526b2d2e6751511fe9737b37e8 Author: Tomoki Imai AuthorDate: Sat Dec 2 20:54:55 2017 +0900 Commit: Brad King CommitDate: Mon Dec 4 11:21:43 2017 -0500 cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported method diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 8fcb533..abc451a 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -358,6 +358,10 @@ public: virtual bool IsIPOSupported() const { return false; } + /** Return whether the generator can import external visual studio project + using INCLUDE_EXTERNAL_MSPROJECT */ + virtual bool IsIncludeExternalMSProjectSupported() const { return false; } + /** Return whether the generator should use EFFECTIVE_PLATFORM_NAME. This is relevant for mixed macOS and iOS builds. */ virtual bool UseEffectivePlatformName(cmMakefile*) const { return false; } diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 55a6813..f4fc3cf 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -101,6 +101,8 @@ public: /** Return true if building for Windows CE */ virtual bool TargetsWindowsCE() const { return false; } + bool IsIncludeExternalMSProjectSupported() const override { return true; } + class TargetSet : public std::set { }; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bffc13ef1c85ec565273d25e811fd6c326533f0 commit 6bffc13ef1c85ec565273d25e811fd6c326533f0 Author: Marc Chevrier AuthorDate: Fri Dec 1 17:10:45 2017 +0100 Commit: Brad King CommitDate: Mon Dec 4 09:10:09 2017 -0500 Refactor per-source generator expression evaluation Prepare to add generator expression support to more source properties. Factor out some duplicated code into a helper to avoid further duplication. diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 3d72ae3..2443ece 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -362,9 +362,8 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject( // Add source file specific flags. if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) { - cmGeneratorExpression ge; - const char* processed = ge.Parse(cflags)->Evaluate(lg, config); - lg->AppendFlags(flags, processed); + cmGeneratorExpressionInterpreter genexInterpreter(lg, gtgt, config); + lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags)); } return flags; diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index cface0d..611fbf8 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -153,4 +153,54 @@ private: bool EvaluateForBuildsystem; }; +class cmGeneratorExpressionInterpreter +{ + CM_DISABLE_COPY(cmGeneratorExpressionInterpreter) + +public: + cmGeneratorExpressionInterpreter(cmLocalGenerator* localGenerator, + cmGeneratorTarget* generatorTarget, + const std::string& config) + : LocalGenerator(localGenerator) + , GeneratorTarget(generatorTarget) + , Config(config) + { + } + + const char* Evaluate(const char* expression) + { + this->CompiledGeneratorExpression = + this->GeneratorExpression.Parse(expression); + + return this->CompiledGeneratorExpression->Evaluate( + this->LocalGenerator, this->Config, false, this->GeneratorTarget); + } + const char* Evaluate(const std::string& expression) + { + return this->Evaluate(expression.c_str()); + } + +protected: + cmGeneratorExpression& GetGeneratorExpression() + { + return this->GeneratorExpression; + } + + cmCompiledGeneratorExpression& GetCompiledGeneratorExpression() + { + return *(this->CompiledGeneratorExpression); + } + + cmLocalGenerator* GetLocalGenerator() { return this->LocalGenerator; } + + cmGeneratorTarget* GetGeneratorTarget() { return this->GeneratorTarget; } + +private: + cmGeneratorExpression GeneratorExpression; + std::unique_ptr CompiledGeneratorExpression; + cmLocalGenerator* LocalGenerator = nullptr; + cmGeneratorTarget* GeneratorTarget = nullptr; + std::string Config; +}; + #endif diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index c376c8d..63f708b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -676,9 +676,51 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFileFromPath( return buildFile; } +class XCodeGeneratorExpressionInterpreter + : public cmGeneratorExpressionInterpreter +{ + CM_DISABLE_COPY(XCodeGeneratorExpressionInterpreter) + +public: + XCodeGeneratorExpressionInterpreter(cmSourceFile* sourceFile, + cmLocalGenerator* localGenerator, + cmGeneratorTarget* generatorTarget) + : cmGeneratorExpressionInterpreter(localGenerator, generatorTarget, + "NO-PER-CONFIG-SUPPORT-IN-XCODE") + , SourceFile(sourceFile) + { + } + + using cmGeneratorExpressionInterpreter::Evaluate; + + const char* Evaluate(const char* expression, const char* property) + { + const char* processed = this->Evaluate(expression); + if (this->GetCompiledGeneratorExpression() + .GetHadContextSensitiveCondition()) { + std::ostringstream e; + /* clang-format off */ + e << + "Xcode does not support per-config per-source " << property << ":\n" + " " << expression << "\n" + "specified for source:\n" + " " << this->SourceFile->GetFullPath() << "\n"; + /* clang-format on */ + this->GetLocalGenerator()->IssueMessage(cmake::FATAL_ERROR, e.str()); + } + + return processed; + } + +private: + cmSourceFile* SourceFile = nullptr; +}; + cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( cmLocalGenerator* lg, cmSourceFile* sf, cmGeneratorTarget* gtgt) { + XCodeGeneratorExpressionInterpreter genexInterpreter(sf, lg, gtgt); + // Add flags from target and source file properties. std::string flags; const char* srcfmt = sf->GetProperty("Fortran_FORMAT"); @@ -693,24 +735,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( break; } if (const char* cflags = sf->GetProperty("COMPILE_FLAGS")) { - cmGeneratorExpression ge; - std::string configName = "NO-PER-CONFIG-SUPPORT-IN-XCODE"; - std::unique_ptr compiledExpr = - ge.Parse(cflags); - const char* processed = - compiledExpr->Evaluate(lg, configName, false, gtgt); - if (compiledExpr->GetHadContextSensitiveCondition()) { - std::ostringstream e; - /* clang-format off */ - e << - "Xcode does not support per-config per-source COMPILE_FLAGS:\n" - " " << cflags << "\n" - "specified for source:\n" - " " << sf->GetFullPath() << "\n"; - /* clang-format on */ - lg->IssueMessage(cmake::FATAL_ERROR, e.str()); - } - lg->AppendFlags(flags, processed); + lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags, "COMPILE_FLAGS")); } // Add per-source definitions. diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f01ed7a..999c1f5 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1456,15 +1456,14 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( i != configs.end(); ++i, ++ci) { std::string configUpper = cmSystemTools::UpperCase(*i); cmLVS7GFileConfig fc; + cmGeneratorExpressionInterpreter genexInterpreter(lg, gt, *i); bool needfc = false; if (!objectName.empty()) { fc.ObjectName = objectName; needfc = true; } if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { - cmGeneratorExpression ge; - std::unique_ptr cge = ge.Parse(cflags); - fc.CompileFlags = cge->Evaluate(lg, *i, false, gt); + fc.CompileFlags = genexInterpreter.Evaluate(cflags); needfc = true; } if (lg->FortranProject) { diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index dd8a373..85dc55e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -425,6 +425,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::string config = this->LocalGenerator->GetConfigName(); std::string configUpper = cmSystemTools::UpperCase(config); + cmGeneratorExpressionInterpreter genexInterpreter( + this->LocalGenerator, this->GeneratorTarget, config); // Add Fortran format flags. if (lang == "Fortran") { @@ -433,10 +435,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Add flags from source file properties. if (const char* cflags = source.GetProperty("COMPILE_FLAGS")) { - cmGeneratorExpression ge; - std::unique_ptr cge = ge.Parse(cflags); - const char* evaluatedFlags = cge->Evaluate(this->LocalGenerator, config, - false, this->GeneratorTarget); + const char* evaluatedFlags = genexInterpreter.Evaluate(cflags); this->LocalGenerator->AppendFlags(flags, evaluatedFlags); *this->FlagFileStream << "# Custom flags: " << relativeObj << "_FLAGS = " << evaluatedFlags << "\n" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 0262b3c..bad4112 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -136,12 +136,11 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject( // Add source file specific flags. if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) { - std::string config = this->LocalGenerator->GetConfigName(); - cmGeneratorExpression ge; - std::unique_ptr cge = ge.Parse(cflags); - const char* evaluatedFlags = cge->Evaluate(this->LocalGenerator, config, - false, this->GeneratorTarget); - this->LocalGenerator->AppendFlags(flags, evaluatedFlags); + cmGeneratorExpressionInterpreter genexInterpreter( + this->LocalGenerator, this->GeneratorTarget, + this->LocalGenerator->GetConfigName()); + this->LocalGenerator->AppendFlags(flags, + genexInterpreter.Evaluate(cflags)); } return flags; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index cfac513..1bb07e7 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -692,6 +692,8 @@ static Json::Value DumpSourceFilesList( std::vector files; target->GetSourceFiles(files, config); + cmGeneratorExpressionInterpreter genexInterpreter( + target->GetLocalGenerator(), target, config); std::unordered_map> fileGroups; for (cmSourceFile* file : files) { @@ -703,11 +705,7 @@ static Json::Value DumpSourceFilesList( std::string compileFlags = ld.Flags; if (const char* cflags = file->GetProperty("COMPILE_FLAGS")) { - cmGeneratorExpression ge; - auto cge = ge.Parse(cflags); - const char* processed = - cge->Evaluate(target->GetLocalGenerator(), config); - lg->AppendFlags(compileFlags, processed); + lg->AppendFlags(compileFlags, genexInterpreter.Evaluate(cflags)); } fileData.Flags = compileFlags; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index caeeeb9..3436f15 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2062,10 +2062,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( bool configDependentFlags = false; std::string defines; if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { - - if (cmGeneratorExpression::Find(cflags) != std::string::npos) { - configDependentFlags = true; - } + configDependentFlags = + cmGeneratorExpression::Find(cflags) != std::string::npos; flags += cflags; } if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) { @@ -2122,8 +2120,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( } // if we have flags or defines for this config then // use them - if (!flags.empty() || configDependentFlags || !configDefines.empty() || - compileAs || noWinRT) { + if (!flags.empty() || !configDefines.empty() || compileAs || noWinRT) { (*this->BuildFileStream) << firstString; firstString = ""; // only do firstString once hasFlags = true; @@ -2144,6 +2141,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( } else if (srclang == "CSharp") { flagtable = gg->GetCSharpFlagTable(); } + cmGeneratorExpressionInterpreter genexInterpreter( + this->LocalGenerator, this->GeneratorTarget, *config); cmVisualStudioGeneratorOptions clOptions( this->LocalGenerator, cmVisualStudioGeneratorOptions::Compiler, flagtable, 0, this); @@ -2154,11 +2153,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( clOptions.AddFlag("CompileAsWinRT", "false"); } if (configDependentFlags) { - cmGeneratorExpression ge; - std::unique_ptr cge = ge.Parse(flags); - std::string evaluatedFlags = cge->Evaluate( - this->LocalGenerator, *config, false, this->GeneratorTarget); - clOptions.Parse(evaluatedFlags.c_str()); + clOptions.Parse(genexInterpreter.Evaluate(flags)); } else { clOptions.Parse(flags.c_str()); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3519c8f2473c40fd6d2ce86e29742ef30b7e11f1 commit 3519c8f2473c40fd6d2ce86e29742ef30b7e11f1 Author: Justin Berger AuthorDate: Fri Dec 1 12:09:51 2017 -0700 Commit: Justin Berger CommitDate: Fri Dec 1 12:09:51 2017 -0700 utilities: Swapped to use std C++11 mutex/threading constructs diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index ac42fde..1b04ca2 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -18,6 +18,7 @@ #include #include #include +#include #include void on_signal(uv_signal_t* signal, int signum) @@ -490,7 +491,7 @@ void cmServerBase::StartShutDown() SIGHUPHandler.reset(); { - cm::unique_lock lock(ConnectionsMutex); + std::unique_lock lock(ConnectionsMutex); for (auto& connection : Connections) { connection->OnConnectionShuttingDown(); } @@ -537,7 +538,7 @@ cmServerBase::~cmServerBase() void cmServerBase::AddNewConnection(cmConnection* ownedConnection) { { - cm::unique_lock lock(ConnectionsMutex); + std::unique_lock lock(ConnectionsMutex); Connections.emplace_back(ownedConnection); } ownedConnection->SetServer(this); @@ -554,7 +555,7 @@ void cmServerBase::OnDisconnect(cmConnection* pConnection) return m.get() == pConnection; }; { - cm::unique_lock lock(ConnectionsMutex); + std::unique_lock lock(ConnectionsMutex); Connections.erase( std::remove_if(Connections.begin(), Connections.end(), pred), Connections.end()); diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx index d7e38c3..eb70416 100644 --- a/Source/cmUVHandlePtr.cxx +++ b/Source/cmUVHandlePtr.cxx @@ -4,9 +4,9 @@ #include "cmUVHandlePtr.h" #include +#include #include -#include "cm_thread.hxx" #include "cm_uv.h" namespace cm { @@ -97,16 +97,16 @@ struct uv_handle_deleter * which is mandated by the standard for Deleter on * shared_ptrs. */ - std::shared_ptr handleMutex; + std::shared_ptr handleMutex; uv_handle_deleter() - : handleMutex(std::make_shared()) + : handleMutex(std::make_shared()) { } void operator()(uv_async_t* handle) { - cm::lock_guard lock(*handleMutex); + std::lock_guard lock(*handleMutex); default_delete(handle); } }; @@ -116,7 +116,7 @@ void uv_async_ptr::send() auto deleter = std::get_deleter>(this->handle); assert(deleter); - cm::lock_guard lock(*deleter->handleMutex); + std::lock_guard lock(*deleter->handleMutex); if (this->handle) { uv_async_send(*this); } diff --git a/Source/cm_thread.hxx b/Source/cm_thread.hxx index ec5fe1d..84e6a5c 100644 --- a/Source/cm_thread.hxx +++ b/Source/cm_thread.hxx @@ -7,34 +7,6 @@ #include "cm_uv.h" namespace cm { -class mutex -{ - CM_DISABLE_COPY(mutex) - uv_mutex_t _M_; - -public: - mutex() { uv_mutex_init(&_M_); } - ~mutex() { uv_mutex_destroy(&_M_); } - - void lock() { uv_mutex_lock(&_M_); } - - void unlock() { uv_mutex_unlock(&_M_); } -}; - -template -class lock_guard -{ - T& _mutex; - CM_DISABLE_COPY(lock_guard) - -public: - lock_guard(T& m) - : _mutex(m) - { - _mutex.lock(); - } - ~lock_guard() { _mutex.unlock(); } -}; class shared_mutex { @@ -68,17 +40,5 @@ public: } ~shared_lock() { _mutex.unlock_shared(); } }; - -template -class unique_lock : public lock_guard -{ - CM_DISABLE_COPY(unique_lock) - -public: - unique_lock(T& m) - : lock_guard(m) - { - } -}; } #endif ----------------------------------------------------------------------- Summary of changes: Source/cmExtraSublimeTextGenerator.cxx | 5 +-- Source/cmGeneratorExpression.h | 50 +++++++++++++++++++++ Source/cmGlobalGenerator.h | 4 ++ Source/cmGlobalVisualStudioGenerator.h | 2 + Source/cmGlobalXCodeGenerator.cxx | 61 ++++++++++++++++++-------- Source/cmIncludeExternalMSProjectCommand.cxx | 5 ++- Source/cmLocalVisualStudio7Generator.cxx | 5 +-- Source/cmMakefileTargetGenerator.cxx | 7 ++- Source/cmNinjaTargetGenerator.cxx | 11 +++-- Source/cmServer.cxx | 7 +-- Source/cmServerProtocol.cxx | 8 ++-- Source/cmUVHandlePtr.cxx | 10 ++--- Source/cmVisualStudio10TargetGenerator.cxx | 17 +++---- Source/cm_thread.hxx | 40 ----------------- 14 files changed, 133 insertions(+), 99 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 6 00:05:15 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 6 Dec 2017 00:05:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-532-ga442624 Message-ID: <20171206050516.733B4102611@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 a442624def318c950936c8d49964c4b3bfb0487d (commit) from d06b8264212c893b5da8d7499328eb403aaaad37 (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=a442624def318c950936c8d49964c4b3bfb0487d commit a442624def318c950936c8d49964c4b3bfb0487d Author: Kitware Robot AuthorDate: Wed Dec 6 00:01:25 2017 -0500 Commit: Kitware Robot CommitDate: Wed Dec 6 00:01:25 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index abb6e38..bb18741 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 10) -set(CMake_VERSION_PATCH 20171205) +set(CMake_VERSION_PATCH 20171206) #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 Dec 6 08:05:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 6 Dec 2017 08:05:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-540-g9820657 Message-ID: <20171206130511.E49541029FE@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 98206571fb68881fe373c040ae703aac318fe6d7 (commit) via 22f440ae6930c8ef9eccfa65530c6b59949657ef (commit) via b6dd3969e819a7a2508c8f705ef7e13fb7e11dff (commit) via 79b241dee076d594f5527a148142c0c15a5909dc (commit) via 4a8bbc520aa62187fb70aaf0c28daa67e275c26e (commit) via 52a5c4a877d066a283e76bd5b6e63a9f3eec31ea (commit) via 2047eb360de5a9d2a8cac6a689bd7846c5a0128f (commit) via bde7513d2fcd7a366eb4dd93fc1f061334743bb7 (commit) from a442624def318c950936c8d49964c4b3bfb0487d (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=98206571fb68881fe373c040ae703aac318fe6d7 commit 98206571fb68881fe373c040ae703aac318fe6d7 Merge: 22f440a 79b241d Author: Brad King AuthorDate: Wed Dec 6 13:00:48 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 6 08:01:20 2017 -0500 Merge topic 'update-kwsys' 79b241de cmake-gui: Update RegexExplorer for changes to KWSys 4a8bbc52 Merge branch 'upstream-KWSys' into update-kwsys 52a5c4a8 KWSys 2017-12-05 (9376537e) Acked-by: Kitware Robot Merge-request: !1558 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22f440ae6930c8ef9eccfa65530c6b59949657ef commit 22f440ae6930c8ef9eccfa65530c6b59949657ef Merge: b6dd396 bde7513 Author: Brad King AuthorDate: Wed Dec 6 13:00:12 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 6 08:00:46 2017 -0500 Merge topic 'findmpi-notfound-spam' bde7513d FindMPI: Correct legacy variable handling Acked-by: Kitware Robot Merge-request: !1557 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6dd3969e819a7a2508c8f705ef7e13fb7e11dff commit b6dd3969e819a7a2508c8f705ef7e13fb7e11dff Merge: a442624 2047eb3 Author: Brad King AuthorDate: Wed Dec 6 13:00:01 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 6 08:00:07 2017 -0500 Merge topic 'findmpi-found-cond' 2047eb36 FindMPI: Fix multiple configure runs Acked-by: Kitware Robot Merge-request: !1556 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79b241dee076d594f5527a148142c0c15a5909dc commit 79b241dee076d594f5527a148142c0c15a5909dc Author: Brad King AuthorDate: Tue Dec 5 11:32:08 2017 -0500 Commit: Brad King CommitDate: Tue Dec 5 11:32:08 2017 -0500 cmake-gui: Update RegexExplorer for changes to KWSys diff --git a/Source/QtDialog/RegexExplorer.cxx b/Source/QtDialog/RegexExplorer.cxx index abed70e..cb67f85 100644 --- a/Source/QtDialog/RegexExplorer.cxx +++ b/Source/QtDialog/RegexExplorer.cxx @@ -8,7 +8,7 @@ RegexExplorer::RegexExplorer(QWidget* p) { this->setupUi(this); - for (int i = 1; i < cmsys::RegularExpression::NSUBEXP; ++i) { + for (int i = 1; i < cmsys::RegularExpressionMatch::NSUBEXP; ++i) { matchNumber->addItem(QString("Match %1").arg(QString::number(i)), QVariant(i)); } @@ -105,7 +105,7 @@ void RegexExplorer::on_matchNumber_currentIndexChanged(int index) QVariant itemData = matchNumber->itemData(index); int idx = itemData.toInt(); - if (idx < 1 || idx >= cmsys::RegularExpression::NSUBEXP) { + if (idx < 1 || idx >= cmsys::RegularExpressionMatch::NSUBEXP) { return; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a8bbc520aa62187fb70aaf0c28daa67e275c26e commit 4a8bbc520aa62187fb70aaf0c28daa67e275c26e Merge: d06b826 52a5c4a Author: Brad King AuthorDate: Tue Dec 5 11:31:27 2017 -0500 Commit: Brad King CommitDate: Tue Dec 5 11:31:27 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-12-05 (9376537e) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52a5c4a877d066a283e76bd5b6e63a9f3eec31ea commit 52a5c4a877d066a283e76bd5b6e63a9f3eec31ea Author: KWSys Upstream AuthorDate: Tue Dec 5 11:30:36 2017 -0500 Commit: Brad King CommitDate: Tue Dec 5 11:31:27 2017 -0500 KWSys 2017-12-05 (9376537e) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 9376537ec0e4770a28f4b1705cfacf79650f71b6 (master). Upstream Shortlog ----------------- Brad King (1): e9557f37 RegularExpression: Fix regression in 'find' method Sebastian Holtermann (4): 4d1e8738 RegularExpression: Make compile() reentrant (thread safe) 64f80068 RegularExpression: Make find() reentrant (thread safe) bbc94ba8 RegularExpression: Remove unused code cff58f07 RegularExpression: New RegularExpressionMatch class diff --git a/RegularExpression.cxx b/RegularExpression.cxx index 26e84e0..fa3551c 100644 --- a/RegularExpression.cxx +++ b/RegularExpression.cxx @@ -45,9 +45,9 @@ RegularExpression::RegularExpression(const RegularExpression& rxp) this->program = new char[this->progsize]; // Allocate storage for (ind = this->progsize; ind-- != 0;) // Copy regular expresion this->program[ind] = rxp.program[ind]; - this->startp[0] = rxp.startp[0]; // Copy pointers into last - this->endp[0] = rxp.endp[0]; // Successful "find" operation - this->regmust = rxp.regmust; // Copy field + // Copy pointers into last successful "find" operation + this->regmatch = rxp.regmatch; + this->regmust = rxp.regmust; // Copy field if (rxp.regmust != 0) { char* dum = rxp.program; ind = 0; @@ -78,9 +78,9 @@ RegularExpression& RegularExpression::operator=(const RegularExpression& rxp) this->program = new char[this->progsize]; // Allocate storage for (ind = this->progsize; ind-- != 0;) // Copy regular expresion this->program[ind] = rxp.program[ind]; - this->startp[0] = rxp.startp[0]; // Copy pointers into last - this->endp[0] = rxp.endp[0]; // Successful "find" operation - this->regmust = rxp.regmust; // Copy field + // Copy pointers into last successful "find" operation + this->regmatch = rxp.regmatch; + this->regmust = rxp.regmust; // Copy field if (rxp.regmust != 0) { char* dum = rxp.program; ind = 0; @@ -123,8 +123,9 @@ bool RegularExpression::deep_equal(const RegularExpression& rxp) const while (ind-- != 0) // Else while still characters if (this->program[ind] != rxp.program[ind]) // If regexp are different return false; // Return failure - return (this->startp[0] == rxp.startp[0] && // Else if same start/end ptrs, - this->endp[0] == rxp.endp[0]); // Return true + // Else if same start/end ptrs, return true + return (this->regmatch.start() == rxp.regmatch.start() && + this->regmatch.end() == rxp.regmatch.end()); } // The remaining code in this file is derived from the regular expression code @@ -276,31 +277,35 @@ const unsigned char MAGIC = 0234; ///////////////////////////////////////////////////////////////////////// /* - * Global work variables for compile(). + * Read only utility variables. */ -static const char* regparse; // Input-scan pointer. -static int regnpar; // () count. static char regdummy; -static char* regcode; // Code-emit pointer; ®dummy = don't. -static long regsize; // Code size. +static char* const regdummyptr = ®dummy; /* - * Forward declarations for compile()'s friends. + * Utility class for RegularExpression::compile(). */ -// #ifndef static -// #define static static -// #endif -static char* reg(int, int*); -static char* regbranch(int*); -static char* regpiece(int*); -static char* regatom(int*); -static char* regnode(char); +class RegExpCompile +{ +public: + const char* regparse; // Input-scan pointer. + int regnpar; // () count. + char* regcode; // Code-emit pointer; regdummyptr = don't. + long regsize; // Code size. + + char* reg(int, int*); + char* regbranch(int*); + char* regpiece(int*); + char* regatom(int*); + char* regnode(char); + void regc(char); + void reginsert(char, char*); + static void regtail(char*, const char*); + static void regoptail(char*, const char*); +}; + static const char* regnext(const char*); static char* regnext(char*); -static void regc(char); -static void reginsert(char, char*); -static void regtail(char*, const char*); -static void regoptail(char*, const char*); #ifdef STRCSPN static int strcspn(); @@ -337,19 +342,20 @@ bool RegularExpression::compile(const char* exp) } // First pass: determine size, legality. - regparse = exp; - regnpar = 1; - regsize = 0L; - regcode = ®dummy; - regc(static_cast(MAGIC)); - if (!reg(0, &flags)) { + RegExpCompile comp; + comp.regparse = exp; + comp.regnpar = 1; + comp.regsize = 0L; + comp.regcode = regdummyptr; + comp.regc(static_cast(MAGIC)); + if (!comp.reg(0, &flags)) { printf("RegularExpression::compile(): Error in compile.\n"); return false; } - this->startp[0] = this->endp[0] = this->searchstring = 0; + this->regmatch.clear(); // Small enough for pointer-storage convention? - if (regsize >= 32767L) { // Probably could be 65535L. + if (comp.regsize >= 32767L) { // Probably could be 65535L. // RAISE Error, SYM(RegularExpression), SYM(Expr_Too_Big), printf("RegularExpression::compile(): Expression too big.\n"); return false; @@ -360,8 +366,8 @@ bool RegularExpression::compile(const char* exp) if (this->program != 0) delete[] this->program; //#endif - this->program = new char[regsize]; - this->progsize = static_cast(regsize); + this->program = new char[comp.regsize]; + this->progsize = static_cast(comp.regsize); if (this->program == 0) { // RAISE Error, SYM(RegularExpression), SYM(Out_Of_Memory), @@ -370,11 +376,11 @@ bool RegularExpression::compile(const char* exp) } // Second pass: emit code. - regparse = exp; - regnpar = 1; - regcode = this->program; - regc(static_cast(MAGIC)); - reg(0, &flags); + comp.regparse = exp; + comp.regnpar = 1; + comp.regcode = this->program; + comp.regc(static_cast(MAGIC)); + comp.reg(0, &flags); // Dig out information for optimizations. this->regstart = '\0'; // Worst-case defaults. @@ -423,7 +429,7 @@ bool RegularExpression::compile(const char* exp) * is a trifle forced, but the need to tie the tails of the branches to what * follows makes it hard to avoid. */ -static char* reg(int paren, int* flagp) +char* RegExpCompile::reg(int paren, int* flagp) { char* ret; char* br; @@ -435,7 +441,7 @@ static char* reg(int paren, int* flagp) // Make an OPEN node, if parenthesized. if (paren) { - if (regnpar >= RegularExpression::NSUBEXP) { + if (regnpar >= RegularExpressionMatch::NSUBEXP) { // RAISE Error, SYM(RegularExpression), SYM(Too_Many_Parens), printf("RegularExpression::compile(): Too many parentheses.\n"); return 0; @@ -501,7 +507,7 @@ static char* reg(int paren, int* flagp) * * Implements the concatenation operator. */ -static char* regbranch(int* flagp) +char* RegExpCompile::regbranch(int* flagp) { char* ret; char* chain; @@ -538,7 +544,7 @@ static char* regbranch(int* flagp) * It might seem that this node could be dispensed with entirely, but the * endmarker role is not redundant. */ -static char* regpiece(int* flagp) +char* RegExpCompile::regpiece(int* flagp) { char* ret; char op; @@ -605,7 +611,7 @@ static char* regpiece(int* flagp) * faster to run. Backslashed characters are exceptions, each becoming a * separate node; the code is simpler that way and it's not worth fixing. */ -static char* regatom(int* flagp) +char* RegExpCompile::regatom(int* flagp) { char* ret; int flags; @@ -724,13 +730,13 @@ static char* regatom(int* flagp) - regnode - emit a node Location. */ -static char* regnode(char op) +char* RegExpCompile::regnode(char op) { char* ret; char* ptr; ret = regcode; - if (ret == ®dummy) { + if (ret == regdummyptr) { regsize += 3; return (ret); } @@ -747,9 +753,9 @@ static char* regnode(char op) /* - regc - emit (if appropriate) a byte of code */ -static void regc(char b) +void RegExpCompile::regc(char b) { - if (regcode != ®dummy) + if (regcode != regdummyptr) *regcode++ = b; else regsize++; @@ -760,13 +766,13 @@ static void regc(char b) * * Means relocating the operand. */ -static void reginsert(char op, char* opnd) +void RegExpCompile::reginsert(char op, char* opnd) { char* src; char* dst; char* place; - if (regcode == ®dummy) { + if (regcode == regdummyptr) { regsize += 3; return; } @@ -786,13 +792,13 @@ static void reginsert(char op, char* opnd) /* - regtail - set the next-pointer at the end of a node chain */ -static void regtail(char* p, const char* val) +void RegExpCompile::regtail(char* p, const char* val) { char* scan; char* temp; int offset; - if (p == ®dummy) + if (p == regdummyptr) return; // Find last node. @@ -815,10 +821,10 @@ static void regtail(char* p, const char* val) /* - regoptail - regtail on operand of first argument; nop if operandless */ -static void regoptail(char* p, const char* val) +void RegExpCompile::regoptail(char* p, const char* val) { // "Operandless" and "op != BRANCH" are synonymous in practice. - if (p == 0 || p == ®dummy || OP(p) != BRANCH) + if (p == 0 || p == regdummyptr || OP(p) != BRANCH) return; regtail(OPERAND(p), val); } @@ -830,34 +836,30 @@ static void regoptail(char* p, const char* val) //////////////////////////////////////////////////////////////////////// /* - * Global work variables for find(). + * Utility class for RegularExpression::find(). */ -static const char* reginput; // String-input pointer. -static const char* regbol; // Beginning of input, for ^ check. -static const char** regstartp; // Pointer to startp array. -static const char** regendp; // Ditto for endp. +class RegExpFind +{ +public: + const char* reginput; // String-input pointer. + const char* regbol; // Beginning of input, for ^ check. + const char** regstartp; // Pointer to startp array. + const char** regendp; // Ditto for endp. -/* - * Forwards. - */ -static int regtry(const char*, const char**, const char**, const char*); -static int regmatch(const char*); -static int regrepeat(const char*); - -#ifdef DEBUG -int regnarrate = 0; -void regdump(); -static char* regprop(); -#endif + int regtry(const char*, const char**, const char**, const char*); + int regmatch(const char*); + int regrepeat(const char*); +}; // find -- Matches the regular expression to the given string. // Returns true if found, and sets start and end indexes accordingly. - -bool RegularExpression::find(const char* string) +bool RegularExpression::find(char const* string, + RegularExpressionMatch& rmatch) const { const char* s; - this->searchstring = string; + rmatch.clear(); + rmatch.searchstring = string; if (!this->program) { return false; @@ -868,7 +870,7 @@ bool RegularExpression::find(const char* string) // RAISE Error, SYM(RegularExpression), SYM(Internal_Error), printf( "RegularExpression::find(): Compiled regular expression corrupted.\n"); - return 0; + return false; } // If there is a "must appear" string, look for it. @@ -880,42 +882,45 @@ bool RegularExpression::find(const char* string) s++; } if (s == 0) // Not present. - return (0); + return false; } + RegExpFind regFind; + // Mark beginning of line for ^ . - regbol = string; + regFind.regbol = string; // Simplest case: anchored match need be tried only once. if (this->reganch) - return (regtry(string, this->startp, this->endp, this->program) != 0); + return ( + regFind.regtry(string, rmatch.startp, rmatch.endp, this->program) != 0); // Messy cases: unanchored match. s = string; if (this->regstart != '\0') // We know what char it must start with. while ((s = strchr(s, this->regstart)) != 0) { - if (regtry(s, this->startp, this->endp, this->program)) - return (1); + if (regFind.regtry(s, rmatch.startp, rmatch.endp, this->program)) + return true; s++; } else // We don't -- general case. do { - if (regtry(s, this->startp, this->endp, this->program)) - return (1); + if (regFind.regtry(s, rmatch.startp, rmatch.endp, this->program)) + return true; } while (*s++ != '\0'); // Failure. - return (0); + return false; } /* - regtry - try match at specific point 0 failure, 1 success */ -static int regtry(const char* string, const char** start, const char** end, - const char* prog) +int RegExpFind::regtry(const char* string, const char** start, + const char** end, const char* prog) { int i; const char** sp1; @@ -927,7 +932,7 @@ static int regtry(const char* string, const char** start, const char** end, sp1 = start; ep = end; - for (i = RegularExpression::NSUBEXP; i > 0; i--) { + for (i = RegularExpressionMatch::NSUBEXP; i > 0; i--) { *sp1++ = 0; *ep++ = 0; } @@ -950,7 +955,7 @@ static int regtry(const char* string, const char** start, const char** end, * by recursion. * 0 failure, 1 success */ -static int regmatch(const char* prog) +int RegExpFind::regmatch(const char* prog) { const char* scan; // Current node. const char* next; // Next node. @@ -1129,7 +1134,7 @@ static int regmatch(const char* prog) /* - regrepeat - repeatedly match something simple, report how many */ -static int regrepeat(const char* p) +int RegExpFind::regrepeat(const char* p) { int count = 0; const char* scan; @@ -1176,7 +1181,7 @@ static const char* regnext(const char* p) { int offset; - if (p == ®dummy) + if (p == regdummyptr) return (0); offset = NEXT(p); @@ -1193,7 +1198,7 @@ static char* regnext(char* p) { int offset; - if (p == ®dummy) + if (p == regdummyptr) return (0); offset = NEXT(p); diff --git a/RegularExpression.hxx.in b/RegularExpression.hxx.in index 763fdab..a3fe72d 100644 --- a/RegularExpression.hxx.in +++ b/RegularExpression.hxx.in @@ -34,6 +34,115 @@ namespace @KWSYS_NAMESPACE@ { +// Forward declaration +class RegularExpression; + +/** \class RegularExpressionMatch + * \brief Stores the pattern matches of a RegularExpression + */ +class @KWSYS_NAMESPACE at _EXPORT RegularExpressionMatch +{ +public: + RegularExpressionMatch(); + + bool isValid() const; + void clear(); + + std::string::size_type start() const; + std::string::size_type end() const; + std::string::size_type start(int n) const; + std::string::size_type end(int n) const; + std::string match(int n) const; + + enum + { + NSUBEXP = 10 + }; + +private: + friend class RegularExpression; + const char* startp[NSUBEXP]; + const char* endp[NSUBEXP]; + const char* searchstring; +}; + +/** + * \brief Creates an invalid match object + */ +inline RegularExpressionMatch::RegularExpressionMatch() +{ + startp[0] = 0; + endp[0] = 0; + searchstring = 0; +} + +/** + * \brief Returns true if the match pointers are valid + */ +inline bool RegularExpressionMatch::isValid() const +{ + return (this->startp[0] != 0); +} + +/** + * \brief Resets to the (invalid) construction state. + */ +inline void RegularExpressionMatch::clear() +{ + startp[0] = 0; + endp[0] = 0; + searchstring = 0; +} + +/** + * \brief Returns the start index of the full match. + */ +inline std::string::size_type RegularExpressionMatch::start() const +{ + return static_cast(this->startp[0] - searchstring); +} + +/** + * \brief Returns the end index of the full match. + */ +inline std::string::size_type RegularExpressionMatch::end() const +{ + return static_cast(this->endp[0] - searchstring); +} + +/** + * \brief Returns the start index of nth submatch. + * start(0) is the start of the full match. + */ +inline std::string::size_type RegularExpressionMatch::start(int n) const +{ + return static_cast(this->startp[n] - + this->searchstring); +} + +/** + * \brief Returns the end index of nth submatch. + * end(0) is the end of the full match. + */ +inline std::string::size_type RegularExpressionMatch::end(int n) const +{ + return static_cast(this->endp[n] - + this->searchstring); +} + +/** + * \brief Returns the nth submatch as a string. + */ +inline std::string RegularExpressionMatch::match(int n) const +{ + if (this->startp[n] == 0) { + return std::string(); + } else { + return std::string(this->startp[n], static_cast( + this->endp[n] - this->startp[n])); + } +} + /** \class RegularExpression * \brief Implements pattern matching with regular expressions. * @@ -170,6 +279,9 @@ namespace @KWSYS_NAMESPACE@ { * the same as the two characters before the first p encounterd in * the line. It would match "drepa qrepb" in "rep drepa qrepb". * + * All methods of RegularExpression can be called simultaneously from + * different threads but only if each invocation uses an own instance of + * RegularExpression. */ class @KWSYS_NAMESPACE at _EXPORT RegularExpression { @@ -213,9 +325,19 @@ public: /** * Matches the regular expression to the given string. + * Returns true if found, and sets start and end indexes + * in the RegularExpressionMatch instance accordingly. + * + * This method is thread safe when called with different + * RegularExpressionMatch instances. + */ + bool find(char const*, RegularExpressionMatch&) const; + + /** + * Matches the regular expression to the given string. * Returns true if found, and sets start and end indexes accordingly. */ - bool find(char const*); + inline bool find(char const*); /** * Matches the regular expression to the given std string. @@ -224,14 +346,18 @@ public: inline bool find(std::string const&); /** - * Index to start of first find. + * Match indices */ + inline RegularExpressionMatch const& regMatch() const; inline std::string::size_type start() const; + inline std::string::size_type end() const; + inline std::string::size_type start(int n) const; + inline std::string::size_type end(int n) const; /** - * Index to end of first find. + * Match strings */ - inline std::string::size_type end() const; + inline std::string match(int n) const; /** * Copy the given regular expression. @@ -266,29 +392,14 @@ public: */ inline void set_invalid(); - /** - * Destructor. - */ - // awf added - std::string::size_type start(int n) const; - std::string::size_type end(int n) const; - std::string match(int n) const; - - enum - { - NSUBEXP = 10 - }; - private: - const char* startp[NSUBEXP]; - const char* endp[NSUBEXP]; + RegularExpressionMatch regmatch; char regstart; // Internal use only char reganch; // Internal use only const char* regmust; // Internal use only std::string::size_type regmlen; // Internal use only char* program; int progsize; - const char* searchstring; }; /** @@ -344,51 +455,42 @@ inline bool RegularExpression::compile(std::string const& s) * Matches the regular expression to the given std string. * Returns true if found, and sets start and end indexes accordingly. */ -inline bool RegularExpression::find(std::string const& s) +inline bool RegularExpression::find(const char* s) { - return this->find(s.c_str()); + return this->find(s, this->regmatch); } /** - * Set the start position for the regular expression. + * Matches the regular expression to the given std string. + * Returns true if found, and sets start and end indexes accordingly. */ -inline std::string::size_type RegularExpression::start() const +inline bool RegularExpression::find(std::string const& s) { - return static_cast(this->startp[0] - searchstring); + return this->find(s.c_str()); } /** - * Returns the start/end index of the last item found. + * Returns the internal match object */ -inline std::string::size_type RegularExpression::end() const +inline RegularExpressionMatch const& RegularExpression::regMatch() const { - return static_cast(this->endp[0] - searchstring); + return this->regmatch; } /** - * Returns true if two regular expressions have different - * compiled program for pattern matching. + * Returns the start index of the full match. */ -inline bool RegularExpression::operator!=(const RegularExpression& r) const +inline std::string::size_type RegularExpression::start() const { - return (!(*this == r)); + return regmatch.start(); } /** - * Returns true if a valid regular expression is compiled - * and ready for pattern matching. + * Returns the end index of the full match. */ -inline bool RegularExpression::is_valid() const -{ - return (this->program != 0); -} - -inline void RegularExpression::set_invalid() +inline std::string::size_type RegularExpression::end() const { - //#ifndef _WIN32 - delete[] this->program; - //#endif - this->program = 0; + return regmatch.end(); } /** @@ -396,7 +498,7 @@ inline void RegularExpression::set_invalid() */ inline std::string::size_type RegularExpression::start(int n) const { - return static_cast(this->startp[n] - searchstring); + return regmatch.start(n); } /** @@ -404,7 +506,7 @@ inline std::string::size_type RegularExpression::start(int n) const */ inline std::string::size_type RegularExpression::end(int n) const { - return static_cast(this->endp[n] - searchstring); + return regmatch.end(n); } /** @@ -412,12 +514,33 @@ inline std::string::size_type RegularExpression::end(int n) const */ inline std::string RegularExpression::match(int n) const { - if (this->startp[n] == 0) { - return std::string(""); - } else { - return std::string(this->startp[n], static_cast( - this->endp[n] - this->startp[n])); - } + return regmatch.match(n); +} + +/** + * Returns true if two regular expressions have different + * compiled program for pattern matching. + */ +inline bool RegularExpression::operator!=(const RegularExpression& r) const +{ + return (!(*this == r)); +} + +/** + * Returns true if a valid regular expression is compiled + * and ready for pattern matching. + */ +inline bool RegularExpression::is_valid() const +{ + return (this->program != 0); +} + +inline void RegularExpression::set_invalid() +{ + //#ifndef _WIN32 + delete[] this->program; + //#endif + this->program = 0; } } // namespace @KWSYS_NAMESPACE@ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2047eb360de5a9d2a8cac6a689bd7846c5a0128f commit 2047eb360de5a9d2a8cac6a689bd7846c5a0128f Author: Christian Pfeiffer AuthorDate: Tue Dec 5 12:31:56 2017 +0100 Commit: Christian Pfeiffer CommitDate: Tue Dec 5 14:17:27 2017 +0100 FindMPI: Fix multiple configure runs Due to a erroneous logical dependency on a temporary variable, FindMPI would depend its FOUND status on the set of flags needed to support compiler-implicit MPI support after the first configure run. This behavior is especially causing a misreported NOT FOUND status after the first run on MPI implementations without MPI compiler like MS-MPI or MPICH2 on Windows. diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 7f4c44c..2af0329 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1336,7 +1336,7 @@ foreach(LANG IN ITEMS C CXX Fortran) set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) unset(MPI_${LANG}_REQUIRED_VARS) - if (MPI_${LANG}_WRAPPER_FOUND OR MPI_${LANG}_GUESS_FOUND) + if (NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES) list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY") endforeach() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bde7513d2fcd7a366eb4dd93fc1f061334743bb7 commit bde7513d2fcd7a366eb4dd93fc1f061334743bb7 Author: Christian Pfeiffer AuthorDate: Tue Dec 5 14:03:37 2017 +0100 Commit: Christian Pfeiffer CommitDate: Tue Dec 5 14:14:40 2017 +0100 FindMPI: Correct legacy variable handling Due to a minor logic error, MPI_LIBRARY, MPI_EXTRA_LIBRARY and MPI__LIBRARIES hints are currently not correctly handled and discarded. Additionally, if either C or CXX aren't enabled, there subsequent calls to FindMPI will cause cache variables of the sort "MPI_MPI_EXTRA_LIBRARY-NOTFOUND" to appear due to an error in the compatibility handling. (Doesn't affect functionality) diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 7f4c44c..21ac0bc 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -602,6 +602,9 @@ function (_MPI_interrogate_compiler lang) if(MPI_DIRECT_LIB_NAMES_WORK) set(MPI_PLAIN_LIB_NAMES_WORK "${MPI_DIRECT_LIB_NAMES_WORK};${MPI_PLAIN_LIB_NAMES_WORK}") endif() + if(MPI_${LANG}_EXTRA_LIB_NAMES) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") + endif() # MPI might require pthread to work. The above mechanism wouldn't detect it, but we need to # link it in that case. -lpthread is covered by the normal library treatment on the other hand. @@ -1076,18 +1079,21 @@ foreach (LANG IN ITEMS C CXX) endif() # If a list of libraries was given, we'll split it into new-style cache variables + unset(MPI_${LANG}_EXTRA_LIB_NAMES) if(NOT MPI_${LANG}_LIB_NAMES) foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) - get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) - get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) - get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) - list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") - find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY - NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" - HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} - DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" - ) - mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + if(_MPI_LIB) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endif() endforeach() endif() endforeach() ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 28 ++-- Source/QtDialog/RegexExplorer.cxx | 4 +- Source/kwsys/RegularExpression.cxx | 189 ++++++++++++++------------- Source/kwsys/RegularExpression.hxx.in | 227 +++++++++++++++++++++++++-------- 4 files changed, 291 insertions(+), 157 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 6 08:15:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 6 Dec 2017 08:15:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-547-g92910e2 Message-ID: <20171206131505.28A9A1029FE@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 92910e282adedff8c2dba488db84fb917318bb5b (commit) via dd792b08b50d17ea4d3ff5ba17bec45550a8ed16 (commit) via 060cf73ec8c2d5d73d698b1ff547d425d8ec7eb3 (commit) via 6ecd8b601b6c09d1f07bf5b2ae0cec694522d2c7 (commit) via 9432f686e62082045f53bd0ec8f8911966476df1 (commit) via 0418e91f7d77e540b1e7accc9af4d6cd28b2e71f (commit) via 64184762f4daa69785592d890a7caf7dbb498817 (commit) from 98206571fb68881fe373c040ae703aac318fe6d7 (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=92910e282adedff8c2dba488db84fb917318bb5b commit 92910e282adedff8c2dba488db84fb917318bb5b Merge: dd792b0 0418e91 Author: Brad King AuthorDate: Wed Dec 6 08:07:37 2017 -0500 Commit: Brad King CommitDate: Wed Dec 6 08:07:37 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd792b08b50d17ea4d3ff5ba17bec45550a8ed16 commit dd792b08b50d17ea4d3ff5ba17bec45550a8ed16 Merge: 060cf73 6ecd8b6 Author: Brad King AuthorDate: Wed Dec 6 13:06:30 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 6 08:06:33 2017 -0500 Merge topic 'doc-lang-order' 6ecd8b60 Help: Document that ASM should be enabled last Acked-by: Kitware Robot Merge-request: !1560 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=060cf73ec8c2d5d73d698b1ff547d425d8ec7eb3 commit 060cf73ec8c2d5d73d698b1ff547d425d8ec7eb3 Merge: 9820657 9432f68 Author: Brad King AuthorDate: Wed Dec 6 13:05:25 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 6 08:05:31 2017 -0500 Merge topic 'src-COMPILE_DEFINITIONS-genex' 9432f686 Add generator expression support to per-source COMPILE_DEFINITIONS Acked-by: Kitware Robot Merge-request: !1546 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ecd8b601b6c09d1f07bf5b2ae0cec694522d2c7 commit 6ecd8b601b6c09d1f07bf5b2ae0cec694522d2c7 Author: Brad King AuthorDate: Wed Dec 6 06:48:06 2017 -0500 Commit: Brad King CommitDate: Wed Dec 6 06:48:06 2017 -0500 Help: Document that ASM should be enabled last ASM should be enabled after C and/or CXX because we consider the compilers for those languages as possible assemblers. Issue: #17532 diff --git a/Help/command/enable_language.rst b/Help/command/enable_language.rst index 871ac4e..61dfc03 100644 --- a/Help/command/enable_language.rst +++ b/Help/command/enable_language.rst @@ -10,7 +10,10 @@ Enable a language (CXX/C/Fortran/etc) This command enables support for the named language in CMake. This is the same as the project command but does not create any of the extra variables that are created by the project command. Example languages -are CXX, C, Fortran. +are ``CXX``, ``C``, ``CUDA``, ``Fortran``, and ``ASM``. + +If enabling ``ASM``, enable it last so that CMake can check whether +compilers for other languages like ``C`` work for assembly too. This command must be called in file scope, not in a function call. Furthermore, it must be called in the highest directory common to all diff --git a/Help/command/project.rst b/Help/command/project.rst index 139f69c..eb185e4 100644 --- a/Help/command/project.rst +++ b/Help/command/project.rst @@ -46,11 +46,15 @@ variable will be set to its argument. The argument must be a string with short description of the project (only a few words). Optionally you can specify which languages your project supports. -Example languages are ``C``, ``CXX`` (i.e. C++), ``Fortran``, etc. +Example languages include ``C``, ``CXX`` (i.e. C++), ``CUDA``, +``Fortran``, and ``ASM``. By default ``C`` and ``CXX`` are enabled if no language options are given. Specify language ``NONE``, or use the ``LANGUAGES`` keyword and list no languages, to skip enabling any languages. +If enabling ``ASM``, list it last so that CMake can check whether +compilers for other languages like ``C`` work for assembly too. + If a variable exists called :variable:`CMAKE_PROJECT__INCLUDE`, the file pointed to by that variable will be included as the last step of the project command. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9432f686e62082045f53bd0ec8f8911966476df1 commit 9432f686e62082045f53bd0ec8f8911966476df1 Author: Marc Chevrier AuthorDate: Thu Nov 30 15:06:21 2017 +0100 Commit: Marc Chevrier CommitDate: Tue Dec 5 14:47:39 2017 +0100 Add generator expression support to per-source COMPILE_DEFINITIONS This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508 diff --git a/Help/prop_sf/COMPILE_DEFINITIONS.rst b/Help/prop_sf/COMPILE_DEFINITIONS.rst index 1626825..8d2108c 100644 --- a/Help/prop_sf/COMPILE_DEFINITIONS.rst +++ b/Help/prop_sf/COMPILE_DEFINITIONS.rst @@ -17,3 +17,13 @@ by the native build tool. Xcode does not support per-configuration definitions on source files. .. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.txt + +Contents of ``COMPILE_DEFINITIONS`` may use "generator expressions" +with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` +manual for available expressions. However, :generator:`Xcode` +does not support per-config per-source settings, so expressions +that depend on the build configuration are not allowed with that +generator. + +Generator expressions should be preferred instead of setting the alternative per-configuration +property. diff --git a/Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst b/Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst new file mode 100644 index 0000000..892344f --- /dev/null +++ b/Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst @@ -0,0 +1,5 @@ +src-COMPILE_DEFINITIONS-genex +----------------------------- + +* The :prop_sf:`COMPILE_DEFINITIONS` source file property learned to support + :manual:`generator expressions `. diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 2443ece..bd1b6bb 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -379,6 +379,7 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines( cmMakefile* makefile = lg->GetMakefile(); const std::string& language = source->GetLanguage(); const std::string& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); + cmGeneratorExpressionInterpreter genexInterpreter(lg, target, config); // Add the export symbol definition for shared library objects. if (const char* exportMacro = target->GetExportMacro()) { @@ -387,11 +388,14 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines( // Add preprocessor definitions for this target and configuration. lg->AddCompileDefinitions(defines, target, config, language); - lg->AppendDefines(defines, source->GetProperty("COMPILE_DEFINITIONS")); - { - std::string defPropName = "COMPILE_DEFINITIONS_"; - defPropName += cmSystemTools::UpperCase(config); - lg->AppendDefines(defines, source->GetProperty(defPropName)); + if (const char* compile_defs = source->GetProperty("COMPILE_DEFINITIONS")) { + lg->AppendDefines(defines, genexInterpreter.Evaluate(compile_defs)); + } + + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += cmSystemTools::UpperCase(config); + if (const char* config_compile_defs = source->GetProperty(defPropName)) { + lg->AppendDefines(defines, genexInterpreter.Evaluate(config_compile_defs)); } std::string definesString; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 63f708b..bbf4175 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -740,8 +740,11 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( // Add per-source definitions. BuildObjectListOrString flagsBuild(this, false); - this->AppendDefines(flagsBuild, sf->GetProperty("COMPILE_DEFINITIONS"), - true); + if (const char* compile_defs = sf->GetProperty("COMPILE_DEFINITIONS")) { + this->AppendDefines( + flagsBuild, + genexInterpreter.Evaluate(compile_defs, "COMPILE_DEFINITIONS"), true); + } if (!flagsBuild.IsEmpty()) { if (!flags.empty()) { flags += ' '; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index e5c8317..53966cd 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1484,13 +1484,13 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( } } if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) { - fc.CompileDefs = cdefs; + fc.CompileDefs = genexInterpreter.Evaluate(cdefs); needfc = true; } std::string defPropName = "COMPILE_DEFINITIONS_"; defPropName += configUpper; - if (const char* ccdefs = sf.GetProperty(defPropName.c_str())) { - fc.CompileDefsConfig = ccdefs; + if (const char* ccdefs = sf.GetProperty(defPropName)) { + fc.CompileDefsConfig = genexInterpreter.Evaluate(ccdefs); needfc = true; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 85dc55e..5e0c582 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -447,18 +447,19 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( // Add source-sepcific preprocessor definitions. if (const char* compile_defs = source.GetProperty("COMPILE_DEFINITIONS")) { - this->LocalGenerator->AppendDefines(defines, compile_defs); + const char* evaluatedDefs = genexInterpreter.Evaluate(compile_defs); + this->LocalGenerator->AppendDefines(defines, evaluatedDefs); *this->FlagFileStream << "# Custom defines: " << relativeObj - << "_DEFINES = " << compile_defs << "\n" + << "_DEFINES = " << evaluatedDefs << "\n" << "\n"; } std::string defPropName = "COMPILE_DEFINITIONS_"; defPropName += configUpper; if (const char* config_compile_defs = source.GetProperty(defPropName)) { - this->LocalGenerator->AppendDefines(defines, config_compile_defs); + const char* evaluatedDefs = genexInterpreter.Evaluate(config_compile_defs); + this->LocalGenerator->AppendDefines(defines, evaluatedDefs); *this->FlagFileStream << "# Custom defines: " << relativeObj << "_DEFINES_" - << configUpper << " = " << config_compile_defs - << "\n" + << configUpper << " = " << evaluatedDefs << "\n" << "\n"; } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index bad4112..1036977 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -177,13 +177,20 @@ std::string cmNinjaTargetGenerator::ComputeDefines(cmSourceFile const* source, const std::string& language) { std::set defines; - this->LocalGenerator->AppendDefines( - defines, source->GetProperty("COMPILE_DEFINITIONS")); - { - std::string defPropName = "COMPILE_DEFINITIONS_"; - defPropName += cmSystemTools::UpperCase(this->GetConfigName()); - this->LocalGenerator->AppendDefines(defines, - source->GetProperty(defPropName)); + const std::string config = this->LocalGenerator->GetConfigName(); + cmGeneratorExpressionInterpreter genexInterpreter( + this->LocalGenerator, this->GeneratorTarget, config); + + if (const char* compile_defs = source->GetProperty("COMPILE_DEFINITIONS")) { + this->LocalGenerator->AppendDefines( + defines, genexInterpreter.Evaluate(compile_defs)); + } + + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += cmSystemTools::UpperCase(config); + if (const char* config_compile_defs = source->GetProperty(defPropName)) { + this->LocalGenerator->AppendDefines( + defines, genexInterpreter.Evaluate(config_compile_defs)); } std::string definesString = this->GetDefines(language); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 1bb07e7..da354bd 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -712,10 +712,16 @@ static Json::Value DumpSourceFilesList( fileData.IncludePathList = ld.IncludePathList; std::set defines; - lg->AppendDefines(defines, file->GetProperty("COMPILE_DEFINITIONS")); + if (const char* defs = file->GetProperty("COMPILE_DEFINITIONS")) { + lg->AppendDefines(defines, genexInterpreter.Evaluate(defs)); + } + const std::string defPropName = "COMPILE_DEFINITIONS_" + cmSystemTools::UpperCase(config); - lg->AppendDefines(defines, file->GetProperty(defPropName)); + if (const char* config_defs = file->GetProperty(defPropName)) { + lg->AppendDefines(defines, genexInterpreter.Evaluate(config_defs)); + } + defines.insert(ld.Defines.begin(), ld.Defines.end()); fileData.SetDefines(defines); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index badd24f..8589a96 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2066,12 +2066,15 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( std::string flags; bool configDependentFlags = false; std::string defines; + bool configDependentDefines = false; if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { configDependentFlags = cmGeneratorExpression::Find(cflags) != std::string::npos; flags += cflags; } if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) { + configDependentDefines = + cmGeneratorExpression::Find(cdefs) != std::string::npos; defines += cdefs; } std::string lang = @@ -2121,6 +2124,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( if (!configDefines.empty()) { configDefines += ";"; } + configDependentDefines |= + cmGeneratorExpression::Find(ccdefs) != std::string::npos; configDefines += ccdefs; } // if we have flags or defines for this config then @@ -2170,7 +2175,11 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( clOptions.AppendFlag("DisableSpecificWarnings", "%(DisableSpecificWarnings)"); } - clOptions.AddDefines(configDefines.c_str()); + if (configDependentDefines) { + clOptions.AddDefines(genexInterpreter.Evaluate(configDefines)); + } else { + clOptions.AddDefines(configDefines.c_str()); + } clOptions.SetConfiguration((*config).c_str()); clOptions.PrependInheritedString("AdditionalOptions"); clOptions.OutputFlagMap(*this->BuildFileStream, " "); diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index 83fd11d..5165970 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -258,8 +258,13 @@ add_custom_target(check-part4 ALL VERBATIM ) -add_executable(srcgenex srcgenex.c) -set_property(SOURCE srcgenex.c PROPERTY COMPILE_FLAGS "-DNAME=$") +#----------------------------------------------------------------------------- +# Cover source file properties with generator expressions. +add_executable(srcgenex_flags srcgenex_flags.c) +set_property(SOURCE srcgenex_flags.c PROPERTY COMPILE_FLAGS "-DNAME=$") + +add_executable(srcgenex_defs srcgenex_defs.c) +set_property(SOURCE srcgenex_defs.c PROPERTY COMPILE_DEFINITIONS NAME=$) #----------------------------------------------------------------------------- # Cover test properties with generator expressions. diff --git a/Tests/GeneratorExpression/srcgenex.c b/Tests/GeneratorExpression/srcgenex_defs.c similarity index 82% copy from Tests/GeneratorExpression/srcgenex.c copy to Tests/GeneratorExpression/srcgenex_defs.c index 56d3c3f..883e631 100644 --- a/Tests/GeneratorExpression/srcgenex.c +++ b/Tests/GeneratorExpression/srcgenex_defs.c @@ -1,4 +1,4 @@ -int srcgenex(void) +int srcgenex_defs(void) { return 0; } diff --git a/Tests/GeneratorExpression/srcgenex.c b/Tests/GeneratorExpression/srcgenex_flags.c similarity index 82% rename from Tests/GeneratorExpression/srcgenex.c rename to Tests/GeneratorExpression/srcgenex_flags.c index 56d3c3f..3de2b12 100644 --- a/Tests/GeneratorExpression/srcgenex.c +++ b/Tests/GeneratorExpression/srcgenex_flags.c @@ -1,4 +1,4 @@ -int srcgenex(void) +int srcgenex_flags(void) { return 0; } diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions-result.txt b/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions-stderr.txt b/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions-stderr.txt new file mode 100644 index 0000000..46a294d --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions-stderr.txt @@ -0,0 +1,8 @@ +^CMake Error in CMakeLists.txt: + Xcode does not support per-config per-source COMPILE_DEFINITIONS: + + \$<\$:MYDEBUG> + + specified for source: + + .*/Tests/RunCMake/XcodeProject/main.c$ diff --git a/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions.cmake b/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions.cmake new file mode 100644 index 0000000..f9df55f --- /dev/null +++ b/Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions.cmake @@ -0,0 +1,3 @@ +enable_language(C) +add_executable(main main.c) +set_property(SOURCE main.c PROPERTY COMPILE_DEFINITIONS "$<$:MYDEBUG>") diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index f730b83..7eb624c 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -19,6 +19,7 @@ if (NOT XCODE_VERSION VERSION_LESS 6) endif() run_cmake(PerConfigPerSourceFlags) +run_cmake(PerConfigPerSourceDefinitions) # Use a single build tree for a few tests without cleaning. ----------------------------------------------------------------------- Summary of changes: Help/command/enable_language.rst | 5 ++++- Help/command/project.rst | 6 +++++- Help/prop_sf/COMPILE_DEFINITIONS.rst | 10 ++++++++++ Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst | 5 +++++ Source/cmExtraSublimeTextGenerator.cxx | 14 ++++++++----- Source/cmGlobalXCodeGenerator.cxx | 7 +++++-- Source/cmLocalVisualStudio7Generator.cxx | 6 +++--- Source/cmMakefileTargetGenerator.cxx | 11 +++++----- Source/cmNinjaTargetGenerator.cxx | 21 +++++++++++++------- Source/cmServerProtocol.cxx | 10 ++++++++-- Source/cmVisualStudio10TargetGenerator.cxx | 11 +++++++++- Tests/GeneratorExpression/CMakeLists.txt | 9 +++++++-- .../{srcgenex.c => srcgenex_defs.c} | 2 +- .../{srcgenex.c => srcgenex_flags.c} | 2 +- .../PerConfigPerSourceDefinitions-result.txt} | 0 ...xt => PerConfigPerSourceDefinitions-stderr.txt} | 4 ++-- .../PerConfigPerSourceDefinitions.cmake | 3 +++ Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 1 + 18 files changed, 94 insertions(+), 33 deletions(-) create mode 100644 Help/release/dev/src-COMPILE_DEFINITIONS-genex.rst copy Tests/GeneratorExpression/{srcgenex.c => srcgenex_defs.c} (82%) rename Tests/GeneratorExpression/{srcgenex.c => srcgenex_flags.c} (82%) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => XcodeProject/PerConfigPerSourceDefinitions-result.txt} (100%) copy Tests/RunCMake/XcodeProject/{PerConfigPerSourceFlags-stderr.txt => PerConfigPerSourceDefinitions-stderr.txt} (50%) create mode 100644 Tests/RunCMake/XcodeProject/PerConfigPerSourceDefinitions.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 6 08:15:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 6 Dec 2017 08:15:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-14-g0418e91 Message-ID: <20171206131505.3BA39102A3A@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 0418e91f7d77e540b1e7accc9af4d6cd28b2e71f (commit) via 64184762f4daa69785592d890a7caf7dbb498817 (commit) via 2047eb360de5a9d2a8cac6a689bd7846c5a0128f (commit) via bde7513d2fcd7a366eb4dd93fc1f061334743bb7 (commit) from 64713d4ca0ae864958ecdeaee9642488c3f2cbc7 (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/FindMPI.cmake | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 7 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 7 Dec 2017 00:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-548-gf5e48ed Message-ID: <20171207050507.39209102C90@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 f5e48edaae37fbf9afa668671b3a8d3e5537321b (commit) from 92910e282adedff8c2dba488db84fb917318bb5b (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=f5e48edaae37fbf9afa668671b3a8d3e5537321b commit f5e48edaae37fbf9afa668671b3a8d3e5537321b Author: Kitware Robot AuthorDate: Thu Dec 7 00:01:14 2017 -0500 Commit: Kitware Robot CommitDate: Thu Dec 7 00:01:14 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index bb18741..ae3bb06 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 10) -set(CMake_VERSION_PATCH 20171206) +set(CMake_VERSION_PATCH 20171207) #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 Dec 7 08:15:17 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 7 Dec 2017 08:15:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-565-ge1a09cf Message-ID: <20171207131518.16210FA4E2@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 e1a09cfbd1d1802b5fc4ae9b4918bb00ce468dcc (commit) via 79fde6a324545f6461020c957af1f63e5f2a72da (commit) via 3de52db69cc0c9568067c02492eddf5396147e0c (commit) via ffc9c89dae80372f7504c4b30292e6f5da514c2a (commit) via 9accb48d175d5163266cc7792c2dbb5ca5fed0d2 (commit) via ea63c522ef7561365c90e1e1f7c7e37403bac53b (commit) via afae027d6398462906e762da29f306f41d21c6ee (commit) via b8b87489770bd29ffcfc4b2faec3f98bd089f3ff (commit) via 05f86af716e00b58b5103b231a22515edcc95321 (commit) via b7100756d739e1a46820b700607e738f17985e30 (commit) via 976370d134a2d7b22b6f43f6031b0ee850a01d9d (commit) via 8b2736c71ca6eb8e62a69f57ad07e4e19a95c936 (commit) via f313541adb677f754953d1598d3e8b234ad975b2 (commit) via 935848a8a7164631b9410a0e6f7c5574b01bb85c (commit) via 29731d89192681cbc4bf87d7947a877aa0fb27aa (commit) via f92304c789336f1d5e01a596ea024525c1a2b8f7 (commit) via e99e39829ba36dbfad189a94062363343d7d3d8b (commit) from f5e48edaae37fbf9afa668671b3a8d3e5537321b (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=e1a09cfbd1d1802b5fc4ae9b4918bb00ce468dcc commit e1a09cfbd1d1802b5fc4ae9b4918bb00ce468dcc Merge: 79fde6a b8b8748 Author: Brad King AuthorDate: Thu Dec 7 13:14:27 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 7 08:14:34 2017 -0500 Merge topic 'externalproject_download_dir' b8b87489 ExternalProject: Support substituting Acked-by: Kitware Robot Merge-request: !1537 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79fde6a324545f6461020c957af1f63e5f2a72da commit 79fde6a324545f6461020c957af1f63e5f2a72da Merge: 3de52db f313541 Author: Brad King AuthorDate: Thu Dec 7 13:13:28 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 7 08:13:37 2017 -0500 Merge topic 'FindOpenCL-amd-sdk' f313541a FindOpenCL: Add support for AMD OpenCL SDK Light Acked-by: Kitware Robot Merge-request: !1562 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3de52db69cc0c9568067c02492eddf5396147e0c commit 3de52db69cc0c9568067c02492eddf5396147e0c Merge: ffc9c89 f92304c Author: Brad King AuthorDate: Thu Dec 7 13:11:51 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 7 08:11:56 2017 -0500 Merge topic 'splitRCPatchComponent' f92304c7 CMakeVersion RC file: Split patch into 2 components Acked-by: Kitware Robot Merge-request: !1552 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ffc9c89dae80372f7504c4b30292e6f5da514c2a commit ffc9c89dae80372f7504c4b30292e6f5da514c2a Merge: 9accb48 afae027 Author: Brad King AuthorDate: Thu Dec 7 08:09:37 2017 -0500 Commit: Brad King CommitDate: Thu Dec 7 08:09:37 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9accb48d175d5163266cc7792c2dbb5ca5fed0d2 commit 9accb48d175d5163266cc7792c2dbb5ca5fed0d2 Merge: ea63c52 b710075 Author: Brad King AuthorDate: Thu Dec 7 13:08:50 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 7 08:08:59 2017 -0500 Merge topic 'revert-server-target-backtraces' b7100756 Merge branch 'backport-revert-server-target-backtraces' into revert-server-target-backtraces 976370d1 server: drop "ctestInfo" backtrace information 8b2736c7 server: Revert "Report backtraces in codemodel response" Acked-by: Kitware Robot Merge-request: !1564 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea63c522ef7561365c90e1e1f7c7e37403bac53b commit ea63c522ef7561365c90e1e1f7c7e37403bac53b Merge: f5e48ed 935848a Author: Brad King AuthorDate: Thu Dec 7 13:06:16 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 7 08:06:27 2017 -0500 Merge topic 'gtest-discovery-timeout' 935848a8 GoogleTest: Add test for missing test executable 29731d89 GoogleTest: Add timeout to discovery e99e3982 GoogleTest: Improve gtest_discover_tests messages Acked-by: Kitware Robot Merge-request: !1534 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8b87489770bd29ffcfc4b2faec3f98bd089f3ff commit b8b87489770bd29ffcfc4b2faec3f98bd089f3ff Author: Craig Scott AuthorDate: Thu Nov 30 08:32:26 2017 +1100 Commit: Craig Scott CommitDate: Thu Dec 7 07:22:02 2017 +1100 ExternalProject: Support substituting diff --git a/Help/release/dev/ExternalProject-DOWNLOAD_DIR.rst b/Help/release/dev/ExternalProject-DOWNLOAD_DIR.rst new file mode 100644 index 0000000..823a14b --- /dev/null +++ b/Help/release/dev/ExternalProject-DOWNLOAD_DIR.rst @@ -0,0 +1,5 @@ +ExternalProject +--------------- + +* The :module:`ExternalProject` module learnt to substitute ```` + in comments, commands, working directory and byproducts. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 67aac4f..d284e27 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -714,8 +714,9 @@ control needed to implement such step-level capabilities. The command line, comment, working directory and byproducts of every standard and custom step are processed to replace the tokens ````, ````, ````, ```` - and ```` with their corresponding property values defined in the - original call to :command:`ExternalProject_Add`. + ````, ```` and ```` with their + corresponding property values defined in the original call to + :command:`ExternalProject_Add`. .. command:: ExternalProject_Add_StepTargets @@ -1665,7 +1666,7 @@ macro(_ep_replace_location_tags target_name) set(vars ${ARGN}) foreach(var ${vars}) if(${var}) - foreach(dir SOURCE_DIR SOURCE_SUBDIR BINARY_DIR INSTALL_DIR TMP_DIR DOWNLOADED_FILE) + foreach(dir SOURCE_DIR SOURCE_SUBDIR BINARY_DIR INSTALL_DIR TMP_DIR DOWNLOAD_DIR DOWNLOADED_FILE) get_property(val TARGET ${target_name} PROPERTY _EP_${dir}) string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}") endforeach() diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index 994e2aa..09607f6 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -15,10 +15,31 @@ run_cmake(UsesTerminal) # Run both cmake and build steps. We always do a clean before the # build to ensure that the download step re-runs each time. -set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/MultiCommand-build) -set(RunCMake_TEST_NO_CLEAN 1) -file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") -file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") -run_cmake(MultiCommand) -run_cmake_command(MultiCommand-clean ${CMAKE_COMMAND} --build . --target clean) -run_cmake_command(MultiCommand-build ${CMAKE_COMMAND} --build .) +function(__ep_test_with_build testName) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${testName}-build) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(${testName}) + run_cmake_command(${testName}-clean ${CMAKE_COMMAND} --build . --target clean) + run_cmake_command(${testName}-build ${CMAKE_COMMAND} --build .) +endfunction() + +__ep_test_with_build(MultiCommand) + +# We can't test the substitution when using the old MSYS due to +# make/sh mangling the paths (substitution is performed correctly, +# but the mangling means we can't reliably test the output). +# There is no such issue when using the newer MSYS though. Therefore, +# we need to bypass the substitution test if using old MSYS. +# See merge request 1537 for discussion. +set(doSubstitutionTest YES) +if(RunCMake_GENERATOR STREQUAL "MSYS Makefiles") + execute_process(COMMAND uname OUTPUT_VARIABLE uname) + if(uname MATCHES "^MINGW32_NT") + set(doSubstitutionTest NO) + endif() +endif() +if(doSubstitutionTest) + __ep_test_with_build(Substitutions) +endif() diff --git a/Tests/RunCMake/ExternalProject/Substitutions-build-stdout.txt b/Tests/RunCMake/ExternalProject/Substitutions-build-stdout.txt new file mode 100644 index 0000000..d6a823a --- /dev/null +++ b/Tests/RunCMake/ExternalProject/Substitutions-build-stdout.txt @@ -0,0 +1,7 @@ +.*Download dir = .*/xxxx_dwn +.*Download file = .*/zzzz_tmp.txt +.*Source dir = .*/xxxx_src +.*Source subdir = /yyyy_subdir +.*Binary dir = .*/xxxx_bin +.*Install dir = .*/xxxx_install +.*Tmp dir = .*/xxxx_tmp diff --git a/Tests/RunCMake/ExternalProject/Substitutions.cmake b/Tests/RunCMake/ExternalProject/Substitutions.cmake new file mode 100644 index 0000000..db79491 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/Substitutions.cmake @@ -0,0 +1,25 @@ +include(ExternalProject) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zzzz_tmp.txt "Dummy file") +file(MD5 ${CMAKE_CURRENT_BINARY_DIR}/zzzz_tmp.txt md5hash) +ExternalProject_Add(Subst + URL file://${CMAKE_CURRENT_BINARY_DIR}/zzzz_tmp.txt + URL_HASH MD5=${md5hash} + DOWNLOAD_NO_EXTRACT ON + DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/xxxx_dwn + SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/xxxx_src + SOURCE_SUBDIR yyyy_subdir + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/xxxx_bin + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/xxxx_install + TMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/xxxx_tmp + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Download dir = " + COMMAND ${CMAKE_COMMAND} -E echo "Download file = " + COMMAND ${CMAKE_COMMAND} -E echo "Source dir = " + COMMAND ${CMAKE_COMMAND} -E echo "Source subdir = " + COMMAND ${CMAKE_COMMAND} -E echo "Binary dir = " + COMMAND ${CMAKE_COMMAND} -E echo "Install dir = " + COMMAND ${CMAKE_COMMAND} -E echo "Tmp dir = " + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7100756d739e1a46820b700607e738f17985e30 commit b7100756d739e1a46820b700607e738f17985e30 Merge: 976370d 8b2736c Author: Brad King AuthorDate: Wed Dec 6 11:49:52 2017 -0500 Commit: Brad King CommitDate: Wed Dec 6 11:49:52 2017 -0500 Merge branch 'backport-revert-server-target-backtraces' into revert-server-target-backtraces diff --cc Source/cmServerDictionary.h index 62dee11,e6a7ae6..685542c --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@@ -89,19 -88,7 +89,14 @@@ static const std::string kWARN_UNUSED_C static const std::string kWARN_UNUSED_KEY = "warnUnused"; static const std::string kWATCHED_DIRECTORIES_KEY = "watchedDirectories"; static const std::string kWATCHED_FILES_KEY = "watchedFiles"; +static const std::string kHAS_INSTALL_RULE = "hasInstallRule"; +static const std::string kINSTALL_PATHS = "installPaths"; +static const std::string kCTEST_NAME = "ctestName"; +static const std::string kCTEST_COMMAND = "ctestCommand"; +static const std::string kCTEST_INFO = "ctestInfo"; +static const std::string kMINIMUM_CMAKE_VERSION = "minimumCMakeVersion"; +static const std::string kIS_GENERATOR_PROVIDED_KEY = "isGeneratorProvided"; - static const std::string kTARGET_CROSS_REFERENCES_KEY = "crossReferences"; - static const std::string kLINE_NUMBER_KEY = "line"; - static const std::string kBACKTRACE_KEY = "backtrace"; - static const std::string kRELATED_STATEMENTS_KEY = "relatedStatements"; - static const std::string kSTART_MAGIC = "[== \"CMake Server\" ==["; static const std::string kEND_MAGIC = "]== \"CMake Server\" ==]"; diff --cc Source/cmServerProtocol.cxx index b9b06db,13b18c2..ad66467 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@@ -8,13 -8,9 +8,12 @@@ #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmInstallGenerator.h" +#include "cmInstallTargetGenerator.h" #include "cmLinkLineComputer.h" - #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmProperty.h" #include "cmServer.h" #include "cmServerDictionary.h" #include "cmSourceFile.h" @@@ -744,128 -730,6 +743,97 @@@ static Json::Value DumpSourceFilesList return result; } - static Json::Value DumpBacktrace(const cmListFileBacktrace& backtrace) - { - Json::Value result = Json::arrayValue; - - cmListFileBacktrace backtraceCopy = backtrace; - while (!backtraceCopy.Top().FilePath.empty()) { - Json::Value entry = Json::objectValue; - entry[kPATH_KEY] = backtraceCopy.Top().FilePath; - if (backtraceCopy.Top().Line) { - entry[kLINE_NUMBER_KEY] = static_cast(backtraceCopy.Top().Line); - } - if (!backtraceCopy.Top().Name.empty()) { - entry[kNAME_KEY] = backtraceCopy.Top().Name; - } - result.append(entry); - backtraceCopy = backtraceCopy.Pop(); - } - return result; - } - - static void DumpBacktraceRange(Json::Value& result, const std::string& type, - cmBacktraceRange range) - { - for (auto const& bt : range) { - Json::Value obj = Json::objectValue; - obj[kTYPE_KEY] = type; - obj[kBACKTRACE_KEY] = DumpBacktrace(bt); - result.append(obj); - } - } - +static Json::Value DumpCTestInfo(cmTest* testInfo) +{ + Json::Value result = Json::objectValue; + result[kCTEST_NAME] = testInfo->GetName(); + + // Concat command entries together. After the first should be the arguments + // for the command + std::string command; + for (auto const& cmd : testInfo->GetCommand()) { + command.append(cmd); + command.append(" "); + } + result[kCTEST_COMMAND] = command; + + // Build up the list of properties that may have been specified + Json::Value properties = Json::arrayValue; + for (auto& prop : testInfo->GetProperties()) { + Json::Value entry = Json::objectValue; + entry[kKEY_KEY] = prop.first; + entry[kVALUE_KEY] = prop.second.GetValue(); + properties.append(entry); + } + result[kPROPERTIES_KEY] = properties; + + return result; +} + +static void DumpMakefileTests(cmMakefile* mf, const std::string& config, + Json::Value* result) +{ + std::vector tests; + mf->GetTests(config, tests); + for (auto test : tests) { + Json::Value tmp = DumpCTestInfo(test); + if (!tmp.isNull()) { + result->append(tmp); + } + } +} + +static Json::Value DumpCTestProjectList(const cmake* cm, + std::string const& config) +{ + Json::Value result = Json::arrayValue; + + auto globalGen = cm->GetGlobalGenerator(); + + for (const auto& projectIt : globalGen->GetProjectMap()) { + Json::Value pObj = Json::objectValue; + pObj[kNAME_KEY] = projectIt.first; + + Json::Value tests = Json::arrayValue; + + // Gather tests for every generator + for (const auto& lg : projectIt.second) { + // Make sure they're generated. + lg->GenerateTestFiles(); + cmMakefile* mf = lg->GetMakefile(); + DumpMakefileTests(mf, config, &tests); + } + + pObj[kCTEST_INFO] = tests; + + result.append(pObj); + } + + return result; +} + +static Json::Value DumpCTestConfiguration(const cmake* cm, + const std::string& config) +{ + Json::Value result = Json::objectValue; + result[kNAME_KEY] = config; + + result[kPROJECTS_KEY] = DumpCTestProjectList(cm, config); + + return result; +} + +static Json::Value DumpCTestConfigurationsList(const cmake* cm) +{ + Json::Value result = Json::arrayValue; + + for (const std::string& c : getConfigurations(cm)) { + result.append(DumpCTestConfiguration(cm, c)); + } + + return result; +} + static Json::Value DumpTarget(cmGeneratorTarget* target, const std::string& config) { @@@ -902,50 -764,6 +870,34 @@@ result[kFULL_NAME_KEY] = target->GetFullName(config); + if (target->Target->GetHaveInstallRule()) { + result[kHAS_INSTALL_RULE] = true; + + Json::Value installPaths = Json::arrayValue; + auto targetGenerators = target->Makefile->GetInstallGenerators(); + for (auto installGenerator : targetGenerators) { + auto installTargetGenerator = + dynamic_cast(installGenerator); + if (installTargetGenerator != nullptr && + installTargetGenerator->GetTarget()->Target == target->Target) { + auto dest = installTargetGenerator->GetDestination(config); + + std::string installPath; + if (!dest.empty() && cmSystemTools::FileIsFullPath(dest.c_str())) { + installPath = dest; + } else { + std::string installPrefix = + target->Makefile->GetSafeDefinition("CMAKE_INSTALL_PREFIX"); + installPath = installPrefix + '/' + dest; + } + + installPaths.append(installPath); + } + } + + result[kINSTALL_PATHS] = installPaths; + } + - Json::Value crossRefs = Json::objectValue; - crossRefs[kBACKTRACE_KEY] = DumpBacktrace(target->Target->GetBacktrace()); - - Json::Value statements = Json::arrayValue; - DumpBacktraceRange(statements, "target_compile_definitions", - target->Target->GetCompileDefinitionsBacktraces()); - DumpBacktraceRange(statements, "target_include_directories", - target->Target->GetIncludeDirectoriesBacktraces()); - DumpBacktraceRange(statements, "target_compile_options", - target->Target->GetCompileOptionsBacktraces()); - DumpBacktraceRange(statements, "target_link_libraries", - target->Target->GetLinkImplementationBacktraces()); - - crossRefs[kRELATED_STATEMENTS_KEY] = std::move(statements); - result[kTARGET_CROSS_REFERENCES_KEY] = std::move(crossRefs); - if (target->HaveWellDefinedOutputFiles()) { Json::Value artifacts = Json::arrayValue; artifacts.append( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=976370d134a2d7b22b6f43f6031b0ee850a01d9d commit 976370d134a2d7b22b6f43f6031b0ee850a01d9d Author: Brad King AuthorDate: Wed Dec 6 11:45:51 2017 -0500 Commit: Brad King CommitDate: Wed Dec 6 11:45:51 2017 -0500 server: drop "ctestInfo" backtrace information Backtrace information was included by commit 35a52bd1b4 (server: add "ctestInfo" request to get test info, 2017-10-25) to match that already provided for targets. However, the backtrace representation uses too much memory and needs to be dropped. Remove it from test information. Issue: #17502 diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index c2aef99..7232174 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -669,17 +669,6 @@ Each test object can have the following keys: contains the test command. "properties" contains a list of test property objects. -"backtrace" - contains a list of backtrace objects that specify where the test was defined. - -Each backtrace object can have the following keys: - -"path" - contains the full path to the file containing the statement. -"line" - contains the line number in the file where the statement was defined. -"name" - contains the name of the statement that added the test. Each test property object can have the following keys: diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index da354bd..b9b06db 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -799,9 +799,6 @@ static Json::Value DumpCTestInfo(cmTest* testInfo) } result[kPROPERTIES_KEY] = properties; - // Need backtrace to figure out where this test was originally added - result[kBACKTRACE_KEY] = DumpBacktrace(testInfo->GetBacktrace()); - return result; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f313541adb677f754953d1598d3e8b234ad975b2 commit f313541adb677f754953d1598d3e8b234ad975b2 Author: Harry Mallon AuthorDate: Wed Dec 6 14:31:52 2017 +0000 Commit: Harry Mallon CommitDate: Wed Dec 6 15:03:34 2017 +0000 FindOpenCL: Add support for AMD OpenCL SDK Light diff --git a/Modules/FindOpenCL.cmake b/Modules/FindOpenCL.cmake index 5d79110..297a5fb 100644 --- a/Modules/FindOpenCL.cmake +++ b/Modules/FindOpenCL.cmake @@ -76,6 +76,7 @@ find_path(OpenCL_INCLUDE_DIR ENV NVSDKCOMPUTE_ROOT ENV CUDA_PATH ENV ATISTREAMSDKROOT + ENV OCL_ROOT PATH_SUFFIXES include OpenCL/common/inc @@ -94,6 +95,7 @@ if(WIN32) ENV CUDA_PATH ENV NVSDKCOMPUTE_ROOT ENV ATISTREAMSDKROOT + ENV OCL_ROOT PATH_SUFFIXES "AMD APP/lib/x86" lib/x86 @@ -109,6 +111,7 @@ if(WIN32) ENV CUDA_PATH ENV NVSDKCOMPUTE_ROOT ENV ATISTREAMSDKROOT + ENV OCL_ROOT PATH_SUFFIXES "AMD APP/lib/x86_64" lib/x86_64 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f92304c789336f1d5e01a596ea024525c1a2b8f7 commit f92304c789336f1d5e01a596ea024525c1a2b8f7 Author: Justin Goshi AuthorDate: Fri Dec 1 11:44:00 2017 -0800 Commit: Justin Goshi CommitDate: Mon Dec 4 10:49:39 2017 -0800 CMakeVersion RC file: Split patch into 2 components The binary file version has 4 16-bit components. In cases where the patch component is too large (ex: represents a build date yyyymmdd) we split it into two parts. diff --git a/Source/CMakeVersion.rc.in b/Source/CMakeVersion.rc.in index 60e14e5..22b4a36 100644 --- a/Source/CMakeVersion.rc.in +++ b/Source/CMakeVersion.rc.in @@ -1,11 +1,11 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#define VER_FILEVERSION @CMake_VERSION_MAJOR@, at CMake_VERSION_MINOR@, at CMake_VERSION_PATCH@ -#define VER_FILEVERSION_STR "@CMake_VERSION_MAJOR at .@CMake_VERSION_MINOR at .@CMake_VERSION_PATCH@\0" +#define VER_FILEVERSION @CMake_RCVERSION@ +#define VER_FILEVERSION_STR "@CMake_RCVERSION_STR@\0" -#define VER_PRODUCTVERSION @CMake_VERSION_MAJOR@, at CMake_VERSION_MINOR@, at CMake_VERSION_PATCH@ -#define VER_PRODUCTVERSION_STR "@CMake_VERSION@\0" +#define VER_PRODUCTVERSION @CMake_RCVERSION@ +#define VER_PRODUCTVERSION_STR "@CMake_RCVERSION_STR@\0" /* Version-information resource identifier. */ #define VS_VERSION_INFO 1 diff --git a/Source/CMakeVersionCompute.cmake b/Source/CMakeVersionCompute.cmake index d9218d7..79264ed 100644 --- a/Source/CMakeVersionCompute.cmake +++ b/Source/CMakeVersionCompute.cmake @@ -27,3 +27,13 @@ endif() if(CMake_VERSION_IS_DIRTY) set(CMake_VERSION ${CMake_VERSION}-dirty) endif() + +# Compute the binary version that appears in the RC file. Version +# components in the RC file are 16-bit integers so we may have to +# split the patch component. +if(CMake_VERSION_PATCH MATCHES "^([0-9]+)([0-9][0-9][0-9][0-9])$") + set(CMake_RCVERSION ${CMake_VERSION_MAJOR},${CMake_VERSION_MINOR},${CMAKE_MATCH_1},${CMAKE_MATCH_2}) +else() + set(CMake_RCVERSION ${CMake_VERSION_MAJOR},${CMake_VERSION_MINOR},${CMake_VERSION_PATCH}) +endif() +set(CMake_RCVERSION_STR ${CMake_VERSION}) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 53 +------------------- Help/release/3.10.rst | 12 +++++ Help/release/dev/ExternalProject-DOWNLOAD_DIR.rst | 5 ++ Modules/ExternalProject.cmake | 7 +-- Modules/FindOpenCL.cmake | 3 ++ Modules/GoogleTest.cmake | 14 +++++- Modules/GoogleTestAddTests.cmake | 11 ++-- Source/CMakeVersion.rc.in | 8 +-- Source/CMakeVersionCompute.cmake | 10 ++++ Source/cmServerDictionary.h | 5 -- Source/cmServerProtocol.cxx | 51 ------------------- Tests/RunCMake/ExternalProject/RunCMakeTest.cmake | 35 ++++++++++--- .../ExternalProject/Substitutions-build-stdout.txt | 7 +++ Tests/RunCMake/ExternalProject/Substitutions.cmake | 25 +++++++++ .../GoogleTest-test-missing-result.txt} | 0 .../GoogleTest/GoogleTest-test-missing-stderr.txt | 2 + .../GoogleTest-timeout-result.txt} | 0 .../GoogleTest/GoogleTest-timeout-stdout.txt | 7 +++ Tests/RunCMake/GoogleTest/GoogleTest.cmake | 6 +++ Tests/RunCMake/GoogleTest/RunCMakeTest.cmake | 21 ++++++++ .../GoogleTest/timeout_test.cpp} | 7 ++- 21 files changed, 159 insertions(+), 130 deletions(-) create mode 100644 Help/release/dev/ExternalProject-DOWNLOAD_DIR.rst create mode 100644 Tests/RunCMake/ExternalProject/Substitutions-build-stdout.txt create mode 100644 Tests/RunCMake/ExternalProject/Substitutions.cmake copy Tests/RunCMake/{CMP0060/CMP0060-OLD-Build-result.txt => GoogleTest/GoogleTest-test-missing-result.txt} (100%) create mode 100644 Tests/RunCMake/GoogleTest/GoogleTest-test-missing-stderr.txt copy Tests/RunCMake/{CMP0060/CMP0060-OLD-Build-result.txt => GoogleTest/GoogleTest-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/GoogleTest/GoogleTest-timeout-stdout.txt copy Tests/{CTestTestCostSerial/sleep.c => RunCMake/GoogleTest/timeout_test.cpp} (59%) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 7 08:15:18 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 7 Dec 2017 08:15:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-20-gafae027 Message-ID: <20171207131519.3AFA4FA556@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 afae027d6398462906e762da29f306f41d21c6ee (commit) via 05f86af716e00b58b5103b231a22515edcc95321 (commit) via 8b2736c71ca6eb8e62a69f57ad07e4e19a95c936 (commit) via 935848a8a7164631b9410a0e6f7c5574b01bb85c (commit) via 29731d89192681cbc4bf87d7947a877aa0fb27aa (commit) via e99e39829ba36dbfad189a94062363343d7d3d8b (commit) from 0418e91f7d77e540b1e7accc9af4d6cd28b2e71f (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: Help/manual/cmake-server.7.rst | 42 +---------------- Help/release/3.10.rst | 12 +++++ Modules/GoogleTest.cmake | 14 +++++- Modules/GoogleTestAddTests.cmake | 11 +++-- Source/cmServerDictionary.h | 5 -- Source/cmServerProtocol.cxx | 49 -------------------- .../GoogleTest-test-missing-result.txt} | 0 .../GoogleTest/GoogleTest-test-missing-stderr.txt | 2 + .../GoogleTest-timeout-result.txt} | 0 .../GoogleTest/GoogleTest-timeout-stdout.txt | 7 +++ Tests/RunCMake/GoogleTest/GoogleTest.cmake | 6 +++ Tests/RunCMake/GoogleTest/RunCMakeTest.cmake | 21 +++++++++ .../GoogleTest/timeout_test.cpp} | 7 ++- 13 files changed, 73 insertions(+), 103 deletions(-) copy Tests/RunCMake/{CMP0060/CMP0060-OLD-Build-result.txt => GoogleTest/GoogleTest-test-missing-result.txt} (100%) create mode 100644 Tests/RunCMake/GoogleTest/GoogleTest-test-missing-stderr.txt copy Tests/RunCMake/{CMP0060/CMP0060-OLD-Build-result.txt => GoogleTest/GoogleTest-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/GoogleTest/GoogleTest-timeout-stdout.txt copy Tests/{CTestTestCostSerial/sleep.c => RunCMake/GoogleTest/timeout_test.cpp} (59%) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 7 08:35:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 7 Dec 2017 08:35:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-567-ge016d6d Message-ID: <20171207133508.4881A102E03@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 e016d6d255f36cc17e85e27761fd01ef048a1b93 (commit) via a2031d3a3a6ff26640f5c8cc0d76a0076c6e74cc (commit) from e1a09cfbd1d1802b5fc4ae9b4918bb00ce468dcc (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=e016d6d255f36cc17e85e27761fd01ef048a1b93 commit e016d6d255f36cc17e85e27761fd01ef048a1b93 Merge: e1a09cf a2031d3 Author: Brad King AuthorDate: Thu Dec 7 13:28:26 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 7 08:28:31 2017 -0500 Merge topic 'cpack-rpm-check-executable-flags' a2031d3a CPack/RPM: check executable flags for debuginfo packages Acked-by: Kitware Robot Merge-request: !1565 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2031d3a3a6ff26640f5c8cc0d76a0076c6e74cc commit a2031d3a3a6ff26640f5c8cc0d76a0076c6e74cc Author: Domen Vrankar AuthorDate: Wed Dec 6 20:35:21 2017 +0100 Commit: Domen Vrankar CommitDate: Wed Dec 6 21:04:20 2017 +0100 CPack/RPM: check executable flags for debuginfo packages Debuginfo packages can not be created from programs and shared libraries that do not have execute permissions. diff --git a/Help/release/dev/cpack-rpm-check-executable-flags.rst b/Help/release/dev/cpack-rpm-check-executable-flags.rst new file mode 100644 index 0000000..30475d6 --- /dev/null +++ b/Help/release/dev/cpack-rpm-check-executable-flags.rst @@ -0,0 +1,6 @@ +cpack-rpm-check-executable-flags +-------------------------------- + +* The :module:`CPackRPM` module learned to enable enforcing of execute + privilages on programs and shared libraries. + See :variable:`CPACK_RPM_INSTALL_WITH_EXEC` variable. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index c5a27f9..faa2df8 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -691,6 +691,22 @@ # are the same as for :variable:`CPACK_RPM_DEFAULT_FILE_PERMISSIONS`. # Note that must be in upper-case. # +# .. variable:: CPACK_RPM_INSTALL_WITH_EXEC +# +# force execute permissions on programs and shared libraries +# +# * Mandatory : NO +# * Default : - (system default) +# +# Force set owner, group and world execute permissions on programs and shared +# libraries. This can be used for creating valid rpm packages on systems such +# as Debian where shared libraries do not have execute permissions set. +# +# .. note:: +# +# Programs and shared libraries without execute permissions are ignored during +# separation of debug symbols from the binary for debuginfo packages. +# # Packaging of Symbolic Links # ^^^^^^^^^^^^^^^^^^^^^^^^^^^ # @@ -751,7 +767,8 @@ # .. note:: # # Packages generated from packages without binary files, with binary files but -# without execute permissions or without debug symbols will be empty. +# without execute permissions or without debug symbols will cause packaging +# termination. # # .. variable:: CPACK_BUILD_SOURCE_DIRS # @@ -939,6 +956,35 @@ # Author: Eric Noulard with the help of Alexander Neundorf. +function(get_file_permissions FILE RETURN_VAR) + execute_process(COMMAND ls -l ${FILE} + OUTPUT_VARIABLE permissions_ + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + cmake_policy(SET CMP0007 NEW) + string(REPLACE " " ";" permissions_ "${permissions_}") + list(GET permissions_ 0 permissions_) + + unset(text_notation_) + set(any_chars_ ".") + foreach(PERMISSION_TYPE "OWNER" "GROUP" "WORLD") + if(permissions_ MATCHES "${any_chars_}r.*") + list(APPEND text_notation_ "${PERMISSION_TYPE}_READ") + endif() + string(APPEND any_chars_ ".") + if(permissions_ MATCHES "${any_chars_}w.*") + list(APPEND text_notation_ "${PERMISSION_TYPE}_WRITE") + endif() + string(APPEND any_chars_ ".") + if(permissions_ MATCHES "${any_chars_}x.*") + list(APPEND text_notation_ "${PERMISSION_TYPE}_EXECUTE") + endif() + endforeach() + + set(${RETURN_VAR} "${text_notation_}" PARENT_SCOPE) +endfunction() + function(get_unix_permissions_octal_notation PERMISSIONS_VAR RETURN_VAR) set(PERMISSIONS ${${PERMISSIONS_VAR}}) list(LENGTH PERMISSIONS PERM_LEN_PRE) @@ -1515,7 +1561,7 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) RESULT_VARIABLE OBJDUMP_EXEC_RESULT OUTPUT_VARIABLE OBJDUMP_OUT ERROR_QUIET) - # Check that if the given file was executable or not + # Check if the given file is an executable or not if(NOT OBJDUMP_EXEC_RESULT) string(FIND "${OBJDUMP_OUT}" "debug" FIND_RESULT) if(FIND_RESULT GREATER -1) @@ -1560,6 +1606,31 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) else() message(WARNING "CPackRPM: File: ${F} does not contain debug symbols. They will possibly be missing from debuginfo package!") endif() + + get_file_permissions("${WORKING_DIR}/${F}" permissions_) + cmake_policy(SET CMP0057 NEW) + if(NOT "USER_EXECUTE" IN_LIST permissions_ AND + NOT "GROUP_EXECUTE" IN_LIST permissions_ AND + NOT "WORLD_EXECUTE" IN_LIST permissions_) + if(CPACK_RPM_INSTALL_WITH_EXEC) + execute_process(COMMAND chmod a+x ${WORKING_DIR}/${F} + RESULT_VARIABLE res_ + ERROR_VARIABLE err_ + OUTPUT_QUIET) + + if(res_) + message(FATAL_ERROR "CPackRPM: could not apply execute permissions " + "requested by CPACK_RPM_INSTALL_WITH_EXEC variable on " + "'${WORKING_DIR}/${F}'! Reason: '${err_}'") + endif() + else() + message(AUTHOR_WARNING "CPackRPM: File: ${WORKING_DIR}/${F} does not " + "have execute permissions. Debuginfo symbols will not be extracted" + "! Missing debuginfo may cause packaging failure. Consider setting " + "execute permissions or setting 'CPACK_RPM_INSTALL_WITH_EXEC' " + "variable.") + endif() + endif() endif() endforeach() diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake index b26c6c7..c745828 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake @@ -13,6 +13,6 @@ set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so") set(EXPECTED_FILE_4_NAME "Debuginfo") set(EXPECTED_FILE_4_COMPONENT "applications-debuginfo") -set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*") set(EXPECTED_FILE_5 "libs-DebugInfoPackage.rpm") -set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*") +set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*") diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake index f1b6738..71457d4 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake @@ -8,6 +8,10 @@ endif() set(CMAKE_BUILD_TYPE Debug) +# for rpm packages execute flag must be set for shared libs if debuginfo +# packages are generated +set(CPACK_RPM_INSTALL_WITH_EXEC TRUE) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp" "int test_lib();\n") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp" diff --git a/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake index 974df22..3fb0534 100644 --- a/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake @@ -12,6 +12,6 @@ set(EXPECTED_FILE_3 "extra_slash_in_path*-libs.rpm") set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so") set(EXPECTED_FILE_4_COMPONENT "applications-debuginfo") -set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") +set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*") set(EXPECTED_FILE_5_COMPONENT "libs-debuginfo") -set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*") +set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*") diff --git a/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/test.cmake b/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/test.cmake index 4fd1e81..7cee188 100644 --- a/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/test.cmake +++ b/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/test.cmake @@ -8,6 +8,10 @@ endif() set(CMAKE_BUILD_TYPE Debug) +# for rpm packages execute flag must be set for shared libs if debuginfo +# packages are generated +set(CPACK_RPM_INSTALL_WITH_EXEC TRUE) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp" "int test_lib();\n") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp" diff --git a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake index 8170d39..936e4ed 100644 --- a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake @@ -12,19 +12,19 @@ if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" OR RunCMake_SUBTEST_SUFFIX STREQUAL set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so") set(EXPECTED_FILE_4_COMPONENT "debuginfo") - set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*") + set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*") elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") set(EXPECTED_FILES_COUNT "2") set(EXPECTED_FILE_1 "single_debuginfo-0*-applications.rpm") set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") set(EXPECTED_FILE_2 "single_debuginfo-applications-debuginfo*.rpm") - set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*") elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") set(EXPECTED_FILES_COUNT "2") set(EXPECTED_FILE_1 "single_debuginfo-0*.rpm") set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") set(EXPECTED_FILE_2 "single_debuginfo-debuginfo*.rpm") - set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") + set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*") endif() ----------------------------------------------------------------------- Summary of changes: .../dev/cpack-rpm-check-executable-flags.rst | 6 ++ Modules/CPackRPM.cmake | 75 +++++++++++++++++++- .../CPack/tests/DEBUGINFO/ExpectedFiles.cmake | 4 +- Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake | 4 ++ .../tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake | 4 +- .../CPack/tests/EXTRA_SLASH_IN_PATH/test.cmake | 4 ++ .../tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake | 6 +- 7 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 Help/release/dev/cpack-rpm-check-executable-flags.rst hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 7 10:55:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 7 Dec 2017 10:55:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-569-g5104553 Message-ID: <20171207155512.2CA2AFDF9D@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 51045535e8e7add1f53d3599cdee2cf0f50c16f8 (commit) via be4702781d5bfe092daa2f6bfa1012c047e2161a (commit) from e016d6d255f36cc17e85e27761fd01ef048a1b93 (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=51045535e8e7add1f53d3599cdee2cf0f50c16f8 commit 51045535e8e7add1f53d3599cdee2cf0f50c16f8 Merge: e016d6d be47027 Author: Brad King AuthorDate: Thu Dec 7 15:45:39 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 7 10:45:47 2017 -0500 Merge topic 'fix-ctest-chrono' be470278 CTest: Fix regression in test timeout compuatation Acked-by: Kitware Robot Acked-by: dublet Merge-request: !1568 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be4702781d5bfe092daa2f6bfa1012c047e2161a commit be4702781d5bfe092daa2f6bfa1012c047e2161a Author: Brad King AuthorDate: Thu Dec 7 07:14:38 2017 -0500 Commit: Brad King CommitDate: Thu Dec 7 08:33:19 2017 -0500 CTest: Fix regression in test timeout compuatation Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) accidentally changed the logic used to compute the timeout for a test when it starts. It incorrectly limits the maximum possible timeout to 2 minutes rather than 2 minutes less than the total allowed test time remaining. Update the new logic to restore the original behavior. Avoid subtracting 2 minutes from our "infinite" timeout value to avoid creating very large timeouts that are not "infinite" and may exceed integer type ranges. diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 830ebdf..a075649 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -18,7 +18,6 @@ #include "cmsys/Base64.h" #include "cmsys/Process.h" #include "cmsys/RegularExpression.hxx" -#include #include #include #include @@ -686,8 +685,10 @@ bool cmCTestRunTest::ForkProcess(std::chrono::duration testTimeOut, // determine how much time we have std::chrono::duration timeout = - std::min>( - this->CTest->GetRemainingTimeAllowed(), std::chrono::minutes(2)); + this->CTest->GetRemainingTimeAllowed(); + if (timeout != std::chrono::duration::max()) { + timeout -= std::chrono::minutes(2); + } if (this->CTest->GetTimeOut() > std::chrono::duration::zero() && this->CTest->GetTimeOut() < timeout) { timeout = this->CTest->GetTimeOut(); ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestRunTest.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 8 00:05:51 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 00:05:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-570-g1c40558 Message-ID: <20171208050552.2E0C6103018@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 1c40558e9179779a097b9b5937a48c5da0000561 (commit) from 51045535e8e7add1f53d3599cdee2cf0f50c16f8 (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=1c40558e9179779a097b9b5937a48c5da0000561 commit 1c40558e9179779a097b9b5937a48c5da0000561 Author: Kitware Robot AuthorDate: Fri Dec 8 00:01:12 2017 -0500 Commit: Kitware Robot CommitDate: Fri Dec 8 00:01:12 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ae3bb06..7b0a83f 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 10) -set(CMake_VERSION_PATCH 20171207) +set(CMake_VERSION_PATCH 20171208) #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 Dec 8 09:15:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 09:15:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-573-gbbac777 Message-ID: <20171208141504.A8002F9CDF@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 bbac777698bf30be07a0edcc34ddc1a1e16b2dc5 (commit) via c50f08cdd88171fefda154623bba3aa21a2ceac2 (commit) via 5b1c84b449cbe84e429c968dd450673203493d5b (commit) from 1c40558e9179779a097b9b5937a48c5da0000561 (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=bbac777698bf30be07a0edcc34ddc1a1e16b2dc5 commit bbac777698bf30be07a0edcc34ddc1a1e16b2dc5 Merge: 1c40558 c50f08c Author: Brad King AuthorDate: Fri Dec 8 14:12:49 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 8 09:12:54 2017 -0500 Merge topic 'update-kwsys' c50f08cd Merge branch 'upstream-KWSys' into update-kwsys 5b1c84b4 KWSys 2017-12-07 (4aee0036) Acked-by: Kitware Robot Merge-request: !1567 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c50f08cdd88171fefda154623bba3aa21a2ceac2 commit c50f08cdd88171fefda154623bba3aa21a2ceac2 Merge: f5e48ed 5b1c84b Author: Brad King AuthorDate: Thu Dec 7 07:25:03 2017 -0500 Commit: Brad King CommitDate: Thu Dec 7 07:25:03 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-12-07 (4aee0036) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b1c84b449cbe84e429c968dd450673203493d5b commit 5b1c84b449cbe84e429c968dd450673203493d5b Author: KWSys Upstream AuthorDate: Thu Dec 7 07:08:22 2017 -0500 Commit: Brad King CommitDate: Thu Dec 7 07:25:03 2017 -0500 KWSys 2017-12-07 (4aee0036) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 4aee00361a2a38b99911318db84551eed8d3fcfc (master). Upstream Shortlog ----------------- Brad King (1): 09724ac8 hashtable: Avoid use of std::unary_function diff --git a/hash_map.hxx.in b/hash_map.hxx.in index 3f9174f..8c9b81e 100644 --- a/hash_map.hxx.in +++ b/hash_map.hxx.in @@ -49,7 +49,7 @@ namespace @KWSYS_NAMESPACE@ { // select1st is an extension: it is not part of the standard. template -struct hash_select1st : public std::unary_function, T1> +struct hash_select1st { const T1& operator()(const std::pair& __x) const { diff --git a/hash_set.hxx.in b/hash_set.hxx.in index e3a0c6c..5edd367 100644 --- a/hash_set.hxx.in +++ b/hash_set.hxx.in @@ -49,7 +49,7 @@ namespace @KWSYS_NAMESPACE@ { // identity is an extension: it is not part of the standard. template -struct _Identity : public std::unary_function<_Tp, _Tp> +struct _Identity { const _Tp& operator()(const _Tp& __x) const { return __x; } }; diff --git a/hashtable.hxx.in b/hashtable.hxx.in index dd92cb9..e962f17 100644 --- a/hashtable.hxx.in +++ b/hashtable.hxx.in @@ -35,13 +35,12 @@ #include <@KWSYS_NAMESPACE@/Configure.hxx> -#include // lower_bound -#include // unary_function -#include // iterator_traits -#include // allocator -#include // size_t -#include // pair -#include // vector +#include // lower_bound +#include // iterator_traits +#include // allocator +#include // size_t +#include // pair +#include // vector #if defined(_MSC_VER) #pragma warning(push) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/hash_map.hxx.in | 2 +- Source/kwsys/hash_set.hxx.in | 2 +- Source/kwsys/hashtable.hxx.in | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 8 09:35:10 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 09:35:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-579-g158fb97 Message-ID: <20171208143510.A1010100F05@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 158fb9755cffa427461addcaa6da8d18ec6246c6 (commit) via 1bc603344725920dbc518c9e9545741edc0139d3 (commit) via a3f8371c574fc41ae23e02e5514f641f819d4708 (commit) via bd49ae5109cb8bf0fc1110bab8b829f5f28bfdd9 (commit) via e4ccc68429d6a187f7e09d560a81e3b36cd06328 (commit) via fcbd02fd6ec56a6a4540e70082e899b45934dab8 (commit) from bbac777698bf30be07a0edcc34ddc1a1e16b2dc5 (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=158fb9755cffa427461addcaa6da8d18ec6246c6 commit 158fb9755cffa427461addcaa6da8d18ec6246c6 Merge: bbac777 1bc6033 Author: Brad King AuthorDate: Fri Dec 8 14:34:59 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 8 09:35:02 2017 -0500 Merge topic 'autogen-fix-library-deps' 1bc60334 Merge branch 'automoc-apple-framework' into autogen-fix-library-deps a3f8371c Merge branch 'automoc-apple-framework' into autogen-fix-library-deps bd49ae51 Autogen: Fix library dependency forwarding to _autogen target e4ccc684 Autogen: Tests: Add test for MacOS frameworks fcbd02fd Autogen: Fix for AUTOMOC on macOS frameworks in CMake 3.10 Acked-by: Kitware Robot Merge-request: !1566 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1bc603344725920dbc518c9e9545741edc0139d3 commit 1bc603344725920dbc518c9e9545741edc0139d3 Merge: a3f8371 e4ccc68 Author: Brad King AuthorDate: Thu Dec 7 09:11:34 2017 -0500 Commit: Brad King CommitDate: Thu Dec 7 09:11:34 2017 -0500 Merge branch 'automoc-apple-framework' into autogen-fix-library-deps https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3f8371c574fc41ae23e02e5514f641f819d4708 commit a3f8371c574fc41ae23e02e5514f641f819d4708 Merge: bd49ae5 fcbd02f Author: Brad King AuthorDate: Thu Dec 7 09:10:14 2017 -0500 Commit: Brad King CommitDate: Thu Dec 7 09:10:31 2017 -0500 Merge branch 'automoc-apple-framework' into autogen-fix-library-deps Merge using `-s ours` merge strategy because the change is a fix specific to the 3.10 release series, and we already have a similar fix in post-3.10 development. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd49ae5109cb8bf0fc1110bab8b829f5f28bfdd9 commit bd49ae5109cb8bf0fc1110bab8b829f5f28bfdd9 Author: Sebastian Holtermann AuthorDate: Thu Dec 7 11:53:49 2017 +0100 Commit: Brad King CommitDate: Thu Dec 7 09:09:19 2017 -0500 Autogen: Fix library dependency forwarding to _autogen target Library dependencies of the origin target were forwarded to the _autogen target as source file dependencies. This is fixed by forwarding the dependencies as target dependencies instead. Issue: #17278 diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index bd692a2..14743de 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -821,40 +821,39 @@ void cmQtAutoGeneratorInitializer::InitCustomTargets() this->Target->Target->AddPreBuildCommand(cc); } else { - // Convert file dependencies std::set to std::vector - std::vector autogenDepends(autogenDependFiles.begin(), - autogenDependFiles.end()); - // Add link library target dependencies to the autogen target // dependencies - for (std::string const& config : this->ConfigsList) { - cmLinkImplementationLibraries const* libs = - this->Target->GetLinkImplementationLibraries(config); - if (libs != nullptr) { - for (cmLinkItem const& item : libs->Libraries) { - cmGeneratorTarget const* libTarget = item.Target; - if ((libTarget != nullptr) && - !StaticLibraryCycle(this->Target, libTarget, config)) { - std::string util; - if (this->ConfigsList.size() > 1) { - util += "$<$GetName(); - if (this->ConfigsList.size() > 1) { - util += ">"; + { + // add_dependencies/addUtility do not support generator expressions. + // We depend only on the libraries found in all configs therefore. + std::map commonTargets; + for (std::string const& config : this->ConfigsList) { + cmLinkImplementationLibraries const* libs = + this->Target->GetLinkImplementationLibraries(config); + if (libs != nullptr) { + for (cmLinkItem const& item : libs->Libraries) { + cmGeneratorTarget const* libTarget = item.Target; + if ((libTarget != nullptr) && + !StaticLibraryCycle(this->Target, libTarget, config)) { + // Increment target config count + commonTargets[libTarget]++; } - autogenDepends.push_back(util); } } } + for (auto const& item : commonTargets) { + if (item.second == this->ConfigsList.size()) { + autogenDependTargets.insert(item.first->Target); + } + } } // Create autogen target cmTarget* autogenTarget = makefile->AddUtilityCommand( this->AutogenTargetName, cmMakefile::TargetOrigin::Generator, true, - this->DirWork.c_str(), /*byproducts=*/autogenProvides, autogenDepends, + this->DirWork.c_str(), /*byproducts=*/autogenProvides, + std::vector(autogenDependFiles.begin(), + autogenDependFiles.end()), commandLines, false, autogenComment.c_str()); // Create autogen generator target localGen->AddGeneratorTarget( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4ccc68429d6a187f7e09d560a81e3b36cd06328 commit e4ccc68429d6a187f7e09d560a81e3b36cd06328 Author: Sebastian Holtermann AuthorDate: Wed Dec 6 14:06:24 2017 +0100 Commit: Brad King CommitDate: Thu Dec 7 09:05:58 2017 -0500 Autogen: Tests: Add test for MacOS frameworks diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 32c2950..dff9d0c 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -215,6 +215,12 @@ add_subdirectory(uicInclude) add_subdirectory(objectLibrary) # -- Test +# MacOS Framework +if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) + add_subdirectory(macosFW) +endif() + +# -- Test # Source files with the same basename in different subdirectories add_subdirectory(sameName) diff --git a/Tests/QtAutogen/macosFW/CMakeLists.txt b/Tests/QtAutogen/macosFW/CMakeLists.txt new file mode 100644 index 0000000..114d9ba --- /dev/null +++ b/Tests/QtAutogen/macosFW/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.8) +project(macos-fw-test) + +find_package(Qt5Test REQUIRED) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/lib) +set(CMAKE_INSTALL_NAME_DIR ${CMAKE_BINARY_DIR}/output/lib) + +if(POLICY CMP0042) # in CMake 3.0.0+ + set (CMAKE_MACOSX_RPATH OFF) # otherwise ON by default +endif(POLICY CMP0042) + +if(POLICY CMP0068) # in CMake 3.9+ + cmake_policy(SET CMP0068 NEW) +endif(POLICY CMP0068) + +add_subdirectory(src) +add_subdirectory(test) diff --git a/Tests/QtAutogen/macosFW/src/CMakeLists.txt b/Tests/QtAutogen/macosFW/src/CMakeLists.txt new file mode 100644 index 0000000..a02be00 --- /dev/null +++ b/Tests/QtAutogen/macosFW/src/CMakeLists.txt @@ -0,0 +1,33 @@ +set(MACOS_FW_LIB_VERSION "0.1") +set(MACOS_FW_LIB_SRCS + macos_fw_lib.cpp +) +set(MACOS_FW_LIB_HDRS + macos_fw_lib.h +) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${Qt5Core_INCLUDE_DIRS} +) + +add_library(macos_fw_lib SHARED + ${MACOS_FW_LIB_SRCS} + ${MACOS_FW_LIB_HDRS} +) +set_target_properties(macos_fw_lib PROPERTIES AUTOMOC TRUE) +set_target_properties(macos_fw_lib PROPERTIES + CLEAN_DIRECT_OUTPUT 1 + FRAMEWORK 1 + FRAMEWORK_VERSION ${MACOS_FW_LIB_VERSION} + VERSION ${MACOS_FW_LIB_VERSION} + SOVERSION ${MACOS_FW_LIB_VERSION} + MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${MACOS_FW_LIB_VERSION} + MACOSX_FRAMEWORK_IDENTIFIER org.macos.fw_lib + POSITION_INDEPENDENT_CODE ON + PUBLIC_HEADER "${MACOS_FW_LIB_HDRS}" +) +target_link_libraries(macos_fw_lib + Qt5::Core +) diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp b/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp new file mode 100644 index 0000000..881a8c9 --- /dev/null +++ b/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp @@ -0,0 +1,17 @@ +#include "macos_fw_lib.h" + +#include +#include + +MacosFWLib::MacosFWLib() +{ +} + +MacosFWLib::~MacosFWLib() +{ +} + +QString MacosFWLib::qtVersionString() const +{ + return QString(qVersion()); +} diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.h b/Tests/QtAutogen/macosFW/src/macos_fw_lib.h new file mode 100644 index 0000000..e66e0ea --- /dev/null +++ b/Tests/QtAutogen/macosFW/src/macos_fw_lib.h @@ -0,0 +1,18 @@ +#ifndef MACOSFWLIB_H +#define MACOSFWLIB_H + +#include +#include + +class __attribute__((visibility("default"))) MacosFWLib : public QObject +{ + Q_OBJECT + +public: + explicit MacosFWLib(); + ~MacosFWLib(); + + QString qtVersionString() const; +}; + +#endif // MACOSFWLIB_H diff --git a/Tests/QtAutogen/macosFW/test/CMakeLists.txt b/Tests/QtAutogen/macosFW/test/CMakeLists.txt new file mode 100644 index 0000000..521c184 --- /dev/null +++ b/Tests/QtAutogen/macosFW/test/CMakeLists.txt @@ -0,0 +1,19 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../src +) +include_directories(SYSTEM + ${Qt5Core_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} +) + +set(testname AutomocMacosFWLib) +add_executable(${testname} testMacosFWLib.cpp) +set_target_properties(${testname} PROPERTIES AUTOMOC TRUE) +target_link_libraries(${testname} + Qt5::Core + Qt5::Widgets + Qt5::Test + macos_fw_lib +) diff --git a/Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp b/Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp new file mode 100644 index 0000000..3476d61 --- /dev/null +++ b/Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp @@ -0,0 +1,42 @@ +#include +#include + +#include "macos_fw_lib.h" +#include "testMacosFWLib.h" + +class TestMacosFWLib : public QObject +{ + Q_OBJECT + +private slots: + void initTestCase(); + void cleanupTestCase(); + void init() {} + void cleanup() {} + + void testQtVersion(); +}; + +void TestMacosFWLib::initTestCase() +{ +} + +void TestMacosFWLib::cleanupTestCase() +{ +} + +void TestMacosFWLib::testQtVersion() +{ + MacosFWLib* testLib = new MacosFWLib(); + QVERIFY(testLib->qtVersionString().contains("5.")); + testLib->deleteLater(); +} + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv, false); + MacosFWLib testObject; + return QTest::qExec(&testObject, argc, argv); +} + +#include "testMacosFWLib.moc" diff --git a/Tests/QtAutogen/macosFW/test/testMacosFWLib.h b/Tests/QtAutogen/macosFW/test/testMacosFWLib.h new file mode 100644 index 0000000..1fe8dae --- /dev/null +++ b/Tests/QtAutogen/macosFW/test/testMacosFWLib.h @@ -0,0 +1,7 @@ +#ifndef TESTMACOSFWLIB_H +#define TESTMACOSFWLIB_H + +#include "qapplication.h" +#include + +#endif // TESTMACOSFWLIB_H https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fcbd02fd6ec56a6a4540e70082e899b45934dab8 commit fcbd02fd6ec56a6a4540e70082e899b45934dab8 Author: Sebastian Holtermann AuthorDate: Thu Dec 7 10:21:34 2017 +0100 Commit: Brad King CommitDate: Thu Dec 7 09:04:05 2017 -0500 Autogen: Fix for AUTOMOC on macOS frameworks in CMake 3.10 Revert the library target dependency forwarding to the `_autogen` target to the 3.9.6 way, only now using `GetLinkImplementationLibraries`. Fixes: #17278 diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index c7550e6..b02d872 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -1046,40 +1046,39 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( target->Target->AddPreBuildCommand(cc); } else { - // Convert file dependencies std::set to std::vector - std::vector autogenDepends(autogenDependFiles.begin(), - autogenDependFiles.end()); - // Add link library target dependencies to the autogen target dependencies - for (std::string const& config : configsList) { - cmLinkImplementationLibraries const* libs = - target->GetLinkImplementationLibraries(config); - if (libs != nullptr) { - for (cmLinkItem const& item : libs->Libraries) { - cmGeneratorTarget const* libTarget = item.Target; - if ((libTarget != nullptr) && - !StaticLibraryCycle(target, libTarget, config)) { - std::string util; - if (configsList.size() > 1) { - util += "$<$GetName(); - if (configsList.size() > 1) { - util += ">"; + { + // add_dependencies/addUtility do not support generator expressions. + // We depend only on the libraries found in all configs therefore. + std::map commonTargets; + for (std::string const& config : configsList) { + cmLinkImplementationLibraries const* libs = + target->GetLinkImplementationLibraries(config); + if (libs != nullptr) { + for (cmLinkItem const& item : libs->Libraries) { + cmGeneratorTarget const* libTarget = item.Target; + if ((libTarget != nullptr) && + !StaticLibraryCycle(target, libTarget, config)) { + // Increment target config count + commonTargets[libTarget]++; } - autogenDepends.push_back(util); } } } + for (auto const& item : commonTargets) { + if (item.second == configsList.size()) { + autogenDependTargets.insert(item.first->Target); + } + } } // Create autogen target cmTarget* autogenTarget = makefile->AddUtilityCommand( autogenTargetName, true, workingDirectory.c_str(), - /*byproducts=*/autogenProvides, autogenDepends, commandLines, false, - autogenComment.c_str()); + /*byproducts=*/autogenProvides, + std::vector(autogenDependFiles.begin(), + autogenDependFiles.end()), + commandLines, false, autogenComment.c_str()); // Create autogen generator target localGen->AddGeneratorTarget( new cmGeneratorTarget(autogenTarget, localGen)); ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGeneratorInitializer.cxx | 45 +++++++++++------------ Tests/QtAutogen/CMakeLists.txt | 6 +++ Tests/QtAutogen/macosFW/CMakeLists.txt | 20 ++++++++++ Tests/QtAutogen/macosFW/src/CMakeLists.txt | 33 +++++++++++++++++ Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp | 17 +++++++++ Tests/QtAutogen/macosFW/src/macos_fw_lib.h | 18 +++++++++ Tests/QtAutogen/macosFW/test/CMakeLists.txt | 19 ++++++++++ Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp | 42 +++++++++++++++++++++ Tests/QtAutogen/macosFW/test/testMacosFWLib.h | 7 ++++ 9 files changed, 184 insertions(+), 23 deletions(-) create mode 100644 Tests/QtAutogen/macosFW/CMakeLists.txt create mode 100644 Tests/QtAutogen/macosFW/src/CMakeLists.txt create mode 100644 Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp create mode 100644 Tests/QtAutogen/macosFW/src/macos_fw_lib.h create mode 100644 Tests/QtAutogen/macosFW/test/CMakeLists.txt create mode 100644 Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp create mode 100644 Tests/QtAutogen/macosFW/test/testMacosFWLib.h hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 8 09:45:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 09:45:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-581-g62822ce Message-ID: <20171208144504.2C804F6256@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 62822ce68a34ca5f4756b0128c7e824eacf5dbbf (commit) via 066fe644ee4468bb59861ecb97306780b03fcade (commit) from 158fb9755cffa427461addcaa6da8d18ec6246c6 (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=62822ce68a34ca5f4756b0128c7e824eacf5dbbf commit 62822ce68a34ca5f4756b0128c7e824eacf5dbbf Merge: 158fb97 066fe64 Author: Brad King AuthorDate: Fri Dec 8 09:36:12 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 09:36:12 2017 -0500 Merge branch 'release-3.10' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 8 09:45:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 09:45:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-23-g066fe64 Message-ID: <20171208144504.AAB2EF920B@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 066fe644ee4468bb59861ecb97306780b03fcade (commit) via e4ccc68429d6a187f7e09d560a81e3b36cd06328 (commit) via fcbd02fd6ec56a6a4540e70082e899b45934dab8 (commit) from afae027d6398462906e762da29f306f41d21c6ee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGeneratorInitializer.cxx | 47 +++++++++++------------ Tests/QtAutogen/CMakeLists.txt | 6 +++ Tests/QtAutogen/macosFW/CMakeLists.txt | 20 ++++++++++ Tests/QtAutogen/macosFW/src/CMakeLists.txt | 33 ++++++++++++++++ Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp | 17 ++++++++ Tests/QtAutogen/macosFW/src/macos_fw_lib.h | 18 +++++++++ Tests/QtAutogen/macosFW/test/CMakeLists.txt | 19 +++++++++ Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp | 42 ++++++++++++++++++++ Tests/QtAutogen/macosFW/test/testMacosFWLib.h | 7 ++++ 9 files changed, 185 insertions(+), 24 deletions(-) create mode 100644 Tests/QtAutogen/macosFW/CMakeLists.txt create mode 100644 Tests/QtAutogen/macosFW/src/CMakeLists.txt create mode 100644 Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp create mode 100644 Tests/QtAutogen/macosFW/src/macos_fw_lib.h create mode 100644 Tests/QtAutogen/macosFW/test/CMakeLists.txt create mode 100644 Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp create mode 100644 Tests/QtAutogen/macosFW/test/testMacosFWLib.h hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 8 09:55:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 09:55:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-583-ge81b7a2 Message-ID: <20171208145503.39201102A2C@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 e81b7a2075b06ef12c3ab175ac4e20eaa50b80b2 (commit) via ce3874b303a354c242e068497d6662fdcc390a85 (commit) from 62822ce68a34ca5f4756b0128c7e824eacf5dbbf (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=e81b7a2075b06ef12c3ab175ac4e20eaa50b80b2 commit e81b7a2075b06ef12c3ab175ac4e20eaa50b80b2 Merge: 62822ce ce3874b Author: Brad King AuthorDate: Fri Dec 8 14:53:29 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 8 09:53:33 2017 -0500 Merge topic 'cuda_darwin_proper_install_names_flags' ce3874b3 CUDA: Shared libraries on Darwin properly setup @rpath install_names Acked-by: Kitware Robot Merge-request: !1570 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce3874b303a354c242e068497d6662fdcc390a85 commit ce3874b303a354c242e068497d6662fdcc390a85 Author: Robert Maynard AuthorDate: Thu Dec 7 11:31:03 2017 -0500 Commit: Robert Maynard CommitDate: Thu Dec 7 11:31:03 2017 -0500 CUDA: Shared libraries on Darwin properly setup @rpath install_names Shared libraries linked with CUDA now properly setup booth the correct install_name but also specify headerpad_max_install_names so that the names can be changed post build. diff --git a/Modules/Platform/Darwin-NVIDIA-CUDA.cmake b/Modules/Platform/Darwin-NVIDIA-CUDA.cmake new file mode 100644 index 0000000..bec3948 --- /dev/null +++ b/Modules/Platform/Darwin-NVIDIA-CUDA.cmake @@ -0,0 +1,19 @@ +include(Platform/Darwin) + +set(__IMPLICT_LINKS ) +foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES}) + string(APPEND __IMPLICT_LINKS " -L\"${dir}\"") +endforeach() +foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES}) + if(${lib} MATCHES "/") + string(APPEND __IMPLICT_LINKS " \"${lib}\"") + else() + string(APPEND __IMPLICT_LINKS " -l${lib}") + endif() +endforeach() + +set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS "-shared -Wl,-headerpad_max_install_names") +set(CMAKE_SHARED_MODULE_CREATE_CUDA_FLAGS "-shared -Wl,-headerpad_max_install_names") + +set(CMAKE_CUDA_CREATE_SHARED_LIBRARY " -o ${__IMPLICT_LINKS}") +set(CMAKE_CUDA_CREATE_SHARED_MODULE " -o ${__IMPLICT_LINKS}") ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Darwin-NVIDIA-CUDA.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Modules/Platform/Darwin-NVIDIA-CUDA.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 8 10:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 10:05:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-585-gd25bcab Message-ID: <20171208150505.47336102B69@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 d25bcab161bfccb43cbeb43dfe96c805e2c27530 (commit) via 3efc6ad2a2210b943e6307766c9a107eddd96540 (commit) from e81b7a2075b06ef12c3ab175ac4e20eaa50b80b2 (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=d25bcab161bfccb43cbeb43dfe96c805e2c27530 commit d25bcab161bfccb43cbeb43dfe96c805e2c27530 Merge: e81b7a2 3efc6ad Author: Brad King AuthorDate: Fri Dec 8 09:55:12 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 09:55:12 2017 -0500 Merge branch 'release-3.10' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 8 10:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 8 Dec 2017 10:05:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-25-g3efc6ad Message-ID: <20171208150505.8B674102B82@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 3efc6ad2a2210b943e6307766c9a107eddd96540 (commit) via ce3874b303a354c242e068497d6662fdcc390a85 (commit) from 066fe644ee4468bb59861ecb97306780b03fcade (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/Platform/Darwin-NVIDIA-CUDA.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Modules/Platform/Darwin-NVIDIA-CUDA.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 9 00:05:22 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 9 Dec 2017 00:05:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-586-g0fe1966 Message-ID: <20171209050522.7A7B7102DB7@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 0fe1966b7994969c2220efbec51bf49c0406fac8 (commit) from d25bcab161bfccb43cbeb43dfe96c805e2c27530 (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=0fe1966b7994969c2220efbec51bf49c0406fac8 commit 0fe1966b7994969c2220efbec51bf49c0406fac8 Author: Kitware Robot AuthorDate: Sat Dec 9 00:01:30 2017 -0500 Commit: Kitware Robot CommitDate: Sat Dec 9 00:01:30 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7b0a83f..239f990 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 10) -set(CMake_VERSION_PATCH 20171208) +set(CMake_VERSION_PATCH 20171209) #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 Dec 10 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 10 Dec 2017 00:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-587-gec37222 Message-ID: <20171210050507.ADA39102920@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 ec37222d59116f9ae6c9bceb79fe5941a5ef46b4 (commit) from 0fe1966b7994969c2220efbec51bf49c0406fac8 (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=ec37222d59116f9ae6c9bceb79fe5941a5ef46b4 commit ec37222d59116f9ae6c9bceb79fe5941a5ef46b4 Author: Kitware Robot AuthorDate: Sun Dec 10 00:01:10 2017 -0500 Commit: Kitware Robot CommitDate: Sun Dec 10 00:01:10 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 239f990..87bc59d 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 10) -set(CMake_VERSION_PATCH 20171209) +set(CMake_VERSION_PATCH 20171210) #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 Dec 11 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 11 Dec 2017 00:05:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-588-g14fe6d4 Message-ID: <20171211050506.D6EDA102956@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 14fe6d431b12139ea2aeb5bcc09efd0f964597aa (commit) from ec37222d59116f9ae6c9bceb79fe5941a5ef46b4 (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=14fe6d431b12139ea2aeb5bcc09efd0f964597aa commit 14fe6d431b12139ea2aeb5bcc09efd0f964597aa Author: Kitware Robot AuthorDate: Mon Dec 11 00:01:09 2017 -0500 Commit: Kitware Robot CommitDate: Mon Dec 11 00:01:09 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 87bc59d..0ee6fb1 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 10) -set(CMake_VERSION_PATCH 20171210) +set(CMake_VERSION_PATCH 20171211) #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 Dec 11 08:35:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 11 Dec 2017 08:35:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-593-g0f57e15 Message-ID: <20171211133509.AC623102BD4@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 0f57e1515770d146de3294770aa63b8d727eabe6 (commit) via 1efb6e566fd2d35fc744559efad095dbef8cf0c6 (commit) via f984296ba8c663eba747454338d8839cdeb96421 (commit) via 9dee52bacad3a5b3794b0101b7b16d6bc9b0553a (commit) via 3b1bb703a2f75f26fd453e50f848b5dbd64bc169 (commit) from 14fe6d431b12139ea2aeb5bcc09efd0f964597aa (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=0f57e1515770d146de3294770aa63b8d727eabe6 commit 0f57e1515770d146de3294770aa63b8d727eabe6 Merge: 1efb6e5 f984296 Author: Brad King AuthorDate: Mon Dec 11 13:33:45 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 11 08:33:58 2017 -0500 Merge topic 'ctest-remove-unfinished-batch-mode' f984296b CTest: Remove unfinished batch test mode Acked-by: Kitware Robot Merge-request: !1577 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1efb6e566fd2d35fc744559efad095dbef8cf0c6 commit 1efb6e566fd2d35fc744559efad095dbef8cf0c6 Merge: 14fe6d4 9dee52b Author: Brad King AuthorDate: Mon Dec 11 13:33:19 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 11 08:33:25 2017 -0500 Merge topic 'update-kwsys' 9dee52ba Merge branch 'upstream-KWSys' into update-kwsys 3b1bb703 KWSys 2017-12-08 (2d27b1d0) Acked-by: Kitware Robot Merge-request: !1576 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f984296ba8c663eba747454338d8839cdeb96421 commit f984296ba8c663eba747454338d8839cdeb96421 Author: Brad King AuthorDate: Fri Dec 8 11:22:50 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 11:23:33 2017 -0500 CTest: Remove unfinished batch test mode This was partially implemented by commit v2.8.0~154 (Added some ctest batch capabilities, 2009-09-10) but never finished. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 5611e55..7031d5a 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -802,7 +802,6 @@ include_directories( # set(CTEST_SRCS cmCTest.cxx CTest/cmProcess.cxx - CTest/cmCTestBatchTestHandler.cxx CTest/cmCTestBuildAndTestHandler.cxx CTest/cmCTestBuildCommand.cxx CTest/cmCTestBuildHandler.cxx diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx deleted file mode 100644 index 2eed8be..0000000 --- a/Source/CTest/cmCTestBatchTestHandler.cxx +++ /dev/null @@ -1,123 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCTestBatchTestHandler.h" - -#include "cmCTest.h" -#include "cmCTestMultiProcessHandler.h" -#include "cmCTestTestHandler.h" -#include "cmProcess.h" -#include "cmSystemTools.h" - -#include -#include -#include - -cmCTestBatchTestHandler::~cmCTestBatchTestHandler() -{ -} - -void cmCTestBatchTestHandler::RunTests() -{ - this->WriteBatchScript(); - this->SubmitBatchScript(); -} - -void cmCTestBatchTestHandler::WriteBatchScript() -{ - this->Script = this->CTest->GetBinaryDir() + "/Testing/CTestBatch.txt"; - cmsys::ofstream fout; - fout.open(this->Script.c_str()); - fout << "#!/bin/sh\n"; - - for (auto const& t : this->Tests) { - this->WriteSrunArgs(t.first, fout); - this->WriteTestCommand(t.first, fout); - fout << "\n"; - } - fout.flush(); - fout.close(); -} - -void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::ostream& fout) -{ - cmCTestTestHandler::cmCTestTestProperties* properties = - this->Properties[test]; - - fout << "srun "; - // fout << "--jobid=" << test << " "; - fout << "-J=" << properties->Name << " "; - - // Write dependency information - /*if(!this->Tests[test].empty()) - { - fout << "-P=afterany"; - for(TestSet::iterator i = this->Tests[test].begin(); - i != this->Tests[test].end(); ++i) - { - fout << ":" << *i; - } - fout << " "; - }*/ - if (properties->RunSerial) { - fout << "--exclusive "; - } - if (properties->Processors > 1) { - fout << "-n" << properties->Processors << " "; - } -} - -void cmCTestBatchTestHandler::WriteTestCommand(int test, std::ostream& fout) -{ - std::vector args = this->Properties[test]->Args; - std::vector processArgs; - std::string command; - - command = this->TestHandler->FindTheExecutable(args[1].c_str()); - command = cmSystemTools::ConvertToOutputPath(command.c_str()); - - // Prepends memcheck args to our command string if this is a memcheck - this->TestHandler->GenerateTestCommand(processArgs, test); - processArgs.push_back(command); - - for (std::string const& arg : processArgs) { - fout << arg << " "; - } - - std::vector::iterator i = args.begin(); - ++i; // the test name - ++i; // the executable (command) - if (args.size() > 2) { - fout << "'"; - } - while (i != args.end()) { - fout << "\"" << *i << "\""; // args to the test executable - ++i; - - if (i == args.end() && args.size() > 2) { - fout << "'"; - } - fout << " "; - } - // TODO ZACH build TestResult.FullCommandLine - // this->TestResult.FullCommandLine = this->TestCommand; -} - -void cmCTestBatchTestHandler::SubmitBatchScript() -{ - cmProcess sbatch; - std::vector args; - args.push_back(this->Script); - args.push_back("-o"); - args.push_back(this->CTest->GetBinaryDir() + "/Testing/CTestBatch.txt"); - - sbatch.SetCommand("sbatch"); - sbatch.SetCommandArguments(args); - /*if(sbatch.StartProcess()) - { - //success condition - } - else - { - //fail condition - }*/ -} diff --git a/Source/CTest/cmCTestBatchTestHandler.h b/Source/CTest/cmCTestBatchTestHandler.h deleted file mode 100644 index 42f87bd..0000000 --- a/Source/CTest/cmCTestBatchTestHandler.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCTestBatchTestHandler_h -#define cmCTestBatchTestHandler_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCTestMultiProcessHandler.h" -#include "cmsys/FStream.hxx" -#include - -/** \class cmCTestBatchTestHandler - * \brief run parallel ctest - * - * cmCTestBatchTestHandler - */ -class cmCTestBatchTestHandler : public cmCTestMultiProcessHandler -{ -public: - ~cmCTestBatchTestHandler() override; - void RunTests() override; - -protected: - void WriteBatchScript(); - void WriteSrunArgs(int test, std::ostream& fout); - void WriteTestCommand(int test, std::ostream& fout); - - void SubmitBatchScript(); - - std::string Script; -}; - -#endif diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 1e15cc5..9819899 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -19,7 +19,6 @@ #include "cmAlgorithms.h" #include "cmCTest.h" -#include "cmCTestBatchTestHandler.h" #include "cmCTestMultiProcessHandler.h" #include "cmCommand.h" #include "cmGeneratedFileStream.h" @@ -1210,9 +1209,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector& passed, this->StartTestTime = std::chrono::system_clock::now(); auto elapsed_time_start = std::chrono::steady_clock::now(); - cmCTestMultiProcessHandler* parallel = this->CTest->GetBatchJobs() - ? new cmCTestBatchTestHandler - : new cmCTestMultiProcessHandler; + cmCTestMultiProcessHandler* parallel = new cmCTestMultiProcessHandler; parallel->SetCTest(this->CTest); parallel->SetParallelLevel(this->CTest->GetParallelLevel()); parallel->SetTestHandler(this); diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 19b345e..4fb067a 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -29,7 +29,6 @@ class cmCTestTestHandler : public cmCTestGenericHandler { friend class cmCTestRunTest; friend class cmCTestMultiProcessHandler; - friend class cmCTestBatchTestHandler; public: typedef cmCTestGenericHandler Superclass; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index a4ca301..f5ddc23 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -267,7 +267,6 @@ cmCTest::cmCTest() this->TestLoad = 0; this->SubmitIndex = 0; this->Failover = false; - this->BatchJobs = false; this->ForceNewCTestProcess = false; this->TomorrowTag = false; this->Verbose = false; @@ -1819,9 +1818,6 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, if (this->CheckArgument(arg, "-V", "--verbose")) { this->Verbose = true; } - if (this->CheckArgument(arg, "-B")) { - this->BatchJobs = true; - } if (this->CheckArgument(arg, "-VV", "--extra-verbose")) { this->ExtraVerbose = true; this->Verbose = true; diff --git a/Source/cmCTest.h b/Source/cmCTest.h index ba94866..44a6350 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -427,9 +427,6 @@ public: void SetFailover(bool failover) { this->Failover = failover; } bool GetFailover() { return this->Failover; } - void SetBatchJobs(bool batch = true) { this->BatchJobs = batch; } - bool GetBatchJobs() { return this->BatchJobs; } - bool GetVerbose() { return this->Verbose; } bool GetExtraVerbose() { return this->ExtraVerbose; } @@ -475,7 +472,6 @@ private: bool UseHTTP10; bool PrintLabels; bool Failover; - bool BatchJobs; bool ForceNewCTestProcess; diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9507880..1d13f1c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3069,8 +3069,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_test(CTestTestShowOnly ${CMAKE_CTEST_COMMAND} -N) - add_test(CTestBatchTest ${CMAKE_CTEST_COMMAND} -B) - configure_file( "${CMake_SOURCE_DIR}/Tests/CTestTestFdSetSize/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTestFdSetSize/test.cmake" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dee52bacad3a5b3794b0101b7b16d6bc9b0553a commit 9dee52bacad3a5b3794b0101b7b16d6bc9b0553a Merge: d25bcab 3b1bb70 Author: Brad King AuthorDate: Fri Dec 8 10:08:39 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 10:08:39 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-12-08 (2d27b1d0) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b1bb703a2f75f26fd453e50f848b5dbd64bc169 commit 3b1bb703a2f75f26fd453e50f848b5dbd64bc169 Author: KWSys Upstream AuthorDate: Fri Dec 8 10:08:10 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 10:08:38 2017 -0500 KWSys 2017-12-08 (2d27b1d0) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 2d27b1d075d93860ee63564f635fd1710aa61208 (master). Upstream Shortlog ----------------- Brad King (1): 9995f700 hashtable: Drop when building inside CMake diff --git a/CMakeLists.txt b/CMakeLists.txt index 64b6484..351e38d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -705,9 +705,13 @@ ENDIF() # selected components. Initialize with required components. SET(KWSYS_CLASSES) SET(KWSYS_H_FILES Configure SharedForward) -SET(KWSYS_HXX_FILES Configure String - hashtable hash_fun hash_map hash_set - ) +SET(KWSYS_HXX_FILES Configure String) + +IF(NOT CMake_SOURCE_DIR) + SET(KWSYS_HXX_FILES ${KWSYS_HXX_FILES} + hashtable hash_fun hash_map hash_set + ) +ENDIF() # Add selected C++ classes. SET(cppclasses @@ -1027,7 +1031,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ENDFOREACH() # C++ tests - IF(NOT WATCOM) + IF(NOT WATCOM AND NOT CMake_SOURCE_DIR) SET(KWSYS_CXX_TESTS testHashSTL ) ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 1 - Source/CTest/cmCTestBatchTestHandler.cxx | 123 ------------------------------ Source/CTest/cmCTestBatchTestHandler.h | 33 -------- Source/CTest/cmCTestTestHandler.cxx | 5 +- Source/CTest/cmCTestTestHandler.h | 1 - Source/cmCTest.cxx | 4 - Source/cmCTest.h | 4 - Source/kwsys/CMakeLists.txt | 12 ++- Tests/CMakeLists.txt | 2 - 9 files changed, 9 insertions(+), 176 deletions(-) delete mode 100644 Source/CTest/cmCTestBatchTestHandler.cxx delete mode 100644 Source/CTest/cmCTestBatchTestHandler.h hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 11 09:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 11 Dec 2017 09:05:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-595-g9720c14 Message-ID: <20171211140504.4F30C102CB7@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 9720c142559ad8b48326de1fb636ae66e1f74184 (commit) via 93d5f464cc9cdf4a3b30565828ce23065ce51d01 (commit) from 0f57e1515770d146de3294770aa63b8d727eabe6 (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=9720c142559ad8b48326de1fb636ae66e1f74184 commit 9720c142559ad8b48326de1fb636ae66e1f74184 Merge: 0f57e15 93d5f46 Author: Brad King AuthorDate: Mon Dec 11 14:00:14 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 11 09:00:19 2017 -0500 Merge topic 'cpack-generator-scripts-enable-all-cmake-policies' 93d5f464 CPack: enable all CMake policies for generator scripts Acked-by: Kitware Robot Merge-request: !1582 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93d5f464cc9cdf4a3b30565828ce23065ce51d01 commit 93d5f464cc9cdf4a3b30565828ce23065ce51d01 Author: Domen Vrankar AuthorDate: Sat Mar 25 21:01:59 2017 +0100 Commit: Domen Vrankar CommitDate: Sat Dec 9 12:50:28 2017 +0100 CPack: enable all CMake policies for generator scripts diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 91bf2f2..de1df3d 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -610,12 +610,7 @@ function(cpack_deb_prepare_package_vars) if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OR CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS) # Generating binary list - Get type of all install files - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" "${WDIR}/*") - cmake_policy(POP) + file(GLOB_RECURSE FILE_PATHS_ LIST_DIRECTORIES false RELATIVE "${WDIR}" "${WDIR}/*") find_program(FILE_EXECUTABLE file) if(NOT FILE_EXECUTABLE) @@ -931,13 +926,10 @@ function(cpack_deb_prepare_package_vars) if(CPACK_DEBIAN_ARCHIVE_TYPE) set(archive_types_ "paxr;gnutar") - cmake_policy(PUSH) - cmake_policy(SET CMP0057 NEW) - if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_) - message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported" - "type ${CPACK_DEBIAN_ARCHIVE_TYPE}") - endif() - cmake_policy(POP) + if(NOT CPACK_DEBIAN_ARCHIVE_TYPE IN_LIST archive_types_) + message(FATAL_ERROR "CPACK_DEBIAN_ARCHIVE_TYPE set to unsupported" + "type ${CPACK_DEBIAN_ARCHIVE_TYPE}") + endif() else() set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr") endif() @@ -1039,13 +1031,9 @@ function(cpack_deb_prepare_package_vars) set(CPACK_OUTPUT_FILE_NAME "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") else() - cmake_policy(PUSH) - cmake_policy(SET CMP0010 NEW) - if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)") - cmake_policy(POP) - message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!") - endif() - cmake_policy(POP) + if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)") + message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!") + endif() set(CPACK_OUTPUT_FILE_NAME "${CPACK_DEBIAN_FILE_NAME}") endif() diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index faa2df8..bb5181f 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -962,7 +962,6 @@ function(get_file_permissions FILE RETURN_VAR) ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - cmake_policy(SET CMP0007 NEW) string(REPLACE " " ";" permissions_ "${permissions_}") list(GET permissions_ 0 permissions_) @@ -1066,12 +1065,7 @@ function(cpack_rpm_prepare_relocation_paths) endforeach() # warn about all the paths that are not relocatable - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE FILE_PATHS_ "${WDIR}/*") - cmake_policy(POP) + file(GLOB_RECURSE FILE_PATHS_ "${WDIR}/*") foreach(TMP_PATH ${FILE_PATHS_}) string(LENGTH "${WDIR}" WDIR_LEN) string(SUBSTRING "${TMP_PATH}" ${WDIR_LEN} -1 TMP_PATH) @@ -1098,10 +1092,7 @@ endfunction() function(cpack_rpm_prepare_content_list) # get files list - cmake_policy(PUSH) - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE CPACK_RPM_INSTALL_FILES LIST_DIRECTORIES true RELATIVE "${WDIR}" "${WDIR}/*") - cmake_policy(POP) + file(GLOB_RECURSE CPACK_RPM_INSTALL_FILES LIST_DIRECTORIES true RELATIVE "${WDIR}" "${WDIR}/*") set(CPACK_RPM_INSTALL_FILES "/${CPACK_RPM_INSTALL_FILES}") string(REPLACE ";" ";/" CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}") @@ -1120,10 +1111,7 @@ function(cpack_rpm_prepare_content_list) set(_DISTINCT_PATH "${_RPM_RELOCATION_PREFIX}") string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS " ${_RPM_RELOCATION_PREFIX}") - cmake_policy(PUSH) - cmake_policy(SET CMP0007 NEW) - list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1) - cmake_policy(POP) + list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1) unset(_TMP_LIST) # Now generate all of the parent dirs of the relocation path foreach(_PREFIX_PATH_ELEM ${_CPACK_RPM_PACKAGE_PREFIX_ELEMS}) @@ -1608,7 +1596,6 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) endif() get_file_permissions("${WORKING_DIR}/${F}" permissions_) - cmake_policy(SET CMP0057 NEW) if(NOT "USER_EXECUTE" IN_LIST permissions_ AND NOT "GROUP_EXECUTE" IN_LIST permissions_ AND NOT "WORLD_EXECUTE" IN_LIST permissions_) @@ -1997,19 +1984,15 @@ function(cpack_rpm_generate_package) endif() if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) - cmake_policy(PUSH) - cmake_policy(SET CMP0057 NEW) - # Prefix can be replaced by Prefixes but the old version stil works so we'll ignore it for now - # Requires* is a special case because it gets transformed to Requires(pre/post/preun/postun) - # Auto* is a special case because the tags can not be queried by querytags rpmbuild flag - set(special_case_tags_ PREFIX REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN AUTOPROV AUTOREQ AUTOREQPROV) - if(NOT _RPM_SPEC_HEADER IN_LIST RPMBUILD_TAG_LIST AND NOT _RPM_SPEC_HEADER IN_LIST special_case_tags_) - cmake_policy(POP) - message(AUTHOR_WARNING "CPackRPM:Warning: ${_RPM_SPEC_HEADER} not " - "supported in provided rpmbuild. Tag will not be used.") - continue() - endif() - cmake_policy(POP) + # Prefix can be replaced by Prefixes but the old version stil works so we'll ignore it for now + # Requires* is a special case because it gets transformed to Requires(pre/post/preun/postun) + # Auto* is a special case because the tags can not be queried by querytags rpmbuild flag + set(special_case_tags_ PREFIX REQUIRES_PRE REQUIRES_POST REQUIRES_PREUN REQUIRES_POSTUN AUTOPROV AUTOREQ AUTOREQPROV) + if(NOT _RPM_SPEC_HEADER IN_LIST RPMBUILD_TAG_LIST AND NOT _RPM_SPEC_HEADER IN_LIST special_case_tags_) + message(AUTHOR_WARNING "CPackRPM:Warning: ${_RPM_SPEC_HEADER} not " + "supported in provided rpmbuild. Tag will not be used.") + continue() + endif() if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}") @@ -2301,12 +2284,9 @@ function(cpack_rpm_generate_package) continue() endif() - cmake_policy(PUSH) - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE files_for_move_ LIST_DIRECTORIES false RELATIVE - "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}" - "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/*") - cmake_policy(POP) + file(GLOB_RECURSE files_for_move_ LIST_DIRECTORIES false RELATIVE + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}" + "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${component_}/*") foreach(f_ IN LISTS files_for_move_) get_filename_component(dir_path_ "${f_}" DIRECTORY) @@ -2438,13 +2418,9 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} "CPACK_RPM_FILE_NAME") if(NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") if(CPACK_RPM_FILE_NAME) - cmake_policy(PUSH) - cmake_policy(SET CMP0010 NEW) - if(NOT CPACK_RPM_FILE_NAME MATCHES ".*\\.rpm") - cmake_policy(POP) - message(FATAL_ERROR "'${CPACK_RPM_FILE_NAME}' is not a valid RPM package file name as it must end with '.rpm'!") - endif() - cmake_policy(POP) + if(NOT CPACK_RPM_FILE_NAME MATCHES ".*\\.rpm") + message(FATAL_ERROR "'${CPACK_RPM_FILE_NAME}' is not a valid RPM package file name as it must end with '.rpm'!") + endif() else() # old file name format for back compatibility string(TOUPPER "${CPACK_RPM_MAIN_COMPONENT}" @@ -2762,13 +2738,8 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT endif() # find generated rpm files and take their names - cmake_policy(PUSH) - # Tell file(GLOB_RECURSE) not to follow directory symlinks - # even if the project does not set this policy to NEW. - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" - "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") - cmake_policy(POP) + file(GLOB_RECURSE GENERATED_FILES "${CPACK_RPM_DIRECTORY}/RPMS/*.rpm" + "${CPACK_RPM_DIRECTORY}/SRPMS/*.rpm") if(NOT GENERATED_FILES) message(FATAL_ERROR "RPM package was not generated! ${CPACK_RPM_DIRECTORY}") diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index be75a9f..ea0e899 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -17,6 +17,7 @@ #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmStateSnapshot.h" +#include "cmVersion.h" #include "cmWorkingDirectory.h" #include "cmXMLSafe.h" #include "cmake.h" @@ -988,10 +989,16 @@ int cmCPackGenerator::DoPackage() */ packageFileNames.push_back(tempPackageFileName ? tempPackageFileName : ""); toplevel = tempDirectory; - if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) { - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory" - << std::endl); - return 0; + { // scope that enables package generators to run internal scripts with + // latest CMake policies enabled + cmMakefile::ScopePushPop pp{ this->MakefileMap }; + this->MakefileMap->SetPolicyVersion(cmVersion::GetCMakeVersion()); + + if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory" + << std::endl); + return 0; + } } /* Prepare checksum algorithm*/ ----------------------------------------------------------------------- Summary of changes: Modules/CPackDeb.cmake | 28 +++++---------- Modules/CPackRPM.cmake | 69 +++++++++++-------------------------- Source/CPack/cmCPackGenerator.cxx | 15 +++++--- 3 files changed, 39 insertions(+), 73 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 12 00:05:10 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 12 Dec 2017 00:05:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-596-g62d8bff Message-ID: <20171212050510.CA601102DFF@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 62d8bff146b28c10c11ad7ef8114f8d06f2fcad8 (commit) from 9720c142559ad8b48326de1fb636ae66e1f74184 (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=62d8bff146b28c10c11ad7ef8114f8d06f2fcad8 commit 62d8bff146b28c10c11ad7ef8114f8d06f2fcad8 Author: Kitware Robot AuthorDate: Tue Dec 12 00:01:15 2017 -0500 Commit: Kitware Robot CommitDate: Tue Dec 12 00:01:15 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0ee6fb1..a28378a 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 10) -set(CMake_VERSION_PATCH 20171211) +set(CMake_VERSION_PATCH 20171212) #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 Dec 12 08:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 12 Dec 2017 08:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-608-gbd10c3c Message-ID: <20171212130507.B5C2B102CE8@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 bd10c3cf82f6e9d58b121498eaa2b9d8cc19dd2f (commit) via 77aab3e5155995fc224a1f81d241448de093cfe4 (commit) via 57199deafaca949e0588556ebf78bb9437e31365 (commit) via 1f5b2a8de93dc828d0cdc650478999133273c2c7 (commit) via e2303b257c0453033571ec20a767e9ab22308e8b (commit) via e4707048c01b28858237a21e614da56a696e9771 (commit) via ba6caafa42afb7fa2c7d8d0d49c73d79efee1e9c (commit) via adf491379549fbee522793ffda9a5d153cc9c3bb (commit) via 548e8f6ffedb57fcdee56633ba454ae0ddf38983 (commit) via de0035fdcccb4c8acc92bf1db0a76b3c1f18003f (commit) via 687a26b7023748cc98317eae53ee2ac3cc520bda (commit) via e770b1b86e7157db4191096f226a8b0175819cff (commit) from 62d8bff146b28c10c11ad7ef8114f8d06f2fcad8 (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=bd10c3cf82f6e9d58b121498eaa2b9d8cc19dd2f commit bd10c3cf82f6e9d58b121498eaa2b9d8cc19dd2f Merge: 77aab3e e2303b2 Author: Brad King AuthorDate: Tue Dec 12 08:04:19 2017 -0500 Commit: Brad King CommitDate: Tue Dec 12 08:04:19 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77aab3e5155995fc224a1f81d241448de093cfe4 commit 77aab3e5155995fc224a1f81d241448de093cfe4 Merge: 57199de adf4913 Author: Brad King AuthorDate: Tue Dec 12 13:03:52 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 12 08:03:57 2017 -0500 Merge topic 'FindPkgConfig_doc_cleanup' adf49137 FindPkgConfig: Cleanup docs Acked-by: Kitware Robot Merge-request: !1584 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57199deafaca949e0588556ebf78bb9437e31365 commit 57199deafaca949e0588556ebf78bb9437e31365 Merge: 1f5b2a8 e470704 Author: Brad King AuthorDate: Tue Dec 12 13:02:50 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 12 08:02:55 2017 -0500 Merge topic 'fix-iar-binutils-for-cxx' e4707048 IAR: FindBinUtils should work for CXX as well as C Acked-by: Kitware Robot Merge-request: !1572 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f5b2a8de93dc828d0cdc650478999133273c2c7 commit 1f5b2a8de93dc828d0cdc650478999133273c2c7 Merge: 62d8bff ba6caaf Author: Brad King AuthorDate: Tue Dec 12 13:02:25 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 12 08:02:33 2017 -0500 Merge topic 'fix-ctest-chrono' ba6caafa CTest: Use integer-representable value for "infinite" timeout 548e8f6f CTest: Simplify std::chrono::duration conversion to double de0035fd cmCTestBuildAndTestHandler: Convert timeout to std::chrono::duration 687a26b7 CTest: Fix regression in build-and-test timeout forwarding e770b1b8 CTest: Fix regression in build-and-test timeout compuatation Acked-by: Kitware Robot Acked-by: dublet Merge-request: !1574 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba6caafa42afb7fa2c7d8d0d49c73d79efee1e9c commit ba6caafa42afb7fa2c7d8d0d49c73d79efee1e9c Author: Brad King AuthorDate: Mon Dec 11 10:40:29 2017 -0500 Commit: Brad King CommitDate: Mon Dec 11 10:41:48 2017 -0500 CTest: Use integer-representable value for "infinite" timeout Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) changed out "infinite" timeout to a value not representable by a 64-bit integer. This causes undefined behavior when e.g. KWSys Process converts the duration to a `long` to interact with system APIs. Use the old `1.0e7` maximum value. diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index c76eb4e..dcb17d0 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -1,9 +1,5 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifdef _WIN32 -/* windows.h defines min() and max() macros that interfere. */ -#define NOMINMAX -#endif #include "cmCTestRunTest.h" #include "cmCTest.h" @@ -678,7 +674,7 @@ bool cmCTestRunTest::ForkProcess(std::chrono::duration testTimeOut, // determine how much time we have std::chrono::duration timeout = this->CTest->GetRemainingTimeAllowed(); - if (timeout != std::chrono::duration::max()) { + if (timeout != cmCTest::MaxDuration()) { timeout -= std::chrono::minutes(2); } if (this->CTest->GetTimeOut() > std::chrono::duration::zero() && @@ -702,7 +698,7 @@ bool cmCTestRunTest::ForkProcess(std::chrono::duration testTimeOut, this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": " << "Test timeout computed to be: " - << (timeout == std::chrono::duration::max() + << (timeout == cmCTest::MaxDuration() ? std::string("infinite") : std::to_string( std::chrono::duration_cast(timeout) diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 922f5c7..716ea10 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -1,12 +1,5 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ - -#ifdef _WIN32 -/* windows.h defines min() and max() macros, unless told to otherwise. This - * interferes with std::min() and std::max() at the very least. */ -#define NOMINMAX -#endif - #include "cmCTestScriptHandler.h" #include "cmsys/Directory.hxx" @@ -970,13 +963,13 @@ bool cmCTestScriptHandler::TryToRemoveBinaryDirectoryOnce( std::chrono::duration cmCTestScriptHandler::GetRemainingTimeAllowed() { if (!this->Makefile) { - return std::chrono::duration::max(); + return cmCTest::MaxDuration(); } const char* timelimitS = this->Makefile->GetDefinition("CTEST_TIME_LIMIT"); if (!timelimitS) { - return std::chrono::duration::max(); + return cmCTest::MaxDuration(); } auto timelimit = std::chrono::duration(atof(timelimitS)); diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 902f1ae..e48f64a 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1,11 +1,5 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifdef _WIN32 -/* windows.h defines min() and max() macros by default. This interferes with - * C++ functions names. - */ -#define NOMINMAX -#endif #include "cmCTest.h" #include "cm_curl.h" @@ -1089,7 +1083,7 @@ int cmCTest::RunTest(std::vector argv, std::string* output, // determine how much time we have std::chrono::duration timeout = this->GetRemainingTimeAllowed(); - if (timeout != std::chrono::duration::max()) { + if (timeout != cmCTest::MaxDuration()) { timeout -= std::chrono::minutes(2); } if (this->TimeOut > std::chrono::duration::zero() && @@ -1107,7 +1101,7 @@ int cmCTest::RunTest(std::vector argv, std::string* output, } cmCTestLog( this, HANDLER_VERBOSE_OUTPUT, "Test timeout computed to be: " - << (timeout == std::chrono::duration::max() + << (timeout == cmCTest::MaxDuration() ? std::string("infinite") : std::to_string( std::chrono::duration_cast(timeout) @@ -1130,7 +1124,7 @@ int cmCTest::RunTest(std::vector argv, std::string* output, // invocations. Since --build-generator is required this is a // good place to check for it, and to add the arguments in if (strcmp(i, "--build-generator") == 0 && - timeout != std::chrono::duration::max() && + timeout != cmCTest::MaxDuration() && timeout > std::chrono::duration::zero()) { args.push_back("--test-timeout"); std::ostringstream msg; @@ -2805,7 +2799,7 @@ void cmCTest::Log(int logType, const char* file, int line, const char* msg, std::chrono::duration cmCTest::GetRemainingTimeAllowed() { if (!this->GetHandler("script")) { - return std::chrono::duration::max(); + return cmCTest::MaxDuration(); } cmCTestScriptHandler* ch = @@ -2814,6 +2808,11 @@ std::chrono::duration cmCTest::GetRemainingTimeAllowed() return ch->GetRemainingTimeAllowed(); } +std::chrono::duration cmCTest::MaxDuration() +{ + return std::chrono::duration(1.0e7); +} + void cmCTest::OutputTestErrors(std::vector const& process_output) { std::string test_outputs("\n*** Test Failed:\n"); diff --git a/Source/cmCTest.h b/Source/cmCTest.h index ba94866..418d576 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -208,6 +208,8 @@ public: */ std::chrono::duration GetRemainingTimeAllowed(); + static std::chrono::duration MaxDuration(); + /** * Open file in the output directory and set the stream */ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adf491379549fbee522793ffda9a5d153cc9c3bb commit adf491379549fbee522793ffda9a5d153cc9c3bb Author: Craig Scott AuthorDate: Sun Dec 10 22:50:39 2017 +1100 Commit: Craig Scott CommitDate: Sun Dec 10 22:50:39 2017 +1100 FindPkgConfig: Cleanup docs - Moved block of misplaced comments to correct section - Improved grammar, readability and consistency - Updated to conform to style guidelines diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 76afa8a..aad3b74 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -1,19 +1,22 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# FindPkgConfig -# ------------- -# -# A `pkg-config` module for CMake. -# -# Finds the ``pkg-config`` executable and add the -# :command:`pkg_check_modules` and :command:`pkg_search_module` -# commands. -# -# In order to find the ``pkg-config`` executable, it uses the -# :variable:`PKG_CONFIG_EXECUTABLE` variable or the ``PKG_CONFIG`` -# environment variable first. +#[========================================[.rst: +FindPkgConfig +------------- + +A ``pkg-config`` module for CMake. + +Finds the ``pkg-config`` executable and adds the :command:`pkg_get_variable`, +:command:`pkg_check_modules` and :command:`pkg_search_module` commands. The +following variables will also be set:: + + PKG_CONFIG_FOUND ... if pkg-config executable was found + PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program + PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found + (since CMake 2.8.8) + +#]========================================] ### Common stuff #### set(PKG_CONFIG_VERSION 1) @@ -82,12 +85,13 @@ endmacro() #[========================================[.rst: .. command:: pkg_get_variable - Retrieves the value of a variable from a package:: + Retrieves the value of a pkg-config variable ``varName`` and stores it in the + result variable ``resultVar`` in the calling scope. :: - pkg_get_variable( ) + pkg_get_variable( ) - If multiple values are returned variable will contain a - :ref:`;-list `. + If ``pkg-config`` returns multiple values for the specified variable, + ``resultVar`` will contain a :ref:`;-list `. For example: @@ -472,117 +476,106 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma endif() endmacro() -### -### User visible macros start here -### #[========================================[.rst: .. command:: pkg_check_modules - Checks for all the given modules. :: + Checks for all the given modules, setting a variety of result variables in + the calling scope. :: - pkg_check_modules( [REQUIRED] [QUIET] - [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] + pkg_check_modules( + [REQUIRED] [QUIET] + [NO_CMAKE_PATH] + [NO_CMAKE_ENVIRONMENT_PATH] [IMPORTED_TARGET] - []*) - - - When the ``REQUIRED`` argument was set, macros will fail with an error - when module(s) could not be found. - - When the ``QUIET`` argument is set, no status messages will be printed. - - By default, if :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or - later, or if :variable:`PKG_CONFIG_USE_CMAKE_PREFIX_PATH` is set, the - :variable:`CMAKE_PREFIX_PATH`, :variable:`CMAKE_FRAMEWORK_PATH`, and - :variable:`CMAKE_APPBUNDLE_PATH` cache and environment variables will - be added to ``pkg-config`` search path. - The ``NO_CMAKE_PATH`` and ``NO_CMAKE_ENVIRONMENT_PATH`` arguments - disable this behavior for the cache variables and the environment - variables, respectively. - The ``IMPORTED_TARGET`` argument will create an imported target named - PkgConfig::> that can be passed directly as an argument to - :command:`target_link_libraries`. - - It sets the following variables: :: - - PKG_CONFIG_FOUND ... if pkg-config executable was found - PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program - PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found - (since CMake 2.8.8) - - For the following variables two sets of values exist; first one is the - common one and has the given PREFIX. The second set contains flags - which are given out when ``pkg-config`` was called with the ``--static`` - option. :: - - _FOUND ... set to 1 if module(s) exist - _LIBRARIES ... only the libraries (w/o the '-l') - _LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') - _LDFLAGS ... all required linker flags - _LDFLAGS_OTHER ... all other linker flags - _INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') - _CFLAGS ... all required cflags - _CFLAGS_OTHER ... the other compiler flags + [...]) + + When the ``REQUIRED`` argument is given, the command will fail with an error + if module(s) could not be found. + + When the ``QUIET`` argument is given, no status messages will be printed. + + By default, if :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or + later, or if :variable:`PKG_CONFIG_USE_CMAKE_PREFIX_PATH` is set to a + boolean ``True`` value, then the :variable:`CMAKE_PREFIX_PATH`, + :variable:`CMAKE_FRAMEWORK_PATH`, and :variable:`CMAKE_APPBUNDLE_PATH` cache + and environment variables will be added to the ``pkg-config`` search path. + The ``NO_CMAKE_PATH`` and ``NO_CMAKE_ENVIRONMENT_PATH`` arguments + disable this behavior for the cache variables and environment variables + respectively. + + The ``IMPORTED_TARGET`` argument will create an imported target named + ``PkgConfig::`` that can be passed directly as an argument to + :command:`target_link_libraries`. + + Each ```` must be in one of the following formats:: + + {moduleName} ... matches any version + {moduleName}>={version} ... at least version is required + {moduleName}={version} ... exactly version is required + {moduleName}<={version} ... modules must not be newer than + + The following variables may be set upon return. Two sets of values exist, + one for the common case (`` = ``) and another for the + information ``pkg-config`` provides when it is called with the ``--static`` + option (`` = _STATIC``):: + + _FOUND ... set to 1 if module(s) exist + _LIBRARIES ... only the libraries (without the '-l') + _LIBRARY_DIRS ... the paths of the libraries (without the '-L') + _LDFLAGS ... all required linker flags + _LDFLAGS_OTHER ... all other linker flags + _INCLUDE_DIRS ... the '-I' preprocessor flags (without the '-I') + _CFLAGS ... all required cflags + _CFLAGS_OTHER ... the other compiler flags + + All but ``_FOUND`` may be a :ref:`;-list ` if the + associated variable returned from ``pkg-config`` has multiple values. + + There are some special variables whose prefix depends on the number of + ```` given. When there is only one ````, + ```` will simply be ````, but if two or more ```` + items are given, ```` will be ``_``:: + + _VERSION ... version of the module + _PREFIX ... prefix directory of the module + _INCLUDEDIR ... include directory of the module + _LIBDIR ... lib directory of the module + + Examples - :: - - = for common case - = _STATIC for static linking - - Every variable containing multiple values will be a - :ref:`;-list `. - - There are some special variables whose prefix depends on the count of - given modules. When there is only one module, stays - unchanged. When there are multiple modules, the prefix will be - changed to _: :: - - _VERSION ... version of the module - _PREFIX ... prefix-directory of the module - _INCLUDEDIR ... include-dir of the module - _LIBDIR ... lib-dir of the module - - :: - - = when |MODULES| == 1, else - = _ - - A parameter can have the following formats: :: - - {MODNAME} ... matches any version - {MODNAME}>={VERSION} ... at least version is required - {MODNAME}={VERSION} ... exactly version is required - {MODNAME}<={VERSION} ... modules must not be newer than - - Examples + .. code-block:: cmake - .. code-block:: cmake + pkg_check_modules (GLIB2 glib-2.0) - pkg_check_modules (GLIB2 glib-2.0) + Looks for any version of glib2. If found, the output variable + ``GLIB2_VERSION`` will hold the actual version found. - .. code-block:: cmake + .. code-block:: cmake - pkg_check_modules (GLIB2 glib-2.0>=2.10) + pkg_check_modules (GLIB2 glib-2.0>=2.10) - Requires at least version 2.10 of glib2 and defines e.g. - ``GLIB2_VERSION=2.10.3`` + Looks for at least version 2.10 of glib2. If found, the output variable + ``GLIB2_VERSION`` will hold the actual version found. - .. code-block:: cmake + .. code-block:: cmake - pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) + pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) - Requires both glib2 and gtk2, and defines e.g. - ``FOO_glib-2.0_VERSION=2.10.3`` and ``FOO_gtk+-2.0_VERSION=2.8.20`` + Looks for both glib2-2.0 (at least version 2.10) and any version of + gtk2+-2.0. Only if both are found will ``FOO`` be considered found. + The ``FOO_glib-2.0_VERSION`` and ``FOO_gtk+-2.0_VERSION`` variables will be + set to their respective found module versions. - .. code-block:: cmake + .. code-block:: cmake pkg_check_modules (XRENDER REQUIRED xrender) - Defines for example:: + Requires any version of ``xrender``. Example output variables set by a + successful call:: - XRENDER_LIBRARIES=Xrender;X11`` - XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp + XRENDER_LIBRARIES=Xrender;X11 + XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp #]========================================] macro(pkg_check_modules _prefix _module0) _pkgconfig_parse_options(_pkg_modules _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN}) @@ -605,19 +598,22 @@ endmacro() #[========================================[.rst: .. command:: pkg_search_module - Same as :command:`pkg_check_modules`, but instead it checks for given - modules and uses the first working one. :: + The behavior of this command is the same as :command:`pkg_check_modules`, + except that rather than checking for all the specified modules, it searches + for just the first successful match. :: - pkg_search_module( [REQUIRED] [QUIET] - [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] + pkg_search_module( + [REQUIRED] [QUIET] + [NO_CMAKE_PATH] + [NO_CMAKE_ENVIRONMENT_PATH] [IMPORTED_TARGET] - []*) + [...]) - Examples + Examples - .. code-block:: cmake + .. code-block:: cmake - pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) + pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) #]========================================] macro(pkg_search_module _prefix _module0) _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN}) @@ -654,21 +650,26 @@ endmacro() #[========================================[.rst: -.. variable:: PKG_CONFIG_EXECUTABLE +Variables Affecting Behavior +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Path to the pkg-config executable. +.. variable:: PKG_CONFIG_EXECUTABLE + This can be set to the path of the pkg-config executable. If not provided, + it will be set by the module as a result of calling :command:`find_program` + internally. The ``PKG_CONFIG`` environment variable can be used as a hint. .. variable:: PKG_CONFIG_USE_CMAKE_PREFIX_PATH - Whether :command:`pkg_check_modules` and :command:`pkg_search_module` - should add the paths in :variable:`CMAKE_PREFIX_PATH`, - :variable:`CMAKE_FRAMEWORK_PATH`, and :variable:`CMAKE_APPBUNDLE_PATH` - cache and environment variables to ``pkg-config`` search path. + Specifies whether :command:`pkg_check_modules` and + :command:`pkg_search_module` should add the paths in the + :variable:`CMAKE_PREFIX_PATH`, :variable:`CMAKE_FRAMEWORK_PATH` and + :variable:`CMAKE_APPBUNDLE_PATH` cache and environment variables to the + ``pkg-config`` search path. - If this variable is not set, this behavior is enabled by default if - :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or later, disabled - otherwise. + If this variable is not set, this behavior is enabled by default if + :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` is 3.1 or later, disabled + otherwise. #]========================================] https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=548e8f6ffedb57fcdee56633ba454ae0ddf38983 commit 548e8f6ffedb57fcdee56633ba454ae0ddf38983 Author: Brad King AuthorDate: Fri Dec 8 08:22:15 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 11:09:49 2017 -0500 CTest: Simplify std::chrono::duration conversion to double The ratio of ticks to seconds for this type is 1, so we can just use its `count()` directly. This also avoids converting through the integer representation of `std::chrono::milliseconds`, which has a much smaller allowed range. Drop our `cmsysProcess_SetTimeout` wrapper as it is now very thin. diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 39b90d8..2a9fd72 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -11,7 +11,6 @@ #include "cmParseGTMCoverage.h" #include "cmParseJacocoCoverage.h" #include "cmParsePHPCoverage.h" -#include "cmProcess.h" #include "cmSystemTools.h" #include "cmWorkingDirectory.h" #include "cmXMLWriter.h" @@ -81,7 +80,7 @@ public: cmsysProcess_SetOption(this->Process, cmsysProcess_Option_HideWindow, 1); if (this->TimeOut >= std::chrono::duration::zero()) { - cmsysProcess_SetTimeout(this->Process, this->TimeOut); + cmsysProcess_SetTimeout(this->Process, this->TimeOut.count()); } cmsysProcess_Execute(this->Process); this->PipeState = cmsysProcess_GetState(this->Process); diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index a075649..c76eb4e 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -265,11 +265,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) passed = this->TestResult.Status == cmCTestTestHandler::COMPLETED; char buf[1024]; - sprintf(buf, "%6.2f sec", - double(std::chrono::duration_cast( - this->TestProcess->GetTotalTime()) - .count()) / - 1000.0); + sprintf(buf, "%6.2f sec", this->TestProcess->GetTotalTime().count()); cmCTestLog(this->CTest, HANDLER_OUTPUT, buf << "\n"); if (outputTestErrorsToConsole) { @@ -394,11 +390,7 @@ void cmCTestRunTest::ComputeWeightedCost() { double prev = static_cast(this->TestProperties->PreviousRuns); double avgcost = static_cast(this->TestProperties->Cost); - double current = - double(std::chrono::duration_cast( - this->TestResult.ExecutionTime) - .count()) / - 1000.0; + double current = this->TestResult.ExecutionTime.count(); if (this->TestResult.Status == cmCTestTestHandler::COMPLETED) { this->TestProperties->Cost = diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 1e15cc5..e5a0503 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -540,10 +540,8 @@ int cmCTestTestHandler::ProcessHandler() this->PrintLabelOrSubprojectSummary(false); } char realBuf[1024]; - auto durationInMs = std::chrono::duration_cast( - clock_finish - clock_start) - .count(); - sprintf(realBuf, "%6.2f sec", static_cast(durationInMs) / 1000.0); + std::chrono::duration durationInSecs = clock_finish - clock_start; + sprintf(realBuf, "%6.2f sec", durationInSecs.count()); cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nTotal Test time (real) = " << realBuf << "\n", this->Quiet); @@ -654,10 +652,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject) // only use labels found in labels if (labels.find(l) != labels.end()) { labelTimes[l] += - double(std::chrono::duration_cast( - result.ExecutionTime) - .count()) / - 1000.0 * result.Properties->Processors; + result.ExecutionTime.count() * result.Properties->Processors; ++labelCounts[l]; } } @@ -1327,11 +1322,7 @@ void cmCTestTestHandler::GenerateDartOutput(cmXMLWriter& xml) xml.StartElement("NamedMeasurement"); xml.Attribute("type", "numeric/double"); xml.Attribute("name", "Execution Time"); - xml.Element("Value", - double(std::chrono::duration_cast( - result.ExecutionTime) - .count()) / - 1000.0); + xml.Element("Value", result.ExecutionTime.count()); xml.EndElement(); // NamedMeasurement if (!result.Reason.empty()) { const char* reasonType = "Pass Reason"; diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 69ffb33..0db66c3 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -5,16 +5,6 @@ #include "cmProcessOutput.h" #include -void cmsysProcess_SetTimeout(cmsysProcess* process, - std::chrono::duration timeout) -{ - cmsysProcess_SetTimeout( - process, - double( - std::chrono::duration_cast(timeout).count()) / - 1000.0); -}; - cmProcess::cmProcess() { this->Process = nullptr; @@ -59,7 +49,7 @@ bool cmProcess::StartProcess() cmsysProcess_SetWorkingDirectory(this->Process, this->WorkingDirectory.c_str()); } - cmsysProcess_SetTimeout(this->Process, this->Timeout); + cmsysProcess_SetTimeout(this->Process, this->Timeout.count()); cmsysProcess_SetOption(this->Process, cmsysProcess_Option_MergeOutput, 1); cmsysProcess_Execute(this->Process); return (cmsysProcess_GetState(this->Process) == @@ -115,10 +105,7 @@ int cmProcess::GetNextOutputLine(std::string& line, { cmProcessOutput processOutput(cmProcessOutput::UTF8); std::string strdata; - double waitTimeout = - double( - std::chrono::duration_cast(timeout).count()) / - 1000.0; + double waitTimeout = timeout.count(); for (;;) { // Look for lines already buffered. if (this->Output.GetLine(line)) { @@ -240,7 +227,7 @@ int cmProcess::ReportStatus() void cmProcess::ChangeTimeout(std::chrono::duration t) { this->Timeout = t; - cmsysProcess_SetTimeout(this->Process, this->Timeout); + cmsysProcess_SetTimeout(this->Process, this->Timeout.count()); } void cmProcess::ResetStartTime() diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index cbb611d..f3b0bd7 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -10,13 +10,6 @@ #include #include -/* - * A wrapper function for cmsysProcess_SetTimeout that takes an - * std::chrono::duration. For convenience only. - */ -void cmsysProcess_SetTimeout(cmsysProcess* process, - std::chrono::duration timeout); - /** \class cmProcess * \brief run a process with c++ * diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index ed45644..902f1ae 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -50,7 +50,6 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmProcess.h" #include "cmProcessOutput.h" #include "cmState.h" #include "cmStateSnapshot.h" @@ -998,7 +997,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output, cmsysProcess_SetCommand(cp, &*argv.begin()); cmsysProcess_SetWorkingDirectory(cp, dir); cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); - cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_SetTimeout(cp, timeout.count()); cmsysProcess_Execute(cp); // Initialize tick's @@ -1186,7 +1185,7 @@ int cmCTest::RunTest(std::vector argv, std::string* output, cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); } - cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_SetTimeout(cp, timeout.count()); cmsysProcess_Execute(cp); char* data; @@ -2610,7 +2609,7 @@ bool cmCTest::RunCommand(std::vector const& args, if (cmSystemTools::GetRunCommandHideConsole()) { cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); } - cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_SetTimeout(cp, timeout.count()); cmsysProcess_Execute(cp); std::vector tempOutput; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de0035fdcccb4c8acc92bf1db0a76b3c1f18003f commit de0035fdcccb4c8acc92bf1db0a76b3c1f18003f Author: Brad King AuthorDate: Fri Dec 8 08:07:26 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 08:31:00 2017 -0500 cmCTestBuildAndTestHandler: Convert timeout to std::chrono::duration diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 672087d..85d98d0 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -11,6 +11,7 @@ #include "cmsys/Process.h" #include +#include #include cmCTestBuildAndTestHandler::cmCTestBuildAndTestHandler() @@ -18,7 +19,7 @@ cmCTestBuildAndTestHandler::cmCTestBuildAndTestHandler() this->BuildTwoConfig = false; this->BuildNoClean = false; this->BuildNoCMake = false; - this->Timeout = 0; + this->Timeout = std::chrono::duration::zero(); } void cmCTestBuildAndTestHandler::Initialize() @@ -224,10 +225,9 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) } for (std::string const& tar : this->BuildTargets) { std::chrono::duration remainingTime = std::chrono::seconds(0); - if (this->Timeout > 0) { - remainingTime = std::chrono::duration(this->Timeout) - - std::chrono::duration_cast( - std::chrono::steady_clock::now() - clock_start); + if (this->Timeout > std::chrono::duration::zero()) { + remainingTime = + this->Timeout - (std::chrono::steady_clock::now() - clock_start); if (remainingTime <= std::chrono::seconds(0)) { if (outstring) { *outstring = "--build-and-test timeout exceeded. "; @@ -324,10 +324,9 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) // how much time is remaining std::chrono::duration remainingTime = std::chrono::seconds(0); - if (this->Timeout > 0) { - remainingTime = std::chrono::duration(this->Timeout) - - std::chrono::duration_cast( - std::chrono::steady_clock::now() - clock_start); + if (this->Timeout > std::chrono::duration::zero()) { + remainingTime = + this->Timeout - (std::chrono::steady_clock::now() - clock_start); if (remainingTime <= std::chrono::seconds(0)) { if (outstring) { *outstring = "--build-and-test timeout exceeded. "; @@ -396,7 +395,7 @@ int cmCTestBuildAndTestHandler::ProcessCommandLineArguments( } if (currentArg.find("--test-timeout", 0) == 0 && idx < allArgs.size() - 1) { idx++; - this->Timeout = atof(allArgs[idx].c_str()); + this->Timeout = std::chrono::duration(atof(allArgs[idx].c_str())); } if (currentArg == "--build-generator" && idx < allArgs.size() - 1) { idx++; diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index f19cb67..f8a9ed7 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -7,6 +7,7 @@ #include "cmCTestGenericHandler.h" +#include #include #include #include @@ -67,7 +68,7 @@ protected: std::vector TestCommandArgs; std::vector BuildTargets; bool BuildNoCMake; - double Timeout; + std::chrono::duration Timeout; }; #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=687a26b7023748cc98317eae53ee2ac3cc520bda commit 687a26b7023748cc98317eae53ee2ac3cc520bda Author: Brad King AuthorDate: Fri Dec 8 07:33:39 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 07:33:39 2017 -0500 CTest: Fix regression in build-and-test timeout forwarding Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) changed out "infinite" timeout to a value not representable by a 64-bit integer. Update the `--build-and-test` forwarding of `--test-timeout` to not forward an "infinite" timeout. diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2cd60e5..ed45644 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1131,6 +1131,7 @@ int cmCTest::RunTest(std::vector argv, std::string* output, // invocations. Since --build-generator is required this is a // good place to check for it, and to add the arguments in if (strcmp(i, "--build-generator") == 0 && + timeout != std::chrono::duration::max() && timeout > std::chrono::duration::zero()) { args.push_back("--test-timeout"); std::ostringstream msg; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e770b1b86e7157db4191096f226a8b0175819cff commit e770b1b86e7157db4191096f226a8b0175819cff Author: Brad King AuthorDate: Fri Dec 8 07:04:36 2017 -0500 Commit: Brad King CommitDate: Fri Dec 8 07:14:05 2017 -0500 CTest: Fix regression in build-and-test timeout compuatation Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) accidentally changed the logic used to compute the timeout for a test when it starts. It incorrectly limits the maximum possible timeout to 2 minutes rather than 2 minutes less than the total allowed test time remaining. Update the new logic to restore the original behavior. Avoid subtracting 2 minutes from our "infinite" timeout value to avoid creating very large timeouts that are not "infinite" and may exceed integer type ranges. diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index a4ca301..2cd60e5 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1089,9 +1089,10 @@ int cmCTest::RunTest(std::vector argv, std::string* output, bool modifyEnv = (environment && !environment->empty()); // determine how much time we have - std::chrono::duration timeout = - std::min>(this->GetRemainingTimeAllowed(), - std::chrono::minutes(2)); + std::chrono::duration timeout = this->GetRemainingTimeAllowed(); + if (timeout != std::chrono::duration::max()) { + timeout -= std::chrono::minutes(2); + } if (this->TimeOut > std::chrono::duration::zero() && this->TimeOut < timeout) { timeout = this->TimeOut; ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/IAR-FindBinUtils.cmake | 4 +- Modules/FindPkgConfig.cmake | 251 ++++++++++++++------------- Source/CTest/cmCTestBuildAndTestHandler.cxx | 19 +- Source/CTest/cmCTestBuildAndTestHandler.h | 3 +- Source/CTest/cmCTestCoverageHandler.cxx | 3 +- Source/CTest/cmCTestRunTest.cxx | 20 +-- Source/CTest/cmCTestScriptHandler.cxx | 11 +- Source/CTest/cmCTestTestHandler.cxx | 17 +- Source/CTest/cmProcess.cxx | 19 +- Source/CTest/cmProcess.h | 7 - Source/cmCTest.cxx | 30 ++-- Source/cmCTest.h | 2 + 12 files changed, 170 insertions(+), 216 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 12 08:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 12 Dec 2017 08:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-27-ge2303b2 Message-ID: <20171212130507.BEFE0101DAC@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 e2303b257c0453033571ec20a767e9ab22308e8b (commit) via e4707048c01b28858237a21e614da56a696e9771 (commit) from 3efc6ad2a2210b943e6307766c9a107eddd96540 (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/Compiler/IAR-FindBinUtils.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 13 00:05:23 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 13 Dec 2017 00:05:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-609-gc977342 Message-ID: <20171213050524.71FEFFFFF8@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 c97734280f5e5f2eab588b7b9f177a8e7f19c042 (commit) from bd10c3cf82f6e9d58b121498eaa2b9d8cc19dd2f (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=c97734280f5e5f2eab588b7b9f177a8e7f19c042 commit c97734280f5e5f2eab588b7b9f177a8e7f19c042 Author: Kitware Robot AuthorDate: Wed Dec 13 00:01:27 2017 -0500 Commit: Kitware Robot CommitDate: Wed Dec 13 00:01:27 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a28378a..ddb7826 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 10) -set(CMake_VERSION_PATCH 20171212) +set(CMake_VERSION_PATCH 20171213) #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 Dec 13 07:55:21 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 13 Dec 2017 07:55:21 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-622-ga363c93 Message-ID: <20171213125521.C7A2410150D@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 a363c9356d60ea2cfdae7bd8a35b87cac463c4fc (commit) via f0b3fab179d0ebad7e0bcc6e564d989f992bcb84 (commit) via 95e86eafd71928dbdcdcd135951a172891eb6189 (commit) via 3395aec7b8d8242d1eb6c18b57aa4cbab3e9c6bc (commit) via 372dc9b0879d36e4017122ab0e7c7fd63a0763d5 (commit) via 4dae55fb70de42c2b55676f78ea7f0c6c8ad51b4 (commit) via d1d8719f623fe570142c67bf8d54c43f31355262 (commit) via 834d1878415fddb04b388b042dba7ce55a9a8a5d (commit) via c6a83ecf1761eea8d0907ea9d8913fe56029a00d (commit) via a6005371b05eff6104cd94848c610cd7af841ab6 (commit) via 362a1f336d29fb315db937dcce4dbd894bbffd2d (commit) via c365a0787058e41f0e96f4dd2447cb71a17f7696 (commit) via c62ffdcd4f6f638a7d57221528ffbe112887c1b4 (commit) from c97734280f5e5f2eab588b7b9f177a8e7f19c042 (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=a363c9356d60ea2cfdae7bd8a35b87cac463c4fc commit a363c9356d60ea2cfdae7bd8a35b87cac463c4fc Merge: f0b3fab d1d8719 Author: Brad King AuthorDate: Wed Dec 13 12:51:34 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 13 07:52:54 2017 -0500 Merge topic 'findmpi-builtin-fix' d1d8719f FindMPI: Fix various legacy problems Acked-by: Kitware Robot Merge-request: !1569 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0b3fab179d0ebad7e0bcc6e564d989f992bcb84 commit f0b3fab179d0ebad7e0bcc6e564d989f992bcb84 Merge: 95e86ea 4dae55f Author: Brad King AuthorDate: Wed Dec 13 12:50:46 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 13 07:50:52 2017 -0500 Merge topic 'irsl-msvc-omp-fix' 4dae55fb IRSL: Fix MSVC variable deferencing Acked-by: Kitware Robot Merge-request: !1588 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95e86eafd71928dbdcdcd135951a172891eb6189 commit 95e86eafd71928dbdcdcd135951a172891eb6189 Merge: 3395aec a600537 Author: Brad King AuthorDate: Wed Dec 13 12:49:46 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 13 07:50:02 2017 -0500 Merge topic 'FindPerlLibs-MacOS-failure' a6005371 FindPerlLibs: Add support for MSYS and CYGWIN 362a1f33 FindPerlLibs: refactoring c365a078 FindPerlLibs: fix MacOS failure Acked-by: Kitware Robot Merge-request: !1586 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3395aec7b8d8242d1eb6c18b57aa4cbab3e9c6bc commit 3395aec7b8d8242d1eb6c18b57aa4cbab3e9c6bc Merge: 372dc9b c62ffdc Author: Brad King AuthorDate: Wed Dec 13 12:49:04 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 13 07:49:18 2017 -0500 Merge topic 'use-std-string' c62ffdcd cmIDEOptions: use std::string instead of const char* Acked-by: Kitware Robot Merge-request: !1580 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=372dc9b0879d36e4017122ab0e7c7fd63a0763d5 commit 372dc9b0879d36e4017122ab0e7c7fd63a0763d5 Merge: c977342 834d187 Author: Brad King AuthorDate: Wed Dec 13 12:48:13 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 13 07:48:29 2017 -0500 Merge topic 'update-kwsys' 834d1878 Merge branch 'upstream-KWSys' into update-kwsys c6a83ecf KWSys 2017-12-12 (3ba214b7) Acked-by: Kitware Robot Merge-request: !1587 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dae55fb70de42c2b55676f78ea7f0c6c8ad51b4 commit 4dae55fb70de42c2b55676f78ea7f0c6c8ad51b4 Author: Christian Pfeiffer AuthorDate: Tue Dec 12 15:15:00 2017 +0100 Commit: Christian Pfeiffer CommitDate: Tue Dec 12 15:16:38 2017 +0100 IRSL: Fix MSVC variable deferencing Fixes: #17529 diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 1ba4877..f62bd09 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -56,10 +56,13 @@ # Specify the :command:`install(PROGRAMS)` command ``COMPONENT`` # option. If not specified, no such option will be used. +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced + set(_IRSL_HAVE_Intel FALSE) set(_IRSL_HAVE_MSVC FALSE) foreach(LANG IN ITEMS C CXX Fortran) - if(CMAKE_${LANG}_COMPILER_ID STREQUAL Intel) + if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Intel") if(NOT _IRSL_HAVE_Intel) get_filename_component(_Intel_basedir "${CMAKE_${LANG}_COMPILER}" PATH) if(CMAKE_SIZEOF_VOID_P EQUAL 8) @@ -81,7 +84,7 @@ foreach(LANG IN ITEMS C CXX Fortran) endif() set(_IRSL_HAVE_Intel TRUE) endif() - elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL MSVC) + elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "MSVC") set(_IRSL_HAVE_MSVC TRUE) endif() endforeach() @@ -740,3 +743,5 @@ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) ) endif() endif() + +cmake_policy(POP) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1d8719f623fe570142c67bf8d54c43f31355262 commit d1d8719f623fe570142c67bf8d54c43f31355262 Author: Christian Pfeiffer AuthorDate: Thu Dec 7 15:55:02 2017 +0100 Commit: Christian Pfeiffer CommitDate: Tue Dec 12 14:20:02 2017 +0100 FindMPI: Fix various legacy problems This MR fixes a number of bugs stemming from legacy variable handling, partially introduced by commit v3.10.0-rc1~103^2 (FindMPI: Add support for FreeBSD and SLES, 2017-08-09). * `MPI_COMPILE_OPTIONS` and `MPI_COMPILE_DEFINITIONS` legacy hints were not passed correctly. * Legacy variables could be parsed after they were set by `FindMPI` cause erroneous hinting on subsequent runs. * In the case of the compiler supporting MPI implicitly: * not all consumption variables would be correctly reset. * `MPI__HEADER_DIR` would be set unintentionally. * `MPI__LIB_NAMES` appeared in cache despite being ignored. * on subsequent passes, `MPI__COMPILER` could be corrupted. * the C-to-CXX copy logic would take place even if `MPI_SKIP_GUESSING` was turned on * if only some language compilers were given, inconsistent search behavior could be observed Issue: #17538 diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 0a011af..22493f6 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -602,9 +602,6 @@ function (_MPI_interrogate_compiler lang) if(MPI_DIRECT_LIB_NAMES_WORK) set(MPI_PLAIN_LIB_NAMES_WORK "${MPI_DIRECT_LIB_NAMES_WORK};${MPI_PLAIN_LIB_NAMES_WORK}") endif() - if(MPI_${LANG}_EXTRA_LIB_NAMES) - list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") - endif() # MPI might require pthread to work. The above mechanism wouldn't detect it, but we need to # link it in that case. -lpthread is covered by the normal library treatment on the other hand. @@ -617,6 +614,16 @@ function (_MPI_interrogate_compiler lang) endif() endif() + if(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS}") + endif() + if(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + list(APPEND MPI_COMPILE_OPTIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_OPTIONS}") + endif() + if(MPI_${LANG}_EXTRA_LIB_NAMES) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") + endif() + # If we found MPI, set up all of the appropriate cache entries if(NOT MPI_${LANG}_COMPILE_OPTIONS) set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_COMPILE_OPTIONS_WORK} CACHE STRING "MPI ${LANG} compilation options" FORCE) @@ -825,33 +832,43 @@ endfunction() macro(_MPI_assemble_libraries LANG) set(MPI_${LANG}_LIBRARIES "") - foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) - list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) - endforeach() + # Only for libraries do we need to check whether the compiler's linking stage is separate. + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS_IMPLICIT) + foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) + endforeach() + endif() endmacro() macro(_MPI_assemble_include_dirs LANG) - set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") - if("${LANG}" MATCHES "(C|CXX)") - if(MPI_${LANG}_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") - endif() - else() # Fortran - if(MPI_${LANG}_F77_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + set(MPI_${LANG}_INCLUDE_DIRS "") + else() + set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") + if("${LANG}" MATCHES "(C|CXX)") + if(MPI_${LANG}_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + else() # Fortran + if(MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + endif() + if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + endif() endif() - if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + foreach(MPI_ADDITIONAL_INC_DIR IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${MPI_ADDITIONAL_INC_DIR}_INCLUDE_DIR}") + endforeach() endif() endif() - if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - foreach(mpiadditionalinclude IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${mpiadditionalinclude}_INCLUDE_DIR}") - endforeach() - endif() endmacro() function(_MPI_split_include_dirs LANG) + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + return() + endif() # Backwards compatibility: Search INCLUDE_PATH if given. if(MPI_${LANG}_INCLUDE_PATH) list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}") @@ -887,6 +904,13 @@ function(_MPI_split_include_dirs LANG) endif() mark_as_advanced(MPI_${LANG}_F77_HEADER_DIR MPI_${LANG}_MODULE_DIR) endif() + # Remove duplicates and default system directories from the list. + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_DUPLICATES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + foreach(MPI_IMPLICIT_INC_DIR IN LISTS CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_IMPLICIT_INC_DIR}) + endforeach() + endif() set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories" FORCE) endfunction() @@ -1016,7 +1040,7 @@ elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "FreeBSD") # FreeBSD ships mpich under the normal system paths - but available openmpi implementations # will be found in /usr/local/mpi/ - MPI_search_mpi_prefix_folder("/usr/local/mpi/") + MPI_search_mpi_prefix_folder("/usr/local/mpi") endif() # Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for. @@ -1052,51 +1076,54 @@ mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXE # # Once we find the new variables, we translate them back into their old # equivalents below. -foreach (LANG IN ITEMS C CXX) - # Old input variables. - set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) - - # Set new vars based on their old equivalents, if the new versions are not already set. - foreach (var ${_MPI_OLD_INPUT_VARS}) - if (NOT MPI_${LANG}_${var} AND MPI_${var}) - set(MPI_${LANG}_${var} "${MPI_${var}}") - endif() - endforeach() - - # Chop the old compile flags into options and definitions - if(MPI_${LANG}_COMPILE_FLAGS) - unset(MPI_${LANG}_COMPILE_OPTIONS) - unset(MPI_${LANG}_COMPILE_DEFINITIONS) - separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") - foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) - if("${_MPI_FLAG}" MATCHES "^ *[-/D]([^ ]+)") - list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") - else() - list(APPEND MPI_${LANG}_COMPILE_FLAGS "${_MPI_FLAG}") +if(NOT MPI_IGNORE_LEGACY_VARIABLES) + foreach (LANG IN ITEMS C CXX) + # Old input variables. + set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) + + # Set new vars based on their old equivalents, if the new versions are not already set. + foreach (var ${_MPI_OLD_INPUT_VARS}) + if (NOT MPI_${LANG}_${var} AND MPI_${var}) + set(MPI_${LANG}_${var} "${MPI_${var}}") endif() endforeach() - unset(MPI_SEPARATE_FLAGS) - endif() - # If a list of libraries was given, we'll split it into new-style cache variables - unset(MPI_${LANG}_EXTRA_LIB_NAMES) - if(NOT MPI_${LANG}_LIB_NAMES) - foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) - if(_MPI_LIB) - get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) - get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) - get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) - list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") - find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY - NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" - HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} - DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" - ) - mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) - endif() - endforeach() - endif() -endforeach() + # Chop the old compile flags into options and definitions + + unset(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + unset(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + if(MPI_${LANG}_COMPILE_FLAGS) + separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") + foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) + if("${_MPI_FLAG}" MATCHES "^ *[-/D]([^ ]+)") + list(APPEND MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") + else() + list(APPEND MPI_${LANG}_EXTRA_COMPILE_OPTIONS "${_MPI_FLAG}") + endif() + endforeach() + unset(MPI_SEPARATE_FLAGS) + endif() + + # If a list of libraries was given, we'll split it into new-style cache variables + unset(MPI_${LANG}_EXTRA_LIB_NAMES) + if(NOT MPI_${LANG}_LIB_NAMES) + foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) + if(_MPI_LIB) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endif() + endforeach() + endif() + endforeach() +endif() #============================================================================= unset(MPI_VERSION) @@ -1105,6 +1132,11 @@ unset(MPI_VERSION_MINOR) unset(_MPI_MIN_VERSION) +# If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. +if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) + set(MPI_SKIP_COMPILER_WRAPPER TRUE) +endif() + # This loop finds the compilers and sends them off for interrogation. foreach(LANG IN ITEMS C CXX Fortran) if(CMAKE_${LANG}_COMPILER_LOADED) @@ -1126,6 +1158,8 @@ foreach(LANG IN ITEMS C CXX Fortran) mark_as_advanced(MPI_CXX_SKIP_MPICXX) endif() if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS))) + set(MPI_${LANG}_TRIED_IMPLICIT FALSE) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) if(NOT MPI_${LANG}_COMPILER AND NOT MPI_ASSUME_NO_BUILTIN_MPI) # Should the imported targets be empty, we effectively try whether the compiler supports MPI on its own, which is the case on e.g. # Cray PrgEnv. @@ -1135,80 +1169,90 @@ foreach(LANG IN ITEMS C CXX Fortran) # If the compiler can build MPI code on its own, it functions as an MPI compiler and we'll set the variable to point to it. if(MPI_${LANG}_WORKS) set(MPI_${LANG}_COMPILER "${CMAKE_${LANG}_COMPILER}" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) endif() + set(MPI_${LANG}_TRIED_IMPLICIT TRUE) endif() - # If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. - if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) - set(MPI_SKIP_COMPILER_WRAPPER TRUE) - endif() - if(NOT MPI_SKIP_COMPILER_WRAPPER) - if(MPI_${LANG}_COMPILER) - # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. - if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") - # Get rid of our default list of names and just search for the name the user wants. - set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") - unset(MPI_${LANG}_COMPILER CACHE) + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WRAPPER_FOUND FALSE) + set(MPI_PINNED_COMPILER FALSE) + + if(NOT MPI_SKIP_COMPILER_WRAPPER) + if(MPI_${LANG}_COMPILER) + # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. + if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") + # Get rid of our default list of names and just search for the name the user wants. + set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") + unset(MPI_${LANG}_COMPILER CACHE) + endif() + # If the user specifies a compiler, we don't want to try to search libraries either. + set(MPI_PINNED_COMPILER TRUE) + endif() + + # If we have an MPI base directory, we'll try all compiler names in that one first. + # This should prevent mixing different MPI environments + if(_MPI_BASE_DIR) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${_MPI_BASE_DIR} + NO_DEFAULT_PATH + DOC "MPI compiler for ${LANG}" + ) endif() - # If the user specifies a compiler, we don't want to try to search libraries either. - set(MPI_PINNED_COMPILER TRUE) - else() - set(MPI_PINNED_COMPILER FALSE) - endif() - # If we have an MPI base directory, we'll try all compiler names in that one first. - # This should prevent mixing different MPI environments - if(_MPI_BASE_DIR) + # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), + # we shall try searching in the default paths. find_program(MPI_${LANG}_COMPILER NAMES ${_MPI_${LANG}_COMPILER_NAMES} PATH_SUFFIXES bin sbin - HINTS ${_MPI_BASE_DIR} - NO_DEFAULT_PATH DOC "MPI compiler for ${LANG}" ) - endif() - # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), - # we shall try searching in the default paths. - find_program(MPI_${LANG}_COMPILER - NAMES ${_MPI_${LANG}_COMPILER_NAMES} - PATH_SUFFIXES bin sbin - DOC "MPI compiler for ${LANG}" - ) - - if(MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) - set(MPI_SKIP_GUESSING TRUE) - elseif(MPI_${LANG}_COMPILER) - _MPI_interrogate_compiler(${LANG}) - else() - set(MPI_${LANG}_WRAPPER_FOUND FALSE) + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + set(MPI_PINNED_COMPILER TRUE) + + # If we haven't made the implicit compiler test yet, perform it now. + if(NOT MPI_${LANG}_TRIED_IMPLICIT) + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG}) + endif() + + # Should the MPI compiler not work implicitly for MPI, still interrogate it. + # Otherwise, MPI compilers for which CMake has separate linking stages, e.g. Intel MPI on Windows where link.exe is being used + # directly during linkage instead of CMAKE__COMPILER will not work. + if(NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) + _MPI_interrogate_compiler(${LANG}) + else() + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + endif() + elseif(MPI_${LANG}_COMPILER) + _MPI_interrogate_compiler(${LANG}) + endif() endif() - else() - set(MPI_${LANG}_WRAPPER_FOUND FALSE) - set(MPI_PINNED_COMPILER FALSE) - endif() - if(NOT MPI_${LANG}_WRAPPER_FOUND AND NOT MPI_PINNED_COMPILER) - # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the - # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. - if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) - set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) - set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") - set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) - set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) - set(MPI_${LANG}_WRAPPER_FOUND TRUE) - elseif(NOT MPI_SKIP_GUESSING) - _MPI_guess_settings(${LANG}) + if(NOT MPI_SKIP_GUESSING AND NOT MPI_${LANG}_WRAPPER_FOUND AND NOT MPI_PINNED_COMPILER) + # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the + # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. + if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") + set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) + set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) + else() + _MPI_guess_settings(${LANG}) + endif() endif() endif() endif() _MPI_split_include_dirs(${LANG}) - if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) - _MPI_assemble_include_dirs(${LANG}) - _MPI_assemble_libraries(${LANG}) - endif() + _MPI_assemble_include_dirs(${LANG}) + _MPI_assemble_libraries(${LANG}) + _MPI_adjust_compile_definitions(${LANG}) # We always create imported targets even if they're empty _MPI_create_imported_target(${LANG}) @@ -1222,7 +1266,9 @@ foreach(LANG IN ITEMS C CXX Fortran) set(MPI_${LANG}_COMPILE_DEFINITIONS "" CACHE STRING "MPI ${LANG} compilation definitions" ) set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} additional include directories") set(MPI_${LANG}_LINK_FLAGS "" CACHE STRING "MPI ${LANG} linker flags" ) - set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + endif() mark_as_advanced(MPI_${LANG}_COMPILE_OPTIONS MPI_${LANG}_COMPILE_DEFINITIONS MPI_${LANG}_LINK_FLAGS MPI_${LANG}_LIB_NAMES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS MPI_${LANG}_COMPILER) @@ -1453,6 +1499,7 @@ if (MPI_NUMLIBS GREATER 1) else() set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") endif() +set(MPI_IGNORE_LEGACY_VARIABLES TRUE) #============================================================================= # unset these vars to cleanup namespace https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=834d1878415fddb04b388b042dba7ce55a9a8a5d commit 834d1878415fddb04b388b042dba7ce55a9a8a5d Merge: 62d8bff c6a83ec Author: Brad King AuthorDate: Tue Dec 12 07:51:51 2017 -0500 Commit: Brad King CommitDate: Tue Dec 12 07:51:51 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-12-12 (3ba214b7) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6a83ecf1761eea8d0907ea9d8913fe56029a00d commit c6a83ecf1761eea8d0907ea9d8913fe56029a00d Author: KWSys Upstream AuthorDate: Tue Dec 12 07:08:43 2017 -0500 Commit: Brad King CommitDate: Tue Dec 12 07:51:50 2017 -0500 KWSys 2017-12-12 (3ba214b7) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 3ba214b7963fdd59f6f230c100550f9c5aa3deab (master). Upstream Shortlog ----------------- Gregor Jasny (1): 8e029751 SystemTools: Fix IsSubDirectory for subdirs of drive root diff --git a/SystemTools.cxx b/SystemTools.cxx index 50aa857..649f30b 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -4234,11 +4234,16 @@ bool SystemTools::IsSubDirectory(const std::string& cSubdir, std::string dir = cDir; SystemTools::ConvertToUnixSlashes(subdir); SystemTools::ConvertToUnixSlashes(dir); - if (subdir.size() > dir.size() && subdir[dir.size()] == '/') { - std::string s = subdir.substr(0, dir.size()); - return SystemTools::ComparePath(s, dir); + if (subdir.size() <= dir.size() || dir.empty()) { + return false; } - return false; + bool isRootPath = *dir.rbegin() == '/'; // like "/" or "C:/" + size_t expectedSlashPosition = isRootPath ? dir.size() - 1u : dir.size(); + if (subdir[expectedSlashPosition] != '/') { + return false; + } + std::string s = subdir.substr(0, dir.size()); + return SystemTools::ComparePath(s, dir); } void SystemTools::Delay(unsigned int msec) diff --git a/testSystemTools.cxx b/testSystemTools.cxx index 3b694c9..a6af9cc 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -813,6 +813,39 @@ static bool CheckFind() return res; } +static bool CheckIsSubDirectory() +{ + bool res = true; + + if (kwsys::SystemTools::IsSubDirectory("/foo", "/") == false) { + std::cerr << "Problem with IsSubDirectory (root - unix): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("c:/foo", "c:/") == false) { + std::cerr << "Problem with IsSubDirectory (root - dos): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/foo/bar", "/foo") == false) { + std::cerr << "Problem with IsSubDirectory (deep): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/foo", "/foo") == true) { + std::cerr << "Problem with IsSubDirectory (identity): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/fooo", "/foo") == true) { + std::cerr << "Problem with IsSubDirectory (substring): " << std::endl; + res = false; + } + if (kwsys::SystemTools::IsSubDirectory("/foo/", "/foo") == true) { + std::cerr << "Problem with IsSubDirectory (prepended slash): " + << std::endl; + res = false; + } + + return res; +} + static bool CheckGetLineFromStream() { const std::string fileWithFiveCharsOnFirstLine(TEST_SYSTEMTOOLS_SOURCE_DIR @@ -897,6 +930,8 @@ int testSystemTools(int, char* []) res &= CheckFind(); + res &= CheckIsSubDirectory(); + res &= CheckGetLineFromStream(); res &= CheckGetFilenameName(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6005371b05eff6104cd94848c610cd7af841ab6 commit a6005371b05eff6104cd94848c610cd7af841ab6 Author: Marc Chevrier AuthorDate: Tue Dec 12 11:42:28 2017 +0100 Commit: Marc Chevrier CommitDate: Tue Dec 12 11:42:28 2017 +0100 FindPerlLibs: Add support for MSYS and CYGWIN diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake index 86d5774..0b902e7 100644 --- a/Modules/FindPerlLibs.cmake +++ b/Modules/FindPerlLibs.cmake @@ -107,6 +107,11 @@ if (PERL_EXECUTABLE) if (NOT PERL_POSSIBLE_LIBRARY_NAMES) set(PERL_POSSIBLE_LIBRARY_NAMES perl${PERL_VERSION_STRING} perl) endif() + if (CMAKE_SYSTEM_NAME MATCHES "MSYS|CYGWIN") + # on MSYS and CYGWIN environments, current perl -V:libperl gives shared library name + # rather than the import library. So, extends possible library names + list (APPEND PERL_POSSIBLE_LIBRARY_NAMES perl) + endif() ### PERL_INCLUDE_PATH find_path(PERL_INCLUDE_PATH https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=362a1f336d29fb315db937dcce4dbd894bbffd2d commit 362a1f336d29fb315db937dcce4dbd894bbffd2d Author: Marc Chevrier AuthorDate: Tue Dec 12 09:41:16 2017 +0100 Commit: Marc Chevrier CommitDate: Tue Dec 12 09:41:16 2017 +0100 FindPerlLibs: refactoring Use a dedicated function (perl_get_info) to retrieve various configuration information diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake index 2767325..86d5774 100644 --- a/Modules/FindPerlLibs.cmake +++ b/Modules/FindPerlLibs.cmake @@ -33,6 +33,7 @@ # :: # # PERL_SITESEARCH = path to the sitesearch install dir (-V:installsitesearch) +# PERL_SITEARCH = path to the sitelib install directory (-V:installsitearch) # PERL_SITELIB = path to the sitelib install directory (-V:installsitelib) # PERL_VENDORARCH = path to the vendor arch install directory (-V:installvendorarch) # PERL_VENDORLIB = path to the vendor lib install directory (-V:installvendorlib) @@ -46,182 +47,74 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPerl.cmake) if (PERL_EXECUTABLE) - ### PERL_PREFIX - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:prefix - OUTPUT_VARIABLE - PERL_PREFIX_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_PREFIX_RESULT_VARIABLE - ) - if (NOT PERL_PREFIX_RESULT_VARIABLE) - string(REGEX REPLACE "prefix='([^']+)'.*" "\\1" PERL_PREFIX ${PERL_PREFIX_OUTPUT_VARIABLE}) - endif () + function (perl_get_info _pgi_info tag) + cmake_parse_arguments(_PGI "IS_PATH" "" "" ${ARGN}) - ### PERL_ARCHNAME - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:archname - OUTPUT_VARIABLE - PERL_ARCHNAME_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_ARCHNAME_RESULT_VARIABLE - ) - if (NOT PERL_ARCHNAME_RESULT_VARIABLE) - string(REGEX REPLACE "archname='([^']+)'.*" "\\1" PERL_ARCHNAME ${PERL_ARCHNAME_OUTPUT_VARIABLE}) - endif () + set (${_pgi_info} NOTFOUND PARENT_SCOPE) + execute_process(COMMAND "${PERL_EXECUTABLE}" -V:${tag} + OUTPUT_VARIABLE result + RESULT_VARIABLE status) + if (NOT status) + string(REGEX REPLACE "${tag}='([^']*)'.*" "\\1" result "${result}") + if (_PGI_IS_PATH) + file(TO_CMAKE_PATH "${result}" result) + endif() + set (${_pgi_info} "${result}" PARENT_SCOPE) + endif () + endfunction() + + ### PERL_PREFIX + perl_get_info(PERL_PREFIX prefix IS_PATH) + + ### PERL_ARCHNAME + perl_get_info(PERL_ARCHNAME archname) ### PERL_EXTRA_C_FLAGS - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:cppflags - OUTPUT_VARIABLE - PERL_CPPFLAGS_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_CPPFLAGS_RESULT_VARIABLE - ) - if (NOT PERL_CPPFLAGS_RESULT_VARIABLE) - string(REGEX REPLACE "cppflags='([^']+)'.*" "\\1" PERL_EXTRA_C_FLAGS ${PERL_CPPFLAGS_OUTPUT_VARIABLE}) - endif () + perl_get_info(PERL_EXTRA_C_FLAGS cppflags) ### PERL_SITESEARCH - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installsitesearch - OUTPUT_VARIABLE - PERL_SITESEARCH_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_SITESEARCH_RESULT_VARIABLE - ) - if (NOT PERL_SITESEARCH_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_SITESEARCH ${PERL_SITESEARCH_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_SITESEARCH}" PERL_SITESEARCH) - endif () + perl_get_info(PERL_SITESEARCH installsitesearch IS_PATH) + + ### PERL_SITEARCH + perl_get_info(PERL_SITEARCH installsitearch IS_PATH) ### PERL_SITELIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installsitelib - OUTPUT_VARIABLE - PERL_SITELIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_SITELIB_RESULT_VARIABLE - ) - if (NOT PERL_SITELIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_SITELIB ${PERL_SITELIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_SITELIB}" PERL_SITELIB) - endif () + perl_get_info(PERL_SITELIB installsitelib IS_PATH) ### PERL_VENDORARCH - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installvendorarch - OUTPUT_VARIABLE - PERL_VENDORARCH_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_VENDORARCH_RESULT_VARIABLE - ) - if (NOT PERL_VENDORARCH_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORARCH ${PERL_VENDORARCH_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_VENDORARCH}" PERL_VENDORARCH) - endif () + perl_get_info(PERL_VENDORARCH installvendorarch IS_PATH) ### PERL_VENDORLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installvendorlib - OUTPUT_VARIABLE - PERL_VENDORLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_VENDORLIB_RESULT_VARIABLE - ) - if (NOT PERL_VENDORLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORLIB ${PERL_VENDORLIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_VENDORLIB}" PERL_VENDORLIB) - endif () + perl_get_info(PERL_VENDORLIB installvendorlib IS_PATH) ### PERL_ARCHLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:archlib - OUTPUT_VARIABLE - PERL_ARCHLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_ARCHLIB_RESULT_VARIABLE - ) - if (NOT PERL_ARCHLIB_RESULT_VARIABLE) - string(REGEX REPLACE "archlib='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_ARCHLIB}" PERL_ARCHLIB) - endif () + perl_get_info(PERL_ARCHLIB archlib IS_PATH) ### PERL_PRIVLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:privlib - OUTPUT_VARIABLE - PERL_PRIVLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_PRIVLIB_RESULT_VARIABLE - ) - if (NOT PERL_PRIVLIB_RESULT_VARIABLE) - string(REGEX REPLACE "privlib='([^']+)'.*" "\\1" PERL_PRIVLIB ${PERL_PRIVLIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_PRIVLIB}" PERL_PRIVLIB) - endif () + perl_get_info(PERL_PRIVLIB privlib IS_PATH) ### PERL_UPDATE_ARCHLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installarchlib - OUTPUT_VARIABLE - PERL_UPDATE_ARCHLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_UPDATE_ARCHLIB_RESULT_VARIABLE - ) - if (NOT PERL_UPDATE_ARCHLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_UPDATE_ARCHLIB ${PERL_UPDATE_ARCHLIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_UPDATE_ARCHLIB}" PERL_UPDATE_ARCHLIB) - endif () + perl_get_info(PERL_UPDATE_ARCHLIB installarchlib IS_PATH) ### PERL_UPDATE_PRIVLIB - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:installprivlib - OUTPUT_VARIABLE - PERL_UPDATE_PRIVLIB_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_UPDATE_PRIVLIB_RESULT_VARIABLE - ) - if (NOT PERL_UPDATE_PRIVLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_UPDATE_PRIVLIB ${PERL_UPDATE_PRIVLIB_OUTPUT_VARIABLE}) - file(TO_CMAKE_PATH "${PERL_UPDATE_PRIVLIB}" PERL_UPDATE_PRIVLIB) - endif () + perl_get_info(PERL_UPDATE_PRIVLIB installprivlib IS_PATH) ### PERL_POSSIBLE_LIBRARY_NAMES - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:libperl - OUTPUT_VARIABLE - PERL_LIBRARY_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_LIBRARY_RESULT_VARIABLE - ) - if (NOT PERL_LIBRARY_RESULT_VARIABLE) - string(REGEX REPLACE "libperl='([^']+)'.*" "\\1" PERL_POSSIBLE_LIBRARY_NAMES ${PERL_LIBRARY_OUTPUT_VARIABLE}) - else () + perl_get_info(PERL_POSSIBLE_LIBRARY_NAMES libperl) + if (NOT PERL_POSSIBLE_LIBRARY_NAMES) set(PERL_POSSIBLE_LIBRARY_NAMES perl${PERL_VERSION_STRING} perl) - endif () + endif() ### PERL_INCLUDE_PATH find_path(PERL_INCLUDE_PATH NAMES perl.h PATHS - ${PERL_UPDATE_ARCHLIB}/CORE - ${PERL_ARCHLIB}/CORE + "${PERL_UPDATE_ARCHLIB}/CORE" + "${PERL_ARCHLIB}/CORE" /usr/lib/perl5/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl5/${PERL_VERSION_STRING}/CORE @@ -233,8 +126,8 @@ if (PERL_EXECUTABLE) NAMES ${PERL_POSSIBLE_LIBRARY_NAMES} PATHS - ${PERL_UPDATE_ARCHLIB}/CORE - ${PERL_ARCHLIB}/CORE + "${PERL_UPDATE_ARCHLIB}/CORE" + "${PERL_ARCHLIB}/CORE" /usr/lib/perl5/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl5/${PERL_VERSION_STRING}/CORE https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c365a0787058e41f0e96f4dd2447cb71a17f7696 commit c365a0787058e41f0e96f4dd2447cb71a17f7696 Author: Marc Chevrier AuthorDate: Tue Dec 12 09:35:50 2017 +0100 Commit: Marc Chevrier CommitDate: Tue Dec 12 09:38:39 2017 +0100 FindPerlLibs: fix MacOS failure Fix library paths computation on MacOS Fixes: #12544 diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake index e01e75e..2767325 100644 --- a/Modules/FindPerlLibs.cmake +++ b/Modules/FindPerlLibs.cmake @@ -32,12 +32,14 @@ # # :: # -# PERL_SITESEARCH = path to the sitesearch install dir -# PERL_SITELIB = path to the sitelib install directory -# PERL_VENDORARCH = path to the vendor arch install directory -# PERL_VENDORLIB = path to the vendor lib install directory -# PERL_ARCHLIB = path to the arch lib install directory -# PERL_PRIVLIB = path to the priv lib install directory +# PERL_SITESEARCH = path to the sitesearch install dir (-V:installsitesearch) +# PERL_SITELIB = path to the sitelib install directory (-V:installsitelib) +# PERL_VENDORARCH = path to the vendor arch install directory (-V:installvendorarch) +# PERL_VENDORLIB = path to the vendor lib install directory (-V:installvendorlib) +# PERL_ARCHLIB = path to the core arch lib install directory (-V:archlib) +# PERL_PRIVLIB = path to the core priv lib install directory (-V:privlib) +# PERL_UPDATE_ARCHLIB = path to the update arch lib install directory (-V:installarchlib) +# PERL_UPDATE_PRIVLIB = path to the update priv lib install directory (-V:installprivlib) # PERL_EXTRA_C_FLAGS = Compilation flags used to build perl # find the perl executable @@ -142,62 +144,62 @@ if (PERL_EXECUTABLE) file(TO_CMAKE_PATH "${PERL_VENDORLIB}" PERL_VENDORLIB) endif () - macro(perl_adjust_darwin_lib_variable varname) - string( TOUPPER PERL_${varname} FINDPERL_VARNAME ) - string( TOLOWER install${varname} PERL_VARNAME ) - - if (NOT PERL_MINUSV_OUTPUT_VARIABLE) - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V - OUTPUT_VARIABLE - PERL_MINUSV_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_MINUSV_RESULT_VARIABLE - ) - endif() - - if (NOT PERL_MINUSV_RESULT_VARIABLE) - string(REGEX MATCH "(${PERL_VARNAME}.*points? to the Updates directory)" - PERL_NEEDS_ADJUSTMENT ${PERL_MINUSV_OUTPUT_VARIABLE}) - - if (PERL_NEEDS_ADJUSTMENT) - string(REGEX REPLACE "(.*)/Updates/" "/System/\\1/" ${FINDPERL_VARNAME} ${${FINDPERL_VARNAME}}) - endif () - - endif () - endmacro() - ### PERL_ARCHLIB execute_process( COMMAND - ${PERL_EXECUTABLE} -V:installarchlib + ${PERL_EXECUTABLE} -V:archlib OUTPUT_VARIABLE PERL_ARCHLIB_OUTPUT_VARIABLE RESULT_VARIABLE PERL_ARCHLIB_RESULT_VARIABLE ) if (NOT PERL_ARCHLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE}) - perl_adjust_darwin_lib_variable( ARCHLIB ) + string(REGEX REPLACE "archlib='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE}) file(TO_CMAKE_PATH "${PERL_ARCHLIB}" PERL_ARCHLIB) endif () ### PERL_PRIVLIB execute_process( COMMAND - ${PERL_EXECUTABLE} -V:installprivlib + ${PERL_EXECUTABLE} -V:privlib OUTPUT_VARIABLE PERL_PRIVLIB_OUTPUT_VARIABLE RESULT_VARIABLE PERL_PRIVLIB_RESULT_VARIABLE ) if (NOT PERL_PRIVLIB_RESULT_VARIABLE) - string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_PRIVLIB ${PERL_PRIVLIB_OUTPUT_VARIABLE}) - perl_adjust_darwin_lib_variable( PRIVLIB ) + string(REGEX REPLACE "privlib='([^']+)'.*" "\\1" PERL_PRIVLIB ${PERL_PRIVLIB_OUTPUT_VARIABLE}) file(TO_CMAKE_PATH "${PERL_PRIVLIB}" PERL_PRIVLIB) endif () + ### PERL_UPDATE_ARCHLIB + execute_process( + COMMAND + ${PERL_EXECUTABLE} -V:installarchlib + OUTPUT_VARIABLE + PERL_UPDATE_ARCHLIB_OUTPUT_VARIABLE + RESULT_VARIABLE + PERL_UPDATE_ARCHLIB_RESULT_VARIABLE + ) + if (NOT PERL_UPDATE_ARCHLIB_RESULT_VARIABLE) + string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_UPDATE_ARCHLIB ${PERL_UPDATE_ARCHLIB_OUTPUT_VARIABLE}) + file(TO_CMAKE_PATH "${PERL_UPDATE_ARCHLIB}" PERL_UPDATE_ARCHLIB) + endif () + + ### PERL_UPDATE_PRIVLIB + execute_process( + COMMAND + ${PERL_EXECUTABLE} -V:installprivlib + OUTPUT_VARIABLE + PERL_UPDATE_PRIVLIB_OUTPUT_VARIABLE + RESULT_VARIABLE + PERL_UPDATE_PRIVLIB_RESULT_VARIABLE + ) + if (NOT PERL_UPDATE_PRIVLIB_RESULT_VARIABLE) + string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_UPDATE_PRIVLIB ${PERL_UPDATE_PRIVLIB_OUTPUT_VARIABLE}) + file(TO_CMAKE_PATH "${PERL_UPDATE_PRIVLIB}" PERL_UPDATE_PRIVLIB) + endif () + ### PERL_POSSIBLE_LIBRARY_NAMES execute_process( COMMAND @@ -218,6 +220,7 @@ if (PERL_EXECUTABLE) NAMES perl.h PATHS + ${PERL_UPDATE_ARCHLIB}/CORE ${PERL_ARCHLIB}/CORE /usr/lib/perl5/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE @@ -230,6 +233,7 @@ if (PERL_EXECUTABLE) NAMES ${PERL_POSSIBLE_LIBRARY_NAMES} PATHS + ${PERL_UPDATE_ARCHLIB}/CORE ${PERL_ARCHLIB}/CORE /usr/lib/perl5/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE /usr/lib/perl/${PERL_VERSION_STRING}/${PERL_ARCHNAME}/CORE https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c62ffdcd4f6f638a7d57221528ffbe112887c1b4 commit c62ffdcd4f6f638a7d57221528ffbe112887c1b4 Author: Vitaly Stakhovsky AuthorDate: Fri Dec 8 22:30:16 2017 -0500 Commit: Vitaly Stakhovsky CommitDate: Fri Dec 8 22:30:16 2017 -0500 cmIDEOptions: use std::string instead of const char* Revise method signatures to save a few c_str() conversions. diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 5e872d2..4b59f44 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -155,12 +155,12 @@ std::vector const& cmIDEOptions::GetDefines() const return this->Defines; } -void cmIDEOptions::AddFlag(const char* flag, const char* value) +void cmIDEOptions::AddFlag(std::string const& flag, std::string const& value) { this->FlagMap[flag] = value; } -void cmIDEOptions::AddFlag(const char* flag, +void cmIDEOptions::AddFlag(std::string const& flag, std::vector const& value) { this->FlagMap[flag] = value; @@ -185,7 +185,7 @@ void cmIDEOptions::AppendFlagString(std::string const& flag, this->FlagMap[flag].append_with_space(value); } -void cmIDEOptions::RemoveFlag(const char* flag) +void cmIDEOptions::RemoveFlag(std::string const& flag) { this->FlagMap.erase(flag); } @@ -195,12 +195,13 @@ bool cmIDEOptions::HasFlag(std::string const& flag) const return this->FlagMap.find(flag) != this->FlagMap.end(); } -const char* cmIDEOptions::GetFlag(const char* flag) +const char* cmIDEOptions::GetFlag(std::string const& flag) const { // This method works only for single-valued flags! - std::map::iterator i = this->FlagMap.find(flag); - if (i != this->FlagMap.end() && i->second.size() == 1) { + std::map::const_iterator i = + this->FlagMap.find(flag); + if (i != this->FlagMap.cend() && i->second.size() == 1) { return i->second[0].c_str(); } - return 0; + return nullptr; } diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index af03128..ded92ca 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -26,15 +26,15 @@ public: void AddDefines(const std::vector& defines); std::vector const& GetDefines() const; - void AddFlag(const char* flag, const char* value); - void AddFlag(const char* flag, std::vector const& value); + void AddFlag(std::string const& flag, std::string const& value); + void AddFlag(std::string const& flag, std::vector const& value); void AppendFlag(std::string const& flag, std::string const& value); void AppendFlag(std::string const& flag, std::vector const& value); void AppendFlagString(std::string const& flag, std::string const& value); - void RemoveFlag(const char* flag); + void RemoveFlag(std::string const& flag); bool HasFlag(std::string const& flag) const; - const char* GetFlag(const char* flag); + const char* GetFlag(std::string const& flag) const; protected: // create a map of xml tags to the values they should have in the output diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 53966cd..47e6d7d 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -701,7 +701,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( Options targetOptions(this, t, table, gg->ExtraFlagTable); targetOptions.FixExceptionHandlingDefault(); std::string asmLocation = configName + "/"; - targetOptions.AddFlag("AssemblerListingLocation", asmLocation.c_str()); + targetOptions.AddFlag("AssemblerListingLocation", asmLocation); targetOptions.Parse(flags.c_str()); targetOptions.Parse(defineFlags.c_str()); targetOptions.ParseFinish(); @@ -1007,7 +1007,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool( if (mdi && !mdi->DefFile.empty()) { std::string defFile = this->ConvertToOutputFormat(mdi->DefFile, cmOutputConverter::SHELL); - linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); + linkOptions.AddFlag("ModuleDefinitionFile", defFile); } switch (target->GetType()) { diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 8589a96..fd2f899 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2448,7 +2448,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.FixExceptionHandlingDefault(); clOptions.AddFlag("PrecompiledHeader", "NotUsing"); std::string asmLocation = configName + "/"; - clOptions.AddFlag("AssemblerListingLocation", asmLocation.c_str()); + clOptions.AddFlag("AssemblerListingLocation", asmLocation); } } clOptions.Parse(flags.c_str()); @@ -3315,8 +3315,8 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( imLib += "/"; imLib += targetNameImport; - linkOptions.AddFlag("ImportLibrary", imLib.c_str()); - linkOptions.AddFlag("ProgramDataBaseFile", pdb.c_str()); + linkOptions.AddFlag("ImportLibrary", imLib); + linkOptions.AddFlag("ProgramDataBaseFile", pdb); // A Windows Runtime component uses internal .NET metadata, // so does not have an import library. @@ -3337,7 +3337,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( linkOptions.AppendFlag("IgnoreSpecificDefaultLibraries", "ole32.lib"); } } else if (this->NsightTegra) { - linkOptions.AddFlag("SoName", targetNameSO.c_str()); + linkOptions.AddFlag("SoName", targetNameSO); } linkOptions.Parse(flags.c_str()); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index b1686be..4f3d737 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -258,7 +258,7 @@ void cmVisualStudioGeneratorOptions::FixCudaCodeGeneration() void cmVisualStudioGeneratorOptions::FixManifestUACFlags() { - static const char* ENABLE_UAC = "EnableUAC"; + static std::string const ENABLE_UAC = "EnableUAC"; if (!HasFlag(ENABLE_UAC)) { return; } @@ -304,8 +304,7 @@ void cmVisualStudioGeneratorOptions::FixManifestUACFlags() continue; } - AddFlag(uacMap[keyValue[0]].c_str(), - uacExecuteLevelMap[keyValue[1]].c_str()); + AddFlag(uacMap[keyValue[0]], uacExecuteLevelMap[keyValue[1]]); continue; } @@ -314,7 +313,7 @@ void cmVisualStudioGeneratorOptions::FixManifestUACFlags() // unknown uiAccess value continue; } - AddFlag(uacMap[keyValue[0]].c_str(), keyValue[1].c_str()); + AddFlag(uacMap[keyValue[0]], keyValue[1]); continue; } ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 289 +++++++++++++++----------- Modules/FindPerlLibs.cmake | 212 +++++-------------- Modules/InstallRequiredSystemLibraries.cmake | 9 +- Source/cmIDEOptions.cxx | 15 +- Source/cmIDEOptions.h | 8 +- Source/cmLocalVisualStudio7Generator.cxx | 4 +- Source/cmVisualStudio10TargetGenerator.cxx | 8 +- Source/cmVisualStudioGeneratorOptions.cxx | 7 +- Source/kwsys/SystemTools.cxx | 13 +- Source/kwsys/testSystemTools.cxx | 35 ++++ 10 files changed, 297 insertions(+), 303 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 13 08:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 13 Dec 2017 08:05:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-625-g3fdc439 Message-ID: <20171213130504.60A5D102D50@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 3fdc4397e121f5125c103dc96e1e37b3e3454a5b (commit) via 38b4209100f06f9f087e6e90368ff1df7854bbde (commit) via 19d5969d37172d5332754968063267e9dbe1e171 (commit) from a363c9356d60ea2cfdae7bd8a35b87cac463c4fc (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=3fdc4397e121f5125c103dc96e1e37b3e3454a5b commit 3fdc4397e121f5125c103dc96e1e37b3e3454a5b Merge: a363c93 38b4209 Author: Brad King AuthorDate: Wed Dec 13 08:03:05 2017 -0500 Commit: Brad King CommitDate: Wed Dec 13 08:03:05 2017 -0500 Merge branch 'release-3.10' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 13 08:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 13 Dec 2017 08:05:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-31-g38b4209 Message-ID: <20171213130504.769C4102D5C@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 38b4209100f06f9f087e6e90368ff1df7854bbde (commit) via 19d5969d37172d5332754968063267e9dbe1e171 (commit) via 4dae55fb70de42c2b55676f78ea7f0c6c8ad51b4 (commit) via d1d8719f623fe570142c67bf8d54c43f31355262 (commit) from e2303b257c0453033571ec20a767e9ab22308e8b (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/FindMPI.cmake | 289 +++++++++++++++----------- Modules/InstallRequiredSystemLibraries.cmake | 9 +- 2 files changed, 175 insertions(+), 123 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 13 09:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 13 Dec 2017 09:25:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.0-627-ge80cc85 Message-ID: <20171213142506.545441022A7@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 e80cc856da6901338486d9183b527fbcbbe385dd (commit) via 166bf4c490b8f46eca057fc23c3f3c2e042e9cb3 (commit) from 3fdc4397e121f5125c103dc96e1e37b3e3454a5b (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=e80cc856da6901338486d9183b527fbcbbe385dd commit e80cc856da6901338486d9183b527fbcbbe385dd Merge: 3fdc439 166bf4c Author: Brad King AuthorDate: Wed Dec 13 09:15:08 2017 -0500 Commit: Brad King CommitDate: Wed Dec 13 09:15:08 2017 -0500 Merge branch 'release-3.10' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 13 09:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 13 Dec 2017 09:25:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.0-32-g166bf4c Message-ID: <20171213142506.6AE38102FB4@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 166bf4c490b8f46eca057fc23c3f3c2e042e9cb3 (commit) from 38b4209100f06f9f087e6e90368ff1df7854bbde (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 13 09:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 13 Dec 2017 09:35:03 -0500 (EST) Subject: [Cmake-commits] CMake annotated tag, v3.10.1, created. v3.10.1 Message-ID: <20171213143503.8DF3D10302A@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 annotated tag, v3.10.1 has been created at 15849e8ff7383e08ce5a7600e5ca6ef65cc4ac7e (tag) tagging 166bf4c490b8f46eca057fc23c3f3c2e042e9cb3 (commit) replaces v3.10.0 tagged by Brad King on Wed Dec 13 09:30:29 2017 -0500 - Log ----------------------------------------------------------------- CMake 3.10.1 -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAloxOYUWHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhHp0D/9VjzUbx1aWNSIw5SG1bYfvnegD /tLR9JAtjjCjxZLww4o6OaAhXdwxhAnNbRYjQihgM68hpNkjKKFV06mml+1dFID8 j49k5PGnfJOf5aBl+bYSrFMqFCEDTGj0kLS4otFoIUfVz5Wj0WbABvlQWQGBqn8u qEYvbYpjbCVIwKtEVpGg7tkEGjOzdOT/vwB0LX5o1zEuQbNn1qhXhZ6uPpjh0z6z wbr567D43m9Gh/2DI0QYn66uqIVabrOz1GWmPtgpD1GTGUs87AWdtFp0tgDfYCIX jTwBHmUuoX5b2Ay+iSfCiCW6xRM7FJhEoM1jCM7PMjlAOSYom+m0X9zcnX6b632r dfCBCG0sQpd2KaRLLu3SCo79CIRihQPgis8cuxFcZMKDd66LJvfuQOrfYU3KswWG PjphcGFvw7QC9r+Cn1HsKlEQ/cE7JxVdFnaMMDtijRDyl18KL35+qTKRiyRAqNQA eYLUiy83bew6U+th1L5DMquEHw+Rj4fSUJmjwb911RYCE2hxyzns21magTUAQ0qC pU8mwls45X/Z4Vx2++/OH7r6xLS7O19/VvC0hW1oqweumeRx4dZNcRa/+5i1TPny fIx5P/qTaeMtPSdAIa6Kvq3F6IjwQMysGiFoRtReUxW8wasmCOr7CwuBthtiPPwC RZrjZIAdEv/JIITXrQ== =/oHw -----END PGP SIGNATURE----- Adam Ciarci?ski (1): bootstrap: Check support for unordered_map from compiler mode Alexander Wittig (1): CPack: Fix macOS PKG component dependency information Brad King (17): Merge branch 'gtest-fix-discovery' into release-3.10 CUDA: Treat /usr/include as an implicit include directory Merge branch 'cuda-implicit-include-dirs' into release-3.10 Merge branch 'clang-cl-fix' into release-3.10 Merge branch 'bootstrap-clang-5' into release-3.10 Merge branch 'cpack-pkg-fix' into release-3.10 Merge branch 'findmpi-found-cond' into release-3.10 Merge branch 'findmpi-notfound-spam' into release-3.10 server: Revert "Report backtraces in codemodel response" Merge branch 'backport-revert-server-target-backtraces' into release-3.10 Merge branch 'gtest-discovery-timeout' into release-3.10 Merge branch 'automoc-apple-framework' into release-3.10 Merge branch 'cuda_darwin_proper_install_names_flags' into release-3.10 Merge branch 'fix-iar-binutils-for-cxx' into release-3.10 Merge branch 'findmpi-builtin-fix' into release-3.10 Merge branch 'irsl-msvc-omp-fix' into release-3.10 CMake 3.10.1 Christian Pfeiffer (4): FindMPI: Correct legacy variable handling FindMPI: Fix multiple configure runs FindMPI: Fix various legacy problems IRSL: Fix MSVC variable deferencing Islam Amer (1): IAR: FindBinUtils should work for CXX as well as C Matthew Woehlke (4): GoogleTest: Fix multiple discovery on same target GoogleTest: Improve gtest_discover_tests messages GoogleTest: Add timeout to discovery GoogleTest: Add test for missing test executable Robert Maynard (1): CUDA: Shared libraries on Darwin properly setup @rpath install_names Sebastian Holtermann (2): Autogen: Fix for AUTOMOC on macOS frameworks in CMake 3.10 Autogen: Tests: Add test for MacOS frameworks ?smail D?nmez (1): Clang: Do not mistake clang-cl 6.0 for GNU-like clang ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 14 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 14 Dec 2017 00:05:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-596-g1e2911b Message-ID: <20171214050506.3AF53102DB1@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 1e2911b8cd512663ef35bf05de0b5f8156abc171 (commit) from e80cc856da6901338486d9183b527fbcbbe385dd (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=1e2911b8cd512663ef35bf05de0b5f8156abc171 commit 1e2911b8cd512663ef35bf05de0b5f8156abc171 Author: Kitware Robot AuthorDate: Thu Dec 14 00:01:11 2017 -0500 Commit: Kitware Robot CommitDate: Thu Dec 14 00:01:11 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ddb7826..3556f94 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 10) -set(CMake_VERSION_PATCH 20171213) +set(CMake_VERSION_PATCH 20171214) #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 Dec 14 08:15:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 14 Dec 2017 08:15:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-598-g1e148ab Message-ID: <20171214131506.432F7FA71B@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 1e148aba7078359e2e5b4d7080a6e1cb6592d94a (commit) via 9b4d31dc771f630961d903df318f1539ddd955d1 (commit) from 1e2911b8cd512663ef35bf05de0b5f8156abc171 (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=1e148aba7078359e2e5b4d7080a6e1cb6592d94a commit 1e148aba7078359e2e5b4d7080a6e1cb6592d94a Merge: 1e2911b 9b4d31d Author: Brad King AuthorDate: Thu Dec 14 13:08:00 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 14 08:08:05 2017 -0500 Merge topic 'cmGraphVizWriter_Interface_Dependers' 9b4d31dc cmGraphVizWriter: Updated to create and follow dependers for interface targets Acked-by: Kitware Robot Merge-request: !1581 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b4d31dc771f630961d903df318f1539ddd955d1 commit 9b4d31dc771f630961d903df318f1539ddd955d1 Author: Joel T. Frederico AuthorDate: Fri Dec 8 21:27:24 2017 -0800 Commit: Brad King CommitDate: Thu Dec 14 08:03:02 2017 -0500 cmGraphVizWriter: Updated to create and follow dependers for interface targets Generating graphs of dependencies now uses interface targets, but graphs of dependers did not include interface targets. diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index dd2993d..e684f5e 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -29,6 +29,22 @@ enum LinkLibraryScopeType const char* const GRAPHVIZ_PRIVATE_EDEGE_STYLE = "dashed"; const char* const GRAPHVIZ_INTERFACE_EDEGE_STYLE = "dotted"; +std::string getLinkLibraryStyle(const LinkLibraryScopeType& type) +{ + std::string style; + switch (type) { + case LLT_SCOPE_PRIVATE: + style = "[style = " + std::string(GRAPHVIZ_PRIVATE_EDEGE_STYLE) + "]"; + break; + case LLT_SCOPE_INTERFACE: + style = "[style = " + std::string(GRAPHVIZ_INTERFACE_EDEGE_STYLE) + "]"; + break; + default: + break; + } + return style; +} + const char* getShapeForTarget(const cmGeneratorTarget* target) { if (!target) { @@ -132,6 +148,7 @@ cmGraphVizWriter::cmGraphVizWriter( , GenerateForStaticLibs(true) , GenerateForSharedLibs(true) , GenerateForModuleLibs(true) + , GenerateForInterface(true) , GenerateForExternals(true) , GeneratePerTarget(true) , GenerateDependers(true) @@ -192,6 +209,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, __set_bool_if_set(this->GenerateForStaticLibs, "GRAPHVIZ_STATIC_LIBS"); __set_bool_if_set(this->GenerateForSharedLibs, "GRAPHVIZ_SHARED_LIBS"); __set_bool_if_set(this->GenerateForModuleLibs, "GRAPHVIZ_MODULE_LIBS"); + __set_bool_if_set(this->GenerateForInterface, "GRAPHVIZ_INTERFACE"); __set_bool_if_set(this->GenerateForExternals, "GRAPHVIZ_EXTERNAL_LIBS"); __set_bool_if_set(this->GeneratePerTarget, "GRAPHVIZ_GENERATE_PER_TARGET"); __set_bool_if_set(this->GenerateDependers, "GRAPHVIZ_GENERATE_DEPENDERS"); @@ -379,16 +397,7 @@ void cmGraphVizWriter::WriteConnections( str << " \"" << myNodeName << "\" -> \"" << libNameIt->second << "\""; - switch (llit.second) { - case LLT_SCOPE_PRIVATE: - str << "[style = " << GRAPHVIZ_PRIVATE_EDEGE_STYLE << "]"; - break; - case LLT_SCOPE_INTERFACE: - str << "[style = " << GRAPHVIZ_INTERFACE_EDEGE_STYLE << "]"; - break; - default: - break; - } + str << getLinkLibraryStyle(llit.second); str << " // " << targetName << " -> " << libName << std::endl; this->WriteConnections(libName, insertedNodes, insertedConnections, str); @@ -429,12 +438,11 @@ void cmGraphVizWriter::WriteDependerConnections( // Now we have a target, check whether it links against targetName. // If so, draw a connection, and then continue with dependers on that one. - const cmTarget::LinkLibraryVectorType* ll = - &(tptr.second->Target->GetOriginalLinkLibraries()); + std::map ll = + getScopedLinkLibrariesFromTarget(tptr.second->Target); - for (auto const& llit : *ll) { - std::string libName = llit.first; - if (libName == targetName) { + for (auto const& llit : ll) { + if (llit.first == targetName) { // So this target links against targetName. std::map::const_iterator dependerNodeNameIt = this->TargetNamesNodes.find(tptr.first); @@ -452,6 +460,7 @@ void cmGraphVizWriter::WriteDependerConnections( str << " \"" << dependerNodeNameIt->second << "\" -> \"" << myNodeName << "\""; str << " // " << targetName << " -> " << tptr.first << std::endl; + str << getLinkLibraryStyle(llit.second); this->WriteDependerConnections(tptr.first, insertedNodes, insertedConnections, str); } @@ -572,6 +581,8 @@ bool cmGraphVizWriter::GenerateForTargetType( return this->GenerateForSharedLibs; case cmStateEnums::MODULE_LIBRARY: return this->GenerateForModuleLibs; + case cmStateEnums::INTERFACE_LIBRARY: + return this->GenerateForInterface; default: break; } diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 824999b..ac20da9 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -79,6 +79,7 @@ protected: bool GenerateForStaticLibs; bool GenerateForSharedLibs; bool GenerateForModuleLibs; + bool GenerateForInterface; bool GenerateForExternals; bool GeneratePerTarget; bool GenerateDependers; ----------------------------------------------------------------------- Summary of changes: Source/cmGraphVizWriter.cxx | 41 ++++++++++++++++++++++++++--------------- Source/cmGraphVizWriter.h | 1 + 2 files changed, 27 insertions(+), 15 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 14 08:25:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 14 Dec 2017 08:25:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-625-g4bc5c08 Message-ID: <20171214132504.2C995FE0DA@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 4bc5c08476f28a23f42b4566a760b21cef60c4b3 (commit) via 7341930ade835ce48641b5415cdd3f738772edf2 (commit) via 671958d2884e2d2597362265620b73f43d414870 (commit) via 10f58b27ac1015e4f1615372bb5168e43afcdf3a (commit) via 540d08f4858ddbb8d0356f77f878b9fbb7af8f80 (commit) via b1504f9f97849777f4690565f8b5879372e7dd51 (commit) via e9fcd1545facf6300181db843260008e1069c7b4 (commit) via 54b4ff2aee015768a990cb3fccb79f8e87b38a19 (commit) via 4988746e76703269d76c3fb633bafc0767fafbe4 (commit) via 6ce6fd426ee7649a40c2f253dbc5f814650f0992 (commit) via 45b6776ab301f4b5ec51e27863ffe061b1a0d60a (commit) via d7868687c814cded6319dd0cfd9fff5c737bf0f0 (commit) via b8ef28ae1f442144f55e23b8defffe01aa350c44 (commit) via 0b6ad59ea6b74379f4aefb42c2402355c393c656 (commit) via a2c4e3489d9ccd7150b6fda2ea7254c21dcde1b2 (commit) via cc66d356510c51b5240239a212a511fb0d23dc9a (commit) via 7971202b3c58f78008f5b651c048910fcc49c49f (commit) via fb7e52ca3d920ca1de8b2abb23da3d83db988eca (commit) via 5cab8c307c7df585152e3ab9e007574cb0e690dc (commit) via f11321efd11ce4958d45f4673465b5b9484f1af2 (commit) via 0af9da29e487f0a6c60c379f0773a68b40ce2625 (commit) via f658bdaa7c7899a46caf402d4114999019897d46 (commit) via f00e6c7c7024a784d2da310ba7b5f4a67e60fdff (commit) via 6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9 (commit) via 0b8597a86ee8bed2c34f52d309fd57b5f29a1595 (commit) via 227a7974f426e0966d1736c66dd606b068985d1b (commit) via 7d1ed84ceaa1c3467c091de302c778b5989bd03c (commit) from 1e148aba7078359e2e5b4d7080a6e1cb6592d94a (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=4bc5c08476f28a23f42b4566a760b21cef60c4b3 commit 4bc5c08476f28a23f42b4566a760b21cef60c4b3 Merge: 7341930 10f58b2 Author: Brad King AuthorDate: Thu Dec 14 13:21:40 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 14 08:21:52 2017 -0500 Merge topic 'per-source-COMPILE_LANGUAGE-genex-support' 10f58b27 Genex: Per-source $ support Acked-by: Kitware Robot Merge-request: !1575 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7341930ade835ce48641b5415cdd3f738772edf2 commit 7341930ade835ce48641b5415cdd3f738772edf2 Merge: 671958d 540d08f Author: Brad King AuthorDate: Thu Dec 14 13:21:21 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 14 08:21:28 2017 -0500 Merge topic 'autogen-separate-tests' 540d08f4 Autogen: Tests: Move QtAutoUicInterface test to QtAutogen/UicInterface b1504f9f Autogen: Tests: Separate RerunRccDepends test e9fcd154 Autogen: Tests: Separate RerunMocPlugin test 54b4ff2a Autogen: Tests: Separate RerunMocBasic test 4988746e Autogen: Tests: Separate Complex test 6ce6fd42 Autogen: Tests: Separate StaticLibraryCycle test 45b6776a Autogen: Tests: Separate SameName test d7868687 Autogen: Tests: Separate MacOsFW test ... Acked-by: Kitware Robot Merge-request: !1578 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=671958d2884e2d2597362265620b73f43d414870 commit 671958d2884e2d2597362265620b73f43d414870 Merge: 1e148ab 7d1ed84 Author: Brad King AuthorDate: Thu Dec 14 13:18:47 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 14 08:18:53 2017 -0500 Merge topic 'irsl-intel-fortran-only-fix' 7d1ed84c IRSL: Skip libgfxoffload if no Intel C++ is used Acked-by: Kitware Robot Merge-request: !1589 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=10f58b27ac1015e4f1615372bb5168e43afcdf3a commit 10f58b27ac1015e4f1615372bb5168e43afcdf3a Author: Marc Chevrier AuthorDate: Wed Dec 13 16:34:11 2017 +0100 Commit: Marc Chevrier CommitDate: Wed Dec 13 16:35:22 2017 +0100 Genex: Per-source $ support Fixes: #17542 diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index bd1b6bb..c7197f2 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -361,9 +361,11 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject( } // Add source file specific flags. - if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) { - cmGeneratorExpressionInterpreter genexInterpreter(lg, gtgt, config); - lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags)); + const std::string COMPILE_FLAGS("COMPILE_FLAGS"); + if (const char* cflags = source->GetProperty(COMPILE_FLAGS)) { + cmGeneratorExpressionInterpreter genexInterpreter( + lg, gtgt, config, gtgt->GetName(), language); + lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags, COMPILE_FLAGS)); } return flags; @@ -379,7 +381,8 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines( cmMakefile* makefile = lg->GetMakefile(); const std::string& language = source->GetLanguage(); const std::string& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); - cmGeneratorExpressionInterpreter genexInterpreter(lg, target, config); + cmGeneratorExpressionInterpreter genexInterpreter( + lg, target, config, target->GetName(), language); // Add the export symbol definition for shared library objects. if (const char* exportMacro = target->GetExportMacro()) { @@ -388,14 +391,17 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines( // Add preprocessor definitions for this target and configuration. lg->AddCompileDefinitions(defines, target, config, language); - if (const char* compile_defs = source->GetProperty("COMPILE_DEFINITIONS")) { - lg->AppendDefines(defines, genexInterpreter.Evaluate(compile_defs)); + const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS"); + if (const char* compile_defs = source->GetProperty(COMPILE_DEFINITIONS)) { + lg->AppendDefines( + defines, genexInterpreter.Evaluate(compile_defs, COMPILE_DEFINITIONS)); } std::string defPropName = "COMPILE_DEFINITIONS_"; defPropName += cmSystemTools::UpperCase(config); if (const char* config_compile_defs = source->GetProperty(defPropName)) { - lg->AppendDefines(defines, genexInterpreter.Evaluate(config_compile_defs)); + lg->AppendDefines(defines, genexInterpreter.Evaluate(config_compile_defs, + COMPILE_DEFINITIONS)); } std::string definesString; diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 86991c1..6979b38 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -9,6 +9,7 @@ #include "assert.h" #include "cmAlgorithms.h" #include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionDAGChecker.h" #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" @@ -385,3 +386,18 @@ void cmCompiledGeneratorExpression::GetMaxLanguageStandard( mapping = it->second; } } + +const char* cmGeneratorExpressionInterpreter::Evaluate( + const char* expression, const std::string& property) +{ + if (this->Target.empty()) { + return this->EvaluateExpression(expression); + } + + // Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS + cmGeneratorExpressionDAGChecker dagChecker( + this->Target, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, + nullptr, nullptr); + + return this->EvaluateExpression(expression, &dagChecker); +} diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 611fbf8..9fd53c6 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -160,25 +160,38 @@ class cmGeneratorExpressionInterpreter public: cmGeneratorExpressionInterpreter(cmLocalGenerator* localGenerator, cmGeneratorTarget* generatorTarget, - const std::string& config) + const std::string& config, + const std::string& target, + const std::string& lang) : LocalGenerator(localGenerator) , GeneratorTarget(generatorTarget) , Config(config) + , Target(target) + , Language(lang) + { + } + cmGeneratorExpressionInterpreter(cmLocalGenerator* localGenerator, + cmGeneratorTarget* generatorTarget, + const std::string& config) + : cmGeneratorExpressionInterpreter(localGenerator, generatorTarget, config, + std::string(), std::string()) { } const char* Evaluate(const char* expression) { - this->CompiledGeneratorExpression = - this->GeneratorExpression.Parse(expression); - - return this->CompiledGeneratorExpression->Evaluate( - this->LocalGenerator, this->Config, false, this->GeneratorTarget); + return this->EvaluateExpression(expression); } const char* Evaluate(const std::string& expression) { return this->Evaluate(expression.c_str()); } + const char* Evaluate(const char* expression, const std::string& property); + const char* Evaluate(const std::string& expression, + const std::string& property) + { + return this->Evaluate(expression.c_str(), property); + } protected: cmGeneratorExpression& GetGeneratorExpression() @@ -195,12 +208,34 @@ protected: cmGeneratorTarget* GetGeneratorTarget() { return this->GeneratorTarget; } + const std::string& GetTargetName() const { return this->Target; } + const std::string& GetLanguage() const { return this->Language; } + + const char* EvaluateExpression( + const char* expression, + cmGeneratorExpressionDAGChecker* dagChecker = nullptr) + { + this->CompiledGeneratorExpression = + this->GeneratorExpression.Parse(expression); + + if (dagChecker == nullptr) { + return this->CompiledGeneratorExpression->Evaluate( + this->LocalGenerator, this->Config, false, this->GeneratorTarget); + } + + return this->CompiledGeneratorExpression->Evaluate( + this->LocalGenerator, this->Config, false, this->GeneratorTarget, + dagChecker, this->Language); + } + private: cmGeneratorExpression GeneratorExpression; std::unique_ptr CompiledGeneratorExpression; cmLocalGenerator* LocalGenerator = nullptr; cmGeneratorTarget* GeneratorTarget = nullptr; std::string Config; + std::string Target; + std::string Language; }; #endif diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index bbf4175..6223be8 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -684,18 +684,21 @@ class XCodeGeneratorExpressionInterpreter public: XCodeGeneratorExpressionInterpreter(cmSourceFile* sourceFile, cmLocalGenerator* localGenerator, - cmGeneratorTarget* generatorTarget) + cmGeneratorTarget* generatorTarget, + const std::string& lang) : cmGeneratorExpressionInterpreter(localGenerator, generatorTarget, - "NO-PER-CONFIG-SUPPORT-IN-XCODE") + "NO-PER-CONFIG-SUPPORT-IN-XCODE", + generatorTarget->GetName(), lang) , SourceFile(sourceFile) { } using cmGeneratorExpressionInterpreter::Evaluate; - const char* Evaluate(const char* expression, const char* property) + const char* Evaluate(const char* expression, const std::string& property) { - const char* processed = this->Evaluate(expression); + const char* processed = + this->cmGeneratorExpressionInterpreter::Evaluate(expression, property); if (this->GetCompiledGeneratorExpression() .GetHadContextSensitiveCondition()) { std::ostringstream e; @@ -719,7 +722,9 @@ private: cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( cmLocalGenerator* lg, cmSourceFile* sf, cmGeneratorTarget* gtgt) { - XCodeGeneratorExpressionInterpreter genexInterpreter(sf, lg, gtgt); + std::string lang = this->CurrentLocalGenerator->GetSourceFileLanguage(*sf); + + XCodeGeneratorExpressionInterpreter genexInterpreter(sf, lg, gtgt, lang); // Add flags from target and source file properties. std::string flags; @@ -734,16 +739,18 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( default: break; } - if (const char* cflags = sf->GetProperty("COMPILE_FLAGS")) { - lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags, "COMPILE_FLAGS")); + const std::string COMPILE_FLAGS("COMPILE_FLAGS"); + if (const char* cflags = sf->GetProperty(COMPILE_FLAGS)) { + lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags, COMPILE_FLAGS)); } // Add per-source definitions. BuildObjectListOrString flagsBuild(this, false); - if (const char* compile_defs = sf->GetProperty("COMPILE_DEFINITIONS")) { + const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS"); + if (const char* compile_defs = sf->GetProperty(COMPILE_DEFINITIONS)) { this->AppendDefines( - flagsBuild, - genexInterpreter.Evaluate(compile_defs, "COMPILE_DEFINITIONS"), true); + flagsBuild, genexInterpreter.Evaluate(compile_defs, COMPILE_DEFINITIONS), + true); } if (!flagsBuild.IsEmpty()) { if (!flags.empty()) { @@ -752,8 +759,6 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( flags += flagsBuild.GetString(); } - std::string lang = this->CurrentLocalGenerator->GetSourceFileLanguage(*sf); - cmXCodeObject* buildFile = this->CreateXCodeSourceFileFromPath(sf->GetFullPath(), gtgt, lang, sf); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 53966cd..4121190 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1458,14 +1458,28 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( i != configs.end(); ++i, ++ci) { std::string configUpper = cmSystemTools::UpperCase(*i); cmLVS7GFileConfig fc; - cmGeneratorExpressionInterpreter genexInterpreter(lg, gt, *i); + + std::string lang = + lg->GlobalGenerator->GetLanguageFromExtension(sf.GetExtension().c_str()); + const std::string& sourceLang = lg->GetSourceFileLanguage(sf); + bool needForceLang = false; + // source file does not match its extension language + if (lang != sourceLang) { + needForceLang = true; + lang = sourceLang; + } + + cmGeneratorExpressionInterpreter genexInterpreter(lg, gt, *i, + gt->GetName(), lang); + bool needfc = false; if (!objectName.empty()) { fc.ObjectName = objectName; needfc = true; } - if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) { - fc.CompileFlags = genexInterpreter.Evaluate(cflags); + const std::string COMPILE_FLAGS("COMPILE_FLAGS"); + if (const char* cflags = sf.GetProperty(COMPILE_FLAGS)) { + fc.CompileFlags = genexInterpreter.Evaluate(cflags, COMPILE_FLAGS); needfc = true; } if (lg->FortranProject) { @@ -1483,14 +1497,16 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( break; } } - if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) { - fc.CompileDefs = genexInterpreter.Evaluate(cdefs); + const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS"); + if (const char* cdefs = sf.GetProperty(COMPILE_DEFINITIONS)) { + fc.CompileDefs = genexInterpreter.Evaluate(cdefs, COMPILE_DEFINITIONS); needfc = true; } std::string defPropName = "COMPILE_DEFINITIONS_"; defPropName += configUpper; if (const char* ccdefs = sf.GetProperty(defPropName)) { - fc.CompileDefsConfig = genexInterpreter.Evaluate(ccdefs); + fc.CompileDefsConfig = + genexInterpreter.Evaluate(ccdefs, COMPILE_DEFINITIONS); needfc = true; } @@ -1508,16 +1524,7 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( } } - std::string lang = - lg->GlobalGenerator->GetLanguageFromExtension(sf.GetExtension().c_str()); - const std::string& sourceLang = lg->GetSourceFileLanguage(sf); const std::string& linkLanguage = gt->GetLinkerLanguage(i->c_str()); - bool needForceLang = false; - // source file does not match its extension language - if (lang != sourceLang) { - needForceLang = true; - lang = sourceLang; - } // If HEADER_FILE_ONLY is set, we must suppress this generation in // the project file fc.ExcludedFromBuild = sf.GetPropertyAsBool("HEADER_FILE_ONLY") || diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 5e0c582..82506d2 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -426,7 +426,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::string config = this->LocalGenerator->GetConfigName(); std::string configUpper = cmSystemTools::UpperCase(config); cmGeneratorExpressionInterpreter genexInterpreter( - this->LocalGenerator, this->GeneratorTarget, config); + this->LocalGenerator, this->GeneratorTarget, config, + this->GeneratorTarget->GetName(), lang); // Add Fortran format flags. if (lang == "Fortran") { @@ -434,8 +435,10 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } // Add flags from source file properties. - if (const char* cflags = source.GetProperty("COMPILE_FLAGS")) { - const char* evaluatedFlags = genexInterpreter.Evaluate(cflags); + const std::string COMPILE_FLAGS("COMPILE_FLAGS"); + if (const char* cflags = source.GetProperty(COMPILE_FLAGS)) { + const char* evaluatedFlags = + genexInterpreter.Evaluate(cflags, COMPILE_FLAGS); this->LocalGenerator->AppendFlags(flags, evaluatedFlags); *this->FlagFileStream << "# Custom flags: " << relativeObj << "_FLAGS = " << evaluatedFlags << "\n" @@ -446,8 +449,10 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::set defines; // Add source-sepcific preprocessor definitions. - if (const char* compile_defs = source.GetProperty("COMPILE_DEFINITIONS")) { - const char* evaluatedDefs = genexInterpreter.Evaluate(compile_defs); + const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS"); + if (const char* compile_defs = source.GetProperty(COMPILE_DEFINITIONS)) { + const char* evaluatedDefs = + genexInterpreter.Evaluate(compile_defs, COMPILE_DEFINITIONS); this->LocalGenerator->AppendDefines(defines, evaluatedDefs); *this->FlagFileStream << "# Custom defines: " << relativeObj << "_DEFINES = " << evaluatedDefs << "\n" @@ -456,7 +461,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::string defPropName = "COMPILE_DEFINITIONS_"; defPropName += configUpper; if (const char* config_compile_defs = source.GetProperty(defPropName)) { - const char* evaluatedDefs = genexInterpreter.Evaluate(config_compile_defs); + const char* evaluatedDefs = + genexInterpreter.Evaluate(config_compile_defs, COMPILE_DEFINITIONS); this->LocalGenerator->AppendDefines(defines, evaluatedDefs); *this->FlagFileStream << "# Custom defines: " << relativeObj << "_DEFINES_" << configUpper << " = " << evaluatedDefs << "\n" diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 1036977..f967168 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -135,12 +135,14 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject( } // Add source file specific flags. - if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) { + const std::string COMPILE_FLAGS("COMPILE_FLAGS"); + if (const char* cflags = source->GetProperty(COMPILE_FLAGS)) { cmGeneratorExpressionInterpreter genexInterpreter( this->LocalGenerator, this->GeneratorTarget, - this->LocalGenerator->GetConfigName()); - this->LocalGenerator->AppendFlags(flags, - genexInterpreter.Evaluate(cflags)); + this->LocalGenerator->GetConfigName(), this->GeneratorTarget->GetName(), + language); + this->LocalGenerator->AppendFlags( + flags, genexInterpreter.Evaluate(cflags, COMPILE_FLAGS)); } return flags; @@ -179,18 +181,21 @@ std::string cmNinjaTargetGenerator::ComputeDefines(cmSourceFile const* source, std::set defines; const std::string config = this->LocalGenerator->GetConfigName(); cmGeneratorExpressionInterpreter genexInterpreter( - this->LocalGenerator, this->GeneratorTarget, config); + this->LocalGenerator, this->GeneratorTarget, config, + this->GeneratorTarget->GetName(), language); - if (const char* compile_defs = source->GetProperty("COMPILE_DEFINITIONS")) { + const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS"); + if (const char* compile_defs = source->GetProperty(COMPILE_DEFINITIONS)) { this->LocalGenerator->AppendDefines( - defines, genexInterpreter.Evaluate(compile_defs)); + defines, genexInterpreter.Evaluate(compile_defs, COMPILE_DEFINITIONS)); } std::string defPropName = "COMPILE_DEFINITIONS_"; defPropName += cmSystemTools::UpperCase(config); if (const char* config_compile_defs = source->GetProperty(defPropName)) { this->LocalGenerator->AppendDefines( - defines, genexInterpreter.Evaluate(config_compile_defs)); + defines, + genexInterpreter.Evaluate(config_compile_defs, COMPILE_DEFINITIONS)); } std::string definesString = this->GetDefines(language); diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index ad66467..d745c49 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -691,8 +691,6 @@ static Json::Value DumpSourceFilesList( std::vector files; target->GetSourceFiles(files, config); - cmGeneratorExpressionInterpreter genexInterpreter( - target->GetLocalGenerator(), target, config); std::unordered_map> fileGroups; for (cmSourceFile* file : files) { @@ -701,24 +699,31 @@ static Json::Value DumpSourceFilesList( if (!fileData.Language.empty()) { const LanguageData& ld = languageDataMap.at(fileData.Language); cmLocalGenerator* lg = target->GetLocalGenerator(); + cmGeneratorExpressionInterpreter genexInterpreter( + lg, target, config, target->GetName(), fileData.Language); std::string compileFlags = ld.Flags; - if (const char* cflags = file->GetProperty("COMPILE_FLAGS")) { - lg->AppendFlags(compileFlags, genexInterpreter.Evaluate(cflags)); + const std::string COMPILE_FLAGS("COMPILE_FLAGS"); + if (const char* cflags = file->GetProperty(COMPILE_FLAGS)) { + lg->AppendFlags(compileFlags, + genexInterpreter.Evaluate(cflags, COMPILE_FLAGS)); } fileData.Flags = compileFlags; fileData.IncludePathList = ld.IncludePathList; + const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS"); std::set defines; - if (const char* defs = file->GetProperty("COMPILE_DEFINITIONS")) { - lg->AppendDefines(defines, genexInterpreter.Evaluate(defs)); + if (const char* defs = file->GetProperty(COMPILE_DEFINITIONS)) { + lg->AppendDefines( + defines, genexInterpreter.Evaluate(defs, COMPILE_DEFINITIONS)); } const std::string defPropName = "COMPILE_DEFINITIONS_" + cmSystemTools::UpperCase(config); if (const char* config_defs = file->GetProperty(defPropName)) { - lg->AppendDefines(defines, genexInterpreter.Evaluate(config_defs)); + lg->AppendDefines(defines, genexInterpreter.Evaluate( + config_defs, COMPILE_DEFINITIONS)); } defines.insert(ld.Defines.begin(), ld.Defines.end()); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 8589a96..2af3a0f 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2152,7 +2152,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( flagtable = gg->GetCSharpFlagTable(); } cmGeneratorExpressionInterpreter genexInterpreter( - this->LocalGenerator, this->GeneratorTarget, *config); + this->LocalGenerator, this->GeneratorTarget, *config, + this->GeneratorTarget->GetName(), lang); cmVisualStudioGeneratorOptions clOptions( this->LocalGenerator, cmVisualStudioGeneratorOptions::Compiler, flagtable, 0, this); @@ -2163,7 +2164,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( clOptions.AddFlag("CompileAsWinRT", "false"); } if (configDependentFlags) { - clOptions.Parse(genexInterpreter.Evaluate(flags)); + clOptions.Parse(genexInterpreter.Evaluate(flags, "COMPILE_FLAGS")); } else { clOptions.Parse(flags.c_str()); } @@ -2176,7 +2177,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( "%(DisableSpecificWarnings)"); } if (configDependentDefines) { - clOptions.AddDefines(genexInterpreter.Evaluate(configDefines)); + clOptions.AddDefines( + genexInterpreter.Evaluate(configDefines, "COMPILE_DEFINITIONS")); } else { clOptions.AddDefines(configDefines.c_str()); } diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index 5165970..0585d0c 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -263,9 +263,17 @@ add_custom_target(check-part4 ALL add_executable(srcgenex_flags srcgenex_flags.c) set_property(SOURCE srcgenex_flags.c PROPERTY COMPILE_FLAGS "-DNAME=$") +add_executable(srcgenex_flags_COMPILE_LANGUAGE srcgenex_flags_COMPILE_LANGUAGE.c) +set_property(SOURCE srcgenex_flags_COMPILE_LANGUAGE.c PROPERTY COMPILE_FLAGS "$<$:-DNAME=$>") + add_executable(srcgenex_defs srcgenex_defs.c) set_property(SOURCE srcgenex_defs.c PROPERTY COMPILE_DEFINITIONS NAME=$) +if (CMAKE_GENERATOR MATCHES "Makefiles|Ninja|Watcom WMake") + add_executable(srcgenex_defs_COMPILE_LANGUAGE srcgenex_defs_COMPILE_LANGUAGE.c) + set_property(SOURCE srcgenex_defs_COMPILE_LANGUAGE.c PROPERTY COMPILE_DEFINITIONS $<$:NAME=$>) +endif() + #----------------------------------------------------------------------------- # Cover test properties with generator expressions. add_executable(echo echo.c) diff --git a/Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c b/Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c new file mode 100644 index 0000000..421b55b --- /dev/null +++ b/Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c @@ -0,0 +1,12 @@ +int srcgenex_defs_COMPILE_LANGUAGE(void) +{ + return 0; +} + +int main(int argc, char* argv[]) +{ +#ifndef NAME +#error NAME not defined +#endif + return NAME(); +} diff --git a/Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c b/Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c new file mode 100644 index 0000000..4e80d6e --- /dev/null +++ b/Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c @@ -0,0 +1,12 @@ +int srcgenex_flags_COMPILE_LANGUAGE(void) +{ + return 0; +} + +int main(int argc, char* argv[]) +{ +#ifndef NAME +#error NAME not defined +#endif + return NAME(); +} diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt new file mode 100644 index 0000000..5d19153 --- /dev/null +++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt @@ -0,0 +1,7 @@ +CMake Error: + Error evaluating generator expression: + + \$ + + \$ may only be used for COMPILE_OPTIONS and + file\(GENERATE\) with the Visual Studio generator. diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt new file mode 100644 index 0000000..4a4564e --- /dev/null +++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt @@ -0,0 +1,7 @@ +CMake Error: + Error evaluating generator expression: + + \$ + + \$ may only be used for COMPILE_OPTIONS and + file\(GENERATE\) with the Xcode generator. diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake new file mode 100644 index 0000000..3a07d7d --- /dev/null +++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake @@ -0,0 +1,5 @@ + +enable_language(CXX) + +add_executable(main main.cpp) +set_property(SOURCE main.cpp PROPERTY COMPILE_DEFINITIONS $<$:ANYTHING>) diff --git a/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake b/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake index 421fa73..1a93dcd 100644 --- a/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake +++ b/Tests/RunCMake/COMPILE_LANGUAGE-genex/RunCMakeTest.cmake @@ -14,3 +14,10 @@ elseif (RunCMake_GENERATOR MATCHES "Visual Studio") set(RunCMake-stderr-file IncludeDirectories-stderr-VS.txt) run_cmake(IncludeDirectories) endif() +if (RunCMake_GENERATOR STREQUAL "Xcode") + set(RunCMake-stderr-file PerSourceCompileDefinitions-stderr-Xcode.txt) + run_cmake(PerSourceCompileDefinitions) +elseif (RunCMake_GENERATOR MATCHES "Visual Studio") + set(RunCMake-stderr-file PerSourceCompileDefinitions-stderr-VS.txt) + run_cmake(PerSourceCompileDefinitions) +endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=540d08f4858ddbb8d0356f77f878b9fbb7af8f80 commit 540d08f4858ddbb8d0356f77f878b9fbb7af8f80 Author: Sebastian Holtermann AuthorDate: Sat Dec 9 13:50:12 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:19 2017 +0100 Autogen: Tests: Move QtAutoUicInterface test to QtAutogen/UicInterface diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 46dc224..5d8c2fe 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1242,18 +1242,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/QtAutomocNoQt") - # On Windows there is no RPATH, so while Qt might be available for building, - # the required dlls may not be in the PATH, so we can't run the executables - # on that platform. - if(WIN32) - set(run_autouic_test ${CMAKE_CTEST_COMMAND} -V) - else() - set(run_autouic_test QtAutoUicInterface) - endif() - if(NOT CMAKE_CONFIGURATION_TYPES) - set(QtAutogen_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$) - endif() - if(NOT DEFINED CMake_TEST_Qt5) set(CMake_TEST_Qt5 1) endif() @@ -1262,39 +1250,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND) add_subdirectory(Qt5Autogen) - - add_test(Qt5AutoUicInterface ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface" - "${CMake_BINARY_DIR}/Tests/Qt5AutoUicInterface" - ${build_generator_args} - --build-project QtAutoUicInterface - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5AutoUicInterface" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5 - --test-command ${run_autouic_test} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5AutoUicInterface") endif() if(QT4_WORKS AND QT_QTGUI_FOUND) add_subdirectory(Qt4Autogen) - add_test(Qt4AutoUicInterface ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface" - "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface" - ${build_generator_args} - --build-project QtAutoUicInterface - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} - -DQT_TEST_VERSION=4 - --test-command ${run_autouic_test} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface") - add_test(Qt4Targets ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Qt4Targets" diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 5746ab5..c56780e 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -24,6 +24,7 @@ if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocCMP0071) endif() ADD_AUTOGEN_TEST(UicInclude uicInclude) +ADD_AUTOGEN_TEST(UicInterface QtAutoUicInterface) ADD_AUTOGEN_TEST(ObjectLibrary someProgram) if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) ADD_AUTOGEN_TEST(MacOsFW) diff --git a/Tests/QtAutoUicInterface/CMakeLists.txt b/Tests/QtAutogen/UicInterface/CMakeLists.txt similarity index 71% rename from Tests/QtAutoUicInterface/CMakeLists.txt rename to Tests/QtAutogen/UicInterface/CMakeLists.txt index a5c2d99..a216aff 100644 --- a/Tests/QtAutoUicInterface/CMakeLists.txt +++ b/Tests/QtAutogen/UicInterface/CMakeLists.txt @@ -1,24 +1,6 @@ - -cmake_minimum_required(VERSION 3.7) - -project(QtAutoUicInterface) - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - - include(UseQt4) - - set(QT_CORE_TARGET Qt4::QtCore) - set(QT_GUI_TARGET Qt4::QtGui) -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - find_package(Qt5Widgets REQUIRED) - - set(QT_CORE_TARGET Qt5::Core) - set(QT_GUI_TARGET Qt5::Widgets) -endif() +cmake_minimum_required(VERSION 3.10) +project(UicInterface) +include("../AutogenTest.cmake") set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) set(CMAKE_AUTOMOC ON) @@ -29,7 +11,7 @@ set(CMAKE_AUTOUIC ON) set(CMAKE_VERBOSE_MAKEFILE ON) add_library(KI18n klocalizedstring.cpp) -target_link_libraries(KI18n ${QT_CORE_TARGET}) +target_link_libraries(KI18n ${QT_QTCORE_TARGET}) set(autouic_options -tr tr2$<$>>:x>i18n @@ -61,12 +43,12 @@ set(INC_DIR "include" ) endif() add_library(LibWidget libwidget.cpp) -target_link_libraries(LibWidget KI18n ${QT_GUI_TARGET}) +target_link_libraries(LibWidget KI18n ${QT_QTGUI_TARGET}) set_property(TARGET LibWidget PROPERTY NO_KUIT_SEMANTIC ON) set_property(TARGET LibWidget PROPERTY TRANSLATION_DOMAIN customdomain) add_library(MyWidget mywidget.cpp) -target_link_libraries(MyWidget KI18n ${QT_GUI_TARGET}) +target_link_libraries(MyWidget KI18n ${QT_QTGUI_TARGET}) add_executable(QtAutoUicInterface main.cpp) target_compile_definitions(QtAutoUicInterface diff --git a/Tests/QtAutoUicInterface/klocalizedstring.cpp b/Tests/QtAutogen/UicInterface/klocalizedstring.cpp similarity index 100% rename from Tests/QtAutoUicInterface/klocalizedstring.cpp rename to Tests/QtAutogen/UicInterface/klocalizedstring.cpp diff --git a/Tests/QtAutoUicInterface/klocalizedstring.h b/Tests/QtAutogen/UicInterface/klocalizedstring.h similarity index 100% rename from Tests/QtAutoUicInterface/klocalizedstring.h rename to Tests/QtAutogen/UicInterface/klocalizedstring.h diff --git a/Tests/QtAutoUicInterface/libwidget.cpp b/Tests/QtAutogen/UicInterface/libwidget.cpp similarity index 100% rename from Tests/QtAutoUicInterface/libwidget.cpp rename to Tests/QtAutogen/UicInterface/libwidget.cpp diff --git a/Tests/QtAutoUicInterface/libwidget.h b/Tests/QtAutogen/UicInterface/libwidget.h similarity index 100% rename from Tests/QtAutoUicInterface/libwidget.h rename to Tests/QtAutogen/UicInterface/libwidget.h diff --git a/Tests/QtAutoUicInterface/libwidget.ui b/Tests/QtAutogen/UicInterface/libwidget.ui similarity index 100% rename from Tests/QtAutoUicInterface/libwidget.ui rename to Tests/QtAutogen/UicInterface/libwidget.ui diff --git a/Tests/QtAutoUicInterface/main.cpp b/Tests/QtAutogen/UicInterface/main.cpp similarity index 100% rename from Tests/QtAutoUicInterface/main.cpp rename to Tests/QtAutogen/UicInterface/main.cpp diff --git a/Tests/QtAutoUicInterface/mywidget.cpp b/Tests/QtAutogen/UicInterface/mywidget.cpp similarity index 100% rename from Tests/QtAutoUicInterface/mywidget.cpp rename to Tests/QtAutogen/UicInterface/mywidget.cpp diff --git a/Tests/QtAutoUicInterface/mywidget.h b/Tests/QtAutogen/UicInterface/mywidget.h similarity index 100% rename from Tests/QtAutoUicInterface/mywidget.h rename to Tests/QtAutogen/UicInterface/mywidget.h diff --git a/Tests/QtAutoUicInterface/mywidget.ui b/Tests/QtAutogen/UicInterface/mywidget.ui similarity index 100% rename from Tests/QtAutoUicInterface/mywidget.ui rename to Tests/QtAutogen/UicInterface/mywidget.ui https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1504f9f97849777f4690565f8b5879372e7dd51 commit b1504f9f97849777f4690565f8b5879372e7dd51 Author: Sebastian Holtermann AuthorDate: Sat Dec 9 13:30:54 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate RerunRccDepends test diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index b0bf887..46dc224 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1263,21 +1263,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND) add_subdirectory(Qt5Autogen) - add_test(NAME Qt5AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun" - "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun" - ${build_generator_args} - --build-project QtAutogenRerun - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} - -DQT_TEST_VERSION=5 - ${QtAutogen_BUILD_OPTIONS} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun") - add_test(Qt5AutoUicInterface ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface" @@ -1295,21 +1280,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(QT4_WORKS AND QT_QTGUI_FOUND) add_subdirectory(Qt4Autogen) - add_test(NAME Qt4AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun" - "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun" - ${build_generator_args} - --build-project QtAutogenRerun - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} - -DQT_TEST_VERSION=4 - ${QtAutogen_BUILD_OPTIONS} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun") - add_test(Qt4AutoUicInterface ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface" diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index b03c282..5746ab5 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -36,3 +36,4 @@ ADD_AUTOGEN_TEST(RerunMocBasic) if(NOT QT_TEST_VERSION STREQUAL 4) ADD_AUTOGEN_TEST(RerunMocPlugin) endif() +ADD_AUTOGEN_TEST(RerunRccDepends) diff --git a/Tests/QtAutogenRerun/rccDepends.cmake b/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt similarity index 92% rename from Tests/QtAutogenRerun/rccDepends.cmake rename to Tests/QtAutogen/RerunRccDepends/CMakeLists.txt index 68e1482..2e6a5bd 100644 --- a/Tests/QtAutogenRerun/rccDepends.cmake +++ b/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt @@ -1,8 +1,17 @@ +cmake_minimum_required(VERSION 3.10) +project(RerunRccDepends) +include("../AutogenTest.cmake") + +# Tests rcc rebuilding when a resource file changes + +# Dummy executable to generate a clean target +add_executable(dummy dummy.cpp) + # When a .qrc or a file listed in a .qrc file changes, # the target must be rebuilt set(timeformat "%Y%j%H%M%S") -set(rccDepSD "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends") -set(rccDepBD "${CMAKE_CURRENT_BINARY_DIR}/rccDepends") +set(rccDepSD "${CMAKE_CURRENT_SOURCE_DIR}/RccDepends") +set(rccDepBD "${CMAKE_CURRENT_BINARY_DIR}/RccDepends") # Initial build configure_file(${rccDepSD}/resPlainA.qrc.in ${rccDepBD}/resPlain.qrc COPYONLY) @@ -10,10 +19,9 @@ configure_file(${rccDepSD}/resGenA.qrc.in ${rccDepBD}/resGen.qrc.in COPYONLY) try_compile(RCC_DEPENDS "${rccDepBD}" "${rccDepSD}" - rccDepends - CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" - "-DQT_TEST_VERSION=${QT_TEST_VERSION}" - "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" + RccDepends + CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}" + "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" OUTPUT_VARIABLE output ) if (NOT RCC_DEPENDS) diff --git a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt similarity index 64% rename from Tests/QtAutogenRerun/rccDepends/CMakeLists.txt rename to Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt index 291592e..0507e61 100644 --- a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt +++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt @@ -1,17 +1,6 @@ -cmake_minimum_required(VERSION 3.9) -project(rccDepends CXX) - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - set(QT_CORE_TARGET Qt4::QtCore) -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - - find_package(Qt5Core REQUIRED) - set(QT_CORE_TARGET Qt5::Core) -endif() +cmake_minimum_required(VERSION 3.10) +project(RccDepends) +include("../../AutogenTest.cmake") # Enable AUTORCC for all targets set(CMAKE_AUTORCC ON) @@ -23,19 +12,22 @@ configure_file(resGen/input.txt.in resGen/input.txt COPYONLY) configure_file(resGen/input.txt.in resGen/inputAdded.txt COPYONLY) # Generated qrc file with dependency -add_custom_command(OUTPUT resGen.qrc +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in COMMAND ${CMAKE_COMMAND} -E sleep 2 - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc) + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc +) # Target that uses a plain .qrc file add_executable(rccDependsPlain main.cpp ${CMAKE_CURRENT_BINARY_DIR}/resPlain.qrc) -target_link_libraries(rccDependsPlain ${QT_CORE_TARGET}) +target_link_libraries(rccDependsPlain ${QT_QTCORE_TARGET}) add_custom_command(TARGET rccDependsPlain POST_BUILD COMMAND - ${CMAKE_COMMAND} -E echo "$" > targetPlain.txt) + ${CMAKE_COMMAND} -E echo "$" > targetPlain.txt +) # Target that uses a GENERATED .qrc file add_executable(rccDependsGen main.cpp ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc ) -target_link_libraries(rccDependsGen ${QT_CORE_TARGET}) +target_link_libraries(rccDependsGen ${QT_QTCORE_TARGET}) add_custom_command(TARGET rccDependsGen POST_BUILD COMMAND - ${CMAKE_COMMAND} -E echo "$" > targetGen.txt) + ${CMAKE_COMMAND} -E echo "$" > targetGen.txt +) diff --git a/Tests/QtAutogenRerun/rccDepends/main.cpp b/Tests/QtAutogen/RerunRccDepends/RccDepends/main.cpp similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/main.cpp rename to Tests/QtAutogen/RerunRccDepends/RccDepends/main.cpp diff --git a/Tests/QtAutogenRerun/rccDepends/resGen/input.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/input.txt.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resGen/input.txt.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/input.txt.in diff --git a/Tests/QtAutogenRerun/rccDepends/resGen/inputAdded.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/inputAdded.txt.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resGen/inputAdded.txt.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resGen/inputAdded.txt.in diff --git a/Tests/QtAutogenRerun/rccDepends/resGenA.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGenA.qrc.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resGenA.qrc.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resGenA.qrc.in diff --git a/Tests/QtAutogenRerun/rccDepends/resGenB.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resGenB.qrc.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resGenB.qrc.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resGenB.qrc.in diff --git a/Tests/QtAutogenRerun/rccDepends/resPlain/input.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/input.txt.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resPlain/input.txt.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/input.txt.in diff --git a/Tests/QtAutogenRerun/rccDepends/resPlain/inputAdded.txt.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/inputAdded.txt.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resPlain/inputAdded.txt.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resPlain/inputAdded.txt.in diff --git a/Tests/QtAutogenRerun/rccDepends/resPlainA.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainA.qrc.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resPlainA.qrc.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainA.qrc.in diff --git a/Tests/QtAutogenRerun/rccDepends/resPlainB.qrc.in b/Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainB.qrc.in similarity index 100% rename from Tests/QtAutogenRerun/rccDepends/resPlainB.qrc.in rename to Tests/QtAutogen/RerunRccDepends/RccDepends/resPlainB.qrc.in diff --git a/Tests/QtAutogenRerun/dummy.cpp b/Tests/QtAutogen/RerunRccDepends/dummy.cpp similarity index 100% rename from Tests/QtAutogenRerun/dummy.cpp rename to Tests/QtAutogen/RerunRccDepends/dummy.cpp diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt deleted file mode 100644 index 9f1ee28..0000000 --- a/Tests/QtAutogenRerun/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -cmake_policy(SET CMP0071 NEW) -project(QtAutogenRerun) - -# Tell find_package(Qt5) where to find Qt. -if(QT_QMAKE_EXECUTABLE) - get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH) - get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH) - list(APPEND CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR}) -endif() - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - - # Include this directory before using the UseQt4 file. - add_subdirectory(defines_test) - - include(UseQt4) - - set(QT_QTCORE_TARGET Qt4::QtCore) - -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - find_package(Qt5Widgets REQUIRED) - - set(QT_QTCORE_TARGET Qt5::Core) - - include_directories(${Qt5Widgets_INCLUDE_DIRS}) - set(QT_LIBRARIES Qt5::Widgets) - - if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) - add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC}) - endif() - -endif() - -# Dummy executable to generate clean target -add_executable(dummy dummy.cpp) - -# -- Test -include("rccDepends.cmake") diff --git a/Tests/QtAutogenRerun/defines_test/CMakeLists.txt b/Tests/QtAutogenRerun/defines_test/CMakeLists.txt deleted file mode 100644 index 9ee9a22..0000000 --- a/Tests/QtAutogenRerun/defines_test/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ - -add_executable(defines_test defines_test.cpp) -set_target_properties(defines_test PROPERTIES AUTOMOC TRUE) -target_link_libraries(defines_test Qt4::QtGui) diff --git a/Tests/QtAutogenRerun/defines_test/defines_test.cpp b/Tests/QtAutogenRerun/defines_test/defines_test.cpp deleted file mode 100644 index cf4e9cb..0000000 --- a/Tests/QtAutogenRerun/defines_test/defines_test.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -#include - -#ifdef QT_GUI_LIB -#include - -class SomeDocument : public QTextDocument -{ - Q_OBJECT - -Q_SIGNALS: - void someSig(); -}; -#endif - -#ifdef QT_CORE_LIB -class SomeObject : public QObject -{ - Q_OBJECT - -Q_SIGNALS: - void someSig(); -}; -#endif - -int main(int argc, char** argv) -{ -#ifdef QT_CORE_LIB - QMetaObject sosmo = SomeObject::staticMetaObject; -#endif -#ifdef QT_GUI_LIB - QMetaObject sdsmo = SomeDocument::staticMetaObject; -#endif - - return 0; -} - -#include "defines_test.moc" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9fcd1545facf6300181db843260008e1069c7b4 commit e9fcd1545facf6300181db843260008e1069c7b4 Author: Sebastian Holtermann AuthorDate: Sat Dec 9 13:20:58 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate RerunMocPlugin test diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 94413a3..b03c282 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -33,3 +33,6 @@ ADD_AUTOGEN_TEST(StaticLibraryCycle slc) ADD_AUTOGEN_TEST(Complex QtAutogen) # Rerun tests ADD_AUTOGEN_TEST(RerunMocBasic) +if(NOT QT_TEST_VERSION STREQUAL 4) + ADD_AUTOGEN_TEST(RerunMocPlugin) +endif() diff --git a/Tests/QtAutogenRerun/mocPlugin.cmake b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt similarity index 89% rename from Tests/QtAutogenRerun/mocPlugin.cmake rename to Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt index 7ad5ccb..076de8b 100644 --- a/Tests/QtAutogenRerun/mocPlugin.cmake +++ b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt @@ -1,16 +1,25 @@ +cmake_minimum_required(VERSION 3.10) +project(RerunMocPlugin) +include("../AutogenTest.cmake") + +# Tests Q_PLUGIN_METADATA and CMAKE_AUTOMOC_DEPEND_FILTERS +# json file change detection + +# Dummy executable to generate a clean target +add_executable(dummy dummy.cpp) # Utility variables set(timeformat "%Y%j%H%M%S") -set(mocPlugSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/mocPlugin") -set(mocPlugBinDir "${CMAKE_CURRENT_BINARY_DIR}/mocPlugin") +set(mocPlugSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/MocPlugin") +set(mocPlugBinDir "${CMAKE_CURRENT_BINARY_DIR}/MocPlugin") # Initial buid try_compile(MOC_PLUGIN "${mocPlugBinDir}" "${mocPlugSrcDir}" - mocPlugin + MocPlugin CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}" - "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" + "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" OUTPUT_VARIABLE output ) if (NOT MOC_PLUGIN) diff --git a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt similarity index 78% rename from Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt index b7cc5e9..bc0085f 100644 --- a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt @@ -1,19 +1,15 @@ -cmake_minimum_required(VERSION 3.9) -project(mocPlugin CXX) - -set(CMAKE_AUTOMOC_DEPEND_FILTERS - "A_CUSTOM_MACRO" - "[\n][ \t]*A_CUSTOM_MACRO[ \t\r\n]*\\([^,]+,[ \t\r\n]*\"([^\"]+)\"" - ) +cmake_minimum_required(VERSION 3.10) +project(MocPlugin) +include("../../AutogenTest.cmake") if (NOT QT_TEST_VERSION STREQUAL 5) message(SEND_ERROR "Invalid Qt version specified.") endif() -find_package(Qt5Widgets REQUIRED) -if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) - add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC}) -endif() +set(CMAKE_AUTOMOC_DEPEND_FILTERS + "A_CUSTOM_MACRO" + "[\n][ \t]*A_CUSTOM_MACRO[ \t\r\n]*\\([^,]+,[ \t\r\n]*\"([^\"]+)\"" +) configure_file(jsonIn/StyleC.json jsonFiles/StyleC.json) configure_file(jsonIn/StyleC.json jsonFiles/StyleC_Custom.json) @@ -22,7 +18,7 @@ configure_file(jsonIn/StyleD.json jsonFiles/sub/StyleD_Custom.json) configure_file(jsonIn/StyleE.json jsonFiles/StyleE.json) configure_file(jsonIn/StyleE.json jsonFiles/StyleE_Custom.json) -# Enable automoc +# Enable AUTOMOC set(CMAKE_AUTOMOC TRUE) include_directories("${CMAKE_CURRENT_BINARY_DIR}/jsonFiles") diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.cpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleA.cpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.hpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleA.hpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.json similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleA.json rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA.json diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleA_Custom.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA_Custom.json similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleA_Custom.json rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleA_Custom.json diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleB.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.cpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleB.cpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleB.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.hpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleB.hpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleB.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleC.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.cpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleC.cpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleC.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.hpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleC.hpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleC.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleD.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.cpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleD.cpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleD.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.hpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleD.hpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleD.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleE.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.cpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleE.cpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleE.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.hpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleE.hpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleE.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/StyleEInclude.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleEInclude.hpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/StyleEInclude.hpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/StyleEInclude.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/UtilityMacros.hpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/UtilityMacros.hpp similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/UtilityMacros.hpp rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/UtilityMacros.hpp diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB.json similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB.json rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB_Custom.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB_Custom.json similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleB_Custom.json rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleB_Custom.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleC.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleC.json similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleC.json rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleC.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleD.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleD.json similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleD.json rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleD.json diff --git a/Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleE.json b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleE.json similarity index 100% rename from Tests/QtAutogenRerun/mocPlugin/jsonIn/StyleE.json rename to Tests/QtAutogen/RerunMocPlugin/MocPlugin/jsonIn/StyleE.json diff --git a/Tests/QtAutogenRerun/mocPlugin/main.cpp b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/main.cpp similarity index 100% copy from Tests/QtAutogenRerun/mocPlugin/main.cpp copy to Tests/QtAutogen/RerunMocPlugin/MocPlugin/main.cpp diff --git a/Tests/QtAutogenRerun/mocPlugin/main.cpp b/Tests/QtAutogen/RerunMocPlugin/dummy.cpp similarity index 69% rename from Tests/QtAutogenRerun/mocPlugin/main.cpp rename to Tests/QtAutogen/RerunMocPlugin/dummy.cpp index 3ba2ddc..4837a76 100644 --- a/Tests/QtAutogenRerun/mocPlugin/main.cpp +++ b/Tests/QtAutogen/RerunMocPlugin/dummy.cpp @@ -1,4 +1,3 @@ -#include "StyleA.hpp" int main(int argv, char** args) { diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt index 746ba4a..9f1ee28 100644 --- a/Tests/QtAutogenRerun/CMakeLists.txt +++ b/Tests/QtAutogenRerun/CMakeLists.txt @@ -40,10 +40,4 @@ endif() add_executable(dummy dummy.cpp) # -- Test -# Tests Q_PLUGIN_METADATA json file change detection -if (NOT QT_TEST_VERSION STREQUAL 4) - include("mocPlugin.cmake") -endif() - -# -- Test include("rccDepends.cmake") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54b4ff2aee015768a990cb3fccb79f8e87b38a19 commit 54b4ff2aee015768a990cb3fccb79f8e87b38a19 Author: Sebastian Holtermann AuthorDate: Sat Dec 9 13:06:58 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate RerunMocBasic test diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 6921495..94413a3 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -31,3 +31,5 @@ endif() ADD_AUTOGEN_TEST(SameName sameName) ADD_AUTOGEN_TEST(StaticLibraryCycle slc) ADD_AUTOGEN_TEST(Complex QtAutogen) +# Rerun tests +ADD_AUTOGEN_TEST(RerunMocBasic) diff --git a/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt b/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt new file mode 100644 index 0000000..0bb0339 --- /dev/null +++ b/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.10) +project(RerunMocBasic) +include("../AutogenTest.cmake") + +# Dummy executable to generate a clean target +add_executable(dummy dummy.cpp) + +set(timeformat "%Y%j%H%M%S") +set(mocBasicSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/MocBasic") +set(mocBasicBinDir "${CMAKE_CURRENT_BINARY_DIR}/MocBasic") + +# Initial build +configure_file("${mocBasicSrcDir}/test1a.h.in" "${mocBasicBinDir}/test1.h" COPYONLY) +try_compile(MOC_RERUN + "${mocBasicBinDir}" + "${mocBasicSrcDir}" + MocBasic + CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}" + "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" + OUTPUT_VARIABLE output +) +if (NOT MOC_RERUN) + message(SEND_ERROR "Initial build of mocBasic failed. Output: ${output}") +endif() +# Get name of the output binary +file(STRINGS "${mocBasicBinDir}/mocBasic.txt" mocBasicList ENCODING UTF-8) +list(GET mocBasicList 0 mocBasicBin) + +message("Changing the header content for a MOC rerun") +# - Acquire binary timestamps before the build +file(TIMESTAMP "${mocBasicBin}" timeBefore "${timeformat}") +# - Ensure that the timestamp will change +# - Change header file content and rebuild +# - Rebuild +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) +configure_file("${mocBasicSrcDir}/test1b.h.in" "${mocBasicBinDir}/test1.h" COPYONLY) +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocBasicBinDir}" RESULT_VARIABLE result ) +if (result) + message(SEND_ERROR "Second build of mocBasic failed.") +endif() +# - Acquire binary timestamps after the build +file(TIMESTAMP "${mocBasicBin}" timeAfter "${timeformat}") +# - Test if timestamps changed +if (NOT timeAfter GREATER timeBefore) + message(SEND_ERROR "File (${mocBasicBin}) should have changed!") +endif() + + +message("Changing nothing for a MOC rerun") +# - Acquire binary timestamps before the build +file(TIMESTAMP "${mocBasicBin}" timeBefore "${timeformat}") +# - Ensure that the timestamp would change +# - Change nothing +# - Rebuild +execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) +execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocBasicBinDir}" RESULT_VARIABLE result ) +if (result) + message(SEND_ERROR "Third build of mocBasic failed.") +endif() +# - Acquire binary timestamps after the build +file(TIMESTAMP "${mocBasicBin}" timeAfter "${timeformat}") +# - Test if timestamps changed +if (timeAfter GREATER timeBefore) + message(SEND_ERROR "File (${mocBasicBin}) should not have changed!") +endif() diff --git a/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt b/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt new file mode 100644 index 0000000..cec60a4 --- /dev/null +++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.10) +project(MocBasic) +include("../../AutogenTest.cmake") + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +# Generated source file +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/main.cpp + COMMAND ${CMAKE_COMMAND} -E sleep 2 + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/main.cpp +) + +add_executable(mocBasic + ${CMAKE_CURRENT_BINARY_DIR}/test1.h + ${CMAKE_CURRENT_BINARY_DIR}/main.cpp + res1.qrc +) +target_include_directories(mocBasic PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +target_link_libraries(mocBasic ${QT_QTCORE_TARGET}) +# Write target name to text file +add_custom_command(TARGET mocBasic POST_BUILD COMMAND + ${CMAKE_COMMAND} -E echo "$" > mocBasic.txt +) diff --git a/Tests/QtAutogenRerun/mocRerun/input.txt b/Tests/QtAutogen/RerunMocBasic/MocBasic/input.txt similarity index 100% rename from Tests/QtAutogenRerun/mocRerun/input.txt rename to Tests/QtAutogen/RerunMocBasic/MocBasic/input.txt diff --git a/Tests/QtAutogenRerun/mocRerun/main.cpp.in b/Tests/QtAutogen/RerunMocBasic/MocBasic/main.cpp.in similarity index 58% rename from Tests/QtAutogenRerun/mocRerun/main.cpp.in rename to Tests/QtAutogen/RerunMocBasic/MocBasic/main.cpp.in index b37ff61..9d7ea37 100644 --- a/Tests/QtAutogenRerun/mocRerun/main.cpp.in +++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/main.cpp.in @@ -1,5 +1,7 @@ #include "test1.h" +extern int qInitResources_res1(); + class Test2 : public QObject { Q_OBJECT @@ -9,6 +11,9 @@ public slots: int main() { + // Fails to link if the rcc generated symbol is not present. + qInitResources_res1(); + Test1 test1; Test2 test2; diff --git a/Tests/QtAutogenRerun/mocRerun/res1.qrc b/Tests/QtAutogen/RerunMocBasic/MocBasic/res1.qrc similarity index 100% rename from Tests/QtAutogenRerun/mocRerun/res1.qrc rename to Tests/QtAutogen/RerunMocBasic/MocBasic/res1.qrc diff --git a/Tests/QtAutogenRerun/mocRerun/test1a.h.in b/Tests/QtAutogen/RerunMocBasic/MocBasic/test1a.h.in similarity index 100% rename from Tests/QtAutogenRerun/mocRerun/test1a.h.in rename to Tests/QtAutogen/RerunMocBasic/MocBasic/test1a.h.in diff --git a/Tests/QtAutogenRerun/mocRerun/test1b.h.in b/Tests/QtAutogen/RerunMocBasic/MocBasic/test1b.h.in similarity index 100% rename from Tests/QtAutogenRerun/mocRerun/test1b.h.in rename to Tests/QtAutogen/RerunMocBasic/MocBasic/test1b.h.in diff --git a/Tests/QtAutogen/RerunMocBasic/dummy.cpp b/Tests/QtAutogen/RerunMocBasic/dummy.cpp new file mode 100644 index 0000000..4837a76 --- /dev/null +++ b/Tests/QtAutogen/RerunMocBasic/dummy.cpp @@ -0,0 +1,5 @@ + +int main(int argv, char** args) +{ + return 0; +} diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt index e72c191..746ba4a 100644 --- a/Tests/QtAutogenRerun/CMakeLists.txt +++ b/Tests/QtAutogenRerun/CMakeLists.txt @@ -6,7 +6,7 @@ project(QtAutogenRerun) if(QT_QMAKE_EXECUTABLE) get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH) get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH) - set(CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR}) + list(APPEND CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR}) endif() if (QT_TEST_VERSION STREQUAL 4) @@ -40,9 +40,6 @@ endif() add_executable(dummy dummy.cpp) # -- Test -include("mocRerun.cmake") - -# -- Test # Tests Q_PLUGIN_METADATA json file change detection if (NOT QT_TEST_VERSION STREQUAL 4) include("mocPlugin.cmake") diff --git a/Tests/QtAutogenRerun/mocRerun.cmake b/Tests/QtAutogenRerun/mocRerun.cmake deleted file mode 100644 index a92912b..0000000 --- a/Tests/QtAutogenRerun/mocRerun.cmake +++ /dev/null @@ -1,60 +0,0 @@ - -set(timeformat "%Y%j%H%M%S") -set(mocRerunSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/mocRerun") -set(mocRerunBinDir "${CMAKE_CURRENT_BINARY_DIR}/mocRerun") - -# Initial build -configure_file("${mocRerunSrcDir}/test1a.h.in" "${mocRerunBinDir}/test1.h" COPYONLY) -try_compile(MOC_RERUN - "${mocRerunBinDir}" - "${mocRerunSrcDir}" - mocRerun - CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" - "-DQT_TEST_VERSION=${QT_TEST_VERSION}" - "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" - OUTPUT_VARIABLE output -) -if (NOT MOC_RERUN) - message(SEND_ERROR "Initial build of mocRerun failed. Output: ${output}") -endif() -# Get name of the output binary -file(STRINGS "${mocRerunBinDir}/mocRerun.txt" mocRerunList ENCODING UTF-8) -list(GET mocRerunList 0 mocRerunBin) - -message("Changing the header content for a MOC rerun") -# - Acquire binary timestamps before the build -file(TIMESTAMP "${mocRerunBin}" timeBefore "${timeformat}") -# - Ensure that the timestamp will change -# - Change header file content and rebuild -# - Rebuild -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) -configure_file("${mocRerunSrcDir}/test1b.h.in" "${mocRerunBinDir}/test1.h" COPYONLY) -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocRerunBinDir}" RESULT_VARIABLE result ) -if (result) - message(SEND_ERROR "Second build of mocRerun failed.") -endif() -# - Acquire binary timestamps after the build -file(TIMESTAMP "${mocRerunBin}" timeAfter "${timeformat}") -# - Test if timestamps changed -if (NOT timeAfter GREATER timeBefore) - message(SEND_ERROR "File (${mocRerunBin}) should have changed!") -endif() - - -message("Changing nothing for a MOC rerun") -# - Acquire binary timestamps before the build -file(TIMESTAMP "${mocRerunBin}" timeBefore "${timeformat}") -# - Ensure that the timestamp would change -# - Change nothing -# - Rebuild -execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) -execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${mocRerunBinDir}" RESULT_VARIABLE result ) -if (result) - message(SEND_ERROR "Third build of mocRerun failed.") -endif() -# - Acquire binary timestamps after the build -file(TIMESTAMP "${mocRerunBin}" timeAfter "${timeformat}") -# - Test if timestamps changed -if (timeAfter GREATER timeBefore) - message(SEND_ERROR "File (${mocRerunBin}) should not have changed!") -endif() diff --git a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt deleted file mode 100644 index bafd9cf..0000000 --- a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -cmake_policy(SET CMP0071 NEW) -project(mocRerun CXX) - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - set(QT_CORE_TARGET Qt4::QtCore) -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - - find_package(Qt5Core REQUIRED) - set(QT_CORE_TARGET Qt5::Core) -endif() - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -# Generated source file -add_custom_command(OUTPUT main.cpp - COMMAND ${CMAKE_COMMAND} -E sleep 2 - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/main.cpp) - -add_executable(mocRerun - ${CMAKE_CURRENT_BINARY_DIR}/test1.h - ${CMAKE_CURRENT_BINARY_DIR}/main.cpp - res1.qrc) -target_include_directories(mocRerun PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(mocRerun ${QT_CORE_TARGET}) -# Write target name to text file -add_custom_command(TARGET mocRerun POST_BUILD COMMAND - ${CMAKE_COMMAND} -E echo "$" > mocRerun.txt) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4988746e76703269d76c3fb633bafc0767fafbe4 commit 4988746e76703269d76c3fb633bafc0767fafbe4 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 20:28:17 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate Complex test diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5608933..b0bf887 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1246,10 +1246,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release # the required dlls may not be in the PATH, so we can't run the executables # on that platform. if(WIN32) - set(run_autogen_test ${CMAKE_CTEST_COMMAND} -V) set(run_autouic_test ${CMAKE_CTEST_COMMAND} -V) else() - set(run_autogen_test complex/QtAutogen) set(run_autouic_test QtAutoUicInterface) endif() if(NOT CMAKE_CONFIGURATION_TYPES) @@ -1265,22 +1263,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND) add_subdirectory(Qt5Autogen) - add_test(NAME Qt5Autogen COMMAND ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutogen" - "${CMake_BINARY_DIR}/Tests/Qt5Autogen" - ${build_generator_args} - --build-project QtAutogen - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Autogen" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} - -DQT_TEST_VERSION=5 - ${QtAutogen_BUILD_OPTIONS} - --test-command ${run_autogen_test} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Autogen") - add_test(NAME Qt5AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun" @@ -1313,22 +1295,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(QT4_WORKS AND QT_QTGUI_FOUND) add_subdirectory(Qt4Autogen) - add_test(NAME Qt4Autogen COMMAND ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/QtAutogen" - "${CMake_BINARY_DIR}/Tests/Qt4Autogen" - ${build_generator_args} - --build-project QtAutogen - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Autogen" - --force-new-ctest-process - --build-options ${build_options} - -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} - -DQT_TEST_VERSION=4 - ${QtAutogen_BUILD_OPTIONS} - --test-command ${run_autogen_test} - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Autogen") - add_test(NAME Qt4AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/QtAutogenRerun" diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt deleted file mode 100644 index 833f64e..0000000 --- a/Tests/QtAutogen/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -cmake_policy(SET CMP0071 NEW) -project(QtAutogen) - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - - # Include this directory before using the UseQt4 file. - add_subdirectory(defines_test) - - include(UseQt4) - - set(QT_QTCORE_TARGET Qt4::QtCore) - - macro(qtx_wrap_cpp) - qt4_wrap_cpp(${ARGN}) - endmacro() - macro(qtx_generate_moc) - qt4_generate_moc(${ARGN}) - endmacro() - -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - find_package(Qt5Widgets REQUIRED) - - set(QT_QTCORE_TARGET Qt5::Core) - - include_directories(${Qt5Widgets_INCLUDE_DIRS}) - set(QT_LIBRARIES Qt5::Widgets) - - if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) - add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC}) - endif() - - macro(qtx_wrap_cpp) - qt5_wrap_cpp(${ARGN}) - endmacro() - macro(qtx_generate_moc) - qt5_generate_moc(${ARGN}) - endmacro() - -endif() - -get_property(QT_COMPILE_FEATURES TARGET ${QT_QTCORE_TARGET} PROPERTY INTERFACE_COMPILE_FEATURES) - -# Qt4 moc does not support utf8 paths in _parameter files generated by -# qtx_wrap_cpp -# https://bugreports.qt.io/browse/QTBUG-35480 -# Do a simple check if there is are non ASCII character in the build path -string(REGEX MATCH "[^ -~]+" NON_ASCII_BDIR ${CMAKE_CURRENT_BINARY_DIR}) -if((NOT NON_ASCII_BDIR) OR (NOT QT_TEST_VERSION STREQUAL 4)) - set(ALLOW_WRAP_CPP TRUE) -endif() -# On windows qtx_wrap_cpp also fails in Qt5 when used on a path that -# contains non ASCII characters -if(NON_ASCII_BDIR AND WIN32) - set(ALLOW_WRAP_CPP FALSE) -endif() - -# -- Test -# Complex test case -add_subdirectory(complex) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 29bc4af..6921495 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -30,3 +30,4 @@ if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) endif() ADD_AUTOGEN_TEST(SameName sameName) ADD_AUTOGEN_TEST(StaticLibraryCycle slc) +ADD_AUTOGEN_TEST(Complex QtAutogen) diff --git a/Tests/QtAutogen/complex/Adir/CMakeLists.txt b/Tests/QtAutogen/Complex/Adir/CMakeLists.txt similarity index 100% rename from Tests/QtAutogen/complex/Adir/CMakeLists.txt rename to Tests/QtAutogen/Complex/Adir/CMakeLists.txt diff --git a/Tests/QtAutogen/complex/Adir/libA.cpp b/Tests/QtAutogen/Complex/Adir/libA.cpp similarity index 100% rename from Tests/QtAutogen/complex/Adir/libA.cpp rename to Tests/QtAutogen/Complex/Adir/libA.cpp diff --git a/Tests/QtAutogen/complex/Adir/libA.h b/Tests/QtAutogen/Complex/Adir/libA.h similarity index 100% rename from Tests/QtAutogen/complex/Adir/libA.h rename to Tests/QtAutogen/Complex/Adir/libA.h diff --git a/Tests/QtAutogen/complex/Bdir/CMakeLists.txt b/Tests/QtAutogen/Complex/Bdir/CMakeLists.txt similarity index 100% rename from Tests/QtAutogen/complex/Bdir/CMakeLists.txt rename to Tests/QtAutogen/Complex/Bdir/CMakeLists.txt diff --git a/Tests/QtAutogen/complex/Bdir/libB.cpp b/Tests/QtAutogen/Complex/Bdir/libB.cpp similarity index 100% rename from Tests/QtAutogen/complex/Bdir/libB.cpp rename to Tests/QtAutogen/Complex/Bdir/libB.cpp diff --git a/Tests/QtAutogen/complex/Bdir/libB.h b/Tests/QtAutogen/Complex/Bdir/libB.h similarity index 100% rename from Tests/QtAutogen/complex/Bdir/libB.h rename to Tests/QtAutogen/Complex/Bdir/libB.h diff --git a/Tests/QtAutogen/complex/CMakeLists.txt b/Tests/QtAutogen/Complex/CMakeLists.txt similarity index 97% rename from Tests/QtAutogen/complex/CMakeLists.txt rename to Tests/QtAutogen/Complex/CMakeLists.txt index 2043ccf..e9feea0 100644 --- a/Tests/QtAutogen/complex/CMakeLists.txt +++ b/Tests/QtAutogen/Complex/CMakeLists.txt @@ -1,4 +1,6 @@ -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.10) +project(Complex) +include("../AutogenTest.cmake") # -- Test: AUTOMOC AUTORCC AUTOUIC add_definitions(-DFOO -DSomeDefine="Barx") @@ -20,7 +22,7 @@ add_custom_command( OUTPUT generated.txt COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/generated.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/generated.txt" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/generated.txt.in" - ) +) add_custom_target(generate_moc_input DEPENDS generated.txt diff --git a/Tests/QtAutogen/complex/abc.cpp b/Tests/QtAutogen/Complex/abc.cpp similarity index 100% rename from Tests/QtAutogen/complex/abc.cpp rename to Tests/QtAutogen/Complex/abc.cpp diff --git a/Tests/QtAutogen/complex/abc.h b/Tests/QtAutogen/Complex/abc.h similarity index 100% rename from Tests/QtAutogen/complex/abc.h rename to Tests/QtAutogen/Complex/abc.h diff --git a/Tests/QtAutogen/complex/abc_p.h b/Tests/QtAutogen/Complex/abc_p.h similarity index 100% rename from Tests/QtAutogen/complex/abc_p.h rename to Tests/QtAutogen/Complex/abc_p.h diff --git a/Tests/QtAutogen/complex/bar.cpp b/Tests/QtAutogen/Complex/bar.cpp similarity index 100% rename from Tests/QtAutogen/complex/bar.cpp rename to Tests/QtAutogen/Complex/bar.cpp diff --git a/Tests/QtAutogen/complex/blub.cpp b/Tests/QtAutogen/Complex/blub.cpp similarity index 100% rename from Tests/QtAutogen/complex/blub.cpp rename to Tests/QtAutogen/Complex/blub.cpp diff --git a/Tests/QtAutogen/complex/blub.h b/Tests/QtAutogen/Complex/blub.h similarity index 100% rename from Tests/QtAutogen/complex/blub.h rename to Tests/QtAutogen/Complex/blub.h diff --git a/Tests/QtAutogen/complex/calwidget.cpp b/Tests/QtAutogen/Complex/calwidget.cpp similarity index 100% rename from Tests/QtAutogen/complex/calwidget.cpp rename to Tests/QtAutogen/Complex/calwidget.cpp diff --git a/Tests/QtAutogen/complex/calwidget.h b/Tests/QtAutogen/Complex/calwidget.h similarity index 100% rename from Tests/QtAutogen/complex/calwidget.h rename to Tests/QtAutogen/Complex/calwidget.h diff --git a/Tests/QtAutogen/complex/calwidget.ui b/Tests/QtAutogen/Complex/calwidget.ui similarity index 100% rename from Tests/QtAutogen/complex/calwidget.ui rename to Tests/QtAutogen/Complex/calwidget.ui diff --git a/Tests/QtAutogen/complex/codeeditor.cpp b/Tests/QtAutogen/Complex/codeeditor.cpp similarity index 100% rename from Tests/QtAutogen/complex/codeeditor.cpp rename to Tests/QtAutogen/Complex/codeeditor.cpp diff --git a/Tests/QtAutogen/complex/codeeditor.h b/Tests/QtAutogen/Complex/codeeditor.h similarity index 100% rename from Tests/QtAutogen/complex/codeeditor.h rename to Tests/QtAutogen/Complex/codeeditor.h diff --git a/Tests/QtAutogen/complex/debug_class.cpp b/Tests/QtAutogen/Complex/debug_class.cpp similarity index 100% rename from Tests/QtAutogen/complex/debug_class.cpp rename to Tests/QtAutogen/Complex/debug_class.cpp diff --git a/Tests/QtAutogen/complex/debug_class.h b/Tests/QtAutogen/Complex/debug_class.h similarity index 100% rename from Tests/QtAutogen/complex/debug_class.h rename to Tests/QtAutogen/Complex/debug_class.h diff --git a/Tests/QtAutogen/complex/debug_class.ui b/Tests/QtAutogen/Complex/debug_class.ui similarity index 100% rename from Tests/QtAutogen/complex/debug_class.ui rename to Tests/QtAutogen/Complex/debug_class.ui diff --git a/Tests/QtAutogen/complex/debug_resource.qrc b/Tests/QtAutogen/Complex/debug_resource.qrc similarity index 100% rename from Tests/QtAutogen/complex/debug_resource.qrc rename to Tests/QtAutogen/Complex/debug_resource.qrc diff --git a/Tests/QtAutogen/complex/foo.cpp b/Tests/QtAutogen/Complex/foo.cpp similarity index 100% rename from Tests/QtAutogen/complex/foo.cpp rename to Tests/QtAutogen/Complex/foo.cpp diff --git a/Tests/QtAutogen/complex/foo.h b/Tests/QtAutogen/Complex/foo.h similarity index 100% rename from Tests/QtAutogen/complex/foo.h rename to Tests/QtAutogen/Complex/foo.h diff --git a/Tests/QtAutogen/complex/gadget.cpp b/Tests/QtAutogen/Complex/gadget.cpp similarity index 100% rename from Tests/QtAutogen/complex/gadget.cpp rename to Tests/QtAutogen/Complex/gadget.cpp diff --git a/Tests/QtAutogen/complex/gadget.h b/Tests/QtAutogen/Complex/gadget.h similarity index 100% rename from Tests/QtAutogen/complex/gadget.h rename to Tests/QtAutogen/Complex/gadget.h diff --git a/Tests/QtAutogen/complex/generated.cpp b/Tests/QtAutogen/Complex/generated.cpp similarity index 100% rename from Tests/QtAutogen/complex/generated.cpp rename to Tests/QtAutogen/Complex/generated.cpp diff --git a/Tests/QtAutogen/complex/generated.h b/Tests/QtAutogen/Complex/generated.h similarity index 100% rename from Tests/QtAutogen/complex/generated.h rename to Tests/QtAutogen/Complex/generated.h diff --git a/Tests/QtAutogen/complex/generated.txt.in b/Tests/QtAutogen/Complex/generated.txt.in similarity index 100% rename from Tests/QtAutogen/complex/generated.txt.in rename to Tests/QtAutogen/Complex/generated.txt.in diff --git a/Tests/QtAutogen/complex/generated_resource.qrc.in b/Tests/QtAutogen/Complex/generated_resource.qrc.in similarity index 100% rename from Tests/QtAutogen/complex/generated_resource.qrc.in rename to Tests/QtAutogen/Complex/generated_resource.qrc.in diff --git a/Tests/QtAutogen/complex/libC.cpp b/Tests/QtAutogen/Complex/libC.cpp similarity index 100% rename from Tests/QtAutogen/complex/libC.cpp rename to Tests/QtAutogen/Complex/libC.cpp diff --git a/Tests/QtAutogen/complex/libC.h b/Tests/QtAutogen/Complex/libC.h similarity index 100% rename from Tests/QtAutogen/complex/libC.h rename to Tests/QtAutogen/Complex/libC.h diff --git a/Tests/QtAutogen/complex/main.cpp b/Tests/QtAutogen/Complex/main.cpp similarity index 100% rename from Tests/QtAutogen/complex/main.cpp rename to Tests/QtAutogen/Complex/main.cpp diff --git a/Tests/QtAutogen/complex/multiplewidgets.cpp b/Tests/QtAutogen/Complex/multiplewidgets.cpp similarity index 100% rename from Tests/QtAutogen/complex/multiplewidgets.cpp rename to Tests/QtAutogen/Complex/multiplewidgets.cpp diff --git a/Tests/QtAutogen/complex/multiplewidgets.h b/Tests/QtAutogen/Complex/multiplewidgets.h similarity index 100% rename from Tests/QtAutogen/complex/multiplewidgets.h rename to Tests/QtAutogen/Complex/multiplewidgets.h diff --git a/Tests/QtAutogen/complex/myinterface.h.in b/Tests/QtAutogen/Complex/myinterface.h.in similarity index 100% rename from Tests/QtAutogen/complex/myinterface.h.in rename to Tests/QtAutogen/Complex/myinterface.h.in diff --git a/Tests/QtAutogen/complex/myotherinterface.h.in b/Tests/QtAutogen/Complex/myotherinterface.h.in similarity index 100% rename from Tests/QtAutogen/complex/myotherinterface.h.in rename to Tests/QtAutogen/Complex/myotherinterface.h.in diff --git a/Tests/QtAutogen/complex/private_slot.cpp b/Tests/QtAutogen/Complex/private_slot.cpp similarity index 100% rename from Tests/QtAutogen/complex/private_slot.cpp rename to Tests/QtAutogen/Complex/private_slot.cpp diff --git a/Tests/QtAutogen/complex/private_slot.h b/Tests/QtAutogen/Complex/private_slot.h similarity index 100% rename from Tests/QtAutogen/complex/private_slot.h rename to Tests/QtAutogen/Complex/private_slot.h diff --git a/Tests/QtAutogen/complex/resourcetester.cpp b/Tests/QtAutogen/Complex/resourcetester.cpp similarity index 100% rename from Tests/QtAutogen/complex/resourcetester.cpp rename to Tests/QtAutogen/Complex/resourcetester.cpp diff --git a/Tests/QtAutogen/complex/resourcetester.h b/Tests/QtAutogen/Complex/resourcetester.h similarity index 100% rename from Tests/QtAutogen/complex/resourcetester.h rename to Tests/QtAutogen/Complex/resourcetester.h diff --git a/Tests/QtAutogen/complex/second_resource.qrc b/Tests/QtAutogen/Complex/second_resource.qrc similarity index 100% rename from Tests/QtAutogen/complex/second_resource.qrc rename to Tests/QtAutogen/Complex/second_resource.qrc diff --git a/Tests/QtAutogen/complex/second_widget.cpp b/Tests/QtAutogen/Complex/second_widget.cpp similarity index 100% rename from Tests/QtAutogen/complex/second_widget.cpp rename to Tests/QtAutogen/Complex/second_widget.cpp diff --git a/Tests/QtAutogen/complex/second_widget.h b/Tests/QtAutogen/Complex/second_widget.h similarity index 100% rename from Tests/QtAutogen/complex/second_widget.h rename to Tests/QtAutogen/Complex/second_widget.h diff --git a/Tests/QtAutogen/complex/second_widget.ui b/Tests/QtAutogen/Complex/second_widget.ui similarity index 100% rename from Tests/QtAutogen/complex/second_widget.ui rename to Tests/QtAutogen/Complex/second_widget.ui diff --git a/Tests/QtAutogen/complex/sub/bar.h b/Tests/QtAutogen/Complex/sub/bar.h similarity index 100% rename from Tests/QtAutogen/complex/sub/bar.h rename to Tests/QtAutogen/Complex/sub/bar.h diff --git a/Tests/QtAutogen/complex/targetObjectsTest.cpp b/Tests/QtAutogen/Complex/targetObjectsTest.cpp similarity index 100% rename from Tests/QtAutogen/complex/targetObjectsTest.cpp rename to Tests/QtAutogen/Complex/targetObjectsTest.cpp diff --git a/Tests/QtAutogen/complex/test.qrc b/Tests/QtAutogen/Complex/test.qrc similarity index 100% rename from Tests/QtAutogen/complex/test.qrc rename to Tests/QtAutogen/Complex/test.qrc diff --git a/Tests/QtAutogen/complex/widget1.ui b/Tests/QtAutogen/Complex/widget1.ui similarity index 100% rename from Tests/QtAutogen/complex/widget1.ui rename to Tests/QtAutogen/Complex/widget1.ui diff --git a/Tests/QtAutogen/complex/widget2.ui b/Tests/QtAutogen/Complex/widget2.ui similarity index 100% rename from Tests/QtAutogen/complex/widget2.ui rename to Tests/QtAutogen/Complex/widget2.ui diff --git a/Tests/QtAutogen/complex/xyz.cpp b/Tests/QtAutogen/Complex/xyz.cpp similarity index 100% rename from Tests/QtAutogen/complex/xyz.cpp rename to Tests/QtAutogen/Complex/xyz.cpp diff --git a/Tests/QtAutogen/complex/xyz.h b/Tests/QtAutogen/Complex/xyz.h similarity index 100% rename from Tests/QtAutogen/complex/xyz.h rename to Tests/QtAutogen/Complex/xyz.h diff --git a/Tests/QtAutogen/complex/yaf.cpp b/Tests/QtAutogen/Complex/yaf.cpp similarity index 100% rename from Tests/QtAutogen/complex/yaf.cpp rename to Tests/QtAutogen/Complex/yaf.cpp diff --git a/Tests/QtAutogen/complex/yaf.h b/Tests/QtAutogen/Complex/yaf.h similarity index 100% rename from Tests/QtAutogen/complex/yaf.h rename to Tests/QtAutogen/Complex/yaf.h diff --git a/Tests/QtAutogen/complex/yaf_p.h b/Tests/QtAutogen/Complex/yaf_p.h similarity index 100% rename from Tests/QtAutogen/complex/yaf_p.h rename to Tests/QtAutogen/Complex/yaf_p.h diff --git a/Tests/QtAutogen/defines_test/CMakeLists.txt b/Tests/QtAutogen/defines_test/CMakeLists.txt deleted file mode 100644 index 9ee9a22..0000000 --- a/Tests/QtAutogen/defines_test/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ - -add_executable(defines_test defines_test.cpp) -set_target_properties(defines_test PROPERTIES AUTOMOC TRUE) -target_link_libraries(defines_test Qt4::QtGui) diff --git a/Tests/QtAutogen/defines_test/defines_test.cpp b/Tests/QtAutogen/defines_test/defines_test.cpp deleted file mode 100644 index cf4e9cb..0000000 --- a/Tests/QtAutogen/defines_test/defines_test.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -#include - -#ifdef QT_GUI_LIB -#include - -class SomeDocument : public QTextDocument -{ - Q_OBJECT - -Q_SIGNALS: - void someSig(); -}; -#endif - -#ifdef QT_CORE_LIB -class SomeObject : public QObject -{ - Q_OBJECT - -Q_SIGNALS: - void someSig(); -}; -#endif - -int main(int argc, char** argv) -{ -#ifdef QT_CORE_LIB - QMetaObject sosmo = SomeObject::staticMetaObject; -#endif -#ifdef QT_GUI_LIB - QMetaObject sdsmo = SomeDocument::staticMetaObject; -#endif - - return 0; -} - -#include "defines_test.moc" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ce6fd426ee7649a40c2f253dbc5f814650f0992 commit 6ce6fd426ee7649a40c2f253dbc5f814650f0992 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 20:22:27 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate StaticLibraryCycle test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 47164d2..833f64e 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,9 +60,5 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Tests static library cycles -add_subdirectory(staticLibraryCycle) - -# -- Test # Complex test case add_subdirectory(complex) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 7f72386..29bc4af 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -29,3 +29,4 @@ if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) ADD_AUTOGEN_TEST(MacOsFW) endif() ADD_AUTOGEN_TEST(SameName sameName) +ADD_AUTOGEN_TEST(StaticLibraryCycle slc) diff --git a/Tests/QtAutogen/staticLibraryCycle/CMakeLists.txt b/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt similarity index 73% rename from Tests/QtAutogen/staticLibraryCycle/CMakeLists.txt rename to Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt index 144a435..0c2f987 100644 --- a/Tests/QtAutogen/staticLibraryCycle/CMakeLists.txt +++ b/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt @@ -1,5 +1,8 @@ -# Test AUTOMOC and AUTORCC on source files with the same name -# but in different subdirectories +cmake_minimum_required(VERSION 3.10) +project(StaticLibraryCycle) +include("../AutogenTest.cmake") + +# Test AUTOMOC on cyclic static libraries set(CMAKE_AUTOMOC ON) diff --git a/Tests/QtAutogen/StaticLibraryCycle/a.cpp b/Tests/QtAutogen/StaticLibraryCycle/a.cpp new file mode 100644 index 0000000..faa52e6 --- /dev/null +++ b/Tests/QtAutogen/StaticLibraryCycle/a.cpp @@ -0,0 +1,12 @@ +#include "a.h" +#include "b.h" + +bool A::recursed = false; + +A::A() +{ + if (!A::recursed) { + A::recursed = true; + B b; + } +} diff --git a/Tests/QtAutogen/staticLibraryCycle/a.h b/Tests/QtAutogen/StaticLibraryCycle/a.h similarity index 83% rename from Tests/QtAutogen/staticLibraryCycle/a.h rename to Tests/QtAutogen/StaticLibraryCycle/a.h index 7176170..f24398e 100644 --- a/Tests/QtAutogen/staticLibraryCycle/a.h +++ b/Tests/QtAutogen/StaticLibraryCycle/a.h @@ -6,6 +6,8 @@ class A : public QObject { Q_OBJECT + static bool recursed; + public: A(); }; diff --git a/Tests/QtAutogen/staticLibraryCycle/b.cpp b/Tests/QtAutogen/StaticLibraryCycle/b.cpp similarity index 100% rename from Tests/QtAutogen/staticLibraryCycle/b.cpp rename to Tests/QtAutogen/StaticLibraryCycle/b.cpp diff --git a/Tests/QtAutogen/staticLibraryCycle/b.h b/Tests/QtAutogen/StaticLibraryCycle/b.h similarity index 100% rename from Tests/QtAutogen/staticLibraryCycle/b.h rename to Tests/QtAutogen/StaticLibraryCycle/b.h diff --git a/Tests/QtAutogen/staticLibraryCycle/c.cpp b/Tests/QtAutogen/StaticLibraryCycle/c.cpp similarity index 100% rename from Tests/QtAutogen/staticLibraryCycle/c.cpp rename to Tests/QtAutogen/StaticLibraryCycle/c.cpp diff --git a/Tests/QtAutogen/staticLibraryCycle/c.h b/Tests/QtAutogen/StaticLibraryCycle/c.h similarity index 100% rename from Tests/QtAutogen/staticLibraryCycle/c.h rename to Tests/QtAutogen/StaticLibraryCycle/c.h diff --git a/Tests/QtAutogen/staticLibraryCycle/main.cpp b/Tests/QtAutogen/StaticLibraryCycle/main.cpp similarity index 100% rename from Tests/QtAutogen/staticLibraryCycle/main.cpp rename to Tests/QtAutogen/StaticLibraryCycle/main.cpp diff --git a/Tests/QtAutogen/staticLibraryCycle/a.cpp b/Tests/QtAutogen/staticLibraryCycle/a.cpp deleted file mode 100644 index 97cc66e..0000000 --- a/Tests/QtAutogen/staticLibraryCycle/a.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "a.h" -#include "b.h" - -A::A() -{ - B b; -} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45b6776ab301f4b5ec51e27863ffe061b1a0d60a commit 45b6776ab301f4b5ec51e27863ffe061b1a0d60a Author: Sebastian Holtermann AuthorDate: Fri Dec 8 20:12:30 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate SameName test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index d13c826..47164d2 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,10 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Source files with the same basename in different subdirectories -add_subdirectory(sameName) - -# -- Test # Tests static library cycles add_subdirectory(staticLibraryCycle) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 1e2894e..7f72386 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -28,3 +28,4 @@ ADD_AUTOGEN_TEST(ObjectLibrary someProgram) if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) ADD_AUTOGEN_TEST(MacOsFW) endif() +ADD_AUTOGEN_TEST(SameName sameName) diff --git a/Tests/QtAutogen/sameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt similarity index 89% rename from Tests/QtAutogen/sameName/CMakeLists.txt rename to Tests/QtAutogen/SameName/CMakeLists.txt index f695875..c7d6e52 100644 --- a/Tests/QtAutogen/sameName/CMakeLists.txt +++ b/Tests/QtAutogen/SameName/CMakeLists.txt @@ -1,3 +1,7 @@ +cmake_minimum_required(VERSION 3.10) +project(SameName) +include("../AutogenTest.cmake") + # Test AUTOMOC and AUTORCC on source files with the same name # but in different subdirectories @@ -20,7 +24,8 @@ target_link_libraries(sameName ${QT_LIBRARIES}) set_target_properties(sameName PROPERTIES AUTOMOC TRUE AUTOUIC TRUE - AUTORCC TRUE) + AUTORCC TRUE +) # Set different compression levels if (QT_TEST_VERSION STREQUAL 4) diff --git a/Tests/QtAutogen/sameName/aaa/bbb/data.qrc b/Tests/QtAutogen/SameName/aaa/bbb/data.qrc similarity index 100% rename from Tests/QtAutogen/sameName/aaa/bbb/data.qrc rename to Tests/QtAutogen/SameName/aaa/bbb/data.qrc diff --git a/Tests/QtAutogen/sameName/aaa/bbb/item.cpp b/Tests/QtAutogen/SameName/aaa/bbb/item.cpp similarity index 100% rename from Tests/QtAutogen/sameName/aaa/bbb/item.cpp rename to Tests/QtAutogen/SameName/aaa/bbb/item.cpp diff --git a/Tests/QtAutogen/sameName/aaa/bbb/item.hpp b/Tests/QtAutogen/SameName/aaa/bbb/item.hpp similarity index 100% rename from Tests/QtAutogen/sameName/aaa/bbb/item.hpp rename to Tests/QtAutogen/SameName/aaa/bbb/item.hpp diff --git a/Tests/QtAutogen/sameName/aaa/data.qrc b/Tests/QtAutogen/SameName/aaa/data.qrc similarity index 100% rename from Tests/QtAutogen/sameName/aaa/data.qrc rename to Tests/QtAutogen/SameName/aaa/data.qrc diff --git a/Tests/QtAutogen/sameName/aaa/item.cpp b/Tests/QtAutogen/SameName/aaa/item.cpp similarity index 100% rename from Tests/QtAutogen/sameName/aaa/item.cpp rename to Tests/QtAutogen/SameName/aaa/item.cpp diff --git a/Tests/QtAutogen/sameName/aaa/item.hpp b/Tests/QtAutogen/SameName/aaa/item.hpp similarity index 100% rename from Tests/QtAutogen/sameName/aaa/item.hpp rename to Tests/QtAutogen/SameName/aaa/item.hpp diff --git a/Tests/QtAutogen/sameName/aaa/view.ui b/Tests/QtAutogen/SameName/aaa/view.ui similarity index 100% rename from Tests/QtAutogen/sameName/aaa/view.ui rename to Tests/QtAutogen/SameName/aaa/view.ui diff --git a/Tests/QtAutogen/sameName/bbb/aaa/data.qrc b/Tests/QtAutogen/SameName/bbb/aaa/data.qrc similarity index 100% rename from Tests/QtAutogen/sameName/bbb/aaa/data.qrc rename to Tests/QtAutogen/SameName/bbb/aaa/data.qrc diff --git a/Tests/QtAutogen/sameName/bbb/aaa/item.cpp b/Tests/QtAutogen/SameName/bbb/aaa/item.cpp similarity index 100% rename from Tests/QtAutogen/sameName/bbb/aaa/item.cpp rename to Tests/QtAutogen/SameName/bbb/aaa/item.cpp diff --git a/Tests/QtAutogen/sameName/bbb/aaa/item.hpp b/Tests/QtAutogen/SameName/bbb/aaa/item.hpp similarity index 100% rename from Tests/QtAutogen/sameName/bbb/aaa/item.hpp rename to Tests/QtAutogen/SameName/bbb/aaa/item.hpp diff --git a/Tests/QtAutogen/sameName/bbb/data.qrc b/Tests/QtAutogen/SameName/bbb/data.qrc similarity index 100% rename from Tests/QtAutogen/sameName/bbb/data.qrc rename to Tests/QtAutogen/SameName/bbb/data.qrc diff --git a/Tests/QtAutogen/sameName/bbb/item.cpp b/Tests/QtAutogen/SameName/bbb/item.cpp similarity index 100% rename from Tests/QtAutogen/sameName/bbb/item.cpp rename to Tests/QtAutogen/SameName/bbb/item.cpp diff --git a/Tests/QtAutogen/sameName/bbb/item.hpp b/Tests/QtAutogen/SameName/bbb/item.hpp similarity index 100% rename from Tests/QtAutogen/sameName/bbb/item.hpp rename to Tests/QtAutogen/SameName/bbb/item.hpp diff --git a/Tests/QtAutogen/sameName/bbb/view.ui b/Tests/QtAutogen/SameName/bbb/view.ui similarity index 100% rename from Tests/QtAutogen/sameName/bbb/view.ui rename to Tests/QtAutogen/SameName/bbb/view.ui diff --git a/Tests/QtAutogen/sameName/ccc/data.qrc b/Tests/QtAutogen/SameName/ccc/data.qrc similarity index 100% rename from Tests/QtAutogen/sameName/ccc/data.qrc rename to Tests/QtAutogen/SameName/ccc/data.qrc diff --git a/Tests/QtAutogen/sameName/ccc/item.cpp b/Tests/QtAutogen/SameName/ccc/item.cpp similarity index 100% rename from Tests/QtAutogen/sameName/ccc/item.cpp rename to Tests/QtAutogen/SameName/ccc/item.cpp diff --git a/Tests/QtAutogen/sameName/ccc/item.hpp b/Tests/QtAutogen/SameName/ccc/item.hpp similarity index 100% rename from Tests/QtAutogen/sameName/ccc/item.hpp rename to Tests/QtAutogen/SameName/ccc/item.hpp diff --git a/Tests/QtAutogen/sameName/ccc/view.ui b/Tests/QtAutogen/SameName/ccc/view.ui similarity index 100% rename from Tests/QtAutogen/sameName/ccc/view.ui rename to Tests/QtAutogen/SameName/ccc/view.ui diff --git a/Tests/QtAutogen/sameName/data.qrc b/Tests/QtAutogen/SameName/data.qrc similarity index 100% rename from Tests/QtAutogen/sameName/data.qrc rename to Tests/QtAutogen/SameName/data.qrc diff --git a/Tests/QtAutogen/sameName/item.cpp b/Tests/QtAutogen/SameName/item.cpp similarity index 100% rename from Tests/QtAutogen/sameName/item.cpp rename to Tests/QtAutogen/SameName/item.cpp diff --git a/Tests/QtAutogen/sameName/item.hpp b/Tests/QtAutogen/SameName/item.hpp similarity index 100% rename from Tests/QtAutogen/sameName/item.hpp rename to Tests/QtAutogen/SameName/item.hpp diff --git a/Tests/QtAutogen/sameName/main.cpp b/Tests/QtAutogen/SameName/main.cpp similarity index 100% rename from Tests/QtAutogen/sameName/main.cpp rename to Tests/QtAutogen/SameName/main.cpp diff --git a/Tests/QtAutogen/sameName/view.ui b/Tests/QtAutogen/SameName/view.ui similarity index 100% rename from Tests/QtAutogen/sameName/view.ui rename to Tests/QtAutogen/SameName/view.ui https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7868687c814cded6319dd0cfd9fff5c737bf0f0 commit d7868687c814cded6319dd0cfd9fff5c737bf0f0 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 20:07:55 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate MacOsFW test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 8fb9ab3..d13c826 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,12 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# MacOS Framework -if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) - add_subdirectory(macosFW) -endif() - -# -- Test # Source files with the same basename in different subdirectories add_subdirectory(sameName) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 9e49153..1e2894e 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -25,3 +25,6 @@ if(QT_TEST_ALLOW_QT_MACROS) endif() ADD_AUTOGEN_TEST(UicInclude uicInclude) ADD_AUTOGEN_TEST(ObjectLibrary someProgram) +if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) + ADD_AUTOGEN_TEST(MacOsFW) +endif() diff --git a/Tests/QtAutogen/macosFW/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/CMakeLists.txt similarity index 85% rename from Tests/QtAutogen/macosFW/CMakeLists.txt rename to Tests/QtAutogen/MacOsFW/CMakeLists.txt index 114d9ba..26d2019 100644 --- a/Tests/QtAutogen/macosFW/CMakeLists.txt +++ b/Tests/QtAutogen/MacOsFW/CMakeLists.txt @@ -1,5 +1,6 @@ -cmake_minimum_required(VERSION 3.8) -project(macos-fw-test) +cmake_minimum_required(VERSION 3.10) +project(MacOsFW) +include("../AutogenTest.cmake") find_package(Qt5Test REQUIRED) diff --git a/Tests/QtAutogen/macosFW/src/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/src/CMakeLists.txt similarity index 100% rename from Tests/QtAutogen/macosFW/src/CMakeLists.txt rename to Tests/QtAutogen/MacOsFW/src/CMakeLists.txt diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp b/Tests/QtAutogen/MacOsFW/src/macos_fw_lib.cpp similarity index 100% rename from Tests/QtAutogen/macosFW/src/macos_fw_lib.cpp rename to Tests/QtAutogen/MacOsFW/src/macos_fw_lib.cpp diff --git a/Tests/QtAutogen/macosFW/src/macos_fw_lib.h b/Tests/QtAutogen/MacOsFW/src/macos_fw_lib.h similarity index 100% rename from Tests/QtAutogen/macosFW/src/macos_fw_lib.h rename to Tests/QtAutogen/MacOsFW/src/macos_fw_lib.h diff --git a/Tests/QtAutogen/macosFW/test/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/test/CMakeLists.txt similarity index 100% rename from Tests/QtAutogen/macosFW/test/CMakeLists.txt rename to Tests/QtAutogen/MacOsFW/test/CMakeLists.txt diff --git a/Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp similarity index 100% rename from Tests/QtAutogen/macosFW/test/testMacosFWLib.cpp rename to Tests/QtAutogen/MacOsFW/test/testMacosFWLib.cpp diff --git a/Tests/QtAutogen/macosFW/test/testMacosFWLib.h b/Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h similarity index 100% rename from Tests/QtAutogen/macosFW/test/testMacosFWLib.h rename to Tests/QtAutogen/MacOsFW/test/testMacosFWLib.h https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8ef28ae1f442144f55e23b8defffe01aa350c44 commit b8ef28ae1f442144f55e23b8defffe01aa350c44 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 20:01:48 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate ObjectLibrary test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 288ae60..8fb9ab3 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,10 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# OBJECT libraries -add_subdirectory(objectLibrary) - -# -- Test # MacOS Framework if(APPLE AND (NOT QT_TEST_VERSION STREQUAL 4)) add_subdirectory(macosFW) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index e873d06..9e49153 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -24,3 +24,4 @@ if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocCMP0071) endif() ADD_AUTOGEN_TEST(UicInclude uicInclude) +ADD_AUTOGEN_TEST(ObjectLibrary someProgram) diff --git a/Tests/QtAutogen/objectLibrary/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt similarity index 83% rename from Tests/QtAutogen/objectLibrary/CMakeLists.txt rename to Tests/QtAutogen/ObjectLibrary/CMakeLists.txt index 9b29a40..088a24c 100644 --- a/Tests/QtAutogen/objectLibrary/CMakeLists.txt +++ b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt @@ -1,3 +1,7 @@ +cmake_minimum_required(VERSION 3.10) +project(ObjectLibrary) +include("../AutogenTest.cmake") + set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) diff --git a/Tests/QtAutogen/objectLibrary/a/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt similarity index 100% rename from Tests/QtAutogen/objectLibrary/a/CMakeLists.txt rename to Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt diff --git a/Tests/QtAutogen/objectLibrary/a/classa.cpp b/Tests/QtAutogen/ObjectLibrary/a/classa.cpp similarity index 100% rename from Tests/QtAutogen/objectLibrary/a/classa.cpp rename to Tests/QtAutogen/ObjectLibrary/a/classa.cpp diff --git a/Tests/QtAutogen/objectLibrary/a/classa.h b/Tests/QtAutogen/ObjectLibrary/a/classa.h similarity index 100% rename from Tests/QtAutogen/objectLibrary/a/classa.h rename to Tests/QtAutogen/ObjectLibrary/a/classa.h diff --git a/Tests/QtAutogen/objectLibrary/b/classb.cpp b/Tests/QtAutogen/ObjectLibrary/b/classb.cpp similarity index 100% rename from Tests/QtAutogen/objectLibrary/b/classb.cpp rename to Tests/QtAutogen/ObjectLibrary/b/classb.cpp diff --git a/Tests/QtAutogen/objectLibrary/b/classb.h b/Tests/QtAutogen/ObjectLibrary/b/classb.h similarity index 100% rename from Tests/QtAutogen/objectLibrary/b/classb.h rename to Tests/QtAutogen/ObjectLibrary/b/classb.h diff --git a/Tests/QtAutogen/objectLibrary/main.cpp b/Tests/QtAutogen/ObjectLibrary/main.cpp similarity index 100% rename from Tests/QtAutogen/objectLibrary/main.cpp rename to Tests/QtAutogen/ObjectLibrary/main.cpp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b6ad59ea6b74379f4aefb42c2402355c393c656 commit 0b6ad59ea6b74379f4aefb42c2402355c393c656 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 19:56:26 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:18 2017 +0100 Autogen: Tests: Separate UicInclude test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 1f50931..288ae60 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,10 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Tests various .ui include directories -add_subdirectory(uicInclude) - -# -- Test # OBJECT libraries add_subdirectory(objectLibrary) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 932169b..e873d06 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -23,3 +23,4 @@ endif() if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocCMP0071) endif() +ADD_AUTOGEN_TEST(UicInclude uicInclude) diff --git a/Tests/QtAutogen/uicInclude/CMakeLists.txt b/Tests/QtAutogen/UicInclude/CMakeLists.txt similarity index 68% rename from Tests/QtAutogen/uicInclude/CMakeLists.txt rename to Tests/QtAutogen/UicInclude/CMakeLists.txt index f62ebb0..56f76fb 100644 --- a/Tests/QtAutogen/uicInclude/CMakeLists.txt +++ b/Tests/QtAutogen/UicInclude/CMakeLists.txt @@ -1,5 +1,8 @@ -# Test moc include patterns +cmake_minimum_required(VERSION 3.10) +project(UicInclude) +include("../AutogenTest.cmake") +# Test uic include patterns set(CMAKE_AUTOUIC_SEARCH_PATHS "dirA") add_executable(uicInclude main.cpp) diff --git a/Tests/QtAutogen/uicInclude/PageC.ui b/Tests/QtAutogen/UicInclude/PageC.ui similarity index 100% rename from Tests/QtAutogen/uicInclude/PageC.ui rename to Tests/QtAutogen/UicInclude/PageC.ui diff --git a/Tests/QtAutogen/uicInclude/PageC2.ui b/Tests/QtAutogen/UicInclude/PageC2.ui similarity index 100% rename from Tests/QtAutogen/uicInclude/PageC2.ui rename to Tests/QtAutogen/UicInclude/PageC2.ui diff --git a/Tests/QtAutogen/uicInclude/dirA/PageA.ui b/Tests/QtAutogen/UicInclude/dirA/PageA.ui similarity index 100% rename from Tests/QtAutogen/uicInclude/dirA/PageA.ui rename to Tests/QtAutogen/UicInclude/dirA/PageA.ui diff --git a/Tests/QtAutogen/uicInclude/dirB/PageB.ui b/Tests/QtAutogen/UicInclude/dirB/PageB.ui similarity index 100% rename from Tests/QtAutogen/uicInclude/dirB/PageB.ui rename to Tests/QtAutogen/UicInclude/dirB/PageB.ui diff --git a/Tests/QtAutogen/uicInclude/dirB/PageB2.ui b/Tests/QtAutogen/UicInclude/dirB/PageB2.ui similarity index 100% rename from Tests/QtAutogen/uicInclude/dirB/PageB2.ui rename to Tests/QtAutogen/UicInclude/dirB/PageB2.ui diff --git a/Tests/QtAutogen/uicInclude/dirB/subB/PageBsub.ui b/Tests/QtAutogen/UicInclude/dirB/subB/PageBsub.ui similarity index 100% rename from Tests/QtAutogen/uicInclude/dirB/subB/PageBsub.ui rename to Tests/QtAutogen/UicInclude/dirB/subB/PageBsub.ui diff --git a/Tests/QtAutogen/uicInclude/main.cpp b/Tests/QtAutogen/UicInclude/main.cpp similarity index 100% rename from Tests/QtAutogen/uicInclude/main.cpp rename to Tests/QtAutogen/UicInclude/main.cpp diff --git a/Tests/QtAutogen/uicInclude/main.hpp b/Tests/QtAutogen/UicInclude/main.hpp similarity index 100% rename from Tests/QtAutogen/uicInclude/main.hpp rename to Tests/QtAutogen/UicInclude/main.hpp diff --git a/Tests/QtAutogen/uicInclude/subC/PageCsub.ui b/Tests/QtAutogen/UicInclude/subC/PageCsub.ui similarity index 100% rename from Tests/QtAutogen/uicInclude/subC/PageCsub.ui rename to Tests/QtAutogen/UicInclude/subC/PageCsub.ui https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2c4e3489d9ccd7150b6fda2ea7254c21dcde1b2 commit a2c4e3489d9ccd7150b6fda2ea7254c21dcde1b2 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 19:49:32 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:17 2017 +0100 Autogen: Tests: Separate MocCMP0071 test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 5775117..1f50931 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,12 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Tests policy 0071 -if(ALLOW_WRAP_CPP) - add_subdirectory(mocCMP0071) -endif() - -# -- Test # Tests various .ui include directories add_subdirectory(uicInclude) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 4d89eae..932169b 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -20,3 +20,6 @@ if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocIncludeStrict mocIncludeStrict) ADD_AUTOGEN_TEST(MocIncludeRelaxed mocIncludeRelaxed) endif() +if(QT_TEST_ALLOW_QT_MACROS) + ADD_AUTOGEN_TEST(MocCMP0071) +endif() diff --git a/Tests/QtAutogen/MocCMP0071/CMakeLists.txt b/Tests/QtAutogen/MocCMP0071/CMakeLists.txt new file mode 100644 index 0000000..a79f36e --- /dev/null +++ b/Tests/QtAutogen/MocCMP0071/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.10) +project(MocCMP0071) +include("../AutogenTest.cmake") + +add_subdirectory(OLD) +add_subdirectory(NEW) diff --git a/Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt b/Tests/QtAutogen/MocCMP0071/NEW/CMakeLists.txt similarity index 94% rename from Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt rename to Tests/QtAutogen/MocCMP0071/NEW/CMakeLists.txt index 0237afc..954fe3d 100644 --- a/Tests/QtAutogen/mocCMP0071/NEW/CMakeLists.txt +++ b/Tests/QtAutogen/MocCMP0071/NEW/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.10) cmake_policy(SET CMP0071 NEW) # *Generate* files diff --git a/Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt b/Tests/QtAutogen/MocCMP0071/OLD/CMakeLists.txt similarity index 95% rename from Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt rename to Tests/QtAutogen/MocCMP0071/OLD/CMakeLists.txt index 5699433..68fa067 100644 --- a/Tests/QtAutogen/mocCMP0071/OLD/CMakeLists.txt +++ b/Tests/QtAutogen/MocCMP0071/OLD/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.10) cmake_policy(SET CMP0071 OLD) # *Generate* files diff --git a/Tests/QtAutogen/mocCMP0071/Obj.cpp b/Tests/QtAutogen/MocCMP0071/Obj.cpp similarity index 100% rename from Tests/QtAutogen/mocCMP0071/Obj.cpp rename to Tests/QtAutogen/MocCMP0071/Obj.cpp diff --git a/Tests/QtAutogen/mocCMP0071/Obj.hpp b/Tests/QtAutogen/MocCMP0071/Obj.hpp similarity index 100% rename from Tests/QtAutogen/mocCMP0071/Obj.hpp rename to Tests/QtAutogen/MocCMP0071/Obj.hpp diff --git a/Tests/QtAutogen/mocCMP0071/Obj_p.h b/Tests/QtAutogen/MocCMP0071/Obj_p.h similarity index 100% rename from Tests/QtAutogen/mocCMP0071/Obj_p.h rename to Tests/QtAutogen/MocCMP0071/Obj_p.h diff --git a/Tests/QtAutogen/mocCMP0071/main.cpp b/Tests/QtAutogen/MocCMP0071/main.cpp similarity index 100% rename from Tests/QtAutogen/mocCMP0071/main.cpp rename to Tests/QtAutogen/MocCMP0071/main.cpp diff --git a/Tests/QtAutogen/mocCMP0071/CMakeLists.txt b/Tests/QtAutogen/mocCMP0071/CMakeLists.txt deleted file mode 100644 index 003fa08..0000000 --- a/Tests/QtAutogen/mocCMP0071/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 3.9) -project(mocCMP0071 CXX) -add_subdirectory(OLD) -add_subdirectory(NEW) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc66d356510c51b5240239a212a511fb0d23dc9a commit cc66d356510c51b5240239a212a511fb0d23dc9a Author: Sebastian Holtermann AuthorDate: Fri Dec 8 19:40:17 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:50:17 2017 +0100 Autogen: Tests: Separate MocInclude test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 43fc851..5775117 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,13 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Tests various include moc patterns -if(ALLOW_WRAP_CPP) - add_subdirectory(mocIncludeStrict) - add_subdirectory(mocIncludeRelaxed) -endif() - -# -- Test # Tests policy 0071 if(ALLOW_WRAP_CPP) add_subdirectory(mocCMP0071) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 3cd93ab..4d89eae 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -16,3 +16,7 @@ if(NOT QT_TEST_VERSION STREQUAL 4) ADD_AUTOGEN_TEST(MocMacroName mocMacroName) endif() ADD_AUTOGEN_TEST(MocDepends) +if(QT_TEST_ALLOW_QT_MACROS) + ADD_AUTOGEN_TEST(MocIncludeStrict mocIncludeStrict) + ADD_AUTOGEN_TEST(MocIncludeRelaxed mocIncludeRelaxed) +endif() diff --git a/Tests/QtAutogen/mocInclude/EObjA.cpp b/Tests/QtAutogen/MocInclude/EObjA.cpp similarity index 97% rename from Tests/QtAutogen/mocInclude/EObjA.cpp rename to Tests/QtAutogen/MocInclude/EObjA.cpp index ca713b2..7681c29 100644 --- a/Tests/QtAutogen/mocInclude/EObjA.cpp +++ b/Tests/QtAutogen/MocInclude/EObjA.cpp @@ -35,6 +35,7 @@ EObjA::EObjA() EObjA::~EObjA() { + delete d; } // For EObjALocal diff --git a/Tests/QtAutogen/mocInclude/EObjA.hpp b/Tests/QtAutogen/MocInclude/EObjA.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/EObjA.hpp rename to Tests/QtAutogen/MocInclude/EObjA.hpp diff --git a/Tests/QtAutogen/mocInclude/EObjAExtra.cpp b/Tests/QtAutogen/MocInclude/EObjAExtra.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/EObjAExtra.cpp rename to Tests/QtAutogen/MocInclude/EObjAExtra.cpp diff --git a/Tests/QtAutogen/mocInclude/EObjAExtra.hpp b/Tests/QtAutogen/MocInclude/EObjAExtra.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/EObjAExtra.hpp rename to Tests/QtAutogen/MocInclude/EObjAExtra.hpp diff --git a/Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp b/Tests/QtAutogen/MocInclude/EObjAExtra_p.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/EObjAExtra_p.hpp rename to Tests/QtAutogen/MocInclude/EObjAExtra_p.hpp diff --git a/Tests/QtAutogen/mocInclude/EObjA_p.hpp b/Tests/QtAutogen/MocInclude/EObjA_p.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/EObjA_p.hpp rename to Tests/QtAutogen/MocInclude/EObjA_p.hpp diff --git a/Tests/QtAutogen/mocInclude/EObjB.cpp b/Tests/QtAutogen/MocInclude/EObjB.cpp similarity index 97% rename from Tests/QtAutogen/mocInclude/EObjB.cpp rename to Tests/QtAutogen/MocInclude/EObjB.cpp index d19fbfa..3068c68 100644 --- a/Tests/QtAutogen/mocInclude/EObjB.cpp +++ b/Tests/QtAutogen/MocInclude/EObjB.cpp @@ -35,6 +35,7 @@ EObjB::EObjB() EObjB::~EObjB() { + delete d; } // For EObjBLocal diff --git a/Tests/QtAutogen/mocInclude/EObjB.hpp b/Tests/QtAutogen/MocInclude/EObjB.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/EObjB.hpp rename to Tests/QtAutogen/MocInclude/EObjB.hpp diff --git a/Tests/QtAutogen/mocInclude/EObjB_p.hpp b/Tests/QtAutogen/MocInclude/EObjB_p.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/EObjB_p.hpp rename to Tests/QtAutogen/MocInclude/EObjB_p.hpp diff --git a/Tests/QtAutogen/mocInclude/LObjA.cpp b/Tests/QtAutogen/MocInclude/LObjA.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/LObjA.cpp rename to Tests/QtAutogen/MocInclude/LObjA.cpp diff --git a/Tests/QtAutogen/mocInclude/LObjA.hpp b/Tests/QtAutogen/MocInclude/LObjA.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/LObjA.hpp rename to Tests/QtAutogen/MocInclude/LObjA.hpp diff --git a/Tests/QtAutogen/mocInclude/LObjA_p.h b/Tests/QtAutogen/MocInclude/LObjA_p.h similarity index 100% rename from Tests/QtAutogen/mocInclude/LObjA_p.h rename to Tests/QtAutogen/MocInclude/LObjA_p.h diff --git a/Tests/QtAutogen/mocInclude/LObjB.cpp b/Tests/QtAutogen/MocInclude/LObjB.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/LObjB.cpp rename to Tests/QtAutogen/MocInclude/LObjB.cpp diff --git a/Tests/QtAutogen/mocInclude/LObjB.hpp b/Tests/QtAutogen/MocInclude/LObjB.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/LObjB.hpp rename to Tests/QtAutogen/MocInclude/LObjB.hpp diff --git a/Tests/QtAutogen/mocInclude/LObjB_p.h b/Tests/QtAutogen/MocInclude/LObjB_p.h similarity index 100% rename from Tests/QtAutogen/mocInclude/LObjB_p.h rename to Tests/QtAutogen/MocInclude/LObjB_p.h diff --git a/Tests/QtAutogen/mocInclude/ObjA.cpp b/Tests/QtAutogen/MocInclude/ObjA.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/ObjA.cpp rename to Tests/QtAutogen/MocInclude/ObjA.cpp diff --git a/Tests/QtAutogen/mocInclude/ObjA.hpp b/Tests/QtAutogen/MocInclude/ObjA.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/ObjA.hpp rename to Tests/QtAutogen/MocInclude/ObjA.hpp diff --git a/Tests/QtAutogen/mocInclude/ObjA_p.h b/Tests/QtAutogen/MocInclude/ObjA_p.h similarity index 100% rename from Tests/QtAutogen/mocInclude/ObjA_p.h rename to Tests/QtAutogen/MocInclude/ObjA_p.h diff --git a/Tests/QtAutogen/mocInclude/ObjB.cpp b/Tests/QtAutogen/MocInclude/ObjB.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/ObjB.cpp rename to Tests/QtAutogen/MocInclude/ObjB.cpp diff --git a/Tests/QtAutogen/mocInclude/ObjB.hpp b/Tests/QtAutogen/MocInclude/ObjB.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/ObjB.hpp rename to Tests/QtAutogen/MocInclude/ObjB.hpp diff --git a/Tests/QtAutogen/mocInclude/ObjB_p.h b/Tests/QtAutogen/MocInclude/ObjB_p.h similarity index 100% rename from Tests/QtAutogen/mocInclude/ObjB_p.h rename to Tests/QtAutogen/MocInclude/ObjB_p.h diff --git a/Tests/QtAutogen/mocInclude/SObjA.cpp b/Tests/QtAutogen/MocInclude/SObjA.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjA.cpp rename to Tests/QtAutogen/MocInclude/SObjA.cpp diff --git a/Tests/QtAutogen/mocInclude/SObjA.hpp b/Tests/QtAutogen/MocInclude/SObjA.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjA.hpp rename to Tests/QtAutogen/MocInclude/SObjA.hpp diff --git a/Tests/QtAutogen/mocInclude/SObjB.cpp.in b/Tests/QtAutogen/MocInclude/SObjB.cpp.in similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjB.cpp.in rename to Tests/QtAutogen/MocInclude/SObjB.cpp.in diff --git a/Tests/QtAutogen/mocInclude/SObjB.hpp.in b/Tests/QtAutogen/MocInclude/SObjB.hpp.in similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjB.hpp.in rename to Tests/QtAutogen/MocInclude/SObjB.hpp.in diff --git a/Tests/QtAutogen/mocInclude/SObjC.cpp b/Tests/QtAutogen/MocInclude/SObjC.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjC.cpp rename to Tests/QtAutogen/MocInclude/SObjC.cpp diff --git a/Tests/QtAutogen/mocInclude/SObjC.hpp b/Tests/QtAutogen/MocInclude/SObjC.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjC.hpp rename to Tests/QtAutogen/MocInclude/SObjC.hpp diff --git a/Tests/QtAutogen/mocInclude/SObjCExtra.cpp b/Tests/QtAutogen/MocInclude/SObjCExtra.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjCExtra.cpp rename to Tests/QtAutogen/MocInclude/SObjCExtra.cpp diff --git a/Tests/QtAutogen/mocInclude/SObjCExtra.hpp b/Tests/QtAutogen/MocInclude/SObjCExtra.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjCExtra.hpp rename to Tests/QtAutogen/MocInclude/SObjCExtra.hpp diff --git a/Tests/QtAutogen/mocInclude/SObjCExtra.moc.in b/Tests/QtAutogen/MocInclude/SObjCExtra.moc.in similarity index 100% rename from Tests/QtAutogen/mocInclude/SObjCExtra.moc.in rename to Tests/QtAutogen/MocInclude/SObjCExtra.moc.in diff --git a/Tests/QtAutogen/mocInclude/shared.cmake b/Tests/QtAutogen/MocInclude/shared.cmake similarity index 67% rename from Tests/QtAutogen/mocInclude/shared.cmake rename to Tests/QtAutogen/MocInclude/shared.cmake index d05f27c..2ca2841 100644 --- a/Tests/QtAutogen/mocInclude/shared.cmake +++ b/Tests/QtAutogen/MocInclude/shared.cmake @@ -1,24 +1,24 @@ # Test moc include patterns -include_directories("../mocInclude") +include_directories("../MocInclude") include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Generate .moc file externally and enabled SKIP_AUTOMOC on the file qtx_generate_moc( - ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjA.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjA.hpp ${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc) -set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjA.cpp PROPERTY SKIP_AUTOMOC ON) +set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjA.cpp PROPERTY SKIP_AUTOMOC ON) # Generate .moc file externally from generated source file # and enabled SKIP_AUTOMOC on the source file add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjB.hpp.in + ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjB.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjB.cpp.in + ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjB.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp) qtx_generate_moc( ${CMAKE_CURRENT_BINARY_DIR}/SObjB.hpp @@ -27,10 +27,10 @@ set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp PROPERTY SKIP_AUTOMOC # Generate moc file externally and enabled SKIP_AUTOMOC on the header qtx_generate_moc( - ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.hpp ${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp) set_property( - SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.hpp + SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.hpp PROPERTY SKIP_AUTOMOC ON) # Custom target to depend on set(SOBJC_MOC ${CMAKE_CURRENT_BINARY_DIR}/moc_SObjCExtra.cpp) @@ -38,32 +38,32 @@ add_custom_target("${MOC_INCLUDE_NAME}_SOBJC" DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/SObjCExtra_extMoc.cpp BYPRODUCTS ${SOBJC_MOC} COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/SObjCExtra.moc.in + ${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/SObjCExtra.moc.in ${SOBJC_MOC}) # MOC_INCLUDE_NAME must be defined by the includer add_executable(${MOC_INCLUDE_NAME} # Common sources - ../mocInclude/ObjA.cpp - ../mocInclude/ObjB.cpp + ../MocInclude/ObjA.cpp + ../MocInclude/ObjB.cpp - ../mocInclude/LObjA.cpp - ../mocInclude/LObjB.cpp + ../MocInclude/LObjA.cpp + ../MocInclude/LObjB.cpp - ../mocInclude/EObjA.cpp - ../mocInclude/EObjAExtra.cpp - ../mocInclude/EObjB.cpp - ../mocInclude/subExtra/EObjBExtra.cpp + ../MocInclude/EObjA.cpp + ../MocInclude/EObjAExtra.cpp + ../MocInclude/EObjB.cpp + ../MocInclude/subExtra/EObjBExtra.cpp - ../mocInclude/SObjA.cpp + ../MocInclude/SObjA.cpp ${CMAKE_CURRENT_BINARY_DIR}/SObjA.moc ${CMAKE_CURRENT_BINARY_DIR}/SObjB.cpp ${CMAKE_CURRENT_BINARY_DIR}/SObjB.moc - ../mocInclude/SObjC.cpp - ../mocInclude/SObjCExtra.hpp - ../mocInclude/SObjCExtra.cpp + ../MocInclude/SObjC.cpp + ../MocInclude/SObjCExtra.hpp + ../MocInclude/SObjCExtra.cpp - ../mocInclude/subGlobal/GObj.cpp + ../MocInclude/subGlobal/GObj.cpp main.cpp ) add_dependencies(${MOC_INCLUDE_NAME} "${MOC_INCLUDE_NAME}_SOBJC") diff --git a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.cpp rename to Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.cpp diff --git a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/subExtra/EObjBExtra.hpp rename to Tests/QtAutogen/MocInclude/subExtra/EObjBExtra.hpp diff --git a/Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp b/Tests/QtAutogen/MocInclude/subExtra/EObjBExtra_p.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/subExtra/EObjBExtra_p.hpp rename to Tests/QtAutogen/MocInclude/subExtra/EObjBExtra_p.hpp diff --git a/Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp b/Tests/QtAutogen/MocInclude/subGlobal/GObj.cpp similarity index 100% rename from Tests/QtAutogen/mocInclude/subGlobal/GObj.cpp rename to Tests/QtAutogen/MocInclude/subGlobal/GObj.cpp diff --git a/Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp b/Tests/QtAutogen/MocInclude/subGlobal/GObj.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/subGlobal/GObj.hpp rename to Tests/QtAutogen/MocInclude/subGlobal/GObj.hpp diff --git a/Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp b/Tests/QtAutogen/MocInclude/subGlobal/GObj_p.hpp similarity index 100% rename from Tests/QtAutogen/mocInclude/subGlobal/GObj_p.hpp rename to Tests/QtAutogen/MocInclude/subGlobal/GObj_p.hpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt similarity index 69% rename from Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt rename to Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt index 97ba1df..b1c4fc3 100644 --- a/Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt +++ b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt @@ -1,10 +1,13 @@ -# Test moc include patterns +cmake_minimum_required(VERSION 3.10) +project(MocIncludeRelaxed) +include("../AutogenTest.cmake") +# Test moc include patterns set(CMAKE_AUTOMOC_RELAXED_MODE TRUE) # Shared executable set(MOC_INCLUDE_NAME "mocIncludeRelaxed") -include(${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/shared.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/shared.cmake) # Relaxed ony executable add_executable(mocIncludeRelaxedOnly diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RMain.cpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RMain.cpp rename to Tests/QtAutogen/MocIncludeRelaxed/RMain.cpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjA.cpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RObjA.cpp rename to Tests/QtAutogen/MocIncludeRelaxed/RObjA.cpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjA.hpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RObjA.hpp rename to Tests/QtAutogen/MocIncludeRelaxed/RObjA.hpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjB.cpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RObjB.cpp rename to Tests/QtAutogen/MocIncludeRelaxed/RObjB.cpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjB.hpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RObjB.hpp rename to Tests/QtAutogen/MocIncludeRelaxed/RObjB.hpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjBExtra.hpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RObjBExtra.hpp rename to Tests/QtAutogen/MocIncludeRelaxed/RObjBExtra.hpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjC.cpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RObjC.cpp rename to Tests/QtAutogen/MocIncludeRelaxed/RObjC.cpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp b/Tests/QtAutogen/MocIncludeRelaxed/RObjC.hpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/RObjC.hpp rename to Tests/QtAutogen/MocIncludeRelaxed/RObjC.hpp diff --git a/Tests/QtAutogen/mocIncludeRelaxed/main.cpp b/Tests/QtAutogen/MocIncludeRelaxed/main.cpp similarity index 100% rename from Tests/QtAutogen/mocIncludeRelaxed/main.cpp rename to Tests/QtAutogen/MocIncludeRelaxed/main.cpp diff --git a/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt new file mode 100644 index 0000000..2cf0fed --- /dev/null +++ b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.10) +project(MocIncludeStrict) +include("../AutogenTest.cmake") + +# Test moc include patterns +set(CMAKE_AUTOMOC_RELAXED_MODE FALSE) + +# Shared executable +set(MOC_INCLUDE_NAME "mocIncludeStrict") +include(${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/shared.cmake) diff --git a/Tests/QtAutogen/mocIncludeStrict/main.cpp b/Tests/QtAutogen/MocIncludeStrict/main.cpp similarity index 100% rename from Tests/QtAutogen/mocIncludeStrict/main.cpp rename to Tests/QtAutogen/MocIncludeStrict/main.cpp diff --git a/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt b/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt deleted file mode 100644 index 789354a..0000000 --- a/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Test moc include patterns - -set(CMAKE_AUTOMOC_RELAXED_MODE FALSE) -set(MOC_INCLUDE_NAME "mocIncludeStrict") - -include(${CMAKE_CURRENT_SOURCE_DIR}/../mocInclude/shared.cmake) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7971202b3c58f78008f5b651c048910fcc49c49f commit 7971202b3c58f78008f5b651c048910fcc49c49f Author: Sebastian Holtermann AuthorDate: Fri Dec 8 19:27:10 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:28 2017 +0100 Autogen: Tests: Separate MocDepends test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 6b54b1a..43fc851 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,10 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Tests AUTOMOC with generated sources -add_subdirectory(mocDepends) - -# -- Test # Tests various include moc patterns if(ALLOW_WRAP_CPP) add_subdirectory(mocIncludeStrict) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 6a92873..3cd93ab 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -15,3 +15,4 @@ ADD_AUTOGEN_TEST(RccSkipSource) if(NOT QT_TEST_VERSION STREQUAL 4) ADD_AUTOGEN_TEST(MocMacroName mocMacroName) endif() +ADD_AUTOGEN_TEST(MocDepends) diff --git a/Tests/QtAutogen/mocDepends/CMakeLists.txt b/Tests/QtAutogen/MocDepends/CMakeLists.txt similarity index 89% rename from Tests/QtAutogen/mocDepends/CMakeLists.txt rename to Tests/QtAutogen/MocDepends/CMakeLists.txt index 8217b8d..6ea72be 100644 --- a/Tests/QtAutogen/mocDepends/CMakeLists.txt +++ b/Tests/QtAutogen/MocDepends/CMakeLists.txt @@ -1,18 +1,6 @@ -cmake_minimum_required(VERSION 3.9) -cmake_policy(SET CMP0071 NEW) -project(mocDepends CXX) - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - set(QT_CORE_TARGET Qt4::QtCore) -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - - find_package(Qt5Core REQUIRED) - set(QT_CORE_TARGET Qt5::Core) -endif() +cmake_minimum_required(VERSION 3.10) +project(MocDepends) +include("../AutogenTest.cmake") include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(CSD ${CMAKE_CURRENT_SOURCE_DIR}) @@ -42,7 +30,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/GenFile.hpp) add_executable(mocDepGenFile testGenFile.cpp ${CBD}/GenFile.hpp) -target_link_libraries(mocDepGenFile ${QT_CORE_TARGET}) +target_link_libraries(mocDepGenFile ${QT_QTCORE_TARGET}) set_target_properties(mocDepGenFile PROPERTIES AUTOMOC TRUE) @@ -69,7 +57,7 @@ add_custom_target(mocDepTargetUtil COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/GenTarget.hpp) add_executable(mocDepTarget testGenTarget.cpp) -target_link_libraries(mocDepTarget ${QT_CORE_TARGET}) +target_link_libraries(mocDepTarget ${QT_QTCORE_TARGET}) set_target_properties(mocDepTarget PROPERTIES AUTOMOC TRUE) add_dependencies(mocDepTarget mocDepTargetUtil) @@ -96,10 +84,10 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/simpleLib.hpp.in ${CBD}/simpleLib.hpp COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/simpleLib.cpp.in ${CBD}/simpleLib.cpp) add_library(SimpleLib STATIC ${CBD}/simpleLib.hpp ${CBD}/simpleLib.cpp) -target_link_libraries(SimpleLib ${QT_CORE_TARGET}) +target_link_libraries(SimpleLib ${QT_QTCORE_TARGET}) add_executable(mocDepGenLib testGenLib.cpp) -target_link_libraries(mocDepGenLib SimpleLib ${QT_CORE_TARGET}) +target_link_libraries(mocDepGenLib SimpleLib ${QT_QTCORE_TARGET}) set_target_properties(mocDepGenLib PROPERTIES AUTOMOC TRUE) @@ -122,7 +110,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/ATDFile.hpp) add_executable(mocDepATDFile testATDFile.cpp) -target_link_libraries(mocDepATDFile ${QT_CORE_TARGET}) +target_link_libraries(mocDepATDFile ${QT_QTCORE_TARGET}) set_target_properties(mocDepATDFile PROPERTIES AUTOMOC TRUE) set_target_properties(mocDepATDFile PROPERTIES AUTOGEN_TARGET_DEPENDS ${CBD}/ATDFile.hpp) @@ -146,6 +134,6 @@ add_custom_target(mocDepATDTargetUtil COMMAND ${CMAKE_COMMAND} -E copy ${CSD}/object_valid.hpp.in ${CBD}/ATDTarget.hpp) add_executable(mocDepATDTarget testATDTarget.cpp) -target_link_libraries(mocDepATDTarget ${QT_CORE_TARGET}) +target_link_libraries(mocDepATDTarget ${QT_QTCORE_TARGET}) set_target_properties(mocDepATDTarget PROPERTIES AUTOMOC TRUE) set_target_properties(mocDepATDTarget PROPERTIES AUTOGEN_TARGET_DEPENDS mocDepATDTargetUtil) diff --git a/Tests/QtAutogen/mocDepends/object_invalid.hpp.in b/Tests/QtAutogen/MocDepends/object_invalid.hpp.in similarity index 100% rename from Tests/QtAutogen/mocDepends/object_invalid.hpp.in rename to Tests/QtAutogen/MocDepends/object_invalid.hpp.in diff --git a/Tests/QtAutogen/mocDepends/object_valid.hpp.in b/Tests/QtAutogen/MocDepends/object_valid.hpp.in similarity index 100% rename from Tests/QtAutogen/mocDepends/object_valid.hpp.in rename to Tests/QtAutogen/MocDepends/object_valid.hpp.in diff --git a/Tests/QtAutogen/mocDepends/simpleLib.cpp.in b/Tests/QtAutogen/MocDepends/simpleLib.cpp.in similarity index 100% rename from Tests/QtAutogen/mocDepends/simpleLib.cpp.in rename to Tests/QtAutogen/MocDepends/simpleLib.cpp.in diff --git a/Tests/QtAutogen/mocDepends/simpleLib.hpp.in b/Tests/QtAutogen/MocDepends/simpleLib.hpp.in similarity index 100% rename from Tests/QtAutogen/mocDepends/simpleLib.hpp.in rename to Tests/QtAutogen/MocDepends/simpleLib.hpp.in diff --git a/Tests/QtAutogen/mocDepends/testATDFile.cpp b/Tests/QtAutogen/MocDepends/testATDFile.cpp similarity index 100% rename from Tests/QtAutogen/mocDepends/testATDFile.cpp rename to Tests/QtAutogen/MocDepends/testATDFile.cpp diff --git a/Tests/QtAutogen/mocDepends/testATDTarget.cpp b/Tests/QtAutogen/MocDepends/testATDTarget.cpp similarity index 100% rename from Tests/QtAutogen/mocDepends/testATDTarget.cpp rename to Tests/QtAutogen/MocDepends/testATDTarget.cpp diff --git a/Tests/QtAutogen/mocDepends/testGenFile.cpp b/Tests/QtAutogen/MocDepends/testGenFile.cpp similarity index 100% rename from Tests/QtAutogen/mocDepends/testGenFile.cpp rename to Tests/QtAutogen/MocDepends/testGenFile.cpp diff --git a/Tests/QtAutogen/mocDepends/testGenLib.cpp b/Tests/QtAutogen/MocDepends/testGenLib.cpp similarity index 100% rename from Tests/QtAutogen/mocDepends/testGenLib.cpp rename to Tests/QtAutogen/MocDepends/testGenLib.cpp diff --git a/Tests/QtAutogen/mocDepends/testGenLib.hpp b/Tests/QtAutogen/MocDepends/testGenLib.hpp similarity index 100% rename from Tests/QtAutogen/mocDepends/testGenLib.hpp rename to Tests/QtAutogen/MocDepends/testGenLib.hpp diff --git a/Tests/QtAutogen/mocDepends/testGenTarget.cpp b/Tests/QtAutogen/MocDepends/testGenTarget.cpp similarity index 100% rename from Tests/QtAutogen/mocDepends/testGenTarget.cpp rename to Tests/QtAutogen/MocDepends/testGenTarget.cpp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb7e52ca3d920ca1de8b2abb23da3d83db988eca commit fb7e52ca3d920ca1de8b2abb23da3d83db988eca Author: Sebastian Holtermann AuthorDate: Fri Dec 8 19:15:26 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:28 2017 +0100 Autogen: Tests: Separate MocMacroName test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index e5940d8..6b54b1a 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,12 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# MOC AUTOMOC_MACRO_NAMES -if (NOT QT_TEST_VERSION STREQUAL 4) - add_subdirectory(mocMacroName) -endif() - -# -- Test # Tests AUTOMOC with generated sources add_subdirectory(mocDepends) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index fdf41b6..6a92873 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -12,3 +12,6 @@ if(QT_TEST_ALLOW_QT_MACROS) endif() ADD_AUTOGEN_TEST(UicSkipSource) ADD_AUTOGEN_TEST(RccSkipSource) +if(NOT QT_TEST_VERSION STREQUAL 4) + ADD_AUTOGEN_TEST(MocMacroName mocMacroName) +endif() diff --git a/Tests/QtAutogen/MocMacroName/CMakeLists.txt b/Tests/QtAutogen/MocMacroName/CMakeLists.txt new file mode 100644 index 0000000..f0251a2 --- /dev/null +++ b/Tests/QtAutogen/MocMacroName/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.10) +project(MocMacroName) +include("../AutogenTest.cmake") + +# Test CMAKE_AUTOMOC_MACRO_NAMES and AUTOMOC_MACRO_NAMES +list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "QO1_ALIAS") + +add_executable(mocMacroName + main.cpp + Gadget.cpp + Object.cpp + Object1Aliased.cpp + Object2Aliased.cpp +) +set_property(TARGET mocMacroName PROPERTY AUTOMOC ON) +set_property(TARGET mocMacroName APPEND PROPERTY AUTOMOC_MACRO_NAMES "QO2_ALIAS") +target_link_libraries(mocMacroName ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/mocMacroName/CustomMacros.hpp b/Tests/QtAutogen/MocMacroName/CustomMacros.hpp similarity index 100% rename from Tests/QtAutogen/mocMacroName/CustomMacros.hpp rename to Tests/QtAutogen/MocMacroName/CustomMacros.hpp diff --git a/Tests/QtAutogen/mocMacroName/Gadget.cpp b/Tests/QtAutogen/MocMacroName/Gadget.cpp similarity index 77% rename from Tests/QtAutogen/mocMacroName/Gadget.cpp rename to Tests/QtAutogen/MocMacroName/Gadget.cpp index 167faeb..d7cb515 100644 --- a/Tests/QtAutogen/mocMacroName/Gadget.cpp +++ b/Tests/QtAutogen/MocMacroName/Gadget.cpp @@ -1,6 +1,6 @@ #include "Gadget.hpp" Gadget::Gadget() - : test(0) + : _test(0) { } diff --git a/Tests/QtAutogen/mocMacroName/Gadget.hpp b/Tests/QtAutogen/MocMacroName/Gadget.hpp similarity index 55% rename from Tests/QtAutogen/mocMacroName/Gadget.hpp rename to Tests/QtAutogen/MocMacroName/Gadget.hpp index 2587ed2..cab792e 100644 --- a/Tests/QtAutogen/mocMacroName/Gadget.hpp +++ b/Tests/QtAutogen/MocMacroName/Gadget.hpp @@ -6,10 +6,14 @@ class Gadget { Q_GADGET - Q_PROPERTY(int test MEMBER test) + Q_PROPERTY(int test READ getTest) public: Gadget(); - int test; + + int getTest() { return _test; } + +private: + int _test; }; #endif diff --git a/Tests/QtAutogen/mocMacroName/Object.cpp b/Tests/QtAutogen/MocMacroName/Object.cpp similarity index 84% rename from Tests/QtAutogen/mocMacroName/Object.cpp rename to Tests/QtAutogen/MocMacroName/Object.cpp index c0b4f33..800ebf3 100644 --- a/Tests/QtAutogen/mocMacroName/Object.cpp +++ b/Tests/QtAutogen/MocMacroName/Object.cpp @@ -1,6 +1,7 @@ #include "Object.hpp" Object::Object() + : _test(0) { } diff --git a/Tests/QtAutogen/mocMacroName/Object.hpp b/Tests/QtAutogen/MocMacroName/Object.hpp similarity index 63% rename from Tests/QtAutogen/mocMacroName/Object.hpp rename to Tests/QtAutogen/MocMacroName/Object.hpp index 0c40824..aadae1f 100644 --- a/Tests/QtAutogen/mocMacroName/Object.hpp +++ b/Tests/QtAutogen/MocMacroName/Object.hpp @@ -6,14 +6,17 @@ class Object : public QObject { Q_OBJECT - Q_PROPERTY(int test MEMBER test) + Q_PROPERTY(int test READ getTest) public: Object(); + int getTest() { return _test; } + Q_SLOT void aSlot(); - int test; +private: + int _test; }; #endif diff --git a/Tests/QtAutogen/mocMacroName/Object1Aliased.cpp b/Tests/QtAutogen/MocMacroName/Object1Aliased.cpp similarity index 100% rename from Tests/QtAutogen/mocMacroName/Object1Aliased.cpp rename to Tests/QtAutogen/MocMacroName/Object1Aliased.cpp diff --git a/Tests/QtAutogen/mocMacroName/Object1Aliased.hpp b/Tests/QtAutogen/MocMacroName/Object1Aliased.hpp similarity index 100% rename from Tests/QtAutogen/mocMacroName/Object1Aliased.hpp rename to Tests/QtAutogen/MocMacroName/Object1Aliased.hpp diff --git a/Tests/QtAutogen/mocMacroName/Object2Aliased.cpp b/Tests/QtAutogen/MocMacroName/Object2Aliased.cpp similarity index 100% rename from Tests/QtAutogen/mocMacroName/Object2Aliased.cpp rename to Tests/QtAutogen/MocMacroName/Object2Aliased.cpp diff --git a/Tests/QtAutogen/mocMacroName/Object2Aliased.hpp b/Tests/QtAutogen/MocMacroName/Object2Aliased.hpp similarity index 100% rename from Tests/QtAutogen/mocMacroName/Object2Aliased.hpp rename to Tests/QtAutogen/MocMacroName/Object2Aliased.hpp diff --git a/Tests/QtAutogen/mocMacroName/main.cpp b/Tests/QtAutogen/MocMacroName/main.cpp similarity index 100% rename from Tests/QtAutogen/mocMacroName/main.cpp rename to Tests/QtAutogen/MocMacroName/main.cpp diff --git a/Tests/QtAutogen/mocMacroName/CMakeLists.txt b/Tests/QtAutogen/mocMacroName/CMakeLists.txt deleted file mode 100644 index 08e6803..0000000 --- a/Tests/QtAutogen/mocMacroName/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.9) - -list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "QO1_ALIAS") - -add_executable(mmn main.cpp Gadget.cpp Object.cpp Object1Aliased.cpp Object2Aliased.cpp) -set_property(TARGET mmn PROPERTY AUTOMOC ON) -set_property(TARGET mmn APPEND PROPERTY AUTOMOC_MACRO_NAMES "QO2_ALIAS") -target_link_libraries(mmn ${QT_LIBRARIES}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cab8c307c7df585152e3ab9e007574cb0e690dc commit 5cab8c307c7df585152e3ab9e007574cb0e690dc Author: Sebastian Holtermann AuthorDate: Fri Dec 8 18:55:43 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:28 2017 +0100 Autogen: Tests: Separate RccSkipSource test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 317de7e..e5940d8 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,27 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target -set(skipRccSources - skipRcc.cpp - skipSource/skipRccBad1.qrc - skipSource/skipRccBad2.qrc - skipSource/skipRccGood.qrc -) -set_property(SOURCE skipSource/skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON) -set_property(SOURCE skipSource/skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON) -# AUTORCC enabled -add_executable(skipRccA ${skipRccSources}) -set_property(TARGET skipRccA PROPERTY AUTORCC ON) -target_link_libraries(skipRccA ${QT_LIBRARIES}) -# AUTORCC, AUTOUIC and AUTOMOC enabled -add_executable(skipRccB ${skipRccSources}) -set_property(TARGET skipRccB PROPERTY AUTORCC ON) -set_property(TARGET skipRccB PROPERTY AUTOUIC ON) -set_property(TARGET skipRccB PROPERTY AUTOMOC ON) -target_link_libraries(skipRccB ${QT_LIBRARIES}) - -# -- Test # MOC AUTOMOC_MACRO_NAMES if (NOT QT_TEST_VERSION STREQUAL 4) add_subdirectory(mocMacroName) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 2c4788b..fdf41b6 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -11,3 +11,4 @@ if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocSkipSource) endif() ADD_AUTOGEN_TEST(UicSkipSource) +ADD_AUTOGEN_TEST(RccSkipSource) diff --git a/Tests/QtAutogen/RccSkipSource/CMakeLists.txt b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt new file mode 100644 index 0000000..f8a8032 --- /dev/null +++ b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.10) +project(RccSkipSource) +include("../AutogenTest.cmake") + +# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target +set(skipRccSources + skipRcc.cpp + skipRccBad1.qrc + skipRccBad2.qrc + skipRccGood.qrc +) +set_property(SOURCE skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON) +set_property(SOURCE skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON) +# AUTORCC enabled +add_executable(skipRccA ${skipRccSources}) +set_property(TARGET skipRccA PROPERTY AUTORCC ON) +target_link_libraries(skipRccA ${QT_LIBRARIES}) +# AUTORCC, AUTOUIC and AUTOMOC enabled +add_executable(skipRccB ${skipRccSources}) +set_property(TARGET skipRccB PROPERTY AUTORCC ON) +set_property(TARGET skipRccB PROPERTY AUTOUIC ON) +set_property(TARGET skipRccB PROPERTY AUTOMOC ON) +target_link_libraries(skipRccB ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/skipRcc.cpp b/Tests/QtAutogen/RccSkipSource/skipRcc.cpp similarity index 100% rename from Tests/QtAutogen/skipRcc.cpp rename to Tests/QtAutogen/RccSkipSource/skipRcc.cpp diff --git a/Tests/QtAutogen/skipSource/skipRccBad1.qrc b/Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc similarity index 100% rename from Tests/QtAutogen/skipSource/skipRccBad1.qrc rename to Tests/QtAutogen/RccSkipSource/skipRccBad1.qrc diff --git a/Tests/QtAutogen/skipSource/skipRccBad2.qrc b/Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc similarity index 100% rename from Tests/QtAutogen/skipSource/skipRccBad2.qrc rename to Tests/QtAutogen/RccSkipSource/skipRccBad2.qrc diff --git a/Tests/QtAutogen/skipSource/skipRccGood.qrc b/Tests/QtAutogen/RccSkipSource/skipRccGood.qrc similarity index 100% rename from Tests/QtAutogen/skipSource/skipRccGood.qrc rename to Tests/QtAutogen/RccSkipSource/skipRccGood.qrc https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f11321efd11ce4958d45f4673465b5b9484f1af2 commit f11321efd11ce4958d45f4673465b5b9484f1af2 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 18:47:15 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:28 2017 +0100 Autogen: Tests: Separate UicSkipSource test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index d09823f..317de7e 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,26 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target -set(skipUicSources - skipUic.cpp - skipSource/skipUicGen.cpp - skipSource/skipUicNoGen1.cpp - skipSource/skipUicNoGen2.cpp -) -set_property(SOURCE skipSource/skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON) -set_property(SOURCE skipSource/skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON) -# AUTOUIC enabled -add_executable(skipUicA ${skipUicSources}) -set_property(TARGET skipUicA PROPERTY AUTOUIC ON) -target_link_libraries(skipUicA ${QT_LIBRARIES}) -# AUTOUIC and AUTOMOC enabled -add_executable(skipUicB ${skipUicSources}) -set_property(TARGET skipUicB PROPERTY AUTOUIC ON) -set_property(TARGET skipUicB PROPERTY AUTOMOC ON) -target_link_libraries(skipUicB ${QT_LIBRARIES}) - -# -- Test # Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target set(skipRccSources skipRcc.cpp diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 072a853..2c4788b 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -10,3 +10,4 @@ ADD_AUTOGEN_TEST(RccOffMocLibrary) if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocSkipSource) endif() +ADD_AUTOGEN_TEST(UicSkipSource) diff --git a/Tests/QtAutogen/UicSkipSource/CMakeLists.txt b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt new file mode 100644 index 0000000..e94864d --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.10) +project(UicSkipSource) +include("../AutogenTest.cmake") + +# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target +set(skipUicSources + skipUic.cpp + skipUicGen.cpp + skipUicNoGen1.cpp + skipUicNoGen2.cpp +) +set_property(SOURCE skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON) +set_property(SOURCE skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON) +# AUTOUIC enabled +add_executable(skipUicA ${skipUicSources}) +set_property(TARGET skipUicA PROPERTY AUTOUIC ON) +target_link_libraries(skipUicA ${QT_LIBRARIES}) +# AUTOUIC and AUTOMOC enabled +add_executable(skipUicB ${skipUicSources}) +set_property(TARGET skipUicB PROPERTY AUTOUIC ON) +set_property(TARGET skipUicB PROPERTY AUTOMOC ON) +target_link_libraries(skipUicB ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/skipUic.cpp b/Tests/QtAutogen/UicSkipSource/skipUic.cpp similarity index 57% rename from Tests/QtAutogen/skipUic.cpp rename to Tests/QtAutogen/UicSkipSource/skipUic.cpp index 0adf011..c4a7ce9 100644 --- a/Tests/QtAutogen/skipUic.cpp +++ b/Tests/QtAutogen/UicSkipSource/skipUic.cpp @@ -1,7 +1,7 @@ -#include "skipSource/skipUicGen.hpp" -#include "skipSource/skipUicNoGen1.hpp" -#include "skipSource/skipUicNoGen2.hpp" +#include "skipUicGen.hpp" +#include "skipUicNoGen1.hpp" +#include "skipUicNoGen2.hpp" int main(int, char**) { diff --git a/Tests/QtAutogen/skipSource/skipUicGen.cpp b/Tests/QtAutogen/UicSkipSource/skipUicGen.cpp similarity index 100% rename from Tests/QtAutogen/skipSource/skipUicGen.cpp rename to Tests/QtAutogen/UicSkipSource/skipUicGen.cpp diff --git a/Tests/QtAutogen/skipSource/skipUicGen.hpp b/Tests/QtAutogen/UicSkipSource/skipUicGen.hpp similarity index 100% rename from Tests/QtAutogen/skipSource/skipUicGen.hpp rename to Tests/QtAutogen/UicSkipSource/skipUicGen.hpp diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp similarity index 100% rename from Tests/QtAutogen/skipSource/skipUicNoGen1.cpp rename to Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp similarity index 100% rename from Tests/QtAutogen/skipSource/skipUicNoGen1.hpp rename to Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp similarity index 100% rename from Tests/QtAutogen/skipSource/skipUicNoGen2.cpp rename to Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp similarity index 100% rename from Tests/QtAutogen/skipSource/skipUicNoGen2.hpp rename to Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp diff --git a/Tests/QtAutogen/skipSource/ui_nogen1.h b/Tests/QtAutogen/UicSkipSource/ui_nogen1.h similarity index 100% rename from Tests/QtAutogen/skipSource/ui_nogen1.h rename to Tests/QtAutogen/UicSkipSource/ui_nogen1.h diff --git a/Tests/QtAutogen/skipSource/ui_nogen2.h b/Tests/QtAutogen/UicSkipSource/ui_nogen2.h similarity index 89% rename from Tests/QtAutogen/skipSource/ui_nogen2.h rename to Tests/QtAutogen/UicSkipSource/ui_nogen2.h index 5d547d4..4e500a4 100644 --- a/Tests/QtAutogen/skipSource/ui_nogen2.h +++ b/Tests/QtAutogen/UicSkipSource/ui_nogen2.h @@ -3,4 +3,4 @@ void ui_nogen2(); -#endif \ No newline at end of file +#endif diff --git a/Tests/QtAutogen/skipSource/uigen1.ui b/Tests/QtAutogen/UicSkipSource/uigen1.ui similarity index 100% rename from Tests/QtAutogen/skipSource/uigen1.ui rename to Tests/QtAutogen/UicSkipSource/uigen1.ui diff --git a/Tests/QtAutogen/skipSource/uigen2.ui b/Tests/QtAutogen/UicSkipSource/uigen2.ui similarity index 100% rename from Tests/QtAutogen/skipSource/uigen2.ui rename to Tests/QtAutogen/UicSkipSource/uigen2.ui https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0af9da29e487f0a6c60c379f0773a68b40ce2625 commit 0af9da29e487f0a6c60c379f0773a68b40ce2625 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 18:24:52 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:28 2017 +0100 Autogen: Tests: Separate MocSkipSource test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 723747a..d09823f 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,41 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target -if(ALLOW_WRAP_CPP) - # Generate header mocs manually - qtx_wrap_cpp(skipMocWrapMoc - skipSource/qItemA.hpp - skipSource/qItemB.hpp - skipSource/qItemC.hpp - skipSource/qItemD.hpp - ) - set(skipMocSources - skipMoc.cpp - skipSource/qItemA.cpp - skipSource/qItemB.cpp - skipSource/qItemC.cpp - skipSource/qItemD.cpp - ) - # When cpp files are skipped, the hpp won't be processed either, - # unless they are mentioned in the sources - which they aren't. - set_property(SOURCE skipSource/qItemA.cpp PROPERTY SKIP_AUTOMOC ON) - set_property(SOURCE skipSource/qItemB.cpp PROPERTY SKIP_AUTOGEN ON) - # When hpp files are skipped, the cpp still get processed. - set_property(SOURCE skipSource/qItemC.hpp PROPERTY SKIP_AUTOMOC ON) - set_property(SOURCE skipSource/qItemD.hpp PROPERTY SKIP_AUTOGEN ON) - # AUTOMOC enabled only - add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc}) - set_property(TARGET skipMocA PROPERTY AUTOMOC ON) - target_link_libraries(skipMocA ${QT_LIBRARIES}) - # AUTOMOC and AUTOUIC enabled - add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc}) - set_property(TARGET skipMocB PROPERTY AUTOMOC ON) - set_property(TARGET skipMocB PROPERTY AUTOUIC ON) - target_link_libraries(skipMocB ${QT_LIBRARIES}) -endif() - -# -- Test # Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target set(skipUicSources skipUic.cpp diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index f998b74..072a853 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -7,3 +7,6 @@ endif() ADD_AUTOGEN_TEST(RccOnly rccOnly) ADD_AUTOGEN_TEST(RccEmpty rccEmpty) ADD_AUTOGEN_TEST(RccOffMocLibrary) +if(QT_TEST_ALLOW_QT_MACROS) + ADD_AUTOGEN_TEST(MocSkipSource) +endif() diff --git a/Tests/QtAutogen/MocSkipSource/CMakeLists.txt b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt new file mode 100644 index 0000000..8d1fa6a --- /dev/null +++ b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.10) +project(MocSkipSource) +include("../AutogenTest.cmake") + +# Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target + +# Generate header mocs manually +qtx_wrap_cpp(skipMocWrapMoc + qItemA.hpp + qItemB.hpp + qItemC.hpp + qItemD.hpp +) +set(skipMocSources + skipMoc.cpp + qItemA.cpp + qItemB.cpp + qItemC.cpp + qItemD.cpp +) +# When cpp files are skipped, the hpp won't be processed either, +# unless they are mentioned in the sources - which they aren't. +set_property(SOURCE qItemA.cpp PROPERTY SKIP_AUTOMOC ON) +set_property(SOURCE qItemB.cpp PROPERTY SKIP_AUTOGEN ON) +# When hpp files are skipped, the cpp still get processed. +set_property(SOURCE qItemC.hpp PROPERTY SKIP_AUTOMOC ON) +set_property(SOURCE qItemD.hpp PROPERTY SKIP_AUTOGEN ON) +# AUTOMOC enabled only +add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc}) +set_property(TARGET skipMocA PROPERTY AUTOMOC ON) +target_link_libraries(skipMocA ${QT_LIBRARIES}) +# AUTOMOC and AUTOUIC enabled +add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc}) +set_property(TARGET skipMocB PROPERTY AUTOMOC ON) +set_property(TARGET skipMocB PROPERTY AUTOUIC ON) +target_link_libraries(skipMocB ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/skipSource/qItemA.cpp b/Tests/QtAutogen/MocSkipSource/qItemA.cpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemA.cpp rename to Tests/QtAutogen/MocSkipSource/qItemA.cpp diff --git a/Tests/QtAutogen/skipSource/qItemA.hpp b/Tests/QtAutogen/MocSkipSource/qItemA.hpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemA.hpp rename to Tests/QtAutogen/MocSkipSource/qItemA.hpp diff --git a/Tests/QtAutogen/skipSource/qItemB.cpp b/Tests/QtAutogen/MocSkipSource/qItemB.cpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemB.cpp rename to Tests/QtAutogen/MocSkipSource/qItemB.cpp diff --git a/Tests/QtAutogen/skipSource/qItemB.hpp b/Tests/QtAutogen/MocSkipSource/qItemB.hpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemB.hpp rename to Tests/QtAutogen/MocSkipSource/qItemB.hpp diff --git a/Tests/QtAutogen/skipSource/qItemC.cpp b/Tests/QtAutogen/MocSkipSource/qItemC.cpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemC.cpp rename to Tests/QtAutogen/MocSkipSource/qItemC.cpp diff --git a/Tests/QtAutogen/skipSource/qItemC.hpp b/Tests/QtAutogen/MocSkipSource/qItemC.hpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemC.hpp rename to Tests/QtAutogen/MocSkipSource/qItemC.hpp diff --git a/Tests/QtAutogen/skipSource/qItemD.cpp b/Tests/QtAutogen/MocSkipSource/qItemD.cpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemD.cpp rename to Tests/QtAutogen/MocSkipSource/qItemD.cpp diff --git a/Tests/QtAutogen/skipSource/qItemD.hpp b/Tests/QtAutogen/MocSkipSource/qItemD.hpp similarity index 100% rename from Tests/QtAutogen/skipSource/qItemD.hpp rename to Tests/QtAutogen/MocSkipSource/qItemD.hpp diff --git a/Tests/QtAutogen/skipMoc.cpp b/Tests/QtAutogen/MocSkipSource/skipMoc.cpp similarity index 53% rename from Tests/QtAutogen/skipMoc.cpp rename to Tests/QtAutogen/MocSkipSource/skipMoc.cpp index d6b292f..c915334 100644 --- a/Tests/QtAutogen/skipMoc.cpp +++ b/Tests/QtAutogen/MocSkipSource/skipMoc.cpp @@ -1,8 +1,8 @@ -#include "skipSource/qItemA.hpp" -#include "skipSource/qItemB.hpp" -#include "skipSource/qItemC.hpp" -#include "skipSource/qItemD.hpp" +#include "qItemA.hpp" +#include "qItemB.hpp" +#include "qItemC.hpp" +#include "qItemD.hpp" int main(int, char**) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f658bdaa7c7899a46caf402d4114999019897d46 commit f658bdaa7c7899a46caf402d4114999019897d46 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 18:03:20 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:28 2017 +0100 Autogen: Tests: Separate RccOffMocLibrary test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 9125bd7..723747a 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,22 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Add not_generated_file.qrc to the source list to get the file-level -# dependency, but don't generate a c++ file from it. Disable the AUTORCC -# feature for this target. This tests that qrc files in the sources don't -# have an effect on generation if AUTORCC is off. -add_library(empty STATIC empty.cpp not_generated_file.qrc) -set_target_properties(empty PROPERTIES AUTORCC OFF) -set_target_properties(empty PROPERTIES AUTOMOC TRUE) -target_link_libraries(empty no_link_language) -add_library(no_link_language STATIC empty.h) -set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) -# Pass Qt compiler features to targets that don't link against Qt -target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES}) -target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) - - -# -- Test # Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target if(ALLOW_WRAP_CPP) # Generate header mocs manually diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 0950062..f998b74 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -6,3 +6,4 @@ if(QT_TEST_ALLOW_QT_MACROS) endif() ADD_AUTOGEN_TEST(RccOnly rccOnly) ADD_AUTOGEN_TEST(RccEmpty rccEmpty) +ADD_AUTOGEN_TEST(RccOffMocLibrary) diff --git a/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt new file mode 100644 index 0000000..7f7432e --- /dev/null +++ b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.10) +project(RccOffMocLibrary) +include("../AutogenTest.cmake") + +# Add not_generated_file.qrc to the source list to get the file-level +# dependency, but don't generate a c++ file from it. Disable the AUTORCC +# feature for this target. This tests that qrc files in the sources don't +# have an effect on generation if AUTORCC is off. +add_library(empty STATIC empty.cpp not_generated_file.qrc) +set_target_properties(empty PROPERTIES AUTORCC OFF) +set_target_properties(empty PROPERTIES AUTOMOC TRUE) +target_link_libraries(empty no_link_language) +add_library(no_link_language STATIC empty.h) +set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) +# Pass Qt compiler features to targets that don't link against Qt +target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES}) +target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) diff --git a/Tests/QtAutogen/empty.cpp b/Tests/QtAutogen/RccOffMocLibrary/empty.cpp similarity index 100% rename from Tests/QtAutogen/empty.cpp rename to Tests/QtAutogen/RccOffMocLibrary/empty.cpp diff --git a/Tests/QtAutogen/empty.h b/Tests/QtAutogen/RccOffMocLibrary/empty.h similarity index 100% rename from Tests/QtAutogen/empty.h rename to Tests/QtAutogen/RccOffMocLibrary/empty.h diff --git a/Tests/QtAutogen/not_generated_file.qrc b/Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc similarity index 100% rename from Tests/QtAutogen/not_generated_file.qrc rename to Tests/QtAutogen/RccOffMocLibrary/not_generated_file.qrc https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f00e6c7c7024a784d2da310ba7b5f4a67e60fdff commit f00e6c7c7024a784d2da310ba7b5f4a67e60fdff Author: Sebastian Holtermann AuthorDate: Fri Dec 8 17:46:58 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:28 2017 +0100 Autogen: Tests: Separate RccOnly and RccEmpty tests diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 85029d1..9125bd7 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,18 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# RCC only -add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc) -set_property(TARGET rccOnly PROPERTY AUTORCC ON) -target_link_libraries(rccOnly ${QT_QTCORE_TARGET}) - -# -- Test -# RCC empty -add_executable(rccEmpty rccEmpty.cpp rccEmptyRes.qrc) -set_property(TARGET rccEmpty PROPERTY AUTORCC ON) -target_link_libraries(rccEmpty ${QT_QTCORE_TARGET}) - -# -- Test # Add not_generated_file.qrc to the source list to get the file-level # dependency, but don't generate a c++ file from it. Disable the AUTORCC # feature for this target. This tests that qrc files in the sources don't diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 9121f41..0950062 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -4,3 +4,5 @@ ADD_AUTOGEN_TEST(MocOptions mocOptions) if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(UicOnly uicOnly) endif() +ADD_AUTOGEN_TEST(RccOnly rccOnly) +ADD_AUTOGEN_TEST(RccEmpty rccEmpty) diff --git a/Tests/QtAutogen/RccEmpty/CMakeLists.txt b/Tests/QtAutogen/RccEmpty/CMakeLists.txt new file mode 100644 index 0000000..3b16edc --- /dev/null +++ b/Tests/QtAutogen/RccEmpty/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.10) +project(RccEmpty) +include("../AutogenTest.cmake") + +# Test AUTORCC on a .qrc file with no resource files +add_executable(rccEmpty rccEmpty.cpp rccEmptyRes.qrc) +set_property(TARGET rccEmpty PROPERTY AUTORCC ON) +target_link_libraries(rccEmpty ${QT_QTCORE_TARGET}) diff --git a/Tests/QtAutogen/rccEmpty.cpp b/Tests/QtAutogen/RccEmpty/rccEmpty.cpp similarity index 100% rename from Tests/QtAutogen/rccEmpty.cpp rename to Tests/QtAutogen/RccEmpty/rccEmpty.cpp diff --git a/Tests/QtAutogen/rccEmptyRes.qrc b/Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc similarity index 100% rename from Tests/QtAutogen/rccEmptyRes.qrc rename to Tests/QtAutogen/RccEmpty/rccEmptyRes.qrc diff --git a/Tests/QtAutogen/RccOnly/CMakeLists.txt b/Tests/QtAutogen/RccOnly/CMakeLists.txt new file mode 100644 index 0000000..a65dee4 --- /dev/null +++ b/Tests/QtAutogen/RccOnly/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.10) +project(RccOnly) +include("../AutogenTest.cmake") + +# Test AUTORCC being enabled only +add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc) +set_property(TARGET rccOnly PROPERTY AUTORCC ON) +target_link_libraries(rccOnly ${QT_QTCORE_TARGET}) diff --git a/Tests/QtAutogen/rccOnly.cpp b/Tests/QtAutogen/RccOnly/rccOnly.cpp similarity index 100% rename from Tests/QtAutogen/rccOnly.cpp rename to Tests/QtAutogen/RccOnly/rccOnly.cpp diff --git a/Tests/QtAutogen/rccOnlyRes.qrc b/Tests/QtAutogen/RccOnly/rccOnlyRes.qrc similarity index 100% rename from Tests/QtAutogen/rccOnlyRes.qrc rename to Tests/QtAutogen/RccOnly/rccOnlyRes.qrc https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9 commit 6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 17:38:13 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:27 2017 +0100 Autogen: Tests: Separate uicOnly test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 160903a..85029d1 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,15 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# UIC only -if(ALLOW_WRAP_CPP) - qtx_wrap_cpp(uicOnlyMoc uicOnlySource/uiconly.h) - add_executable(uicOnly uicOnlySource/uiconly.cpp ${uicOnlyMoc}) - set_property(TARGET uicOnly PROPERTY AUTOUIC ON) - target_link_libraries(uicOnly ${QT_LIBRARIES}) -endif() - -# -- Test # RCC only add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc) set_property(TARGET rccOnly PROPERTY AUTORCC ON) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 5abbee5..9121f41 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -1,3 +1,6 @@ # Autogen tests common for Qt4 and Qt5 ADD_AUTOGEN_TEST(MocOnly mocOnly) ADD_AUTOGEN_TEST(MocOptions mocOptions) +if(QT_TEST_ALLOW_QT_MACROS) + ADD_AUTOGEN_TEST(UicOnly uicOnly) +endif() diff --git a/Tests/QtAutogen/UicOnly/CMakeLists.txt b/Tests/QtAutogen/UicOnly/CMakeLists.txt new file mode 100644 index 0000000..89a9a1b --- /dev/null +++ b/Tests/QtAutogen/UicOnly/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.10) +project(UicOnly) +include("../AutogenTest.cmake") + +# Test AUTOUIC being enabled only +# The moc is provided by the Qt macro +qtx_wrap_cpp(uicOnlyMoc uiconly.h) +add_executable(uicOnly uiconly.cpp ${uicOnlyMoc}) +set_property(TARGET uicOnly PROPERTY AUTOUIC ON) +target_link_libraries(uicOnly ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/uicOnlySource/uiconly.cpp b/Tests/QtAutogen/UicOnly/uiconly.cpp similarity index 100% rename from Tests/QtAutogen/uicOnlySource/uiconly.cpp rename to Tests/QtAutogen/UicOnly/uiconly.cpp diff --git a/Tests/QtAutogen/uicOnlySource/uiconly.h b/Tests/QtAutogen/UicOnly/uiconly.h similarity index 100% rename from Tests/QtAutogen/uicOnlySource/uiconly.h rename to Tests/QtAutogen/UicOnly/uiconly.h diff --git a/Tests/QtAutogen/uicOnlySource/uiconly.ui b/Tests/QtAutogen/UicOnly/uiconly.ui similarity index 100% rename from Tests/QtAutogen/uicOnlySource/uiconly.ui rename to Tests/QtAutogen/UicOnly/uiconly.ui https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b8597a86ee8bed2c34f52d309fd57b5f29a1595 commit 0b8597a86ee8bed2c34f52d309fd57b5f29a1595 Author: Sebastian Holtermann AuthorDate: Fri Dec 8 17:29:23 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:27 2017 +0100 Autogen: Tests: Separate mocOnly and mocOnlyOpts tests diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index dff9d0c..160903a 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,17 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# MOC only -add_executable(mocOnly mocOnlySource/main.cpp mocOnlySource/StyleA.cpp mocOnlySource/StyleB.cpp) -set_property(TARGET mocOnly PROPERTY AUTOMOC ON) -target_link_libraries(mocOnly ${QT_LIBRARIES}) - -add_executable(mocOnlyOpts mocOnlySource/main.cpp mocOnlySource/StyleA.cpp mocOnlySource/StyleB.cpp) -set_property(TARGET mocOnlyOpts PROPERTY AUTOMOC ON) -set_property(TARGET mocOnlyOpts PROPERTY AUTOMOC_MOC_OPTIONS "-nw") -target_link_libraries(mocOnlyOpts ${QT_LIBRARIES}) - -# -- Test # UIC only if(ALLOW_WRAP_CPP) qtx_wrap_cpp(uicOnlyMoc uicOnlySource/uiconly.h) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 0eaf831..5abbee5 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -1 +1,3 @@ # Autogen tests common for Qt4 and Qt5 +ADD_AUTOGEN_TEST(MocOnly mocOnly) +ADD_AUTOGEN_TEST(MocOptions mocOptions) diff --git a/Tests/QtAutogen/MocOnly/CMakeLists.txt b/Tests/QtAutogen/MocOnly/CMakeLists.txt new file mode 100644 index 0000000..33feadf --- /dev/null +++ b/Tests/QtAutogen/MocOnly/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.10) +project(MocOnly) +include("../AutogenTest.cmake") + +# Test different Q_OBJECT position styles +add_executable(mocOnly StyleA.cpp StyleB.cpp main.cpp) +set_property(TARGET mocOnly PROPERTY AUTOMOC ON) +target_link_libraries(mocOnly ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/mocOnlySource/StyleA.cpp b/Tests/QtAutogen/MocOnly/StyleA.cpp similarity index 100% rename from Tests/QtAutogen/mocOnlySource/StyleA.cpp rename to Tests/QtAutogen/MocOnly/StyleA.cpp diff --git a/Tests/QtAutogen/mocOnlySource/StyleA.hpp b/Tests/QtAutogen/MocOnly/StyleA.hpp similarity index 79% rename from Tests/QtAutogen/mocOnlySource/StyleA.hpp rename to Tests/QtAutogen/MocOnly/StyleA.hpp index 66735b6..5ba0a87 100644 --- a/Tests/QtAutogen/mocOnlySource/StyleA.hpp +++ b/Tests/QtAutogen/MocOnly/StyleA.hpp @@ -3,6 +3,7 @@ #include +/* clang-format off */ /// Q_OBJECT on a single new line /// class StyleA : public QObject @@ -11,5 +12,6 @@ class StyleA : public QObject public: StyleA(); }; +/* clang-format on */ #endif diff --git a/Tests/QtAutogen/mocOnlySource/StyleB.cpp b/Tests/QtAutogen/MocOnly/StyleB.cpp similarity index 100% rename from Tests/QtAutogen/mocOnlySource/StyleB.cpp rename to Tests/QtAutogen/MocOnly/StyleB.cpp diff --git a/Tests/QtAutogen/mocOnlySource/StyleB.hpp b/Tests/QtAutogen/MocOnly/StyleB.hpp similarity index 81% rename from Tests/QtAutogen/mocOnlySource/StyleB.hpp rename to Tests/QtAutogen/MocOnly/StyleB.hpp index 425daf8..86abaa8 100644 --- a/Tests/QtAutogen/mocOnlySource/StyleB.hpp +++ b/Tests/QtAutogen/MocOnly/StyleB.hpp @@ -4,7 +4,7 @@ #include /* clang-format off */ -/// Q_OBJECT behind a brace +/// Q_OBJECT behind a brace on a new line /// class StyleB : public QObject { Q_OBJECT diff --git a/Tests/QtAutogen/mocOnlySource/main.cpp b/Tests/QtAutogen/MocOnly/main.cpp similarity index 100% rename from Tests/QtAutogen/mocOnlySource/main.cpp rename to Tests/QtAutogen/MocOnly/main.cpp diff --git a/Tests/QtAutogen/MocOptions/CMakeLists.txt b/Tests/QtAutogen/MocOptions/CMakeLists.txt new file mode 100644 index 0000000..f64b37b --- /dev/null +++ b/Tests/QtAutogen/MocOptions/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.10) +project(MocOptions) +include("../AutogenTest.cmake") + +# Test extra options passed to moc via AUTOMOC_MOC_OPTIONS +add_executable(mocOptions Object.cpp main.cpp) +set_property(TARGET mocOptions PROPERTY AUTOMOC ON) +set_property(TARGET mocOptions PROPERTY AUTOMOC_MOC_OPTIONS "-nw") +target_link_libraries(mocOptions ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/MocOptions/Object.cpp b/Tests/QtAutogen/MocOptions/Object.cpp new file mode 100644 index 0000000..ad109f1 --- /dev/null +++ b/Tests/QtAutogen/MocOptions/Object.cpp @@ -0,0 +1,5 @@ +#include "Object.hpp" + +Object::Object() +{ +} diff --git a/Tests/QtAutogen/MocOptions/Object.hpp b/Tests/QtAutogen/MocOptions/Object.hpp new file mode 100644 index 0000000..e7a6142 --- /dev/null +++ b/Tests/QtAutogen/MocOptions/Object.hpp @@ -0,0 +1,13 @@ +#ifndef Object_HPP +#define Object_HPP + +#include + +class Object : public QObject +{ + Q_OBJECT +public: + Object(); +}; + +#endif diff --git a/Tests/QtAutogen/MocOptions/main.cpp b/Tests/QtAutogen/MocOptions/main.cpp new file mode 100644 index 0000000..7aeab1a --- /dev/null +++ b/Tests/QtAutogen/MocOptions/main.cpp @@ -0,0 +1,7 @@ +#include "Object.hpp" + +int main(int argv, char** args) +{ + Object object; + return 0; +} diff --git a/Tests/QtAutogen/TestMacros.cmake b/Tests/QtAutogen/TestMacros.cmake index 849a733..966f3b8 100644 --- a/Tests/QtAutogen/TestMacros.cmake +++ b/Tests/QtAutogen/TestMacros.cmake @@ -41,9 +41,8 @@ macro(ADD_AUTOGEN_TEST NAME) unset(_BuildDir) endmacro() - # Allow using qtx_wrap_cpp and qtx_generate_moc or not -set(ALLOW_WRAP_CPP TRUE) +set(QT_TEST_ALLOW_QT_MACROS TRUE) # Do a simple check if there is are non ASCII character in the build path string(REGEX MATCH "[^ -~]+" NON_ASCII_BDIR ${CMAKE_CURRENT_BINARY_DIR}) if(NON_ASCII_BDIR) @@ -51,11 +50,11 @@ if(NON_ASCII_BDIR) # qtx_wrap_cpp # https://bugreports.qt.io/browse/QTBUG-35480 if(QT_TEST_VERSION STREQUAL 4) - set(ALLOW_WRAP_CPP FALSE) + set(QT_TEST_ALLOW_QT_MACROS FALSE) endif() # On windows qtx_wrap_cpp also fails in Qt5 when used on a path that # contains non ASCII characters if(WIN32) - set(ALLOW_WRAP_CPP FALSE) + set(QT_TEST_ALLOW_QT_MACROS FALSE) endif() endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=227a7974f426e0966d1736c66dd606b068985d1b commit 227a7974f426e0966d1736c66dd606b068985d1b Author: Sebastian Holtermann AuthorDate: Fri Dec 8 17:09:30 2017 +0100 Commit: Sebastian Holtermann CommitDate: Wed Dec 13 13:48:27 2017 +0100 Autogen: Tests: Add basic scripts for separate tests diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 1d13f1c..5608933 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1263,6 +1263,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release find_package(Qt5Widgets QUIET NO_MODULE) endif() if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND) + add_subdirectory(Qt5Autogen) + add_test(NAME Qt5Autogen COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/QtAutogen" @@ -1309,6 +1311,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5AutoUicInterface") endif() if(QT4_WORKS AND QT_QTGUI_FOUND) + add_subdirectory(Qt4Autogen) + add_test(NAME Qt4Autogen COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/QtAutogen" diff --git a/Tests/Qt4Autogen/CMakeLists.txt b/Tests/Qt4Autogen/CMakeLists.txt new file mode 100644 index 0000000..818e888 --- /dev/null +++ b/Tests/Qt4Autogen/CMakeLists.txt @@ -0,0 +1,9 @@ +# Set Qt test version and include the Autogen test macros +set(QT_TEST_VERSION 4) +include("../QtAutogen/TestMacros.cmake") + +# Qt4 only tests +ADD_AUTOGEN_TEST(DefinesTest) + +# Common tests +include("../QtAutogen/CommonTests.cmake") diff --git a/Tests/Qt5Autogen/CMakeLists.txt b/Tests/Qt5Autogen/CMakeLists.txt new file mode 100644 index 0000000..527e5ff --- /dev/null +++ b/Tests/Qt5Autogen/CMakeLists.txt @@ -0,0 +1,6 @@ +# Set Qt test version and include the Autogen test macros +set(QT_TEST_VERSION 5) +include("../QtAutogen/TestMacros.cmake") + +# Common tests +include("../QtAutogen/CommonTests.cmake") diff --git a/Tests/QtAutogen/AutogenTest.cmake b/Tests/QtAutogen/AutogenTest.cmake new file mode 100644 index 0000000..8c0a14f --- /dev/null +++ b/Tests/QtAutogen/AutogenTest.cmake @@ -0,0 +1,53 @@ + +# Tell find_package(Qt5) where to find Qt. +if(QT_QMAKE_EXECUTABLE) + get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH) + get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH) + list(APPEND CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR}) +endif() + +if (QT_TEST_VERSION STREQUAL 4) + find_package(Qt4 REQUIRED) + include(UseQt4) + + set(QT_QTCORE_TARGET Qt4::QtCore) + set(QT_QTGUI_TARGET Qt4::QtGui) + + # Qt macros + macro(qtx_wrap_cpp) + qt4_wrap_cpp(${ARGN}) + endmacro() + macro(qtx_generate_moc) + qt4_generate_moc(${ARGN}) + endmacro() + +elseif(QT_TEST_VERSION STREQUAL 5) + find_package(Qt5Widgets REQUIRED) + + set(QT_QTCORE_TARGET Qt5::Core) + set(QT_QTGUI_TARGET Qt5::Widgets) + + include_directories(${Qt5Widgets_INCLUDE_DIRS}) + set(QT_LIBRARIES Qt5::Widgets) + + if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) + add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC}) + endif() + + # Qt macros + macro(qtx_wrap_cpp) + qt5_wrap_cpp(${ARGN}) + endmacro() + macro(qtx_generate_moc) + qt5_generate_moc(${ARGN}) + endmacro() + +else() + message(SEND_ERROR "Invalid Qt version specified: ${QT_TEST_VERSION}") +endif() + +# Get Qt compile features +get_property(QT_COMPILE_FEATURES + TARGET ${QT_QTCORE_TARGET} + PROPERTY INTERFACE_COMPILE_FEATURES +) diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake new file mode 100644 index 0000000..0eaf831 --- /dev/null +++ b/Tests/QtAutogen/CommonTests.cmake @@ -0,0 +1 @@ +# Autogen tests common for Qt4 and Qt5 diff --git a/Tests/QtAutogen/DefinesTest/CMakeLists.txt b/Tests/QtAutogen/DefinesTest/CMakeLists.txt new file mode 100644 index 0000000..de22845 --- /dev/null +++ b/Tests/QtAutogen/DefinesTest/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.10) +project(DefinesTest) + +# Qt4 only definitions test +if(NOT QT_TEST_VERSION STREQUAL 4) + message(ERROR "Invalid Qt test version. This test is for Qt4 only.") +endif() + +find_package(Qt4 REQUIRED) + +add_executable(DefinesTest defines_test.cpp) +set_target_properties(DefinesTest PROPERTIES AUTOMOC TRUE) +target_link_libraries(DefinesTest Qt4::QtGui) diff --git a/Tests/QtAutogen/DefinesTest/defines_test.cpp b/Tests/QtAutogen/DefinesTest/defines_test.cpp new file mode 100644 index 0000000..cf4e9cb --- /dev/null +++ b/Tests/QtAutogen/DefinesTest/defines_test.cpp @@ -0,0 +1,38 @@ + +#include + +#ifdef QT_GUI_LIB +#include + +class SomeDocument : public QTextDocument +{ + Q_OBJECT + +Q_SIGNALS: + void someSig(); +}; +#endif + +#ifdef QT_CORE_LIB +class SomeObject : public QObject +{ + Q_OBJECT + +Q_SIGNALS: + void someSig(); +}; +#endif + +int main(int argc, char** argv) +{ +#ifdef QT_CORE_LIB + QMetaObject sosmo = SomeObject::staticMetaObject; +#endif +#ifdef QT_GUI_LIB + QMetaObject sdsmo = SomeDocument::staticMetaObject; +#endif + + return 0; +} + +#include "defines_test.moc" diff --git a/Tests/QtAutogen/TestMacros.cmake b/Tests/QtAutogen/TestMacros.cmake new file mode 100644 index 0000000..849a733 --- /dev/null +++ b/Tests/QtAutogen/TestMacros.cmake @@ -0,0 +1,61 @@ +# Autogen build options +set(Autogen_BUILD_OPTIONS "-DQT_TEST_VERSION=${QT_TEST_VERSION}") +if(NOT CMAKE_CONFIGURATION_TYPES) + list(APPEND Autogen_BUILD_OPTIONS "-DCMAKE_BUILD_TYPE=$") +endif() +list(APPEND Autogen_BUILD_OPTIONS + "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" +) + +# A macro to add a QtAutogen test +macro(ADD_AUTOGEN_TEST NAME) + if(${ARGC} GREATER 1) + # On Windows there is no RPATH, so while Qt might be available for building, + # the required dlls may not be in the PATH, so we can't run the executables + # on that platform. + if(WIN32) + set(_TestCommand --test-command ${CMAKE_CTEST_COMMAND} -V) + else() + set(_TestCommand --test-command ${ARGN}) + endif() + endif() + + set(_QtXAutogen "Qt${QT_TEST_VERSION}Autogen") + set(_SourceDir "${CMake_SOURCE_DIR}/Tests/QtAutogen/${NAME}") + set(_BuildDir "${CMake_BINARY_DIR}/Tests/${_QtXAutogen}/${NAME}") + add_test(NAME "${_QtXAutogen}.${NAME}" COMMAND "${CMAKE_CTEST_COMMAND}" + --build-and-test + "${_SourceDir}" + "${_BuildDir}" + ${build_generator_args} + --build-project ${NAME} + --build-exe-dir "${_BuildDir}" + --force-new-ctest-process + --build-options ${build_options} ${Autogen_BUILD_OPTIONS} + ${_TestCommand} + ) + list(APPEND TEST_BUILD_DIRS "${_BuildDir}") + unset(_TestCommand) + unset(_QtXAutogen) + unset(_SourceDir) + unset(_BuildDir) +endmacro() + + +# Allow using qtx_wrap_cpp and qtx_generate_moc or not +set(ALLOW_WRAP_CPP TRUE) +# Do a simple check if there is are non ASCII character in the build path +string(REGEX MATCH "[^ -~]+" NON_ASCII_BDIR ${CMAKE_CURRENT_BINARY_DIR}) +if(NON_ASCII_BDIR) + # Qt4 moc does not support utf8 paths in _parameter files generated by + # qtx_wrap_cpp + # https://bugreports.qt.io/browse/QTBUG-35480 + if(QT_TEST_VERSION STREQUAL 4) + set(ALLOW_WRAP_CPP FALSE) + endif() + # On windows qtx_wrap_cpp also fails in Qt5 when used on a path that + # contains non ASCII characters + if(WIN32) + set(ALLOW_WRAP_CPP FALSE) + endif() +endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d1ed84ceaa1c3467c091de302c778b5989bd03c commit 7d1ed84ceaa1c3467c091de302c778b5989bd03c Author: Christian Pfeiffer AuthorDate: Tue Dec 12 14:43:08 2017 +0100 Commit: Christian Pfeiffer CommitDate: Tue Dec 12 14:43:08 2017 +0100 IRSL: Skip libgfxoffload if no Intel C++ is used `libgfxoffload` is only used and installed by the Intel C/C++ compilers and will be unavailable if only Intel Fortran has been installed. Fixes: #17550 diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 38e0861..c886aef 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -600,11 +600,14 @@ if(_IRSL_HAVE_Intel) if(_Intel_compiler_ver VERSION_LESS 18) list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c") endif() - foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libgfxoffload.dll libioffload_host.dll libirngmd.dll + foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libioffload_host.dll libirngmd.dll libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll) list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") endforeach() + if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.dll") + endif() if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll) @@ -637,10 +640,10 @@ if(_IRSL_HAVE_Intel) endforeach() endif() if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15) - foreach(__Intel_lib IN ITEMS libgfxoffload.so libistrconv.so) - - list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") - endforeach() + list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.so") + if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.so") + endif() endif() if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16) foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main) ----------------------------------------------------------------------- Summary of changes: Modules/InstallRequiredSystemLibraries.cmake | 13 +- Source/cmExtraSublimeTextGenerator.cxx | 20 +- Source/cmGeneratorExpression.cxx | 16 ++ Source/cmGeneratorExpression.h | 47 +++- Source/cmGlobalXCodeGenerator.cxx | 29 ++- Source/cmLocalVisualStudio7Generator.cxx | 37 ++-- Source/cmMakefileTargetGenerator.cxx | 18 +- Source/cmNinjaTargetGenerator.cxx | 21 +- Source/cmServerProtocol.cxx | 19 +- Source/cmVisualStudio10TargetGenerator.cxx | 8 +- Tests/CMakeLists.txt | 105 +-------- Tests/GeneratorExpression/CMakeLists.txt | 8 + .../srcgenex_defs_COMPILE_LANGUAGE.c | 12 + .../srcgenex_flags_COMPILE_LANGUAGE.c | 12 + Tests/Qt4Autogen/CMakeLists.txt | 9 + Tests/Qt5Autogen/CMakeLists.txt | 6 + Tests/QtAutogen/AutogenTest.cmake | 53 +++++ Tests/QtAutogen/CMakeLists.txt | 233 -------------------- Tests/QtAutogen/CommonTests.cmake | 40 ++++ .../{complex => Complex}/Adir/CMakeLists.txt | 0 Tests/QtAutogen/{complex => Complex}/Adir/libA.cpp | 0 Tests/QtAutogen/{complex => Complex}/Adir/libA.h | 0 .../{complex => Complex}/Bdir/CMakeLists.txt | 0 Tests/QtAutogen/{complex => Complex}/Bdir/libB.cpp | 0 Tests/QtAutogen/{complex => Complex}/Bdir/libB.h | 0 .../QtAutogen/{complex => Complex}/CMakeLists.txt | 6 +- Tests/QtAutogen/{complex => Complex}/abc.cpp | 0 Tests/QtAutogen/{complex => Complex}/abc.h | 0 Tests/QtAutogen/{complex => Complex}/abc_p.h | 0 Tests/QtAutogen/{complex => Complex}/bar.cpp | 0 Tests/QtAutogen/{complex => Complex}/blub.cpp | 0 Tests/QtAutogen/{complex => Complex}/blub.h | 0 Tests/QtAutogen/{complex => Complex}/calwidget.cpp | 0 Tests/QtAutogen/{complex => Complex}/calwidget.h | 0 Tests/QtAutogen/{complex => Complex}/calwidget.ui | 0 .../QtAutogen/{complex => Complex}/codeeditor.cpp | 0 Tests/QtAutogen/{complex => Complex}/codeeditor.h | 0 .../QtAutogen/{complex => Complex}/debug_class.cpp | 0 Tests/QtAutogen/{complex => Complex}/debug_class.h | 0 .../QtAutogen/{complex => Complex}/debug_class.ui | 0 .../{complex => Complex}/debug_resource.qrc | 0 Tests/QtAutogen/{complex => Complex}/foo.cpp | 0 Tests/QtAutogen/{complex => Complex}/foo.h | 0 Tests/QtAutogen/{complex => Complex}/gadget.cpp | 0 Tests/QtAutogen/{complex => Complex}/gadget.h | 0 Tests/QtAutogen/{complex => Complex}/generated.cpp | 0 Tests/QtAutogen/{complex => Complex}/generated.h | 0 .../{complex => Complex}/generated.txt.in | 0 .../{complex => Complex}/generated_resource.qrc.in | 0 Tests/QtAutogen/{complex => Complex}/libC.cpp | 0 Tests/QtAutogen/{complex => Complex}/libC.h | 0 Tests/QtAutogen/{complex => Complex}/main.cpp | 0 .../{complex => Complex}/multiplewidgets.cpp | 0 .../{complex => Complex}/multiplewidgets.h | 0 .../{complex => Complex}/myinterface.h.in | 0 .../{complex => Complex}/myotherinterface.h.in | 0 .../{complex => Complex}/private_slot.cpp | 0 .../QtAutogen/{complex => Complex}/private_slot.h | 0 .../{complex => Complex}/resourcetester.cpp | 0 .../{complex => Complex}/resourcetester.h | 0 .../{complex => Complex}/second_resource.qrc | 0 .../{complex => Complex}/second_widget.cpp | 0 .../QtAutogen/{complex => Complex}/second_widget.h | 0 .../{complex => Complex}/second_widget.ui | 0 Tests/QtAutogen/{complex => Complex}/sub/bar.h | 0 .../{complex => Complex}/targetObjectsTest.cpp | 0 Tests/QtAutogen/{complex => Complex}/test.qrc | 0 Tests/QtAutogen/{complex => Complex}/widget1.ui | 0 Tests/QtAutogen/{complex => Complex}/widget2.ui | 0 Tests/QtAutogen/{complex => Complex}/xyz.cpp | 0 Tests/QtAutogen/{complex => Complex}/xyz.h | 0 Tests/QtAutogen/{complex => Complex}/yaf.cpp | 0 Tests/QtAutogen/{complex => Complex}/yaf.h | 0 Tests/QtAutogen/{complex => Complex}/yaf_p.h | 0 Tests/QtAutogen/DefinesTest/CMakeLists.txt | 13 ++ .../{defines_test => DefinesTest}/defines_test.cpp | 0 .../QtAutogen/{macosFW => MacOsFW}/CMakeLists.txt | 5 +- .../{macosFW => MacOsFW}/src/CMakeLists.txt | 0 .../{macosFW => MacOsFW}/src/macos_fw_lib.cpp | 0 .../{macosFW => MacOsFW}/src/macos_fw_lib.h | 0 .../{macosFW => MacOsFW}/test/CMakeLists.txt | 0 .../{macosFW => MacOsFW}/test/testMacosFWLib.cpp | 0 .../{macosFW => MacOsFW}/test/testMacosFWLib.h | 0 Tests/QtAutogen/MocCMP0071/CMakeLists.txt | 6 + .../{mocCMP0071 => MocCMP0071}/NEW/CMakeLists.txt | 2 +- .../{mocCMP0071 => MocCMP0071}/OLD/CMakeLists.txt | 2 +- Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/Obj.cpp | 0 Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/Obj.hpp | 0 Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/Obj_p.h | 0 .../QtAutogen/{mocCMP0071 => MocCMP0071}/main.cpp | 0 .../{mocDepends => MocDepends}/CMakeLists.txt | 30 +-- .../object_invalid.hpp.in | 0 .../{mocDepends => MocDepends}/object_valid.hpp.in | 0 .../{mocDepends => MocDepends}/simpleLib.cpp.in | 0 .../{mocDepends => MocDepends}/simpleLib.hpp.in | 0 .../{mocDepends => MocDepends}/testATDFile.cpp | 0 .../{mocDepends => MocDepends}/testATDTarget.cpp | 0 .../{mocDepends => MocDepends}/testGenFile.cpp | 0 .../{mocDepends => MocDepends}/testGenLib.cpp | 0 .../{mocDepends => MocDepends}/testGenLib.hpp | 0 .../{mocDepends => MocDepends}/testGenTarget.cpp | 0 .../QtAutogen/{mocInclude => MocInclude}/EObjA.cpp | 1 + .../QtAutogen/{mocInclude => MocInclude}/EObjA.hpp | 0 .../{mocInclude => MocInclude}/EObjAExtra.cpp | 0 .../{mocInclude => MocInclude}/EObjAExtra.hpp | 0 .../{mocInclude => MocInclude}/EObjAExtra_p.hpp | 0 .../{mocInclude => MocInclude}/EObjA_p.hpp | 0 .../QtAutogen/{mocInclude => MocInclude}/EObjB.cpp | 1 + .../QtAutogen/{mocInclude => MocInclude}/EObjB.hpp | 0 .../{mocInclude => MocInclude}/EObjB_p.hpp | 0 .../QtAutogen/{mocInclude => MocInclude}/LObjA.cpp | 0 .../QtAutogen/{mocInclude => MocInclude}/LObjA.hpp | 0 .../QtAutogen/{mocInclude => MocInclude}/LObjA_p.h | 0 .../QtAutogen/{mocInclude => MocInclude}/LObjB.cpp | 0 .../QtAutogen/{mocInclude => MocInclude}/LObjB.hpp | 0 .../QtAutogen/{mocInclude => MocInclude}/LObjB_p.h | 0 .../QtAutogen/{mocInclude => MocInclude}/ObjA.cpp | 0 .../QtAutogen/{mocInclude => MocInclude}/ObjA.hpp | 0 .../QtAutogen/{mocInclude => MocInclude}/ObjA_p.h | 0 .../QtAutogen/{mocInclude => MocInclude}/ObjB.cpp | 0 .../QtAutogen/{mocInclude => MocInclude}/ObjB.hpp | 0 .../QtAutogen/{mocInclude => MocInclude}/ObjB_p.h | 0 .../QtAutogen/{mocInclude => MocInclude}/SObjA.cpp | 0 .../QtAutogen/{mocInclude => MocInclude}/SObjA.hpp | 0 .../{mocInclude => MocInclude}/SObjB.cpp.in | 0 .../{mocInclude => MocInclude}/SObjB.hpp.in | 0 .../QtAutogen/{mocInclude => MocInclude}/SObjC.cpp | 0 .../QtAutogen/{mocInclude => MocInclude}/SObjC.hpp | 0 .../{mocInclude => MocInclude}/SObjCExtra.cpp | 0 .../{mocInclude => MocInclude}/SObjCExtra.hpp | 0 .../{mocInclude => MocInclude}/SObjCExtra.moc.in | 0 .../{mocInclude => MocInclude}/shared.cmake | 42 ++-- .../subExtra/EObjBExtra.cpp | 0 .../subExtra/EObjBExtra.hpp | 0 .../subExtra/EObjBExtra_p.hpp | 0 .../{mocInclude => MocInclude}/subGlobal/GObj.cpp | 0 .../{mocInclude => MocInclude}/subGlobal/GObj.hpp | 0 .../subGlobal/GObj_p.hpp | 0 .../CMakeLists.txt | 7 +- .../RMain.cpp | 0 .../RObjA.cpp | 0 .../RObjA.hpp | 0 .../RObjB.cpp | 0 .../RObjB.hpp | 0 .../RObjBExtra.hpp | 0 .../RObjC.cpp | 0 .../RObjC.hpp | 0 .../main.cpp | 0 Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt | 10 + .../main.cpp | 0 Tests/QtAutogen/MocMacroName/CMakeLists.txt | 17 ++ .../CustomMacros.hpp | 0 .../{mocMacroName => MocMacroName}/Gadget.cpp | 2 +- .../{mocMacroName => MocMacroName}/Gadget.hpp | 8 +- .../{mocMacroName => MocMacroName}/Object.cpp | 1 + .../{mocMacroName => MocMacroName}/Object.hpp | 7 +- .../Object1Aliased.cpp | 0 .../Object1Aliased.hpp | 0 .../Object2Aliased.cpp | 0 .../Object2Aliased.hpp | 0 .../{mocMacroName => MocMacroName}/main.cpp | 0 Tests/QtAutogen/MocOnly/CMakeLists.txt | 8 + .../{mocOnlySource => MocOnly}/StyleA.cpp | 0 .../{mocOnlySource => MocOnly}/StyleA.hpp | 2 + .../{mocOnlySource => MocOnly}/StyleB.cpp | 0 .../{mocOnlySource => MocOnly}/StyleB.hpp | 2 +- .../QtAutogen/{mocOnlySource => MocOnly}/main.cpp | 0 Tests/QtAutogen/MocOptions/CMakeLists.txt | 9 + .../{mocMacroName => MocOptions}/Object.cpp | 4 - .../object_valid.hpp.in => MocOptions/Object.hpp} | 7 +- .../mocPlugin => QtAutogen/MocOptions}/main.cpp | 3 +- Tests/QtAutogen/MocSkipSource/CMakeLists.txt | 36 +++ .../{skipSource => MocSkipSource}/qItemA.cpp | 0 .../{skipSource => MocSkipSource}/qItemA.hpp | 0 .../{skipSource => MocSkipSource}/qItemB.cpp | 0 .../{skipSource => MocSkipSource}/qItemB.hpp | 0 .../{skipSource => MocSkipSource}/qItemC.cpp | 0 .../{skipSource => MocSkipSource}/qItemC.hpp | 0 .../{skipSource => MocSkipSource}/qItemD.cpp | 0 .../{skipSource => MocSkipSource}/qItemD.hpp | 0 Tests/QtAutogen/{ => MocSkipSource}/skipMoc.cpp | 8 +- .../CMakeLists.txt | 4 + .../a/CMakeLists.txt | 0 .../{objectLibrary => ObjectLibrary}/a/classa.cpp | 0 .../{objectLibrary => ObjectLibrary}/a/classa.h | 0 .../{objectLibrary => ObjectLibrary}/b/classb.cpp | 0 .../{objectLibrary => ObjectLibrary}/b/classb.h | 0 .../{objectLibrary => ObjectLibrary}/main.cpp | 0 Tests/QtAutogen/RccEmpty/CMakeLists.txt | 8 + Tests/QtAutogen/{ => RccEmpty}/rccEmpty.cpp | 0 Tests/QtAutogen/{ => RccEmpty}/rccEmptyRes.qrc | 0 Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt | 17 ++ Tests/QtAutogen/{ => RccOffMocLibrary}/empty.cpp | 0 Tests/QtAutogen/{ => RccOffMocLibrary}/empty.h | 0 .../{ => RccOffMocLibrary}/not_generated_file.qrc | 0 Tests/QtAutogen/RccOnly/CMakeLists.txt | 8 + Tests/QtAutogen/{ => RccOnly}/rccOnly.cpp | 0 Tests/QtAutogen/{ => RccOnly}/rccOnlyRes.qrc | 0 Tests/QtAutogen/RccSkipSource/CMakeLists.txt | 23 ++ Tests/QtAutogen/{ => RccSkipSource}/skipRcc.cpp | 0 .../{skipSource => RccSkipSource}/skipRccBad1.qrc | 0 .../{skipSource => RccSkipSource}/skipRccBad2.qrc | 0 .../{skipSource => RccSkipSource}/skipRccGood.qrc | 0 Tests/QtAutogen/RerunMocBasic/CMakeLists.txt | 65 ++++++ .../RerunMocBasic/MocBasic/CMakeLists.txt | 24 ++ .../RerunMocBasic/MocBasic}/input.txt | 0 .../RerunMocBasic/MocBasic}/main.cpp.in | 5 + .../RerunMocBasic/MocBasic}/res1.qrc | 0 .../RerunMocBasic/MocBasic}/test1a.h.in | 0 .../RerunMocBasic/MocBasic}/test1b.h.in | 0 .../RerunMocBasic}/dummy.cpp | 0 .../RerunMocPlugin/CMakeLists.txt} | 17 +- .../RerunMocPlugin/MocPlugin}/CMakeLists.txt | 20 +- .../RerunMocPlugin/MocPlugin}/StyleA.cpp | 0 .../RerunMocPlugin/MocPlugin}/StyleA.hpp | 0 .../RerunMocPlugin/MocPlugin}/StyleA.json | 0 .../RerunMocPlugin/MocPlugin}/StyleA_Custom.json | 0 .../RerunMocPlugin/MocPlugin}/StyleB.cpp | 0 .../RerunMocPlugin/MocPlugin}/StyleB.hpp | 0 .../RerunMocPlugin/MocPlugin}/StyleC.cpp | 0 .../RerunMocPlugin/MocPlugin}/StyleC.hpp | 0 .../RerunMocPlugin/MocPlugin}/StyleD.cpp | 0 .../RerunMocPlugin/MocPlugin}/StyleD.hpp | 0 .../RerunMocPlugin/MocPlugin}/StyleE.cpp | 0 .../RerunMocPlugin/MocPlugin}/StyleE.hpp | 0 .../RerunMocPlugin/MocPlugin}/StyleEInclude.hpp | 0 .../RerunMocPlugin/MocPlugin}/UtilityMacros.hpp | 0 .../RerunMocPlugin/MocPlugin}/jsonIn/StyleB.json | 0 .../MocPlugin}/jsonIn/StyleB_Custom.json | 0 .../RerunMocPlugin/MocPlugin}/jsonIn/StyleC.json | 0 .../RerunMocPlugin/MocPlugin}/jsonIn/StyleD.json | 0 .../RerunMocPlugin/MocPlugin}/jsonIn/StyleE.json | 0 .../RerunMocPlugin/MocPlugin}/main.cpp | 0 .../RerunMocPlugin}/dummy.cpp | 0 .../RerunRccDepends/CMakeLists.txt} | 20 +- .../RerunRccDepends/RccDepends}/CMakeLists.txt | 32 +-- .../RerunRccDepends/RccDepends}/main.cpp | 0 .../RccDepends}/resGen/input.txt.in | 0 .../RccDepends}/resGen/inputAdded.txt.in | 0 .../RerunRccDepends/RccDepends}/resGenA.qrc.in | 0 .../RerunRccDepends/RccDepends}/resGenB.qrc.in | 0 .../RccDepends}/resPlain/input.txt.in | 0 .../RccDepends}/resPlain/inputAdded.txt.in | 0 .../RerunRccDepends/RccDepends}/resPlainA.qrc.in | 0 .../RerunRccDepends/RccDepends}/resPlainB.qrc.in | 0 .../RerunRccDepends}/dummy.cpp | 0 .../{sameName => SameName}/CMakeLists.txt | 7 +- .../{sameName => SameName}/aaa/bbb/data.qrc | 0 .../{sameName => SameName}/aaa/bbb/item.cpp | 0 .../{sameName => SameName}/aaa/bbb/item.hpp | 0 .../QtAutogen/{sameName => SameName}/aaa/data.qrc | 0 .../QtAutogen/{sameName => SameName}/aaa/item.cpp | 0 .../QtAutogen/{sameName => SameName}/aaa/item.hpp | 0 Tests/QtAutogen/{sameName => SameName}/aaa/view.ui | 0 .../{sameName => SameName}/bbb/aaa/data.qrc | 0 .../{sameName => SameName}/bbb/aaa/item.cpp | 0 .../{sameName => SameName}/bbb/aaa/item.hpp | 0 .../QtAutogen/{sameName => SameName}/bbb/data.qrc | 0 .../QtAutogen/{sameName => SameName}/bbb/item.cpp | 0 .../QtAutogen/{sameName => SameName}/bbb/item.hpp | 0 Tests/QtAutogen/{sameName => SameName}/bbb/view.ui | 0 .../QtAutogen/{sameName => SameName}/ccc/data.qrc | 0 .../QtAutogen/{sameName => SameName}/ccc/item.cpp | 0 .../QtAutogen/{sameName => SameName}/ccc/item.hpp | 0 Tests/QtAutogen/{sameName => SameName}/ccc/view.ui | 0 Tests/QtAutogen/{sameName => SameName}/data.qrc | 0 Tests/QtAutogen/{sameName => SameName}/item.cpp | 0 Tests/QtAutogen/{sameName => SameName}/item.hpp | 0 Tests/QtAutogen/{sameName => SameName}/main.cpp | 0 Tests/QtAutogen/{sameName => SameName}/view.ui | 0 .../CMakeLists.txt | 7 +- Tests/QtAutogen/StaticLibraryCycle/a.cpp | 12 + .../{staticLibraryCycle => StaticLibraryCycle}/a.h | 2 + .../b.cpp | 0 .../{staticLibraryCycle => StaticLibraryCycle}/b.h | 0 .../c.cpp | 0 .../{staticLibraryCycle => StaticLibraryCycle}/c.h | 0 .../main.cpp | 0 Tests/QtAutogen/TestMacros.cmake | 60 +++++ .../{uicInclude => UicInclude}/CMakeLists.txt | 5 +- .../QtAutogen/{uicInclude => UicInclude}/PageC.ui | 0 .../QtAutogen/{uicInclude => UicInclude}/PageC2.ui | 0 .../{uicInclude => UicInclude}/dirA/PageA.ui | 0 .../{uicInclude => UicInclude}/dirB/PageB.ui | 0 .../{uicInclude => UicInclude}/dirB/PageB2.ui | 0 .../dirB/subB/PageBsub.ui | 0 .../QtAutogen/{uicInclude => UicInclude}/main.cpp | 0 .../QtAutogen/{uicInclude => UicInclude}/main.hpp | 0 .../{uicInclude => UicInclude}/subC/PageCsub.ui | 0 .../UicInterface}/CMakeLists.txt | 30 +-- .../UicInterface}/klocalizedstring.cpp | 0 .../UicInterface}/klocalizedstring.h | 0 .../UicInterface}/libwidget.cpp | 0 .../UicInterface}/libwidget.h | 0 .../UicInterface}/libwidget.ui | 0 .../UicInterface}/main.cpp | 0 .../UicInterface}/mywidget.cpp | 0 .../UicInterface}/mywidget.h | 0 .../UicInterface}/mywidget.ui | 0 Tests/QtAutogen/UicOnly/CMakeLists.txt | 10 + .../{uicOnlySource => UicOnly}/uiconly.cpp | 0 .../QtAutogen/{uicOnlySource => UicOnly}/uiconly.h | 0 .../{uicOnlySource => UicOnly}/uiconly.ui | 0 Tests/QtAutogen/UicSkipSource/CMakeLists.txt | 22 ++ Tests/QtAutogen/{ => UicSkipSource}/skipUic.cpp | 6 +- .../{skipSource => UicSkipSource}/skipUicGen.cpp | 0 .../{skipSource => UicSkipSource}/skipUicGen.hpp | 0 .../skipUicNoGen1.cpp | 0 .../skipUicNoGen1.hpp | 0 .../skipUicNoGen2.cpp | 0 .../skipUicNoGen2.hpp | 0 .../{skipSource => UicSkipSource}/ui_nogen1.h | 0 .../{skipSource => UicSkipSource}/ui_nogen2.h | 2 +- .../{skipSource => UicSkipSource}/uigen1.ui | 0 .../{skipSource => UicSkipSource}/uigen2.ui | 0 Tests/QtAutogen/defines_test/CMakeLists.txt | 4 - Tests/QtAutogen/mocCMP0071/CMakeLists.txt | 4 - Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt | 6 - Tests/QtAutogen/mocMacroName/CMakeLists.txt | 8 - Tests/QtAutogen/staticLibraryCycle/a.cpp | 7 - Tests/QtAutogenRerun/CMakeLists.txt | 52 ----- Tests/QtAutogenRerun/defines_test/CMakeLists.txt | 4 - Tests/QtAutogenRerun/defines_test/defines_test.cpp | 38 ---- Tests/QtAutogenRerun/mocRerun.cmake | 60 ----- Tests/QtAutogenRerun/mocRerun/CMakeLists.txt | 33 --- .../PerSourceCompileDefinitions-result.txt} | 0 .../PerSourceCompileDefinitions-stderr-VS.txt | 7 + .../PerSourceCompileDefinitions-stderr-Xcode.txt | 7 + .../PerSourceCompileDefinitions.cmake | 5 + .../COMPILE_LANGUAGE-genex/RunCMakeTest.cmake | 7 + 330 files changed, 829 insertions(+), 764 deletions(-) create mode 100644 Tests/GeneratorExpression/srcgenex_defs_COMPILE_LANGUAGE.c create mode 100644 Tests/GeneratorExpression/srcgenex_flags_COMPILE_LANGUAGE.c create mode 100644 Tests/Qt4Autogen/CMakeLists.txt create mode 100644 Tests/Qt5Autogen/CMakeLists.txt create mode 100644 Tests/QtAutogen/AutogenTest.cmake delete mode 100644 Tests/QtAutogen/CMakeLists.txt create mode 100644 Tests/QtAutogen/CommonTests.cmake rename Tests/QtAutogen/{complex => Complex}/Adir/CMakeLists.txt (100%) rename Tests/QtAutogen/{complex => Complex}/Adir/libA.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/Adir/libA.h (100%) rename Tests/QtAutogen/{complex => Complex}/Bdir/CMakeLists.txt (100%) rename Tests/QtAutogen/{complex => Complex}/Bdir/libB.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/Bdir/libB.h (100%) rename Tests/QtAutogen/{complex => Complex}/CMakeLists.txt (97%) rename Tests/QtAutogen/{complex => Complex}/abc.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/abc.h (100%) rename Tests/QtAutogen/{complex => Complex}/abc_p.h (100%) rename Tests/QtAutogen/{complex => Complex}/bar.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/blub.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/blub.h (100%) rename Tests/QtAutogen/{complex => Complex}/calwidget.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/calwidget.h (100%) rename Tests/QtAutogen/{complex => Complex}/calwidget.ui (100%) rename Tests/QtAutogen/{complex => Complex}/codeeditor.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/codeeditor.h (100%) rename Tests/QtAutogen/{complex => Complex}/debug_class.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/debug_class.h (100%) rename Tests/QtAutogen/{complex => Complex}/debug_class.ui (100%) rename Tests/QtAutogen/{complex => Complex}/debug_resource.qrc (100%) rename Tests/QtAutogen/{complex => Complex}/foo.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/foo.h (100%) rename Tests/QtAutogen/{complex => Complex}/gadget.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/gadget.h (100%) rename Tests/QtAutogen/{complex => Complex}/generated.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/generated.h (100%) rename Tests/QtAutogen/{complex => Complex}/generated.txt.in (100%) rename Tests/QtAutogen/{complex => Complex}/generated_resource.qrc.in (100%) rename Tests/QtAutogen/{complex => Complex}/libC.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/libC.h (100%) rename Tests/QtAutogen/{complex => Complex}/main.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/multiplewidgets.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/multiplewidgets.h (100%) rename Tests/QtAutogen/{complex => Complex}/myinterface.h.in (100%) rename Tests/QtAutogen/{complex => Complex}/myotherinterface.h.in (100%) rename Tests/QtAutogen/{complex => Complex}/private_slot.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/private_slot.h (100%) rename Tests/QtAutogen/{complex => Complex}/resourcetester.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/resourcetester.h (100%) rename Tests/QtAutogen/{complex => Complex}/second_resource.qrc (100%) rename Tests/QtAutogen/{complex => Complex}/second_widget.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/second_widget.h (100%) rename Tests/QtAutogen/{complex => Complex}/second_widget.ui (100%) rename Tests/QtAutogen/{complex => Complex}/sub/bar.h (100%) rename Tests/QtAutogen/{complex => Complex}/targetObjectsTest.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/test.qrc (100%) rename Tests/QtAutogen/{complex => Complex}/widget1.ui (100%) rename Tests/QtAutogen/{complex => Complex}/widget2.ui (100%) rename Tests/QtAutogen/{complex => Complex}/xyz.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/xyz.h (100%) rename Tests/QtAutogen/{complex => Complex}/yaf.cpp (100%) rename Tests/QtAutogen/{complex => Complex}/yaf.h (100%) rename Tests/QtAutogen/{complex => Complex}/yaf_p.h (100%) create mode 100644 Tests/QtAutogen/DefinesTest/CMakeLists.txt rename Tests/QtAutogen/{defines_test => DefinesTest}/defines_test.cpp (100%) rename Tests/QtAutogen/{macosFW => MacOsFW}/CMakeLists.txt (85%) rename Tests/QtAutogen/{macosFW => MacOsFW}/src/CMakeLists.txt (100%) rename Tests/QtAutogen/{macosFW => MacOsFW}/src/macos_fw_lib.cpp (100%) rename Tests/QtAutogen/{macosFW => MacOsFW}/src/macos_fw_lib.h (100%) rename Tests/QtAutogen/{macosFW => MacOsFW}/test/CMakeLists.txt (100%) rename Tests/QtAutogen/{macosFW => MacOsFW}/test/testMacosFWLib.cpp (100%) rename Tests/QtAutogen/{macosFW => MacOsFW}/test/testMacosFWLib.h (100%) create mode 100644 Tests/QtAutogen/MocCMP0071/CMakeLists.txt rename Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/NEW/CMakeLists.txt (94%) rename Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/OLD/CMakeLists.txt (95%) rename Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/Obj.cpp (100%) rename Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/Obj.hpp (100%) rename Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/Obj_p.h (100%) rename Tests/QtAutogen/{mocCMP0071 => MocCMP0071}/main.cpp (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/CMakeLists.txt (89%) rename Tests/QtAutogen/{mocDepends => MocDepends}/object_invalid.hpp.in (100%) copy Tests/QtAutogen/{mocDepends => MocDepends}/object_valid.hpp.in (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/simpleLib.cpp.in (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/simpleLib.hpp.in (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/testATDFile.cpp (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/testATDTarget.cpp (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/testGenFile.cpp (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/testGenLib.cpp (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/testGenLib.hpp (100%) rename Tests/QtAutogen/{mocDepends => MocDepends}/testGenTarget.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjA.cpp (97%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjA.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjAExtra.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjAExtra.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjAExtra_p.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjA_p.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjB.cpp (97%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjB.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/EObjB_p.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/LObjA.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/LObjA.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/LObjA_p.h (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/LObjB.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/LObjB.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/LObjB_p.h (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/ObjA.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/ObjA.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/ObjA_p.h (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/ObjB.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/ObjB.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/ObjB_p.h (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjA.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjA.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjB.cpp.in (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjB.hpp.in (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjC.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjC.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjCExtra.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjCExtra.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/SObjCExtra.moc.in (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/shared.cmake (67%) rename Tests/QtAutogen/{mocInclude => MocInclude}/subExtra/EObjBExtra.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/subExtra/EObjBExtra.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/subExtra/EObjBExtra_p.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/subGlobal/GObj.cpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/subGlobal/GObj.hpp (100%) rename Tests/QtAutogen/{mocInclude => MocInclude}/subGlobal/GObj_p.hpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/CMakeLists.txt (69%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RMain.cpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RObjA.cpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RObjA.hpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RObjB.cpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RObjB.hpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RObjBExtra.hpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RObjC.cpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/RObjC.hpp (100%) rename Tests/QtAutogen/{mocIncludeRelaxed => MocIncludeRelaxed}/main.cpp (100%) create mode 100644 Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt rename Tests/QtAutogen/{mocIncludeStrict => MocIncludeStrict}/main.cpp (100%) create mode 100644 Tests/QtAutogen/MocMacroName/CMakeLists.txt rename Tests/QtAutogen/{mocMacroName => MocMacroName}/CustomMacros.hpp (100%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/Gadget.cpp (77%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/Gadget.hpp (55%) copy Tests/QtAutogen/{mocMacroName => MocMacroName}/Object.cpp (84%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/Object.hpp (63%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/Object1Aliased.cpp (100%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/Object1Aliased.hpp (100%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/Object2Aliased.cpp (100%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/Object2Aliased.hpp (100%) rename Tests/QtAutogen/{mocMacroName => MocMacroName}/main.cpp (100%) create mode 100644 Tests/QtAutogen/MocOnly/CMakeLists.txt rename Tests/QtAutogen/{mocOnlySource => MocOnly}/StyleA.cpp (100%) rename Tests/QtAutogen/{mocOnlySource => MocOnly}/StyleA.hpp (79%) rename Tests/QtAutogen/{mocOnlySource => MocOnly}/StyleB.cpp (100%) rename Tests/QtAutogen/{mocOnlySource => MocOnly}/StyleB.hpp (81%) rename Tests/QtAutogen/{mocOnlySource => MocOnly}/main.cpp (100%) create mode 100644 Tests/QtAutogen/MocOptions/CMakeLists.txt rename Tests/QtAutogen/{mocMacroName => MocOptions}/Object.cpp (62%) rename Tests/QtAutogen/{mocDepends/object_valid.hpp.in => MocOptions/Object.hpp} (56%) copy Tests/{QtAutogenRerun/mocPlugin => QtAutogen/MocOptions}/main.cpp (55%) create mode 100644 Tests/QtAutogen/MocSkipSource/CMakeLists.txt rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemA.cpp (100%) rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemA.hpp (100%) rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemB.cpp (100%) rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemB.hpp (100%) rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemC.cpp (100%) rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemC.hpp (100%) rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemD.cpp (100%) rename Tests/QtAutogen/{skipSource => MocSkipSource}/qItemD.hpp (100%) rename Tests/QtAutogen/{ => MocSkipSource}/skipMoc.cpp (53%) rename Tests/QtAutogen/{objectLibrary => ObjectLibrary}/CMakeLists.txt (83%) rename Tests/QtAutogen/{objectLibrary => ObjectLibrary}/a/CMakeLists.txt (100%) rename Tests/QtAutogen/{objectLibrary => ObjectLibrary}/a/classa.cpp (100%) rename Tests/QtAutogen/{objectLibrary => ObjectLibrary}/a/classa.h (100%) rename Tests/QtAutogen/{objectLibrary => ObjectLibrary}/b/classb.cpp (100%) rename Tests/QtAutogen/{objectLibrary => ObjectLibrary}/b/classb.h (100%) rename Tests/QtAutogen/{objectLibrary => ObjectLibrary}/main.cpp (100%) create mode 100644 Tests/QtAutogen/RccEmpty/CMakeLists.txt rename Tests/QtAutogen/{ => RccEmpty}/rccEmpty.cpp (100%) rename Tests/QtAutogen/{ => RccEmpty}/rccEmptyRes.qrc (100%) create mode 100644 Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt rename Tests/QtAutogen/{ => RccOffMocLibrary}/empty.cpp (100%) rename Tests/QtAutogen/{ => RccOffMocLibrary}/empty.h (100%) rename Tests/QtAutogen/{ => RccOffMocLibrary}/not_generated_file.qrc (100%) create mode 100644 Tests/QtAutogen/RccOnly/CMakeLists.txt rename Tests/QtAutogen/{ => RccOnly}/rccOnly.cpp (100%) rename Tests/QtAutogen/{ => RccOnly}/rccOnlyRes.qrc (100%) create mode 100644 Tests/QtAutogen/RccSkipSource/CMakeLists.txt rename Tests/QtAutogen/{ => RccSkipSource}/skipRcc.cpp (100%) rename Tests/QtAutogen/{skipSource => RccSkipSource}/skipRccBad1.qrc (100%) rename Tests/QtAutogen/{skipSource => RccSkipSource}/skipRccBad2.qrc (100%) rename Tests/QtAutogen/{skipSource => RccSkipSource}/skipRccGood.qrc (100%) create mode 100644 Tests/QtAutogen/RerunMocBasic/CMakeLists.txt create mode 100644 Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt rename Tests/{QtAutogenRerun/mocRerun => QtAutogen/RerunMocBasic/MocBasic}/input.txt (100%) rename Tests/{QtAutogenRerun/mocRerun => QtAutogen/RerunMocBasic/MocBasic}/main.cpp.in (58%) rename Tests/{QtAutogenRerun/mocRerun => QtAutogen/RerunMocBasic/MocBasic}/res1.qrc (100%) rename Tests/{QtAutogenRerun/mocRerun => QtAutogen/RerunMocBasic/MocBasic}/test1a.h.in (100%) rename Tests/{QtAutogenRerun/mocRerun => QtAutogen/RerunMocBasic/MocBasic}/test1b.h.in (100%) copy Tests/{QtAutogenRerun => QtAutogen/RerunMocBasic}/dummy.cpp (100%) rename Tests/{QtAutogenRerun/mocPlugin.cmake => QtAutogen/RerunMocPlugin/CMakeLists.txt} (89%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/CMakeLists.txt (78%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleA.cpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleA.hpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleA.json (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleA_Custom.json (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleB.cpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleB.hpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleC.cpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleC.hpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleD.cpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleD.hpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleE.cpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleE.hpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/StyleEInclude.hpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/UtilityMacros.hpp (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/jsonIn/StyleB.json (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/jsonIn/StyleB_Custom.json (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/jsonIn/StyleC.json (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/jsonIn/StyleD.json (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/jsonIn/StyleE.json (100%) rename Tests/{QtAutogenRerun/mocPlugin => QtAutogen/RerunMocPlugin/MocPlugin}/main.cpp (100%) copy Tests/{QtAutogenRerun => QtAutogen/RerunMocPlugin}/dummy.cpp (100%) rename Tests/{QtAutogenRerun/rccDepends.cmake => QtAutogen/RerunRccDepends/CMakeLists.txt} (92%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/CMakeLists.txt (64%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/main.cpp (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resGen/input.txt.in (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resGen/inputAdded.txt.in (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resGenA.qrc.in (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resGenB.qrc.in (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resPlain/input.txt.in (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resPlain/inputAdded.txt.in (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resPlainA.qrc.in (100%) rename Tests/{QtAutogenRerun/rccDepends => QtAutogen/RerunRccDepends/RccDepends}/resPlainB.qrc.in (100%) rename Tests/{QtAutogenRerun => QtAutogen/RerunRccDepends}/dummy.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/CMakeLists.txt (89%) rename Tests/QtAutogen/{sameName => SameName}/aaa/bbb/data.qrc (100%) rename Tests/QtAutogen/{sameName => SameName}/aaa/bbb/item.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/aaa/bbb/item.hpp (100%) rename Tests/QtAutogen/{sameName => SameName}/aaa/data.qrc (100%) rename Tests/QtAutogen/{sameName => SameName}/aaa/item.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/aaa/item.hpp (100%) rename Tests/QtAutogen/{sameName => SameName}/aaa/view.ui (100%) rename Tests/QtAutogen/{sameName => SameName}/bbb/aaa/data.qrc (100%) rename Tests/QtAutogen/{sameName => SameName}/bbb/aaa/item.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/bbb/aaa/item.hpp (100%) rename Tests/QtAutogen/{sameName => SameName}/bbb/data.qrc (100%) rename Tests/QtAutogen/{sameName => SameName}/bbb/item.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/bbb/item.hpp (100%) rename Tests/QtAutogen/{sameName => SameName}/bbb/view.ui (100%) rename Tests/QtAutogen/{sameName => SameName}/ccc/data.qrc (100%) rename Tests/QtAutogen/{sameName => SameName}/ccc/item.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/ccc/item.hpp (100%) rename Tests/QtAutogen/{sameName => SameName}/ccc/view.ui (100%) rename Tests/QtAutogen/{sameName => SameName}/data.qrc (100%) rename Tests/QtAutogen/{sameName => SameName}/item.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/item.hpp (100%) rename Tests/QtAutogen/{sameName => SameName}/main.cpp (100%) rename Tests/QtAutogen/{sameName => SameName}/view.ui (100%) rename Tests/QtAutogen/{staticLibraryCycle => StaticLibraryCycle}/CMakeLists.txt (73%) create mode 100644 Tests/QtAutogen/StaticLibraryCycle/a.cpp rename Tests/QtAutogen/{staticLibraryCycle => StaticLibraryCycle}/a.h (83%) rename Tests/QtAutogen/{staticLibraryCycle => StaticLibraryCycle}/b.cpp (100%) rename Tests/QtAutogen/{staticLibraryCycle => StaticLibraryCycle}/b.h (100%) rename Tests/QtAutogen/{staticLibraryCycle => StaticLibraryCycle}/c.cpp (100%) rename Tests/QtAutogen/{staticLibraryCycle => StaticLibraryCycle}/c.h (100%) rename Tests/QtAutogen/{staticLibraryCycle => StaticLibraryCycle}/main.cpp (100%) create mode 100644 Tests/QtAutogen/TestMacros.cmake rename Tests/QtAutogen/{uicInclude => UicInclude}/CMakeLists.txt (68%) rename Tests/QtAutogen/{uicInclude => UicInclude}/PageC.ui (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/PageC2.ui (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/dirA/PageA.ui (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/dirB/PageB.ui (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/dirB/PageB2.ui (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/dirB/subB/PageBsub.ui (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/main.cpp (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/main.hpp (100%) rename Tests/QtAutogen/{uicInclude => UicInclude}/subC/PageCsub.ui (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/CMakeLists.txt (71%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/klocalizedstring.cpp (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/klocalizedstring.h (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/libwidget.cpp (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/libwidget.h (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/libwidget.ui (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/main.cpp (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/mywidget.cpp (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/mywidget.h (100%) rename Tests/{QtAutoUicInterface => QtAutogen/UicInterface}/mywidget.ui (100%) create mode 100644 Tests/QtAutogen/UicOnly/CMakeLists.txt rename Tests/QtAutogen/{uicOnlySource => UicOnly}/uiconly.cpp (100%) rename Tests/QtAutogen/{uicOnlySource => UicOnly}/uiconly.h (100%) rename Tests/QtAutogen/{uicOnlySource => UicOnly}/uiconly.ui (100%) create mode 100644 Tests/QtAutogen/UicSkipSource/CMakeLists.txt rename Tests/QtAutogen/{ => UicSkipSource}/skipUic.cpp (57%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/skipUicGen.cpp (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/skipUicGen.hpp (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/skipUicNoGen1.cpp (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/skipUicNoGen1.hpp (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/skipUicNoGen2.cpp (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/skipUicNoGen2.hpp (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/ui_nogen1.h (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/ui_nogen2.h (89%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/uigen1.ui (100%) rename Tests/QtAutogen/{skipSource => UicSkipSource}/uigen2.ui (100%) delete mode 100644 Tests/QtAutogen/defines_test/CMakeLists.txt delete mode 100644 Tests/QtAutogen/mocCMP0071/CMakeLists.txt delete mode 100644 Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt delete mode 100644 Tests/QtAutogen/mocMacroName/CMakeLists.txt delete mode 100644 Tests/QtAutogen/staticLibraryCycle/a.cpp delete mode 100644 Tests/QtAutogenRerun/CMakeLists.txt delete mode 100644 Tests/QtAutogenRerun/defines_test/CMakeLists.txt delete mode 100644 Tests/QtAutogenRerun/defines_test/defines_test.cpp delete mode 100644 Tests/QtAutogenRerun/mocRerun.cmake delete mode 100644 Tests/QtAutogenRerun/mocRerun/CMakeLists.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-result.txt} (100%) create mode 100644 Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-VS.txt create mode 100644 Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions-stderr-Xcode.txt create mode 100644 Tests/RunCMake/COMPILE_LANGUAGE-genex/PerSourceCompileDefinitions.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 14 08:45:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 14 Dec 2017 08:45:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-627-g0d1b6c8 Message-ID: <20171214134505.0451BF9F0B@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 0d1b6c89dcefa4d2d690d5ed030022c82b5503bd (commit) via 307214c0eeb283c24584ba0e14bb2be1ade67ca6 (commit) from 4bc5c08476f28a23f42b4566a760b21cef60c4b3 (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=0d1b6c89dcefa4d2d690d5ed030022c82b5503bd commit 0d1b6c89dcefa4d2d690d5ed030022c82b5503bd Merge: 4bc5c08 307214c Author: Brad King AuthorDate: Thu Dec 14 08:39:55 2017 -0500 Commit: Brad King CommitDate: Thu Dec 14 08:39:55 2017 -0500 Merge branch 'release-3.10' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 14 08:45:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 14 Dec 2017 08:45:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.1-2-g307214c Message-ID: <20171214134505.172221021EA@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 307214c0eeb283c24584ba0e14bb2be1ade67ca6 (commit) via 9b4d31dc771f630961d903df318f1539ddd955d1 (commit) from 166bf4c490b8f46eca057fc23c3f3c2e042e9cb3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/cmGraphVizWriter.cxx | 41 ++++++++++++++++++++++++++--------------- Source/cmGraphVizWriter.h | 1 + 2 files changed, 27 insertions(+), 15 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 15 00:05:16 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 15 Dec 2017 00:05:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-628-g4549eed Message-ID: <20171215050516.81BC4102D56@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 4549eed94706d20ebbb1e8187f5b028c7bd4aa2e (commit) from 0d1b6c89dcefa4d2d690d5ed030022c82b5503bd (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=4549eed94706d20ebbb1e8187f5b028c7bd4aa2e commit 4549eed94706d20ebbb1e8187f5b028c7bd4aa2e Author: Kitware Robot AuthorDate: Fri Dec 15 00:01:19 2017 -0500 Commit: Kitware Robot CommitDate: Fri Dec 15 00:01:19 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3556f94..28a9ffa 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 10) -set(CMake_VERSION_PATCH 20171214) +set(CMake_VERSION_PATCH 20171215) #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 Dec 15 10:45:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 15 Dec 2017 10:45:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-639-gf67f76c Message-ID: <20171215154507.44D9C1027E9@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 f67f76c2b3a4c50d4116ce806df0c7f861e227dd (commit) via 76fa3b383e037f69089f0b193708456d3f47c8ed (commit) via 6fb568cef6c8eebe1730c51bee7f4f92ce805c39 (commit) via 44111e5cc04ee689627acf5468d08e05c12b33aa (commit) via f1299f5d82479b9acd103697fe08ab12edfd6a5d (commit) via d9154e521a815d9cceabc9a4a04c795628df0fd7 (commit) via ccc9a6c706ad34cdb92457e701b5fcf3d7760af2 (commit) via 907bc3543727767b72e3d9085dbb3c02b1a717ae (commit) via 7ab9a62572058d6cd8e5bf130d7aa27d5a2e50f2 (commit) via 5f2e2c387deb7f798cbc54d0980503e05873eaaa (commit) via 8164298935cdd0970a4e86327184866496694b65 (commit) from 4549eed94706d20ebbb1e8187f5b028c7bd4aa2e (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=f67f76c2b3a4c50d4116ce806df0c7f861e227dd commit f67f76c2b3a4c50d4116ce806df0c7f861e227dd Merge: 76fa3b3 f1299f5 Author: Brad King AuthorDate: Fri Dec 15 15:42:44 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 15 10:43:07 2017 -0500 Merge topic 'FindFLTK-per-config' f1299f5d FindFLTK: Find debug and release variants separately d9154e52 FindFLTK: revise .rst markup ccc9a6c7 FindFLTK: fix indentation Acked-by: Kitware Robot Merge-request: !1563 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76fa3b383e037f69089f0b193708456d3f47c8ed commit 76fa3b383e037f69089f0b193708456d3f47c8ed Merge: 6fb568c 907bc35 Author: Brad King AuthorDate: Fri Dec 15 15:42:16 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 15 10:42:43 2017 -0500 Merge topic 'vs-vcxproj-lowercase-utf-8' 907bc354 VS: Emit "utf-8" encoding as lowercase in .vcxproj headers Acked-by: Kitware Robot Merge-request: !1594 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fb568cef6c8eebe1730c51bee7f4f92ce805c39 commit 6fb568cef6c8eebe1730c51bee7f4f92ce805c39 Merge: 44111e5 7ab9a62 Author: Brad King AuthorDate: Fri Dec 15 15:42:01 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 15 10:42:12 2017 -0500 Merge topic 'makefile-simplify-fortran' 7ab9a625 Makefiles: Drop 'requires' step and its supporting infrastructure 5f2e2c38 Makefiles: Avoid nested make calls for Fortran module dependencies Acked-by: Kitware Robot Merge-request: !1523 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44111e5cc04ee689627acf5468d08e05c12b33aa commit 44111e5cc04ee689627acf5468d08e05c12b33aa Merge: 4549eed 8164298 Author: Brad King AuthorDate: Fri Dec 15 15:35:13 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 15 10:35:17 2017 -0500 Merge topic 'fix_failing_ResolveDeviceSymbols_test' 81642989 Cuda: ResolveDeviceSymbols now properly execute everywhere. Acked-by: Kitware Robot Merge-request: !1593 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f1299f5d82479b9acd103697fe08ab12edfd6a5d commit f1299f5d82479b9acd103697fe08ab12edfd6a5d Author: Stefano Sinigardi AuthorDate: Thu Dec 14 13:40:58 2017 +0100 Commit: Brad King CommitDate: Thu Dec 14 08:36:23 2017 -0500 FindFLTK: Find debug and release variants separately diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index 2a88bbb..82c63ef 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -54,17 +54,29 @@ # # The following cache variables are also available to set or use: # -# ``FLTK_BASE_LIBRARY`` -# Path to the FLTK base library +# ``FLTK_BASE_LIBRARY_RELEASE`` +# The FLTK base library (optimized) # -# ``FLTK_GL_LIBRARY`` -# Path to the FLTK GL library +# ``FLTK_BASE_LIBRARY_DEBUG`` +# The FLTK base library (debug) # -# ``FLTK_FORMS_LIBRARY`` -# Path to the FLTK Forms library +# ``FLTK_GL_LIBRARY_RELEASE`` +# The FLTK GL library (optimized) # -# ``FLTK_IMAGES_LIBRARY`` -# Path to the FLTK Images protobuf library +# ``FLTK_GL_LIBRARY_DEBUG`` +# The FLTK GL library (debug) +# +# ``FLTK_FORMS_LIBRARY_RELEASE`` +# The FLTK Forms library (optimized) +# +# ``FLTK_FORMS_LIBRARY_DEBUG`` +# The FLTK Forms library (debug) +# +# ``FLTK_IMAGES_LIBRARY_RELEASE`` +# The FLTK Images protobuf library (optimized) +# +# ``FLTK_IMAGES_LIBRARY_DEBUG`` +# The FLTK Images library (debug) if(NOT FLTK_SKIP_OPENGL) find_package(OpenGL) @@ -244,14 +256,29 @@ else() list(APPEND FLTK_LIBRARY_SEARCH_PATH ${FLTK_INCLUDE_DIR}/lib ${_FLTK_POSSIBLE_LIBRARY_DIR}) - find_library(FLTK_BASE_LIBRARY NAMES fltk fltkd - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) - find_library(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) - find_library(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) - find_library(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + + # Allow libraries to be set manually + if(NOT FLTK_BASE_LIBRARY) + find_library(FLTK_BASE_LIBRARY_RELEASE NAMES fltk PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_BASE_LIBRARY_DEBUG NAMES fltkd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_BASE) + endif() + if(NOT FLTK_GL_LIBRARY) + find_library(FLTK_GL_LIBRARY_RELEASE NAMES fltkgl fltk_gl PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_GL_LIBRARY_DEBUG NAMES fltkgld fltk_gld PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_GL) + endif() + if(NOT FLTK_FORMS_LIBRARY) + find_library(FLTK_FORMS_LIBRARY_RELEASE NAMES fltkforms fltk_forms PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_FORMS_LIBRARY_DEBUG NAMES fltkformsd fltk_formsd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_FORMS) + endif() + if(NOT FLTK_IMAGES_LIBRARY) + find_library(FLTK_IMAGES_LIBRARY_RELEASE NAMES fltkimages fltk_images PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_IMAGES_LIBRARY_DEBUG NAMES fltkimagesd fltk_imagesd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + select_library_configurations(FLTK_IMAGES) + endif() # Find the extra libraries needed for the fltk_images library. if(UNIX) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9154e521a815d9cceabc9a4a04c795628df0fd7 commit d9154e521a815d9cceabc9a4a04c795628df0fd7 Author: Stefano Sinigardi AuthorDate: Thu Dec 14 13:39:58 2017 +0100 Commit: Brad King CommitDate: Thu Dec 14 08:36:23 2017 -0500 FindFLTK: revise .rst markup diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index a316a4f..2a88bbb 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -5,57 +5,66 @@ # FindFLTK # -------- # -# Find the native FLTK includes and library +# Find the FLTK library # +# Input Variables +# ^^^^^^^^^^^^^^^ # +# By default this module will search for all of the FLTK components and +# add them to the FLTK_LIBRARIES variable. You can limit the components +# which get placed in FLTK_LIBRARIES by defining one or more of the +# following three options: # -# By default FindFLTK.cmake will search for all of the FLTK components -# and add them to the FLTK_LIBRARIES variable. +# ``FLTK_SKIP_OPENGL`` +# Set to true to disable searching for the FLTK GL library # -# :: +# ``FLTK_SKIP_FORMS`` +# Set to true to disable searching for the FLTK Forms library # -# You can limit the components which get placed in FLTK_LIBRARIES by -# defining one or more of the following three options: +# ``FLTK_SKIP_IMAGES`` +# Set to true to disable searching for the FLTK Images library # +# FLTK is composed also by a binary tool. You can set the following option: # +# ``FLTK_SKIP_FLUID`` +# Set to true to not look for the FLUID binary # -# :: +# Result Variables +# ^^^^^^^^^^^^^^^^ # -# FLTK_SKIP_OPENGL, set to true to disable searching for opengl and -# the FLTK GL library -# FLTK_SKIP_FORMS, set to true to disable searching for fltk_forms -# FLTK_SKIP_IMAGES, set to true to disable searching for fltk_images -# -# -# -# :: +# The following variables will be defined: # -# FLTK_SKIP_FLUID, set to true if the fluid binary need not be present -# at build time +# ``FLTK_FOUND`` +# True if all components not skipped were found # +# ``FLTK_INCLUDE_DIR`` +# Path to the include directory for FLTK header files # +# ``FLTK_LIBRARIES`` +# List of the FLTK libraries found # -# The following variables will be defined: +# ``FLTK_FLUID_EXECUTABLE`` +# Path to the FLUID binary tool # -# :: +# ``FLTK_WRAP_UI`` +# True if FLUID is found, used to enable the FLTK_WRAP_UI command # -# FLTK_FOUND, True if all components not skipped were found -# FLTK_INCLUDE_DIR, where to find include files -# FLTK_LIBRARIES, list of fltk libraries you should link against -# FLTK_FLUID_EXECUTABLE, where to find the Fluid tool -# FLTK_WRAP_UI, This enables the FLTK_WRAP_UI command +# Cache Variables +# ^^^^^^^^^^^^^^^ # +# The following cache variables are also available to set or use: # +# ``FLTK_BASE_LIBRARY`` +# Path to the FLTK base library # -# The following cache variables are assigned but should not be used. -# See the FLTK_LIBRARIES variable instead. +# ``FLTK_GL_LIBRARY`` +# Path to the FLTK GL library # -# :: +# ``FLTK_FORMS_LIBRARY`` +# Path to the FLTK Forms library # -# FLTK_BASE_LIBRARY = the full path to fltk.lib -# FLTK_GL_LIBRARY = the full path to fltk_gl.lib -# FLTK_FORMS_LIBRARY = the full path to fltk_forms.lib -# FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib +# ``FLTK_IMAGES_LIBRARY`` +# Path to the FLTK Images protobuf library if(NOT FLTK_SKIP_OPENGL) find_package(OpenGL) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccc9a6c706ad34cdb92457e701b5fcf3d7760af2 commit ccc9a6c706ad34cdb92457e701b5fcf3d7760af2 Author: Stefano Sinigardi AuthorDate: Thu Dec 14 13:38:05 2017 +0100 Commit: Brad King CommitDate: Thu Dec 14 08:36:19 2017 -0500 FindFLTK: fix indentation diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index 1aa52cc..a316a4f 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -125,157 +125,157 @@ if(NOT FLTK_DIR) ) endif() - # Check if FLTK was built using CMake - if(EXISTS ${FLTK_DIR}/FLTKConfig.cmake) - set(FLTK_BUILT_WITH_CMAKE 1) - endif() +# Check if FLTK was built using CMake +if(EXISTS ${FLTK_DIR}/FLTKConfig.cmake) + set(FLTK_BUILT_WITH_CMAKE 1) +endif() - if(FLTK_BUILT_WITH_CMAKE) - set(FLTK_FOUND 1) - include(${FLTK_DIR}/FLTKConfig.cmake) - - # Fluid - if(FLUID_COMMAND) - set(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") - else() - find_program(FLTK_FLUID_EXECUTABLE fluid PATHS - ${FLTK_EXECUTABLE_DIRS} - ${FLTK_EXECUTABLE_DIRS}/RelWithDebInfo - ${FLTK_EXECUTABLE_DIRS}/Debug - ${FLTK_EXECUTABLE_DIRS}/Release - NO_SYSTEM_PATH) - endif() - # mark_as_advanced(FLTK_FLUID_EXECUTABLE) - - set(FLTK_INCLUDE_DIR ${FLTK_DIR}) - link_directories(${FLTK_LIBRARY_DIRS}) - - set(FLTK_BASE_LIBRARY fltk) - set(FLTK_GL_LIBRARY fltk_gl) - set(FLTK_FORMS_LIBRARY fltk_forms) - set(FLTK_IMAGES_LIBRARY fltk_images) - - # Add the extra libraries - load_cache(${FLTK_DIR} - READ_WITH_PREFIX - FL FLTK_USE_SYSTEM_JPEG - FL FLTK_USE_SYSTEM_PNG - FL FLTK_USE_SYSTEM_ZLIB - ) - - set(FLTK_IMAGES_LIBS "") - if(FLFLTK_USE_SYSTEM_JPEG) - set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_jpeg) - endif() - if(FLFLTK_USE_SYSTEM_PNG) - set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_png) - endif() - if(FLFLTK_USE_SYSTEM_ZLIB) - set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_zlib) - endif() - set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL - "Extra libraries for fltk_images library.") +if(FLTK_BUILT_WITH_CMAKE) + set(FLTK_FOUND 1) + include(${FLTK_DIR}/FLTKConfig.cmake) + # Fluid + if(FLUID_COMMAND) + set(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") else() + find_program(FLTK_FLUID_EXECUTABLE fluid PATHS + ${FLTK_EXECUTABLE_DIRS} + ${FLTK_EXECUTABLE_DIRS}/RelWithDebInfo + ${FLTK_EXECUTABLE_DIRS}/Debug + ${FLTK_EXECUTABLE_DIRS}/Release + NO_SYSTEM_PATH) + endif() + # mark_as_advanced(FLTK_FLUID_EXECUTABLE) + + set(FLTK_INCLUDE_DIR ${FLTK_DIR}) + link_directories(${FLTK_LIBRARY_DIRS}) + + set(FLTK_BASE_LIBRARY fltk) + set(FLTK_GL_LIBRARY fltk_gl) + set(FLTK_FORMS_LIBRARY fltk_forms) + set(FLTK_IMAGES_LIBRARY fltk_images) + + # Add the extra libraries + load_cache(${FLTK_DIR} + READ_WITH_PREFIX + FL FLTK_USE_SYSTEM_JPEG + FL FLTK_USE_SYSTEM_PNG + FL FLTK_USE_SYSTEM_ZLIB + ) - # if FLTK was not built using CMake - # Find fluid executable. - find_program(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid) - - # Use location of fluid to help find everything else. - set(FLTK_INCLUDE_SEARCH_PATH "") - set(FLTK_LIBRARY_SEARCH_PATH "") - if(FLTK_FLUID_EXECUTABLE) - get_filename_component(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH) - set(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH} - ${FLTK_BIN_DIR}/../include ${FLTK_BIN_DIR}/..) - set(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH} - ${FLTK_BIN_DIR}/../lib) - set(FLTK_WRAP_UI 1) - endif() + set(FLTK_IMAGES_LIBS "") + if(FLFLTK_USE_SYSTEM_JPEG) + set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_jpeg) + endif() + if(FLFLTK_USE_SYSTEM_PNG) + set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_png) + endif() + if(FLFLTK_USE_SYSTEM_ZLIB) + set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_zlib) + endif() + set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk_images library.") + +else() + + # if FLTK was not built using CMake + # Find fluid executable. + find_program(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid) + + # Use location of fluid to help find everything else. + set(FLTK_INCLUDE_SEARCH_PATH "") + set(FLTK_LIBRARY_SEARCH_PATH "") + if(FLTK_FLUID_EXECUTABLE) + get_filename_component(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH) + set(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH} + ${FLTK_BIN_DIR}/../include ${FLTK_BIN_DIR}/..) + set(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH} + ${FLTK_BIN_DIR}/../lib) + set(FLTK_WRAP_UI 1) + endif() - # - # Try to find FLTK include dir using fltk-config - # - if(UNIX) - # Use fltk-config to generate a list of possible include directories - find_program(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR}) - if(FLTK_CONFIG_SCRIPT) - if(NOT FLTK_INCLUDE_DIR) - exec_program(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS) - if(FLTK_CXXFLAGS) - string(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS}) - string(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}") - foreach(_dir ${_fltk_temp_dirs}) - string(STRIP ${_dir} _output) - list(APPEND _FLTK_POSSIBLE_INCLUDE_DIRS ${_output}) - endforeach() - endif() + # + # Try to find FLTK include dir using fltk-config + # + if(UNIX) + # Use fltk-config to generate a list of possible include directories + find_program(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR}) + if(FLTK_CONFIG_SCRIPT) + if(NOT FLTK_INCLUDE_DIR) + exec_program(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS) + if(FLTK_CXXFLAGS) + string(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS}) + string(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}") + foreach(_dir ${_fltk_temp_dirs}) + string(STRIP ${_dir} _output) + list(APPEND _FLTK_POSSIBLE_INCLUDE_DIRS ${_output}) + endforeach() endif() endif() endif() + endif() - list(APPEND FLTK_INCLUDE_SEARCH_PATH ${_FLTK_POSSIBLE_INCLUDE_DIRS}) + list(APPEND FLTK_INCLUDE_SEARCH_PATH ${_FLTK_POSSIBLE_INCLUDE_DIRS}) - find_path(FLTK_INCLUDE_DIR - NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376) - PATH_SUFFIXES fltk fltk/include - PATHS ${FLTK_INCLUDE_SEARCH_PATH}) + find_path(FLTK_INCLUDE_DIR + NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376) + PATH_SUFFIXES fltk fltk/include + PATHS ${FLTK_INCLUDE_SEARCH_PATH}) - # - # Try to find FLTK library - if(UNIX) - if(FLTK_CONFIG_SCRIPT) - exec_program(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS) - if(_FLTK_POSSIBLE_LIBS) - get_filename_component(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH) - endif() + # + # Try to find FLTK library + if(UNIX) + if(FLTK_CONFIG_SCRIPT) + exec_program(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS) + if(_FLTK_POSSIBLE_LIBS) + get_filename_component(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH) endif() endif() + endif() - list(APPEND FLTK_LIBRARY_SEARCH_PATH ${FLTK_INCLUDE_DIR}/lib ${_FLTK_POSSIBLE_LIBRARY_DIR}) - - find_library(FLTK_BASE_LIBRARY NAMES fltk fltkd - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) - find_library(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) - find_library(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) - find_library(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images - PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) - - # Find the extra libraries needed for the fltk_images library. - if(UNIX) - if(FLTK_CONFIG_SCRIPT) - exec_program(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags - OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS) - set(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*") - if("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}") - string(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${CMAKE_MATCH_1}") - # The EXEC_PROGRAM will not be inherited into subdirectories from - # the file that originally included this module. Save the answer. - set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL - "Extra libraries for fltk_images library.") - endif() + list(APPEND FLTK_LIBRARY_SEARCH_PATH ${FLTK_INCLUDE_DIR}/lib ${_FLTK_POSSIBLE_LIBRARY_DIR}) + + find_library(FLTK_BASE_LIBRARY NAMES fltk fltkd + PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl + PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms + PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + find_library(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images + PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib) + + # Find the extra libraries needed for the fltk_images library. + if(UNIX) + if(FLTK_CONFIG_SCRIPT) + exec_program(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags + OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS) + set(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*") + if("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}") + string(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${CMAKE_MATCH_1}") + # The EXEC_PROGRAM will not be inherited into subdirectories from + # the file that originally included this module. Save the answer. + set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk_images library.") endif() endif() - endif() - # Append all of the required libraries together (by default, everything) - set(FLTK_LIBRARIES) - if(NOT FLTK_SKIP_IMAGES) - list(APPEND FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY}) - endif() - if(NOT FLTK_SKIP_FORMS) - list(APPEND FLTK_LIBRARIES ${FLTK_FORMS_LIBRARY}) - endif() - if(NOT FLTK_SKIP_OPENGL) - list(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY}) - list(APPEND FLTK_INCLUDE_DIR ${OPENGL_INCLUDE_DIR}) - list(REMOVE_DUPLICATES FLTK_INCLUDE_DIR) - endif() - list(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY}) +endif() + +# Append all of the required libraries together (by default, everything) +set(FLTK_LIBRARIES) +if(NOT FLTK_SKIP_IMAGES) + list(APPEND FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY}) +endif() +if(NOT FLTK_SKIP_FORMS) + list(APPEND FLTK_LIBRARIES ${FLTK_FORMS_LIBRARY}) +endif() +if(NOT FLTK_SKIP_OPENGL) + list(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY}) + list(APPEND FLTK_INCLUDE_DIR ${OPENGL_INCLUDE_DIR}) + list(REMOVE_DUPLICATES FLTK_INCLUDE_DIR) +endif() +list(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY}) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) if(FLTK_SKIP_FLUID) @@ -297,4 +297,3 @@ if(FLTK_FOUND) set (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE}) set (FLTK_LIBRARY ${FLTK_LIBRARIES}) endif() - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=907bc3543727767b72e3d9085dbb3c02b1a717ae commit 907bc3543727767b72e3d9085dbb3c02b1a717ae Author: Vitaly Stakhovsky AuthorDate: Wed Dec 13 19:16:54 2017 -0500 Commit: Brad King CommitDate: Thu Dec 14 08:27:48 2017 -0500 VS: Emit "utf-8" encoding as lowercase in .vcxproj headers Match the XML preamble generated by VS 2010 and later. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 8c9e461..4c4c62c 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -951,6 +951,11 @@ void cmGlobalVisualStudio10Generator::PathTooLong(cmGeneratorTarget* target, } } +std::string cmGlobalVisualStudio10Generator::Encoding() +{ + return "utf-8"; +} + bool cmGlobalVisualStudio10Generator::IsNsightTegra() const { return !this->NsightTegraVersion.empty(); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 5f80c73..fc21193 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -96,6 +96,7 @@ public: void PathTooLong(cmGeneratorTarget* target, cmSourceFile const* sf, std::string const& sfRel); + std::string Encoding() override; virtual const char* GetToolsVersion() { return "4.0"; } bool FindMakeProgram(cmMakefile* mf) override; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ab9a62572058d6cd8e5bf130d7aa27d5a2e50f2 commit 7ab9a62572058d6cd8e5bf130d7aa27d5a2e50f2 Author: Yurii Batrak AuthorDate: Tue Dec 5 13:41:59 2017 +0100 Commit: Brad King CommitDate: Thu Dec 14 08:22:07 2017 -0500 Makefiles: Drop 'requires' step and its supporting infrastructure The 'requires' step was used to provide implicit dependencies between the generated Fortran module files and a Fortran target that needs these module files to ensure the correct compilation order. After recent refactoring to resolve all dependencies explicitly through `.mod.stamp` make targets, the separate 'requires' step is not needed anymore. diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index b315d33..d422578 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -67,11 +67,6 @@ if(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran) set(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran "${_override}") endif() - -# Fortran needs cmake to do a requires step during its build process to -# catch any modules -set(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1) - if(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC) set(CMAKE_Fortran_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC}) endif() diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 8b4fafd..23f622b 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -331,24 +331,6 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, continue; } - // If the module is provided in this target special handling is - // needed. - if (this->Internal->TargetProvides.find(i) != - this->Internal->TargetProvides.end()) { - // The module is provided by a different source in the same - // target. Add the proxy dependency to make sure the other - // source builds first. - std::string proxy = stamp_dir; - proxy += "/"; - proxy += i; - proxy += ".mod.proxy"; - proxy = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, proxy).c_str()); - - // since we require some things add them to our list of requirements - makeDepends << obj_m << ".requires: " << proxy << std::endl; - } - // The object file should depend on timestamped files for the // modules it uses. TargetRequiresMap::const_iterator required = @@ -373,17 +355,6 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, } } - // Write provided modules to the output stream. - for (std::string const& i : info.Provides) { - std::string proxy = stamp_dir; - proxy += "/"; - proxy += i; - proxy += ".mod.proxy"; - proxy = cmSystemTools::ConvertToOutputPath( - this->MaybeConvertToRelativePath(binDir, proxy).c_str()); - makeDepends << proxy << ": " << obj_m << ".provides" << std::endl; - } - // If any modules are provided then they must be converted to stamp files. if (!info.Provides.empty()) { // Create a target to copy the module after the object file @@ -433,8 +404,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, makeDepends << "\n"; } makeDepends << obj_m << ".provides.build:\n"; - // After copying the modules update the timestamp file so that - // copying will not be done again until the source rebuilds. + // After copying the modules update the timestamp file. makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj_m << ".provides.build\n"; diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index be40126..236bb3d 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -21,7 +21,6 @@ #include "cmStateDirectory.h" #include "cmStateTypes.h" #include "cmSystemTools.h" -#include "cmTarget.h" #include "cmTargetDepend.h" #include "cmake.h" @@ -630,8 +629,6 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( makefileName = localName; makefileName += "/build.make"; - bool needRequiresStep = this->NeedRequiresStep(gtarget); - lg->WriteDivider(ruleFileStream); ruleFileStream << "# Target rules for target " << localName << "\n\n"; @@ -641,13 +638,6 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( commands.push_back( lg->GetRecursiveMakeCall(makefileName.c_str(), makeTargetName)); - // add requires if we need it for this generator - if (needRequiresStep) { - makeTargetName = localName; - makeTargetName += "/requires"; - commands.push_back( - lg->GetRecursiveMakeCall(makefileName.c_str(), makeTargetName)); - } makeTargetName = localName; makeTargetName += "/build"; commands.push_back( @@ -952,21 +942,3 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule( commands, true); ruleFileStream << "\n\n"; } - -bool cmGlobalUnixMakefileGenerator3::NeedRequiresStep( - const cmGeneratorTarget* target) -{ - std::set languages; - target->GetLanguages( - languages, - target->Target->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE")); - for (std::string const& l : languages) { - std::string var = "CMAKE_NEEDS_REQUIRES_STEP_"; - var += l; - var += "_FLAG"; - if (target->Target->GetMakefile()->GetDefinition(var)) { - return true; - } - } - return false; -} diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index d601f88..f9ce88c 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -174,9 +174,6 @@ protected: void AppendGlobalTargetDepends(std::vector& depends, cmGeneratorTarget* target); - // does this generator need a requires step for any of its targets - bool NeedRequiresStep(cmGeneratorTarget const*); - // Target name hooks for superclass. const char* GetAllTargetName() const override { return "all"; } const char* GetInstallTargetName() const override { return "install"; } diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 801f72a..90d8c7f 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -69,9 +69,6 @@ void cmMakefileExecutableTargetGenerator::WriteRuleFiles() this->WriteExecutableRule(true); } - // Write the requires target. - this->WriteTargetRequiresRules(); - // Write clean target this->WriteTargetCleanRules(); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 80c62d1..ab15daf 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -89,9 +89,6 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles() break; } - // Write the requires target. - this->WriteTargetRequiresRules(); - // Write clean target this->WriteTargetCleanRules(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ae0b61c..9b5b5ec 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -818,61 +818,6 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( commands, false); } } - - // If the language needs provides-requires mode, create the - // corresponding targets. - std::string objectRequires = relativeObj; - objectRequires += ".requires"; - std::vector p_depends; - // always provide an empty requires target - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, nullptr, - objectRequires, p_depends, no_commands, - true); - - // write a build rule to recursively build what this obj provides - std::string objectProvides = relativeObj; - objectProvides += ".provides"; - std::string temp = relativeObj; - temp += ".provides.build"; - std::vector r_commands; - - p_depends.clear(); - p_depends.push_back(objectRequires); - p_depends.push_back(temp); - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, nullptr, - objectProvides, p_depends, r_commands, - true); - - // write the provides.build rule dependency on the obj file - p_depends.clear(); - p_depends.push_back(relativeObj); - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, nullptr, temp, - p_depends, no_commands, false); -} - -void cmMakefileTargetGenerator::WriteTargetRequiresRules() -{ - std::vector depends; - std::vector no_commands; - - // Construct the name of the dependency generation target. - std::string depTarget = - this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget); - depTarget += "/requires"; - - // This target drives dependency generation for all object files. - std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath(); - std::string objTarget; - for (std::string const& obj : this->Objects) { - objTarget = relPath; - objTarget += obj; - objTarget += ".requires"; - depends.push_back(objTarget); - } - - // Write the rule. - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, nullptr, - depTarget, depends, no_commands, true); } void cmMakefileTargetGenerator::WriteTargetCleanRules() diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 5ab7e36..7af3cf3 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -63,9 +63,6 @@ protected: void WriteCommonCodeRules(); void WriteTargetLanguageFlags(); - // write the provide require rules for this target - void WriteTargetRequiresRules(); - // write the clean rules for this target void WriteTargetCleanRules(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f2e2c387deb7f798cbc54d0980503e05873eaaa commit 5f2e2c387deb7f798cbc54d0980503e05873eaaa Author: Yurii Batrak AuthorDate: Fri Nov 24 13:01:18 2017 +0100 Commit: Brad King CommitDate: Thu Dec 14 08:13:42 2017 -0500 Makefiles: Avoid nested make calls for Fortran module dependencies Makefiles generated by cmake use a series of nested calls to build `*.provides.build` targets that are used when the 'requires' step is needed. That leads to significant degradation of the build time for incremental builds. Re-arrange dependencies to eliminate the nested calls. Explicit `.mod.stamp` targets introduced by this commit could lead to situation when a stamp file always older than its dependency. This happens during the incremental build when building of an updated Fortran source produces a module file that has no differences from the stored stamp file. In such case `cmake_copy_f90_mod` will be triggered on each new build to compare a module file with the corresponding stamp file. This behavior is expected and can not be changed without nested calls that slow down the build. The copy-if-different check is much cheaper than an entire nested make call. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index fdbc086..8b4fafd 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -388,7 +388,6 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, if (!info.Provides.empty()) { // Create a target to copy the module after the object file // changes. - makeDepends << obj_m << ".provides.build:\n"; for (std::string const& i : info.Provides) { // Include this module in the set provided by this target. this->Internal->TargetProvides.insert(i); @@ -407,11 +406,25 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; - stampFile = this->LocalGenerator->ConvertToOutputFormat( - this->MaybeConvertToRelativePath(binDir, stampFile), - cmOutputConverter::SHELL); + stampFile = this->MaybeConvertToRelativePath(binDir, stampFile); + std::string const stampFileForShell = + this->LocalGenerator->ConvertToOutputFormat(stampFile, + cmOutputConverter::SHELL); + std::string const stampFileForMake = + cmSystemTools::ConvertToOutputPath(stampFile.c_str()); + + makeDepends << obj_m << ".provides.build" + << ": " << stampFileForMake << "\n"; + // Note that when cmake_copy_f90_mod finds that a module file + // and the corresponding stamp file have no differences, the stamp + // file is not updated. In such case the stamp file will be always + // older than its prerequisite and trigger cmake_copy_f90_mod + // on each new build. This is expected behavior for incremental + // builds and can not be changed without preforming recursive make + // calls that would considerably slow down the building process. + makeDepends << stampFileForMake << ": " << obj_m << "\n"; makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile - << " " << stampFile; + << " " << stampFileForShell; cmMakefile* mf = this->LocalGenerator->GetMakefile(); const char* cid = mf->GetDefinition("CMAKE_Fortran_COMPILER_ID"); if (cid && *cid) { @@ -419,6 +432,7 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, } makeDepends << "\n"; } + makeDepends << obj_m << ".provides.build:\n"; // After copying the modules update the timestamp file so that // copying will not be done again until the source rebuilds. makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj_m diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index e26182a..a389ad0 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1444,6 +1444,8 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( } #ifdef CMAKE_BUILD_WITH_CMAKE else if (lang == "Fortran") { + ruleFileStream << "# Note that incremental build could trigger " + << "a call to cmake_copy_f90_mod on each re-build\n"; scanner = new cmDependsFortran(this); } else if (lang == "Java") { scanner = new cmDependsJava(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 7db010c..ae0b61c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -835,14 +835,10 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( std::string temp = relativeObj; temp += ".provides.build"; std::vector r_commands; - std::string tgtMakefileName = - this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget); - tgtMakefileName += "/build.make"; - r_commands.push_back( - this->LocalGenerator->GetRecursiveMakeCall(tgtMakefileName.c_str(), temp)); p_depends.clear(); p_depends.push_back(objectRequires); + p_depends.push_back(temp); this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, nullptr, objectProvides, p_depends, r_commands, true); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8164298935cdd0970a4e86327184866496694b65 commit 8164298935cdd0970a4e86327184866496694b65 Author: Robert Maynard AuthorDate: Wed Dec 13 17:34:48 2017 -0500 Commit: Robert Maynard CommitDate: Wed Dec 13 17:34:48 2017 -0500 Cuda: ResolveDeviceSymbols now properly execute everywhere. The previous version had two bugs that caused the JIT runtime errors. 1. It was building the executable without separable compilation enabled 2. All kernel launches will fail if any kernel is missing a symbol, that is why the call to file2_launch_kernel had to be removed diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt index 8d6551b..83473ae 100644 --- a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt +++ b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt @@ -16,11 +16,11 @@ else() endif() #Goal for this example: -#Build a static library that defines multiple methods and kernels that -#use each other. -#Use a custom command to build an executable that uses this static library -#We do these together to verify that we can get a static library to do -#device symbol linking, and not have it done when the executable is made +# Build a static library that defines multiple methods and kernels that +# use each other. +# Resolve the device symbols into that static library +# Verify that we can't use those device symbols from anything that links +# to the static library string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30") set(CMAKE_CXX_STANDARD 11) set(CMAKE_CUDA_STANDARD 11) @@ -43,6 +43,10 @@ add_custom_command(TARGET CUDAResolveDeviceLib POST_BUILD endif() add_executable(CudaOnlyResolveDeviceSymbols main.cu) +set_target_properties(CudaOnlyResolveDeviceSymbols + PROPERTIES + CUDA_SEPARABLE_COMPILATION ON) + target_link_libraries(CudaOnlyResolveDeviceSymbols PRIVATE CUDAResolveDeviceLib) if(APPLE) diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/main.cu b/Tests/CudaOnly/ResolveDeviceSymbols/main.cu index b4b5b9e..d464f96 100644 --- a/Tests/CudaOnly/ResolveDeviceSymbols/main.cu +++ b/Tests/CudaOnly/ResolveDeviceSymbols/main.cu @@ -62,17 +62,8 @@ int main(int argc, char** argv) return 0; } - cudaError_t err; - file2_launch_kernel(42); - err = cudaGetLastError(); - if (err != cudaSuccess) { - std::cerr << "file2_launch_kernel: kernel launch failed: " - << cudaGetErrorString(err) << std::endl; - return 1; - } - main_launch_kernel(1); - err = cudaGetLastError(); + cudaError_t err = cudaGetLastError(); if (err == cudaSuccess) { // This kernel launch should fail as the file2_func was device linked // into the static library and is not usable by the executable ----------------------------------------------------------------------- Summary of changes: Modules/CMakeFortranInformation.cmake | 5 - Modules/FindFLTK.cmake | 357 +++++++++++--------- Source/cmDependsFortran.cxx | 56 ++- Source/cmGlobalUnixMakefileGenerator3.cxx | 28 -- Source/cmGlobalUnixMakefileGenerator3.h | 3 - Source/cmGlobalVisualStudio10Generator.cxx | 5 + Source/cmGlobalVisualStudio10Generator.h | 1 + Source/cmLocalUnixMakefileGenerator3.cxx | 2 + Source/cmMakefileExecutableTargetGenerator.cxx | 3 - Source/cmMakefileLibraryTargetGenerator.cxx | 3 - Source/cmMakefileTargetGenerator.cxx | 59 ---- Source/cmMakefileTargetGenerator.h | 3 - Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt | 14 +- Tests/CudaOnly/ResolveDeviceSymbols/main.cu | 11 +- 14 files changed, 234 insertions(+), 316 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 16 00:05:10 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 16 Dec 2017 00:05:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-640-gd4fb313 Message-ID: <20171216050511.023061028D7@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 d4fb3136d5b32ac17ce6bc00d9f62163ba5bd800 (commit) from f67f76c2b3a4c50d4116ce806df0c7f861e227dd (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=d4fb3136d5b32ac17ce6bc00d9f62163ba5bd800 commit d4fb3136d5b32ac17ce6bc00d9f62163ba5bd800 Author: Kitware Robot AuthorDate: Sat Dec 16 00:01:10 2017 -0500 Commit: Kitware Robot CommitDate: Sat Dec 16 00:01:10 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 28a9ffa..97d923c 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 10) -set(CMake_VERSION_PATCH 20171215) +set(CMake_VERSION_PATCH 20171216) #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 Dec 17 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 17 Dec 2017 00:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-641-g0822934 Message-ID: <20171217050507.6FA55102DE7@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 08229348a89ee4b9da893ed2ba448cb2a94ce572 (commit) from d4fb3136d5b32ac17ce6bc00d9f62163ba5bd800 (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=08229348a89ee4b9da893ed2ba448cb2a94ce572 commit 08229348a89ee4b9da893ed2ba448cb2a94ce572 Author: Kitware Robot AuthorDate: Sun Dec 17 00:01:11 2017 -0500 Commit: Kitware Robot CommitDate: Sun Dec 17 00:01:11 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 97d923c..0b76996 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 10) -set(CMake_VERSION_PATCH 20171216) +set(CMake_VERSION_PATCH 20171217) #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 Dec 18 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 18 Dec 2017 00:05:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-642-g438ed3b Message-ID: <20171218050505.2049B102FB9@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 438ed3bfc180fbee98fa07af1eb427c6da209b68 (commit) from 08229348a89ee4b9da893ed2ba448cb2a94ce572 (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=438ed3bfc180fbee98fa07af1eb427c6da209b68 commit 438ed3bfc180fbee98fa07af1eb427c6da209b68 Author: Kitware Robot AuthorDate: Mon Dec 18 00:01:05 2017 -0500 Commit: Kitware Robot CommitDate: Mon Dec 18 00:01:05 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0b76996..2d67e46 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 10) -set(CMake_VERSION_PATCH 20171217) +set(CMake_VERSION_PATCH 20171218) #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 Dec 18 17:15:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 18 Dec 2017 17:15:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-644-g0816f74 Message-ID: <20171218221509.173B6FE680@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 0816f7496b31829533419fa42932d00d9b0851ff (commit) via de706fe0d47b8d6fd9ed269d6caedbbfb9b71258 (commit) from 438ed3bfc180fbee98fa07af1eb427c6da209b68 (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=0816f7496b31829533419fa42932d00d9b0851ff commit 0816f7496b31829533419fa42932d00d9b0851ff Merge: 438ed3b de706fe Author: Christian Pfeiffer AuthorDate: Mon Dec 18 22:05:17 2017 +0000 Commit: Kitware Robot CommitDate: Mon Dec 18 17:05:22 2017 -0500 Merge topic 'findliblzma-win-name' de706fe0 FindLibLZMA: Add library name for Windows Acked-by: Kitware Robot Merge-request: !1605 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de706fe0d47b8d6fd9ed269d6caedbbfb9b71258 commit de706fe0d47b8d6fd9ed269d6caedbbfb9b71258 Author: Christian Pfeiffer AuthorDate: Mon Dec 18 03:34:49 2017 +0100 Commit: Christian Pfeiffer CommitDate: Mon Dec 18 03:34:49 2017 +0100 FindLibLZMA: Add library name for Windows Fixes: #17568 diff --git a/Modules/FindLibLZMA.cmake b/Modules/FindLibLZMA.cmake index 8009bcf..d203eaf 100644 --- a/Modules/FindLibLZMA.cmake +++ b/Modules/FindLibLZMA.cmake @@ -23,7 +23,7 @@ # LIBLZMA_VERSION_STRING - version number as a string (ex: "5.0.3") find_path(LIBLZMA_INCLUDE_DIR lzma.h ) -find_library(LIBLZMA_LIBRARY lzma) +find_library(LIBLZMA_LIBRARY NAMES lzma liblzma) if(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h") file(STRINGS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h" LIBLZMA_HEADER_CONTENTS REGEX "#define LZMA_VERSION_[A-Z]+ [0-9]+") ----------------------------------------------------------------------- Summary of changes: Modules/FindLibLZMA.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 19 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 19 Dec 2017 00:05:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-645-g1eac7c6 Message-ID: <20171219050505.EED93102F27@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 1eac7c6ee58e73302d2049376ff3f114a8e6826e (commit) from 0816f7496b31829533419fa42932d00d9b0851ff (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=1eac7c6ee58e73302d2049376ff3f114a8e6826e commit 1eac7c6ee58e73302d2049376ff3f114a8e6826e Author: Kitware Robot AuthorDate: Tue Dec 19 00:01:12 2017 -0500 Commit: Kitware Robot CommitDate: Tue Dec 19 00:01:12 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2d67e46..b6e36d7 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 10) -set(CMake_VERSION_PATCH 20171218) +set(CMake_VERSION_PATCH 20171219) #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 Dec 19 12:45:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 19 Dec 2017 12:45:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-649-g7bf2141 Message-ID: <20171219174504.55C52FE671@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 7bf21414301cde129d7d76f4f9980128deb6849e (commit) via 1f3933d3825e6e99cc60065a8666c5e22bb1e7c2 (commit) via 14ebad533dd278137e5a4768768217ca95c4ca24 (commit) via 8950183b3834dc2179dc4965138b1091e291ae9f (commit) from 1eac7c6ee58e73302d2049376ff3f114a8e6826e (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=7bf21414301cde129d7d76f4f9980128deb6849e commit 7bf21414301cde129d7d76f4f9980128deb6849e Merge: 1eac7c6 1f3933d Author: Christian Pfeiffer AuthorDate: Tue Dec 19 17:43:08 2017 +0000 Commit: Kitware Robot CommitDate: Tue Dec 19 12:43:22 2017 -0500 Merge topic 'winarm64' 1f3933d3 Address code review feedback 14ebad53 Use IMAGE_FILE_HEADER and add missing Arm 32bit images support 8950183b Add Arm64 support to COFF symbol export feature Acked-by: Kitware Robot Merge-request: !1603 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f3933d3825e6e99cc60065a8666c5e22bb1e7c2 commit 1f3933d3825e6e99cc60065a8666c5e22bb1e7c2 Author: Jacek Blaszczynski AuthorDate: Mon Dec 18 18:22:50 2017 +0100 Commit: Jacek Blaszczynski CommitDate: Mon Dec 18 18:26:55 2017 +0100 Address code review feedback diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index 21f27d6..9ec9624 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -331,38 +331,42 @@ bool DumpFile(const char* filename, std::set& symbols, return false; } - const PIMAGE_FILE_HEADER imageHeader = (PIMAGE_FILE_HEADER)lpFileBase; - if (imageHeader->Machine == IMAGE_DOS_SIGNATURE) { + const PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)lpFileBase; + if (dosHeader->e_magic == IMAGE_DOS_SIGNATURE) { fprintf(stderr, "File is an executable. I don't dump those.\n"); return false; - } - /* Does it look like a COFF OBJ file??? */ - else if (((imageHeader->Machine == IMAGE_FILE_MACHINE_I386) || - (imageHeader->Machine == IMAGE_FILE_MACHINE_AMD64) || - (imageHeader->Machine == IMAGE_FILE_MACHINE_ARM) || - (imageHeader->Machine == IMAGE_FILE_MACHINE_ARMNT) || - (imageHeader->Machine == IMAGE_FILE_MACHINE_ARM64)) && - (imageHeader->Characteristics == 0)) { - /* - * The two tests above aren't what they look like. They're - * really checking for IMAGE_FILE_HEADER.Machine == i386 (0x14C) - * and IMAGE_FILE_HEADER.SizeOfOptionalHeader == 0; - */ - DumpSymbols symbolDumper( - (PIMAGE_FILE_HEADER)lpFileBase, symbols, dataSymbols, - (imageHeader->Machine == IMAGE_FILE_MACHINE_I386)); - symbolDumper.DumpObjFile(); } else { - // check for /bigobj format - cmANON_OBJECT_HEADER_BIGOBJ* h = (cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase; - if (h->Sig1 == 0x0 && h->Sig2 == 0xffff) { - DumpSymbols symbolDumper( - (cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols, dataSymbols, - (h->Machine == IMAGE_FILE_MACHINE_I386)); + const PIMAGE_FILE_HEADER imageHeader = (PIMAGE_FILE_HEADER)lpFileBase; + /* Does it look like a COFF OBJ file??? */ + if (((imageHeader->Machine == IMAGE_FILE_MACHINE_I386) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_AMD64) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_ARM) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_ARMNT) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_ARM64)) && + (imageHeader->Characteristics == 0)) { + /* + * The tests above are checking for IMAGE_FILE_HEADER.Machine + * if it contains supported machine formats (currently ARM and x86) + * and IMAGE_FILE_HEADER.Characteristics == 0 indicating that + * this is not linked COFF OBJ file; + */ + DumpSymbols symbolDumper( + (PIMAGE_FILE_HEADER)lpFileBase, symbols, dataSymbols, + (imageHeader->Machine == IMAGE_FILE_MACHINE_I386)); symbolDumper.DumpObjFile(); } else { - printf("unrecognized file format in '%s'\n", filename); - return false; + // check for /bigobj format + cmANON_OBJECT_HEADER_BIGOBJ* h = + (cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase; + if (h->Sig1 == 0x0 && h->Sig2 == 0xffff) { + DumpSymbols + symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols, + dataSymbols, (h->Machine == IMAGE_FILE_MACHINE_I386)); + symbolDumper.DumpObjFile(); + } else { + printf("unrecognized file format in '%s'\n", filename); + return false; + } } } UnmapViewOfFile(lpFileBase); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14ebad533dd278137e5a4768768217ca95c4ca24 commit 14ebad533dd278137e5a4768768217ca95c4ca24 Author: Jacek Blaszczynski AuthorDate: Mon Dec 18 16:15:58 2017 +0100 Commit: Jacek Blaszczynski CommitDate: Mon Dec 18 16:15:58 2017 +0100 Use IMAGE_FILE_HEADER and add missing Arm 32bit images support diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index 698ab78..21f27d6 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -31,7 +31,7 @@ * Extension (Axel 2006-03-15) * As soon as an object file contains an /EXPORT directive (which * is generated by the compiler when a symbol is declared as - * declspec(dllexport)) no to-be-exported symbols are printed, + * __declspec(dllexport) no to-be-exported symbols are printed, * as the linker will see these directives, and if those directives * are present we only export selectively (i.e. we trust the * programmer). @@ -50,12 +50,12 @@ * * It created a wrong EXPORTS for the global pointers and constants. * The Section Header has been involved to discover the missing information -* Now the pointers are correctly supplied supplied with "DATA" descriptor +* Now the pointers are correctly supplied with "DATA" descriptor * the constants with no extra descriptor. * * Corrections (Valery Fine 16/09/96): * -* It didn't work for C++ code with global variables and class definitons +* It didn't work for C++ code with global variables and class definitions * The DumpExternalObject function has been introduced to generate .DEF file * * Author: Valery Fine 16/09/96 (E-mail: fine at vxcern.cern.ch) @@ -68,8 +68,20 @@ #include #include +#ifndef IMAGE_FILE_MACHINE_ARM +#define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian +#endif + +#ifndef IMAGE_FILE_MACHINE_THUMB +#define IMAGE_FILE_MACHINE_THUMB 0x01c2 // ARM Thumb/Thumb-2 Little-Endian +#endif + #ifndef IMAGE_FILE_MACHINE_ARMNT -#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 +#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian +#endif + +#ifndef IMAGE_FILE_MACHINE_ARM64 +#define IMAGE_FILE_MACHINE_ARM64 0xaa64 // ARM64 Little-Endian #endif typedef struct cmANON_OBJECT_HEADER_BIGOBJ @@ -294,7 +306,6 @@ bool DumpFile(const char* filename, std::set& symbols, HANDLE hFile; HANDLE hFileMapping; LPVOID lpFileBase; - PIMAGE_DOS_HEADER dosHeader; hFile = CreateFileW(cmsys::Encoding::ToWide(filename).c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, @@ -320,17 +331,18 @@ bool DumpFile(const char* filename, std::set& symbols, return false; } - dosHeader = (PIMAGE_DOS_HEADER)lpFileBase; - if (dosHeader->e_magic == IMAGE_DOS_SIGNATURE) { + const PIMAGE_FILE_HEADER imageHeader = (PIMAGE_FILE_HEADER)lpFileBase; + if (imageHeader->Machine == IMAGE_DOS_SIGNATURE) { fprintf(stderr, "File is an executable. I don't dump those.\n"); return false; } /* Does it look like a COFF OBJ file??? */ - else if (((dosHeader->e_magic == IMAGE_FILE_MACHINE_I386) || - (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64) || - (dosHeader->e_magic == IMAGE_FILE_MACHINE_ARMNT)) || - (dosHeader->e_magic == IMAGE_FILE_MACHINE_ARM64) && - (dosHeader->e_sp == 0)) { + else if (((imageHeader->Machine == IMAGE_FILE_MACHINE_I386) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_AMD64) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_ARM) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_ARMNT) || + (imageHeader->Machine == IMAGE_FILE_MACHINE_ARM64)) && + (imageHeader->Characteristics == 0)) { /* * The two tests above aren't what they look like. They're * really checking for IMAGE_FILE_HEADER.Machine == i386 (0x14C) @@ -338,7 +350,7 @@ bool DumpFile(const char* filename, std::set& symbols, */ DumpSymbols symbolDumper( (PIMAGE_FILE_HEADER)lpFileBase, symbols, dataSymbols, - (dosHeader->e_magic == IMAGE_FILE_MACHINE_I386)); + (imageHeader->Machine == IMAGE_FILE_MACHINE_I386)); symbolDumper.DumpObjFile(); } else { // check for /bigobj format https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8950183b3834dc2179dc4965138b1091e291ae9f commit 8950183b3834dc2179dc4965138b1091e291ae9f Author: Jacek Blaszczynski AuthorDate: Sun Dec 17 01:41:21 2017 +0100 Commit: Jacek Blaszczynski CommitDate: Sun Dec 17 01:41:21 2017 +0100 Add Arm64 support to COFF symbol export feature diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index 2eb47f3..698ab78 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -328,8 +328,9 @@ bool DumpFile(const char* filename, std::set& symbols, /* Does it look like a COFF OBJ file??? */ else if (((dosHeader->e_magic == IMAGE_FILE_MACHINE_I386) || (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64) || - (dosHeader->e_magic == IMAGE_FILE_MACHINE_ARMNT)) && - (dosHeader->e_sp == 0)) { + (dosHeader->e_magic == IMAGE_FILE_MACHINE_ARMNT)) || + (dosHeader->e_magic == IMAGE_FILE_MACHINE_ARM64) && + (dosHeader->e_sp == 0)) { /* * The two tests above aren't what they look like. They're * really checking for IMAGE_FILE_HEADER.Machine == i386 (0x14C) ----------------------------------------------------------------------- Summary of changes: Source/bindexplib.cxx | 75 ++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 29 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 20 00:05:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 20 Dec 2017 00:05:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-650-gb5bbf06 Message-ID: <20171220050509.96318102D75@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 b5bbf06c26260329855b26ecdea44027c3f0f598 (commit) from 7bf21414301cde129d7d76f4f9980128deb6849e (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=b5bbf06c26260329855b26ecdea44027c3f0f598 commit b5bbf06c26260329855b26ecdea44027c3f0f598 Author: Kitware Robot AuthorDate: Wed Dec 20 00:01:15 2017 -0500 Commit: Kitware Robot CommitDate: Wed Dec 20 00:01:15 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b6e36d7..9697bd5 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 10) -set(CMake_VERSION_PATCH 20171219) +set(CMake_VERSION_PATCH 20171220) #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 Dec 20 08:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 20 Dec 2017 08:05:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-656-g740e598 Message-ID: <20171220130506.CBC81102E8C@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 740e598c8ef708656175709a2b51476604005863 (commit) via c9cbc326487592d47590bbf7498eab0901e3eb16 (commit) via 4966c8d8dabfb8e1077d69137f32031fa38a9ae5 (commit) via 86399e49398cc9e8028e280eee3e89992ab3fd11 (commit) via 4b7618d17028da30bf0421e56aed6789bba4a12a (commit) via 1d2d9c18bd477a6fab1744d8da13bf5d760a0e03 (commit) from b5bbf06c26260329855b26ecdea44027c3f0f598 (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=740e598c8ef708656175709a2b51476604005863 commit 740e598c8ef708656175709a2b51476604005863 Merge: c9cbc32 4966c8d Author: Brad King AuthorDate: Wed Dec 20 12:59:33 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 20 07:59:42 2017 -0500 Merge topic 'update-kwsys' 4966c8d8 Merge branch 'upstream-KWSys' into update-kwsys 86399e49 KWSys 2017-12-15 (8f755ee9) Acked-by: Kitware Robot Merge-request: !1597 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9cbc326487592d47590bbf7498eab0901e3eb16 commit c9cbc326487592d47590bbf7498eab0901e3eb16 Merge: b5bbf06 4b7618d Author: Brad King AuthorDate: Wed Dec 20 12:59:13 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 20 07:59:20 2017 -0500 Merge topic 'cuda-mixed-cxx-standard' 4b7618d1 CUDA: Fix CUDA_STANDARD selection via cxx_std_11 with CXX_STANDARD 1d2d9c18 cmMakefile: Refactor determining a targets C++ standard level Acked-by: Kitware Robot Merge-request: !1590 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4966c8d8dabfb8e1077d69137f32031fa38a9ae5 commit 4966c8d8dabfb8e1077d69137f32031fa38a9ae5 Merge: f67f76c 86399e4 Author: Brad King AuthorDate: Fri Dec 15 10:48:13 2017 -0500 Commit: Brad King CommitDate: Fri Dec 15 10:48:13 2017 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-12-15 (8f755ee9) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86399e49398cc9e8028e280eee3e89992ab3fd11 commit 86399e49398cc9e8028e280eee3e89992ab3fd11 Author: KWSys Upstream AuthorDate: Fri Dec 15 10:48:01 2017 -0500 Commit: Brad King CommitDate: Fri Dec 15 10:48:13 2017 -0500 KWSys 2017-12-15 (8f755ee9) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 8f755ee93451e580aa7b5ed6cee9e6c5da81e7d0 (master). Upstream Shortlog ----------------- Volo Zyko (1): 9f6cd407 SystemTools: Fix removing of soft links to directories on Windows. diff --git a/SystemTools.cxx b/SystemTools.cxx index 649f30b..f547362 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -2509,6 +2509,14 @@ bool SystemTools::RemoveFile(const std::string& source) if (IsJunction(ws) && DeleteJunction(ws)) { return true; } + const DWORD DIRECTORY_SOFT_LINK_ATTRS = + FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT; + DWORD attrs = GetFileAttributesW(ws.c_str()); + if (attrs != INVALID_FILE_ATTRIBUTES && + (attrs & DIRECTORY_SOFT_LINK_ATTRS) == DIRECTORY_SOFT_LINK_ATTRS && + RemoveDirectoryW(ws.c_str())) { + return true; + } if (DeleteFileW(ws.c_str()) || GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_PATH_NOT_FOUND) { return true; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b7618d17028da30bf0421e56aed6789bba4a12a commit 4b7618d17028da30bf0421e56aed6789bba4a12a Author: Robert Maynard AuthorDate: Wed Dec 13 11:15:06 2017 -0500 Commit: Brad King CommitDate: Fri Dec 15 10:29:20 2017 -0500 CUDA: Fix CUDA_STANDARD selection via cxx_std_11 with CXX_STANDARD When C++ features require a certain C++/CUDA level, verify or update the standard level target property for each language independently. While at it, add missing rejection of invalid `CUDA_STANDARD` property values. Co-Author: Brad King Fixes: #17519 diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 2aaff93..a1e2f63 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4486,6 +4486,27 @@ bool cmMakefile::AddRequiredTargetCxxFeature(cmTarget* target, } } + const char* existingCudaStandard = target->GetProperty("CUDA_STANDARD"); + const char* const* existingCudaLevel = nullptr; + if (existingCudaStandard) { + existingCudaLevel = + std::find_if(cm::cbegin(CXX_STANDARDS), cm::cend(CXX_STANDARDS), + cmStrCmp(existingCudaStandard)); + if (existingCudaLevel == cm::cend(CXX_STANDARDS)) { + std::ostringstream e; + e << "The CUDA_STANDARD property on target \"" << target->GetName() + << "\" contained an invalid value: \"" << existingCudaStandard + << "\"."; + if (error) { + *error = e.str(); + } else { + this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, e.str(), + this->Backtrace); + } + return false; + } + } + /* clang-format off */ const char* const* needCxxLevel = needCxx17 ? &CXX_STANDARDS[3] @@ -4500,6 +4521,11 @@ bool cmMakefile::AddRequiredTargetCxxFeature(cmTarget* target, // the needed C++ features. if (!existingCxxLevel || existingCxxLevel < needCxxLevel) { target->SetProperty("CXX_STANDARD", *needCxxLevel); + } + + // Ensure the CUDA language level is high enough to support + // the needed C++ features. + if (!existingCudaLevel || existingCudaLevel < needCxxLevel) { target->SetProperty("CUDA_STANDARD", *needCxxLevel); } } diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt index de48501..8a43df5 100644 --- a/Tests/Cuda/CMakeLists.txt +++ b/Tests/Cuda/CMakeLists.txt @@ -2,6 +2,7 @@ ADD_TEST_MACRO(Cuda.Complex CudaComplex) ADD_TEST_MACRO(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures) ADD_TEST_MACRO(Cuda.ObjectLibrary CudaObjectLibrary) +ADD_TEST_MACRO(Cuda.MixedStandardLevels MixedStandardLevels) ADD_TEST_MACRO(Cuda.ToolkitInclude CudaToolkitInclude) ADD_TEST_MACRO(Cuda.ProperLinkFlags ProperLinkFlags) ADD_TEST_MACRO(Cuda.WithC CudaWithC) diff --git a/Tests/Cuda/MixedStandardLevels/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels/CMakeLists.txt new file mode 100644 index 0000000..683abe7 --- /dev/null +++ b/Tests/Cuda/MixedStandardLevels/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.7) +project(CudaComplex CXX CUDA) + +string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30") + +set(CMAKE_CXX_STANDARD 11) + +add_executable(MixedStandardLevels main.cu) +target_compile_features(MixedStandardLevels PUBLIC cxx_std_11) + +if(APPLE) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET MixedStandardLevels PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) +endif() diff --git a/Tests/Cuda/MixedStandardLevels/main.cu b/Tests/Cuda/MixedStandardLevels/main.cu new file mode 100644 index 0000000..d57c05a --- /dev/null +++ b/Tests/Cuda/MixedStandardLevels/main.cu @@ -0,0 +1,10 @@ + +#include + +int main(int argc, char** argv) +{ + // Verify that issue #17519 Setting CXX_STANDARD breaks CUDA_STANDARD + // selection via cxx_std_11 has been corrected + using returnv = std::integral_constant; + return returnv::value; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d2d9c18bd477a6fab1744d8da13bf5d760a0e03 commit 1d2d9c18bd477a6fab1744d8da13bf5d760a0e03 Author: Robert Maynard AuthorDate: Wed Dec 13 11:14:55 2017 -0500 Commit: Brad King CommitDate: Fri Dec 15 10:27:07 2017 -0500 cmMakefile: Refactor determining a targets C++ standard level The original code doesn't scale well as we add support for each new language level. Co-Author: Brad King diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a9de3f5..2aaff93 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4401,8 +4401,10 @@ bool cmMakefile::HaveCxxStandardAvailable(cmTarget const* target, existingCxxStandard = defaultCxxStandard; } - if (std::find_if(cm::cbegin(CXX_STANDARDS), cm::cend(CXX_STANDARDS), - cmStrCmp(existingCxxStandard)) == cm::cend(CXX_STANDARDS)) { + const char* const* existingCxxLevel = + std::find_if(cm::cbegin(CXX_STANDARDS), cm::cend(CXX_STANDARDS), + cmStrCmp(existingCxxStandard)); + if (existingCxxLevel == cm::cend(CXX_STANDARDS)) { std::ostringstream e; e << "The CXX_STANDARD property on target \"" << target->GetName() << "\" contained an invalid value: \"" << existingCxxStandard << "\"."; @@ -4410,32 +4412,16 @@ bool cmMakefile::HaveCxxStandardAvailable(cmTarget const* target, return false; } - const char* const* existingCxxIt = existingCxxStandard - ? std::find_if(cm::cbegin(CXX_STANDARDS), cm::cend(CXX_STANDARDS), - cmStrCmp(existingCxxStandard)) - : cm::cend(CXX_STANDARDS); + /* clang-format off */ + const char* const* needCxxLevel = + needCxx17 ? &CXX_STANDARDS[3] + : needCxx14 ? &CXX_STANDARDS[2] + : needCxx11 ? &CXX_STANDARDS[1] + : needCxx98 ? &CXX_STANDARDS[0] + : nullptr; + /* clang-format on */ - if (needCxx17 && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), cmStrCmp("17"))) { - return false; - } - if (needCxx14 && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), cmStrCmp("14"))) { - return false; - } - if (needCxx11 && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), cmStrCmp("11"))) { - return false; - } - if (needCxx98 && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), cmStrCmp("98"))) { - return false; - } - return true; + return !needCxxLevel || needCxxLevel <= existingCxxLevel; } void cmMakefile::CheckNeededCxxLanguage(const std::string& feature, @@ -4481,10 +4467,12 @@ bool cmMakefile::AddRequiredTargetCxxFeature(cmTarget* target, needCxx17); const char* existingCxxStandard = target->GetProperty("CXX_STANDARD"); + const char* const* existingCxxLevel = nullptr; if (existingCxxStandard) { - if (std::find_if(cm::cbegin(CXX_STANDARDS), cm::cend(CXX_STANDARDS), - cmStrCmp(existingCxxStandard)) == - cm::cend(CXX_STANDARDS)) { + existingCxxLevel = + std::find_if(cm::cbegin(CXX_STANDARDS), cm::cend(CXX_STANDARDS), + cmStrCmp(existingCxxStandard)); + if (existingCxxLevel == cm::cend(CXX_STANDARDS)) { std::ostringstream e; e << "The CXX_STANDARD property on target \"" << target->GetName() << "\" contained an invalid value: \"" << existingCxxStandard << "\"."; @@ -4497,50 +4485,25 @@ bool cmMakefile::AddRequiredTargetCxxFeature(cmTarget* target, return false; } } - const char* const* existingCxxIt = existingCxxStandard - ? std::find_if(cm::cbegin(CXX_STANDARDS), cm::cend(CXX_STANDARDS), - cmStrCmp(existingCxxStandard)) - : cm::cend(CXX_STANDARDS); - - bool setCxx98 = needCxx98 && !existingCxxStandard; - bool setCxx11 = needCxx11 && !existingCxxStandard; - bool setCxx14 = needCxx14 && !existingCxxStandard; - bool setCxx17 = needCxx17 && !existingCxxStandard; - - if (needCxx17 && existingCxxStandard && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), cmStrCmp("17"))) { - setCxx17 = true; - } else if (needCxx14 && existingCxxStandard && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), - cmStrCmp("14"))) { - setCxx14 = true; - } else if (needCxx11 && existingCxxStandard && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), - cmStrCmp("11"))) { - setCxx11 = true; - } else if (needCxx98 && existingCxxStandard && - existingCxxIt < std::find_if(cm::cbegin(CXX_STANDARDS), - cm::cend(CXX_STANDARDS), - cmStrCmp("98"))) { - setCxx98 = true; - } - - if (setCxx17) { - target->SetProperty("CXX_STANDARD", "17"); - target->SetProperty("CUDA_STANDARD", "17"); - } else if (setCxx14) { - target->SetProperty("CXX_STANDARD", "14"); - target->SetProperty("CUDA_STANDARD", "14"); - } else if (setCxx11) { - target->SetProperty("CXX_STANDARD", "11"); - target->SetProperty("CUDA_STANDARD", "11"); - } else if (setCxx98) { - target->SetProperty("CXX_STANDARD", "98"); - target->SetProperty("CUDA_STANDARD", "98"); + + /* clang-format off */ + const char* const* needCxxLevel = + needCxx17 ? &CXX_STANDARDS[3] + : needCxx14 ? &CXX_STANDARDS[2] + : needCxx11 ? &CXX_STANDARDS[1] + : needCxx98 ? &CXX_STANDARDS[0] + : nullptr; + /* clang-format on */ + + if (needCxxLevel) { + // Ensure the C++ language level is high enough to support + // the needed C++ features. + if (!existingCxxLevel || existingCxxLevel < needCxxLevel) { + target->SetProperty("CXX_STANDARD", *needCxxLevel); + target->SetProperty("CUDA_STANDARD", *needCxxLevel); + } } + return true; } ----------------------------------------------------------------------- Summary of changes: Source/cmMakefile.cxx | 135 ++++++++++++------------- Source/kwsys/SystemTools.cxx | 8 ++ Tests/Cuda/CMakeLists.txt | 1 + Tests/Cuda/MixedStandardLevels/CMakeLists.txt | 14 +++ Tests/Cuda/MixedStandardLevels/main.cu | 10 ++ 5 files changed, 95 insertions(+), 73 deletions(-) create mode 100644 Tests/Cuda/MixedStandardLevels/CMakeLists.txt create mode 100644 Tests/Cuda/MixedStandardLevels/main.cu hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 20 08:25:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 20 Dec 2017 08:25:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-662-g4d6c273 Message-ID: <20171220132503.E0C5EFD475@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 4d6c27360636ecaa9f815306fecb3b5fbcce68bc (commit) via bad72ccb7f5276ae0fa387fbd94cc102a34c1877 (commit) via c69ce01d44fc0dc876aa8d9c4e6e2edd97619a4b (commit) via 493ad0565e5cecf32da6dcefd8dec78ae10eab0f (commit) via 683e9023a70792845544f61daf570c5bfe329ac1 (commit) via 3ce7eecedc2686520af930fb86cf5c7a79fd4fb1 (commit) from 740e598c8ef708656175709a2b51476604005863 (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=4d6c27360636ecaa9f815306fecb3b5fbcce68bc commit 4d6c27360636ecaa9f815306fecb3b5fbcce68bc Merge: bad72cc c69ce01 Author: Brad King AuthorDate: Wed Dec 20 08:18:35 2017 -0500 Commit: Brad King CommitDate: Wed Dec 20 08:18:35 2017 -0500 Merge branch 'release-3.10' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bad72ccb7f5276ae0fa387fbd94cc102a34c1877 commit bad72ccb7f5276ae0fa387fbd94cc102a34c1877 Merge: 740e598 493ad05 Author: Brad King AuthorDate: Wed Dec 20 13:17:35 2017 +0000 Commit: Kitware Robot CommitDate: Wed Dec 20 08:17:37 2017 -0500 Merge topic 'autogen-nested-lists-fix' 493ad056 Merge branch 'backport-autogen-nested-lists-fix' into autogen-nested-lists-fix 683e9023 Autogen: Fix for problematic nested list separator 3ce7eece Autogen: Fix for problematic nested lists separator Acked-by: Kitware Robot Merge-request: !1607 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=493ad0565e5cecf32da6dcefd8dec78ae10eab0f commit 493ad0565e5cecf32da6dcefd8dec78ae10eab0f Merge: 3ce7eec 683e902 Author: Brad King AuthorDate: Wed Dec 20 08:15:22 2017 -0500 Commit: Brad King CommitDate: Wed Dec 20 08:15:22 2017 -0500 Merge branch 'backport-autogen-nested-lists-fix' into autogen-nested-lists-fix https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ce7eecedc2686520af930fb86cf5c7a79fd4fb1 commit 3ce7eecedc2686520af930fb86cf5c7a79fd4fb1 Author: Sebastian Holtermann AuthorDate: Mon Dec 18 14:36:17 2017 +0100 Commit: Sebastian Holtermann CommitDate: Mon Dec 18 14:36:17 2017 +0100 Autogen: Fix for problematic nested lists separator In the AutogenInfo.cmake file the separator for nested lists was `@LSEP@` which led to a speed regression because the `@` character triggered an (unsuccessful) expression evaluation. By setting the policy version of the CMake instance in the `_autogen` target to 3.9, the OLD `@` evaluating behavior controlled by policy CMP0053 is disabled. Also the nested lists separator string is changed to `<<>>`, which solves the problem twofold. Closes #17570 diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx index b9dd392..255a532 100644 --- a/Source/cmQtAutoGen.cxx +++ b/Source/cmQtAutoGen.cxx @@ -233,7 +233,7 @@ static bool RccListInputsQt5(std::string const& rccCommand, // - Class definitions -std::string const cmQtAutoGen::listSep = "@LSEP@"; +std::string const cmQtAutoGen::listSep = "<<>>"; std::string const& cmQtAutoGen::GeneratorName(Generator type) { diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index 52193af..ee0ddbc 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -78,6 +78,9 @@ bool cmQtAutoGenerator::Run(std::string const& infoFile, snapshot.GetDirectory().SetCurrentSource(this->InfoDir); auto makefile = cm::make_unique(&gg, snapshot); + // The OLD/WARN behavior for policy CMP0053 caused a speed regression. + // https://gitlab.kitware.com/cmake/cmake/issues/17570 + makefile->SetPolicyVersion("3.9"); gg.SetCurrentMakefile(makefile.get()); return this->Process(makefile.get()); ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGen.cxx | 2 +- Source/cmQtAutoGenerator.cxx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 20 08:25:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 20 Dec 2017 08:25:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.10.1-4-gc69ce01 Message-ID: <20171220132504.00715FD475@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 c69ce01d44fc0dc876aa8d9c4e6e2edd97619a4b (commit) via 683e9023a70792845544f61daf570c5bfe329ac1 (commit) from 307214c0eeb283c24584ba0e14bb2be1ade67ca6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/cmQtAutoGen.cxx | 2 +- Source/cmQtAutoGenerators.cxx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 21 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 21 Dec 2017 00:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-663-gdeaa19c Message-ID: <20171221050507.C6CA9101A65@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 deaa19cfedfb3d3c51fae64df809aa01fff1f55c (commit) from 4d6c27360636ecaa9f815306fecb3b5fbcce68bc (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=deaa19cfedfb3d3c51fae64df809aa01fff1f55c commit deaa19cfedfb3d3c51fae64df809aa01fff1f55c Author: Kitware Robot AuthorDate: Thu Dec 21 00:01:12 2017 -0500 Commit: Kitware Robot CommitDate: Thu Dec 21 00:01:12 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9697bd5..16621ac 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 10) -set(CMake_VERSION_PATCH 20171220) +set(CMake_VERSION_PATCH 20171221) #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 Dec 21 06:45:14 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 21 Dec 2017 06:45:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-665-g08d574e Message-ID: <20171221114514.8A642FE6A0@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 08d574e9d7b17971468aa0399d950edb147b57ca (commit) via d15f199c142226cde18514b1ee1495c6a40e1633 (commit) from deaa19cfedfb3d3c51fae64df809aa01fff1f55c (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=08d574e9d7b17971468aa0399d950edb147b57ca commit 08d574e9d7b17971468aa0399d950edb147b57ca Merge: deaa19c d15f199 Author: Craig Scott AuthorDate: Thu Dec 21 11:36:05 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 06:36:21 2017 -0500 Merge topic 'ctest-update-timing-summary-manual' d15f199c CTest: Expand 'Label and Subproject Summary' section of manual Acked-by: Kitware Robot Merge-request: !1598 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d15f199c142226cde18514b1ee1495c6a40e1633 commit d15f199c142226cde18514b1ee1495c6a40e1633 Author: Betsy McPhail AuthorDate: Fri Dec 15 12:49:17 2017 -0500 Commit: Betsy McPhail CommitDate: Fri Dec 15 12:49:17 2017 -0500 CTest: Expand 'Label and Subproject Summary' section of manual diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index d9af3bc..a04c403 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -330,11 +330,39 @@ associated with the tests run. The label time summary will not include labels that are mapped to subprojects. When the :prop_test:`PROCESSORS` test property is set, CTest will display a -weighted test timing result in label and subproject summaries. The wall clock -time for the test run will be multiplied by this property to give a better -idea of how much cpu resource CTest allocated for the test. The time is +weighted test timing result in label and subproject summaries. The time is reported with `sec*proc` instead of just `sec`. +The weighted time summary reported for each label or subproject j is computed +as:: + + Weighted Time Summary for Label/Subproject j = + sum(raw_test_time[j,i] * num_processors[j,i], i=1...num_tests[j]) + + for labels/subprojects j=1...total + +where: + +* raw_test_time[j,i]: Wall-clock time for the ith test for the jth label or + subproject +* num_processors[j,i]: Value of the CTest PROCESSORS property for the ith test + for the jth label or subproject +* num_tests[j]: Number of tests associated with the jth label or subproject +* total: Total number of labels or subprojects that have at least one test run + +Therefore, the weighted time summary for each label or subproject represents +the amount of time that CTest gave to run the tests for each label or +subproject and gives a good representation of the total expense of the tests +for each label or subproject when compared to other labels or subprojects. + +For example, if "SubprojectA" showed "100 sec*proc" and "SubprojectB" showed +"10 sec*proc", then CTest allocated approximately 10 times the CPU/core time +to run the tests for "SubprojectA" than for "SubprojectB" (e.g. so if effort +is going to be expended to reduce the cost of the test suite for the whole +project, then reducing the cost of the test suite for "SubprojectA" would +likely have a larger impact than effort to reduce the cost of the test suite +for "SubprojectB"). + .. _`Build and Test Mode`: Build and Test Mode ----------------------------------------------------------------------- Summary of changes: Help/manual/ctest.1.rst | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 21 08:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 21 Dec 2017 08:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-681-g258e6f1 Message-ID: <20171221130507.BBFC9FCCBB@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 258e6f1b1e1d20bc48a5892f5d9d339269fa2704 (commit) via 414843599339259c6525ccc11127d8738cb83578 (commit) via 3ba57ddf895019b378ef0f20716e40e001d67f90 (commit) via d0390f8be0a640942892b1dda114f472ff5e0218 (commit) via 228468cf3e1c600e49a581a59e9f998be2c03f11 (commit) via 70fba77b2614a064640a6e8f68803a3b349740ea (commit) via 1edfb2c47a2a48e111d7f060184c3e618a712ea4 (commit) via 20eef60869c93297cedf45414903691954a9860b (commit) via 099a4ea50c4fbe5fe13cf6fa4abcf970c49e787c (commit) via 66c0b36d75e16d4b62022b498df06440a843fdd6 (commit) via 8ef14467e4622f8f923f2a05a90c8fa0e12f76f9 (commit) via cfe4e2db1fd609fea5da355cd61e0b77e185f258 (commit) via a9c42e3ec09fa9cdf308344d12b0cc8c2e44d905 (commit) via c095e2ad540edee8521b891f0eba9ebeb3ce5ac3 (commit) via fcf32645946ae46219e91b9f6e87e42fb0574f9e (commit) via 739ae1d090094eea6fc545d4d1567b7db9f9683c (commit) from 08d574e9d7b17971468aa0399d950edb147b57ca (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=258e6f1b1e1d20bc48a5892f5d9d339269fa2704 commit 258e6f1b1e1d20bc48a5892f5d9d339269fa2704 Merge: 4148435 20eef60 Author: Brad King AuthorDate: Thu Dec 21 13:02:05 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 08:02:09 2017 -0500 Merge topic 'copyright-year' 20eef608 Copyright.txt: Update year range to end in 2018 Acked-by: Kitware Robot Merge-request: !1613 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=414843599339259c6525ccc11127d8738cb83578 commit 414843599339259c6525ccc11127d8738cb83578 Merge: 3ba57dd 739ae1d Author: Brad King AuthorDate: Thu Dec 21 13:01:27 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 08:01:34 2017 -0500 Merge topic 'cpackifw-package-remove-target-dir' 739ae1d0 CPack/IFW: Add option to control deletion of the install directory Acked-by: Kitware Robot Merge-request: !1591 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ba57ddf895019b378ef0f20716e40e001d67f90 commit 3ba57ddf895019b378ef0f20716e40e001d67f90 Merge: d0390f8 cfe4e2d Author: Brad King AuthorDate: Thu Dec 21 12:59:48 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 07:59:51 2017 -0500 Merge topic 'use-override' cfe4e2db VS: Use 'override' keyword for overridden methods in generator classes Acked-by: Kitware Robot Merge-request: !1601 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d0390f8be0a640942892b1dda114f472ff5e0218 commit d0390f8be0a640942892b1dda114f472ff5e0218 Merge: 228468c 099a4ea Author: Brad King AuthorDate: Thu Dec 21 12:59:23 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 07:59:26 2017 -0500 Merge topic 'cmake_symlink_library-slashes' 099a4ea5 cmcmd: Fix cmake_symlink_library for inconsistent slashes Acked-by: Kitware Robot Merge-request: !1612 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=228468cf3e1c600e49a581a59e9f998be2c03f11 commit 228468cf3e1c600e49a581a59e9f998be2c03f11 Merge: 70fba77 66c0b36 Author: Brad King AuthorDate: Thu Dec 21 12:58:42 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 07:58:48 2017 -0500 Merge topic 'objlib-dedup' 66c0b36d objlib: fix unchecked insertions in `cmGeneratorTarget::GetLanguages` Acked-by: Kitware Robot Merge-request: !1609 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70fba77b2614a064640a6e8f68803a3b349740ea commit 70fba77b2614a064640a6e8f68803a3b349740ea Merge: 1edfb2c a9c42e3 Author: Brad King AuthorDate: Thu Dec 21 12:58:05 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 07:58:10 2017 -0500 Merge topic 'FindBLAS-modernize' a9c42e3e FindBLAS: optionally query pkg-config for a library c095e2ad FindBLAS: simplify if() fcf32645 FindBLAS: use FPHSA Acked-by: Kitware Robot Merge-request: !1599 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1edfb2c47a2a48e111d7f060184c3e618a712ea4 commit 1edfb2c47a2a48e111d7f060184c3e618a712ea4 Merge: 08d574e 8ef1446 Author: Brad King AuthorDate: Thu Dec 21 12:57:26 2017 +0000 Commit: Kitware Robot CommitDate: Thu Dec 21 07:57:30 2017 -0500 Merge topic 'solaris_warning_single' 8ef14467 Solaris: Fix shadowed declaration warning Acked-by: Kitware Robot Merge-request: !1611 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20eef60869c93297cedf45414903691954a9860b commit 20eef60869c93297cedf45414903691954a9860b Author: Brad King AuthorDate: Wed Dec 20 13:19:31 2017 -0500 Commit: Brad King CommitDate: Wed Dec 20 13:19:31 2017 -0500 Copyright.txt: Update year range to end in 2018 diff --git a/Copyright.txt b/Copyright.txt index 3c92a81..660455f 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -1,5 +1,5 @@ CMake - Cross Platform Makefile Generator -Copyright 2000-2017 Kitware, Inc. and Contributors +Copyright 2000-2018 Kitware, Inc. and Contributors All rights reserved. Redistribution and use in source and binary forms, with or without https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=099a4ea50c4fbe5fe13cf6fa4abcf970c49e787c commit 099a4ea50c4fbe5fe13cf6fa4abcf970c49e787c Author: Brad King AuthorDate: Wed Dec 20 11:35:09 2017 -0500 Commit: Brad King CommitDate: Wed Dec 20 11:35:09 2017 -0500 cmcmd: Fix cmake_symlink_library for inconsistent slashes With the Ninja generator we may invoke `cmake_symlink_library` with different slash conventions (`/` versus `\`) for different arguments. Fix comparison of the paths/names given to tolerate this. Fixes: #17579 diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index b78fbe6..f660f43 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1237,9 +1237,12 @@ int cmcmd::HashSumFile(std::vector& args, cmCryptoHash::Algo algo) int cmcmd::SymlinkLibrary(std::vector& args) { int result = 0; - std::string const& realName = args[2]; - std::string const& soName = args[3]; - std::string const& name = args[4]; + std::string realName = args[2]; + std::string soName = args[3]; + std::string name = args[4]; + cmSystemTools::ConvertToUnixSlashes(realName); + cmSystemTools::ConvertToUnixSlashes(soName); + cmSystemTools::ConvertToUnixSlashes(name); if (soName != realName) { if (!cmcmd::SymlinkInternal(realName, soName)) { cmSystemTools::ReportLastSystemError("cmake_symlink_library"); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66c0b36d75e16d4b62022b498df06440a843fdd6 commit 66c0b36d75e16d4b62022b498df06440a843fdd6 Author: Pavel Solodovnikov AuthorDate: Wed Dec 20 11:18:11 2017 +0300 Commit: Pavel Solodovnikov CommitDate: Wed Dec 20 17:37:15 2017 +0300 objlib: fix unchecked insertions in `cmGeneratorTarget::GetLanguages` diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 103d034..2cf53cc 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5133,7 +5133,12 @@ void cmGeneratorTarget::GetLanguages(std::set& languages, std::string objLib = extObj->GetObjectLibrary(); if (cmGeneratorTarget* tgt = this->LocalGenerator->FindGeneratorTargetToUse(objLib)) { - objectLibraries.push_back(tgt); + auto const objLibIt = + std::find_if(objectLibraries.cbegin(), objectLibraries.cend(), + [tgt](cmGeneratorTarget* t) { return t == tgt; }); + if (objectLibraries.cend() == objLibIt) { + objectLibraries.push_back(tgt); + } } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ef14467e4622f8f923f2a05a90c8fa0e12f76f9 commit 8ef14467e4622f8f923f2a05a90c8fa0e12f76f9 Author: Craig Scott AuthorDate: Wed Dec 20 21:49:47 2017 +1100 Commit: Craig Scott CommitDate: Wed Dec 20 21:49:47 2017 +1100 Solaris: Fix shadowed declaration warning "single" is a type declared in /usr/include/floatingpoint.h on Solaris, so the local variable of the same name in cmParseArgumentsCommand.cxx was triggering a compiler warning about the local variable shadowing the type. diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 0922e6e..9a5b097 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -71,8 +71,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, typedef std::map single_map; typedef std::map> multi_map; options_map options; - single_map single; - multi_map multi; + single_map singleValArgs; + multi_map multiValArgs; // anything else is put into a vector of unparsed strings std::vector unparsed; @@ -98,7 +98,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, if (!used_keywords.insert(iter).second) { this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter); } - single[iter]; // default initialize + singleValArgs[iter]; // default initialize } // the fourth argument is a (cmake) list of multi argument options @@ -108,7 +108,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, if (!used_keywords.insert(iter).second) { this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter); } - multi[iter]; // default initialize + multiValArgs[iter]; // default initialize } enum insideValues @@ -161,15 +161,15 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, continue; } - const single_map::iterator singleIter = single.find(arg); - if (singleIter != single.end()) { + const single_map::iterator singleIter = singleValArgs.find(arg); + if (singleIter != singleValArgs.end()) { insideValues = SINGLE; currentArgName = arg; continue; } - const multi_map::iterator multiIter = multi.find(arg); - if (multiIter != multi.end()) { + const multi_map::iterator multiIter = multiValArgs.find(arg); + if (multiIter != multiValArgs.end()) { insideValues = MULTI; currentArgName = arg; continue; @@ -177,14 +177,14 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, switch (insideValues) { case SINGLE: - single[currentArgName] = arg; + singleValArgs[currentArgName] = arg; insideValues = NONE; break; case MULTI: if (parseFromArgV) { - multi[currentArgName].push_back(escape_arg(arg)); + multiValArgs[currentArgName].push_back(escape_arg(arg)); } else { - multi[currentArgName].push_back(arg); + multiValArgs[currentArgName].push_back(arg); } break; default: @@ -204,7 +204,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, this->Makefile->AddDefinition(prefix + iter.first, iter.second ? "TRUE" : "FALSE"); } - for (auto const& iter : single) { + for (auto const& iter : singleValArgs) { if (!iter.second.empty()) { this->Makefile->AddDefinition(prefix + iter.first, iter.second.c_str()); } else { @@ -212,7 +212,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, } } - for (auto const& iter : multi) { + for (auto const& iter : multiValArgs) { if (!iter.second.empty()) { this->Makefile->AddDefinition( prefix + iter.first, cmJoin(cmMakeRange(iter.second), ";").c_str()); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfe4e2db1fd609fea5da355cd61e0b77e185f258 commit cfe4e2db1fd609fea5da355cd61e0b77e185f258 Author: Vitaly Stakhovsky AuthorDate: Fri Dec 15 21:17:49 2017 -0500 Commit: Vitaly Stakhovsky CommitDate: Fri Dec 15 21:17:49 2017 -0500 VS: Use 'override' keyword for overridden methods in generator classes The corresponding 'virtual' removed. diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index fc21193..f2501c2 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -18,29 +18,31 @@ public: const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); - virtual bool MatchesGeneratorName(const std::string& name) const; + bool MatchesGeneratorName(const std::string& name) const override; - virtual bool SetSystemName(std::string const& s, cmMakefile* mf); - virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); - virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf); + bool SetSystemName(std::string const& s, cmMakefile* mf) override; + bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override; + bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf) override; - virtual void GenerateBuildCommand( - std::vector& makeCommand, const std::string& makeProgram, - const std::string& projectName, const std::string& projectDir, - const std::string& targetName, const std::string& config, bool fast, - bool verbose, - std::vector const& makeOptions = std::vector()); + void GenerateBuildCommand(std::vector& makeCommand, + const std::string& makeProgram, + const std::string& projectName, + const std::string& projectDir, + const std::string& targetName, + const std::string& config, bool fast, bool verbose, + std::vector const& makeOptions = + std::vector()) override; ///! create the correct local generator - virtual cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf); + cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) override; /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vector const& languages, - cmMakefile*, bool optional); - virtual void WriteSLNHeader(std::ostream& fout); + void EnableLanguage(std::vector const& languages, cmMakefile*, + bool optional) override; + void WriteSLNHeader(std::ostream& fout) override; bool IsCudaEnabled() const { return this->CudaEnabled; } @@ -87,11 +89,11 @@ public: /** Return true if building for WindowsStore */ bool TargetsWindowsStore() const { return this->SystemIsWindowsStore; } - virtual const char* GetCMakeCFGIntDir() const { return "$(Configuration)"; } + const char* GetCMakeCFGIntDir() const override { return "$(Configuration)"; } bool Find64BitTools(cmMakefile* mf); /** Generate an .rule file path for a given command output. */ - virtual std::string GenerateRuleFile(std::string const& output) const; + std::string GenerateRuleFile(std::string const& output) const override; void PathTooLong(cmGeneratorTarget* target, cmSourceFile const* sf, std::string const& sfRel); @@ -114,7 +116,7 @@ public: cmIDEFlagTable const* GetNasmFlagTable() const; protected: - virtual void Generate(); + void Generate() override; virtual bool InitializeSystem(cmMakefile* mf); virtual bool InitializeWindows(cmMakefile* mf); virtual bool InitializeWindowsCE(cmMakefile* mf); @@ -128,7 +130,7 @@ protected: virtual bool SelectWindowsPhoneToolset(std::string& toolset) const; virtual bool SelectWindowsStoreToolset(std::string& toolset) const; - virtual const char* GetIDEVersion() { return "10.0"; } + const char* GetIDEVersion() override { return "10.0"; } std::string const& GetMSBuildCommand(); @@ -174,8 +176,8 @@ private: bool MSBuildCommandInitialized; cmVisualStudio10ToolsetOptions ToolsetOptions; virtual std::string FindMSBuildCommand(); - virtual std::string FindDevEnvCommand(); - virtual std::string GetVSMakeProgram() { return this->GetMSBuildCommand(); } + std::string FindDevEnvCommand() override; + std::string GetVSMakeProgram() override { return this->GetMSBuildCommand(); } bool PlatformToolsetNeedsDebugEnum; @@ -187,6 +189,6 @@ private: bool CudaEnabled; // We do not use the reload macros for VS >= 10. - virtual std::string GetUserMacrosDirectory() { return ""; } + std::string GetUserMacrosDirectory() override { return ""; } }; #endif diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 8b75aad..40f02fb 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -24,15 +24,15 @@ public: const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); - virtual bool MatchesGeneratorName(const std::string& name) const; + bool MatchesGeneratorName(const std::string& name) const override; - virtual void WriteSLNHeader(std::ostream& fout); + void WriteSLNHeader(std::ostream& fout) override; protected: - virtual bool InitializeWindowsPhone(cmMakefile* mf); - virtual bool InitializeWindowsStore(cmMakefile* mf); - virtual bool SelectWindowsPhoneToolset(std::string& toolset) const; - virtual bool SelectWindowsStoreToolset(std::string& toolset) const; + bool InitializeWindowsPhone(cmMakefile* mf) override; + bool InitializeWindowsStore(cmMakefile* mf) override; + bool SelectWindowsPhoneToolset(std::string& toolset) const override; + bool SelectWindowsStoreToolset(std::string& toolset) const override; // Used to verify that the Desktop toolset for the current generator is // installed on the machine. @@ -43,12 +43,12 @@ protected: bool IsWindowsPhoneToolsetInstalled() const; bool IsWindowsStoreToolsetInstalled() const; - virtual const char* GetIDEVersion() { return "11.0"; } + const char* GetIDEVersion() override { return "11.0"; } bool UseFolderProperty(); static std::set GetInstalledWindowsCESDKs(); /** Return true if the configuration needs to be deployed */ - virtual bool NeedsDeploy(cmStateEnums::TargetType type) const; + bool NeedsDeploy(cmStateEnums::TargetType type) const override; private: class Factory; diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 5ba21a6..c941809 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -22,32 +22,32 @@ public: const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); - virtual bool MatchesGeneratorName(const std::string& name) const; + bool MatchesGeneratorName(const std::string& name) const override; - virtual void WriteSLNHeader(std::ostream& fout); + void WriteSLNHeader(std::ostream& fout) override; // in Visual Studio 2013 they detached the MSBuild tools version // from the .Net Framework version and instead made it have it's own // version number - virtual const char* GetToolsVersion() { return "12.0"; } + const char* GetToolsVersion() override { return "12.0"; } protected: bool ProcessGeneratorToolsetField(std::string const& key, std::string const& value) override; - virtual bool InitializeWindowsPhone(cmMakefile* mf); - virtual bool InitializeWindowsStore(cmMakefile* mf); - virtual bool SelectWindowsPhoneToolset(std::string& toolset) const; - virtual bool SelectWindowsStoreToolset(std::string& toolset) const; + bool InitializeWindowsPhone(cmMakefile* mf) override; + bool InitializeWindowsStore(cmMakefile* mf) override; + bool SelectWindowsPhoneToolset(std::string& toolset) const override; + bool SelectWindowsStoreToolset(std::string& toolset) const override; // Used to verify that the Desktop toolset for the current generator is // installed on the machine. - virtual bool IsWindowsDesktopToolsetInstalled() const; + bool IsWindowsDesktopToolsetInstalled() const override; // These aren't virtual because we need to check if the selected version // of the toolset is installed bool IsWindowsPhoneToolsetInstalled() const; bool IsWindowsStoreToolsetInstalled() const; - virtual const char* GetIDEVersion() { return "12.0"; } + const char* GetIDEVersion() override { return "12.0"; } private: class Factory; }; diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h index 425fb22..d92a11a 100644 --- a/Source/cmGlobalVisualStudio14Generator.h +++ b/Source/cmGlobalVisualStudio14Generator.h @@ -22,26 +22,26 @@ public: const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); - virtual bool MatchesGeneratorName(const std::string& name) const; + bool MatchesGeneratorName(const std::string& name) const override; - virtual void WriteSLNHeader(std::ostream& fout); + void WriteSLNHeader(std::ostream& fout) override; - virtual const char* GetToolsVersion() { return "14.0"; } + const char* GetToolsVersion() override { return "14.0"; } protected: - virtual bool InitializeWindows(cmMakefile* mf); - virtual bool InitializeWindowsStore(cmMakefile* mf); - virtual bool SelectWindowsStoreToolset(std::string& toolset) const; + bool InitializeWindows(cmMakefile* mf) override; + bool InitializeWindowsStore(cmMakefile* mf) override; + bool SelectWindowsStoreToolset(std::string& toolset) const override; // These aren't virtual because we need to check if the selected version // of the toolset is installed bool IsWindowsStoreToolsetInstalled() const; - virtual const char* GetIDEVersion() { return "14.0"; } + const char* GetIDEVersion() override { return "14.0"; } virtual bool SelectWindows10SDK(cmMakefile* mf, bool required); // Used to verify that the Desktop toolset for the current generator is // installed on the machine. - virtual bool IsWindowsDesktopToolsetInstalled() const; + bool IsWindowsDesktopToolsetInstalled() const override; std::string GetWindows10SDKVersion(); diff --git a/Source/cmGlobalVisualStudio15Generator.h b/Source/cmGlobalVisualStudio15Generator.h index 852a4e7..4f4e0b9 100644 --- a/Source/cmGlobalVisualStudio15Generator.h +++ b/Source/cmGlobalVisualStudio15Generator.h @@ -22,11 +22,11 @@ public: const std::string& platformName); static cmGlobalGeneratorFactory* NewFactory(); - virtual bool MatchesGeneratorName(const std::string& name) const; + bool MatchesGeneratorName(const std::string& name) const override; - virtual void WriteSLNHeader(std::ostream& fout); + void WriteSLNHeader(std::ostream& fout) override; - virtual const char* GetToolsVersion() { return "15.0"; } + const char* GetToolsVersion() override { return "15.0"; } bool SetGeneratorInstance(std::string const& i, cmMakefile* mf) override; @@ -34,13 +34,13 @@ public: protected: bool InitializeWindows(cmMakefile* mf) override; - virtual bool SelectWindowsStoreToolset(std::string& toolset) const; + bool SelectWindowsStoreToolset(std::string& toolset) const override; - virtual const char* GetIDEVersion() { return "15.0"; } + const char* GetIDEVersion() override { return "15.0"; } // Used to verify that the Desktop toolset for the current generator is // installed on the machine. - virtual bool IsWindowsDesktopToolsetInstalled() const; + bool IsWindowsDesktopToolsetInstalled() const override; // These aren't virtual because we need to check if the selected version // of the toolset is installed diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index 0ce02aa..054c342 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -17,25 +17,24 @@ public: const std::string& platformName = ""); protected: - virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, - std::vector& generators); + void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, + std::vector& generators) override; virtual void WriteSolutionConfigurations( std::ostream& fout, std::vector const& configs); - virtual void WriteProject(std::ostream& fout, const std::string& name, - const char* path, const cmGeneratorTarget* t); - virtual void WriteProjectDepends(std::ostream& fout, const std::string& name, - const char* path, - cmGeneratorTarget const* t); - virtual void WriteProjectConfigurations( + void WriteProject(std::ostream& fout, const std::string& name, + const char* path, const cmGeneratorTarget* t) override; + void WriteProjectDepends(std::ostream& fout, const std::string& name, + const char* path, + cmGeneratorTarget const* t) override; + void WriteProjectConfigurations( std::ostream& fout, const std::string& name, cmGeneratorTarget const& target, std::vector const& configs, const std::set& configsPartOfDefaultBuild, - const std::string& platformMapping = ""); - virtual void WriteExternalProject(std::ostream& fout, - const std::string& name, const char* path, - const char* typeGuid, - const std::set& depends); - virtual void WriteSLNHeader(std::ostream& fout); + const std::string& platformMapping = "") override; + void WriteExternalProject(std::ostream& fout, const std::string& name, + const char* path, const char* typeGuid, + const std::set& depends) override; + void WriteSLNHeader(std::ostream& fout) override; // Folders are not supported by VS 7.1. virtual bool UseFolderProperty() { return false; } diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index c5aced4..8d1bdc0 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -26,11 +26,11 @@ public: std::string const& GetPlatformName() const; ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf); + cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) override; - virtual bool SetSystemName(std::string const& s, cmMakefile* mf); + bool SetSystemName(std::string const& s, cmMakefile* mf) override; - virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); + bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override; /** * Utilized by the generator factory to determine if this generator @@ -48,19 +48,21 @@ public: * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vector const& languages, - cmMakefile*, bool optional); + void EnableLanguage(std::vector const& languages, cmMakefile*, + bool optional) override; /** * Try running cmake and building a file. This is used for dynamically * loaded commands, not as part of the usual build process. */ - virtual void GenerateBuildCommand( - std::vector& makeCommand, const std::string& makeProgram, - const std::string& projectName, const std::string& projectDir, - const std::string& targetName, const std::string& config, bool fast, - bool verbose, - std::vector const& makeOptions = std::vector()); + void GenerateBuildCommand(std::vector& makeCommand, + const std::string& makeProgram, + const std::string& projectName, + const std::string& projectDir, + const std::string& targetName, + const std::string& config, bool fast, bool verbose, + std::vector const& makeOptions = + std::vector()) override; /** * Generate the DSW workspace file. @@ -71,13 +73,13 @@ public: std::string GetGUID(std::string const& name); /** Append the subdirectory for the given configuration. */ - virtual void AppendDirectoryForConfig(const std::string& prefix, - const std::string& config, - const std::string& suffix, - std::string& dir); + void AppendDirectoryForConfig(const std::string& prefix, + const std::string& config, + const std::string& suffix, + std::string& dir) override; ///! What is the configurations directory variable called? - virtual const char* GetCMakeCFGIntDir() const + const char* GetCMakeCFGIntDir() const override { return "$(ConfigurationName)"; } @@ -103,7 +105,7 @@ public: cmIDEFlagTable const* ExtraFlagTable; protected: - virtual void Generate(); + void Generate() override; virtual const char* GetIDEVersion() = 0; std::string const& GetDevEnvCommand(); @@ -129,7 +131,7 @@ protected: cmLocalGenerator* root); virtual void WriteSLNFooter(std::ostream& fout); virtual void WriteSLNHeader(std::ostream& fout) = 0; - virtual std::string WriteUtilityDepend(const cmGeneratorTarget* target); + std::string WriteUtilityDepend(const cmGeneratorTarget* target) override; virtual void WriteTargetsToSolution( std::ostream& fout, cmLocalGenerator* root, @@ -170,7 +172,7 @@ private: char* IntelProjectVersion; std::string DevEnvCommand; bool DevEnvCommandInitialized; - virtual std::string GetVSMakeProgram() { return this->GetDevEnvCommand(); } + std::string GetVSMakeProgram() override { return this->GetDevEnvCommand(); } }; #define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK" diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 4723b83..af83e4f 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -18,42 +18,42 @@ public: static cmGlobalGeneratorFactory* NewFactory(); ///! Get the name for the generator. - virtual std::string GetName() const { return this->Name; } + std::string GetName() const override { return this->Name; } /** Get the name of the main stamp list file. */ static std::string GetGenerateStampList(); - virtual void EnableLanguage(std::vector const& languages, - cmMakefile*, bool optional); + void EnableLanguage(std::vector const& languages, cmMakefile*, + bool optional) override; virtual void AddPlatformDefinitions(cmMakefile* mf); - virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); + bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override; /** * Override Configure and Generate to add the build-system check * target. */ - virtual void Configure(); + void Configure() override; /** * Where does this version of Visual Studio look for macros for the * current user? Returns the empty string if this version of Visual * Studio does not implement support for VB macros. */ - virtual std::string GetUserMacrosDirectory(); + std::string GetUserMacrosDirectory() override; /** * What is the reg key path to "vsmacros" for this version of Visual * Studio? */ - virtual std::string GetUserMacrosRegKeyBase(); + std::string GetUserMacrosRegKeyBase() override; /** Return true if the target project file should have the option LinkLibraryDependencies and link to .sln dependencies. */ - virtual bool NeedLinkLibraryDependencies(cmGeneratorTarget* target); + bool NeedLinkLibraryDependencies(cmGeneratorTarget* target) override; /** Return true if building for Windows CE */ - virtual bool TargetsWindowsCE() const + bool TargetsWindowsCE() const override { return !this->WindowsCEVersion.empty(); } @@ -62,12 +62,12 @@ public: bool IsExpressEdition() const { return this->ExpressEdition; } protected: - virtual void AddExtraIDETargets(); - virtual const char* GetIDEVersion() { return "8.0"; } + void AddExtraIDETargets() override; + const char* GetIDEVersion() override { return "8.0"; } - virtual std::string FindDevEnvCommand(); + std::string FindDevEnvCommand() override; - virtual bool VSLinksDependencies() const { return false; } + bool VSLinksDependencies() const override { return false; } bool AddCheckTarget(); @@ -75,18 +75,18 @@ protected: virtual bool NeedsDeploy(cmStateEnums::TargetType type) const; static cmIDEFlagTable const* GetExtraFlagTableVS8(); - virtual void WriteSLNHeader(std::ostream& fout); - virtual void WriteSolutionConfigurations( - std::ostream& fout, std::vector const& configs); - virtual void WriteProjectConfigurations( + void WriteSLNHeader(std::ostream& fout) override; + void WriteSolutionConfigurations( + std::ostream& fout, std::vector const& configs) override; + void WriteProjectConfigurations( std::ostream& fout, const std::string& name, cmGeneratorTarget const& target, std::vector const& configs, const std::set& configsPartOfDefaultBuild, - const std::string& platformMapping = ""); - virtual bool ComputeTargetDepends(); - virtual void WriteProjectDepends(std::ostream& fout, const std::string& name, - const char* path, - const cmGeneratorTarget* t); + const std::string& platformMapping = "") override; + bool ComputeTargetDepends() override; + void WriteProjectDepends(std::ostream& fout, const std::string& name, + const char* path, + const cmGeneratorTarget* t) override; bool UseFolderProperty(); diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h index fbc1f5d..37efb9c 100644 --- a/Source/cmGlobalVisualStudio9Generator.h +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -21,23 +21,23 @@ public: * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ - virtual void WriteSLNHeader(std::ostream& fout); + void WriteSLNHeader(std::ostream& fout) override; /** * Where does this version of Visual Studio look for macros for the * current user? Returns the empty string if this version of Visual * Studio does not implement support for VB macros. */ - virtual std::string GetUserMacrosDirectory(); + std::string GetUserMacrosDirectory() override; /** * What is the reg key path to "vsmacros" for this version of Visual * Studio? */ - virtual std::string GetUserMacrosRegKeyBase(); + std::string GetUserMacrosRegKeyBase() override; protected: - virtual const char* GetIDEVersion() { return "9.0"; } + const char* GetIDEVersion() override { return "9.0"; } private: class Factory; friend class Factory; diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index f4fc3cf..75b7f22 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -96,7 +96,7 @@ public: /** Return true if the generated build tree may contain multiple builds. i.e. "Can I build Debug and Release in the same tree?" */ - virtual bool IsMultiConfig() const { return true; } + bool IsMultiConfig() const override { return true; } /** Return true if building for Windows CE */ virtual bool TargetsWindowsCE() const { return false; } @@ -122,8 +122,8 @@ public: bool FindMakeProgram(cmMakefile*) override; - virtual std::string ExpandCFGIntDir(const std::string& str, - const std::string& config) const; + std::string ExpandCFGIntDir(const std::string& str, + const std::string& config) const override; void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; @@ -137,7 +137,7 @@ public: bool dryRun) override; protected: - virtual void AddExtraIDETargets(); + void AddExtraIDETargets() override; // Does this VS version link targets to each other if there are // dependencies in the SLN file? This was done for VS versions @@ -146,7 +146,7 @@ protected: virtual const char* GetIDEVersion() = 0; - virtual bool ComputeTargetDepends(); + bool ComputeTargetDepends() override; class VSDependSet : public std::set { }; diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h index 4cd56dd..bcdc307 100644 --- a/Source/cmLocalVisualStudio10Generator.h +++ b/Source/cmLocalVisualStudio10Generator.h @@ -29,13 +29,13 @@ public: /** * Generate the makefile for this directory. */ - virtual void Generate(); - virtual void ReadAndStoreExternalGUID(const std::string& name, - const char* path); + void Generate() override; + void ReadAndStoreExternalGUID(const std::string& name, + const char* path) override; protected: - virtual const char* ReportErrorLabel() const; - virtual bool CustomCommandUseLocal() const { return true; } + const char* ReportErrorLabel() const override; + bool CustomCommandUseLocal() const override { return true; } private: }; diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index 48f2e1a..02e6931 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -35,12 +35,12 @@ public: virtual ~cmLocalVisualStudio7Generator(); - virtual void AddHelperCommands(); + void AddHelperCommands() override; /** * Generate the makefile for this directory. */ - virtual void Generate(); + void Generate() override; enum BuildType { @@ -56,12 +56,12 @@ public: */ void SetBuildType(BuildType, const std::string& name); - virtual std::string GetTargetDirectory( - cmGeneratorTarget const* target) const; + std::string GetTargetDirectory( + cmGeneratorTarget const* target) const override; cmSourceFile* CreateVCProjBuildRule(); void WriteStampFiles(); - virtual std::string ComputeLongestObjectDirectory( - cmGeneratorTarget const*) const; + std::string ComputeLongestObjectDirectory( + cmGeneratorTarget const*) const override; virtual void ReadAndStoreExternalGUID(const std::string& name, const char* path); diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index ace2f89..3fdafd2 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -44,9 +44,9 @@ public: virtual std::string ComputeLongestObjectDirectory( cmGeneratorTarget const*) const = 0; - virtual void ComputeObjectFilenames( + void ComputeObjectFilenames( std::map& mapping, - cmGeneratorTarget const* = 0); + cmGeneratorTarget const* = 0) override; protected: virtual const char* ReportErrorLabel() const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9c42e3ec09fa9cdf308344d12b0cc8c2e44d905 commit a9c42e3ec09fa9cdf308344d12b0cc8c2e44d905 Author: Rolf Eike Beer AuthorDate: Fri Dec 15 20:42:24 2017 +0100 Commit: Rolf Eike Beer CommitDate: Fri Dec 15 21:24:25 2017 +0100 FindBLAS: optionally query pkg-config for a library This is more or less what Gentoo implements for years, but in a more sophisticated version that uses the target mode now offered by pkg_check_modules(). diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 0e5fa11..8e8c6f4 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -27,10 +27,17 @@ # to link against to use BLAS95 interface # BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface # is found +# +# The following variables can be used to control this module: +# +# :: +# # BLA_STATIC if set on this determines what kind of linkage we do (static) # BLA_VENDOR if set checks only the specified vendor, if not set checks # all the possibilities # BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK +# BLA_PREFER_PKGCONFIG if set pkg-config will be used to search for a BLAS +# library first and if one is found that is preferred # # List of vendors (BLA_VENDOR) valid in this module: # @@ -79,6 +86,18 @@ if( NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_C endif() endif() +if(BLA_PREFER_PKGCONFIG) + find_package(PkgConfig) + pkg_check_modules(PKGC_BLAS IMPORTED_TARGET blas) + if(PKGC_BLAS_FOUND) + set(BLAS_LIBRARIES PkgConfig::PKGC_BLAS) + find_package_handle_standard_args(BLAS + REQUIRED_VARS BLAS_LIBRARIES + VERSION_VAR PKGC_BLAS_VERSION) + return() + endif() +endif() + macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) # This macro checks for the existence of the combination of fortran libraries # given by _list. If the combination is found, this macro checks (using the https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c095e2ad540edee8521b891f0eba9ebeb3ce5ac3 commit c095e2ad540edee8521b891f0eba9ebeb3ce5ac3 Author: Rolf Eike Beer AuthorDate: Fri Dec 15 20:09:43 2017 +0100 Commit: Rolf Eike Beer CommitDate: Fri Dec 15 21:10:25 2017 +0100 FindBLAS: simplify if() diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 88dbea3..0e5fa11 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -661,8 +661,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") foreach (IT ${BLAS_SEARCH_LIBS}) string(REPLACE " " ";" SEARCH_LIBS ${IT}) - if (${_LIBRARIES}) - else () + if (NOT ${_LIBRARIES}) check_fortran_libraries( ${_LIBRARIES} BLAS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fcf32645946ae46219e91b9f6e87e42fb0574f9e commit fcf32645946ae46219e91b9f6e87e42fb0574f9e Author: Rolf Eike Beer AuthorDate: Fri Dec 15 20:07:17 2017 +0100 Commit: Rolf Eike Beer CommitDate: Fri Dec 15 21:10:25 2017 +0100 FindBLAS: use FPHSA diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index bb8b308..88dbea3 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -63,6 +63,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) cmake_push_check_state() set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY}) @@ -676,51 +677,14 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") endif () endif () - if(BLA_F95) - if(BLAS95_LIBRARIES) - set(BLAS95_FOUND TRUE) - else() - set(BLAS95_FOUND FALSE) - endif() - - if(NOT BLAS_FIND_QUIETLY) - if(BLAS95_FOUND) - message(STATUS "A library with BLAS95 API found.") - else() - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS95 API not found. Please specify library location.") - else() - message(STATUS - "A library with BLAS95 API not found. Please specify library location.") - endif() - endif() + find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES) + set(BLAS95_FOUND ${BLAS_FOUND}) + if(BLAS_FOUND) + set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") endif() - set(BLAS_FOUND TRUE) - set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") else() - if(BLAS_LIBRARIES) - set(BLAS_FOUND TRUE) - else() - set(BLAS_FOUND FALSE) - endif() - - if(NOT BLAS_FIND_QUIETLY) - if(BLAS_FOUND) - message(STATUS "A library with BLAS API found.") - else() - if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS API not found. Please specify library location." - ) - else() - message(STATUS - "A library with BLAS API not found. Please specify library location." - ) - endif() - endif() - endif() + find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES) endif() cmake_pop_check_state() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=739ae1d090094eea6fc545d4d1567b7db9f9683c commit 739ae1d090094eea6fc545d4d1567b7db9f9683c Author: Jean-Philippe Lebel AuthorDate: Tue Nov 22 17:56:18 2016 -0500 Commit: Jean-Philippe Lebel CommitDate: Fri Dec 15 13:24:58 2017 -0500 CPack/IFW: Add option to control deletion of the install directory Added support for QT IFW "RemoveTargetDir" boolean option. QTIFW supports an option to prevent, or not, deletion of the installation directory. This is a direct pass-through to that variable. diff --git a/Help/release/dev/cpackifw-package-remove-target-dir.rst b/Help/release/dev/cpackifw-package-remove-target-dir.rst new file mode 100644 index 0000000..52dfc04 --- /dev/null +++ b/Help/release/dev/cpackifw-package-remove-target-dir.rst @@ -0,0 +1,6 @@ +cpackifw-package-remove-target-dir +---------------------------------- + +* The :module:`CPackIFW` module gained new + :variable:`CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR` variable to control + if the target directory should not be deleted when uninstalling. diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 05a54a0..54f6133 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -191,6 +191,12 @@ # # By default used QtIFW_ defaults (``maintenancetool``). # +# .. variable:: CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR +# +# Set to ``OFF`` if the target directory should not be deleted when uninstalling. +# +# Is ``ON`` by default +# # .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE # # Filename for the configuration of the generated maintenance tool. diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 422f5d5..bcbe84d 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -93,6 +93,15 @@ void cmCPackIFWInstaller::ConfigureFromOptions() } } + // RemoveTargetDir + if (this->IsSetToOff("CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR")) { + this->RemoveTargetDir = "false"; + } else if (this->IsOn("CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR")) { + this->RemoveTargetDir = "true"; + } else { + this->RemoveTargetDir.clear(); + } + // Logo if (const char* option = this->GetOption("CPACK_IFW_PACKAGE_LOGO")) { if (cmSystemTools::FileExists(option)) { @@ -422,6 +431,10 @@ void cmCPackIFWInstaller::GenerateInstallerFile() xout.Element("MaintenanceToolIniFile", this->MaintenanceToolIniFile); } + if (!this->RemoveTargetDir.empty()) { + xout.Element("RemoveTargetDir", this->RemoveTargetDir); + } + // Different allows if (this->IsVersionLess("2.0")) { // CPack IFW default policy diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index b635f42..37ad339 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -99,6 +99,10 @@ public: /// Set to true if the installation path can contain non-ASCII characters std::string AllowNonAsciiCharacters; + /// Set to false if the target directory should not be deleted when + /// uninstalling + std::string RemoveTargetDir; + /// Set to false if the installation path cannot contain space characters std::string AllowSpaceInPath; ----------------------------------------------------------------------- Summary of changes: Copyright.txt | 2 +- .../dev/cpackifw-package-remove-target-dir.rst | 6 ++ Modules/CPackIFW.cmake | 6 ++ Modules/FindBLAS.cmake | 70 ++++++++------------ Source/CPack/IFW/cmCPackIFWInstaller.cxx | 13 ++++ Source/CPack/IFW/cmCPackIFWInstaller.h | 4 ++ Source/cmGeneratorTarget.cxx | 7 +- Source/cmGlobalVisualStudio10Generator.h | 44 ++++++------ Source/cmGlobalVisualStudio11Generator.h | 16 ++--- Source/cmGlobalVisualStudio12Generator.h | 18 ++--- Source/cmGlobalVisualStudio14Generator.h | 16 ++--- Source/cmGlobalVisualStudio15Generator.h | 12 ++-- Source/cmGlobalVisualStudio71Generator.h | 27 ++++---- Source/cmGlobalVisualStudio7Generator.h | 40 +++++------ Source/cmGlobalVisualStudio8Generator.h | 44 ++++++------ Source/cmGlobalVisualStudio9Generator.h | 8 +-- Source/cmGlobalVisualStudioGenerator.h | 10 +-- Source/cmLocalVisualStudio10Generator.h | 10 +-- Source/cmLocalVisualStudio7Generator.h | 12 ++-- Source/cmLocalVisualStudioGenerator.h | 4 +- Source/cmParseArgumentsCommand.cxx | 26 ++++---- Source/cmcmd.cxx | 9 ++- 22 files changed, 213 insertions(+), 191 deletions(-) create mode 100644 Help/release/dev/cpackifw-package-remove-target-dir.rst hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 22 00:05:13 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 22 Dec 2017 00:05:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-682-g1f29bc4 Message-ID: <20171222050513.E6FC7FEC3E@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 1f29bc4092edf57cfb61882d7d7358db7e53ebe6 (commit) from 258e6f1b1e1d20bc48a5892f5d9d339269fa2704 (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=1f29bc4092edf57cfb61882d7d7358db7e53ebe6 commit 1f29bc4092edf57cfb61882d7d7358db7e53ebe6 Author: Kitware Robot AuthorDate: Fri Dec 22 00:01:26 2017 -0500 Commit: Kitware Robot CommitDate: Fri Dec 22 00:01:26 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 16621ac..b7e2d42 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 10) -set(CMake_VERSION_PATCH 20171221) +set(CMake_VERSION_PATCH 20171222) #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 Dec 22 08:45:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 22 Dec 2017 08:45:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-685-g4309ed2 Message-ID: <20171222134512.707D0FC914@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 4309ed25eee874ee73a715897550e2ea18631f41 (commit) via 40b95ee8e6ee57ee87b791e831ac3508f77db9a4 (commit) via b0ff528adc3ec53c06bcead3845f9c2f7251c4d3 (commit) from 1f29bc4092edf57cfb61882d7d7358db7e53ebe6 (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=4309ed25eee874ee73a715897550e2ea18631f41 commit 4309ed25eee874ee73a715897550e2ea18631f41 Merge: 1f29bc4 40b95ee Author: Brad King AuthorDate: Fri Dec 22 13:42:58 2017 +0000 Commit: Kitware Robot CommitDate: Fri Dec 22 08:43:05 2017 -0500 Merge topic 'FindPkgConfig_search_path_fix' 40b95ee8 FindPkgConfig: Fix IMPORTED_TARGET NO...PATH option handling b0ff528a FindPkgConfig: Make IMPORTED_TARGET test verify NO...PATH properly Acked-by: Kitware Robot Acked-by: Rolf Eike Beer Merge-request: !1602 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40b95ee8e6ee57ee87b791e831ac3508f77db9a4 commit 40b95ee8e6ee57ee87b791e831ac3508f77db9a4 Author: Craig Scott AuthorDate: Sat Dec 16 21:49:10 2017 +1100 Commit: Craig Scott CommitDate: Sat Dec 16 22:40:40 2017 +1100 FindPkgConfig: Fix IMPORTED_TARGET NO...PATH option handling diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index aad3b74..952ca92 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -191,10 +191,10 @@ function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_pat # set the options that are used as long as the .pc file does not provide a library # path to look into if(_no_cmake_path) - set(_find_opts "NO_CMAKE_PATH") + list(APPEND _find_opts "NO_CMAKE_PATH") endif() if(_no_cmake_environment_path) - string(APPEND _find_opts " NO_CMAKE_ENVIRONMENT_PATH") + list(APPEND _find_opts "NO_CMAKE_ENVIRONMENT_PATH") endif() unset(_search_paths) @@ -458,7 +458,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other ) if (_imp_target) - _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) + _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) endif() endif() @@ -590,7 +590,7 @@ macro(pkg_check_modules _prefix _module0) _pkgconfig_set(__pkg_config_arguments_${_prefix} "${_module0};${ARGN}") endif() elseif (${_prefix}_FOUND AND ${_imp_target}) - _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) + _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) endif() endmacro() @@ -644,7 +644,7 @@ macro(pkg_search_module _prefix _module0) _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) elseif (${_prefix}_FOUND AND ${_imp_target}) - _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) + _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) endif() endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0ff528adc3ec53c06bcead3845f9c2f7251c4d3 commit b0ff528adc3ec53c06bcead3845f9c2f7251c4d3 Author: Craig Scott AuthorDate: Sat Dec 16 19:21:24 2017 +1100 Commit: Craig Scott CommitDate: Sat Dec 16 22:38:56 2017 +1100 FindPkgConfig: Make IMPORTED_TARGET test verify NO...PATH properly diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake index 00cbb7b..606b1df 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake @@ -24,3 +24,64 @@ if (NCURSES_FOUND) else () message(STATUS "skipping test; ncurses not found") endif () + + +# Setup for the remaining package tests below +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH) +set(fakePkgDir ${CMAKE_CURRENT_BINARY_DIR}/pc-fakepackage) +foreach(i 1 2) + set(pname cmakeinternalfakepackage${i}) + file(WRITE ${fakePkgDir}/lib/lib${pname}.a "") + file(WRITE ${fakePkgDir}/lib/${pname}.lib "") + file(WRITE ${fakePkgDir}/lib/pkgconfig/${pname}.pc +"Name: CMakeInternalFakePackage${i} +Description: Dummy package (${i}) for FindPkgConfig IMPORTED_TARGET test +Version: 1.2.3 +Libs: -l${pname} +") +endforeach() + +# Always find the .pc file in the calls further below so that we can test that +# the import target find_library() calls handle the NO...PATH options correctly +set(ENV{PKG_CONFIG_PATH} ${fakePkgDir}/lib/pkgconfig) + +# Confirm correct behavior of NO_CMAKE_PATH, ensuring we only find the library +# for the imported target if we have both set CMAKE_PREFIX_PATH and have not +# given the NO_CMAKE_PATH option +unset(CMAKE_PREFIX_PATH) +unset(ENV{CMAKE_PREFIX_PATH}) +pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET cmakeinternalfakepackage1) +if (TARGET PkgConfig::FakePackage1) + message(FATAL_ERROR "Have import target for fake package 1 with no path prefix") +endif() + +set(CMAKE_PREFIX_PATH ${fakePkgDir}) +pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET NO_CMAKE_PATH cmakeinternalfakepackage1) +if (TARGET PkgConfig::FakePackage1) + message(FATAL_ERROR "Have import target for fake package 1 with ignored cmake path") +endif() + +pkg_check_modules(FakePackage1 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage1) +if (NOT TARGET PkgConfig::FakePackage1) + message(FATAL_ERROR "No import target for fake package 1 with prefix path") +endif() + +# And now do the same for the NO_CMAKE_ENVIRONMENT_PATH - ENV{CMAKE_PREFIX_PATH} +# combination +unset(CMAKE_PREFIX_PATH) +unset(ENV{CMAKE_PREFIX_PATH}) +pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET cmakeinternalfakepackage2) +if (TARGET PkgConfig::FakePackage2) + message(FATAL_ERROR "Have import target for fake package 2 with no path prefix") +endif() + +set(ENV{CMAKE_PREFIX_PATH} ${fakePkgDir}) +pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET NO_CMAKE_ENVIRONMENT_PATH cmakeinternalfakepackage2) +if (TARGET PkgConfig::FakePackage2) + message(FATAL_ERROR "Have import target for fake package 2 with ignored cmake path") +endif() + +pkg_check_modules(FakePackage2 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage2) +if (NOT TARGET PkgConfig::FakePackage2) + message(FATAL_ERROR "No import target for fake package 2 with prefix path") +endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindPkgConfig.cmake | 10 ++-- .../FindPkgConfig_IMPORTED_TARGET.cmake | 61 ++++++++++++++++++++ 2 files changed, 66 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 23 00:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 23 Dec 2017 00:05:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-686-g89ed729 Message-ID: <20171223050508.4C104FCF26@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 89ed729af150b7850976843475bc1f3058eea86d (commit) from 4309ed25eee874ee73a715897550e2ea18631f41 (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=89ed729af150b7850976843475bc1f3058eea86d commit 89ed729af150b7850976843475bc1f3058eea86d Author: Kitware Robot AuthorDate: Sat Dec 23 00:01:14 2017 -0500 Commit: Kitware Robot CommitDate: Sat Dec 23 00:01:14 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b7e2d42..ebea228 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 10) -set(CMake_VERSION_PATCH 20171222) +set(CMake_VERSION_PATCH 20171223) #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 Sat Dec 23 08:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 23 Dec 2017 08:25:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-690-g0d22a23 Message-ID: <20171223132506.5A4B1102D25@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 0d22a23fd2382320907d8d3b97d8784281c40681 (commit) via 31d59ff3b104f012d5eca9e15c1558e2c67ef495 (commit) via 31c6b9adbff0fd7113ce4b97bc4ad9514615deb8 (commit) via 05af537ecc6b89af5f0bb8051b63d08fb105e36b (commit) from 89ed729af150b7850976843475bc1f3058eea86d (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=0d22a23fd2382320907d8d3b97d8784281c40681 commit 0d22a23fd2382320907d8d3b97d8784281c40681 Merge: 89ed729 31d59ff Author: Brad King AuthorDate: Sat Dec 23 13:18:52 2017 +0000 Commit: Kitware Robot CommitDate: Sat Dec 23 08:19:47 2017 -0500 Merge topic 'self-c++17' 31d59ff3 Compile CMake as C++17 if supported by the compiler 31c6b9ad Generalize check for C++14 constructs 05af537e cmGlobalNinjaGenerator: Avoid using deprecated std::ptr_fun Acked-by: Kitware Robot Acked-by: Pavel Solodovnikov Merge-request: !1614 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31d59ff3b104f012d5eca9e15c1558e2c67ef495 commit 31d59ff3b104f012d5eca9e15c1558e2c67ef495 Author: Brad King AuthorDate: Wed Dec 6 11:06:12 2017 -0500 Commit: Brad King CommitDate: Fri Dec 22 09:05:54 2017 -0500 Compile CMake as C++17 if supported by the compiler Add a check that a simple source file can compile as C++17 that uses some of the features we need. Do this only when hosted by CMake 3.8 or above because those versions are aware of C++17. Check for unordered_map as we do in bootstrap since commit 375eca7881 (bootstrap: Check support for unordered_map from compiler mode, 2017-11-30). Also maintain the existing C++14 cstdio check. diff --git a/CMakeLists.txt b/CMakeLists.txt index 945ae8d..e4d2a9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,11 +64,20 @@ if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD) if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14) set(CMAKE_CXX_STANDARD 98) else() - include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_check.cmake) - if(NOT CMake_CXX14_BROKEN) - set(CMAKE_CXX_STANDARD 14) + if(NOT CMAKE_VERSION VERSION_LESS 3.8) + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx17_check.cmake) else() - set(CMAKE_CXX_STANDARD 11) + set(CMake_CXX17_BROKEN 1) + endif() + if(NOT CMake_CXX17_BROKEN) + set(CMAKE_CXX_STANDARD 17) + else() + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_check.cmake) + if(NOT CMake_CXX14_BROKEN) + set(CMAKE_CXX_STANDARD 14) + else() + set(CMAKE_CXX_STANDARD 11) + endif() endif() endif() endif() diff --git a/Source/Checks/cm_cxx17_check.cmake b/Source/Checks/cm_cxx17_check.cmake new file mode 100644 index 0000000..83d3971 --- /dev/null +++ b/Source/Checks/cm_cxx17_check.cmake @@ -0,0 +1,36 @@ +set(CMake_CXX17_BROKEN 0) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + if(NOT CMAKE_CXX17_STANDARD_COMPILE_OPTION) + set(CMake_CXX17_WORKS 0) + endif() + if(NOT DEFINED CMake_CXX17_WORKS) + message(STATUS "Checking if compiler supports needed C++17 constructs") + try_compile(CMake_CXX17_WORKS + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_LIST_DIR}/cm_cxx17_check.cpp + CMAKE_FLAGS -DCMAKE_CXX_STANDARD=17 + OUTPUT_VARIABLE OUTPUT + ) + if(CMake_CXX17_WORKS AND "${OUTPUT}" MATCHES "error: no member named.*gets.*in the global namespace") + set_property(CACHE CMake_CXX17_WORKS PROPERTY VALUE 0) + endif() + if(CMake_CXX17_WORKS) + message(STATUS "Checking if compiler supports needed C++17 constructs - yes") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if compiler supports needed C++17 constructs passed with the following output:\n" + "${OUTPUT}\n" + "\n" + ) + else() + message(STATUS "Checking if compiler supports needed C++17 constructs - no") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if compiler supports needed C++17 constructs failed with the following output:\n" + "${OUTPUT}\n" + "\n" + ) + endif() + endif() + if(NOT CMake_CXX17_WORKS) + set(CMake_CXX17_BROKEN 1) + endif() +endif() diff --git a/Source/Checks/cm_cxx17_check.cpp b/Source/Checks/cm_cxx17_check.cpp new file mode 100644 index 0000000..2cbf1d5 --- /dev/null +++ b/Source/Checks/cm_cxx17_check.cpp @@ -0,0 +1,7 @@ +#include +#include + +int main() +{ + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31c6b9adbff0fd7113ce4b97bc4ad9514615deb8 commit 31c6b9adbff0fd7113ce4b97bc4ad9514615deb8 Author: Brad King AuthorDate: Wed Dec 6 10:53:10 2017 -0500 Commit: Brad King CommitDate: Fri Dec 22 09:05:54 2017 -0500 Generalize check for C++14 constructs The check for C++14 and cstdio is a special case of the more general problem of checking that the compiler's C++14 mode supports everything we need. Rename the checks accordingly. diff --git a/CMakeLists.txt b/CMakeLists.txt index ebeca22..945ae8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,8 +64,8 @@ if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD) if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14) set(CMAKE_CXX_STANDARD 98) else() - include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake) - if(NOT CMake_CXX14_CSTDIO_BROKEN) + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_check.cmake) + if(NOT CMake_CXX14_BROKEN) set(CMAKE_CXX_STANDARD 14) else() set(CMAKE_CXX_STANDARD 11) diff --git a/Source/Checks/cm_cxx14_check.cmake b/Source/Checks/cm_cxx14_check.cmake new file mode 100644 index 0000000..a78ba35 --- /dev/null +++ b/Source/Checks/cm_cxx14_check.cmake @@ -0,0 +1,36 @@ +set(CMake_CXX14_BROKEN 0) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + if(NOT CMAKE_CXX14_STANDARD_COMPILE_OPTION) + set(CMake_CXX14_WORKS 0) + endif() + if(NOT DEFINED CMake_CXX14_WORKS) + message(STATUS "Checking if compiler supports needed C++14 constructs") + try_compile(CMake_CXX14_WORKS + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_LIST_DIR}/cm_cxx14_check.cpp + CMAKE_FLAGS -DCMAKE_CXX_STANDARD=14 + OUTPUT_VARIABLE OUTPUT + ) + if(CMake_CXX14_WORKS AND "${OUTPUT}" MATCHES "error: no member named.*gets.*in the global namespace") + set_property(CACHE CMake_CXX14_WORKS PROPERTY VALUE 0) + endif() + if(CMake_CXX14_WORKS) + message(STATUS "Checking if compiler supports needed C++14 constructs - yes") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if compiler supports needed C++14 constructs passed with the following output:\n" + "${OUTPUT}\n" + "\n" + ) + else() + message(STATUS "Checking if compiler supports needed C++14 constructs - no") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if compiler supports needed C++14 constructs failed with the following output:\n" + "${OUTPUT}\n" + "\n" + ) + endif() + endif() + if(NOT CMake_CXX14_WORKS) + set(CMake_CXX14_BROKEN 1) + endif() +endif() diff --git a/Source/Checks/cm_cxx14_cstdio.cpp b/Source/Checks/cm_cxx14_check.cpp similarity index 100% rename from Source/Checks/cm_cxx14_cstdio.cpp rename to Source/Checks/cm_cxx14_check.cpp diff --git a/Source/Checks/cm_cxx14_cstdio.cmake b/Source/Checks/cm_cxx14_cstdio.cmake deleted file mode 100644 index 73f7e2e..0000000 --- a/Source/Checks/cm_cxx14_cstdio.cmake +++ /dev/null @@ -1,33 +0,0 @@ -set(CMake_CXX14_CSTDIO_BROKEN 0) -if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND CMAKE_CXX14_STANDARD_COMPILE_OPTION) - if(NOT DEFINED CMake_CXX14_CSTDIO_WORKS) - message(STATUS "Checking if compiler supports C++14 cstdio") - try_compile(CMake_CXX14_CSTDIO_WORKS - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_LIST_DIR}/cm_cxx14_cstdio.cpp - CMAKE_FLAGS -DCMAKE_CXX_STANDARD=14 - OUTPUT_VARIABLE OUTPUT - ) - if(CMake_CXX14_CSTDIO_WORKS AND "${OUTPUT}" MATCHES "error: no member named.*gets.*in the global namespace") - set_property(CACHE CMake_CXX14_CSTDIO_WORKS PROPERTY VALUE 0) - endif() - if(CMake_CXX14_CSTDIO_WORKS) - message(STATUS "Checking if compiler supports C++14 cstdio - yes") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if compiler supports C++14 cstdio passed with the following output:\n" - "${OUTPUT}\n" - "\n" - ) - else() - message(STATUS "Checking if compiler supports C++14 cstdio - no") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if compiler supports C++14 cstdio failed with the following output:\n" - "${OUTPUT}\n" - "\n" - ) - endif() - endif() - if(NOT CMake_CXX14_CSTDIO_WORKS) - set(CMake_CXX14_CSTDIO_BROKEN 1) - endif() -endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05af537ecc6b89af5f0bb8051b63d08fb105e36b commit 05af537ecc6b89af5f0bb8051b63d08fb105e36b Author: Brad King AuthorDate: Thu Dec 7 09:33:43 2017 -0500 Commit: Brad King CommitDate: Thu Dec 21 08:05:23 2017 -0500 cmGlobalNinjaGenerator: Avoid using deprecated std::ptr_fun It was deprecated by C++11 and removed by C++17. Use a C++11 lambda. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index d5531cb..4f546bb 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -8,7 +8,6 @@ #include "cmsys/FStream.hxx" #include #include -#include #include #include // IWYU pragma: keep #include @@ -114,7 +113,7 @@ std::string cmGlobalNinjaGenerator::EncodeIdent(const std::string& ident, std::ostream& vars) { if (std::find_if(ident.begin(), ident.end(), - std::not1(std::ptr_fun(IsIdentChar))) != ident.end()) { + [](char c) { return !IsIdentChar(c); }) != ident.end()) { static unsigned VarNum = 0; std::ostringstream names; names << "ident" << VarNum++; ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 17 ++++++--- Source/Checks/cm_cxx14_check.cmake | 36 ++++++++++++++++++++ .../{cm_cxx14_cstdio.cpp => cm_cxx14_check.cpp} | 0 Source/Checks/cm_cxx14_cstdio.cmake | 33 ------------------ Source/Checks/cm_cxx17_check.cmake | 36 ++++++++++++++++++++ .../{cm_cxx14_cstdio.cpp => cm_cxx17_check.cpp} | 2 ++ Source/cmGlobalNinjaGenerator.cxx | 3 +- 7 files changed, 88 insertions(+), 39 deletions(-) create mode 100644 Source/Checks/cm_cxx14_check.cmake copy Source/Checks/{cm_cxx14_cstdio.cpp => cm_cxx14_check.cpp} (100%) delete mode 100644 Source/Checks/cm_cxx14_cstdio.cmake create mode 100644 Source/Checks/cm_cxx17_check.cmake rename Source/Checks/{cm_cxx14_cstdio.cpp => cm_cxx17_check.cpp} (63%) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 24 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 24 Dec 2017 00:05:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-691-g40dea7e Message-ID: <20171224050504.E3D11102CC4@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 40dea7e4b2e1c4518337bba284a233bf6f788a1a (commit) from 0d22a23fd2382320907d8d3b97d8784281c40681 (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=40dea7e4b2e1c4518337bba284a233bf6f788a1a commit 40dea7e4b2e1c4518337bba284a233bf6f788a1a Author: Kitware Robot AuthorDate: Sun Dec 24 00:01:09 2017 -0500 Commit: Kitware Robot CommitDate: Sun Dec 24 00:01:09 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ebea228..abf056a 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 10) -set(CMake_VERSION_PATCH 20171223) +set(CMake_VERSION_PATCH 20171224) #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 Dec 25 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 25 Dec 2017 00:05:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-692-g63367d2 Message-ID: <20171225050507.27AE0FE085@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 63367d2840a98e59562094c940dc746bdc7b72b2 (commit) from 40dea7e4b2e1c4518337bba284a233bf6f788a1a (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=63367d2840a98e59562094c940dc746bdc7b72b2 commit 63367d2840a98e59562094c940dc746bdc7b72b2 Author: Kitware Robot AuthorDate: Mon Dec 25 00:01:09 2017 -0500 Commit: Kitware Robot CommitDate: Mon Dec 25 00:01:09 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index abf056a..417d944 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 10) -set(CMake_VERSION_PATCH 20171224) +set(CMake_VERSION_PATCH 20171225) #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 Dec 26 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 26 Dec 2017 00:05:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-693-g77f6fdf Message-ID: <20171226050506.EEB9A103030@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 77f6fdfc2f11d07dd44ad9fd38a2d6bc89b3abc1 (commit) from 63367d2840a98e59562094c940dc746bdc7b72b2 (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=77f6fdfc2f11d07dd44ad9fd38a2d6bc89b3abc1 commit 77f6fdfc2f11d07dd44ad9fd38a2d6bc89b3abc1 Author: Kitware Robot AuthorDate: Tue Dec 26 00:01:05 2017 -0500 Commit: Kitware Robot CommitDate: Tue Dec 26 00:01:05 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 417d944..99378eb 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 10) -set(CMake_VERSION_PATCH 20171225) +set(CMake_VERSION_PATCH 20171226) #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 Dec 27 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 27 Dec 2017 00:05:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-694-g497f4bb Message-ID: <20171227050506.16FFE10323E@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 497f4bb941a84bacfca2392759de6cb8e23b0684 (commit) from 77f6fdfc2f11d07dd44ad9fd38a2d6bc89b3abc1 (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=497f4bb941a84bacfca2392759de6cb8e23b0684 commit 497f4bb941a84bacfca2392759de6cb8e23b0684 Author: Kitware Robot AuthorDate: Wed Dec 27 00:01:13 2017 -0500 Commit: Kitware Robot CommitDate: Wed Dec 27 00:01:13 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 99378eb..ee1275f 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 10) -set(CMake_VERSION_PATCH 20171226) +set(CMake_VERSION_PATCH 20171227) #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 Dec 28 00:05:17 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 28 Dec 2017 00:05:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-695-gcd2ed4b Message-ID: <20171228050518.2AEB2103113@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 cd2ed4b87adf83e406a1c02c169d50e29743879c (commit) from 497f4bb941a84bacfca2392759de6cb8e23b0684 (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=cd2ed4b87adf83e406a1c02c169d50e29743879c commit cd2ed4b87adf83e406a1c02c169d50e29743879c Author: Kitware Robot AuthorDate: Thu Dec 28 00:01:07 2017 -0500 Commit: Kitware Robot CommitDate: Thu Dec 28 00:01:07 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ee1275f..582874a 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 10) -set(CMake_VERSION_PATCH 20171227) +set(CMake_VERSION_PATCH 20171228) #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 Dec 29 00:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 29 Dec 2017 00:05:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-696-g3e1f5b11 Message-ID: <20171229050508.36167103008@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 3e1f5b11e0cfaeb28d1bc4de36e5856344ccb87c (commit) from cd2ed4b87adf83e406a1c02c169d50e29743879c (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=3e1f5b11e0cfaeb28d1bc4de36e5856344ccb87c commit 3e1f5b11e0cfaeb28d1bc4de36e5856344ccb87c Author: Kitware Robot AuthorDate: Fri Dec 29 00:01:11 2017 -0500 Commit: Kitware Robot CommitDate: Fri Dec 29 00:01:11 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 582874a..fe6a15c 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 10) -set(CMake_VERSION_PATCH 20171228) +set(CMake_VERSION_PATCH 20171229) #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 Sat Dec 30 00:05:10 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 30 Dec 2017 00:05:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-697-gf408a60 Message-ID: <20171230050510.30DA8103001@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 f408a604437b286f5c98420c119ac4f7370e3a49 (commit) from 3e1f5b11e0cfaeb28d1bc4de36e5856344ccb87c (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=f408a604437b286f5c98420c119ac4f7370e3a49 commit f408a604437b286f5c98420c119ac4f7370e3a49 Author: Kitware Robot AuthorDate: Sat Dec 30 00:01:08 2017 -0500 Commit: Kitware Robot CommitDate: Sat Dec 30 00:01:08 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index fe6a15c..35d1ed7 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 10) -set(CMake_VERSION_PATCH 20171229) +set(CMake_VERSION_PATCH 20171230) #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 Dec 31 00:05:10 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 31 Dec 2017 00:05:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.10.1-698-g6eaa984 Message-ID: <20171231050510.5DAF410323E@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 6eaa984e3aabd93da5b7a6c985308c2debef2aa6 (commit) from f408a604437b286f5c98420c119ac4f7370e3a49 (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=6eaa984e3aabd93da5b7a6c985308c2debef2aa6 commit 6eaa984e3aabd93da5b7a6c985308c2debef2aa6 Author: Kitware Robot AuthorDate: Sun Dec 31 00:01:09 2017 -0500 Commit: Kitware Robot CommitDate: Sun Dec 31 00:01:09 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 35d1ed7..2f7b315 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 10) -set(CMake_VERSION_PATCH 20171230) +set(CMake_VERSION_PATCH 20171231) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake