From kwrobot at kitware.com Thu Sep 1 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 1 Sep 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-823-gd5bdcee Message-ID: <20160901040107.25E65F59E9@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 d5bdcee737f428b09c6b390655e0ac485cd0b21a (commit) from 901a06021e169bdfa19633370192870385868a7d (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=d5bdcee737f428b09c6b390655e0ac485cd0b21a commit d5bdcee737f428b09c6b390655e0ac485cd0b21a Author: Kitware Robot AuthorDate: Thu Sep 1 00:01:03 2016 -0400 Commit: Kitware Robot CommitDate: Thu Sep 1 00:01:03 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4e86949..23c2ce3 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 6) -set(CMake_VERSION_PATCH 20160831) +set(CMake_VERSION_PATCH 20160901) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 10:39:25 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 10:39:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-825-g06b7789 Message-ID: <20160901143930.68D64B0201@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 06b7789d4dfcfeedce6fa9a163e8f8d66b188c32 (commit) via 3bd55dba7c889776bd094c6c29045c567b9000e2 (commit) from d5bdcee737f428b09c6b390655e0ac485cd0b21a (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=06b7789d4dfcfeedce6fa9a163e8f8d66b188c32 commit 06b7789d4dfcfeedce6fa9a163e8f8d66b188c32 Merge: d5bdcee 3bd55db Author: Brad King AuthorDate: Thu Sep 1 10:39:19 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 10:39:19 2016 -0400 Merge topic 'install-directory-genex-fix' 3bd55dba install: Fix evaluation of leading generator expressions in DIRECTORY ----------------------------------------------------------------------- Summary of changes: Source/cmInstallCommand.cxx | 3 ++- Source/cmInstallDirectoryGenerator.cxx | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 10:39:35 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 10:39:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-828-gd7ca93f Message-ID: <20160901143942.02224B08D3@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 d7ca93f6194fa2b848945df630222b75b404b15a (commit) via 900ee0b80077b38b81e5da47cd79c38f044c3a03 (commit) via 6442709bae306903084e0bd710b4cea41d0b2500 (commit) from 06b7789d4dfcfeedce6fa9a163e8f8d66b188c32 (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=d7ca93f6194fa2b848945df630222b75b404b15a commit d7ca93f6194fa2b848945df630222b75b404b15a Merge: 06b7789 900ee0b Author: Brad King AuthorDate: Thu Sep 1 10:39:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 10:39:31 2016 -0400 Merge topic 'FindCUDA-fixes' 900ee0b8 FindCUDA: Allow cuda_compile* macros to be called more than once per directory 6442709b FindCUDA: Fix for broken cuda_compile* commands. ----------------------------------------------------------------------- Summary of changes: Modules/FindCUDA.cmake | 54 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 10:39:46 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 10:39:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-830-g0c46750 Message-ID: <20160901143946.F1685F34D9@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 0c46750d2c4cee401f1cda047a71b0e349678077 (commit) via fc695a776b5a4d61c3bfd3253ff9d40c3f30f6b9 (commit) from d7ca93f6194fa2b848945df630222b75b404b15a (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=0c46750d2c4cee401f1cda047a71b0e349678077 commit 0c46750d2c4cee401f1cda047a71b0e349678077 Merge: d7ca93f fc695a7 Author: Brad King AuthorDate: Thu Sep 1 10:39:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 10:39:43 2016 -0400 Merge topic 'FindEXPAT-use-PkgConfig' fc695a77 FindEXPAT: use hints from PkgConfig ----------------------------------------------------------------------- Summary of changes: Modules/FindEXPAT.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 10:40:14 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 10:40:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1673-gb93f03c Message-ID: <20160901144016.7F9FCF1A3A@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, next has been updated via b93f03c8e15a8a2dde9cdfb9d239d304adbaee8d (commit) via 0c46750d2c4cee401f1cda047a71b0e349678077 (commit) via d7ca93f6194fa2b848945df630222b75b404b15a (commit) via 06b7789d4dfcfeedce6fa9a163e8f8d66b188c32 (commit) via d5bdcee737f428b09c6b390655e0ac485cd0b21a (commit) from d9fa27a6b1a4088095d8f20da8ca0542a857e989 (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=b93f03c8e15a8a2dde9cdfb9d239d304adbaee8d commit b93f03c8e15a8a2dde9cdfb9d239d304adbaee8d Merge: d9fa27a 0c46750 Author: Brad King AuthorDate: Thu Sep 1 10:40:05 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 10:40:05 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 10:58:09 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 10:58:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1676-g53f189c Message-ID: <20160901145812.248AEF57AB@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, next has been updated via 53f189c917de7b6657524f08e18502f445693712 (commit) via 46de2f5b1cf1faa3bc18659b592306753c61f66c (commit) via 67dba415e6f3a9d45d84c7790c4447625f917999 (commit) from b93f03c8e15a8a2dde9cdfb9d239d304adbaee8d (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=53f189c917de7b6657524f08e18502f445693712 commit 53f189c917de7b6657524f08e18502f445693712 Merge: b93f03c 46de2f5 Author: Brad King AuthorDate: Thu Sep 1 10:58:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 10:58:07 2016 -0400 Merge topic 'autogen-base32' into next 46de2f5b cmFilePathUuid: Use Base32 string instead of Base64 string 67dba415 Add cmBase32Encoder class https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46de2f5b1cf1faa3bc18659b592306753c61f66c commit 46de2f5b1cf1faa3bc18659b592306753c61f66c Author: Sebastian Holtermann AuthorDate: Thu Sep 1 13:17:58 2016 +0200 Commit: Brad King CommitDate: Thu Sep 1 10:51:15 2016 -0400 cmFilePathUuid: Use Base32 string instead of Base64 string This produces files that will not collide on a case-insensitive filesystem. It also avoids the need for special character substitutions. diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index 2839b63..f99646c 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -12,10 +12,10 @@ #include "cmFilePathUuid.h" +#include "cmBase32.h" #include "cmCryptoHash.h" #include "cmMakefile.h" #include "cmSystemTools.h" -#include "cmsys/Base64.h" cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile) { @@ -111,22 +111,16 @@ std::string cmFilePathUuid::GetChecksumString( const std::string& sourceFilename, const std::string& sourceRelPath, const std::string& sourceRelSeed) { - std::string checksumBase64; + std::string checksumBase32; { // Calculate the file ( seed + relative path + name ) checksum std::vector hashBytes = cmCryptoHash::New("SHA256")->ByteHashString( (sourceRelSeed + sourceRelPath + sourceFilename).c_str()); - // Convert hash bytes to Base64 text string - std::vector base64Bytes(hashBytes.size() * 2, 0); - cmsysBase64_Encode(&hashBytes[0], hashBytes.size(), &base64Bytes[0], 0); - checksumBase64 = reinterpret_cast(&base64Bytes[0]); + + checksumBase32 = + cmBase32Encoder().encodeString(&hashBytes[0], hashBytes.size(), false); } - // Base64 allows '/', '+' and '=' characters which are problematic - // when used in file names. Replace them with safer alternatives. - std::replace(checksumBase64.begin(), checksumBase64.end(), '/', '-'); - std::replace(checksumBase64.begin(), checksumBase64.end(), '+', '_'); - std::replace(checksumBase64.begin(), checksumBase64.end(), '=', '_'); - return checksumBase64; + return checksumBase32; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67dba415e6f3a9d45d84c7790c4447625f917999 commit 67dba415e6f3a9d45d84c7790c4447625f917999 Author: Sebastian Holtermann AuthorDate: Thu Sep 1 13:08:18 2016 +0200 Commit: Brad King CommitDate: Thu Sep 1 10:51:15 2016 -0400 Add cmBase32Encoder class diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8c74f60..6c3ebf5 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -166,6 +166,7 @@ endif() # set(SRCS cmArchiveWrite.cxx + cmBase32.cxx cmBootstrapCommands1.cxx cmBootstrapCommands2.cxx cmCacheManager.cxx diff --git a/Source/cmBase32.cxx b/Source/cmBase32.cxx new file mode 100644 index 0000000..ce5c99b --- /dev/null +++ b/Source/cmBase32.cxx @@ -0,0 +1,108 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2016 Sebastian Holtermann + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmBase32.h" + +// -- Static functions + +static const unsigned char Base32EncodeTable[33] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; + +inline unsigned char Base32EncodeChar(int schar) +{ + return Base32EncodeTable[schar]; +} + +void Base32Encode5(const unsigned char src[5], char dst[8]) +{ + // [0]:5 bits + dst[0] = Base32EncodeChar((src[0] >> 3) & 0x1F); + // [0]:3 bits + [1]:2 bits + dst[1] = Base32EncodeChar(((src[0] << 2) & 0x1C) + ((src[1] >> 6) & 0x03)); + // [1]:5 bits + dst[2] = Base32EncodeChar((src[1] >> 1) & 0x1F); + // [1]:1 bit + [2]:4 bits + dst[3] = Base32EncodeChar(((src[1] << 4) & 0x10) + ((src[2] >> 4) & 0x0F)); + // [2]:4 bits + [3]:1 bit + dst[4] = Base32EncodeChar(((src[2] << 1) & 0x1E) + ((src[3] >> 7) & 0x01)); + // [3]:5 bits + dst[5] = Base32EncodeChar((src[3] >> 2) & 0x1F); + // [3]:2 bits + [4]:3 bit + dst[6] = Base32EncodeChar(((src[3] << 3) & 0x18) + ((src[4] >> 5) & 0x07)); + // [4]:5 bits + dst[7] = Base32EncodeChar((src[4] << 0) & 0x1F); +} + +// -- Class methods + +cmBase32Encoder::cmBase32Encoder() +{ +} + +cmBase32Encoder::~cmBase32Encoder() +{ +} + +std::string cmBase32Encoder::encodeString(const unsigned char* input, + size_t len, bool padding) +{ + std::string res; + + static const size_t blockSize = 5; + static const size_t bufferSize = 8; + char buffer[bufferSize]; + + const unsigned char* end = input + len; + while ((input + blockSize) <= end) { + Base32Encode5(input, buffer); + res.append(buffer, bufferSize); + input += blockSize; + } + + size_t remain(end - input); + if (remain != 0) { + // Temporary source buffer filled up with 0s + unsigned char extended[blockSize]; + for (size_t ii = 0; ii != remain; ++ii) { + extended[ii] = input[ii]; + } + for (size_t ii = remain; ii != blockSize; ++ii) { + extended[ii] = 0; + } + + Base32Encode5(extended, buffer); + size_t numPad(0); + switch (remain) { + case 1: + numPad = 6; + break; + case 2: + numPad = 4; + break; + case 3: + numPad = 3; + break; + case 4: + numPad = 1; + break; + default: + break; + } + res.append(buffer, bufferSize - numPad); + if (padding) { + for (size_t ii = 0; ii != numPad; ++ii) { + res.push_back(paddingChar); + } + } + } + + return res; +} diff --git a/Source/cmBase32.h b/Source/cmBase32.h new file mode 100644 index 0000000..38c955b --- /dev/null +++ b/Source/cmBase32.h @@ -0,0 +1,41 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2016 Sebastian Holtermann + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmBase32_h +#define cmBase32_h + +#include // IWYU pragma: keep + +#include + +/** \class cmBase32Encoder + * \brief Encodes a byte sequence to a Base32 byte sequence according to + * RFC4648 + * + */ +class cmBase32Encoder +{ +public: + static const char paddingChar = '='; + +public: + cmBase32Encoder(); + ~cmBase32Encoder(); + + // Encodes the given input byte sequence into a string + // @arg input Input data pointer + // @arg len Input data size + // @arg padding Flag to append "=" on demand + std::string encodeString(const unsigned char* input, size_t len, + bool padding = true); +}; + +#endif ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 1 + Source/cmBase32.cxx | 108 +++++++++++++++++++++++++++++++++++++++++++++ Source/cmBase32.h | 41 +++++++++++++++++ Source/cmFilePathUuid.cxx | 18 +++----- 4 files changed, 156 insertions(+), 12 deletions(-) create mode 100644 Source/cmBase32.cxx create mode 100644 Source/cmBase32.h hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 11:19:01 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 11:19:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1679-g3ebb968 Message-ID: <20160901151903.4EF7AF5216@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, next has been updated via 3ebb968dbc9ddd3fbadde1f251aaf2c3165a4512 (commit) via fee8fafd78db49852ee44a1d8eb0a441cd52ccd1 (commit) via 3825a564930ffe09fd681632a905ab9c91c41d98 (commit) from 53f189c917de7b6657524f08e18502f445693712 (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=3ebb968dbc9ddd3fbadde1f251aaf2c3165a4512 commit 3ebb968dbc9ddd3fbadde1f251aaf2c3165a4512 Merge: 53f189c fee8faf Author: Brad King AuthorDate: Thu Sep 1 11:18:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 11:18:55 2016 -0400 Merge topic 'libuv-scanbuild-fixes' into next fee8fafd CTestCustom: Suppress scan-build warning in libuv 3825a564 libuv: Simplify variable initializations to satisfy Clang scan-build https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fee8fafd78db49852ee44a1d8eb0a441cd52ccd1 commit fee8fafd78db49852ee44a1d8eb0a441cd52ccd1 Author: Brad King AuthorDate: Thu Sep 1 11:14:19 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 11:16:30 2016 -0400 CTestCustom: Suppress scan-build warning in libuv Clang scan-build warns in some expansions of RB_GENERATE_STATIC that it has a "Dereference of null pointer". Simply suppress it since this is third-party code anyway. diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index a39049b..4a540d2 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -82,6 +82,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "cm_sha2.*warning: Value stored to.*is never read" "testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.." "liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined" + "libuv/src/.*:[0-9]+:[0-9]+: warning: Dereference of null pointer" ) if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3825a564930ffe09fd681632a905ab9c91c41d98 commit 3825a564930ffe09fd681632a905ab9c91c41d98 Author: Brad King AuthorDate: Thu Sep 1 11:09:25 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 11:10:18 2016 -0400 libuv: Simplify variable initializations to satisfy Clang scan-build The Clang scan-build tool warns about assignments whose values are never used, so initialize local variables at declaration instead. diff --git a/Utilities/cmlibuv/src/unix/pipe.c b/Utilities/cmlibuv/src/unix/pipe.c index b73994c..80f5e6f 100644 --- a/Utilities/cmlibuv/src/unix/pipe.c +++ b/Utilities/cmlibuv/src/unix/pipe.c @@ -42,13 +42,10 @@ int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) { int uv_pipe_bind(uv_pipe_t* handle, const char* name) { struct sockaddr_un saddr; - const char* pipe_fname; - int sockfd; + const char* pipe_fname = NULL; + int sockfd = -1; int err; - pipe_fname = NULL; - sockfd = -1; - /* Already bound? */ if (uv__stream_fd(handle) >= 0) return -EINVAL; diff --git a/Utilities/cmlibuv/src/unix/tty.c b/Utilities/cmlibuv/src/unix/tty.c index b2d37f4..ae1018f 100644 --- a/Utilities/cmlibuv/src/unix/tty.c +++ b/Utilities/cmlibuv/src/unix/tty.c @@ -58,8 +58,8 @@ static int uv__tty_is_slave(const int fd) { int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) { uv_handle_type type; - int flags; - int newfd; + int flags = 0; + int newfd = -1; int r; int saved_flags; char path[256]; @@ -72,9 +72,6 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) { if (type == UV_FILE || type == UV_UNKNOWN_HANDLE) return -EINVAL; - flags = 0; - newfd = -1; - /* Reopen the file descriptor when it refers to a tty. This lets us put the * tty in non-blocking mode without affecting other processes that share it * with us. ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 1 + Utilities/cmlibuv/src/unix/pipe.c | 7 ++----- Utilities/cmlibuv/src/unix/tty.c | 7 ++----- 3 files changed, 5 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 11:23:28 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 11:23:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1681-g24e158b Message-ID: <20160901152329.2E3CFF5850@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, next has been updated via 24e158baed042535c40ec9d19edf7b5326269861 (commit) via 24658dbbe973d747c9ca85471e5391fd830d3fcb (commit) from 3ebb968dbc9ddd3fbadde1f251aaf2c3165a4512 (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=24e158baed042535c40ec9d19edf7b5326269861 commit 24e158baed042535c40ec9d19edf7b5326269861 Merge: 3ebb968 24658db Author: Brad King AuthorDate: Thu Sep 1 11:23:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 11:23:27 2016 -0400 Merge topic 'autogen-base32' into next 24658dbb fixup! Add cmBase32Encoder class https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24658dbbe973d747c9ca85471e5391fd830d3fcb commit 24658dbbe973d747c9ca85471e5391fd830d3fcb Author: Brad King AuthorDate: Thu Sep 1 11:22:53 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 11:22:53 2016 -0400 fixup! Add cmBase32Encoder class diff --git a/Source/cmBase32.h b/Source/cmBase32.h index 38c955b..66ff8ba 100644 --- a/Source/cmBase32.h +++ b/Source/cmBase32.h @@ -14,6 +14,7 @@ #include // IWYU pragma: keep +#include #include /** \class cmBase32Encoder ----------------------------------------------------------------------- Summary of changes: Source/cmBase32.h | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 14:53:17 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 14:53:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1683-gfc66613 Message-ID: <20160901185317.25BE4F5758@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, next has been updated via fc6661363956d97e4f726623f0b551bc4292cac5 (commit) via 9998774f2280999c559cdffe7473085c841c2d39 (commit) from 24e158baed042535c40ec9d19edf7b5326269861 (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=fc6661363956d97e4f726623f0b551bc4292cac5 commit fc6661363956d97e4f726623f0b551bc4292cac5 Merge: 24e158b 9998774 Author: Brad King AuthorDate: Thu Sep 1 14:53:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 14:53:16 2016 -0400 Merge topic 'vs14-debug-enum-older-toolsets' into next 9998774f VS: Fix VS 2015 .vcxproj debug setting for v80 toolset https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9998774f2280999c559cdffe7473085c841c2d39 commit 9998774f2280999c559cdffe7473085c841c2d39 Author: Brad King AuthorDate: Thu Sep 1 14:43:59 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 14:50:04 2016 -0400 VS: Fix VS 2015 .vcxproj debug setting for v80 toolset Closes: #16281 diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 11dc28c..7e17818 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2357,7 +2357,9 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( static_cast(this->GlobalGenerator); const char* toolset = gg->GetPlatformToolset(); if (toolset && - (toolset == kWINDOWS_7_1_SDK || cmHasLiteralPrefix(toolset, "v90") || + (toolset == kWINDOWS_7_1_SDK || /* clang-format please break here */ + cmHasLiteralPrefix(toolset, "v80") || + cmHasLiteralPrefix(toolset, "v90") || cmHasLiteralPrefix(toolset, "v100") || cmHasLiteralPrefix(toolset, "v110") || cmHasLiteralPrefix(toolset, "v120"))) { ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 15:06:42 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 15:06:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1685-ge30f686 Message-ID: <20160901190642.14CDFF5D1D@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, next has been updated via e30f686be781bdd2925b9b072d1426e53d21494d (commit) via 9fdc122bdbda2057f6b44c3122b3199e33ce8bc7 (commit) from fc6661363956d97e4f726623f0b551bc4292cac5 (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=e30f686be781bdd2925b9b072d1426e53d21494d commit e30f686be781bdd2925b9b072d1426e53d21494d Merge: fc66613 9fdc122 Author: Brad King AuthorDate: Thu Sep 1 15:06:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 15:06:41 2016 -0400 Merge topic 'extend_matlab_unit_test' into next 9fdc122b fixup! Extend matlab_add_unit_test to run arbitrary code for the test. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9fdc122bdbda2057f6b44c3122b3199e33ce8bc7 commit 9fdc122bdbda2057f6b44c3122b3199e33ce8bc7 Author: Brad King AuthorDate: Thu Sep 1 10:13:23 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 10:17:10 2016 -0400 fixup! Extend matlab_add_unit_test to run arbitrary code for the test. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index aaca953..4c787d7 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -784,29 +784,19 @@ function(matlab_add_unit_test) message(FATAL_ERROR "[MATLAB] The Matlab test name cannot be empty") endif() - # escape matlab commands so they can be passed to add_test - # and to cmake -P script. - - string(REPLACE "\"" "" custom_test_cmd_clean "${${prefix}_CUSTOM_TEST_COMMAND}") - string(REPLACE ";" "\\;" custom_test_cmd_clean "${custom_test_cmd_clean}") - string(REPLACE "\"" "" unittest_precmd_clean "${${prefix}_UNITTEST_PRECOMMAND}") - string(REPLACE ";" "\\;" unittest_precmd_clean "${unittest_precmd_clean}") - string(REPLACE " " "\ " unittest_precmd_clean "${unittest_precmd_clean}") - string(REPLACE ";" "\\;" additional_path_clean "${${prefix}_ADDITIONAL_PATH}") - add_test(NAME ${${prefix}_NAME} COMMAND ${CMAKE_COMMAND} - -Dtest_name=${${prefix}_NAME} - -Dadditional_paths=${additional_path_clean} - -Dtest_timeout=${${prefix}_TIMEOUT} - -Doutput_directory=${_matlab_temporary_folder} - -Dworking_directory=${${prefix}_WORKING_DIRECTORY} - -DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM} - -Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK} - -DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS} - -Dunittest_file_to_run=${${prefix}_UNITTEST_FILE} - -Dcustom_Matlab_test_command=${custom_test_cmd_clean} - -Dcmd_to_run_before_test=${unittest_precmd_clean} + "-Dtest_name=${${prefix}_NAME}" + "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}}" + "-Dtest_timeout=${${prefix}_TIMEOUT}" + "-Doutput_directory=${_matlab_temporary_folder}" + "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" + "-DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM}" + "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" + "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" + "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" + "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}}" + "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} ${${prefix}_UNPARSED_ARGUMENTS} diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index 5677ef6..1045be8 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -59,7 +59,7 @@ foreach(s IN LISTS additional_paths) endforeach() if(custom_Matlab_test_command) - set(unittest_to_run ${custom_Matlab_test_command}) + set(unittest_to_run "${custom_Matlab_test_command}") else() set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") endif() @@ -70,7 +70,8 @@ if(no_unittest_framework) endif() set(Matlab_SCRIPT_TO_RUN - "addpath(${concat_string}); ${cmd_to_run_before_test}; ${unittest_to_run}") + "addpath(${concat_string}); ${cmd_to_run_before_test}; ${unittest_to_run}" + ) if(NOT working_directory) set(working_directory "${output_directory}") ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 32 +++++++++++--------------------- Modules/MatlabTestsRedirect.cmake | 5 +++-- 2 files changed, 14 insertions(+), 23 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Thu Sep 1 15:16:20 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Thu, 1 Sep 2016 15:16:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1692-g635a4f5 Message-ID: <20160901191620.9B467F5216@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, next has been updated via 635a4f5a4fb965ab98cc60d068101ecb03d6b8d7 (commit) via 638b4a01bd13db022e54361de717e9b9e924bfb2 (commit) via 6f3d37eb3efbfdeb8c947604cacde7a3aacf2164 (commit) via e12a6f7e80e034970286d208fef20031d8052a19 (commit) via 521b38f8014025b4e5b3e3eeda4f7dd3cd88946b (commit) via 6bcb5de0c65497edab68a1cd3e3ebfde36e11910 (commit) via e19e1a85857ea93ea4aa2e0c68e14d5de8efa939 (commit) from e30f686be781bdd2925b9b072d1426e53d21494d (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=635a4f5a4fb965ab98cc60d068101ecb03d6b8d7 commit 635a4f5a4fb965ab98cc60d068101ecb03d6b8d7 Merge: e30f686 638b4a0 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 15:16:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 15:16:15 2016 -0400 Merge topic 'include-what-you-use' into next 638b4a01 Merge topic 'autogen-base32' into include-what-you-use 6f3d37eb fix a load of include-what-you-use violations e12a6f7e cmCTest: don't redefine cout and cerr 521b38f8 make sure to include cmConfigure.h before cmStandardIncludes.h 6bcb5de0 Tests/CMakeLib: include what you use e19e1a85 Tests/CMakeLib: use cmsys::ifstream https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=638b4a01bd13db022e54361de717e9b9e924bfb2 commit 638b4a01bd13db022e54361de717e9b9e924bfb2 Merge: 6f3d37e 24658db Author: Daniel Pfeifer AuthorDate: Thu Sep 1 21:05:47 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 1 21:05:47 2016 +0200 Merge topic 'autogen-base32' into include-what-you-use diff --cc Source/cmFilePathUuid.cxx index 865059d,f99646c..6202d6d --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@@ -15,12 -16,7 +16,10 @@@ #include "cmCryptoHash.h" #include "cmMakefile.h" #include "cmSystemTools.h" - #include "cm_auto_ptr.hxx" - #include "cmsys/Base64.h" +#include +#include + cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile) { initParentDirs(makefile->GetCurrentSourceDirectory(), https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f3d37eb3efbfdeb8c947604cacde7a3aacf2164 commit 6f3d37eb3efbfdeb8c947604cacde7a3aacf2164 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:59:28 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 1 20:59:28 2016 +0200 fix a load of include-what-you-use violations diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b4ddc3e..6523e3e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -9,52 +9,54 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCurl.h" // include before anything that includes windows.h - #include "cmCTest.h" #include "cmAlgorithms.h" -#include "cmCTestCommand.h" -#include "cmCTestStartCommand.h" -#include "cmDynamicLoader.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" -#include "cmState.h" -#include "cmVersionMacros.h" -#include "cmXMLWriter.h" -#include "cmake.h" -#include -#include -#include -#include - #include "cmCTestBuildAndTestHandler.h" #include "cmCTestBuildHandler.h" #include "cmCTestConfigureHandler.h" #include "cmCTestCoverageHandler.h" +#include "cmCTestGenericHandler.h" #include "cmCTestMemCheckHandler.h" #include "cmCTestScriptHandler.h" +#include "cmCTestStartCommand.h" #include "cmCTestSubmitHandler.h" #include "cmCTestTestHandler.h" #include "cmCTestUpdateHandler.h" #include "cmCTestUploadHandler.h" - +#include "cmCurl.h" +#include "cmDynamicLoader.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmVersion.h" +#include "cmVersionConfig.h" +#include "cmXMLWriter.h" +#include "cmake.h" +#include +#include +#include +#include +#include +#include #include #include -#include - +#include +#include #include -#include -#include +#include +#include +#include +#include #include - -#include - -#include -#include +#include +#include +#include +#include +#include #if defined(__BEOS__) || defined(__HAIKU__) #include /* disable_debugger() API. */ diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 9d661d4..a73cd83 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -15,18 +15,18 @@ #include -#include "cmStandardIncludes.h" - -#include "cmListFileCache.h" +#include +#include +#include +#include +#include #include +#include -class cmake; -class cmMakefile; class cmCTestGenericHandler; -class cmGeneratedFileStream; -class cmCTestCommand; -class cmCTestScriptHandler; class cmCTestStartCommand; +class cmGeneratedFileStream; +class cmMakefile; class cmXMLWriter; #define cmCTestLog(ctSelf, logType, msg) \ diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 68111a0..7fecc4d 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -11,12 +11,16 @@ ============================================================================*/ #include "cmCommandArgumentParserHelper.h" +#include "cmCommandArgumentLexer.h" #include "cmMakefile.h" -#include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" +#include "cmake.h" -#include "cmCommandArgumentLexer.h" +#include +#include +#include +#include int cmCommandArgument_yyparse(yyscan_t yyscanner); // diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index 1040ad3..6faf12b 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include #define YYSTYPE cmCommandArgumentParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index d7532b3..94f03e8 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -14,6 +14,7 @@ #include "cmAlgorithms.h" #include "cmOutputConverter.h" +#include "cmSystemTools.h" static std::string const keyAND = "AND"; static std::string const keyCOMMAND = "COMMAND"; diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index 8e2d87e..a3d3dd5 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -12,8 +12,10 @@ #include "cmCryptoHash.h" #include "cm_sha2.h" + #include #include +#include CM_AUTO_PTR cmCryptoHash::New(const char* algo) { diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index c51393d..0be2918 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -14,9 +14,9 @@ #include -#include "cmStandardIncludes.h" - #include +#include +#include /** * @brief Abstract base class for cryptographic hash generators diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index 5bc4f91..94d487e 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmCurl.h" -#include "cmSystemTools.h" +#include "cmThirdParty.h" // curl versions before 7.21.5 did not provide this error code #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505 diff --git a/Source/cmCurl.h b/Source/cmCurl.h index c3a2053..6434f50 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -14,9 +14,8 @@ #include -#include "cmStandardIncludes.h" - -#include "cm_curl.h" +#include +#include std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile = CM_NULLPTR); diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index eaa49b0..89a04d1 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -13,7 +13,7 @@ #include "cmMakefile.h" -#include +#include cmCustomCommand::cmCustomCommand() : Backtrace() diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 152b3b9..b855bb9 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -12,11 +12,15 @@ #ifndef cmCustomCommand_h #define cmCustomCommand_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep +#include "cmCustomCommandLines.h" #include "cmListFileCache.h" + +#include +#include +#include + class cmMakefile; /** \class cmCustomCommand diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 6165bcf..8b8579b 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -12,10 +12,17 @@ #include "cmCustomCommandGenerator.h" #include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" + +#include cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc, const std::string& config, diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index 66644d6..f4cd9fd 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -12,13 +12,14 @@ #ifndef cmCustomCommandGenerator_h #define cmCustomCommandGenerator_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include class cmCustomCommand; -class cmLocalGenerator; class cmGeneratorExpression; +class cmLocalGenerator; class cmCustomCommandGenerator { diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index e0fb59b..fecc488 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -12,6 +12,8 @@ #include "cmDefinitions.h" #include +#include +#include cmDefinitions::Def cmDefinitions::NoDef; diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index f22de79..d1423ec 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -14,20 +14,21 @@ #include -#include "cmStandardIncludes.h" - #include "cmLinkedTree.h" +#include +#include + #if defined(CMAKE_BUILD_WITH_CMAKE) #ifdef CMake_HAVE_CXX_UNORDERED_MAP #include #else #include "cmsys/hash_map.hxx" #endif +#else +#include #endif -#include - /** \class cmDefinitions * \brief Store a scope of variable definitions for CMake language. * diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index ce72eda..23ff3a4 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -16,8 +16,11 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" + #include +#include #include +#include cmDepends::cmDepends(cmLocalGenerator* lg, const char* targetDir) : CompileDirectory() diff --git a/Source/cmDepends.h b/Source/cmDepends.h index b9d47a6..5ed784d 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -14,7 +14,12 @@ #include -#include "cmStandardIncludes.h" +#include +#include +#include +#include +#include +#include class cmFileTimeComparison; class cmLocalGenerator; diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 928f7ec..fbbf42f 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -15,10 +15,11 @@ #include "cmFileTimeComparison.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSystemTools.h" -#include -#include // isspace +#include +#include #define INCLUDE_REGEX_LINE \ "^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])" diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index bde07b7..5606fb3 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -12,10 +12,19 @@ #ifndef cmDependsC_h #define cmDependsC_h +#include + #include "cmDepends.h" #include +#include +#include #include +#include +#include +#include + +class cmLocalGenerator; /** \class cmDependsC * \brief Dependency scanner for C and C++ object files. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 8c0acce..1eece98 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -11,14 +11,20 @@ ============================================================================*/ #include "cmDependsFortran.h" +#include "cmFortranParser.h" /* Interface to parser object. */ #include "cmGeneratedFileStream.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSystemTools.h" -#include "cmFortranParser.h" /* Interface to parser object. */ #include #include +#include +#include +#include +#include +#include // TODO: Test compiler for the case of the mod file. Some always // use lower case and some always use upper case. I do not know if any diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index f4385eb..b6de46f 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -12,10 +12,17 @@ #ifndef cmFortran_h #define cmFortran_h +#include +#include +#include +#include +#include + #include "cmDepends.h" class cmDependsFortranInternals; class cmFortranSourceInfo; +class cmLocalGenerator; /** \class cmDependsFortran * \brief Dependency scanner for Fortran object files. diff --git a/Source/cmDependsJava.cxx b/Source/cmDependsJava.cxx index a9130e6..18bc695 100644 --- a/Source/cmDependsJava.cxx +++ b/Source/cmDependsJava.cxx @@ -11,7 +11,6 @@ ============================================================================*/ #include "cmDependsJava.h" -#include "cmDependsJavaParserHelper.h" #include "cmSystemTools.h" cmDependsJava::cmDependsJava() diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h index 5bb3039..95265c5 100644 --- a/Source/cmDependsJava.h +++ b/Source/cmDependsJava.h @@ -12,8 +12,15 @@ #ifndef cmDependsJava_h #define cmDependsJava_h +#include + #include "cmDepends.h" +#include +#include +#include +#include + /** \class cmDependsJava * \brief Dependency scanner for Java class files. */ diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index 79c4669..8d77ca6 100644 --- a/Source/cmDependsJavaParserHelper.cxx +++ b/Source/cmDependsJavaParserHelper.cxx @@ -11,9 +11,16 @@ ============================================================================*/ #include "cmDependsJavaParserHelper.h" +#include + #include "cmDependsJavaLexer.h" #include "cmSystemTools.h" + #include +#include +#include +#include +#include int cmDependsJava_yyparse(yyscan_t yyscanner); diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 377d584..731bbcc 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include #define YYSTYPE cmDependsJavaParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 5516cf1..13736b9 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -12,17 +12,18 @@ #include "cmDocumentation.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" +#include "cmDocumentationSection.h" #include "cmRST.h" #include "cmSystemTools.h" #include "cmVersion.h" -#include +#include #include #include - #include - -#include +#include +#include static const char* cmDocumentationStandardOptions[][2] = { { "--help,-help,-usage,-h,-H,/?", "Print usage information and exit." }, diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index c82e1d4..7661eb7 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -14,15 +14,15 @@ #include -#include "cmStandardIncludes.h" - #include "cmDocumentationFormatter.h" -#include "cmDocumentationSection.h" -#include "cmake.h" -namespace cmsys { -class Directory; -} +#include +#include +#include +#include + +class cmDocumentationSection; +struct cmDocumentationEntry; /** Class to generate documentation. */ class cmDocumentation : public cmDocumentationEnums diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 4816bb9..5a718a2 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -11,8 +11,14 @@ ============================================================================*/ #include "cmDocumentationFormatter.h" +#include "cmDocumentationEntry.h" #include "cmDocumentationSection.h" +#include +#include +#include +#include + cmDocumentationFormatter::cmDocumentationFormatter() : TextWidth(77) , TextIndent("") diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 7a93120..09fb20b 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -12,9 +12,9 @@ #ifndef _cmDocumentationFormatter_h #define _cmDocumentationFormatter_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include /** This is just a helper class to make it build with MSVC 6.0. Actually the enums and internal classes could directly go into diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index 161a731..1d41070 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -12,7 +12,12 @@ #ifndef _cmDocumentationSection_h #define _cmDocumentationSection_h -#include "cmDocumentationFormatter.h" +#include // IWYU pragma: keep + +#include "cmDocumentationEntry.h" + +#include +#include // Low-level interface for custom documents: /** Internal class representing a section of the documentation. diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index f6841ad..762feee 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -11,6 +11,13 @@ ============================================================================*/ #include "cmDynamicLoader.h" +#include + +#include +#include +#include +#include + class cmDynamicLoaderCache { public: diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index d9b8990..4f6ade5 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -17,9 +17,7 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 150593b..a43e6c1 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -9,12 +9,17 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmStandardIncludes.h" // to get CMAKE_USE_ELF_PARSER first - #include "cmELF.h" #include +#include #include +#include +#include +#include +#include +#include +#include // Include the ELF format information system header. #if defined(__OpenBSD__) diff --git a/Source/cmELF.h b/Source/cmELF.h index 80832ad..a4c3456 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -12,6 +12,11 @@ #ifndef cmELF_h #define cmELF_h +#include + +#include +#include + #if !defined(CMAKE_USE_ELF_PARSER) #error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled." #endif diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 390477a..8f4dfd8 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -12,9 +12,23 @@ #include "cmExportBuildFileGenerator.h" #include "cmExportSet.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include "cmake.h" + +#include +#include +#include +#include +#include cmExportBuildFileGenerator::cmExportBuildFileGenerator() { diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h index 417e8c9..990824f 100644 --- a/Source/cmExportBuildFileGenerator.h +++ b/Source/cmExportBuildFileGenerator.h @@ -12,10 +12,18 @@ #ifndef cmExportBuildFileGenerator_h #define cmExportBuildFileGenerator_h +#include + #include "cmExportFileGenerator.h" -#include "cmListFileCache.h" + +#include +#include +#include class cmExportSet; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmLocalGenerator; /** \class cmExportBuildFileGenerator * \brief Generate a file exporting targets from a build tree. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 7f01196..23c77d9 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -13,20 +13,25 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" -#include "cmExportSet.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmInstallExportGenerator.h" +#include "cmGeneratorTarget.h" +#include "cmLinkItem.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" -#include "cmVersion.h" +#include "cmake.h" #include #include #include +#include +#include +#include static std::string cmExportFileGeneratorEscape(std::string const& str) { diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 9c96015..354994a 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -12,11 +12,19 @@ #ifndef cmExportFileGenerator_h #define cmExportFileGenerator_h -#include "cmCommand.h" -#include "cmGeneratorExpression.h" +#include // IWYU pragma: keep +#include "cmGeneratorExpression.h" #include "cmVersion.h" -#include "cmVersionMacros.h" +#include "cmVersionConfig.h" + +#include +#include +#include +#include +#include + +class cmGeneratorTarget; #define STRINGIFY_HELPER(X) #X #define STRINGIFY(X) STRINGIFY_HELPER(X) diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 7747157..ceba69a 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -15,12 +15,22 @@ #include "cmExportSet.h" #include "cmExportSetMap.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include +#include + cmExportInstallFileGenerator::cmExportInstallFileGenerator( cmInstallExportGenerator* iegen) : IEGen(iegen) diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 68960db..c693dc1 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -12,8 +12,18 @@ #ifndef cmExportInstallFileGenerator_h #define cmExportInstallFileGenerator_h +#include + #include "cmExportFileGenerator.h" +#include +#include +#include +#include +#include + +class cmGeneratorTarget; +class cmGlobalGenerator; class cmInstallExportGenerator; class cmInstallTargetGenerator; diff --git a/Source/cmExportSet.h b/Source/cmExportSet.h index 49f2cac..4f3c9d8 100644 --- a/Source/cmExportSet.h +++ b/Source/cmExportSet.h @@ -12,11 +12,14 @@ #ifndef cmExportSet_h #define cmExportSet_h -#include "cmSystemTools.h" +#include // IWYU pragma: keep + +#include +#include -class cmTargetExport; class cmInstallExportGenerator; class cmLocalGenerator; +class cmTargetExport; /// A set of targets that were installed with the same EXPORT parameter. class cmExportSet diff --git a/Source/cmExportSetMap.cxx b/Source/cmExportSetMap.cxx index ac1c66e..42fb781 100644 --- a/Source/cmExportSetMap.cxx +++ b/Source/cmExportSetMap.cxx @@ -15,6 +15,8 @@ #include "cmAlgorithms.h" #include "cmExportSet.h" +#include + cmExportSet* cmExportSetMap::operator[](const std::string& name) { std::map::iterator it = this->find(name); diff --git a/Source/cmExportSetMap.h b/Source/cmExportSetMap.h index d2954e3..c3a55ba 100644 --- a/Source/cmExportSetMap.h +++ b/Source/cmExportSetMap.h @@ -12,7 +12,10 @@ #ifndef cmExportSetMap_h #define cmExportSetMap_h -#include "cmSystemTools.h" +#include // IWYU pragma: keep + +#include +#include class cmExportSet; diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 2916e6b..a0aefb8 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -12,10 +12,19 @@ #include "cmExportTryCompileFileGenerator.h" -#include "cmGeneratedFileStream.h" +#include "cmGeneratorExpression.h" #include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" + +#include +#include cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator( cmGlobalGenerator* gg, const std::vector& targets, diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h index 1d13711..27d5b3c 100644 --- a/Source/cmExportTryCompileFileGenerator.h +++ b/Source/cmExportTryCompileFileGenerator.h @@ -12,10 +12,18 @@ #ifndef cmExportTryCompileFileGenerator_h #define cmExportTryCompileFileGenerator_h +#include + #include "cmExportFileGenerator.h" -class cmInstallExportGenerator; -class cmInstallTargetGenerator; +#include +#include +#include +#include + +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; class cmExportTryCompileFileGenerator : public cmExportFileGenerator { diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx index 1a101ab..3a76367 100644 --- a/Source/cmExprParserHelper.cxx +++ b/Source/cmExprParserHelper.cxx @@ -11,11 +11,13 @@ ============================================================================*/ #include "cmExprParserHelper.h" -#include "cmMakefile.h" -#include "cmSystemTools.h" +#include #include "cmExprLexer.h" +#include +#include + int cmExpr_yyparse(yyscan_t yyscanner); // cmExprParserHelper::cmExprParserHelper() diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index 8e3d996..7402484 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include #define YYSTYPE cmExprParserHelper::ParserType #define YYSTYPE_IS_DECLARED @@ -26,9 +27,6 @@ * * Finds dependencies for java file and list of outputs */ - -class cmMakefile; - class cmExprParserHelper { public: diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx index b01290c..e4d124f 100644 --- a/Source/cmExternalMakefileProjectGenerator.cxx +++ b/Source/cmExternalMakefileProjectGenerator.cxx @@ -12,7 +12,7 @@ #include "cmExternalMakefileProjectGenerator.h" -#include +class cmMakefile; void cmExternalMakefileProjectGenerator::EnableLanguage( std::vector const& /*unused*/, cmMakefile* /*unused*/, diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h index 7d10ce1..b306f19 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -12,13 +12,13 @@ #ifndef cmExternalMakefileProjectGenerator_h #define cmExternalMakefileProjectGenerator_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include "cmDocumentation.h" +#include +#include class cmGlobalGenerator; +class cmMakefile; /** \class cmExternalMakefileProjectGenerator * \brief Base class for generators for "External Makefile based IDE projects". diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 6eae26b..7eb3a74 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -12,16 +12,23 @@ ============================================================================*/ #include "cmExtraCodeBlocksGenerator.h" +#include "cmAlgorithms.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" -#include +#include +#include +#include +#include +#include /* Some useful URLs: Homepage: diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h index b39080c..179be30 100644 --- a/Source/cmExtraCodeBlocksGenerator.h +++ b/Source/cmExtraCodeBlocksGenerator.h @@ -13,11 +13,16 @@ #ifndef cmExtraCodeBlocksGenerator_h #define cmExtraCodeBlocksGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include + +class cmGeneratorTarget; class cmLocalGenerator; class cmMakefile; -class cmGeneratorTarget; class cmXMLWriter; /** \class cmExtraCodeBlocksGenerator diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index eda6867..a039f49 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -14,18 +14,22 @@ #include "cmExtraCodeLiteGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmXMLWriter.h" #include "cmake.h" -#include "cmStandardIncludes.h" -#include "cmXMLWriter.h" -#include #include -#include +#include +#include +#include +#include +#include cmExtraCodeLiteGenerator::cmExtraCodeLiteGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmExtraCodeLiteGenerator.h b/Source/cmExtraCodeLiteGenerator.h index e20e745..f5765d8 100644 --- a/Source/cmExtraCodeLiteGenerator.h +++ b/Source/cmExtraCodeLiteGenerator.h @@ -14,9 +14,15 @@ #ifndef cmGlobalCodeLiteGenerator_h #define cmGlobalCodeLiteGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include + class cmLocalGenerator; +class cmMakefile; class cmExtraCodeLiteGenerator : public cmExternalMakefileProjectGenerator { diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 945ee40..5a98e34 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -14,17 +14,26 @@ #include "cmExtraEclipseCDT4Generator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" +#include "cmSourceGroup.h" #include "cmState.h" -#include "cmTarget.h" +#include "cmSystemTools.h" #include "cmXMLWriter.h" +#include "cmake.h" -#include "cmSystemTools.h" +#include #include -#include +#include +#include +#include +#include +#include static void AppendAttribute(cmXMLWriter& xml, const char* keyval) { diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index 4b585c3..97b7bd7 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -14,11 +14,19 @@ #ifndef cmExtraEclipseCDT4Generator_h #define cmExtraEclipseCDT4Generator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include +#include +#include + +class cmLocalGenerator; class cmMakefile; -class cmXMLWriter; class cmSourceGroup; +class cmXMLWriter; /** \class cmExtraEclipseCDT4Generator * \brief Write Eclipse project files for Makefile based projects diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 4e72504..36ab5b3 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -13,14 +13,18 @@ #include "cmExtraKateGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" -#include +#include +#include +#include +#include cmExtraKateGenerator::cmExtraKateGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h index 3d16052..518dead 100644 --- a/Source/cmExtraKateGenerator.h +++ b/Source/cmExtraKateGenerator.h @@ -13,10 +13,14 @@ #ifndef cmExtraKateGenerator_h #define cmExtraKateGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" -class cmLocalGenerator; +#include + class cmGeneratedFileStream; +class cmLocalGenerator; /** \class cmExtraKateGenerator * \brief Write Kate project files for Makefile or ninja based projects diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 6e81ee1..8ee275a 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -14,15 +14,18 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" -#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" -#include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" -#include +#include +#include +#include +#include +#include /* Sublime Text 2 Generator diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index c087825..ee2b253 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -13,13 +13,19 @@ #ifndef cmExtraSublimeTextGenerator_h #define cmExtraSublimeTextGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" -#include "cmSourceFile.h" -class cmLocalGenerator; -class cmMakefile; +#include +#include +#include + class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; +class cmMakefile; +class cmSourceFile; /** \class cmExtraSublimeTextGenerator * \brief Write Sublime Text 2 project files for Makefile based projects diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 38b90e1..90bb1b2 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -13,9 +13,9 @@ #ifndef cmFileLock_h #define cmFileLock_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include #if defined(_WIN32) #include // HANDLE diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index a3883da..d1883e7 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -12,14 +12,13 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include +#include -class cmFileLockResult; class cmFileLock; +class cmFileLockResult; class cmFileLockPool { diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx index 090fe60..de851bc 100644 --- a/Source/cmFileLockResult.cxx +++ b/Source/cmFileLockResult.cxx @@ -13,6 +13,7 @@ #include "cmFileLockResult.h" #include +#include cmFileLockResult cmFileLockResult::MakeOk() { diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h index 10d4c13..54b9626 100644 --- a/Source/cmFileLockResult.h +++ b/Source/cmFileLockResult.h @@ -13,9 +13,9 @@ #ifndef cmFileLockResult_h #define cmFileLockResult_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include #if defined(_WIN32) #include // DWORD diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index 2839b63..865059d 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -15,8 +15,12 @@ #include "cmCryptoHash.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" #include "cmsys/Base64.h" +#include +#include + cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile) { initParentDirs(makefile->GetCurrentSourceDirectory(), diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 619c71b..87cfcf8 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -13,10 +13,9 @@ #ifndef cmFilePathUuid_h #define cmFilePathUuid_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index 1360b44..089d520 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -11,6 +11,11 @@ ============================================================================*/ #include "cmFileTimeComparison.h" +#include +#include +#include +#include + // Use a hash table to avoid duplicate file time checks from disk. #if defined(CMAKE_BUILD_WITH_CMAKE) #ifdef CMake_HAVE_CXX_UNORDERED_MAP @@ -20,16 +25,14 @@ #endif #endif -#include - // Use a platform-specific API to get file times efficiently. #if !defined(_WIN32) || defined(__CYGWIN__) -#define cmFileTimeComparison_Type struct stat -#include #include +#define cmFileTimeComparison_Type struct stat #else -#define cmFileTimeComparison_Type FILETIME +#include #include +#define cmFileTimeComparison_Type FILETIME #endif class cmFileTimeComparisonInternal diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h index 52e974c..ea5c47e 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -12,9 +12,7 @@ #ifndef cmFileTimeComparison_h #define cmFileTimeComparison_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep class cmFileTimeComparisonInternal; diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 30a33b4..71edf9f 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -10,9 +10,16 @@ See the License for more information. ============================================================================*/ #include "cmFortranParser.h" - +#include "cmFortranLexer.h" #include "cmSystemTools.h" + #include +#include +#include +#include +#include +#include +#include bool cmFortranParser_s::FindIncludeFile(const char* dir, const char* includeName, diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index c35a1bc..9a83070 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" +#include + #if defined(CMAKE_BUILD_WITH_CMAKE) #include #endif diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index e5e3320..4c4f26b 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -14,9 +14,8 @@ #include -#include "cmStandardIncludes.h" - #include +#include // This is the first base class of cmGeneratedFileStream. It will be // created before and destroyed after the ofstream portion and can diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 6cd6439..b016d9e 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -13,12 +13,14 @@ #include "assert.h" #include "cmAlgorithms.h" -#include "cmSystemTools.h" - -#include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorExpressionContext.h" #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" +#include "cmSystemTools.h" + +#include +#include cmGeneratorExpression::cmGeneratorExpression( const cmListFileBacktrace& backtrace) diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 75e69b4..24233b3 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -15,22 +15,20 @@ #include -#include "cmStandardIncludes.h" - #include "cmListFileCache.h" #include -#include +#include +#include +#include +#include +class cmCompiledGeneratorExpression; class cmGeneratorTarget; class cmLocalGenerator; -class cmListFileBacktrace; - -struct cmGeneratorExpressionEvaluator; struct cmGeneratorExpressionContext; struct cmGeneratorExpressionDAGChecker; - -class cmCompiledGeneratorExpression; +struct cmGeneratorExpressionEvaluator; /** \class cmGeneratorExpression * \brief Evaluate generate-time query expression syntax. diff --git a/Source/cmGeneratorExpressionContext.cxx b/Source/cmGeneratorExpressionContext.cxx index 8da6b50..77289d1 100644 --- a/Source/cmGeneratorExpressionContext.cxx +++ b/Source/cmGeneratorExpressionContext.cxx @@ -12,8 +12,6 @@ #include "cmGeneratorExpressionContext.h" -#include "cmGeneratorTarget.h" - cmGeneratorExpressionContext::cmGeneratorExpressionContext( cmLocalGenerator* lg, std::string const& config, bool quiet, cmGeneratorTarget const* headTarget, const cmGeneratorTarget* currentTarget, diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index 045ded1..c477443 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -13,7 +13,15 @@ #include "cmGeneratorExpressionDAGChecker.h" #include "cmAlgorithms.h" +#include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionEvaluator.h" +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" +#include "cmake.h" + +#include +#include +#include cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( const cmListFileBacktrace& backtrace, const std::string& target, diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index e522728..c6d7281 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -14,9 +14,14 @@ #include -#include "cmStandardIncludes.h" +#include "cmListFileCache.h" -#include "cmGeneratorExpressionEvaluator.h" +#include +#include +#include + +struct GeneratorExpressionContent; +struct cmGeneratorExpressionContext; #define CM_SELECT_BOTH(F, A1, A2) F(A1, A2) #define CM_SELECT_FIRST(F, A1, A2) F(A1) diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index c01c4fc..aad9d1b 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -14,12 +14,17 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" +#include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include +#include "cmSystemTools.h" +#include "cmake.h" -#include +#include +#include +#include +#include cmGeneratorExpressionEvaluationFile::cmGeneratorExpressionEvaluationFile( const std::string& input, diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 52ba2d8..3a668a2 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -12,10 +12,15 @@ #ifndef cmGeneratorExpressionEvaluationFile_h #define cmGeneratorExpressionEvaluationFile_h +#include // IWYU pragma: keep + #include "cmGeneratorExpression.h" #include +#include +#include #include +#include class cmLocalGenerator; diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index b4b74c5..d21ab25 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -12,21 +12,12 @@ #include "cmGeneratorExpressionEvaluator.h" #include "cmAlgorithms.h" -#include "cmGeneratorExpression.h" -#include "cmGeneratorExpressionDAGChecker.h" -#include "cmGeneratorExpressionParser.h" -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" -#include "cmSourceFile.h" - -#include - -#include -#include - +#include "cmGeneratorExpressionContext.h" #include "cmGeneratorExpressionNode.h" +#include +#include + GeneratorExpressionContent::GeneratorExpressionContent( const char* startContent, size_t length) : StartContent(startContent) diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 58e732b..5e8ebe0 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -12,13 +12,13 @@ #ifndef cmGeneratorExpressionEvaluator_h #define cmGeneratorExpressionEvaluator_h -#include "cmGeneratorExpressionContext.h" - -#include "cmListFileCache.h" +#include +#include #include #include +struct cmGeneratorExpressionContext; struct cmGeneratorExpressionDAGChecker; struct cmGeneratorExpressionNode; diff --git a/Source/cmGeneratorExpressionLexer.h b/Source/cmGeneratorExpressionLexer.h index 6bd336b..55836ac 100644 --- a/Source/cmGeneratorExpressionLexer.h +++ b/Source/cmGeneratorExpressionLexer.h @@ -12,10 +12,10 @@ #ifndef cmGeneratorExpressionLexer_h #define cmGeneratorExpressionLexer_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep +#include +#include #include struct cmGeneratorExpressionToken diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 12cf980..44e9ce1 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -13,9 +13,36 @@ #include "cmGeneratorExpressionNode.h" #include "cmAlgorithms.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorExpressionEvaluator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmLinkItem.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" +#include "cmSourceFile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include std::string cmGeneratorExpressionNode::EvaluateDependentExpression( std::string const& prop, cmLocalGenerator* lg, @@ -1455,13 +1482,12 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode } installPrefixNode; -class ArtifactNameTag; +class ArtifactDirTag; class ArtifactLinkerTag; -class ArtifactSonameTag; -class ArtifactPdbTag; - +class ArtifactNameTag; class ArtifactPathTag; -class ArtifactDirTag; +class ArtifactPdbTag; +class ArtifactSonameTag; template struct TargetFilesystemArtifactResultCreator diff --git a/Source/cmGeneratorExpressionNode.h b/Source/cmGeneratorExpressionNode.h index 3ee57eb..23f405b 100644 --- a/Source/cmGeneratorExpressionNode.h +++ b/Source/cmGeneratorExpressionNode.h @@ -12,20 +12,16 @@ #ifndef cmGeneratorExpressionNode_h #define cmGeneratorExpressionNode_h -#include "cmGeneratorExpression.h" +#include // IWYU pragma: keep -#include "cmGeneratorExpressionDAGChecker.h" -#include "cmGeneratorExpressionEvaluator.h" -#include "cmGeneratorExpressionParser.h" -#include "cmLocalGenerator.h" -#include "cmSourceFile.h" +#include +#include -#include - -#include -#include - -#include "cmListFileCache.h" +class cmGeneratorTarget; +class cmLocalGenerator; +struct GeneratorExpressionContent; +struct cmGeneratorExpressionContext; +struct cmGeneratorExpressionDAGChecker; struct cmGeneratorExpressionNode { diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index f853f8d..c753f9b 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -14,7 +14,8 @@ #include "cmGeneratorExpressionEvaluator.h" -#include "assert.h" +#include +#include cmGeneratorExpressionParser::cmGeneratorExpressionParser( const std::vector& tokens) diff --git a/Source/cmGeneratorExpressionParser.h b/Source/cmGeneratorExpressionParser.h index b0e9ea4..4534d6b 100644 --- a/Source/cmGeneratorExpressionParser.h +++ b/Source/cmGeneratorExpressionParser.h @@ -12,12 +12,11 @@ #ifndef cmGeneratorExpressionParser_h #define cmGeneratorExpressionParser_h -#include "cmGeneratorExpressionLexer.h" +#include // IWYU pragma: keep -#include #include -#include "cmListFileCache.h" +#include "cmGeneratorExpressionLexer.h" struct cmGeneratorExpressionEvaluator; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8bd3b82..ee2907c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -13,19 +13,33 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" #include "cmGeneratorExpressionDAGChecker.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmPropertyMap.h" #include "cmSourceFile.h" +#include "cmSourceFileLocation.h" +#include "cmSystemTools.h" #include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" -#include - -#include "assert.h" +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #if defined(CMake_HAVE_CXX_UNORDERED_SET) #include diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index f9987aa..173f15d 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -12,15 +12,26 @@ #ifndef cmGeneratorTarget_h #define cmGeneratorTarget_h +#include + #include "cmLinkItem.h" +#include "cmListFileCache.h" +#include "cmPolicies.h" +#include "cmState.h" + +#include +#include +#include +#include +#include +class cmComputeLinkInformation; class cmCustomCommand; class cmGlobalGenerator; class cmLocalGenerator; class cmMakefile; class cmSourceFile; class cmTarget; -class cmComputeLinkInformation; class cmGeneratorTarget { diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 3d35114..d3c9625 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmGhsMultiTargetGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGhsMultiGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx index 900b08e..d8ea317 100644 --- a/Source/cmGlobalCommonGenerator.cxx +++ b/Source/cmGlobalCommonGenerator.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmGlobalCommonGenerator.h" +class cmake; + cmGlobalCommonGenerator::cmGlobalCommonGenerator(cmake* cm) : cmGlobalGenerator(cm) { diff --git a/Source/cmGlobalCommonGenerator.h b/Source/cmGlobalCommonGenerator.h index a48ff4f..5bc16c3 100644 --- a/Source/cmGlobalCommonGenerator.h +++ b/Source/cmGlobalCommonGenerator.h @@ -12,8 +12,12 @@ #ifndef cmGlobalCommonGenerator_h #define cmGlobalCommonGenerator_h +#include + #include "cmGlobalGenerator.h" +class cmake; + /** \class cmGlobalCommonGenerator * \brief Common infrastructure for Makefile and Ninja global generators. */ diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 50c5a42..ef8266f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -21,6 +21,8 @@ #include "cmAlgorithms.h" #include "cmCPackPropertiesGenerator.h" #include "cmComputeTargetDepends.h" +#include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" #include "cmExportBuildFileGenerator.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmGeneratedFileStream.h" @@ -29,25 +31,31 @@ #include "cmInstallGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" #include "cmState.h" -#include "cmTargetExport.h" #include "cmVersion.h" #include "cmake.h" +#include +#include #include #include +#include +#include +#include +#include +#include #if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cm_jsoncpp_value.h" -#include "cm_jsoncpp_writer.h" +#include +#include #include #endif -#include // required for atof - -#include +class cmInstalledFile; bool cmTarget::StrictTargetComparison::operator()(cmTarget const* t1, cmTarget const* t2) const diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index dc80a33..1e1479a 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -15,15 +15,18 @@ #include -#include "cmStandardIncludes.h" - -#include "cmExportSetMap.h" // For cmExportSetMap -#include "cmGeneratorExpression.h" -#include "cmGeneratorTarget.h" +#include "cmExportSetMap.h" #include "cmState.h" -#include "cmSystemTools.h" // for cmSystemTools::OutputOption -#include "cmTarget.h" // For cmTargets -#include "cmTargetDepend.h" // For cmTargetDependSet +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" + +#include +#include +#include +#include +#include +#include #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmFileLockPool.h" @@ -34,15 +37,14 @@ #endif #endif -class cmake; +class cmCustomCommandLines; +class cmSourceFile; +class cmExportBuildFileGenerator; +class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; -class cmMakefile; class cmLocalGenerator; -class cmExternalMakefileProjectGenerator; -class cmTarget; -class cmInstallTargetGenerator; -class cmInstallFilesGenerator; -class cmExportBuildFileGenerator; +class cmMakefile; +class cmake; /** \class cmGlobalGenerator * \brief Responsible for overseeing the generation process for the entire tree diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 0ae913e..d75ebf8 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -12,6 +12,7 @@ #include "cmGlobalGhsMultiGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGhsMultiTargetGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index daf7003..aaa1108 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -13,17 +13,23 @@ #include "cmGlobalKdevelopGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmXMLWriter.h" #include "cmake.h" #include #include -#include +#include +#include +#include +#include cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h index 666527c..6a201b0 100644 --- a/Source/cmGlobalKdevelopGenerator.h +++ b/Source/cmGlobalKdevelopGenerator.h @@ -13,8 +13,13 @@ #ifndef cmGlobalKdevelopGenerator_h #define cmGlobalKdevelopGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include + class cmLocalGenerator; /** \class cmGlobalKdevelopGenerator diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 590f207..30a05a0 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -13,16 +13,27 @@ #include "cmGlobalNinjaGenerator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpressionEvaluationFile.h" #include "cmGeneratorTarget.h" +#include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" #include "cmVersion.h" +#include "cmake.h" #include -#include #include +#include +#include +#include +#include const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja"; const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja"; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 082ee3a..a0fad64 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -13,16 +13,28 @@ #ifndef cmGlobalNinjaGenerator_h #define cmGlobalNinjaGenerator_h -#include "cmGlobalCommonGenerator.h" +#include +#include "cmGlobalCommonGenerator.h" +#include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" #include "cmNinjaTypes.h" - -//#define NINJA_GEN_VERBOSE_FILES - -class cmLocalGenerator; +#include "cmPolicies.h" + +#include +#include +#include +#include +#include +#include + +class cmCustomCommand; +class cmMakefile; +class cmake; +struct cmDocumentationEntry; class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; /** * \class cmGlobalNinjaGenerator diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 77fbbe9..d90ebf0 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -12,13 +12,25 @@ #include "cmGlobalUnixMakefileGenerator3.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" +#include "cmOutputConverter.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" #include "cmake.h" +#include +#include +#include +#include + cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3(cmake* cm) : cmGlobalCommonGenerator(cm) { diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index ceb4140..3724124 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -12,13 +12,27 @@ #ifndef cmGlobalUnixMakefileGenerator3_h #define cmGlobalUnixMakefileGenerator3_h -#include "cmGlobalCommonGenerator.h" +#include +#include "cmGeneratorTarget.h" +#include "cmGlobalCommonGenerator.h" #include "cmGlobalGeneratorFactory.h" +#include "cmState.h" + +#include +#include +#include +#include +#include +#include class cmGeneratedFileStream; -class cmMakefileTargetGenerator; +class cmLocalGenerator; class cmLocalUnixMakefileGenerator3; +class cmMakefile; +class cmMakefileTargetGenerator; +class cmake; +struct cmDocumentationEntry; /** \class cmGlobalUnixMakefileGenerator3 * \brief Write a Unix makefiles. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index df831e5..819feb1 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio10Generator.h" #include "cmAlgorithms.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 45d9522..ea008ad 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -13,6 +13,7 @@ #include "cmGlobalVisualStudio71Generator.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmake.h" diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 67ac230..08be304 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio7Generator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmUuid.h" diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 2c0168e..53a05a0 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio8Generator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 86fe6f2..d8f1d93 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -11,8 +11,10 @@ ============================================================================*/ #include "cmGlobalWatcomWMakeGenerator.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmDocumentationEntry.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmake.h" cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index bc0d786..df1168e 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -12,8 +12,18 @@ #ifndef cmGlobalWatcomWMakeGenerator_h #define cmGlobalWatcomWMakeGenerator_h +#include + +#include "cmGlobalGeneratorFactory.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include +#include + +class cmMakefile; +class cmake; +struct cmDocumentationEntry; + /** \class cmGlobalWatcomWMakeGenerator * \brief Write a NMake makefiles. * diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index adb9936..2824f7e 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -12,9 +12,19 @@ #include "cmGraphVizWriter.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" + +#include +#include +#include +#include static const char* getShapeForTarget(const cmGeneratorTarget* target) { diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 0643785..f34e967 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -12,15 +12,19 @@ #ifndef CMGRAPHVIZWRITER_H #define CMGRAPHVIZWRITER_H -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include "cmState.h" -#include "cmGeneratedFileStream.h" -#include "cmLocalGenerator.h" #include +#include +#include +#include +#include +class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; /** This class implements writing files for graphviz (dot) for graphs * representing the dependencies between the targets in the project. */ diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 469b119..3b4226d 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -12,8 +12,11 @@ #include "cmInstallDirectoryGenerator.h" #include "cmGeneratorExpression.h" +#include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" cmInstallDirectoryGenerator::cmInstallDirectoryGenerator( std::vector const& dirs, const char* dest, diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h index 93becf4..ed40785 100644 --- a/Source/cmInstallDirectoryGenerator.h +++ b/Source/cmInstallDirectoryGenerator.h @@ -13,6 +13,14 @@ #define cmInstallDirectoryGenerator_h #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include +#include + +class cmLocalGenerator; /** \class cmInstallDirectoryGenerator * \brief Generate directory installation rules. diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 72c4d1f..27628f4 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -11,19 +11,17 @@ ============================================================================*/ #include "cmInstallExportGenerator.h" -#include - -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmInstallTargetGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" -#include "cmake.h" - -#include "cmInstallFilesGenerator.h" +#include +#include +#include +#include #include "cmExportInstallFileGenerator.h" #include "cmExportSet.h" +#include "cmInstallType.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmake.h" cmInstallExportGenerator::cmInstallExportGenerator( cmExportSet* exportSet, const char* destination, diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h index 22e661b..5539827 100644 --- a/Source/cmInstallExportGenerator.h +++ b/Source/cmInstallExportGenerator.h @@ -12,13 +12,19 @@ #ifndef cmInstallExportGenerator_h #define cmInstallExportGenerator_h +#include + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include +#include class cmExportInstallFileGenerator; -class cmInstallFilesGenerator; -class cmInstallTargetGenerator; class cmExportSet; -class cmMakefile; +class cmLocalGenerator; /** \class cmInstallExportGenerator * \brief Generate rules for creating an export files. diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index 93a740c..1d0fadd 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -12,9 +12,11 @@ #include "cmInstallFilesGenerator.h" #include "cmGeneratorExpression.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" +#include "cmInstallType.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" + +class cmLocalGenerator; cmInstallFilesGenerator::cmInstallFilesGenerator( std::vector const& files, const char* dest, bool programs, diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h index 5cb09f4..1648976 100644 --- a/Source/cmInstallFilesGenerator.h +++ b/Source/cmInstallFilesGenerator.h @@ -12,7 +12,16 @@ #ifndef cmInstallFilesGenerator_h #define cmInstallFilesGenerator_h +#include + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include + +class cmLocalGenerator; /** \class cmInstallFilesGenerator * \brief Generate file installation rules. diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index e3d5bad..69120a8 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -14,6 +14,8 @@ #include "cmMakefile.h" #include "cmSystemTools.h" +#include + cmInstallGenerator::cmInstallGenerator( const char* destination, std::vector const& configurations, const char* component, MessageLevel message, bool exclude_from_all) diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index ad9fc28..fa0bdd6 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -12,9 +12,15 @@ #ifndef cmInstallGenerator_h #define cmInstallGenerator_h +#include + #include "cmInstallType.h" #include "cmScriptGenerator.h" +#include +#include +#include + class cmLocalGenerator; class cmMakefile; diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index 76d6b71..7871100 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -11,6 +11,11 @@ ============================================================================*/ #include "cmInstallScriptGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include + cmInstallScriptGenerator::cmInstallScriptGenerator(const char* script, bool code, const char* component, diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h index dc00359..609294f 100644 --- a/Source/cmInstallScriptGenerator.h +++ b/Source/cmInstallScriptGenerator.h @@ -12,8 +12,13 @@ #ifndef cmInstallScriptGenerator_h #define cmInstallScriptGenerator_h +#include + #include "cmInstallGenerator.h" +#include +#include + /** \class cmInstallScriptGenerator * \brief Generate target installation rules. */ diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 4b2f40c..1ad59ff 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -14,13 +14,21 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" -#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" #include +#include +#include +#include +#include cmInstallTargetGenerator::cmInstallTargetGenerator( const std::string& targetName, const char* dest, bool implib, diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index b1c28b8..797e962 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -12,9 +12,17 @@ #ifndef cmInstallTargetGenerator_h #define cmInstallTargetGenerator_h +#include + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include class cmGeneratorTarget; +class cmLocalGenerator; /** \class cmInstallTargetGenerator * \brief Generate target installation rules. diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index bfc5cf1..3ab7db0 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -12,9 +12,13 @@ #include "cmInstalledFile.h" #include "cmAlgorithms.h" +#include "cmListFileCache.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include +#include + cmInstalledFile::cmInstalledFile() : NameExpression(CM_NULLPTR) { diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index 00ff611..8bad5a5 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -13,6 +13,13 @@ #define cmInstalledFile_h #include "cmGeneratorExpression.h" +#include "cm_auto_ptr.hxx" + +#include +#include +#include + +class cmMakefile; /** \class cmInstalledFile * \brief Represents a file intended for installation. diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index aad538c..14bb81e 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -15,9 +15,12 @@ #include "cmMessenger.h" #include "cmOutputConverter.h" #include "cmSystemTools.h" -#include "cmVersion.h" +#include "cmake.h" -#include +#include +#include +#include +#include struct cmListFileParser { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 08b59eb..215f179 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -12,9 +12,11 @@ #ifndef cmListFileCache_h #define cmListFileCache_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include +#include #include "cmState.h" @@ -151,6 +153,7 @@ public: private: struct Entry; + cmState::Snapshot Bottom; Entry* Cur; cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 1383421..0e79293 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -11,8 +11,13 @@ ============================================================================*/ #include "cmLocalCommonGenerator.h" +#include "cmGeneratorTarget.h" #include "cmMakefile.h" +#include + +class cmGlobalGenerator; + cmLocalCommonGenerator::cmLocalCommonGenerator( cmGlobalGenerator* gg, cmMakefile* mf, cmOutputConverter::RelativeRoot wd) : cmLocalGenerator(gg, mf) diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h index 0a8753d..9012afd 100644 --- a/Source/cmLocalCommonGenerator.h +++ b/Source/cmLocalCommonGenerator.h @@ -12,9 +12,16 @@ #ifndef cmLocalCommonGenerator_h #define cmLocalCommonGenerator_h +#include + #include "cmLocalGenerator.h" +#include "cmOutputConverter.h" + +#include -class cmCommonTargetGenerator; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; /** \class cmLocalCommonGenerator * \brief Common infrastructure for Makefile and Ninja local generators. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index de9e1e5..cecf7b7 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -16,14 +16,15 @@ #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpressionEvaluationFile.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" -#include "cmInstallFilesGenerator.h" #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmTest.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" @@ -33,9 +34,14 @@ #include #endif -#include // for isalpha - +#include #include +#include +#include +#include +#include +#include +#include #if defined(__HAIKU__) #include diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index f7a4074..920dd65 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -14,19 +14,26 @@ #include -#include "cmStandardIncludes.h" - +#include "cmListFileCache.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmake.h" -class cmMakefile; -class cmGlobalGenerator; +#include +#include +#include +#include +#include +#include +#include +#include + +class cmCustomCommandGenerator; class cmGeneratorTarget; -class cmTargetManifest; +class cmGlobalGenerator; +class cmMakefile; class cmSourceFile; -class cmCustomCommand; -class cmCustomCommandGenerator; /** \class cmLocalGenerator * \brief Create required build files for a directory. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index d15ee22..6793f84 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,16 +12,25 @@ ============================================================================*/ #include "cmLocalNinjaGenerator.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmGlobalNinjaGenerator.h" #include "cmMakefile.h" #include "cmNinjaTargetGenerator.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" +#include #include +#include +#include +#include +#include cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf) diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 6e61087..25539d4 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -13,13 +13,27 @@ #ifndef cmLocalNinjaGenerator_h #define cmLocalNinjaGenerator_h -#include "cmLocalCommonGenerator.h" +#include +#include "cmLocalCommonGenerator.h" +#include "cmLocalGenerator.h" #include "cmNinjaTypes.h" +#include "cmOutputConverter.h" + +#include +#include +#include +#include +#include +class cmCustomCommand; class cmCustomCommandGenerator; -class cmGlobalNinjaGenerator; class cmGeneratedFileStream; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmGlobalNinjaGenerator; +class cmMakefile; +class cmSourceFile; class cmake; /** diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 3c4841e..611c502 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -12,13 +12,20 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmAlgorithms.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmFileTimeComparison.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" @@ -30,11 +37,14 @@ #include "cmDependsJava.h" #endif +#include #include +#include #include - -#include -#include +#include +#include +#include +#include // Escape special characters in Makefile dependency lines class cmMakeSafe diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 3e90055..bd32e10 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -12,15 +12,22 @@ #ifndef cmLocalUnixMakefileGenerator3_h #define cmLocalUnixMakefileGenerator3_h -#include "cmLocalCommonGenerator.h" +#include -// for cmDepends::DependencyVector #include "cmDepends.h" +#include "cmLocalCommonGenerator.h" + +#include +#include +#include +#include +#include class cmCustomCommand; class cmCustomCommandGenerator; -class cmDepends; -class cmMakefileTargetGenerator; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; class cmSourceFile; /** \class cmLocalUnixMakefileGenerator3 diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 37b5505..0fe7987 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -11,10 +11,12 @@ ============================================================================*/ #include "cmLocalVisualStudio10Generator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVisualStudio10TargetGenerator.h" #include "cmXMLParser.h" + #include class cmVS10XMLParser : public cmXMLParser diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index b492962..d344dc5 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -12,6 +12,7 @@ #include "cmLocalVisualStudioGenerator.h" #include "cmCustomCommandGenerator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index db87946..098779e 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -11,6 +11,7 @@ ============================================================================*/ #include "cmLocalXCodeGenerator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalXCodeGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d1fddca..11ccca1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -23,34 +23,35 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorExpressionEvaluationFile.h" #include "cmGlobalGenerator.h" -#include "cmInstallGenerator.h" #include "cmListFileCache.h" -#include "cmMessenger.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmTest.h" -#include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" +#include "cmInstallGenerator.h" // IWYU pragma: keep +#include "cmTestGenerator.h" // IWYU pragma: keep + #ifdef CMAKE_BUILD_WITH_CMAKE #include "cmVariableWatch.h" #endif +#include +#include #include #include #include - -#include -#include #include #include #include #include #include +class cmMessenger; + // default is not to be building executables cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, cmState::Snapshot const& snapshot) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4d137db..eb382df 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -54,6 +54,7 @@ class cmFunctionBlocker; class cmGeneratorExpressionEvaluationFile; class cmGlobalGenerator; class cmInstallGenerator; +class cmMessenger; class cmSourceFile; class cmTest; class cmTestGenerator; @@ -892,10 +893,13 @@ private: void PopSnapshot(bool reportError = true); friend class cmCMakePolicyCommand; class IncludeScope; + friend class IncludeScope; class ListFileScope; + friend class ListFileScope; class BuildsystemFileScope; + friend class BuildsystemFileScope; // CMP0053 == old diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx index 43fa150..fe67050 100644 --- a/Source/cmMessenger.cxx +++ b/Source/cmMessenger.cxx @@ -11,14 +11,18 @@ ============================================================================*/ #include "cmMessenger.h" + +#include "cmAlgorithms.h" #include "cmDocumentationFormatter.h" -#include "cmMessenger.h" -#include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include #endif +#include + cmake::MessageType cmMessenger::ConvertMessageType(cmake::MessageType t) const { bool warningsAsErrors; diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h index f15bf13..c69eb8e 100644 --- a/Source/cmMessenger.h +++ b/Source/cmMessenger.h @@ -13,10 +13,15 @@ #ifndef cmMessenger_h #define cmMessenger_h +#include // IWYU pragma: keep + #include "cmListFileCache.h" -#include "cmState.h" #include "cmake.h" +#include + +class cmState; + class cmMessenger { public: diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index dbfe6eb..3ddcc9a 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -11,12 +11,18 @@ ============================================================================*/ #include "cmOSXBundleGenerator.h" +#include + +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" #include "cmTarget.h" #include +class cmSourceFile; + cmOSXBundleGenerator::cmOSXBundleGenerator(cmGeneratorTarget* target, const std::string& configName) : GT(target) diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h index 2dc1e4a..ff472ec 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -12,19 +12,16 @@ #ifndef cmOSXBundleGenerator_h #define cmOSXBundleGenerator_h -#include - -#include "cmStandardIncludes.h" - -#include "cmSourceFile.h" +#include // IWYU pragma: keep #include #include +#include -class cmTarget; -class cmMakefile; -class cmLocalGenerator; class cmGeneratorTarget; +class cmLocalGenerator; +class cmMakefile; +class cmSourceFile; class cmOSXBundleGenerator { diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 20f2246..d7ad83d 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -12,13 +12,15 @@ #include "cmOrderDirectories.h" #include "cmAlgorithms.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmSystemTools.h" #include "cmake.h" -#include - #include +#include +#include +#include /* Directory ordering computation. diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 13823a1..081e8a0 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -14,14 +14,16 @@ #include -#include "cmStandardIncludes.h" - #include +#include +#include +#include +#include +#include +class cmGeneratorTarget; class cmGlobalGenerator; class cmOrderDirectoriesConstraint; -class cmOrderDirectoriesConstraintLibrary; -class cmGeneratorTarget; /** \class cmOrderDirectories * \brief Compute a safe runtime path order for a set of shared libraries. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 630da42..d44fbb7 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -12,14 +12,14 @@ #include "cmOutputConverter.h" #include "cmAlgorithms.h" -#include "cmake.h" +#include "cmSystemTools.h" +#include #include +#include +#include #include -#include /* isalpha */ -#include /* strlen */ - cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) : StateSnapshot(snapshot) , LinkScriptShell(false) diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 02468c8..ac58ddc 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -12,13 +12,13 @@ #ifndef cmOutputConverter_h #define cmOutputConverter_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include "cmGlobalGenerator.h" #include "cmState.h" +#include +#include + class cmOutputConverter { public: diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index f1da4d5..00f1370 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -13,19 +13,40 @@ #include "cmQtAutoGeneratorInitializer.h" +#include "cmAlgorithms.h" +#include "cmCustomCommandLines.h" #include "cmFilePathUuid.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" - -#include - -#include +#include "cmSourceFileLocation.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" #if defined(_WIN32) && !defined(__CYGWIN__) #include "cmGlobalVisualStudioGenerator.h" #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + static std::string GetAutogenTargetName(cmGeneratorTarget const* target) { std::string autogenTargetName = target->GetName(); diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index c5a7aba..fedb388 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -14,15 +14,8 @@ #ifndef cmQtAutoGeneratorInitializer_h #define cmQtAutoGeneratorInitializer_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include -#include -#include - -class cmSourceFile; class cmGeneratorTarget; class cmLocalGenerator; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a261962..329c742 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -20,14 +20,21 @@ #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" -#include - +#include #include +#include #include +#include #include - +#include +#include +#include #include +#include + #if defined(__APPLE__) #include #endif diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index ba439d4..32975c2 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -14,12 +14,11 @@ #ifndef cmQtAutoGenerators_h #define cmQtAutoGenerators_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include #include +#include #include #include diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 10d1cda..7f80923 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -14,8 +14,13 @@ #include "cmAlgorithms.h" #include "cmSystemTools.h" #include "cmVersion.h" + +#include #include #include +#include +#include +#include cmRST::cmRST(std::ostream& os, std::string const& docroot) : OS(os) diff --git a/Source/cmRST.h b/Source/cmRST.h index 895901a..f37af88 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -12,11 +12,14 @@ #ifndef _cmRST_h #define _cmRST_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include +#include +#include +#include +#include +#include /** \class cmRST * \brief Perform basic .rst processing for command-line help diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx index a000258..1ab70e2 100644 --- a/Source/cmScriptGenerator.cxx +++ b/Source/cmScriptGenerator.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" +#include + cmScriptGenerator::cmScriptGenerator( const std::string& config_var, std::vector const& configurations) diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index 4f4dd9e..abe9a1d 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -12,9 +12,11 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include +#include class cmScriptGeneratorIndent { diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 5869a01..3aa4b92 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -11,11 +11,16 @@ ============================================================================*/ #include "cmSourceFile.h" +#include "cmCustomCommand.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmProperty.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" +#include + cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name) : Location(mf, name) { diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index a3808f7..2c6d831 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -12,12 +12,16 @@ #ifndef cmSourceFile_h #define cmSourceFile_h -#include "cmSourceFileLocation.h" +#include -#include "cmCustomCommand.h" #include "cmPropertyMap.h" +#include "cmSourceFileLocation.h" + +#include +#include -class cmake; +class cmCustomCommand; +class cmMakefile; /** \class cmSourceFile * \brief Represent a class loaded from a makefile. diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 099a6f0..e2a1552 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -11,12 +11,17 @@ ============================================================================*/ #include "cmSourceFileLocation.h" +#include + #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" -#include "assert.h" +#include +#include +#include cmSourceFileLocation::cmSourceFileLocation() : Makefile(CM_NULLPTR) diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h index d41f2bd..e4e5116 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -12,9 +12,9 @@ #ifndef cmSourceFileLocation_h #define cmSourceFileLocation_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include class cmMakefile; diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index c7f093f..c5e6311 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -14,12 +14,12 @@ #include -#include "cmStandardIncludes.h" - #include +#include +#include +#include class cmSourceFile; - class cmSourceGroupInternals; /** \class cmSourceGroup diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 21a50cb..be0ee50 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -12,20 +12,7 @@ #include "cmSystemTools.h" #include "cmAlgorithms.h" -#include -#include -#include -#include -#include -#include -#ifdef __QNX__ -#include /* for malloc/free on QNX */ -#endif -#include -#include -#include -#include -#include + #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmArchiveWrite.h" #include "cmLocale.h" @@ -34,8 +21,38 @@ #define __LA_INT64_T la_int64_t #endif #endif + +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmCryptoHash.h" +#endif + +#if defined(CMAKE_USE_ELF_PARSER) +#include "cmELF.h" +#endif + +#if defined(CMAKE_USE_MACH_PARSER) +#include "cmMachO.h" +#endif + +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #if defined(_WIN32) #include @@ -43,33 +60,21 @@ #include #else #include -#include -#include #include #include #endif -#if defined(__APPLE__) -#include -#endif - -#include - #if defined(_WIN32) && \ (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__)) #include #endif -#if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cmCryptoHash.h" -#endif - -#if defined(CMAKE_USE_ELF_PARSER) -#include "cmELF.h" +#if defined(__APPLE__) +#include #endif -#if defined(CMAKE_USE_MACH_PARSER) -#include "cmMachO.h" +#ifdef __QNX__ +#include /* for malloc/free on QNX */ #endif static bool cm_isspace(char c) @@ -142,6 +147,7 @@ private: }; #elif defined(__APPLE__) #include + #define environ (*_NSGetEnviron()) #endif diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index cfc174e..090c9d6 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -20,6 +20,7 @@ #include "cmState.h" #include "cmSystemTools.h" #include "cmTest.h" +#include "cm_auto_ptr.hxx" #include #include diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 701a5e5..9b3c899 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,32 +12,38 @@ #include "cmake.h" #include "cmAlgorithms.h" -#include "cmCommand.h" #include "cmCommands.h" +#include "cmDocumentation.h" +#include "cmDocumentationEntry.h" #include "cmDocumentationFormatter.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmFileTimeComparison.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmGlobalGeneratorFactory.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" -#include "cmSourceFile.h" #include "cmState.h" -#include "cmTest.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" #include "cmUtils.hxx" -#include "cmVersionMacros.h" +#include "cmVersionConfig.h" +#include "cm_auto_ptr.hxx" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGraphVizWriter.h" #include "cmVariableWatch.h" -#include - -#include "cm_jsoncpp_value.h" -#include "cm_jsoncpp_writer.h" +#include +#include #endif #include #include #include +#include +#include // only build kdevelop generator on non-windows platforms // when not bootstrapping cmake @@ -69,6 +75,7 @@ #include "cmGlobalVisualStudio71Generator.h" #include "cmGlobalVisualStudio8Generator.h" #include "cmGlobalVisualStudio9Generator.h" + #define CMAKE_HAVE_VS_GENERATORS #endif #include "cmGlobalMSYSMakefileGenerator.h" @@ -90,6 +97,8 @@ #include "cmExtraKateGenerator.h" #include "cmExtraSublimeTextGenerator.h" +class cmCommand; + #ifdef CMAKE_USE_KDEVELOP #include "cmGlobalKdevelopGenerator.h" #endif @@ -103,17 +112,20 @@ #if defined(__APPLE__) #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGlobalXCodeGenerator.h" + #define CMAKE_USE_XCODE 1 #endif #include #include #endif -#include // include sys/stat.h after sys/types.h +#include +#include +#include #include // struct stat - -#include +#include +#include namespace { diff --git a/Source/cmake.h b/Source/cmake.h index 91a23cd..9dc429d 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -15,25 +15,23 @@ #include -#include "cmStandardIncludes.h" - -#include "cmCacheManager.h" #include "cmInstalledFile.h" #include "cmListFileCache.h" #include "cmState.h" -#include "cmSystemTools.h" -class cmGlobalGeneratorFactory; +#include +#include +#include +#include + +class cmExternalMakefileProjectGeneratorFactory; +class cmFileTimeComparison; class cmGlobalGenerator; -class cmLocalGenerator; +class cmGlobalGeneratorFactory; class cmMakefile; class cmMessenger; class cmVariableWatch; -class cmFileTimeComparison; -class cmExternalMakefileProjectGeneratorFactory; -class cmDocumentationSection; -class cmTarget; -class cmGeneratedFileStream; +struct cmDocumentationEntry; /** \brief Represents a cmake invocation. * diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index db6d51b..1450949 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -17,18 +17,23 @@ #endif #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" -#include "cmListFileCache.h" -#include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" #include "cmcmd.h" + +#include #include +#include +#include +#include +#include #ifdef CMAKE_USE_LIBUV -#include "cm_uv.h" +#include #endif #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index f25c085..277901d 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -16,29 +16,38 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmQtAutoGenerators.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmUtils.hxx" #include "cmVersion.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback. #endif -#include -#include -#include -#include +#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) +#include "bindexplib.h" +#endif #if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) && !defined(__CYGWIN__) #include "cmVisualStudioWCEPlatformParser.h" #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include // required for atoi -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include "bindexplib.h" -#endif - void CMakeCommandUsage(const char* program) { std::ostringstream errorStream; diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 1096d0c..cd6222d 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -13,9 +13,10 @@ #ifndef cmcmd_h #define cmcmd_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include class cmcmd { diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 38ff64f..93a6ebb 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -9,16 +9,21 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCTest.h" -#include "cmSystemTools.h" -// Need these for documentation support. -#include "cmDocumentation.h" -#include "cmake.h" +#include #include "CTest/cmCTestLaunch.h" #include "CTest/cmCTestScriptHandler.h" -#include "cmsys/Encoding.hxx" +#include "cmCTest.h" +#include "cmDocumentation.h" +#include "cmSystemTools.h" +#include "cmake.h" + +#include +#include +#include +#include +#include static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " ctest - Testing driver provided by CMake." }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e12a6f7e80e034970286d208fef20031d8052a19 commit e12a6f7e80e034970286d208fef20031d8052a19 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:19:50 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 1 20:19:50 2016 +0200 cmCTest: don't redefine cout and cerr The definitions have been introduced to ensure that cout and cerr are not used in certain files. However, this limitation does not apply to all source files that require cmCTest.h to be included. Furthermore, the definitions cause side effects depending on the include order. In total, the definitions do more harm than good. Remove them. diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 20f5caf..9d661d4 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -45,16 +45,6 @@ class cmXMLWriter; cmCTestLog_msg.str().c_str(), suppress); \ } while (0) -#ifdef cerr -#undef cerr -#endif -#define cerr no_cerr_use_cmCTestLog - -#ifdef cout -#undef cout -#endif -#define cout no_cout_use_cmCTestLog - /** \class cmCTest * \brief Represents a ctest invocation. * https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=521b38f8014025b4e5b3e3eeda4f7dd3cd88946b commit 521b38f8014025b4e5b3e3eeda4f7dd3cd88946b Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:05:48 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 1 20:05:48 2016 +0200 make sure to include cmConfigure.h before cmStandardIncludes.h diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h index acf1fa6..63a2ec0 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h @@ -13,6 +13,8 @@ #ifndef cmWIXRichTextFormatWriter_h #define cmWIXRichTextFormatWriter_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h index 01a9e76..78b81b3 100644 --- a/Source/CPack/cmCPackComponentGroup.h +++ b/Source/CPack/cmCPackComponentGroup.h @@ -13,6 +13,8 @@ #ifndef cmCPackComponentGroup_h #define cmCPackComponentGroup_h +#include + #include "cmStandardIncludes.h" class cmCPackComponentGroup; diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 7b44df9..0953978 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -12,6 +12,8 @@ #ifndef cmCursesStandardIncludes_h #define cmCursesStandardIncludes_h +#include + #include "../cmStandardIncludes.h" #if defined(__sun__) && defined(__GNUC__) diff --git a/Source/bindexplib.h b/Source/bindexplib.h index 8661a4a..715808a 100644 --- a/Source/bindexplib.h +++ b/Source/bindexplib.h @@ -13,6 +13,8 @@ #ifndef bindexplib_h #define bindexplib_h +#include + #include "cmStandardIncludes.h" diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index ee803c8..a6c71d2 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -12,6 +12,8 @@ #ifndef cmAlgorithms_h #define cmAlgorithms_h +#include + #include "cmStandardIncludes.h" inline bool cmHasLiteralPrefixImpl(const std::string& str1, const char* str2, diff --git a/Source/cmCTest.h b/Source/cmCTest.h index b6657c9..20f5caf 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -13,6 +13,8 @@ #ifndef cmCTest_h #define cmCTest_h +#include + #include "cmStandardIncludes.h" #include "cmListFileCache.h" diff --git a/Source/cmCallVisualStudioMacro.h b/Source/cmCallVisualStudioMacro.h index e516fe2..fd735cf 100644 --- a/Source/cmCallVisualStudioMacro.h +++ b/Source/cmCallVisualStudioMacro.h @@ -12,6 +12,8 @@ #ifndef cmCallVisualStudioMacro_h #define cmCallVisualStudioMacro_h +#include + #include "cmStandardIncludes.h" /** \class cmCallVisualStudioMacro diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index 97b706c..1040ad3 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -12,6 +12,8 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h +#include + #include "cmStandardIncludes.h" #define YYSTYPE cmCommandArgumentParserHelper::ParserType diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h index 9133148..19a6f8d 100644 --- a/Source/cmCommandArgumentsHelper.h +++ b/Source/cmCommandArgumentsHelper.h @@ -12,6 +12,8 @@ #ifndef cmCommandArgumentsHelper_h #define cmCommandArgumentsHelper_h +#include + #include "cmStandardIncludes.h" class cmCommandArgumentsHelper; diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index cb671dd..ccea22d 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -12,7 +12,7 @@ #ifndef cmConfigure_h #define cmConfigure_h -#include +#include // IWYU pragma: keep #ifdef _MSC_VER #pragma warning(disable : 4786) diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index 4e92b06..c51393d 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -12,6 +12,8 @@ #ifndef cmCryptoHash_h #define cmCryptoHash_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmCurl.h b/Source/cmCurl.h index 26bf94e..c3a2053 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -12,6 +12,8 @@ #ifndef cmCurl_h #define cmCurl_h +#include + #include "cmStandardIncludes.h" #include "cm_curl.h" diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 34753f4..152b3b9 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -12,6 +12,8 @@ #ifndef cmCustomCommand_h #define cmCustomCommand_h +#include + #include "cmStandardIncludes.h" #include "cmListFileCache.h" diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index a361153..66644d6 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -12,6 +12,8 @@ #ifndef cmCustomCommandGenerator_h #define cmCustomCommandGenerator_h +#include + #include "cmStandardIncludes.h" class cmCustomCommand; diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 8f1813c..f22de79 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -12,6 +12,8 @@ #ifndef cmDefinitions_h #define cmDefinitions_h +#include + #include "cmStandardIncludes.h" #include "cmLinkedTree.h" diff --git a/Source/cmDepends.h b/Source/cmDepends.h index 0e1cbb9..b9d47a6 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -12,6 +12,8 @@ #ifndef cmDepends_h #define cmDepends_h +#include + #include "cmStandardIncludes.h" class cmFileTimeComparison; diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx index f7676d9..5d644ce 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/cmDependsJavaLexer.cxx @@ -1,3 +1,5 @@ +#include + #include "cmStandardIncludes.h" #line 2 "cmDependsJavaLexer.cxx" diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 6ff0245..377d584 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -12,6 +12,8 @@ #ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h +#include + #include "cmStandardIncludes.h" #define YYSTYPE cmDependsJavaParserHelper::ParserType diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index ac36c8b..c82e1d4 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -12,6 +12,8 @@ #ifndef _cmDocumentation_h #define _cmDocumentation_h +#include + #include "cmStandardIncludes.h" #include "cmDocumentationFormatter.h" diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 7c4c35b..7a93120 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -12,6 +12,8 @@ #ifndef _cmDocumentationFormatter_h #define _cmDocumentationFormatter_h +#include + #include "cmStandardIncludes.h" /** This is just a helper class to make it build with MSVC 6.0. diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index 58d9ae9..d9b8990 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -17,6 +17,8 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 8006514..14e1454 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -12,6 +12,8 @@ #ifndef cmExecutionStatus_h #define cmExecutionStatus_h +#include + #include "cmStandardIncludes.h" /** \class cmExecutionStatus diff --git a/Source/cmExpandedCommandArgument.h b/Source/cmExpandedCommandArgument.h index 1f8e405..fa0eaa9 100644 --- a/Source/cmExpandedCommandArgument.h +++ b/Source/cmExpandedCommandArgument.h @@ -12,6 +12,8 @@ #ifndef cmExpandedCommandArgument_h #define cmExpandedCommandArgument_h +#include + #include "cmStandardIncludes.h" /** \class cmExpandedCommandArgument diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx index 4704f03..b16ec1a 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -1,3 +1,5 @@ +#include + #include "cmStandardIncludes.h" #line 2 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index af0b916..8e3d996 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -12,6 +12,8 @@ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h +#include + #include "cmStandardIncludes.h" #define YYSTYPE cmExprParserHelper::ParserType diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h index 6ae5533..7d10ce1 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -12,6 +12,8 @@ #ifndef cmExternalMakefileProjectGenerator_h #define cmExternalMakefileProjectGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmDocumentation.h" diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 538b716..38b90e1 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -13,6 +13,8 @@ #ifndef cmFileLock_h #define cmFileLock_h +#include + #include "cmStandardIncludes.h" #if defined(_WIN32) diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index dc42e6f..a3883da 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -12,6 +12,8 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h index d5ac354..10d4c13 100644 --- a/Source/cmFileLockResult.h +++ b/Source/cmFileLockResult.h @@ -13,6 +13,8 @@ #ifndef cmFileLockResult_h #define cmFileLockResult_h +#include + #include "cmStandardIncludes.h" #if defined(_WIN32) diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 42e89b1..619c71b 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -13,6 +13,8 @@ #ifndef cmFilePathUuid_h #define cmFilePathUuid_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h index 409bd64..52e974c 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -12,6 +12,8 @@ #ifndef cmFileTimeComparison_h #define cmFileTimeComparison_h +#include + #include "cmStandardIncludes.h" class cmFileTimeComparisonInternal; diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index 07e1b1c..5f1c7ac 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -13,6 +13,8 @@ #define cmFortranParser_h #if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx) +#include + #include "cmStandardIncludes.h" #endif diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h index c7e3b71..4a600e7 100644 --- a/Source/cmFunctionBlocker.h +++ b/Source/cmFunctionBlocker.h @@ -12,6 +12,8 @@ #ifndef cmFunctionBlocker_h #define cmFunctionBlocker_h +#include + #include "cmStandardIncludes.h" #include "cmExecutionStatus.h" diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index 3480c5b..e5e3320 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -12,6 +12,8 @@ #ifndef cmGeneratedFileStream_h #define cmGeneratedFileStream_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 2f91608..75e69b4 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -13,6 +13,8 @@ #ifndef cmGeneratorExpression_h #define cmGeneratorExpression_h +#include + #include "cmStandardIncludes.h" #include "cmListFileCache.h" diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index 6b7fe9a..e522728 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -12,6 +12,8 @@ #ifndef cmGeneratorExpressionDAGChecker_h #define cmGeneratorExpressionDAGChecker_h +#include + #include "cmStandardIncludes.h" #include "cmGeneratorExpressionEvaluator.h" diff --git a/Source/cmGeneratorExpressionLexer.h b/Source/cmGeneratorExpressionLexer.h index 72ad731..6bd336b 100644 --- a/Source/cmGeneratorExpressionLexer.h +++ b/Source/cmGeneratorExpressionLexer.h @@ -12,6 +12,8 @@ #ifndef cmGeneratorExpressionLexer_h #define cmGeneratorExpressionLexer_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h index b388455..4d8a757 100644 --- a/Source/cmGhsMultiGpj.h +++ b/Source/cmGhsMultiGpj.h @@ -12,6 +12,8 @@ #ifndef cmGhsMultiGpj_h #define cmGhsMultiGpj_h +#include + #include "cmStandardIncludes.h" class cmGeneratedFileStream; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 089a637..dc80a33 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -13,6 +13,8 @@ #ifndef cmGlobalGenerator_h #define cmGlobalGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmExportSetMap.h" // For cmExportSetMap diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index 74d3145..26bc2c0 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -13,6 +13,10 @@ #ifndef cmGlobalGeneratorFactory_h #define cmGlobalGeneratorFactory_h +#include + +#include + #include "cmStandardIncludes.h" class cmake; diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h index 5666d48..65bed5e 100644 --- a/Source/cmGraphAdjacencyList.h +++ b/Source/cmGraphAdjacencyList.h @@ -12,6 +12,8 @@ #ifndef cmGraphAdjacencyList_h #define cmGraphAdjacencyList_h +#include + #include "cmStandardIncludes.h" /** diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index c73d82d..0643785 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -12,6 +12,8 @@ #ifndef CMGRAPHVIZWRITER_H #define CMGRAPHVIZWRITER_H +#include + #include "cmStandardIncludes.h" #include "cmGeneratedFileStream.h" diff --git a/Source/cmHexFileConverter.h b/Source/cmHexFileConverter.h index 56fa9b1..06616a2 100644 --- a/Source/cmHexFileConverter.h +++ b/Source/cmHexFileConverter.h @@ -12,6 +12,8 @@ #ifndef cmHexFileConverter_h #define cmHexFileConverter_h +#include + #include "cmStandardIncludes.h" /** \class cmHexFileConverter diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index fac7d4e..df0f82e 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -12,6 +12,8 @@ #ifndef cmIDEOptions_h #define cmIDEOptions_h +#include + #include "cmStandardIncludes.h" #include "cmIDEFlagTable.h" diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h index 6ccb3e8..2ef421f 100644 --- a/Source/cmInstallCommandArguments.h +++ b/Source/cmInstallCommandArguments.h @@ -13,6 +13,8 @@ #ifndef cmInstallCommandArguments_h #define cmInstallCommandArguments_h +#include + #include "cmStandardIncludes.h" #include "cmCommandArgumentsHelper.h" diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h index 6b31074..466aaa7 100644 --- a/Source/cmLinkedTree.h +++ b/Source/cmLinkedTree.h @@ -12,6 +12,8 @@ #ifndef cmLinkedTree_h #define cmLinkedTree_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index cd44536..08b59eb 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -12,6 +12,8 @@ #ifndef cmListFileCache_h #define cmListFileCache_h +#include + #include "cmStandardIncludes.h" #include "cmState.h" diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index fa4bb30..f7a4074 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -12,6 +12,8 @@ #ifndef cmLocalGenerator_h #define cmLocalGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmOutputConverter.h" diff --git a/Source/cmLocale.h b/Source/cmLocale.h index f922c03..f9bc458 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -12,6 +12,8 @@ #ifndef cmLocale_h #define cmLocale_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmNinjaTypes.h b/Source/cmNinjaTypes.h index 82a5220..d3816bb 100644 --- a/Source/cmNinjaTypes.h +++ b/Source/cmNinjaTypes.h @@ -13,6 +13,8 @@ #ifndef cmNinjaTypes_h #define cmNinjaTypes_h +#include + #include "cmStandardIncludes.h" typedef std::vector cmNinjaDeps; diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h index 55a3c75..2dc1e4a 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -12,6 +12,8 @@ #ifndef cmOSXBundleGenerator_h #define cmOSXBundleGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmSourceFile.h" diff --git a/Source/cmObject.h b/Source/cmObject.h index d883c52..cb683f6 100644 --- a/Source/cmObject.h +++ b/Source/cmObject.h @@ -12,6 +12,8 @@ #ifndef cmObject_h #define cmObject_h +#include + #include "cmStandardIncludes.h" /** \class cmObject diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 38e197c..13823a1 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -12,6 +12,8 @@ #ifndef cmOrderDirectories_h #define cmOrderDirectories_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 9af9659..02468c8 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -12,6 +12,8 @@ #ifndef cmOutputConverter_h #define cmOutputConverter_h +#include + #include "cmStandardIncludes.h" #include "cmGlobalGenerator.h" diff --git a/Source/cmPathLabel.h b/Source/cmPathLabel.h index 39fbec3..e065110 100644 --- a/Source/cmPathLabel.h +++ b/Source/cmPathLabel.h @@ -12,6 +12,8 @@ #ifndef cmPathLabel_h #define cmPathLabel_h +#include + #include "cmStandardIncludes.h" /** \class cmPathLabel diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index b411597..c5a7aba 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -14,6 +14,8 @@ #ifndef cmQtAutoGeneratorInitializer_h #define cmQtAutoGeneratorInitializer_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index fab2d19..ba439d4 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -14,6 +14,8 @@ #ifndef cmQtAutoGenerators_h #define cmQtAutoGenerators_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmRST.h b/Source/cmRST.h index 0e379b6..895901a 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -12,6 +12,8 @@ #ifndef _cmRST_h #define _cmRST_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index ef0766f..4f4dd9e 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -12,6 +12,8 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h +#include + #include "cmStandardIncludes.h" class cmScriptGeneratorIndent diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h index 65f703f..7624d03 100644 --- a/Source/cmSearchPath.h +++ b/Source/cmSearchPath.h @@ -12,6 +12,8 @@ #ifndef cmSearchPath_h #define cmSearchPath_h +#include + #include "cmStandardIncludes.h" class cmFindCommon; diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h index 7989173..d41f2bd 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -12,6 +12,8 @@ #ifndef cmSourceFileLocation_h #define cmSourceFileLocation_h +#include + #include "cmStandardIncludes.h" class cmMakefile; diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 1f5232e..c7f093f 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -12,6 +12,8 @@ #ifndef cmSourceGroup_h #define cmSourceGroup_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h index 954d8f6..f30705d 100644 --- a/Source/cmTargetDepend.h +++ b/Source/cmTargetDepend.h @@ -12,6 +12,8 @@ #ifndef cmTargetDepend_h #define cmTargetDepend_h +#include + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmTargetExport.h b/Source/cmTargetExport.h index 2781337..b3882c4 100644 --- a/Source/cmTargetExport.h +++ b/Source/cmTargetExport.h @@ -12,6 +12,8 @@ #ifndef cmTargetExport_h #define cmTargetExport_h +#include + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmTimestamp.h b/Source/cmTimestamp.h index 77e1f7a..3a72caa 100644 --- a/Source/cmTimestamp.h +++ b/Source/cmTimestamp.h @@ -12,6 +12,8 @@ #ifndef cmTimestamp_h #define cmTimestamp_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 109a100..72a70df 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioTargetGenerator_h #define cmVisualStudioTargetGenerator_h +#include + #include "cmStandardIncludes.h" class cmMakefile; diff --git a/Source/cmVisualStudioSlnData.h b/Source/cmVisualStudioSlnData.h index 4508370..982b976 100644 --- a/Source/cmVisualStudioSlnData.h +++ b/Source/cmVisualStudioSlnData.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioSlnData_h #define cmVisualStudioSlnData_h +#include + #include "cmStandardIncludes.h" class cmSlnProjectEntry diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h index b9f8a92..62fd936 100644 --- a/Source/cmVisualStudioSlnParser.h +++ b/Source/cmVisualStudioSlnParser.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioSlnParser_h #define cmVisualStudioSlnParser_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h index 2b20eba..ca58a9a 100644 --- a/Source/cmVisualStudioWCEPlatformParser.h +++ b/Source/cmVisualStudioWCEPlatformParser.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioWCEPlatformParser_h #define cmVisualStudioWCEPlatformParser_h +#include + #include "cmStandardIncludes.h" #include "cmXMLParser.h" diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index ed917af..a0aa2b7 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -12,6 +12,8 @@ #ifndef cmXCodeObject_h #define cmXCodeObject_h +#include + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmake.h b/Source/cmake.h index dbe936b..91a23cd 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -13,6 +13,8 @@ #ifndef cmake_h #define cmake_h +#include + #include "cmStandardIncludes.h" #include "cmCacheManager.h" diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 8da2103..1096d0c 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -13,6 +13,8 @@ #ifndef cmcmd_h #define cmcmd_h +#include + #include "cmStandardIncludes.h" class cmcmd https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bcb5de0c65497edab68a1cd3e3ebfde36e11910 commit 6bcb5de0c65497edab68a1cd3e3ebfde36e11910 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:04:35 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 1 20:04:35 2016 +0200 Tests/CMakeLib: include what you use diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx index e5a2f4d..a31cc42 100644 --- a/Tests/CMakeLib/testGeneratedFileStream.cxx +++ b/Tests/CMakeLib/testGeneratedFileStream.cxx @@ -12,6 +12,9 @@ #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include +#include + #define cmFailed(m1, m2) \ std::cout << "FAILED: " << m1 << m2 << "\n"; \ failed = 1 diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx index 019a2dd..c99a925 100644 --- a/Tests/CMakeLib/testUTF8.cxx +++ b/Tests/CMakeLib/testUTF8.cxx @@ -10,9 +10,7 @@ See the License for more information. ============================================================================*/ #include - #include -#include typedef char test_utf8_char[5]; diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 4970ccc..356880c 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -9,9 +9,11 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include +#include "cmXMLSafe.h" -#include "cmStandardIncludes.h" +#include +#include +#include struct test_pair { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e19e1a85857ea93ea4aa2e0c68e14d5de8efa939 commit e19e1a85857ea93ea4aa2e0c68e14d5de8efa939 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:02:57 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 1 20:02:57 2016 +0200 Tests/CMakeLib: use cmsys::ifstream diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 502ffe7..529c830 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -1,6 +1,6 @@ #include "cmSystemTools.h" -#include +#include #include #include #include @@ -26,7 +26,10 @@ public: }; typedef std::vector TranslationUnitsType; - CompileCommandParser(std::ifstream* input) { this->Input = input; } + CompileCommandParser(std::istream& input) + : Input(input) + { + } void Parse() { @@ -109,8 +112,8 @@ private: void Next() { - this->C = char(Input->get()); - if (this->Input->bad()) { + this->C = char(Input.get()); + if (this->Input.bad()) { ErrorExit("Unexpected end of file."); } } @@ -131,13 +134,13 @@ private: TranslationUnitsType TranslationUnits; CommandType Command; std::string String; - std::ifstream* Input; + std::istream& Input; }; int main() { - std::ifstream file("compile_commands.json"); - CompileCommandParser parser(&file); + cmsys::ifstream file("compile_commands.json"); + CompileCommandParser parser(file); parser.Parse(); for (CompileCommandParser::TranslationUnitsType::const_iterator it = parser.GetTranslationUnits().begin(), diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx index e5a96c2..cc92693 100644 --- a/Tests/CMakeLib/testRST.cxx +++ b/Tests/CMakeLib/testRST.cxx @@ -10,9 +10,12 @@ See the License for more information. ============================================================================*/ #include "cmRST.h" - #include "cmSystemTools.h" +#include +#include +#include + void reportLine(std::ostream& os, bool ret, std::string const& line, bool eol) { if (ret) { @@ -52,8 +55,8 @@ int testRST(int argc, char* argv[]) } // Compare expected and actual outputs. - std::ifstream e_fin(e_name.c_str()); - std::ifstream a_fin(a_name.c_str()); + cmsys::ifstream e_fin(e_name.c_str()); + cmsys::ifstream a_fin(a_name.c_str()); if (!e_fin) { std::cerr << "Could not open input " << e_name << std::endl; return 1; ----------------------------------------------------------------------- Summary of changes: Source/CPack/WiX/cmWIXRichTextFormatWriter.h | 2 + Source/CPack/cmCPackComponentGroup.h | 2 + Source/CursesDialog/cmCursesStandardIncludes.h | 2 + Source/bindexplib.h | 2 + Source/cmAlgorithms.h | 2 + Source/cmCTest.cxx | 56 ++++++++++---------- Source/cmCTest.h | 26 ++++------ Source/cmCallVisualStudioMacro.h | 2 + Source/cmCommandArgumentParserHelper.cxx | 8 ++- Source/cmCommandArgumentParserHelper.h | 5 +- Source/cmCommandArgumentsHelper.h | 2 + Source/cmConditionEvaluator.cxx | 1 + Source/cmConfigure.cmake.h.in | 2 +- Source/cmCryptoHash.cxx | 2 + Source/cmCryptoHash.h | 4 +- Source/cmCurl.cxx | 2 +- Source/cmCurl.h | 5 +- Source/cmCustomCommand.cxx | 2 +- Source/cmCustomCommand.h | 8 ++- Source/cmCustomCommandGenerator.cxx | 7 +++ Source/cmCustomCommandGenerator.h | 7 ++- Source/cmDefinitions.cxx | 2 + Source/cmDefinitions.h | 9 ++-- Source/cmDepends.cxx | 3 ++ Source/cmDepends.h | 9 +++- Source/cmDependsC.cxx | 5 +- Source/cmDependsC.h | 9 ++++ Source/cmDependsFortran.cxx | 8 ++- Source/cmDependsFortran.h | 7 +++ Source/cmDependsJava.cxx | 1 - Source/cmDependsJava.h | 7 +++ Source/cmDependsJavaLexer.cxx | 2 + Source/cmDependsJavaParserHelper.cxx | 7 +++ Source/cmDependsJavaParserHelper.h | 5 +- Source/cmDocumentation.cxx | 9 ++-- Source/cmDocumentation.h | 14 ++--- Source/cmDocumentationFormatter.cxx | 6 +++ Source/cmDocumentationFormatter.h | 4 +- Source/cmDocumentationSection.h | 7 ++- Source/cmDynamicLoader.cxx | 7 +++ Source/cmDynamicLoader.h | 2 +- Source/cmELF.cxx | 9 +++- Source/cmELF.h | 5 ++ Source/cmExecutionStatus.h | 2 + Source/cmExpandedCommandArgument.h | 2 + Source/cmExportBuildFileGenerator.cxx | 14 +++++ Source/cmExportBuildFileGenerator.h | 10 +++- Source/cmExportFileGenerator.cxx | 13 +++-- Source/cmExportFileGenerator.h | 14 +++-- Source/cmExportInstallFileGenerator.cxx | 10 ++++ Source/cmExportInstallFileGenerator.h | 10 ++++ Source/cmExportSet.h | 7 ++- Source/cmExportSetMap.cxx | 2 + Source/cmExportSetMap.h | 5 +- Source/cmExportTryCompileFileGenerator.cxx | 11 +++- Source/cmExportTryCompileFileGenerator.h | 12 ++++- Source/cmExprLexer.cxx | 2 + Source/cmExprParserHelper.cxx | 6 ++- Source/cmExprParserHelper.h | 8 +-- Source/cmExternalMakefileProjectGenerator.cxx | 2 +- Source/cmExternalMakefileProjectGenerator.h | 6 ++- Source/cmExtraCodeBlocksGenerator.cxx | 13 +++-- Source/cmExtraCodeBlocksGenerator.h | 7 ++- Source/cmExtraCodeLiteGenerator.cxx | 16 +++--- Source/cmExtraCodeLiteGenerator.h | 6 +++ Source/cmExtraEclipseCDT4Generator.cxx | 19 +++++-- Source/cmExtraEclipseCDT4Generator.h | 10 +++- Source/cmExtraKateGenerator.cxx | 12 +++-- Source/cmExtraKateGenerator.h | 6 ++- Source/cmExtraSublimeTextGenerator.cxx | 11 ++-- Source/cmExtraSublimeTextGenerator.h | 12 +++-- Source/cmFileLock.h | 4 +- Source/cmFileLockPool.h | 5 +- Source/cmFileLockResult.cxx | 1 + Source/cmFileLockResult.h | 4 +- Source/cmFilePathUuid.cxx | 3 ++ Source/cmFilePathUuid.h | 3 +- Source/cmFileTimeComparison.cxx | 13 +++-- Source/cmFileTimeComparison.h | 2 +- Source/cmFortranParser.h | 2 + Source/cmFortranParserImpl.cxx | 9 +++- Source/cmFunctionBlocker.h | 2 + Source/cmGeneratedFileStream.cxx | 2 + Source/cmGeneratedFileStream.h | 3 +- Source/cmGeneratorExpression.cxx | 8 +-- Source/cmGeneratorExpression.h | 14 ++--- Source/cmGeneratorExpressionContext.cxx | 2 - Source/cmGeneratorExpressionDAGChecker.cxx | 8 +++ Source/cmGeneratorExpressionDAGChecker.h | 11 +++- Source/cmGeneratorExpressionEvaluationFile.cxx | 9 +++- Source/cmGeneratorExpressionEvaluationFile.h | 5 ++ Source/cmGeneratorExpressionEvaluator.cxx | 17 ++---- Source/cmGeneratorExpressionEvaluator.h | 6 +-- Source/cmGeneratorExpressionLexer.h | 4 +- Source/cmGeneratorExpressionNode.cxx | 36 +++++++++++-- Source/cmGeneratorExpressionNode.h | 20 +++---- Source/cmGeneratorExpressionParser.cxx | 3 +- Source/cmGeneratorExpressionParser.h | 5 +- Source/cmGeneratorTarget.cxx | 20 +++++-- Source/cmGeneratorTarget.h | 13 ++++- Source/cmGhsMultiGpj.h | 2 + Source/cmGhsMultiTargetGenerator.cxx | 1 + Source/cmGlobalCommonGenerator.cxx | 2 + Source/cmGlobalCommonGenerator.h | 4 ++ Source/cmGlobalGenerator.cxx | 20 ++++--- Source/cmGlobalGenerator.h | 32 +++++++----- Source/cmGlobalGeneratorFactory.h | 4 ++ Source/cmGlobalGhsMultiGenerator.cxx | 1 + Source/cmGlobalKdevelopGenerator.cxx | 12 +++-- Source/cmGlobalKdevelopGenerator.h | 5 ++ Source/cmGlobalNinjaGenerator.cxx | 13 ++++- Source/cmGlobalNinjaGenerator.h | 22 ++++++-- Source/cmGlobalUnixMakefileGenerator3.cxx | 12 +++++ Source/cmGlobalUnixMakefileGenerator3.h | 18 ++++++- Source/cmGlobalVisualStudio10Generator.cxx | 1 + Source/cmGlobalVisualStudio71Generator.cxx | 1 + Source/cmGlobalVisualStudio7Generator.cxx | 1 + Source/cmGlobalVisualStudio8Generator.cxx | 1 + Source/cmGlobalWatcomWMakeGenerator.cxx | 4 +- Source/cmGlobalWatcomWMakeGenerator.h | 10 ++++ Source/cmGraphAdjacencyList.h | 2 + Source/cmGraphVizWriter.cxx | 10 ++++ Source/cmGraphVizWriter.h | 12 +++-- Source/cmHexFileConverter.h | 2 + Source/cmIDEOptions.h | 2 + Source/cmInstallCommandArguments.h | 2 + Source/cmInstallDirectoryGenerator.cxx | 3 ++ Source/cmInstallDirectoryGenerator.h | 8 +++ Source/cmInstallExportGenerator.cxx | 18 +++---- Source/cmInstallExportGenerator.h | 12 +++-- Source/cmInstallFilesGenerator.cxx | 6 ++- Source/cmInstallFilesGenerator.h | 9 ++++ Source/cmInstallGenerator.cxx | 2 + Source/cmInstallGenerator.h | 6 +++ Source/cmInstallScriptGenerator.cxx | 5 ++ Source/cmInstallScriptGenerator.h | 5 ++ Source/cmInstallTargetGenerator.cxx | 10 +++- Source/cmInstallTargetGenerator.h | 8 +++ Source/cmInstalledFile.cxx | 4 ++ Source/cmInstalledFile.h | 7 +++ Source/cmLinkedTree.h | 2 + Source/cmListFileCache.cxx | 7 ++- Source/cmListFileCache.h | 7 ++- Source/cmLocalCommonGenerator.cxx | 5 ++ Source/cmLocalCommonGenerator.h | 9 +++- Source/cmLocalGenerator.cxx | 14 +++-- Source/cmLocalGenerator.h | 21 +++++--- Source/cmLocalNinjaGenerator.cxx | 9 ++++ Source/cmLocalNinjaGenerator.h | 18 ++++++- Source/cmLocalUnixMakefileGenerator3.cxx | 16 ++++-- Source/cmLocalUnixMakefileGenerator3.h | 15 ++++-- Source/cmLocalVisualStudio10Generator.cxx | 2 + Source/cmLocalVisualStudioGenerator.cxx | 1 + Source/cmLocalXCodeGenerator.cxx | 1 + Source/cmLocale.h | 2 + Source/cmMakefile.cxx | 13 ++--- Source/cmMakefile.h | 4 ++ Source/cmMessenger.cxx | 8 ++- Source/cmMessenger.h | 7 ++- Source/cmNinjaTypes.h | 2 + Source/cmOSXBundleGenerator.cxx | 6 +++ Source/cmOSXBundleGenerator.h | 11 ++-- Source/cmObject.h | 2 + Source/cmOrderDirectories.cxx | 6 ++- Source/cmOrderDirectories.h | 10 ++-- Source/cmOutputConverter.cxx | 8 +-- Source/cmOutputConverter.h | 6 ++- Source/cmPathLabel.h | 2 + Source/cmQtAutoGeneratorInitializer.cxx | 29 +++++++++-- Source/cmQtAutoGeneratorInitializer.h | 7 +-- Source/cmQtAutoGenerators.cxx | 13 +++-- Source/cmQtAutoGenerators.h | 3 +- Source/cmRST.cxx | 5 ++ Source/cmRST.h | 7 ++- Source/cmScriptGenerator.cxx | 2 + Source/cmScriptGenerator.h | 6 ++- Source/cmSearchPath.h | 2 + Source/cmSourceFile.cxx | 5 ++ Source/cmSourceFile.h | 10 ++-- Source/cmSourceFileLocation.cxx | 7 ++- Source/cmSourceFileLocation.h | 4 +- Source/cmSourceGroup.h | 6 ++- Source/cmSystemTools.cxx | 66 +++++++++++++----------- Source/cmTargetDepend.h | 2 + Source/cmTargetExport.h | 2 + Source/cmTestGenerator.cxx | 1 + Source/cmTimestamp.h | 2 + Source/cmVisualStudio10TargetGenerator.h | 2 + Source/cmVisualStudioSlnData.h | 2 + Source/cmVisualStudioSlnParser.h | 2 + Source/cmVisualStudioWCEPlatformParser.h | 2 + Source/cmXCodeObject.h | 2 + Source/cmake.cxx | 34 ++++++++---- Source/cmake.h | 20 +++---- Source/cmakemain.cxx | 13 +++-- Source/cmcmd.cxx | 27 ++++++---- Source/cmcmd.h | 5 +- Source/ctest.cxx | 17 +++--- Tests/CMakeLib/run_compile_commands.cxx | 17 +++--- Tests/CMakeLib/testGeneratedFileStream.cxx | 3 ++ Tests/CMakeLib/testRST.cxx | 9 ++-- Tests/CMakeLib/testUTF8.cxx | 2 - Tests/CMakeLib/testXMLSafe.cxx | 6 ++- 203 files changed, 1213 insertions(+), 410 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 15:36:40 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 15:36:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1694-g4db1df2 Message-ID: <20160901193640.9967AF5D81@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, next has been updated via 4db1df2da06cfa05b1f26546ca7deba40477b4e6 (commit) via 0cbaaf2dc3e250fe0f4b056e229e3fcfbe6a8534 (commit) from 635a4f5a4fb965ab98cc60d068101ecb03d6b8d7 (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=4db1df2da06cfa05b1f26546ca7deba40477b4e6 commit 4db1df2da06cfa05b1f26546ca7deba40477b4e6 Merge: 635a4f5 0cbaaf2 Author: Brad King AuthorDate: Thu Sep 1 15:36:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 15:36:39 2016 -0400 Merge topic 'GenerateExportHeader-fix-add_compiler_export_flags' into next 0cbaaf2d GenerateExportHeader: Fix add_compiler_export_flags regression https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cbaaf2dc3e250fe0f4b056e229e3fcfbe6a8534 commit 0cbaaf2dc3e250fe0f4b056e229e3fcfbe6a8534 Author: Brad King AuthorDate: Thu Sep 1 15:32:32 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 15:33:49 2016 -0400 GenerateExportHeader: Fix add_compiler_export_flags regression The mechanical conversion in commit 5d0d980d (Use string(APPEND) in Modules, 2016-07-28) accidentally introduced use of string(APPEND ... PARENT_SCOPE) Split that into the string(APPEND) and set(PARENT_SCOPE) pieces. diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 735a0d7..e33b927 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -415,6 +415,7 @@ function(add_compiler_export_flags) if(ARGC GREATER 0) set(${ARGV0} "${EXTRA_FLAGS}" PARENT_SCOPE) else() - string(APPEND CMAKE_CXX_FLAGS " ${EXTRA_FLAGS}" PARENT_SCOPE) + string(APPEND CMAKE_CXX_FLAGS " ${EXTRA_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE) endif() endfunction() ----------------------------------------------------------------------- Summary of changes: Modules/GenerateExportHeader.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 15:56:31 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 15:56:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1696-gda6f1e4 Message-ID: <20160901195631.C3288F59FD@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, next has been updated via da6f1e440ef5804656ff085761233d6208bb613a (commit) via 0bacb0f108a2e2b0670d5a17c031cb75b8d09428 (commit) from 4db1df2da06cfa05b1f26546ca7deba40477b4e6 (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=da6f1e440ef5804656ff085761233d6208bb613a commit da6f1e440ef5804656ff085761233d6208bb613a Merge: 4db1df2 0bacb0f Author: Brad King AuthorDate: Thu Sep 1 15:56:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 15:56:30 2016 -0400 Merge topic 'include-what-you-use' into next 0bacb0f1 fixup! fix a load of include-what-you-use violations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0bacb0f108a2e2b0670d5a17c031cb75b8d09428 commit 0bacb0f108a2e2b0670d5a17c031cb75b8d09428 Author: Brad King AuthorDate: Thu Sep 1 15:55:49 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 15:55:49 2016 -0400 fixup! fix a load of include-what-you-use violations diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index 94d487e..eec773f 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -13,6 +13,12 @@ #include "cmThirdParty.h" +#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ + !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) +#define CMAKE_FIND_CAFILE +#include "cmSystemTools.h" +#endif + // curl versions before 7.21.5 did not provide this error code #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505 #define CURLE_NOT_BUILT_IN 4 @@ -32,8 +38,7 @@ std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile) ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); } -#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ - !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) +#ifdef CMAKE_FIND_CAFILE #define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt" else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) { ::CURLcode res = ----------------------------------------------------------------------- Summary of changes: Source/cmCurl.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 1 15:57:57 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 1 Sep 2016 15:57:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1698-g1ec2259 Message-ID: <20160901195757.B430AF5A3D@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, next has been updated via 1ec2259fe60a0d147bd85ce171120a5bdafa6fbe (commit) via 62c369ab85c290d28165b6cd176f797e919688bd (commit) from da6f1e440ef5804656ff085761233d6208bb613a (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=1ec2259fe60a0d147bd85ce171120a5bdafa6fbe commit 1ec2259fe60a0d147bd85ce171120a5bdafa6fbe Merge: da6f1e4 62c369a Author: Brad King AuthorDate: Thu Sep 1 15:57:56 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 15:57:56 2016 -0400 Merge topic 'include-what-you-use' into next 62c369ab fixup! fix a load of include-what-you-use violations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62c369ab85c290d28165b6cd176f797e919688bd commit 62c369ab85c290d28165b6cd176f797e919688bd Author: Brad King AuthorDate: Thu Sep 1 15:57:49 2016 -0400 Commit: Brad King CommitDate: Thu Sep 1 15:57:49 2016 -0400 fixup! fix a load of include-what-you-use violations diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index ee3389c..5a8a5be 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -27,6 +27,8 @@ #include #include +#include "cmSystemTools.h" // IWYU pragma: keep + static const char* cmDocumentationName[][2] = { { 0, " cmake-gui - CMake GUI." }, { 0, 0 } }; ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/CMakeSetup.cxx | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From bill.hoffman at kitware.com Thu Sep 1 16:34:40 2016 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Thu, 1 Sep 2016 16:34:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1700-ge623fc9 Message-ID: <20160901203441.32BAFF5EB8@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, next has been updated via e623fc98ca6bfeb4f4fda75b21542aefbcefd78b (commit) via 48b32fae344ca8bab5f0b93b0570e4d8b7ef1eca (commit) from 1ec2259fe60a0d147bd85ce171120a5bdafa6fbe (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=e623fc98ca6bfeb4f4fda75b21542aefbcefd78b commit e623fc98ca6bfeb4f4fda75b21542aefbcefd78b Merge: 1ec2259 48b32fa Author: Bill Hoffman AuthorDate: Thu Sep 1 16:34:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 16:34:37 2016 -0400 Merge topic 'extend_matlab_unit_test' into next 48b32fae remove extra }} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=48b32fae344ca8bab5f0b93b0570e4d8b7ef1eca commit 48b32fae344ca8bab5f0b93b0570e4d8b7ef1eca Author: Bill Hoffman AuthorDate: Thu Sep 1 16:33:22 2016 -0400 Commit: Bill Hoffman CommitDate: Thu Sep 1 16:33:22 2016 -0400 remove extra }} diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 4c787d7..a2289d5 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -795,7 +795,7 @@ function(matlab_add_unit_test) "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" - "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}}" + "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}" "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Thu Sep 1 16:48:07 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Thu, 1 Sep 2016 16:48:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1702-g68be8cd Message-ID: <20160901204807.C9BF2F58C5@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, next has been updated via 68be8cd53896acb0652261fef080155dc1a5248c (commit) via af8e08dd4a1ce3a78ed604a9ffc1adca056ab125 (commit) from e623fc98ca6bfeb4f4fda75b21542aefbcefd78b (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=68be8cd53896acb0652261fef080155dc1a5248c commit 68be8cd53896acb0652261fef080155dc1a5248c Merge: e623fc9 af8e08d Author: Daniel Pfeifer AuthorDate: Thu Sep 1 16:48:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 16:48:06 2016 -0400 Merge topic 'include-what-you-use' into next af8e08dd fixup! fix a load of include-what-you-use violations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af8e08dd4a1ce3a78ed604a9ffc1adca056ab125 commit af8e08dd4a1ce3a78ed604a9ffc1adca056ab125 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 22:47:53 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 1 22:47:53 2016 +0200 fixup! fix a load of include-what-you-use violations diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 9b3c899..25f9e3a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -39,12 +39,6 @@ #include #endif -#include -#include -#include -#include -#include - // only build kdevelop generator on non-windows platforms // when not bootstrapping cmake #if !defined(_WIN32) @@ -97,8 +91,6 @@ #include "cmExtraKateGenerator.h" #include "cmExtraSublimeTextGenerator.h" -class cmCommand; - #ifdef CMAKE_USE_KDEVELOP #include "cmGlobalKdevelopGenerator.h" #endif @@ -107,8 +99,6 @@ class cmCommand; #include "cmExtraEclipseCDT4Generator.h" #endif -#include // required for atoi - #if defined(__APPLE__) #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGlobalXCodeGenerator.h" @@ -119,14 +109,23 @@ class cmCommand; #include #endif +#include // include sys/stat.h after sys/types.h +#include // struct stat + #include +#include +#include +#include #include #include -#include // struct stat -#include +#include +#include +#include #include +class cmCommand; + namespace { #if defined(CMAKE_BUILD_WITH_CMAKE) ----------------------------------------------------------------------- Summary of changes: Source/cmake.cxx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Thu Sep 1 18:17:51 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Thu, 1 Sep 2016 18:17:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1704-gbaaf490 Message-ID: <20160901221751.D7582F5410@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, next has been updated via baaf49013308cac99f67e6430a0553213c31b922 (commit) via 4aec72dd1907952bb874e0e7485a7b89a1ff6426 (commit) from 68be8cd53896acb0652261fef080155dc1a5248c (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=baaf49013308cac99f67e6430a0553213c31b922 commit baaf49013308cac99f67e6430a0553213c31b922 Merge: 68be8cd 4aec72d Author: Daniel Pfeifer AuthorDate: Thu Sep 1 18:17:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 18:17:47 2016 -0400 Merge topic 'include-what-you-use' into next 4aec72dd fixup! fix a load of include-what-you-use violations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4aec72dd1907952bb874e0e7485a7b89a1ff6426 commit 4aec72dd1907952bb874e0e7485a7b89a1ff6426 Author: Daniel Pfeifer AuthorDate: Fri Sep 2 00:16:58 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Sep 2 00:16:58 2016 +0200 fixup! fix a load of include-what-you-use violations diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 277901d..c2e1d53 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -45,7 +45,6 @@ #include #include #include -#include #include void CMakeCommandUsage(const char* program) ----------------------------------------------------------------------- Summary of changes: Source/cmcmd.cxx | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Thu Sep 1 18:55:18 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Thu, 1 Sep 2016 18:55:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1706-gdea9826 Message-ID: <20160901225522.EEBC0F59E0@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, next has been updated via dea9826731fa7bc9c9b9cf58f64c9de2a64a22b3 (commit) via 655237678cf45b6e5f957b7eddb4576b72944747 (commit) from baaf49013308cac99f67e6430a0553213c31b922 (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=dea9826731fa7bc9c9b9cf58f64c9de2a64a22b3 commit dea9826731fa7bc9c9b9cf58f64c9de2a64a22b3 Merge: baaf490 6552376 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 18:55:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 1 18:55:14 2016 -0400 Merge topic 'include-what-you-use' into next 65523767 fixup! fix a load of include-what-you-use violations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=655237678cf45b6e5f957b7eddb4576b72944747 commit 655237678cf45b6e5f957b7eddb4576b72944747 Author: Daniel Pfeifer AuthorDate: Fri Sep 2 00:54:07 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Sep 2 00:54:07 2016 +0200 fixup! fix a load of include-what-you-use violations diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 7fecc4d..6a2dfe8 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCommandArgumentParserHelper.h" +#include + #include "cmCommandArgumentLexer.h" #include "cmMakefile.h" #include "cmState.h" diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 920dd65..a43a7d1 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include ----------------------------------------------------------------------- Summary of changes: Source/cmCommandArgumentParserHelper.cxx | 2 ++ Source/cmLocalGenerator.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Sep 2 00:01:17 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 2 Sep 2016 00:01:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-831-gcb3e091 Message-ID: <20160902040117.1B8F0F5BF8@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 cb3e091a45bfdb24115ef68fa36341cf93419681 (commit) from 0c46750d2c4cee401f1cda047a71b0e349678077 (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=cb3e091a45bfdb24115ef68fa36341cf93419681 commit cb3e091a45bfdb24115ef68fa36341cf93419681 Author: Kitware Robot AuthorDate: Fri Sep 2 00:01:13 2016 -0400 Commit: Kitware Robot CommitDate: Fri Sep 2 00:01:13 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 23c2ce3..b8c7439 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 6) -set(CMake_VERSION_PATCH 20160901) +set(CMake_VERSION_PATCH 20160902) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Fri Sep 2 01:21:53 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Fri, 2 Sep 2016 01:21:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1708-g5ae80fe Message-ID: <20160902052153.D6233F5385@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, next has been updated via 5ae80febe60a0f15532ec439a742f30b5101f552 (commit) via b61a64b3018b4be126f459348773f58d21f72a23 (commit) from dea9826731fa7bc9c9b9cf58f64c9de2a64a22b3 (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=5ae80febe60a0f15532ec439a742f30b5101f552 commit 5ae80febe60a0f15532ec439a742f30b5101f552 Merge: dea9826 b61a64b Author: Daniel Pfeifer AuthorDate: Fri Sep 2 01:21:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 01:21:51 2016 -0400 Merge topic 'include-what-you-use' into next b61a64b3 fixup! fix a load of include-what-you-use violations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b61a64b3018b4be126f459348773f58d21f72a23 commit b61a64b3018b4be126f459348773f58d21f72a23 Author: Daniel Pfeifer AuthorDate: Fri Sep 2 07:21:29 2016 +0200 Commit: Daniel Pfeifer CommitDate: Fri Sep 2 07:21:29 2016 +0200 fixup! fix a load of include-what-you-use violations diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index a43e6c1..6fff984 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index 6202d6d..b2def51 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -17,7 +17,6 @@ #include "cmMakefile.h" #include "cmSystemTools.h" -#include #include cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile) ----------------------------------------------------------------------- Summary of changes: Source/cmELF.cxx | 1 - Source/cmFilePathUuid.cxx | 1 - 2 files changed, 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 08:23:53 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 08:23:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1710-g00e4052 Message-ID: <20160902122353.4CAF2F516B@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, next has been updated via 00e4052d40f668ea99b8dad204135ce2095483a1 (commit) via 093a63a40a455b357f3c607d271c240b08b7f2bb (commit) from 5ae80febe60a0f15532ec439a742f30b5101f552 (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=00e4052d40f668ea99b8dad204135ce2095483a1 commit 00e4052d40f668ea99b8dad204135ce2095483a1 Merge: 5ae80fe 093a63a Author: Brad King AuthorDate: Fri Sep 2 08:23:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 08:23:52 2016 -0400 Merge topic 'extend_matlab_unit_test' into next 093a63a4 Revert topic 'extend_matlab_unit_test' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=093a63a40a455b357f3c607d271c240b08b7f2bb commit 093a63a40a455b357f3c607d271c240b08b7f2bb Author: Brad King AuthorDate: Fri Sep 2 08:23:19 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 08:23:32 2016 -0400 Revert topic 'extend_matlab_unit_test' It will be revised to address some design questions and test failures. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index a2289d5..9f96fe6 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -635,7 +635,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve set(devnull INPUT_FILE NUL) endif() - # timeout set to 120 seconds, in case it does not start + # timeout set to 30 seconds, in case it does not start # note as said before OUTPUT_VARIABLE cannot be used in a platform # independent manner however, not setting it would flush the output of Matlab # in the current console (unix variant) @@ -644,17 +644,12 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve OUTPUT_VARIABLE _matlab_version_from_cmd_dummy RESULT_VARIABLE _matlab_result_version_call ERROR_VARIABLE _matlab_result_version_call_error - TIMEOUT 120 + TIMEOUT 30 WORKING_DIRECTORY "${_matlab_temporary_folder}" ${devnull} ) - if("${_matlab_result_version_call}" MATCHES "timeout") - if(MATLAB_FIND_DEBUG) - message(WARNING "[MATLAB] Unable to determine the version of Matlab." - " Matlab call timed out after 120 seconds.") - endif() - return() - endif() + + if(${_matlab_result_version_call}) if(MATLAB_FIND_DEBUG) message(WARNING "[MATLAB] Unable to determine the version of Matlab. Matlab call returned with error ${_matlab_result_version_call}.") @@ -703,6 +698,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve endfunction() + #.rst: # .. command:: matlab_add_unit_test # @@ -724,7 +720,6 @@ endfunction() # matlab_add_unit_test( # NAME # UNITTEST_FILE matlab_file_containing_unittest.m -# [CUSTOM_MATLAB_COMMAND matlab_command_to_run_as_test] # [UNITTEST_PRECOMMAND matlab_command_to_run] # [TIMEOUT timeout] # [ADDITIONAL_PATH path1 [path2 ...]] @@ -740,11 +735,6 @@ endfunction() # ``UNITTEST_FILE`` # the matlab unittest file. Its path will be automatically # added to the Matlab path. -# ``CUSTOM_MATLAB_COMMAND`` -# Matlab script command to run as the test. -# IIf this is not set, then the following is run: -# "runtests('matlab_file_name'), exit(max([ans(1,:).Failed])) -# matlab_file_name comes from UNITTEST_FILE without the .m. # ``UNITTEST_PRECOMMAND`` # Matlab script command to be ran before the file # containing the test (eg. GPU device initialisation based on CMake @@ -758,7 +748,6 @@ endfunction() # ``MATLAB_ADDITIONAL_STARTUP_OPTIONS`` # a list of additional option in order # to run Matlab from the command line. -# -nosplash -nodesktop -nodisplay are always added. # ``TEST_ARGS`` # Additional options provided to the add_test command. These # options are added to the default options (eg. "CONFIGURATIONS Release") @@ -773,9 +762,8 @@ function(matlab_add_unit_test) endif() set(options NO_UNITTEST_FRAMEWORK) - set(oneValueArgs NAME UNITTEST_FILE TIMEOUT WORKING_DIRECTORY) - set(multiValueArgs UNITTEST_PRECOMMAND ADDITIONAL_PATH - MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS CUSTOM_TEST_COMMAND) + set(oneValueArgs NAME UNITTEST_PRECOMMAND UNITTEST_FILE TIMEOUT) + set(multiValueArgs ADDITIONAL_PATH MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS) set(prefix _matlab_unittest_prefix) cmake_parse_arguments(${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) @@ -786,17 +774,15 @@ function(matlab_add_unit_test) add_test(NAME ${${prefix}_NAME} COMMAND ${CMAKE_COMMAND} - "-Dtest_name=${${prefix}_NAME}" - "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}}" - "-Dtest_timeout=${${prefix}_TIMEOUT}" - "-Doutput_directory=${_matlab_temporary_folder}" - "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" - "-DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM}" - "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" - "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" - "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" - "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}" - "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" + -Dtest_name=${${prefix}_NAME} + -Dadditional_paths=${${prefix}_ADDITIONAL_PATH} + -Dtest_timeout=${${prefix}_TIMEOUT} + -Doutput_directory=${_matlab_temporary_folder} + -DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM} + -Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK} + -DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS} + -Dunittest_file_to_run=${${prefix}_UNITTEST_FILE} + -Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND} -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} ${${prefix}_UNPARSED_ARGUMENTS} @@ -1043,11 +1029,9 @@ function(_Matlab_get_version_from_root matlab_root matlab_known_version matlab_f set(matlab_list_of_all_versions) matlab_get_version_from_matlab_run("${Matlab_PROG_VERSION_STRING_AUTO_DETECT}" matlab_list_of_all_versions) - if(matlab_list_of_all_versions) - list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) - else() - set(_matlab_version_tmp "unknown") - endif() + + list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) + # set the version into the cache set(Matlab_VERSION_STRING_INTERNAL ${_matlab_version_tmp} CACHE INTERNAL "Matlab version (automatically determined)" FORCE) diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index 1045be8..0ef4c3e 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -23,12 +23,11 @@ # -DMatlab_PROGRAM=matlab_exe_location # -DMatlab_ADDITIONNAL_STARTUP_OPTIONS="" # -Dtest_name=name_of_the_test -# -Dcustom_Matlab_test_command="" # -Dcmd_to_run_before_test="" # -Dunittest_file_to_run # -P FindMatlab_TestsRedirect.cmake -set(Matlab_UNIT_TESTS_CMD -nosplash -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) +set(Matlab_UNIT_TESTS_CMD -nosplash -nojvm -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) if(WIN32) set(Matlab_UNIT_TESTS_CMD ${Matlab_UNIT_TESTS_CMD} -wait) endif() @@ -37,13 +36,6 @@ if(NOT test_timeout) set(test_timeout 180) endif() -# If timeout is -1, then do not put a timeout on the execute_process -if(test_timeout EQUAL -1) - set(test_timeout "") -else() - set(test_timeout TIMEOUT ${test_timeout}) -endif() - if(NOT cmd_to_run_before_test) set(cmd_to_run_before_test) endif() @@ -58,27 +50,16 @@ foreach(s IN LISTS additional_paths) endif() endforeach() -if(custom_Matlab_test_command) - set(unittest_to_run "${custom_Matlab_test_command}") -else() - set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") -endif() - - +set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") if(no_unittest_framework) set(unittest_to_run "try, ${unittest_file_to_run_name}, catch err, disp('An exception has been thrown during the execution'), disp(err), disp(err.stack), exit(1), end, exit(0)") endif() set(Matlab_SCRIPT_TO_RUN - "addpath(${concat_string}); ${cmd_to_run_before_test}; ${unittest_to_run}" + "addpath(${concat_string}), path, ${cmd_to_run_before_test}, ${unittest_to_run}" ) -if(NOT working_directory) - set(working_directory "${output_directory}") -endif() - -string(REPLACE "/" "_" clean_test_name "${test_name}") -set(Matlab_LOG_FILE "${output_directory}/${clean_test_name}.log") +set(Matlab_LOG_FILE "${output_directory}/${test_name}.log") set(devnull) if(UNIX) @@ -88,11 +69,11 @@ elseif(WIN32) endif() execute_process( - COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${Matlab_LOG_FILE}" -r "${Matlab_SCRIPT_TO_RUN}" + COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${test_name}.log" -r "${Matlab_SCRIPT_TO_RUN}" RESULT_VARIABLE res - ${test_timeout} + TIMEOUT ${test_timeout} OUTPUT_QUIET # we do not want the output twice - WORKING_DIRECTORY ${working_directory} + WORKING_DIRECTORY "${output_directory}" ${devnull} ) @@ -106,5 +87,5 @@ message("Matlab test ${name_of_the_test} output:\n${matlab_log_content}") # if w if(NOT (res EQUAL 0)) - message( FATAL_ERROR "[MATLAB] TEST FAILED Matlab returned ${res}" ) + message( FATAL_ERROR "[MATLAB] TEST FAILED" ) endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 54 +++++++++++++------------------------ Modules/MatlabTestsRedirect.cmake | 35 ++++++------------------ 2 files changed, 27 insertions(+), 62 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 08:41:23 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 08:41:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1712-gc9121b6 Message-ID: <20160902124123.B567EF3BB8@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, next has been updated via c9121b67058dbb5bc2a4d57b8546e5b058d43871 (commit) via 78e78d1c87dfc70be70d58a6ba2ec949df01ef6a (commit) from 00e4052d40f668ea99b8dad204135ce2095483a1 (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=c9121b67058dbb5bc2a4d57b8546e5b058d43871 commit c9121b67058dbb5bc2a4d57b8546e5b058d43871 Merge: 00e4052 78e78d1 Author: Brad King AuthorDate: Fri Sep 2 08:41:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 08:41:23 2016 -0400 Merge topic 'libuv-scanbuild-fixes' into next 78e78d1c fixup! CTestCustom: Suppress scan-build warning in libuv https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78e78d1c87dfc70be70d58a6ba2ec949df01ef6a commit 78e78d1c87dfc70be70d58a6ba2ec949df01ef6a Author: Brad King AuthorDate: Fri Sep 2 08:41:02 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 08:41:02 2016 -0400 fixup! CTestCustom: Suppress scan-build warning in libuv diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 4a540d2..1699492 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -62,6 +62,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning.*This version of Mac OS X is unsupported" "clang.*: warning: argument unused during compilation: .-g" "note: in expansion of macro" # diagnostic context note + "note: expanded from macro" # diagnostic context note "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*may return deterministic values" "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*isn.*t random" # we do not do crypto "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*srand.*seed choices are.*poor" # we do not do crypto @@ -83,6 +84,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.." "liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined" "libuv/src/.*:[0-9]+:[0-9]+: warning: Dereference of null pointer" + "libuv/src/.*:[0-9]+:[0-9]+: warning: The left operand of '==' is a garbage value" ) if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:20:42 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:20:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1715-g6e3215e Message-ID: <20160902132042.1C265F4314@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, next has been updated via 6e3215e77b4d73acf662ddcddbaf9f762dde77e6 (commit) via 228f4e9b336757ddbf3085637e47962692278c45 (commit) via b481ddb3df21e02e16038854ec7d256601717018 (commit) from c9121b67058dbb5bc2a4d57b8546e5b058d43871 (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=6e3215e77b4d73acf662ddcddbaf9f762dde77e6 commit 6e3215e77b4d73acf662ddcddbaf9f762dde77e6 Merge: c9121b6 228f4e9 Author: Brad King AuthorDate: Fri Sep 2 09:20:37 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 09:20:37 2016 -0400 Merge branch 'autogen-base32' into next https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=228f4e9b336757ddbf3085637e47962692278c45 commit 228f4e9b336757ddbf3085637e47962692278c45 Author: Sebastian Holtermann AuthorDate: Thu Sep 1 13:17:58 2016 +0200 Commit: Brad King CommitDate: Fri Sep 2 09:19:00 2016 -0400 cmFilePathUuid: Use Base32 string instead of Base64 string This produces files that will not collide on a case-insensitive filesystem. It also avoids the need for special character substitutions. diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index 2839b63..f99646c 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -12,10 +12,10 @@ #include "cmFilePathUuid.h" +#include "cmBase32.h" #include "cmCryptoHash.h" #include "cmMakefile.h" #include "cmSystemTools.h" -#include "cmsys/Base64.h" cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile) { @@ -111,22 +111,16 @@ std::string cmFilePathUuid::GetChecksumString( const std::string& sourceFilename, const std::string& sourceRelPath, const std::string& sourceRelSeed) { - std::string checksumBase64; + std::string checksumBase32; { // Calculate the file ( seed + relative path + name ) checksum std::vector hashBytes = cmCryptoHash::New("SHA256")->ByteHashString( (sourceRelSeed + sourceRelPath + sourceFilename).c_str()); - // Convert hash bytes to Base64 text string - std::vector base64Bytes(hashBytes.size() * 2, 0); - cmsysBase64_Encode(&hashBytes[0], hashBytes.size(), &base64Bytes[0], 0); - checksumBase64 = reinterpret_cast(&base64Bytes[0]); + + checksumBase32 = + cmBase32Encoder().encodeString(&hashBytes[0], hashBytes.size(), false); } - // Base64 allows '/', '+' and '=' characters which are problematic - // when used in file names. Replace them with safer alternatives. - std::replace(checksumBase64.begin(), checksumBase64.end(), '/', '-'); - std::replace(checksumBase64.begin(), checksumBase64.end(), '+', '_'); - std::replace(checksumBase64.begin(), checksumBase64.end(), '=', '_'); - return checksumBase64; + return checksumBase32; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b481ddb3df21e02e16038854ec7d256601717018 commit b481ddb3df21e02e16038854ec7d256601717018 Author: Sebastian Holtermann AuthorDate: Thu Sep 1 13:08:18 2016 +0200 Commit: Brad King CommitDate: Fri Sep 2 09:18:59 2016 -0400 Add cmBase32Encoder class diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8c74f60..6c3ebf5 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -166,6 +166,7 @@ endif() # set(SRCS cmArchiveWrite.cxx + cmBase32.cxx cmBootstrapCommands1.cxx cmBootstrapCommands2.cxx cmCacheManager.cxx diff --git a/Source/cmBase32.cxx b/Source/cmBase32.cxx new file mode 100644 index 0000000..ce5c99b --- /dev/null +++ b/Source/cmBase32.cxx @@ -0,0 +1,108 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2016 Sebastian Holtermann + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmBase32.h" + +// -- Static functions + +static const unsigned char Base32EncodeTable[33] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; + +inline unsigned char Base32EncodeChar(int schar) +{ + return Base32EncodeTable[schar]; +} + +void Base32Encode5(const unsigned char src[5], char dst[8]) +{ + // [0]:5 bits + dst[0] = Base32EncodeChar((src[0] >> 3) & 0x1F); + // [0]:3 bits + [1]:2 bits + dst[1] = Base32EncodeChar(((src[0] << 2) & 0x1C) + ((src[1] >> 6) & 0x03)); + // [1]:5 bits + dst[2] = Base32EncodeChar((src[1] >> 1) & 0x1F); + // [1]:1 bit + [2]:4 bits + dst[3] = Base32EncodeChar(((src[1] << 4) & 0x10) + ((src[2] >> 4) & 0x0F)); + // [2]:4 bits + [3]:1 bit + dst[4] = Base32EncodeChar(((src[2] << 1) & 0x1E) + ((src[3] >> 7) & 0x01)); + // [3]:5 bits + dst[5] = Base32EncodeChar((src[3] >> 2) & 0x1F); + // [3]:2 bits + [4]:3 bit + dst[6] = Base32EncodeChar(((src[3] << 3) & 0x18) + ((src[4] >> 5) & 0x07)); + // [4]:5 bits + dst[7] = Base32EncodeChar((src[4] << 0) & 0x1F); +} + +// -- Class methods + +cmBase32Encoder::cmBase32Encoder() +{ +} + +cmBase32Encoder::~cmBase32Encoder() +{ +} + +std::string cmBase32Encoder::encodeString(const unsigned char* input, + size_t len, bool padding) +{ + std::string res; + + static const size_t blockSize = 5; + static const size_t bufferSize = 8; + char buffer[bufferSize]; + + const unsigned char* end = input + len; + while ((input + blockSize) <= end) { + Base32Encode5(input, buffer); + res.append(buffer, bufferSize); + input += blockSize; + } + + size_t remain(end - input); + if (remain != 0) { + // Temporary source buffer filled up with 0s + unsigned char extended[blockSize]; + for (size_t ii = 0; ii != remain; ++ii) { + extended[ii] = input[ii]; + } + for (size_t ii = remain; ii != blockSize; ++ii) { + extended[ii] = 0; + } + + Base32Encode5(extended, buffer); + size_t numPad(0); + switch (remain) { + case 1: + numPad = 6; + break; + case 2: + numPad = 4; + break; + case 3: + numPad = 3; + break; + case 4: + numPad = 1; + break; + default: + break; + } + res.append(buffer, bufferSize - numPad); + if (padding) { + for (size_t ii = 0; ii != numPad; ++ii) { + res.push_back(paddingChar); + } + } + } + + return res; +} diff --git a/Source/cmBase32.h b/Source/cmBase32.h new file mode 100644 index 0000000..66ff8ba --- /dev/null +++ b/Source/cmBase32.h @@ -0,0 +1,42 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2016 Sebastian Holtermann + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmBase32_h +#define cmBase32_h + +#include // IWYU pragma: keep + +#include +#include + +/** \class cmBase32Encoder + * \brief Encodes a byte sequence to a Base32 byte sequence according to + * RFC4648 + * + */ +class cmBase32Encoder +{ +public: + static const char paddingChar = '='; + +public: + cmBase32Encoder(); + ~cmBase32Encoder(); + + // Encodes the given input byte sequence into a string + // @arg input Input data pointer + // @arg len Input data size + // @arg padding Flag to append "=" on demand + std::string encodeString(const unsigned char* input, size_t len, + bool padding = true); +}; + +#endif ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:22:27 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:22:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-833-g0ba0c67 Message-ID: <20160902132227.49B9EF4AD4@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 0ba0c67ba3af352c2e53da03136d1d032b4e41c4 (commit) via 9998774f2280999c559cdffe7473085c841c2d39 (commit) from cb3e091a45bfdb24115ef68fa36341cf93419681 (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=0ba0c67ba3af352c2e53da03136d1d032b4e41c4 commit 0ba0c67ba3af352c2e53da03136d1d032b4e41c4 Merge: cb3e091 9998774 Author: Brad King AuthorDate: Fri Sep 2 09:22:25 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 09:22:25 2016 -0400 Merge topic 'vs14-debug-enum-older-toolsets' 9998774f VS: Fix VS 2015 .vcxproj debug setting for v80 toolset ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:22:30 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:22:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-835-gee45fce Message-ID: <20160902132230.8C8D1F4B2A@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 ee45fce4a48bf464fbc13d55abc0ca93a32645ee (commit) via 0cbaaf2dc3e250fe0f4b056e229e3fcfbe6a8534 (commit) from 0ba0c67ba3af352c2e53da03136d1d032b4e41c4 (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=ee45fce4a48bf464fbc13d55abc0ca93a32645ee commit ee45fce4a48bf464fbc13d55abc0ca93a32645ee Merge: 0ba0c67 0cbaaf2 Author: Brad King AuthorDate: Fri Sep 2 09:22:28 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 09:22:28 2016 -0400 Merge topic 'GenerateExportHeader-fix-add_compiler_export_flags' 0cbaaf2d GenerateExportHeader: Fix add_compiler_export_flags regression ----------------------------------------------------------------------- Summary of changes: Modules/GenerateExportHeader.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:22:35 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:22:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-838-ge47bb01 Message-ID: <20160902132235.28B5EF4964@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 e47bb0183700c64b90e44fb6b087d41713bbc04a (commit) via 228f4e9b336757ddbf3085637e47962692278c45 (commit) via b481ddb3df21e02e16038854ec7d256601717018 (commit) from ee45fce4a48bf464fbc13d55abc0ca93a32645ee (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=e47bb0183700c64b90e44fb6b087d41713bbc04a commit e47bb0183700c64b90e44fb6b087d41713bbc04a Merge: ee45fce 228f4e9 Author: Brad King AuthorDate: Fri Sep 2 09:22:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 09:22:31 2016 -0400 Merge topic 'autogen-base32' 228f4e9b cmFilePathUuid: Use Base32 string instead of Base64 string b481ddb3 Add cmBase32Encoder class ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 1 + Source/cmBase32.cxx | 108 +++++++++++++++++++++++++++++++++++++++++++++ Source/cmBase32.h | 42 ++++++++++++++++++ Source/cmFilePathUuid.cxx | 18 +++----- 4 files changed, 157 insertions(+), 12 deletions(-) create mode 100644 Source/cmBase32.cxx create mode 100644 Source/cmBase32.h hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:22:56 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:22:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1720-gda60667 Message-ID: <20160902132256.9A355F4B2A@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, next has been updated via da60667b7cb4e60036736d782592766ef8ef62e4 (commit) via e47bb0183700c64b90e44fb6b087d41713bbc04a (commit) via ee45fce4a48bf464fbc13d55abc0ca93a32645ee (commit) via 0ba0c67ba3af352c2e53da03136d1d032b4e41c4 (commit) via cb3e091a45bfdb24115ef68fa36341cf93419681 (commit) from 6e3215e77b4d73acf662ddcddbaf9f762dde77e6 (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=da60667b7cb4e60036736d782592766ef8ef62e4 commit da60667b7cb4e60036736d782592766ef8ef62e4 Merge: 6e3215e e47bb01 Author: Brad King AuthorDate: Fri Sep 2 09:22:42 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 09:22:42 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:31:18 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:31:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-841-g1eb3ed0 Message-ID: <20160902133118.CAC0EF53DD@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 1eb3ed06cbec8693572398700986cdd970212d4f (commit) via f9fc8f83d0784d2f9b73bb0a476675b2f34c8fbe (commit) via c8c58947f289d7a51198cf73d171573be3805b8f (commit) from e47bb0183700c64b90e44fb6b087d41713bbc04a (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: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:31:19 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:31:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1724-g2d3a0bc Message-ID: <20160902133119.0B71BF5410@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, next has been updated via 2d3a0bc9bf0ffe388bfb93c6e696c46140f55bcd (commit) via 1eb3ed06cbec8693572398700986cdd970212d4f (commit) via f9fc8f83d0784d2f9b73bb0a476675b2f34c8fbe (commit) via c8c58947f289d7a51198cf73d171573be3805b8f (commit) from da60667b7cb4e60036736d782592766ef8ef62e4 (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=2d3a0bc9bf0ffe388bfb93c6e696c46140f55bcd commit 2d3a0bc9bf0ffe388bfb93c6e696c46140f55bcd Merge: da60667 1eb3ed0 Author: Brad King AuthorDate: Fri Sep 2 09:30:55 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 09:30:55 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 09:31:19 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 09:31:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.6.1-28-gf9fc8f8 Message-ID: <20160902133119.26B48F5411@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 f9fc8f83d0784d2f9b73bb0a476675b2f34c8fbe (commit) via 9998774f2280999c559cdffe7473085c841c2d39 (commit) via c8c58947f289d7a51198cf73d171573be3805b8f (commit) via 1f4aeb1739fb632ab5162a977764b51736728edc (commit) from 83fd4a7039f46e458186274feb3ba397a4f58bb8 (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/cmVisualStudio10TargetGenerator.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 11:37:51 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 11:37:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1727-gb567cbc Message-ID: <20160902153751.3C520F57A7@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, next has been updated via b567cbc8f72240d87354a016a046796cd7c68cef (commit) via 5d7a57d5c193c6b3395b5897d62331f922b2aea5 (commit) via 99cd51f2873a67511dbe7be81b73845c42d13ad9 (commit) from 2d3a0bc9bf0ffe388bfb93c6e696c46140f55bcd (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=b567cbc8f72240d87354a016a046796cd7c68cef commit b567cbc8f72240d87354a016a046796cd7c68cef Merge: 2d3a0bc 5d7a57d Author: Brad King AuthorDate: Fri Sep 2 11:37:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 11:37:48 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 5d7a57d5 Tests: Cleanup RunCMake.GenerateExportHeader somewhat 99cd51f2 Tests: Port GenerateExportHeader test to RunCMake infrastructure https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d7a57d5c193c6b3395b5897d62331f922b2aea5 commit 5d7a57d5c193c6b3395b5897d62331f922b2aea5 Author: Brad King AuthorDate: Thu Sep 1 15:38:46 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 10:20:46 2016 -0400 Tests: Cleanup RunCMake.GenerateExportHeader somewhat diff --git a/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt index fb4d95e..dc92486 100644 --- a/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.5) +cmake_minimum_required(VERSION 3.6) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt deleted file mode 100644 index 8d98f9d..0000000 --- a/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -.* diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index e2a2a3b..ee0871b 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -1,23 +1,8 @@ -cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) -cmake_policy(SET CMP0054 NEW) +# Test add_compiler_export_flags without deprecation warning. +set(CMAKE_WARN_DEPRECATED OFF) project(GenerateExportHeader) -# Prevent timeout on Watcom by not running the tests. -if ("${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom) - file(WRITE - "${CMAKE_CURRENT_BINARY_DIR}/main.cxx" - "int main() { return 0; } - " - ) - - add_executable( - GenerateExportHeader - "${CMAKE_CURRENT_BINARY_DIR}/main.cxx" - ) - return() -endif() - include(CheckCXXCompilerFlag) set( CMAKE_INCLUDE_CURRENT_DIR ON ) @@ -80,16 +65,16 @@ add_compiler_export_flags() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}) -message("#### COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) -message("#### COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) -message("#### WIN32: " ${WIN32}) -message("#### HAS_WERROR_FLAG: " ${HAS_WERROR_FLAG}) +message(STATUS "COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) +message(STATUS "COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) +message(STATUS "WIN32: " ${WIN32}) +message(STATUS "HAS_WERROR_FLAG: " ${HAS_WERROR_FLAG}) set(link_libraries) macro(macro_add_test_library name) add_subdirectory(${name}) include_directories(${name} - ${${name}_BINARY_DIR} # For the export header. + ${CMAKE_CURRENT_BINARY_DIR}/${name} # For the export header. ) list(APPEND link_libraries ${name}) endmacro() @@ -132,7 +117,7 @@ elseif(COMPILER_HAS_DEPRECATED) else() set(_platform Empty) endif() -message("#### Testing reference: ${_platform}") +message(STATUS "Testing reference: ${_platform}") target_compile_definitions(GenerateExportHeader PRIVATE "SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\"" diff --git a/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt index 9f8c8ef..77c18e0 100644 --- a/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt @@ -1,5 +1,3 @@ -project(c_identifier) - set(c_identifier_lib_SRCS c_identifier_class.cpp ) diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt index a057746..2828437 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(lib_shared_and_static) - include(GenerateExportHeader) set(CMAKE_CXX_VISIBILITY_PRESET hidden) diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt index e20adb1..c4a761c 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(libshared) - include(GenerateExportHeader) add_compiler_export_flags() diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt index b2db3ea..0fd136c 100644 --- a/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(libstatic) - set(CMAKE_INCLUDE_CURRENT_DIR ON) include(GenerateExportHeader) diff --git a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt index aeeb13a..7822d9c 100644 --- a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt @@ -1,7 +1,3 @@ -cmake_minimum_required(VERSION 2.8) - -project(nodeprecated) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_defined) execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_not_defined) @@ -23,4 +19,4 @@ try_compile(Result ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_defined_build OUTPUT_VARIABLE Out ) -test_fail(Result "Built even with no-deprecated define") \ No newline at end of file +test_fail(Result "Built even with no-deprecated define") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99cd51f2873a67511dbe7be81b73845c42d13ad9 commit 99cd51f2873a67511dbe7be81b73845c42d13ad9 Author: Brad King AuthorDate: Thu Sep 1 15:22:05 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 10:20:46 2016 -0400 Tests: Port GenerateExportHeader test to RunCMake infrastructure This will allow build failure cases to be added later. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index d6c96e1..8293286 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -485,7 +485,6 @@ if(BUILD_TESTING) ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Module/ExternalData") - ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader) ADD_TEST_MACRO(Module.FindDependency FindDependency) ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 323a36b..fa3d0f9 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -141,6 +141,9 @@ add_RunCMake_test(DisallowedCommands) add_RunCMake_test(ExternalData) add_RunCMake_test(FeatureSummary) add_RunCMake_test(FPHSA) +if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom") + add_RunCMake_test(GenerateExportHeader) +endif() add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorPlatform) add_RunCMake_test(GeneratorToolset) diff --git a/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt new file mode 100644 index 0000000..fb4d95e --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.5) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/GEH.cmake similarity index 98% rename from Tests/Module/GenerateExportHeader/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/GEH.cmake index 56f0f28..e2a2a3b 100644 --- a/Tests/Module/GenerateExportHeader/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -78,6 +78,7 @@ add_subdirectory(lib_shared_and_static) add_compiler_export_flags() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}) message("#### COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) message("#### COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake new file mode 100644 index 0000000..e534c1f --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake @@ -0,0 +1,17 @@ +include(RunCMake) + +function(run_GEH) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GEH-build) + set(RunCMake_TEST_NO_CLEAN 1) + if(RunCMake_GENERATOR MATCHES "Make|Ninja") + set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + endif() + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(GEH) + run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader) +endfunction() + +run_GEH() diff --git a/Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.cpp rename to Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.cpp diff --git a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.h b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.h similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.h rename to Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.h diff --git a/Tests/Module/GenerateExportHeader/c_identifier/main.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/main.cpp rename to Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp diff --git a/Tests/Module/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/exportheader_test.cpp rename to Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp rename to Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h similarity index 100% rename from Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h rename to Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h diff --git a/Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/libshared/libshared.cpp rename to Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h similarity index 100% rename from Tests/Module/GenerateExportHeader/libshared/libshared.h rename to Tests/RunCMake/GenerateExportHeader/libshared/libshared.h diff --git a/Tests/Module/GenerateExportHeader/libstatic/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/libstatic/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp rename to Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.h b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h similarity index 100% rename from Tests/Module/GenerateExportHeader/libstatic/libstatic.h rename to Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt.in b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt.in rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.cpp diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.h b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.h similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.h rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.h diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 1 - Tests/RunCMake/CMakeLists.txt | 3 ++ .../CMakeLists.txt | 0 .../GenerateExportHeader/GEH.cmake} | 32 ++++++-------------- .../GenerateExportHeader/RunCMakeTest.cmake | 17 +++++++++++ .../c_identifier/CMakeLists.txt | 2 -- .../c_identifier/c_identifier_class.cpp | 0 .../c_identifier/c_identifier_class.h | 0 .../GenerateExportHeader/c_identifier/main.cpp | 0 .../GenerateExportHeader/exportheader_test.cpp | 0 .../lib_shared_and_static/CMakeLists.txt | 5 --- .../lib_shared_and_static/libshared_and_static.cpp | 0 .../lib_shared_and_static/libshared_and_static.h | 0 .../GenerateExportHeader/libshared/CMakeLists.txt | 5 --- .../GenerateExportHeader/libshared/libshared.cpp | 0 .../GenerateExportHeader/libshared/libshared.h | 0 .../GenerateExportHeader/libstatic/CMakeLists.txt | 5 --- .../GenerateExportHeader/libstatic/libstatic.cpp | 0 .../GenerateExportHeader/libstatic/libstatic.h | 0 .../nodeprecated/CMakeLists.txt | 6 +--- .../nodeprecated/CMakeLists.txt.in | 0 .../GenerateExportHeader/nodeprecated/src/main.cpp | 0 .../nodeprecated/src/someclass.cpp | 0 .../nodeprecated/src/someclass.h | 0 .../reference/Empty/libshared_export.h | 0 .../reference/Empty/libstatic_export.h | 0 .../reference/MinGW/libshared_export.h | 0 .../reference/MinGW/libstatic_export.h | 0 .../reference/UNIX/libshared_export.h | 0 .../reference/UNIX/libstatic_export.h | 0 .../UNIX_DeprecatedOnly/libshared_export.h | 0 .../UNIX_DeprecatedOnly/libstatic_export.h | 0 .../reference/Win32-Clang/libshared_export.h | 0 .../reference/Win32-Clang/libstatic_export.h | 0 .../reference/Win32/libshared_export.h | 0 .../reference/Win32/libstatic_export.h | 0 .../reference/WinEmpty/libshared_export.h | 0 .../reference/WinEmpty/libstatic_export.h | 0 38 files changed, 30 insertions(+), 46 deletions(-) copy Tests/RunCMake/{Android => GenerateExportHeader}/CMakeLists.txt (100%) rename Tests/{Module/GenerateExportHeader/CMakeLists.txt => RunCMake/GenerateExportHeader/GEH.cmake} (80%) create mode 100644 Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/CMakeLists.txt (92%) rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/c_identifier_class.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/c_identifier_class.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/main.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/exportheader_test.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt (93%) rename Tests/{Module => RunCMake}/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libshared/CMakeLists.txt (79%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libshared/libshared.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libshared/libshared.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libstatic/CMakeLists.txt (83%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libstatic/libstatic.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libstatic/libstatic.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/CMakeLists.txt (89%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/CMakeLists.txt.in (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/main.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/someclass.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/someclass.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Empty/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Empty/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/MinGW/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/MinGW/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32-Clang/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/WinEmpty/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/WinEmpty/libstatic_export.h (100%) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 15:23:55 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 15:23:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1729-g27e09e8 Message-ID: <20160902192355.C35B2F5329@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, next has been updated via 27e09e87e102af3e13c0912dcf83169ce4670e73 (commit) via b61eab249f6d119e6353c02c4c79ccb15a3825b9 (commit) from b567cbc8f72240d87354a016a046796cd7c68cef (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=27e09e87e102af3e13c0912dcf83169ce4670e73 commit 27e09e87e102af3e13c0912dcf83169ce4670e73 Merge: b567cbc b61eab2 Author: Brad King AuthorDate: Fri Sep 2 15:23:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 15:23:48 2016 -0400 Merge topic 'FindHDF5-is-parallel' into next b61eab24 FindHDF5: Fix regression in providing HDF5_IS_PARALLEL https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b61eab249f6d119e6353c02c4c79ccb15a3825b9 commit b61eab249f6d119e6353c02c4c79ccb15a3825b9 Author: Brad King AuthorDate: Fri Sep 2 14:34:23 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 15:06:52 2016 -0400 FindHDF5: Fix regression in providing HDF5_IS_PARALLEL Since commit v3.6.0-rc1~85^2 (HDF5: Refactor the use of compiler wrappers, 2016-04-01) we have additional code paths that find HDF5 and suppress the original search logic. Report HDF5_IS_PARALLEL from these other code paths too. Closes: #16257 diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index a898386..12d0f23 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -183,7 +183,7 @@ endmacro() # Test first if the current compilers automatically wrap HDF5 -function(_HDF5_test_regular_compiler_C success version) +function(_HDF5_test_regular_compiler_C success version is_parallel) set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5) if(NOT ${success} OR @@ -214,10 +214,21 @@ function(_HDF5_test_regular_compiler_C success version) set(${version} ${HDF5_CXX_VERSION}.${CMAKE_MATCH_3}) endif() set(${version} ${${version}} PARENT_SCOPE) + + execute_process(COMMAND ${CMAKE_C_COMPILER} -showconfig + OUTPUT_VARIABLE config_output + ERROR_VARIABLE config_error + RESULT_VARIABLE config_result + ) + if(config_output MATCHES "Parallel HDF5: yes") + set(${is_parallel} TRUE PARENT_SCOPE) + else() + set(${is_parallel} FALSE PARENT_SCOPE) + endif() endif() endfunction() -function(_HDF5_test_regular_compiler_CXX success version) +function(_HDF5_test_regular_compiler_CXX success version is_parallel) set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5) if(NOT ${success} OR NOT EXISTS ${scratch_directory}/compiler_has_h5_cxx) @@ -248,10 +259,21 @@ function(_HDF5_test_regular_compiler_CXX success version) set(${version} ${HDF5_CXX_VERSION}.${CMAKE_MATCH_3}) endif() set(${version} ${${version}} PARENT_SCOPE) + + execute_process(COMMAND ${CMAKE_CXX_COMPILER} -showconfig + OUTPUT_VARIABLE config_output + ERROR_VARIABLE config_error + RESULT_VARIABLE config_result + ) + if(config_output MATCHES "Parallel HDF5: yes") + set(${is_parallel} TRUE PARENT_SCOPE) + else() + set(${is_parallel} FALSE PARENT_SCOPE) + endif() endif() endfunction() -function(_HDF5_test_regular_compiler_Fortran success) +function(_HDF5_test_regular_compiler_Fortran success is_parallel) if(NOT ${success}) set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5) @@ -266,12 +288,24 @@ function(_HDF5_test_regular_compiler_Fortran success) " call h5close_f(error)\n" "end\n") try_compile(${success} ${scratch_directory} ${test_file}) + if(${success}) + execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -showconfig + OUTPUT_VARIABLE config_output + ERROR_VARIABLE config_error + RESULT_VARIABLE config_result + ) + if(config_output MATCHES "Parallel HDF5: yes") + set(${is_parallel} TRUE PARENT_SCOPE) + else() + set(${is_parallel} FALSE PARENT_SCOPE) + endif() + endif() endif() endfunction() # Invoke the HDF5 wrapper compiler. The compiler return value is stored to the # return_value argument, the text output is stored to the output variable. -macro( _HDF5_invoke_compiler language output return_value version) +macro( _HDF5_invoke_compiler language output return_value version is_parallel) set(${version}) if(HDF5_USE_STATIC_LIBRARIES) set(lib_type_args -noshlib) @@ -309,6 +343,11 @@ macro( _HDF5_invoke_compiler language output return_value version) string(REPLACE "HDF5 Version: " "" ${version} "${version_match}") string(REPLACE "-patch" "." ${version} "${${version}}") endif() + if(config_output MATCHES "Parallel HDF5: yes") + set(${is_parallel} TRUE) + else() + set(${is_parallel} FALSE) + endif() endmacro() # Parse a compile line for definitions, includes, library paths, and libraries. @@ -386,6 +425,7 @@ endif() if(NOT HDF5_FOUND AND NOT HDF5_ROOT) find_package(HDF5 QUIET NO_MODULE) if( HDF5_FOUND) + set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL}) set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set(HDF5_LIBRARIES) set(HDF5_C_TARGET hdf5) @@ -446,14 +486,17 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT) if(__lang STREQUAL "C") _HDF5_test_regular_compiler_C( HDF5_${__lang}_COMPILER_NO_INTERROGATE - HDF5_${__lang}_VERSION) + HDF5_${__lang}_VERSION + HDF5_${__lang}_IS_PARALLEL) elseif(__lang STREQUAL "CXX") _HDF5_test_regular_compiler_CXX( HDF5_${__lang}_COMPILER_NO_INTERROGATE - HDF5_${__lang}_VERSION) + HDF5_${__lang}_VERSION + HDF5_${__lang}_IS_PARALLEL) elseif(__lang STREQUAL "Fortran") _HDF5_test_regular_compiler_Fortran( - HDF5_${__lang}_COMPILER_NO_INTERROGATE) + HDF5_${__lang}_COMPILER_NO_INTERROGATE + HDF5_${__lang}_IS_PARALLEL) else() continue() endif() @@ -490,7 +533,7 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT) if(HDF5_${__lang}_COMPILER_EXECUTABLE) _HDF5_invoke_compiler(${__lang} HDF5_${__lang}_COMPILE_LINE - HDF5_${__lang}_RETURN_VALUE HDF5_${__lang}_VERSION) + HDF5_${__lang}_RETURN_VALUE HDF5_${__lang}_VERSION HDF5_${__lang}_IS_PARALLEL) if(HDF5_${__lang}_RETURN_VALUE EQUAL 0) message(STATUS "HDF5: Using hdf5 compiler wrapper to determine ${__lang} configuration") _HDF5_parse_compile_line( HDF5_${__lang}_COMPILE_LINE @@ -554,6 +597,15 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT) message(WARNING "HDF5 Version found for language ${__lang}, ${HDF5_${__lang}_VERSION} is different than previously found version ${HDF5_VERSION}") endif() endif() + if(DEFINED HDF5_${__lang}_IS_PARALLEL) + if(NOT DEFINED HDF5_IS_PARALLEL) + set(HDF5_IS_PARALLEL ${HDF5_${__lang}_IS_PARALLEL}) + elseif(NOT HDF5_IS_PARALLEL AND HDF5_${__lang}_IS_PARALLEL) + message(WARNING "HDF5 found for language ${__lang} is parallel but previously found language is not parallel.") + elseif(HDF5_IS_PARALLEL AND NOT HDF5_${__lang}_IS_PARALLEL) + message(WARNING "HDF5 found for language ${__lang} is not parallel but previously found language is parallel.") + endif() + endif() endforeach() else() set(_HDF5_NEED_TO_SEARCH True) ----------------------------------------------------------------------- Summary of changes: Modules/FindHDF5.cmake | 68 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 2 15:23:59 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 2 Sep 2016 15:23:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1731-g4cb699f Message-ID: <20160902192401.54692F45A7@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, next has been updated via 4cb699fda5a6f70e1641deba4730a87fd287c6bb (commit) via befe8648a3813e35869e8ba8291f43cb8bfca962 (commit) from 27e09e87e102af3e13c0912dcf83169ce4670e73 (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=4cb699fda5a6f70e1641deba4730a87fd287c6bb commit 4cb699fda5a6f70e1641deba4730a87fd287c6bb Merge: 27e09e8 befe864 Author: Brad King AuthorDate: Fri Sep 2 15:23:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 2 15:23:58 2016 -0400 Merge topic 'FindHDF5-fix-hl-fortran' into next befe8648 FindHDF5: Fix regression in finding hdf5hl_fortran https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=befe8648a3813e35869e8ba8291f43cb8bfca962 commit befe8648a3813e35869e8ba8291f43cb8bfca962 Author: Brad King AuthorDate: Fri Sep 2 13:40:46 2016 -0400 Commit: Brad King CommitDate: Fri Sep 2 15:09:47 2016 -0400 FindHDF5: Fix regression in finding hdf5hl_fortran Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching to correctly find HL for all bindings, 2016-05-12) accidentally dropped the name `hdf5hl_fortran` from the list of library names and replaced it with `hdf5_hl_fortran`. IIUC the latter name is when HDF5 is built with CMake and the former name is for other build systems. Since this is the non-CMake code path, user the former name. Closes: #16233 diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index a898386..aa2764b 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -613,7 +613,7 @@ if( NOT HDF5_FOUND ) set(HDF5_CXX_HL_LIBRARY_NAMES hdf5_hl_cpp ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_CXX_LIBRARY_NAMES}) set(HDF5_Fortran_LIBRARY_NAMES hdf5_fortran ${HDF5_C_LIBRARY_NAMES}) - set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5_hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES}) + set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES}) foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) # find the HDF5 include directories ----------------------------------------------------------------------- Summary of changes: Modules/FindHDF5.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Sep 3 00:01:06 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 3 Sep 2016 00:01:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-842-g87e76f8 Message-ID: <20160903040106.B25ACF5A13@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 87e76f899693fb3c29f280b417303e899c3a38dd (commit) from 1eb3ed06cbec8693572398700986cdd970212d4f (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=87e76f899693fb3c29f280b417303e899c3a38dd commit 87e76f899693fb3c29f280b417303e899c3a38dd Author: Kitware Robot AuthorDate: Sat Sep 3 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Sat Sep 3 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b8c7439..811f4f7 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 6) -set(CMake_VERSION_PATCH 20160902) +set(CMake_VERSION_PATCH 20160903) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 06:26:49 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 06:26:49 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1733-ge57f054 Message-ID: <20160903102649.69BC4F51D5@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, next has been updated via e57f054dd843dfaf3e286b56ebbbad267d9297e1 (commit) via 6bfda4fcb221fb439ca6b6349a7935e34cbfbcff (commit) from 4cb699fda5a6f70e1641deba4730a87fd287c6bb (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=e57f054dd843dfaf3e286b56ebbbad267d9297e1 commit e57f054dd843dfaf3e286b56ebbbad267d9297e1 Merge: 4cb699f 6bfda4f Author: Brad King AuthorDate: Sat Sep 3 06:26:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 06:26:47 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 6bfda4fc fixup! Tests: Cleanup RunCMake.GenerateExportHeader somewhat https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bfda4fcb221fb439ca6b6349a7935e34cbfbcff commit 6bfda4fcb221fb439ca6b6349a7935e34cbfbcff Author: Brad King AuthorDate: Sat Sep 3 06:26:11 2016 -0400 Commit: Brad King CommitDate: Sat Sep 3 06:26:11 2016 -0400 fixup! Tests: Cleanup RunCMake.GenerateExportHeader somewhat diff --git a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in index d8dc482..90cfa12 100644 --- a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.6) project(nodeprecated_test) ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 06:35:37 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 06:35:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1735-g2c0c785 Message-ID: <20160903103538.3A9BBF58DA@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, next has been updated via 2c0c7856e20026c74311d927a63338e26cfeb727 (commit) via 623c50b9ac306808df37f5cb1bfddc5883d83f79 (commit) from e57f054dd843dfaf3e286b56ebbbad267d9297e1 (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=2c0c7856e20026c74311d927a63338e26cfeb727 commit 2c0c7856e20026c74311d927a63338e26cfeb727 Merge: e57f054 623c50b Author: Brad King AuthorDate: Sat Sep 3 06:35:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 06:35:34 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 623c50b9 fixup! Tests: Cleanup RunCMake.GenerateExportHeader somewhat https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=623c50b9ac306808df37f5cb1bfddc5883d83f79 commit 623c50b9ac306808df37f5cb1bfddc5883d83f79 Author: Brad King AuthorDate: Sat Sep 3 06:35:14 2016 -0400 Commit: Brad King CommitDate: Sat Sep 3 06:35:14 2016 -0400 fixup! Tests: Cleanup RunCMake.GenerateExportHeader somewhat diff --git a/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp index 891bc42..887d777 100644 --- a/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp @@ -1,7 +1,7 @@ #include "c_identifier_class.h" -int main(int argc, char** argv) +int main() { CIdentifierClass cic; return cic.someMethod(); diff --git a/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp index eec46d3..f90d098 100644 --- a/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp @@ -1,7 +1,7 @@ #include "someclass.h" -int main(int, char**) +int main() { SomeClass sc; sc.someMethod(); ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp | 2 +- Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 07:27:35 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 07:27:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1737-g25e5ed1 Message-ID: <20160903112735.7C38CF50CB@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, next has been updated via 25e5ed190800415a6423e98e3de023a6b4b3251f (commit) via 3e380ba055818d14064c42080ffe00b216b92b1b (commit) from 2c0c7856e20026c74311d927a63338e26cfeb727 (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=25e5ed190800415a6423e98e3de023a6b4b3251f commit 25e5ed190800415a6423e98e3de023a6b4b3251f Merge: 2c0c785 3e380ba Author: Brad King AuthorDate: Sat Sep 3 07:27:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 07:27:34 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 3e380ba0 fixup! Tests: Cleanup RunCMake.GenerateExportHeader somewhat https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e380ba055818d14064c42080ffe00b216b92b1b commit 3e380ba055818d14064c42080ffe00b216b92b1b Author: Brad King AuthorDate: Sat Sep 3 07:26:40 2016 -0400 Commit: Brad King CommitDate: Sat Sep 3 07:26:40 2016 -0400 fixup! Tests: Cleanup RunCMake.GenerateExportHeader somewhat diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt index 2828437..ff81f35 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt @@ -28,6 +28,6 @@ generate_export_header(shared_variant CUSTOM_CONTENT_FROM_VARIABLE MY_CUSTOM_CONTENT ) -set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE) +target_compile_definitions(static_variant PUBLIC MYPREFIX_LIBSHARED_AND_STATIC_STATIC_DEFINE) export(TARGETS shared_variant static_variant FILE Targets.cmake) ----------------------------------------------------------------------- Summary of changes: .../GenerateExportHeader/lib_shared_and_static/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 07:53:54 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 07:53:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1739-g0c0137e Message-ID: <20160903115354.77B8CF55AD@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, next has been updated via 0c0137edc49ed3612afda8482f0d4509269e0842 (commit) via 4f045166ca6731971fe852f501c4a266031786ac (commit) from 25e5ed190800415a6423e98e3de023a6b4b3251f (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=0c0137edc49ed3612afda8482f0d4509269e0842 commit 0c0137edc49ed3612afda8482f0d4509269e0842 Merge: 25e5ed1 4f04516 Author: Brad King AuthorDate: Sat Sep 3 07:53:53 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 07:53:53 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 4f045166 GNU: Do not use -fvisibility on AIX or HP-UX https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f045166ca6731971fe852f501c4a266031786ac commit 4f045166ca6731971fe852f501c4a266031786ac Author: Brad King AuthorDate: Sat Sep 3 07:50:47 2016 -0400 Commit: Brad King CommitDate: Sat Sep 3 07:51:59 2016 -0400 GNU: Do not use -fvisibility on AIX or HP-UX Use of `-fvisibility=hidden` warns: warning: visibility attribute not supported in this configuration; ignored diff --git a/Modules/Platform/AIX-GNU-CXX.cmake b/Modules/Platform/AIX-GNU-CXX.cmake index ec8e83f..d047801 100644 --- a/Modules/Platform/AIX-GNU-CXX.cmake +++ b/Modules/Platform/AIX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/AIX-GNU) __aix_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index df97ab1..ce6faff 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -34,4 +34,5 @@ macro(__aix_compiler_gnu lang) set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro() diff --git a/Modules/Platform/HP-UX-GNU-CXX.cmake b/Modules/Platform/HP-UX-GNU-CXX.cmake index 689bed0..ac72560 100644 --- a/Modules/Platform/HP-UX-GNU-CXX.cmake +++ b/Modules/Platform/HP-UX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/HP-UX-GNU) __hpux_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/HP-UX-GNU.cmake b/Modules/Platform/HP-UX-GNU.cmake index 6c71784..cbd8164 100644 --- a/Modules/Platform/HP-UX-GNU.cmake +++ b/Modules/Platform/HP-UX-GNU.cmake @@ -26,4 +26,5 @@ macro(__hpux_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro() ----------------------------------------------------------------------- Summary of changes: Modules/Platform/AIX-GNU-CXX.cmake | 1 + Modules/Platform/AIX-GNU.cmake | 1 + Modules/Platform/HP-UX-GNU-CXX.cmake | 1 + Modules/Platform/HP-UX-GNU.cmake | 1 + 4 files changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 07:57:46 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 07:57:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1741-g54df8a8 Message-ID: <20160903115746.8E45DF5758@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, next has been updated via 54df8a8b0a1148254ba838fe6901fe2f2bf173d9 (commit) via c03a7b4f517fc4395a68cdfd143254b0a56622af (commit) from 0c0137edc49ed3612afda8482f0d4509269e0842 (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=54df8a8b0a1148254ba838fe6901fe2f2bf173d9 commit 54df8a8b0a1148254ba838fe6901fe2f2bf173d9 Merge: 0c0137e c03a7b4 Author: Brad King AuthorDate: Sat Sep 3 07:57:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 07:57:45 2016 -0400 Merge topic 'libuv-scanbuild-fixes' into next c03a7b4f CTestCustom: Suppress scan-build warnings in libuv https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c03a7b4f517fc4395a68cdfd143254b0a56622af commit c03a7b4f517fc4395a68cdfd143254b0a56622af Author: Brad King AuthorDate: Thu Sep 1 11:14:19 2016 -0400 Commit: Brad King CommitDate: Sat Sep 3 07:56:13 2016 -0400 CTestCustom: Suppress scan-build warnings in libuv Clang scan-build warns in some expansions of RB_GENERATE_STATIC that it has a "Dereference of null pointer". It also warns that "The left operand of '==' is a garbage value" strangely. Simply suppress these since this is third-party code anyway. diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index a39049b..1699492 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -62,6 +62,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning.*This version of Mac OS X is unsupported" "clang.*: warning: argument unused during compilation: .-g" "note: in expansion of macro" # diagnostic context note + "note: expanded from macro" # diagnostic context note "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*may return deterministic values" "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*isn.*t random" # we do not do crypto "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*srand.*seed choices are.*poor" # we do not do crypto @@ -82,6 +83,8 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "cm_sha2.*warning: Value stored to.*is never read" "testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.." "liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined" + "libuv/src/.*:[0-9]+:[0-9]+: warning: Dereference of null pointer" + "libuv/src/.*:[0-9]+:[0-9]+: warning: The left operand of '==' is a garbage value" ) if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 08:07:08 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 08:07:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1744-gcd275e3 Message-ID: <20160903120708.4DBA2F596F@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, next has been updated via cd275e331a9406bc479d325b429717b1a643358a (commit) via 8eb648208f91d66b26bb7a9177e1d5d1fad25575 (commit) via 87e76f899693fb3c29f280b417303e899c3a38dd (commit) from 54df8a8b0a1148254ba838fe6901fe2f2bf173d9 (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=cd275e331a9406bc479d325b429717b1a643358a commit cd275e331a9406bc479d325b429717b1a643358a Merge: 54df8a8 8eb6482 Author: Brad King AuthorDate: Sat Sep 3 08:07:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 08:07:07 2016 -0400 Merge topic 'include-what-you-use' into next 8eb64820 Merge branch 'master' into include-what-you-use 87e76f89 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8eb648208f91d66b26bb7a9177e1d5d1fad25575 commit 8eb648208f91d66b26bb7a9177e1d5d1fad25575 Merge: b61a64b 87e76f8 Author: Brad King AuthorDate: Sat Sep 3 08:04:04 2016 -0400 Commit: Brad King CommitDate: Sat Sep 3 08:04:04 2016 -0400 Merge branch 'master' into include-what-you-use ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 08:08:06 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 08:08:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1750-g081ad4f Message-ID: <20160903120806.4EABDF5986@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, next has been updated via 081ad4fd9577fac940884baf7fb875fdf36a0961 (commit) via efed6468eda950644014ccfada85300710e05009 (commit) via bd3d0eafbb362fbc0f140c228da85791a473e44e (commit) via 3838a0d5fbed480c007b1667eddf2d6797a24344 (commit) via 54140848181e15acfda9c385e6cdc5c8b4f2a1d6 (commit) via 3f9c4cdf89ce00ae72a1176dbf5e68b5f1f1720e (commit) from cd275e331a9406bc479d325b429717b1a643358a (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=081ad4fd9577fac940884baf7fb875fdf36a0961 commit 081ad4fd9577fac940884baf7fb875fdf36a0961 Merge: cd275e3 efed646 Author: Brad King AuthorDate: Sat Sep 3 08:08:02 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 08:08:02 2016 -0400 Merge topic 'include-what-you-use' into next efed6468 fix a load of include-what-you-use violations bd3d0eaf cmCTest: don't redefine cout and cerr 3838a0d5 make sure to include cmConfigure.h before cmStandardIncludes.h 54140848 Tests/CMakeLib: include what you use 3f9c4cdf Tests/CMakeLib: use cmsys::ifstream https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efed6468eda950644014ccfada85300710e05009 commit efed6468eda950644014ccfada85300710e05009 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:59:28 2016 +0200 Commit: Brad King CommitDate: Sat Sep 3 08:04:56 2016 -0400 fix a load of include-what-you-use violations diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index ee3389c..5a8a5be 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -27,6 +27,8 @@ #include #include +#include "cmSystemTools.h" // IWYU pragma: keep + static const char* cmDocumentationName[][2] = { { 0, " cmake-gui - CMake GUI." }, { 0, 0 } }; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b4ddc3e..6523e3e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -9,52 +9,54 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCurl.h" // include before anything that includes windows.h - #include "cmCTest.h" #include "cmAlgorithms.h" -#include "cmCTestCommand.h" -#include "cmCTestStartCommand.h" -#include "cmDynamicLoader.h" -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" -#include "cmState.h" -#include "cmVersionMacros.h" -#include "cmXMLWriter.h" -#include "cmake.h" -#include -#include -#include -#include - #include "cmCTestBuildAndTestHandler.h" #include "cmCTestBuildHandler.h" #include "cmCTestConfigureHandler.h" #include "cmCTestCoverageHandler.h" +#include "cmCTestGenericHandler.h" #include "cmCTestMemCheckHandler.h" #include "cmCTestScriptHandler.h" +#include "cmCTestStartCommand.h" #include "cmCTestSubmitHandler.h" #include "cmCTestTestHandler.h" #include "cmCTestUpdateHandler.h" #include "cmCTestUploadHandler.h" - +#include "cmCurl.h" +#include "cmDynamicLoader.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmVersion.h" +#include "cmVersionConfig.h" +#include "cmXMLWriter.h" +#include "cmake.h" +#include +#include +#include +#include +#include +#include #include #include -#include - +#include +#include #include -#include -#include +#include +#include +#include +#include #include - -#include - -#include -#include +#include +#include +#include +#include +#include #if defined(__BEOS__) || defined(__HAIKU__) #include /* disable_debugger() API. */ diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 9d661d4..a73cd83 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -15,18 +15,18 @@ #include -#include "cmStandardIncludes.h" - -#include "cmListFileCache.h" +#include +#include +#include +#include +#include #include +#include -class cmake; -class cmMakefile; class cmCTestGenericHandler; -class cmGeneratedFileStream; -class cmCTestCommand; -class cmCTestScriptHandler; class cmCTestStartCommand; +class cmGeneratedFileStream; +class cmMakefile; class cmXMLWriter; #define cmCTestLog(ctSelf, logType, msg) \ diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 68111a0..6a2dfe8 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -11,12 +11,18 @@ ============================================================================*/ #include "cmCommandArgumentParserHelper.h" +#include + +#include "cmCommandArgumentLexer.h" #include "cmMakefile.h" -#include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" +#include "cmake.h" -#include "cmCommandArgumentLexer.h" +#include +#include +#include +#include int cmCommandArgument_yyparse(yyscan_t yyscanner); // diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index 1040ad3..6faf12b 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include #define YYSTYPE cmCommandArgumentParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index d7532b3..94f03e8 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -14,6 +14,7 @@ #include "cmAlgorithms.h" #include "cmOutputConverter.h" +#include "cmSystemTools.h" static std::string const keyAND = "AND"; static std::string const keyCOMMAND = "COMMAND"; diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index 8e2d87e..a3d3dd5 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -12,8 +12,10 @@ #include "cmCryptoHash.h" #include "cm_sha2.h" + #include #include +#include CM_AUTO_PTR cmCryptoHash::New(const char* algo) { diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index c51393d..0be2918 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -14,9 +14,9 @@ #include -#include "cmStandardIncludes.h" - #include +#include +#include /** * @brief Abstract base class for cryptographic hash generators diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index 5bc4f91..eec773f 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -11,7 +11,13 @@ ============================================================================*/ #include "cmCurl.h" +#include "cmThirdParty.h" + +#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ + !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) +#define CMAKE_FIND_CAFILE #include "cmSystemTools.h" +#endif // curl versions before 7.21.5 did not provide this error code #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505 @@ -32,8 +38,7 @@ std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile) ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); } -#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ - !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) +#ifdef CMAKE_FIND_CAFILE #define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt" else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) { ::CURLcode res = diff --git a/Source/cmCurl.h b/Source/cmCurl.h index c3a2053..6434f50 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -14,9 +14,8 @@ #include -#include "cmStandardIncludes.h" - -#include "cm_curl.h" +#include +#include std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile = CM_NULLPTR); diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index eaa49b0..89a04d1 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -13,7 +13,7 @@ #include "cmMakefile.h" -#include +#include cmCustomCommand::cmCustomCommand() : Backtrace() diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 152b3b9..b855bb9 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -12,11 +12,15 @@ #ifndef cmCustomCommand_h #define cmCustomCommand_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep +#include "cmCustomCommandLines.h" #include "cmListFileCache.h" + +#include +#include +#include + class cmMakefile; /** \class cmCustomCommand diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 6165bcf..8b8579b 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -12,10 +12,17 @@ #include "cmCustomCommandGenerator.h" #include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" + +#include cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc, const std::string& config, diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index 66644d6..f4cd9fd 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -12,13 +12,14 @@ #ifndef cmCustomCommandGenerator_h #define cmCustomCommandGenerator_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include class cmCustomCommand; -class cmLocalGenerator; class cmGeneratorExpression; +class cmLocalGenerator; class cmCustomCommandGenerator { diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index e0fb59b..fecc488 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -12,6 +12,8 @@ #include "cmDefinitions.h" #include +#include +#include cmDefinitions::Def cmDefinitions::NoDef; diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index f22de79..d1423ec 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -14,20 +14,21 @@ #include -#include "cmStandardIncludes.h" - #include "cmLinkedTree.h" +#include +#include + #if defined(CMAKE_BUILD_WITH_CMAKE) #ifdef CMake_HAVE_CXX_UNORDERED_MAP #include #else #include "cmsys/hash_map.hxx" #endif +#else +#include #endif -#include - /** \class cmDefinitions * \brief Store a scope of variable definitions for CMake language. * diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index ce72eda..23ff3a4 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -16,8 +16,11 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" + #include +#include #include +#include cmDepends::cmDepends(cmLocalGenerator* lg, const char* targetDir) : CompileDirectory() diff --git a/Source/cmDepends.h b/Source/cmDepends.h index b9d47a6..5ed784d 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -14,7 +14,12 @@ #include -#include "cmStandardIncludes.h" +#include +#include +#include +#include +#include +#include class cmFileTimeComparison; class cmLocalGenerator; diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 928f7ec..fbbf42f 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -15,10 +15,11 @@ #include "cmFileTimeComparison.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSystemTools.h" -#include -#include // isspace +#include +#include #define INCLUDE_REGEX_LINE \ "^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])" diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index bde07b7..5606fb3 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -12,10 +12,19 @@ #ifndef cmDependsC_h #define cmDependsC_h +#include + #include "cmDepends.h" #include +#include +#include #include +#include +#include +#include + +class cmLocalGenerator; /** \class cmDependsC * \brief Dependency scanner for C and C++ object files. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 8c0acce..1eece98 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -11,14 +11,20 @@ ============================================================================*/ #include "cmDependsFortran.h" +#include "cmFortranParser.h" /* Interface to parser object. */ #include "cmGeneratedFileStream.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSystemTools.h" -#include "cmFortranParser.h" /* Interface to parser object. */ #include #include +#include +#include +#include +#include +#include // TODO: Test compiler for the case of the mod file. Some always // use lower case and some always use upper case. I do not know if any diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index f4385eb..b6de46f 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -12,10 +12,17 @@ #ifndef cmFortran_h #define cmFortran_h +#include +#include +#include +#include +#include + #include "cmDepends.h" class cmDependsFortranInternals; class cmFortranSourceInfo; +class cmLocalGenerator; /** \class cmDependsFortran * \brief Dependency scanner for Fortran object files. diff --git a/Source/cmDependsJava.cxx b/Source/cmDependsJava.cxx index a9130e6..18bc695 100644 --- a/Source/cmDependsJava.cxx +++ b/Source/cmDependsJava.cxx @@ -11,7 +11,6 @@ ============================================================================*/ #include "cmDependsJava.h" -#include "cmDependsJavaParserHelper.h" #include "cmSystemTools.h" cmDependsJava::cmDependsJava() diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h index 5bb3039..95265c5 100644 --- a/Source/cmDependsJava.h +++ b/Source/cmDependsJava.h @@ -12,8 +12,15 @@ #ifndef cmDependsJava_h #define cmDependsJava_h +#include + #include "cmDepends.h" +#include +#include +#include +#include + /** \class cmDependsJava * \brief Dependency scanner for Java class files. */ diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index 79c4669..8d77ca6 100644 --- a/Source/cmDependsJavaParserHelper.cxx +++ b/Source/cmDependsJavaParserHelper.cxx @@ -11,9 +11,16 @@ ============================================================================*/ #include "cmDependsJavaParserHelper.h" +#include + #include "cmDependsJavaLexer.h" #include "cmSystemTools.h" + #include +#include +#include +#include +#include int cmDependsJava_yyparse(yyscan_t yyscanner); diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 377d584..731bbcc 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include #define YYSTYPE cmDependsJavaParserHelper::ParserType #define YYSTYPE_IS_DECLARED diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 5516cf1..13736b9 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -12,17 +12,18 @@ #include "cmDocumentation.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" +#include "cmDocumentationSection.h" #include "cmRST.h" #include "cmSystemTools.h" #include "cmVersion.h" -#include +#include #include #include - #include - -#include +#include +#include static const char* cmDocumentationStandardOptions[][2] = { { "--help,-help,-usage,-h,-H,/?", "Print usage information and exit." }, diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index c82e1d4..7661eb7 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -14,15 +14,15 @@ #include -#include "cmStandardIncludes.h" - #include "cmDocumentationFormatter.h" -#include "cmDocumentationSection.h" -#include "cmake.h" -namespace cmsys { -class Directory; -} +#include +#include +#include +#include + +class cmDocumentationSection; +struct cmDocumentationEntry; /** Class to generate documentation. */ class cmDocumentation : public cmDocumentationEnums diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 4816bb9..5a718a2 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -11,8 +11,14 @@ ============================================================================*/ #include "cmDocumentationFormatter.h" +#include "cmDocumentationEntry.h" #include "cmDocumentationSection.h" +#include +#include +#include +#include + cmDocumentationFormatter::cmDocumentationFormatter() : TextWidth(77) , TextIndent("") diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 7a93120..09fb20b 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -12,9 +12,9 @@ #ifndef _cmDocumentationFormatter_h #define _cmDocumentationFormatter_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include /** This is just a helper class to make it build with MSVC 6.0. Actually the enums and internal classes could directly go into diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index 161a731..1d41070 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -12,7 +12,12 @@ #ifndef _cmDocumentationSection_h #define _cmDocumentationSection_h -#include "cmDocumentationFormatter.h" +#include // IWYU pragma: keep + +#include "cmDocumentationEntry.h" + +#include +#include // Low-level interface for custom documents: /** Internal class representing a section of the documentation. diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index f6841ad..762feee 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -11,6 +11,13 @@ ============================================================================*/ #include "cmDynamicLoader.h" +#include + +#include +#include +#include +#include + class cmDynamicLoaderCache { public: diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index d9b8990..4f6ade5 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -17,9 +17,7 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 150593b..6fff984 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -9,12 +9,16 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmStandardIncludes.h" // to get CMAKE_USE_ELF_PARSER first - #include "cmELF.h" #include +#include #include +#include +#include +#include +#include +#include // Include the ELF format information system header. #if defined(__OpenBSD__) diff --git a/Source/cmELF.h b/Source/cmELF.h index 80832ad..a4c3456 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -12,6 +12,11 @@ #ifndef cmELF_h #define cmELF_h +#include + +#include +#include + #if !defined(CMAKE_USE_ELF_PARSER) #error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled." #endif diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 390477a..8f4dfd8 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -12,9 +12,23 @@ #include "cmExportBuildFileGenerator.h" #include "cmExportSet.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include "cmake.h" + +#include +#include +#include +#include +#include cmExportBuildFileGenerator::cmExportBuildFileGenerator() { diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h index 417e8c9..990824f 100644 --- a/Source/cmExportBuildFileGenerator.h +++ b/Source/cmExportBuildFileGenerator.h @@ -12,10 +12,18 @@ #ifndef cmExportBuildFileGenerator_h #define cmExportBuildFileGenerator_h +#include + #include "cmExportFileGenerator.h" -#include "cmListFileCache.h" + +#include +#include +#include class cmExportSet; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmLocalGenerator; /** \class cmExportBuildFileGenerator * \brief Generate a file exporting targets from a build tree. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 7f01196..23c77d9 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -13,20 +13,25 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" -#include "cmExportSet.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmInstallExportGenerator.h" +#include "cmGeneratorTarget.h" +#include "cmLinkItem.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" -#include "cmVersion.h" +#include "cmake.h" #include #include #include +#include +#include +#include static std::string cmExportFileGeneratorEscape(std::string const& str) { diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 9c96015..354994a 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -12,11 +12,19 @@ #ifndef cmExportFileGenerator_h #define cmExportFileGenerator_h -#include "cmCommand.h" -#include "cmGeneratorExpression.h" +#include // IWYU pragma: keep +#include "cmGeneratorExpression.h" #include "cmVersion.h" -#include "cmVersionMacros.h" +#include "cmVersionConfig.h" + +#include +#include +#include +#include +#include + +class cmGeneratorTarget; #define STRINGIFY_HELPER(X) #X #define STRINGIFY(X) STRINGIFY_HELPER(X) diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 7747157..ceba69a 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -15,12 +15,22 @@ #include "cmExportSet.h" #include "cmExportSetMap.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmInstallExportGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmPolicies.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTargetExport.h" +#include +#include + cmExportInstallFileGenerator::cmExportInstallFileGenerator( cmInstallExportGenerator* iegen) : IEGen(iegen) diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 68960db..c693dc1 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -12,8 +12,18 @@ #ifndef cmExportInstallFileGenerator_h #define cmExportInstallFileGenerator_h +#include + #include "cmExportFileGenerator.h" +#include +#include +#include +#include +#include + +class cmGeneratorTarget; +class cmGlobalGenerator; class cmInstallExportGenerator; class cmInstallTargetGenerator; diff --git a/Source/cmExportSet.h b/Source/cmExportSet.h index 49f2cac..4f3c9d8 100644 --- a/Source/cmExportSet.h +++ b/Source/cmExportSet.h @@ -12,11 +12,14 @@ #ifndef cmExportSet_h #define cmExportSet_h -#include "cmSystemTools.h" +#include // IWYU pragma: keep + +#include +#include -class cmTargetExport; class cmInstallExportGenerator; class cmLocalGenerator; +class cmTargetExport; /// A set of targets that were installed with the same EXPORT parameter. class cmExportSet diff --git a/Source/cmExportSetMap.cxx b/Source/cmExportSetMap.cxx index ac1c66e..42fb781 100644 --- a/Source/cmExportSetMap.cxx +++ b/Source/cmExportSetMap.cxx @@ -15,6 +15,8 @@ #include "cmAlgorithms.h" #include "cmExportSet.h" +#include + cmExportSet* cmExportSetMap::operator[](const std::string& name) { std::map::iterator it = this->find(name); diff --git a/Source/cmExportSetMap.h b/Source/cmExportSetMap.h index d2954e3..c3a55ba 100644 --- a/Source/cmExportSetMap.h +++ b/Source/cmExportSetMap.h @@ -12,7 +12,10 @@ #ifndef cmExportSetMap_h #define cmExportSetMap_h -#include "cmSystemTools.h" +#include // IWYU pragma: keep + +#include +#include class cmExportSet; diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 2916e6b..a0aefb8 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -12,10 +12,19 @@ #include "cmExportTryCompileFileGenerator.h" -#include "cmGeneratedFileStream.h" +#include "cmGeneratorExpression.h" #include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" + +#include +#include cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator( cmGlobalGenerator* gg, const std::vector& targets, diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h index 1d13711..27d5b3c 100644 --- a/Source/cmExportTryCompileFileGenerator.h +++ b/Source/cmExportTryCompileFileGenerator.h @@ -12,10 +12,18 @@ #ifndef cmExportTryCompileFileGenerator_h #define cmExportTryCompileFileGenerator_h +#include + #include "cmExportFileGenerator.h" -class cmInstallExportGenerator; -class cmInstallTargetGenerator; +#include +#include +#include +#include + +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; class cmExportTryCompileFileGenerator : public cmExportFileGenerator { diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx index 1a101ab..3a76367 100644 --- a/Source/cmExprParserHelper.cxx +++ b/Source/cmExprParserHelper.cxx @@ -11,11 +11,13 @@ ============================================================================*/ #include "cmExprParserHelper.h" -#include "cmMakefile.h" -#include "cmSystemTools.h" +#include #include "cmExprLexer.h" +#include +#include + int cmExpr_yyparse(yyscan_t yyscanner); // cmExprParserHelper::cmExprParserHelper() diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index 8e3d996..7402484 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -12,9 +12,10 @@ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include #define YYSTYPE cmExprParserHelper::ParserType #define YYSTYPE_IS_DECLARED @@ -26,9 +27,6 @@ * * Finds dependencies for java file and list of outputs */ - -class cmMakefile; - class cmExprParserHelper { public: diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx index b01290c..e4d124f 100644 --- a/Source/cmExternalMakefileProjectGenerator.cxx +++ b/Source/cmExternalMakefileProjectGenerator.cxx @@ -12,7 +12,7 @@ #include "cmExternalMakefileProjectGenerator.h" -#include +class cmMakefile; void cmExternalMakefileProjectGenerator::EnableLanguage( std::vector const& /*unused*/, cmMakefile* /*unused*/, diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h index 7d10ce1..b306f19 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -12,13 +12,13 @@ #ifndef cmExternalMakefileProjectGenerator_h #define cmExternalMakefileProjectGenerator_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include "cmDocumentation.h" +#include +#include class cmGlobalGenerator; +class cmMakefile; /** \class cmExternalMakefileProjectGenerator * \brief Base class for generators for "External Makefile based IDE projects". diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 6eae26b..7eb3a74 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -12,16 +12,23 @@ ============================================================================*/ #include "cmExtraCodeBlocksGenerator.h" +#include "cmAlgorithms.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmXMLWriter.h" #include "cmake.h" -#include +#include +#include +#include +#include +#include /* Some useful URLs: Homepage: diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h index b39080c..179be30 100644 --- a/Source/cmExtraCodeBlocksGenerator.h +++ b/Source/cmExtraCodeBlocksGenerator.h @@ -13,11 +13,16 @@ #ifndef cmExtraCodeBlocksGenerator_h #define cmExtraCodeBlocksGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include + +class cmGeneratorTarget; class cmLocalGenerator; class cmMakefile; -class cmGeneratorTarget; class cmXMLWriter; /** \class cmExtraCodeBlocksGenerator diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index eda6867..a039f49 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -14,18 +14,22 @@ #include "cmExtraCodeLiteGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmXMLWriter.h" #include "cmake.h" -#include "cmStandardIncludes.h" -#include "cmXMLWriter.h" -#include #include -#include +#include +#include +#include +#include +#include cmExtraCodeLiteGenerator::cmExtraCodeLiteGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmExtraCodeLiteGenerator.h b/Source/cmExtraCodeLiteGenerator.h index e20e745..f5765d8 100644 --- a/Source/cmExtraCodeLiteGenerator.h +++ b/Source/cmExtraCodeLiteGenerator.h @@ -14,9 +14,15 @@ #ifndef cmGlobalCodeLiteGenerator_h #define cmGlobalCodeLiteGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include + class cmLocalGenerator; +class cmMakefile; class cmExtraCodeLiteGenerator : public cmExternalMakefileProjectGenerator { diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 945ee40..5a98e34 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -14,17 +14,26 @@ #include "cmExtraEclipseCDT4Generator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" +#include "cmSourceGroup.h" #include "cmState.h" -#include "cmTarget.h" +#include "cmSystemTools.h" #include "cmXMLWriter.h" +#include "cmake.h" -#include "cmSystemTools.h" +#include #include -#include +#include +#include +#include +#include +#include static void AppendAttribute(cmXMLWriter& xml, const char* keyval) { diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index 4b585c3..97b7bd7 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -14,11 +14,19 @@ #ifndef cmExtraEclipseCDT4Generator_h #define cmExtraEclipseCDT4Generator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include +#include +#include + +class cmLocalGenerator; class cmMakefile; -class cmXMLWriter; class cmSourceGroup; +class cmXMLWriter; /** \class cmExtraEclipseCDT4Generator * \brief Write Eclipse project files for Makefile based projects diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 4e72504..36ab5b3 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -13,14 +13,18 @@ #include "cmExtraKateGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" -#include +#include +#include +#include +#include cmExtraKateGenerator::cmExtraKateGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h index 3d16052..518dead 100644 --- a/Source/cmExtraKateGenerator.h +++ b/Source/cmExtraKateGenerator.h @@ -13,10 +13,14 @@ #ifndef cmExtraKateGenerator_h #define cmExtraKateGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" -class cmLocalGenerator; +#include + class cmGeneratedFileStream; +class cmLocalGenerator; /** \class cmExtraKateGenerator * \brief Write Kate project files for Makefile or ninja based projects diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 6e81ee1..8ee275a 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -14,15 +14,18 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" -#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" -#include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" -#include "cmake.h" -#include +#include +#include +#include +#include +#include /* Sublime Text 2 Generator diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index c087825..ee2b253 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -13,13 +13,19 @@ #ifndef cmExtraSublimeTextGenerator_h #define cmExtraSublimeTextGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" -#include "cmSourceFile.h" -class cmLocalGenerator; -class cmMakefile; +#include +#include +#include + class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; +class cmMakefile; +class cmSourceFile; /** \class cmExtraSublimeTextGenerator * \brief Write Sublime Text 2 project files for Makefile based projects diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 38b90e1..90bb1b2 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -13,9 +13,9 @@ #ifndef cmFileLock_h #define cmFileLock_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include #if defined(_WIN32) #include // HANDLE diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index a3883da..d1883e7 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -12,14 +12,13 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include +#include -class cmFileLockResult; class cmFileLock; +class cmFileLockResult; class cmFileLockPool { diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx index 090fe60..de851bc 100644 --- a/Source/cmFileLockResult.cxx +++ b/Source/cmFileLockResult.cxx @@ -13,6 +13,7 @@ #include "cmFileLockResult.h" #include +#include cmFileLockResult cmFileLockResult::MakeOk() { diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h index 10d4c13..54b9626 100644 --- a/Source/cmFileLockResult.h +++ b/Source/cmFileLockResult.h @@ -13,9 +13,9 @@ #ifndef cmFileLockResult_h #define cmFileLockResult_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include #if defined(_WIN32) #include // DWORD diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index f99646c..b2def51 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -17,6 +17,8 @@ #include "cmMakefile.h" #include "cmSystemTools.h" +#include + cmFilePathUuid::cmFilePathUuid(cmMakefile* makefile) { initParentDirs(makefile->GetCurrentSourceDirectory(), diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 619c71b..87cfcf8 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -13,10 +13,9 @@ #ifndef cmFilePathUuid_h #define cmFilePathUuid_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx index 1360b44..089d520 100644 --- a/Source/cmFileTimeComparison.cxx +++ b/Source/cmFileTimeComparison.cxx @@ -11,6 +11,11 @@ ============================================================================*/ #include "cmFileTimeComparison.h" +#include +#include +#include +#include + // Use a hash table to avoid duplicate file time checks from disk. #if defined(CMAKE_BUILD_WITH_CMAKE) #ifdef CMake_HAVE_CXX_UNORDERED_MAP @@ -20,16 +25,14 @@ #endif #endif -#include - // Use a platform-specific API to get file times efficiently. #if !defined(_WIN32) || defined(__CYGWIN__) -#define cmFileTimeComparison_Type struct stat -#include #include +#define cmFileTimeComparison_Type struct stat #else -#define cmFileTimeComparison_Type FILETIME +#include #include +#define cmFileTimeComparison_Type FILETIME #endif class cmFileTimeComparisonInternal diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h index 52e974c..ea5c47e 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -12,9 +12,7 @@ #ifndef cmFileTimeComparison_h #define cmFileTimeComparison_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep class cmFileTimeComparisonInternal; diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 30a33b4..71edf9f 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -10,9 +10,16 @@ See the License for more information. ============================================================================*/ #include "cmFortranParser.h" - +#include "cmFortranLexer.h" #include "cmSystemTools.h" + #include +#include +#include +#include +#include +#include +#include bool cmFortranParser_s::FindIncludeFile(const char* dir, const char* includeName, diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index c35a1bc..9a83070 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" +#include + #if defined(CMAKE_BUILD_WITH_CMAKE) #include #endif diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index e5e3320..4c4f26b 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -14,9 +14,8 @@ #include -#include "cmStandardIncludes.h" - #include +#include // This is the first base class of cmGeneratedFileStream. It will be // created before and destroyed after the ofstream portion and can diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 6cd6439..b016d9e 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -13,12 +13,14 @@ #include "assert.h" #include "cmAlgorithms.h" -#include "cmSystemTools.h" - -#include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorExpressionContext.h" #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" +#include "cmSystemTools.h" + +#include +#include cmGeneratorExpression::cmGeneratorExpression( const cmListFileBacktrace& backtrace) diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 75e69b4..24233b3 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -15,22 +15,20 @@ #include -#include "cmStandardIncludes.h" - #include "cmListFileCache.h" #include -#include +#include +#include +#include +#include +class cmCompiledGeneratorExpression; class cmGeneratorTarget; class cmLocalGenerator; -class cmListFileBacktrace; - -struct cmGeneratorExpressionEvaluator; struct cmGeneratorExpressionContext; struct cmGeneratorExpressionDAGChecker; - -class cmCompiledGeneratorExpression; +struct cmGeneratorExpressionEvaluator; /** \class cmGeneratorExpression * \brief Evaluate generate-time query expression syntax. diff --git a/Source/cmGeneratorExpressionContext.cxx b/Source/cmGeneratorExpressionContext.cxx index 8da6b50..77289d1 100644 --- a/Source/cmGeneratorExpressionContext.cxx +++ b/Source/cmGeneratorExpressionContext.cxx @@ -12,8 +12,6 @@ #include "cmGeneratorExpressionContext.h" -#include "cmGeneratorTarget.h" - cmGeneratorExpressionContext::cmGeneratorExpressionContext( cmLocalGenerator* lg, std::string const& config, bool quiet, cmGeneratorTarget const* headTarget, const cmGeneratorTarget* currentTarget, diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index 045ded1..c477443 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -13,7 +13,15 @@ #include "cmGeneratorExpressionDAGChecker.h" #include "cmAlgorithms.h" +#include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionEvaluator.h" +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" +#include "cmake.h" + +#include +#include +#include cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( const cmListFileBacktrace& backtrace, const std::string& target, diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index e522728..c6d7281 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -14,9 +14,14 @@ #include -#include "cmStandardIncludes.h" +#include "cmListFileCache.h" -#include "cmGeneratorExpressionEvaluator.h" +#include +#include +#include + +struct GeneratorExpressionContent; +struct cmGeneratorExpressionContext; #define CM_SELECT_BOTH(F, A1, A2) F(A1, A2) #define CM_SELECT_FIRST(F, A1, A2) F(A1) diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index c01c4fc..aad9d1b 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -14,12 +14,17 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" +#include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include +#include "cmSystemTools.h" +#include "cmake.h" -#include +#include +#include +#include +#include cmGeneratorExpressionEvaluationFile::cmGeneratorExpressionEvaluationFile( const std::string& input, diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 52ba2d8..3a668a2 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -12,10 +12,15 @@ #ifndef cmGeneratorExpressionEvaluationFile_h #define cmGeneratorExpressionEvaluationFile_h +#include // IWYU pragma: keep + #include "cmGeneratorExpression.h" #include +#include +#include #include +#include class cmLocalGenerator; diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index b4b74c5..d21ab25 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -12,21 +12,12 @@ #include "cmGeneratorExpressionEvaluator.h" #include "cmAlgorithms.h" -#include "cmGeneratorExpression.h" -#include "cmGeneratorExpressionDAGChecker.h" -#include "cmGeneratorExpressionParser.h" -#include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" -#include "cmSourceFile.h" - -#include - -#include -#include - +#include "cmGeneratorExpressionContext.h" #include "cmGeneratorExpressionNode.h" +#include +#include + GeneratorExpressionContent::GeneratorExpressionContent( const char* startContent, size_t length) : StartContent(startContent) diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 58e732b..5e8ebe0 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -12,13 +12,13 @@ #ifndef cmGeneratorExpressionEvaluator_h #define cmGeneratorExpressionEvaluator_h -#include "cmGeneratorExpressionContext.h" - -#include "cmListFileCache.h" +#include +#include #include #include +struct cmGeneratorExpressionContext; struct cmGeneratorExpressionDAGChecker; struct cmGeneratorExpressionNode; diff --git a/Source/cmGeneratorExpressionLexer.h b/Source/cmGeneratorExpressionLexer.h index 6bd336b..55836ac 100644 --- a/Source/cmGeneratorExpressionLexer.h +++ b/Source/cmGeneratorExpressionLexer.h @@ -12,10 +12,10 @@ #ifndef cmGeneratorExpressionLexer_h #define cmGeneratorExpressionLexer_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep +#include +#include #include struct cmGeneratorExpressionToken diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 12cf980..44e9ce1 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -13,9 +13,36 @@ #include "cmGeneratorExpressionNode.h" #include "cmAlgorithms.h" +#include "cmGeneratorExpression.h" +#include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionDAGChecker.h" +#include "cmGeneratorExpressionEvaluator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmLinkItem.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" +#include "cmSourceFile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include std::string cmGeneratorExpressionNode::EvaluateDependentExpression( std::string const& prop, cmLocalGenerator* lg, @@ -1455,13 +1482,12 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode } installPrefixNode; -class ArtifactNameTag; +class ArtifactDirTag; class ArtifactLinkerTag; -class ArtifactSonameTag; -class ArtifactPdbTag; - +class ArtifactNameTag; class ArtifactPathTag; -class ArtifactDirTag; +class ArtifactPdbTag; +class ArtifactSonameTag; template struct TargetFilesystemArtifactResultCreator diff --git a/Source/cmGeneratorExpressionNode.h b/Source/cmGeneratorExpressionNode.h index 3ee57eb..23f405b 100644 --- a/Source/cmGeneratorExpressionNode.h +++ b/Source/cmGeneratorExpressionNode.h @@ -12,20 +12,16 @@ #ifndef cmGeneratorExpressionNode_h #define cmGeneratorExpressionNode_h -#include "cmGeneratorExpression.h" +#include // IWYU pragma: keep -#include "cmGeneratorExpressionDAGChecker.h" -#include "cmGeneratorExpressionEvaluator.h" -#include "cmGeneratorExpressionParser.h" -#include "cmLocalGenerator.h" -#include "cmSourceFile.h" +#include +#include -#include - -#include -#include - -#include "cmListFileCache.h" +class cmGeneratorTarget; +class cmLocalGenerator; +struct GeneratorExpressionContent; +struct cmGeneratorExpressionContext; +struct cmGeneratorExpressionDAGChecker; struct cmGeneratorExpressionNode { diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index f853f8d..c753f9b 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -14,7 +14,8 @@ #include "cmGeneratorExpressionEvaluator.h" -#include "assert.h" +#include +#include cmGeneratorExpressionParser::cmGeneratorExpressionParser( const std::vector& tokens) diff --git a/Source/cmGeneratorExpressionParser.h b/Source/cmGeneratorExpressionParser.h index b0e9ea4..4534d6b 100644 --- a/Source/cmGeneratorExpressionParser.h +++ b/Source/cmGeneratorExpressionParser.h @@ -12,12 +12,11 @@ #ifndef cmGeneratorExpressionParser_h #define cmGeneratorExpressionParser_h -#include "cmGeneratorExpressionLexer.h" +#include // IWYU pragma: keep -#include #include -#include "cmListFileCache.h" +#include "cmGeneratorExpressionLexer.h" struct cmGeneratorExpressionEvaluator; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8bd3b82..ee2907c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -13,19 +13,33 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" +#include "cmCustomCommandLines.h" #include "cmGeneratorExpression.h" #include "cmGeneratorExpressionDAGChecker.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmPropertyMap.h" #include "cmSourceFile.h" +#include "cmSourceFileLocation.h" +#include "cmSystemTools.h" #include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" -#include - -#include "assert.h" +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #if defined(CMake_HAVE_CXX_UNORDERED_SET) #include diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index f9987aa..173f15d 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -12,15 +12,26 @@ #ifndef cmGeneratorTarget_h #define cmGeneratorTarget_h +#include + #include "cmLinkItem.h" +#include "cmListFileCache.h" +#include "cmPolicies.h" +#include "cmState.h" + +#include +#include +#include +#include +#include +class cmComputeLinkInformation; class cmCustomCommand; class cmGlobalGenerator; class cmLocalGenerator; class cmMakefile; class cmSourceFile; class cmTarget; -class cmComputeLinkInformation; class cmGeneratorTarget { diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 3d35114..d3c9625 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -12,6 +12,7 @@ #include "cmGhsMultiTargetGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGhsMultiGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx index 900b08e..d8ea317 100644 --- a/Source/cmGlobalCommonGenerator.cxx +++ b/Source/cmGlobalCommonGenerator.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmGlobalCommonGenerator.h" +class cmake; + cmGlobalCommonGenerator::cmGlobalCommonGenerator(cmake* cm) : cmGlobalGenerator(cm) { diff --git a/Source/cmGlobalCommonGenerator.h b/Source/cmGlobalCommonGenerator.h index a48ff4f..5bc16c3 100644 --- a/Source/cmGlobalCommonGenerator.h +++ b/Source/cmGlobalCommonGenerator.h @@ -12,8 +12,12 @@ #ifndef cmGlobalCommonGenerator_h #define cmGlobalCommonGenerator_h +#include + #include "cmGlobalGenerator.h" +class cmake; + /** \class cmGlobalCommonGenerator * \brief Common infrastructure for Makefile and Ninja global generators. */ diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 50c5a42..ef8266f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -21,6 +21,8 @@ #include "cmAlgorithms.h" #include "cmCPackPropertiesGenerator.h" #include "cmComputeTargetDepends.h" +#include "cmCustomCommand.h" +#include "cmCustomCommandLines.h" #include "cmExportBuildFileGenerator.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmGeneratedFileStream.h" @@ -29,25 +31,31 @@ #include "cmInstallGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmQtAutoGeneratorInitializer.h" #include "cmSourceFile.h" #include "cmState.h" -#include "cmTargetExport.h" #include "cmVersion.h" #include "cmake.h" +#include +#include #include #include +#include +#include +#include +#include +#include #if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cm_jsoncpp_value.h" -#include "cm_jsoncpp_writer.h" +#include +#include #include #endif -#include // required for atof - -#include +class cmInstalledFile; bool cmTarget::StrictTargetComparison::operator()(cmTarget const* t1, cmTarget const* t2) const diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index dc80a33..1e1479a 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -15,15 +15,18 @@ #include -#include "cmStandardIncludes.h" - -#include "cmExportSetMap.h" // For cmExportSetMap -#include "cmGeneratorExpression.h" -#include "cmGeneratorTarget.h" +#include "cmExportSetMap.h" #include "cmState.h" -#include "cmSystemTools.h" // for cmSystemTools::OutputOption -#include "cmTarget.h" // For cmTargets -#include "cmTargetDepend.h" // For cmTargetDependSet +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" + +#include +#include +#include +#include +#include +#include #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmFileLockPool.h" @@ -34,15 +37,14 @@ #endif #endif -class cmake; +class cmCustomCommandLines; +class cmSourceFile; +class cmExportBuildFileGenerator; +class cmExternalMakefileProjectGenerator; class cmGeneratorTarget; -class cmMakefile; class cmLocalGenerator; -class cmExternalMakefileProjectGenerator; -class cmTarget; -class cmInstallTargetGenerator; -class cmInstallFilesGenerator; -class cmExportBuildFileGenerator; +class cmMakefile; +class cmake; /** \class cmGlobalGenerator * \brief Responsible for overseeing the generation process for the entire tree diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 0ae913e..d75ebf8 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -12,6 +12,7 @@ #include "cmGlobalGhsMultiGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGhsMultiTargetGenerator.h" #include "cmLocalGhsMultiGenerator.h" #include "cmMakefile.h" diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index daf7003..aaa1108 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -13,17 +13,23 @@ #include "cmGlobalKdevelopGenerator.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalUnixMakefileGenerator3.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" +#include "cmState.h" #include "cmSystemTools.h" +#include "cmTarget.h" #include "cmXMLWriter.h" #include "cmake.h" #include #include -#include +#include +#include +#include +#include cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator() : cmExternalMakefileProjectGenerator() diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h index 666527c..6a201b0 100644 --- a/Source/cmGlobalKdevelopGenerator.h +++ b/Source/cmGlobalKdevelopGenerator.h @@ -13,8 +13,13 @@ #ifndef cmGlobalKdevelopGenerator_h #define cmGlobalKdevelopGenerator_h +#include + #include "cmExternalMakefileProjectGenerator.h" +#include +#include + class cmLocalGenerator; /** \class cmGlobalKdevelopGenerator diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 590f207..30a05a0 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -13,16 +13,27 @@ #include "cmGlobalNinjaGenerator.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpressionEvaluationFile.h" #include "cmGeneratorTarget.h" +#include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" #include "cmVersion.h" +#include "cmake.h" #include -#include #include +#include +#include +#include +#include const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja"; const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja"; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 082ee3a..a0fad64 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -13,16 +13,28 @@ #ifndef cmGlobalNinjaGenerator_h #define cmGlobalNinjaGenerator_h -#include "cmGlobalCommonGenerator.h" +#include +#include "cmGlobalCommonGenerator.h" +#include "cmGlobalGenerator.h" #include "cmGlobalGeneratorFactory.h" #include "cmNinjaTypes.h" - -//#define NINJA_GEN_VERBOSE_FILES - -class cmLocalGenerator; +#include "cmPolicies.h" + +#include +#include +#include +#include +#include +#include + +class cmCustomCommand; +class cmMakefile; +class cmake; +struct cmDocumentationEntry; class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; /** * \class cmGlobalNinjaGenerator diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 77fbbe9..d90ebf0 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -12,13 +12,25 @@ #include "cmGlobalUnixMakefileGenerator3.h" #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" #include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" +#include "cmOutputConverter.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetDepend.h" #include "cmake.h" +#include +#include +#include +#include + cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3(cmake* cm) : cmGlobalCommonGenerator(cm) { diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index ceb4140..3724124 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -12,13 +12,27 @@ #ifndef cmGlobalUnixMakefileGenerator3_h #define cmGlobalUnixMakefileGenerator3_h -#include "cmGlobalCommonGenerator.h" +#include +#include "cmGeneratorTarget.h" +#include "cmGlobalCommonGenerator.h" #include "cmGlobalGeneratorFactory.h" +#include "cmState.h" + +#include +#include +#include +#include +#include +#include class cmGeneratedFileStream; -class cmMakefileTargetGenerator; +class cmLocalGenerator; class cmLocalUnixMakefileGenerator3; +class cmMakefile; +class cmMakefileTargetGenerator; +class cmake; +struct cmDocumentationEntry; /** \class cmGlobalUnixMakefileGenerator3 * \brief Write a Unix makefiles. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index df831e5..819feb1 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio10Generator.h" #include "cmAlgorithms.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 45d9522..ea008ad 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -13,6 +13,7 @@ #include "cmGlobalVisualStudio71Generator.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmake.h" diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 67ac230..08be304 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio7Generator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmUuid.h" diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 2c0168e..53a05a0 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -14,6 +14,7 @@ #include "cmGlobalVisualStudio8Generator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmLocalVisualStudio7Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx index 86fe6f2..d8f1d93 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.cxx +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -11,8 +11,10 @@ ============================================================================*/ #include "cmGlobalWatcomWMakeGenerator.h" -#include "cmLocalUnixMakefileGenerator3.h" +#include "cmDocumentationEntry.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmake.h" cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator(cmake* cm) : cmGlobalUnixMakefileGenerator3(cm) diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index bc0d786..df1168e 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -12,8 +12,18 @@ #ifndef cmGlobalWatcomWMakeGenerator_h #define cmGlobalWatcomWMakeGenerator_h +#include + +#include "cmGlobalGeneratorFactory.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include +#include + +class cmMakefile; +class cmake; +struct cmDocumentationEntry; + /** \class cmGlobalWatcomWMakeGenerator * \brief Write a NMake makefiles. * diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index adb9936..2824f7e 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -12,9 +12,19 @@ #include "cmGraphVizWriter.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" + +#include +#include +#include +#include static const char* getShapeForTarget(const cmGeneratorTarget* target) { diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index 0643785..f34e967 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -12,15 +12,19 @@ #ifndef CMGRAPHVIZWRITER_H #define CMGRAPHVIZWRITER_H -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include "cmState.h" -#include "cmGeneratedFileStream.h" -#include "cmLocalGenerator.h" #include +#include +#include +#include +#include +class cmGeneratedFileStream; class cmGeneratorTarget; +class cmLocalGenerator; /** This class implements writing files for graphviz (dot) for graphs * representing the dependencies between the targets in the project. */ diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 469b119..3b4226d 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -12,8 +12,11 @@ #include "cmInstallDirectoryGenerator.h" #include "cmGeneratorExpression.h" +#include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" cmInstallDirectoryGenerator::cmInstallDirectoryGenerator( std::vector const& dirs, const char* dest, diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h index 93becf4..ed40785 100644 --- a/Source/cmInstallDirectoryGenerator.h +++ b/Source/cmInstallDirectoryGenerator.h @@ -13,6 +13,14 @@ #define cmInstallDirectoryGenerator_h #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include +#include + +class cmLocalGenerator; /** \class cmInstallDirectoryGenerator * \brief Generate directory installation rules. diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 72c4d1f..27628f4 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -11,19 +11,17 @@ ============================================================================*/ #include "cmInstallExportGenerator.h" -#include - -#include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmInstallTargetGenerator.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" -#include "cmake.h" - -#include "cmInstallFilesGenerator.h" +#include +#include +#include +#include #include "cmExportInstallFileGenerator.h" #include "cmExportSet.h" +#include "cmInstallType.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmake.h" cmInstallExportGenerator::cmInstallExportGenerator( cmExportSet* exportSet, const char* destination, diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h index 22e661b..5539827 100644 --- a/Source/cmInstallExportGenerator.h +++ b/Source/cmInstallExportGenerator.h @@ -12,13 +12,19 @@ #ifndef cmInstallExportGenerator_h #define cmInstallExportGenerator_h +#include + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include +#include class cmExportInstallFileGenerator; -class cmInstallFilesGenerator; -class cmInstallTargetGenerator; class cmExportSet; -class cmMakefile; +class cmLocalGenerator; /** \class cmInstallExportGenerator * \brief Generate rules for creating an export files. diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index 93a740c..1d0fadd 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -12,9 +12,11 @@ #include "cmInstallFilesGenerator.h" #include "cmGeneratorExpression.h" -#include "cmLocalGenerator.h" -#include "cmMakefile.h" +#include "cmInstallType.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" + +class cmLocalGenerator; cmInstallFilesGenerator::cmInstallFilesGenerator( std::vector const& files, const char* dest, bool programs, diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h index 5cb09f4..1648976 100644 --- a/Source/cmInstallFilesGenerator.h +++ b/Source/cmInstallFilesGenerator.h @@ -12,7 +12,16 @@ #ifndef cmInstallFilesGenerator_h #define cmInstallFilesGenerator_h +#include + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include + +class cmLocalGenerator; /** \class cmInstallFilesGenerator * \brief Generate file installation rules. diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index e3d5bad..69120a8 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -14,6 +14,8 @@ #include "cmMakefile.h" #include "cmSystemTools.h" +#include + cmInstallGenerator::cmInstallGenerator( const char* destination, std::vector const& configurations, const char* component, MessageLevel message, bool exclude_from_all) diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index ad9fc28..fa0bdd6 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -12,9 +12,15 @@ #ifndef cmInstallGenerator_h #define cmInstallGenerator_h +#include + #include "cmInstallType.h" #include "cmScriptGenerator.h" +#include +#include +#include + class cmLocalGenerator; class cmMakefile; diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index 76d6b71..7871100 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -11,6 +11,11 @@ ============================================================================*/ #include "cmInstallScriptGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include + cmInstallScriptGenerator::cmInstallScriptGenerator(const char* script, bool code, const char* component, diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h index dc00359..609294f 100644 --- a/Source/cmInstallScriptGenerator.h +++ b/Source/cmInstallScriptGenerator.h @@ -12,8 +12,13 @@ #ifndef cmInstallScriptGenerator_h #define cmInstallScriptGenerator_h +#include + #include "cmInstallGenerator.h" +#include +#include + /** \class cmInstallScriptGenerator * \brief Generate target installation rules. */ diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 4b2f40c..1ad59ff 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -14,13 +14,21 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" -#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" +#include "cmInstallType.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" #include +#include +#include +#include +#include cmInstallTargetGenerator::cmInstallTargetGenerator( const std::string& targetName, const char* dest, bool implib, diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index b1c28b8..797e962 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -12,9 +12,17 @@ #ifndef cmInstallTargetGenerator_h #define cmInstallTargetGenerator_h +#include + #include "cmInstallGenerator.h" +#include "cmScriptGenerator.h" + +#include +#include +#include class cmGeneratorTarget; +class cmLocalGenerator; /** \class cmInstallTargetGenerator * \brief Generate target installation rules. diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index bfc5cf1..3ab7db0 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -12,9 +12,13 @@ #include "cmInstalledFile.h" #include "cmAlgorithms.h" +#include "cmListFileCache.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include +#include + cmInstalledFile::cmInstalledFile() : NameExpression(CM_NULLPTR) { diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index 00ff611..8bad5a5 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -13,6 +13,13 @@ #define cmInstalledFile_h #include "cmGeneratorExpression.h" +#include "cm_auto_ptr.hxx" + +#include +#include +#include + +class cmMakefile; /** \class cmInstalledFile * \brief Represents a file intended for installation. diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index aad538c..14bb81e 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -15,9 +15,12 @@ #include "cmMessenger.h" #include "cmOutputConverter.h" #include "cmSystemTools.h" -#include "cmVersion.h" +#include "cmake.h" -#include +#include +#include +#include +#include struct cmListFileParser { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 08b59eb..215f179 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -12,9 +12,11 @@ #ifndef cmListFileCache_h #define cmListFileCache_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include +#include #include "cmState.h" @@ -151,6 +153,7 @@ public: private: struct Entry; + cmState::Snapshot Bottom; Entry* Cur; cmListFileBacktrace(cmState::Snapshot bottom, Entry* up, diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 1383421..0e79293 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -11,8 +11,13 @@ ============================================================================*/ #include "cmLocalCommonGenerator.h" +#include "cmGeneratorTarget.h" #include "cmMakefile.h" +#include + +class cmGlobalGenerator; + cmLocalCommonGenerator::cmLocalCommonGenerator( cmGlobalGenerator* gg, cmMakefile* mf, cmOutputConverter::RelativeRoot wd) : cmLocalGenerator(gg, mf) diff --git a/Source/cmLocalCommonGenerator.h b/Source/cmLocalCommonGenerator.h index 0a8753d..9012afd 100644 --- a/Source/cmLocalCommonGenerator.h +++ b/Source/cmLocalCommonGenerator.h @@ -12,9 +12,16 @@ #ifndef cmLocalCommonGenerator_h #define cmLocalCommonGenerator_h +#include + #include "cmLocalGenerator.h" +#include "cmOutputConverter.h" + +#include -class cmCommonTargetGenerator; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; /** \class cmLocalCommonGenerator * \brief Common infrastructure for Makefile and Ninja local generators. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index de9e1e5..cecf7b7 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -16,14 +16,15 @@ #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpressionEvaluationFile.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" -#include "cmInstallFilesGenerator.h" #include "cmInstallGenerator.h" #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" -#include "cmTest.h" +#include "cmSystemTools.h" +#include "cmTarget.h" #include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" @@ -33,9 +34,14 @@ #include #endif -#include // for isalpha - +#include #include +#include +#include +#include +#include +#include +#include #if defined(__HAIKU__) #include diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index f7a4074..a43a7d1 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -14,19 +14,25 @@ #include -#include "cmStandardIncludes.h" - +#include "cmListFileCache.h" #include "cmOutputConverter.h" +#include "cmPolicies.h" #include "cmState.h" #include "cmake.h" -class cmMakefile; -class cmGlobalGenerator; +#include +#include +#include +#include +#include +#include +#include + +class cmCustomCommandGenerator; class cmGeneratorTarget; -class cmTargetManifest; +class cmGlobalGenerator; +class cmMakefile; class cmSourceFile; -class cmCustomCommand; -class cmCustomCommandGenerator; /** \class cmLocalGenerator * \brief Create required build files for a directory. diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index d15ee22..6793f84 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -12,16 +12,25 @@ ============================================================================*/ #include "cmLocalNinjaGenerator.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmGlobalNinjaGenerator.h" #include "cmMakefile.h" #include "cmNinjaTargetGenerator.h" #include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" +#include #include +#include +#include +#include +#include cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf) diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 6e61087..25539d4 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -13,13 +13,27 @@ #ifndef cmLocalNinjaGenerator_h #define cmLocalNinjaGenerator_h -#include "cmLocalCommonGenerator.h" +#include +#include "cmLocalCommonGenerator.h" +#include "cmLocalGenerator.h" #include "cmNinjaTypes.h" +#include "cmOutputConverter.h" + +#include +#include +#include +#include +#include +class cmCustomCommand; class cmCustomCommandGenerator; -class cmGlobalNinjaGenerator; class cmGeneratedFileStream; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmGlobalNinjaGenerator; +class cmMakefile; +class cmSourceFile; class cmake; /** diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 3c4841e..611c502 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -12,13 +12,20 @@ #include "cmLocalUnixMakefileGenerator3.h" #include "cmAlgorithms.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmFileTimeComparison.h" #include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmVersion.h" #include "cmake.h" @@ -30,11 +37,14 @@ #include "cmDependsJava.h" #endif +#include #include +#include #include - -#include -#include +#include +#include +#include +#include // Escape special characters in Makefile dependency lines class cmMakeSafe diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 3e90055..bd32e10 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -12,15 +12,22 @@ #ifndef cmLocalUnixMakefileGenerator3_h #define cmLocalUnixMakefileGenerator3_h -#include "cmLocalCommonGenerator.h" +#include -// for cmDepends::DependencyVector #include "cmDepends.h" +#include "cmLocalCommonGenerator.h" + +#include +#include +#include +#include +#include class cmCustomCommand; class cmCustomCommandGenerator; -class cmDepends; -class cmMakefileTargetGenerator; +class cmGeneratorTarget; +class cmGlobalGenerator; +class cmMakefile; class cmSourceFile; /** \class cmLocalUnixMakefileGenerator3 diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 37b5505..0fe7987 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -11,10 +11,12 @@ ============================================================================*/ #include "cmLocalVisualStudio10Generator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmVisualStudio10TargetGenerator.h" #include "cmXMLParser.h" + #include class cmVS10XMLParser : public cmXMLParser diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index b492962..d344dc5 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -12,6 +12,7 @@ #include "cmLocalVisualStudioGenerator.h" #include "cmCustomCommandGenerator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx index db87946..098779e 100644 --- a/Source/cmLocalXCodeGenerator.cxx +++ b/Source/cmLocalXCodeGenerator.cxx @@ -11,6 +11,7 @@ ============================================================================*/ #include "cmLocalXCodeGenerator.h" +#include "cmGeneratorTarget.h" #include "cmGlobalXCodeGenerator.h" #include "cmMakefile.h" #include "cmSourceFile.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d1fddca..11ccca1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -23,34 +23,35 @@ #include "cmGeneratorExpression.h" #include "cmGeneratorExpressionEvaluationFile.h" #include "cmGlobalGenerator.h" -#include "cmInstallGenerator.h" #include "cmListFileCache.h" -#include "cmMessenger.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" #include "cmState.h" #include "cmSystemTools.h" #include "cmTest.h" -#include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" +#include "cmInstallGenerator.h" // IWYU pragma: keep +#include "cmTestGenerator.h" // IWYU pragma: keep + #ifdef CMAKE_BUILD_WITH_CMAKE #include "cmVariableWatch.h" #endif +#include +#include #include #include #include - -#include -#include #include #include #include #include #include +class cmMessenger; + // default is not to be building executables cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, cmState::Snapshot const& snapshot) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4d137db..eb382df 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -54,6 +54,7 @@ class cmFunctionBlocker; class cmGeneratorExpressionEvaluationFile; class cmGlobalGenerator; class cmInstallGenerator; +class cmMessenger; class cmSourceFile; class cmTest; class cmTestGenerator; @@ -892,10 +893,13 @@ private: void PopSnapshot(bool reportError = true); friend class cmCMakePolicyCommand; class IncludeScope; + friend class IncludeScope; class ListFileScope; + friend class ListFileScope; class BuildsystemFileScope; + friend class BuildsystemFileScope; // CMP0053 == old diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx index 43fa150..fe67050 100644 --- a/Source/cmMessenger.cxx +++ b/Source/cmMessenger.cxx @@ -11,14 +11,18 @@ ============================================================================*/ #include "cmMessenger.h" + +#include "cmAlgorithms.h" #include "cmDocumentationFormatter.h" -#include "cmMessenger.h" -#include "cmOutputConverter.h" +#include "cmState.h" +#include "cmSystemTools.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include #endif +#include + cmake::MessageType cmMessenger::ConvertMessageType(cmake::MessageType t) const { bool warningsAsErrors; diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h index f15bf13..c69eb8e 100644 --- a/Source/cmMessenger.h +++ b/Source/cmMessenger.h @@ -13,10 +13,15 @@ #ifndef cmMessenger_h #define cmMessenger_h +#include // IWYU pragma: keep + #include "cmListFileCache.h" -#include "cmState.h" #include "cmake.h" +#include + +class cmState; + class cmMessenger { public: diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index dbfe6eb..3ddcc9a 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -11,12 +11,18 @@ ============================================================================*/ #include "cmOSXBundleGenerator.h" +#include + +#include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmSystemTools.h" #include "cmTarget.h" #include +class cmSourceFile; + cmOSXBundleGenerator::cmOSXBundleGenerator(cmGeneratorTarget* target, const std::string& configName) : GT(target) diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h index 2dc1e4a..ff472ec 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -12,19 +12,16 @@ #ifndef cmOSXBundleGenerator_h #define cmOSXBundleGenerator_h -#include - -#include "cmStandardIncludes.h" - -#include "cmSourceFile.h" +#include // IWYU pragma: keep #include #include +#include -class cmTarget; -class cmMakefile; -class cmLocalGenerator; class cmGeneratorTarget; +class cmLocalGenerator; +class cmMakefile; +class cmSourceFile; class cmOSXBundleGenerator { diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 20f2246..d7ad83d 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -12,13 +12,15 @@ #include "cmOrderDirectories.h" #include "cmAlgorithms.h" +#include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmSystemTools.h" #include "cmake.h" -#include - #include +#include +#include +#include /* Directory ordering computation. diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 13823a1..081e8a0 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -14,14 +14,16 @@ #include -#include "cmStandardIncludes.h" - #include +#include +#include +#include +#include +#include +class cmGeneratorTarget; class cmGlobalGenerator; class cmOrderDirectoriesConstraint; -class cmOrderDirectoriesConstraintLibrary; -class cmGeneratorTarget; /** \class cmOrderDirectories * \brief Compute a safe runtime path order for a set of shared libraries. diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 630da42..d44fbb7 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -12,14 +12,14 @@ #include "cmOutputConverter.h" #include "cmAlgorithms.h" -#include "cmake.h" +#include "cmSystemTools.h" +#include #include +#include +#include #include -#include /* isalpha */ -#include /* strlen */ - cmOutputConverter::cmOutputConverter(cmState::Snapshot snapshot) : StateSnapshot(snapshot) , LinkScriptShell(false) diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 02468c8..ac58ddc 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -12,13 +12,13 @@ #ifndef cmOutputConverter_h #define cmOutputConverter_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include "cmGlobalGenerator.h" #include "cmState.h" +#include +#include + class cmOutputConverter { public: diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index f1da4d5..00f1370 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -13,19 +13,40 @@ #include "cmQtAutoGeneratorInitializer.h" +#include "cmAlgorithms.h" +#include "cmCustomCommandLines.h" #include "cmFilePathUuid.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" +#include "cmOutputConverter.h" #include "cmSourceFile.h" - -#include - -#include +#include "cmSourceFileLocation.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" #if defined(_WIN32) && !defined(__CYGWIN__) #include "cmGlobalVisualStudioGenerator.h" #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + static std::string GetAutogenTargetName(cmGeneratorTarget const* target) { std::string autogenTargetName = target->GetName(); diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index c5a7aba..fedb388 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -14,15 +14,8 @@ #ifndef cmQtAutoGeneratorInitializer_h #define cmQtAutoGeneratorInitializer_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" - -#include -#include -#include - -class cmSourceFile; class cmGeneratorTarget; class cmLocalGenerator; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a261962..329c742 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -20,14 +20,21 @@ #include "cmOutputConverter.h" #include "cmState.h" #include "cmSystemTools.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" -#include - +#include #include +#include #include +#include #include - +#include +#include +#include #include +#include + #if defined(__APPLE__) #include #endif diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index ba439d4..32975c2 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -14,12 +14,11 @@ #ifndef cmQtAutoGenerators_h #define cmQtAutoGenerators_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include #include +#include #include #include diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 10d1cda..7f80923 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -14,8 +14,13 @@ #include "cmAlgorithms.h" #include "cmSystemTools.h" #include "cmVersion.h" + +#include #include #include +#include +#include +#include cmRST::cmRST(std::ostream& os, std::string const& docroot) : OS(os) diff --git a/Source/cmRST.h b/Source/cmRST.h index 895901a..f37af88 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -12,11 +12,14 @@ #ifndef _cmRST_h #define _cmRST_h -#include - -#include "cmStandardIncludes.h" +#include // IWYU pragma: keep #include +#include +#include +#include +#include +#include /** \class cmRST * \brief Perform basic .rst processing for command-line help diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx index a000258..1ab70e2 100644 --- a/Source/cmScriptGenerator.cxx +++ b/Source/cmScriptGenerator.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" +#include + cmScriptGenerator::cmScriptGenerator( const std::string& config_var, std::vector const& configurations) diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index 4f4dd9e..abe9a1d 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -12,9 +12,11 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include +#include class cmScriptGeneratorIndent { diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 5869a01..3aa4b92 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -11,11 +11,16 @@ ============================================================================*/ #include "cmSourceFile.h" +#include "cmCustomCommand.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmProperty.h" +#include "cmState.h" #include "cmSystemTools.h" #include "cmake.h" +#include + cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name) : Location(mf, name) { diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index a3808f7..2c6d831 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -12,12 +12,16 @@ #ifndef cmSourceFile_h #define cmSourceFile_h -#include "cmSourceFileLocation.h" +#include -#include "cmCustomCommand.h" #include "cmPropertyMap.h" +#include "cmSourceFileLocation.h" + +#include +#include -class cmake; +class cmCustomCommand; +class cmMakefile; /** \class cmSourceFile * \brief Represent a class loaded from a makefile. diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 099a6f0..e2a1552 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -11,12 +11,17 @@ ============================================================================*/ #include "cmSourceFileLocation.h" +#include + #include "cmAlgorithms.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmake.h" -#include "assert.h" +#include +#include +#include cmSourceFileLocation::cmSourceFileLocation() : Makefile(CM_NULLPTR) diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h index d41f2bd..e4e5116 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -12,9 +12,9 @@ #ifndef cmSourceFileLocation_h #define cmSourceFileLocation_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include class cmMakefile; diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index c7f093f..c5e6311 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -14,12 +14,12 @@ #include -#include "cmStandardIncludes.h" - #include +#include +#include +#include class cmSourceFile; - class cmSourceGroupInternals; /** \class cmSourceGroup diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 21a50cb..be0ee50 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -12,20 +12,7 @@ #include "cmSystemTools.h" #include "cmAlgorithms.h" -#include -#include -#include -#include -#include -#include -#ifdef __QNX__ -#include /* for malloc/free on QNX */ -#endif -#include -#include -#include -#include -#include + #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmArchiveWrite.h" #include "cmLocale.h" @@ -34,8 +21,38 @@ #define __LA_INT64_T la_int64_t #endif #endif + +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmCryptoHash.h" +#endif + +#if defined(CMAKE_USE_ELF_PARSER) +#include "cmELF.h" +#endif + +#if defined(CMAKE_USE_MACH_PARSER) +#include "cmMachO.h" +#endif + +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #if defined(_WIN32) #include @@ -43,33 +60,21 @@ #include #else #include -#include -#include #include #include #endif -#if defined(__APPLE__) -#include -#endif - -#include - #if defined(_WIN32) && \ (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__)) #include #endif -#if defined(CMAKE_BUILD_WITH_CMAKE) -#include "cmCryptoHash.h" -#endif - -#if defined(CMAKE_USE_ELF_PARSER) -#include "cmELF.h" +#if defined(__APPLE__) +#include #endif -#if defined(CMAKE_USE_MACH_PARSER) -#include "cmMachO.h" +#ifdef __QNX__ +#include /* for malloc/free on QNX */ #endif static bool cm_isspace(char c) @@ -142,6 +147,7 @@ private: }; #elif defined(__APPLE__) #include + #define environ (*_NSGetEnviron()) #endif diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index cfc174e..090c9d6 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -20,6 +20,7 @@ #include "cmState.h" #include "cmSystemTools.h" #include "cmTest.h" +#include "cm_auto_ptr.hxx" #include #include diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 701a5e5..25f9e3a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -12,33 +12,33 @@ #include "cmake.h" #include "cmAlgorithms.h" -#include "cmCommand.h" #include "cmCommands.h" +#include "cmDocumentation.h" +#include "cmDocumentationEntry.h" #include "cmDocumentationFormatter.h" #include "cmExternalMakefileProjectGenerator.h" #include "cmFileTimeComparison.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmGlobalGeneratorFactory.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmMessenger.h" -#include "cmSourceFile.h" #include "cmState.h" -#include "cmTest.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmTargetLinkLibraryType.h" #include "cmUtils.hxx" -#include "cmVersionMacros.h" +#include "cmVersionConfig.h" +#include "cm_auto_ptr.hxx" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGraphVizWriter.h" #include "cmVariableWatch.h" -#include - -#include "cm_jsoncpp_value.h" -#include "cm_jsoncpp_writer.h" +#include +#include #endif -#include -#include -#include - // only build kdevelop generator on non-windows platforms // when not bootstrapping cmake #if !defined(_WIN32) @@ -69,6 +69,7 @@ #include "cmGlobalVisualStudio71Generator.h" #include "cmGlobalVisualStudio8Generator.h" #include "cmGlobalVisualStudio9Generator.h" + #define CMAKE_HAVE_VS_GENERATORS #endif #include "cmGlobalMSYSMakefileGenerator.h" @@ -98,11 +99,10 @@ #include "cmExtraEclipseCDT4Generator.h" #endif -#include // required for atoi - #if defined(__APPLE__) #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGlobalXCodeGenerator.h" + #define CMAKE_USE_XCODE 1 #endif #include @@ -113,7 +113,18 @@ // include sys/stat.h after sys/types.h #include // struct stat -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class cmCommand; namespace { diff --git a/Source/cmake.h b/Source/cmake.h index 91a23cd..9dc429d 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -15,25 +15,23 @@ #include -#include "cmStandardIncludes.h" - -#include "cmCacheManager.h" #include "cmInstalledFile.h" #include "cmListFileCache.h" #include "cmState.h" -#include "cmSystemTools.h" -class cmGlobalGeneratorFactory; +#include +#include +#include +#include + +class cmExternalMakefileProjectGeneratorFactory; +class cmFileTimeComparison; class cmGlobalGenerator; -class cmLocalGenerator; +class cmGlobalGeneratorFactory; class cmMakefile; class cmMessenger; class cmVariableWatch; -class cmFileTimeComparison; -class cmExternalMakefileProjectGeneratorFactory; -class cmDocumentationSection; -class cmTarget; -class cmGeneratedFileStream; +struct cmDocumentationEntry; /** \brief Represents a cmake invocation. * diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index db6d51b..1450949 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -17,18 +17,23 @@ #endif #include "cmAlgorithms.h" +#include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" -#include "cmListFileCache.h" -#include "cmLocalGenerator.h" #include "cmMakefile.h" -#include "cmSourceFile.h" #include "cmState.h" +#include "cmSystemTools.h" #include "cmake.h" #include "cmcmd.h" + +#include #include +#include +#include +#include +#include #ifdef CMAKE_USE_LIBUV -#include "cm_uv.h" +#include #endif #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index f25c085..c2e1d53 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -16,29 +16,37 @@ #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmQtAutoGenerators.h" +#include "cmState.h" +#include "cmSystemTools.h" #include "cmUtils.hxx" #include "cmVersion.h" +#include "cm_auto_ptr.hxx" +#include "cmake.h" #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback. #endif -#include -#include -#include -#include +#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) +#include "bindexplib.h" +#endif #if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32) && !defined(__CYGWIN__) #include "cmVisualStudioWCEPlatformParser.h" #endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include // required for atoi -#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE) -#include "bindexplib.h" -#endif - void CMakeCommandUsage(const char* program) { std::ostringstream errorStream; diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 1096d0c..cd6222d 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -13,9 +13,10 @@ #ifndef cmcmd_h #define cmcmd_h -#include +#include // IWYU pragma: keep -#include "cmStandardIncludes.h" +#include +#include class cmcmd { diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 38ff64f..93a6ebb 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -9,16 +9,21 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCTest.h" -#include "cmSystemTools.h" -// Need these for documentation support. -#include "cmDocumentation.h" -#include "cmake.h" +#include #include "CTest/cmCTestLaunch.h" #include "CTest/cmCTestScriptHandler.h" -#include "cmsys/Encoding.hxx" +#include "cmCTest.h" +#include "cmDocumentation.h" +#include "cmSystemTools.h" +#include "cmake.h" + +#include +#include +#include +#include +#include static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " ctest - Testing driver provided by CMake." }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd3d0eafbb362fbc0f140c228da85791a473e44e commit bd3d0eafbb362fbc0f140c228da85791a473e44e Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:19:50 2016 +0200 Commit: Brad King CommitDate: Sat Sep 3 08:04:22 2016 -0400 cmCTest: don't redefine cout and cerr The definitions have been introduced to ensure that cout and cerr are not used in certain files. However, this limitation does not apply to all source files that require cmCTest.h to be included. Furthermore, the definitions cause side effects depending on the include order. In total, the definitions do more harm than good. Remove them. diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 20f5caf..9d661d4 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -45,16 +45,6 @@ class cmXMLWriter; cmCTestLog_msg.str().c_str(), suppress); \ } while (0) -#ifdef cerr -#undef cerr -#endif -#define cerr no_cerr_use_cmCTestLog - -#ifdef cout -#undef cout -#endif -#define cout no_cout_use_cmCTestLog - /** \class cmCTest * \brief Represents a ctest invocation. * https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3838a0d5fbed480c007b1667eddf2d6797a24344 commit 3838a0d5fbed480c007b1667eddf2d6797a24344 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:05:48 2016 +0200 Commit: Brad King CommitDate: Sat Sep 3 08:04:22 2016 -0400 make sure to include cmConfigure.h before cmStandardIncludes.h diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h index acf1fa6..63a2ec0 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h @@ -13,6 +13,8 @@ #ifndef cmWIXRichTextFormatWriter_h #define cmWIXRichTextFormatWriter_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h index 01a9e76..78b81b3 100644 --- a/Source/CPack/cmCPackComponentGroup.h +++ b/Source/CPack/cmCPackComponentGroup.h @@ -13,6 +13,8 @@ #ifndef cmCPackComponentGroup_h #define cmCPackComponentGroup_h +#include + #include "cmStandardIncludes.h" class cmCPackComponentGroup; diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 7b44df9..0953978 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -12,6 +12,8 @@ #ifndef cmCursesStandardIncludes_h #define cmCursesStandardIncludes_h +#include + #include "../cmStandardIncludes.h" #if defined(__sun__) && defined(__GNUC__) diff --git a/Source/bindexplib.h b/Source/bindexplib.h index 8661a4a..715808a 100644 --- a/Source/bindexplib.h +++ b/Source/bindexplib.h @@ -13,6 +13,8 @@ #ifndef bindexplib_h #define bindexplib_h +#include + #include "cmStandardIncludes.h" diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index ee803c8..a6c71d2 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -12,6 +12,8 @@ #ifndef cmAlgorithms_h #define cmAlgorithms_h +#include + #include "cmStandardIncludes.h" inline bool cmHasLiteralPrefixImpl(const std::string& str1, const char* str2, diff --git a/Source/cmCTest.h b/Source/cmCTest.h index b6657c9..20f5caf 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -13,6 +13,8 @@ #ifndef cmCTest_h #define cmCTest_h +#include + #include "cmStandardIncludes.h" #include "cmListFileCache.h" diff --git a/Source/cmCallVisualStudioMacro.h b/Source/cmCallVisualStudioMacro.h index e516fe2..fd735cf 100644 --- a/Source/cmCallVisualStudioMacro.h +++ b/Source/cmCallVisualStudioMacro.h @@ -12,6 +12,8 @@ #ifndef cmCallVisualStudioMacro_h #define cmCallVisualStudioMacro_h +#include + #include "cmStandardIncludes.h" /** \class cmCallVisualStudioMacro diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h index 97b706c..1040ad3 100644 --- a/Source/cmCommandArgumentParserHelper.h +++ b/Source/cmCommandArgumentParserHelper.h @@ -12,6 +12,8 @@ #ifndef cmCommandArgumentParserHelper_h #define cmCommandArgumentParserHelper_h +#include + #include "cmStandardIncludes.h" #define YYSTYPE cmCommandArgumentParserHelper::ParserType diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h index 9133148..19a6f8d 100644 --- a/Source/cmCommandArgumentsHelper.h +++ b/Source/cmCommandArgumentsHelper.h @@ -12,6 +12,8 @@ #ifndef cmCommandArgumentsHelper_h #define cmCommandArgumentsHelper_h +#include + #include "cmStandardIncludes.h" class cmCommandArgumentsHelper; diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index cb671dd..ccea22d 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -12,7 +12,7 @@ #ifndef cmConfigure_h #define cmConfigure_h -#include +#include // IWYU pragma: keep #ifdef _MSC_VER #pragma warning(disable : 4786) diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index 4e92b06..c51393d 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -12,6 +12,8 @@ #ifndef cmCryptoHash_h #define cmCryptoHash_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmCurl.h b/Source/cmCurl.h index 26bf94e..c3a2053 100644 --- a/Source/cmCurl.h +++ b/Source/cmCurl.h @@ -12,6 +12,8 @@ #ifndef cmCurl_h #define cmCurl_h +#include + #include "cmStandardIncludes.h" #include "cm_curl.h" diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 34753f4..152b3b9 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -12,6 +12,8 @@ #ifndef cmCustomCommand_h #define cmCustomCommand_h +#include + #include "cmStandardIncludes.h" #include "cmListFileCache.h" diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h index a361153..66644d6 100644 --- a/Source/cmCustomCommandGenerator.h +++ b/Source/cmCustomCommandGenerator.h @@ -12,6 +12,8 @@ #ifndef cmCustomCommandGenerator_h #define cmCustomCommandGenerator_h +#include + #include "cmStandardIncludes.h" class cmCustomCommand; diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 8f1813c..f22de79 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -12,6 +12,8 @@ #ifndef cmDefinitions_h #define cmDefinitions_h +#include + #include "cmStandardIncludes.h" #include "cmLinkedTree.h" diff --git a/Source/cmDepends.h b/Source/cmDepends.h index 0e1cbb9..b9d47a6 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -12,6 +12,8 @@ #ifndef cmDepends_h #define cmDepends_h +#include + #include "cmStandardIncludes.h" class cmFileTimeComparison; diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx index f7676d9..5d644ce 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/cmDependsJavaLexer.cxx @@ -1,3 +1,5 @@ +#include + #include "cmStandardIncludes.h" #line 2 "cmDependsJavaLexer.cxx" diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h index 6ff0245..377d584 100644 --- a/Source/cmDependsJavaParserHelper.h +++ b/Source/cmDependsJavaParserHelper.h @@ -12,6 +12,8 @@ #ifndef cmDependsJavaParserHelper_h #define cmDependsJavaParserHelper_h +#include + #include "cmStandardIncludes.h" #define YYSTYPE cmDependsJavaParserHelper::ParserType diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index ac36c8b..c82e1d4 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -12,6 +12,8 @@ #ifndef _cmDocumentation_h #define _cmDocumentation_h +#include + #include "cmStandardIncludes.h" #include "cmDocumentationFormatter.h" diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 7c4c35b..7a93120 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -12,6 +12,8 @@ #ifndef _cmDocumentationFormatter_h #define _cmDocumentationFormatter_h +#include + #include "cmStandardIncludes.h" /** This is just a helper class to make it build with MSVC 6.0. diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index 58d9ae9..d9b8990 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -17,6 +17,8 @@ #ifndef cmDynamicLoader_h #define cmDynamicLoader_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 8006514..14e1454 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -12,6 +12,8 @@ #ifndef cmExecutionStatus_h #define cmExecutionStatus_h +#include + #include "cmStandardIncludes.h" /** \class cmExecutionStatus diff --git a/Source/cmExpandedCommandArgument.h b/Source/cmExpandedCommandArgument.h index 1f8e405..fa0eaa9 100644 --- a/Source/cmExpandedCommandArgument.h +++ b/Source/cmExpandedCommandArgument.h @@ -12,6 +12,8 @@ #ifndef cmExpandedCommandArgument_h #define cmExpandedCommandArgument_h +#include + #include "cmStandardIncludes.h" /** \class cmExpandedCommandArgument diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx index 4704f03..b16ec1a 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -1,3 +1,5 @@ +#include + #include "cmStandardIncludes.h" #line 2 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h index af0b916..8e3d996 100644 --- a/Source/cmExprParserHelper.h +++ b/Source/cmExprParserHelper.h @@ -12,6 +12,8 @@ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h +#include + #include "cmStandardIncludes.h" #define YYSTYPE cmExprParserHelper::ParserType diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h index 6ae5533..7d10ce1 100644 --- a/Source/cmExternalMakefileProjectGenerator.h +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -12,6 +12,8 @@ #ifndef cmExternalMakefileProjectGenerator_h #define cmExternalMakefileProjectGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmDocumentation.h" diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 538b716..38b90e1 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -13,6 +13,8 @@ #ifndef cmFileLock_h #define cmFileLock_h +#include + #include "cmStandardIncludes.h" #if defined(_WIN32) diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index dc42e6f..a3883da 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -12,6 +12,8 @@ #ifndef cmFileLockPool_h #define cmFileLockPool_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h index d5ac354..10d4c13 100644 --- a/Source/cmFileLockResult.h +++ b/Source/cmFileLockResult.h @@ -13,6 +13,8 @@ #ifndef cmFileLockResult_h #define cmFileLockResult_h +#include + #include "cmStandardIncludes.h" #if defined(_WIN32) diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 42e89b1..619c71b 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -13,6 +13,8 @@ #ifndef cmFilePathUuid_h #define cmFilePathUuid_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h index 409bd64..52e974c 100644 --- a/Source/cmFileTimeComparison.h +++ b/Source/cmFileTimeComparison.h @@ -12,6 +12,8 @@ #ifndef cmFileTimeComparison_h #define cmFileTimeComparison_h +#include + #include "cmStandardIncludes.h" class cmFileTimeComparisonInternal; diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index 07e1b1c..5f1c7ac 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -13,6 +13,8 @@ #define cmFortranParser_h #if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx) +#include + #include "cmStandardIncludes.h" #endif diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h index c7e3b71..4a600e7 100644 --- a/Source/cmFunctionBlocker.h +++ b/Source/cmFunctionBlocker.h @@ -12,6 +12,8 @@ #ifndef cmFunctionBlocker_h #define cmFunctionBlocker_h +#include + #include "cmStandardIncludes.h" #include "cmExecutionStatus.h" diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index 3480c5b..e5e3320 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -12,6 +12,8 @@ #ifndef cmGeneratedFileStream_h #define cmGeneratedFileStream_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 2f91608..75e69b4 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -13,6 +13,8 @@ #ifndef cmGeneratorExpression_h #define cmGeneratorExpression_h +#include + #include "cmStandardIncludes.h" #include "cmListFileCache.h" diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index 6b7fe9a..e522728 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -12,6 +12,8 @@ #ifndef cmGeneratorExpressionDAGChecker_h #define cmGeneratorExpressionDAGChecker_h +#include + #include "cmStandardIncludes.h" #include "cmGeneratorExpressionEvaluator.h" diff --git a/Source/cmGeneratorExpressionLexer.h b/Source/cmGeneratorExpressionLexer.h index 72ad731..6bd336b 100644 --- a/Source/cmGeneratorExpressionLexer.h +++ b/Source/cmGeneratorExpressionLexer.h @@ -12,6 +12,8 @@ #ifndef cmGeneratorExpressionLexer_h #define cmGeneratorExpressionLexer_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmGhsMultiGpj.h b/Source/cmGhsMultiGpj.h index b388455..4d8a757 100644 --- a/Source/cmGhsMultiGpj.h +++ b/Source/cmGhsMultiGpj.h @@ -12,6 +12,8 @@ #ifndef cmGhsMultiGpj_h #define cmGhsMultiGpj_h +#include + #include "cmStandardIncludes.h" class cmGeneratedFileStream; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 089a637..dc80a33 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -13,6 +13,8 @@ #ifndef cmGlobalGenerator_h #define cmGlobalGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmExportSetMap.h" // For cmExportSetMap diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index 74d3145..26bc2c0 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -13,6 +13,10 @@ #ifndef cmGlobalGeneratorFactory_h #define cmGlobalGeneratorFactory_h +#include + +#include + #include "cmStandardIncludes.h" class cmake; diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h index 5666d48..65bed5e 100644 --- a/Source/cmGraphAdjacencyList.h +++ b/Source/cmGraphAdjacencyList.h @@ -12,6 +12,8 @@ #ifndef cmGraphAdjacencyList_h #define cmGraphAdjacencyList_h +#include + #include "cmStandardIncludes.h" /** diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h index c73d82d..0643785 100644 --- a/Source/cmGraphVizWriter.h +++ b/Source/cmGraphVizWriter.h @@ -12,6 +12,8 @@ #ifndef CMGRAPHVIZWRITER_H #define CMGRAPHVIZWRITER_H +#include + #include "cmStandardIncludes.h" #include "cmGeneratedFileStream.h" diff --git a/Source/cmHexFileConverter.h b/Source/cmHexFileConverter.h index 56fa9b1..06616a2 100644 --- a/Source/cmHexFileConverter.h +++ b/Source/cmHexFileConverter.h @@ -12,6 +12,8 @@ #ifndef cmHexFileConverter_h #define cmHexFileConverter_h +#include + #include "cmStandardIncludes.h" /** \class cmHexFileConverter diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index fac7d4e..df0f82e 100644 --- a/Source/cmIDEOptions.h +++ b/Source/cmIDEOptions.h @@ -12,6 +12,8 @@ #ifndef cmIDEOptions_h #define cmIDEOptions_h +#include + #include "cmStandardIncludes.h" #include "cmIDEFlagTable.h" diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h index 6ccb3e8..2ef421f 100644 --- a/Source/cmInstallCommandArguments.h +++ b/Source/cmInstallCommandArguments.h @@ -13,6 +13,8 @@ #ifndef cmInstallCommandArguments_h #define cmInstallCommandArguments_h +#include + #include "cmStandardIncludes.h" #include "cmCommandArgumentsHelper.h" diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h index 6b31074..466aaa7 100644 --- a/Source/cmLinkedTree.h +++ b/Source/cmLinkedTree.h @@ -12,6 +12,8 @@ #ifndef cmLinkedTree_h #define cmLinkedTree_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index cd44536..08b59eb 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -12,6 +12,8 @@ #ifndef cmListFileCache_h #define cmListFileCache_h +#include + #include "cmStandardIncludes.h" #include "cmState.h" diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index fa4bb30..f7a4074 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -12,6 +12,8 @@ #ifndef cmLocalGenerator_h #define cmLocalGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmOutputConverter.h" diff --git a/Source/cmLocale.h b/Source/cmLocale.h index f922c03..f9bc458 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -12,6 +12,8 @@ #ifndef cmLocale_h #define cmLocale_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmNinjaTypes.h b/Source/cmNinjaTypes.h index 82a5220..d3816bb 100644 --- a/Source/cmNinjaTypes.h +++ b/Source/cmNinjaTypes.h @@ -13,6 +13,8 @@ #ifndef cmNinjaTypes_h #define cmNinjaTypes_h +#include + #include "cmStandardIncludes.h" typedef std::vector cmNinjaDeps; diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h index 55a3c75..2dc1e4a 100644 --- a/Source/cmOSXBundleGenerator.h +++ b/Source/cmOSXBundleGenerator.h @@ -12,6 +12,8 @@ #ifndef cmOSXBundleGenerator_h #define cmOSXBundleGenerator_h +#include + #include "cmStandardIncludes.h" #include "cmSourceFile.h" diff --git a/Source/cmObject.h b/Source/cmObject.h index d883c52..cb683f6 100644 --- a/Source/cmObject.h +++ b/Source/cmObject.h @@ -12,6 +12,8 @@ #ifndef cmObject_h #define cmObject_h +#include + #include "cmStandardIncludes.h" /** \class cmObject diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 38e197c..13823a1 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -12,6 +12,8 @@ #ifndef cmOrderDirectories_h #define cmOrderDirectories_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 9af9659..02468c8 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -12,6 +12,8 @@ #ifndef cmOutputConverter_h #define cmOutputConverter_h +#include + #include "cmStandardIncludes.h" #include "cmGlobalGenerator.h" diff --git a/Source/cmPathLabel.h b/Source/cmPathLabel.h index 39fbec3..e065110 100644 --- a/Source/cmPathLabel.h +++ b/Source/cmPathLabel.h @@ -12,6 +12,8 @@ #ifndef cmPathLabel_h #define cmPathLabel_h +#include + #include "cmStandardIncludes.h" /** \class cmPathLabel diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index b411597..c5a7aba 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -14,6 +14,8 @@ #ifndef cmQtAutoGeneratorInitializer_h #define cmQtAutoGeneratorInitializer_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index fab2d19..ba439d4 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -14,6 +14,8 @@ #ifndef cmQtAutoGenerators_h #define cmQtAutoGenerators_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmRST.h b/Source/cmRST.h index 0e379b6..895901a 100644 --- a/Source/cmRST.h +++ b/Source/cmRST.h @@ -12,6 +12,8 @@ #ifndef _cmRST_h #define _cmRST_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index ef0766f..4f4dd9e 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -12,6 +12,8 @@ #ifndef cmScriptGenerator_h #define cmScriptGenerator_h +#include + #include "cmStandardIncludes.h" class cmScriptGeneratorIndent diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h index 65f703f..7624d03 100644 --- a/Source/cmSearchPath.h +++ b/Source/cmSearchPath.h @@ -12,6 +12,8 @@ #ifndef cmSearchPath_h #define cmSearchPath_h +#include + #include "cmStandardIncludes.h" class cmFindCommon; diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h index 7989173..d41f2bd 100644 --- a/Source/cmSourceFileLocation.h +++ b/Source/cmSourceFileLocation.h @@ -12,6 +12,8 @@ #ifndef cmSourceFileLocation_h #define cmSourceFileLocation_h +#include + #include "cmStandardIncludes.h" class cmMakefile; diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 1f5232e..c7f093f 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -12,6 +12,8 @@ #ifndef cmSourceGroup_h #define cmSourceGroup_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h index 954d8f6..f30705d 100644 --- a/Source/cmTargetDepend.h +++ b/Source/cmTargetDepend.h @@ -12,6 +12,8 @@ #ifndef cmTargetDepend_h #define cmTargetDepend_h +#include + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmTargetExport.h b/Source/cmTargetExport.h index 2781337..b3882c4 100644 --- a/Source/cmTargetExport.h +++ b/Source/cmTargetExport.h @@ -12,6 +12,8 @@ #ifndef cmTargetExport_h #define cmTargetExport_h +#include + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmTimestamp.h b/Source/cmTimestamp.h index 77e1f7a..3a72caa 100644 --- a/Source/cmTimestamp.h +++ b/Source/cmTimestamp.h @@ -12,6 +12,8 @@ #ifndef cmTimestamp_h #define cmTimestamp_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 109a100..72a70df 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioTargetGenerator_h #define cmVisualStudioTargetGenerator_h +#include + #include "cmStandardIncludes.h" class cmMakefile; diff --git a/Source/cmVisualStudioSlnData.h b/Source/cmVisualStudioSlnData.h index 4508370..982b976 100644 --- a/Source/cmVisualStudioSlnData.h +++ b/Source/cmVisualStudioSlnData.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioSlnData_h #define cmVisualStudioSlnData_h +#include + #include "cmStandardIncludes.h" class cmSlnProjectEntry diff --git a/Source/cmVisualStudioSlnParser.h b/Source/cmVisualStudioSlnParser.h index b9f8a92..62fd936 100644 --- a/Source/cmVisualStudioSlnParser.h +++ b/Source/cmVisualStudioSlnParser.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioSlnParser_h #define cmVisualStudioSlnParser_h +#include + #include "cmStandardIncludes.h" #include diff --git a/Source/cmVisualStudioWCEPlatformParser.h b/Source/cmVisualStudioWCEPlatformParser.h index 2b20eba..ca58a9a 100644 --- a/Source/cmVisualStudioWCEPlatformParser.h +++ b/Source/cmVisualStudioWCEPlatformParser.h @@ -12,6 +12,8 @@ #ifndef cmVisualStudioWCEPlatformParser_h #define cmVisualStudioWCEPlatformParser_h +#include + #include "cmStandardIncludes.h" #include "cmXMLParser.h" diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index ed917af..a0aa2b7 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -12,6 +12,8 @@ #ifndef cmXCodeObject_h #define cmXCodeObject_h +#include + #include "cmStandardIncludes.h" class cmGeneratorTarget; diff --git a/Source/cmake.h b/Source/cmake.h index dbe936b..91a23cd 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -13,6 +13,8 @@ #ifndef cmake_h #define cmake_h +#include + #include "cmStandardIncludes.h" #include "cmCacheManager.h" diff --git a/Source/cmcmd.h b/Source/cmcmd.h index 8da2103..1096d0c 100644 --- a/Source/cmcmd.h +++ b/Source/cmcmd.h @@ -13,6 +13,8 @@ #ifndef cmcmd_h #define cmcmd_h +#include + #include "cmStandardIncludes.h" class cmcmd https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54140848181e15acfda9c385e6cdc5c8b4f2a1d6 commit 54140848181e15acfda9c385e6cdc5c8b4f2a1d6 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:04:35 2016 +0200 Commit: Brad King CommitDate: Sat Sep 3 08:04:22 2016 -0400 Tests/CMakeLib: include what you use diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx index e5a2f4d..a31cc42 100644 --- a/Tests/CMakeLib/testGeneratedFileStream.cxx +++ b/Tests/CMakeLib/testGeneratedFileStream.cxx @@ -12,6 +12,9 @@ #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include +#include + #define cmFailed(m1, m2) \ std::cout << "FAILED: " << m1 << m2 << "\n"; \ failed = 1 diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx index 019a2dd..c99a925 100644 --- a/Tests/CMakeLib/testUTF8.cxx +++ b/Tests/CMakeLib/testUTF8.cxx @@ -10,9 +10,7 @@ See the License for more information. ============================================================================*/ #include - #include -#include typedef char test_utf8_char[5]; diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 4970ccc..356880c 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -9,9 +9,11 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include +#include "cmXMLSafe.h" -#include "cmStandardIncludes.h" +#include +#include +#include struct test_pair { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f9c4cdf89ce00ae72a1176dbf5e68b5f1f1720e commit 3f9c4cdf89ce00ae72a1176dbf5e68b5f1f1720e Author: Daniel Pfeifer AuthorDate: Thu Sep 1 20:02:57 2016 +0200 Commit: Brad King CommitDate: Sat Sep 3 08:04:22 2016 -0400 Tests/CMakeLib: use cmsys::ifstream diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 502ffe7..529c830 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -1,6 +1,6 @@ #include "cmSystemTools.h" -#include +#include #include #include #include @@ -26,7 +26,10 @@ public: }; typedef std::vector TranslationUnitsType; - CompileCommandParser(std::ifstream* input) { this->Input = input; } + CompileCommandParser(std::istream& input) + : Input(input) + { + } void Parse() { @@ -109,8 +112,8 @@ private: void Next() { - this->C = char(Input->get()); - if (this->Input->bad()) { + this->C = char(Input.get()); + if (this->Input.bad()) { ErrorExit("Unexpected end of file."); } } @@ -131,13 +134,13 @@ private: TranslationUnitsType TranslationUnits; CommandType Command; std::string String; - std::ifstream* Input; + std::istream& Input; }; int main() { - std::ifstream file("compile_commands.json"); - CompileCommandParser parser(&file); + cmsys::ifstream file("compile_commands.json"); + CompileCommandParser parser(file); parser.Parse(); for (CompileCommandParser::TranslationUnitsType::const_iterator it = parser.GetTranslationUnits().begin(), diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx index e5a96c2..cc92693 100644 --- a/Tests/CMakeLib/testRST.cxx +++ b/Tests/CMakeLib/testRST.cxx @@ -10,9 +10,12 @@ See the License for more information. ============================================================================*/ #include "cmRST.h" - #include "cmSystemTools.h" +#include +#include +#include + void reportLine(std::ostream& os, bool ret, std::string const& line, bool eol) { if (ret) { @@ -52,8 +55,8 @@ int testRST(int argc, char* argv[]) } // Compare expected and actual outputs. - std::ifstream e_fin(e_name.c_str()); - std::ifstream a_fin(a_name.c_str()); + cmsys::ifstream e_fin(e_name.c_str()); + cmsys::ifstream a_fin(a_name.c_str()); if (!e_fin) { std::cerr << "Could not open input " << e_name << std::endl; return 1; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 08:10:11 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 08:10:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-844-g61b99cd Message-ID: <20160903121011.27A0EB0716@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 61b99cdeaa189647362c5375560b238279b36742 (commit) via befe8648a3813e35869e8ba8291f43cb8bfca962 (commit) from 87e76f899693fb3c29f280b417303e899c3a38dd (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=61b99cdeaa189647362c5375560b238279b36742 commit 61b99cdeaa189647362c5375560b238279b36742 Merge: 87e76f8 befe864 Author: Brad King AuthorDate: Sat Sep 3 08:10:09 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 08:10:09 2016 -0400 Merge topic 'FindHDF5-fix-hl-fortran' befe8648 FindHDF5: Fix regression in finding hdf5hl_fortran ----------------------------------------------------------------------- Summary of changes: Modules/FindHDF5.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 08:10:14 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 08:10:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-846-g44efb0a Message-ID: <20160903121014.BD04EF1A20@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 44efb0a747593f4c6ac463e2d0221ab05dd49c6d (commit) via b61eab249f6d119e6353c02c4c79ccb15a3825b9 (commit) from 61b99cdeaa189647362c5375560b238279b36742 (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=44efb0a747593f4c6ac463e2d0221ab05dd49c6d commit 44efb0a747593f4c6ac463e2d0221ab05dd49c6d Merge: 61b99cd b61eab2 Author: Brad King AuthorDate: Sat Sep 3 08:10:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 08:10:12 2016 -0400 Merge topic 'FindHDF5-is-parallel' b61eab24 FindHDF5: Fix regression in providing HDF5_IS_PARALLEL ----------------------------------------------------------------------- Summary of changes: Modules/FindHDF5.cmake | 68 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 08:10:18 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 08:10:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-849-g4da6139 Message-ID: <20160903121018.2F47AF1A20@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 4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de (commit) via c03a7b4f517fc4395a68cdfd143254b0a56622af (commit) via 3825a564930ffe09fd681632a905ab9c91c41d98 (commit) from 44efb0a747593f4c6ac463e2d0221ab05dd49c6d (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=4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de commit 4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de Merge: 44efb0a c03a7b4 Author: Brad King AuthorDate: Sat Sep 3 08:10:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 08:10:16 2016 -0400 Merge topic 'libuv-scanbuild-fixes' c03a7b4f CTestCustom: Suppress scan-build warnings in libuv 3825a564 libuv: Simplify variable initializations to satisfy Clang scan-build ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 3 +++ Utilities/cmlibuv/src/unix/pipe.c | 7 ++----- Utilities/cmlibuv/src/unix/tty.c | 7 ++----- 3 files changed, 7 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 08:10:21 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 08:10:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-855-gbfdf132 Message-ID: <20160903121021.03DD1F2082@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 bfdf1322e7638687c96b323b1df20fd9c08b3044 (commit) via efed6468eda950644014ccfada85300710e05009 (commit) via bd3d0eafbb362fbc0f140c228da85791a473e44e (commit) via 3838a0d5fbed480c007b1667eddf2d6797a24344 (commit) via 54140848181e15acfda9c385e6cdc5c8b4f2a1d6 (commit) via 3f9c4cdf89ce00ae72a1176dbf5e68b5f1f1720e (commit) from 4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de (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=bfdf1322e7638687c96b323b1df20fd9c08b3044 commit bfdf1322e7638687c96b323b1df20fd9c08b3044 Merge: 4da6139 efed646 Author: Brad King AuthorDate: Sat Sep 3 08:10:18 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 08:10:18 2016 -0400 Merge topic 'include-what-you-use' efed6468 fix a load of include-what-you-use violations bd3d0eaf cmCTest: don't redefine cout and cerr 3838a0d5 make sure to include cmConfigure.h before cmStandardIncludes.h 54140848 Tests/CMakeLib: include what you use 3f9c4cdf Tests/CMakeLib: use cmsys::ifstream ----------------------------------------------------------------------- Summary of changes: Source/CPack/WiX/cmWIXRichTextFormatWriter.h | 2 + Source/CPack/cmCPackComponentGroup.h | 2 + Source/CursesDialog/cmCursesStandardIncludes.h | 2 + Source/QtDialog/CMakeSetup.cxx | 2 + Source/bindexplib.h | 2 + Source/cmAlgorithms.h | 2 + Source/cmCTest.cxx | 56 ++++++++++---------- Source/cmCTest.h | 26 ++++------ Source/cmCallVisualStudioMacro.h | 2 + Source/cmCommandArgumentParserHelper.cxx | 10 +++- Source/cmCommandArgumentParserHelper.h | 5 +- Source/cmCommandArgumentsHelper.h | 2 + Source/cmConditionEvaluator.cxx | 1 + Source/cmConfigure.cmake.h.in | 2 +- Source/cmCryptoHash.cxx | 2 + Source/cmCryptoHash.h | 4 +- Source/cmCurl.cxx | 9 +++- Source/cmCurl.h | 5 +- Source/cmCustomCommand.cxx | 2 +- Source/cmCustomCommand.h | 8 ++- Source/cmCustomCommandGenerator.cxx | 7 +++ Source/cmCustomCommandGenerator.h | 7 ++- Source/cmDefinitions.cxx | 2 + Source/cmDefinitions.h | 9 ++-- Source/cmDepends.cxx | 3 ++ Source/cmDepends.h | 9 +++- Source/cmDependsC.cxx | 5 +- Source/cmDependsC.h | 9 ++++ Source/cmDependsFortran.cxx | 8 ++- Source/cmDependsFortran.h | 7 +++ Source/cmDependsJava.cxx | 1 - Source/cmDependsJava.h | 7 +++ Source/cmDependsJavaLexer.cxx | 2 + Source/cmDependsJavaParserHelper.cxx | 7 +++ Source/cmDependsJavaParserHelper.h | 5 +- Source/cmDocumentation.cxx | 9 ++-- Source/cmDocumentation.h | 14 ++--- Source/cmDocumentationFormatter.cxx | 6 +++ Source/cmDocumentationFormatter.h | 4 +- Source/cmDocumentationSection.h | 7 ++- Source/cmDynamicLoader.cxx | 7 +++ Source/cmDynamicLoader.h | 2 +- Source/cmELF.cxx | 8 ++- Source/cmELF.h | 5 ++ Source/cmExecutionStatus.h | 2 + Source/cmExpandedCommandArgument.h | 2 + Source/cmExportBuildFileGenerator.cxx | 14 +++++ Source/cmExportBuildFileGenerator.h | 10 +++- Source/cmExportFileGenerator.cxx | 13 +++-- Source/cmExportFileGenerator.h | 14 +++-- Source/cmExportInstallFileGenerator.cxx | 10 ++++ Source/cmExportInstallFileGenerator.h | 10 ++++ Source/cmExportSet.h | 7 ++- Source/cmExportSetMap.cxx | 2 + Source/cmExportSetMap.h | 5 +- Source/cmExportTryCompileFileGenerator.cxx | 11 +++- Source/cmExportTryCompileFileGenerator.h | 12 ++++- Source/cmExprLexer.cxx | 2 + Source/cmExprParserHelper.cxx | 6 ++- Source/cmExprParserHelper.h | 8 +-- Source/cmExternalMakefileProjectGenerator.cxx | 2 +- Source/cmExternalMakefileProjectGenerator.h | 6 ++- Source/cmExtraCodeBlocksGenerator.cxx | 13 +++-- Source/cmExtraCodeBlocksGenerator.h | 7 ++- Source/cmExtraCodeLiteGenerator.cxx | 16 +++--- Source/cmExtraCodeLiteGenerator.h | 6 +++ Source/cmExtraEclipseCDT4Generator.cxx | 19 +++++-- Source/cmExtraEclipseCDT4Generator.h | 10 +++- Source/cmExtraKateGenerator.cxx | 12 +++-- Source/cmExtraKateGenerator.h | 6 ++- Source/cmExtraSublimeTextGenerator.cxx | 11 ++-- Source/cmExtraSublimeTextGenerator.h | 12 +++-- Source/cmFileLock.h | 4 +- Source/cmFileLockPool.h | 5 +- Source/cmFileLockResult.cxx | 1 + Source/cmFileLockResult.h | 4 +- Source/cmFilePathUuid.cxx | 2 + Source/cmFilePathUuid.h | 3 +- Source/cmFileTimeComparison.cxx | 13 +++-- Source/cmFileTimeComparison.h | 2 +- Source/cmFortranParser.h | 2 + Source/cmFortranParserImpl.cxx | 9 +++- Source/cmFunctionBlocker.h | 2 + Source/cmGeneratedFileStream.cxx | 2 + Source/cmGeneratedFileStream.h | 3 +- Source/cmGeneratorExpression.cxx | 8 +-- Source/cmGeneratorExpression.h | 14 ++--- Source/cmGeneratorExpressionContext.cxx | 2 - Source/cmGeneratorExpressionDAGChecker.cxx | 8 +++ Source/cmGeneratorExpressionDAGChecker.h | 11 +++- Source/cmGeneratorExpressionEvaluationFile.cxx | 9 +++- Source/cmGeneratorExpressionEvaluationFile.h | 5 ++ Source/cmGeneratorExpressionEvaluator.cxx | 17 ++---- Source/cmGeneratorExpressionEvaluator.h | 6 +-- Source/cmGeneratorExpressionLexer.h | 4 +- Source/cmGeneratorExpressionNode.cxx | 36 +++++++++++-- Source/cmGeneratorExpressionNode.h | 20 +++---- Source/cmGeneratorExpressionParser.cxx | 3 +- Source/cmGeneratorExpressionParser.h | 5 +- Source/cmGeneratorTarget.cxx | 20 +++++-- Source/cmGeneratorTarget.h | 13 ++++- Source/cmGhsMultiGpj.h | 2 + Source/cmGhsMultiTargetGenerator.cxx | 1 + Source/cmGlobalCommonGenerator.cxx | 2 + Source/cmGlobalCommonGenerator.h | 4 ++ Source/cmGlobalGenerator.cxx | 20 ++++--- Source/cmGlobalGenerator.h | 32 +++++++----- Source/cmGlobalGeneratorFactory.h | 4 ++ Source/cmGlobalGhsMultiGenerator.cxx | 1 + Source/cmGlobalKdevelopGenerator.cxx | 12 +++-- Source/cmGlobalKdevelopGenerator.h | 5 ++ Source/cmGlobalNinjaGenerator.cxx | 13 ++++- Source/cmGlobalNinjaGenerator.h | 22 ++++++-- Source/cmGlobalUnixMakefileGenerator3.cxx | 12 +++++ Source/cmGlobalUnixMakefileGenerator3.h | 18 ++++++- Source/cmGlobalVisualStudio10Generator.cxx | 1 + Source/cmGlobalVisualStudio71Generator.cxx | 1 + Source/cmGlobalVisualStudio7Generator.cxx | 1 + Source/cmGlobalVisualStudio8Generator.cxx | 1 + Source/cmGlobalWatcomWMakeGenerator.cxx | 4 +- Source/cmGlobalWatcomWMakeGenerator.h | 10 ++++ Source/cmGraphAdjacencyList.h | 2 + Source/cmGraphVizWriter.cxx | 10 ++++ Source/cmGraphVizWriter.h | 12 +++-- Source/cmHexFileConverter.h | 2 + Source/cmIDEOptions.h | 2 + Source/cmInstallCommandArguments.h | 2 + Source/cmInstallDirectoryGenerator.cxx | 3 ++ Source/cmInstallDirectoryGenerator.h | 8 +++ Source/cmInstallExportGenerator.cxx | 18 +++---- Source/cmInstallExportGenerator.h | 12 +++-- Source/cmInstallFilesGenerator.cxx | 6 ++- Source/cmInstallFilesGenerator.h | 9 ++++ Source/cmInstallGenerator.cxx | 2 + Source/cmInstallGenerator.h | 6 +++ Source/cmInstallScriptGenerator.cxx | 5 ++ Source/cmInstallScriptGenerator.h | 5 ++ Source/cmInstallTargetGenerator.cxx | 10 +++- Source/cmInstallTargetGenerator.h | 8 +++ Source/cmInstalledFile.cxx | 4 ++ Source/cmInstalledFile.h | 7 +++ Source/cmLinkedTree.h | 2 + Source/cmListFileCache.cxx | 7 ++- Source/cmListFileCache.h | 7 ++- Source/cmLocalCommonGenerator.cxx | 5 ++ Source/cmLocalCommonGenerator.h | 9 +++- Source/cmLocalGenerator.cxx | 14 +++-- Source/cmLocalGenerator.h | 20 ++++--- Source/cmLocalNinjaGenerator.cxx | 9 ++++ Source/cmLocalNinjaGenerator.h | 18 ++++++- Source/cmLocalUnixMakefileGenerator3.cxx | 16 ++++-- Source/cmLocalUnixMakefileGenerator3.h | 15 ++++-- Source/cmLocalVisualStudio10Generator.cxx | 2 + Source/cmLocalVisualStudioGenerator.cxx | 1 + Source/cmLocalXCodeGenerator.cxx | 1 + Source/cmLocale.h | 2 + Source/cmMakefile.cxx | 13 ++--- Source/cmMakefile.h | 4 ++ Source/cmMessenger.cxx | 8 ++- Source/cmMessenger.h | 7 ++- Source/cmNinjaTypes.h | 2 + Source/cmOSXBundleGenerator.cxx | 6 +++ Source/cmOSXBundleGenerator.h | 11 ++-- Source/cmObject.h | 2 + Source/cmOrderDirectories.cxx | 6 ++- Source/cmOrderDirectories.h | 10 ++-- Source/cmOutputConverter.cxx | 8 +-- Source/cmOutputConverter.h | 6 ++- Source/cmPathLabel.h | 2 + Source/cmQtAutoGeneratorInitializer.cxx | 29 +++++++++-- Source/cmQtAutoGeneratorInitializer.h | 7 +-- Source/cmQtAutoGenerators.cxx | 13 +++-- Source/cmQtAutoGenerators.h | 3 +- Source/cmRST.cxx | 5 ++ Source/cmRST.h | 7 ++- Source/cmScriptGenerator.cxx | 2 + Source/cmScriptGenerator.h | 6 ++- Source/cmSearchPath.h | 2 + Source/cmSourceFile.cxx | 5 ++ Source/cmSourceFile.h | 10 ++-- Source/cmSourceFileLocation.cxx | 7 ++- Source/cmSourceFileLocation.h | 4 +- Source/cmSourceGroup.h | 6 ++- Source/cmSystemTools.cxx | 66 +++++++++++++----------- Source/cmTargetDepend.h | 2 + Source/cmTargetExport.h | 2 + Source/cmTestGenerator.cxx | 1 + Source/cmTimestamp.h | 2 + Source/cmVisualStudio10TargetGenerator.h | 2 + Source/cmVisualStudioSlnData.h | 2 + Source/cmVisualStudioSlnParser.h | 2 + Source/cmVisualStudioWCEPlatformParser.h | 2 + Source/cmXCodeObject.h | 2 + Source/cmake.cxx | 41 +++++++++------ Source/cmake.h | 20 +++---- Source/cmakemain.cxx | 13 +++-- Source/cmcmd.cxx | 26 ++++++---- Source/cmcmd.h | 5 +- Source/ctest.cxx | 17 +++--- Tests/CMakeLib/run_compile_commands.cxx | 17 +++--- Tests/CMakeLib/testGeneratedFileStream.cxx | 3 ++ Tests/CMakeLib/testRST.cxx | 9 ++-- Tests/CMakeLib/testUTF8.cxx | 2 - Tests/CMakeLib/testXMLSafe.cxx | 6 ++- 204 files changed, 1222 insertions(+), 415 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 3 08:11:08 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 3 Sep 2016 08:11:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1755-g5871837 Message-ID: <20160903121109.B5AA3F1A3A@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, next has been updated via 5871837d2774cf2f6bf50d284fb705c6210640b2 (commit) via bfdf1322e7638687c96b323b1df20fd9c08b3044 (commit) via 4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de (commit) via 44efb0a747593f4c6ac463e2d0221ab05dd49c6d (commit) via 61b99cdeaa189647362c5375560b238279b36742 (commit) from 081ad4fd9577fac940884baf7fb875fdf36a0961 (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=5871837d2774cf2f6bf50d284fb705c6210640b2 commit 5871837d2774cf2f6bf50d284fb705c6210640b2 Merge: 081ad4f bfdf132 Author: Brad King AuthorDate: Sat Sep 3 08:10:32 2016 -0400 Commit: Brad King CommitDate: Sat Sep 3 08:10:32 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From daniel at pfeifer-mail.de Sat Sep 3 18:23:13 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sat, 3 Sep 2016 18:23:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1757-gdfa796f Message-ID: <20160903222313.4CCACF5160@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, next has been updated via dfa796fc2815c89ed7a1fcc119b12bcf6afc8294 (commit) via 32f756c8226e2026d51307c4722aa6b98939c9e6 (commit) from 5871837d2774cf2f6bf50d284fb705c6210640b2 (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=dfa796fc2815c89ed7a1fcc119b12bcf6afc8294 commit dfa796fc2815c89ed7a1fcc119b12bcf6afc8294 Merge: 5871837 32f756c Author: Daniel Pfeifer AuthorDate: Sat Sep 3 18:23:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 3 18:23:11 2016 -0400 Merge topic 'include-what-you-use' into next 32f756c8 CursesDialog: include what you use https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32f756c8226e2026d51307c4722aa6b98939c9e6 commit 32f756c8226e2026d51307c4722aa6b98939c9e6 Author: Daniel Pfeifer AuthorDate: Thu Sep 1 21:55:09 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sat Sep 3 23:37:09 2016 +0200 CursesDialog: include what you use diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 80bb55d..2e062bc 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -9,19 +9,22 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmCursesStandardIncludes.h" - -#include "../cmDocumentation.h" -#include "../cmSystemTools.h" -#include "../cmake.h" - -#include -#include +#include +#include "cmCursesForm.h" #include "cmCursesMainForm.h" -#include +#include "cmCursesStandardIncludes.h" +#include "cmDocumentation.h" +#include "cmDocumentationEntry.h" +#include "cmSystemTools.h" +#include "cmake.h" -#include +#include +#include +#include +#include +#include +#include static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " ccmake - Curses Interface for CMake." }, diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 99f7dcc..de95bae 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -11,7 +11,10 @@ ============================================================================*/ #include "cmCursesBoolWidget.h" -#include "cmCursesMainForm.h" +#include "cmCursesWidget.h" +#include "cmState.h" + +#include cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, int top) diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index d2899ee..b9f1b16 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -12,6 +12,9 @@ #ifndef cmCursesBoolWidget_h #define cmCursesBoolWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" class cmCursesMainForm; diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 462cb6e..d115c77 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -11,18 +11,20 @@ ============================================================================*/ #include "cmCursesCacheEntryComposite.h" -#include "../cmState.h" -#include "../cmSystemTools.h" -#include "../cmake.h" #include "cmCursesBoolWidget.h" -#include "cmCursesDummyWidget.h" #include "cmCursesFilePathWidget.h" #include "cmCursesLabelWidget.h" #include "cmCursesOptionsWidget.h" #include "cmCursesPathWidget.h" #include "cmCursesStringWidget.h" +#include "cmCursesWidget.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmake.h" #include +#include +#include cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( const std::string& key, int labelwidth, int entrywidth) diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index c9c8238..c717e1a 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -12,8 +12,12 @@ #ifndef cmCursesCacheEntryComposite_h #define cmCursesCacheEntryComposite_h -#include "cmCursesLabelWidget.h" +#include // IWYU pragma: keep +#include + +class cmCursesLabelWidget; +class cmCursesWidget; class cmake; class cmCursesCacheEntryComposite diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index a960090..fe73e7e 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -11,6 +11,9 @@ ============================================================================*/ #include "cmCursesDummyWidget.h" +#include "cmCursesWidget.h" +#include "cmState.h" + cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index e6ca91e..cf88e6e 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -12,6 +12,9 @@ #ifndef cmCursesDummyWidget_h #define cmCursesDummyWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" class cmCursesMainForm; diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index 28a74a9..654e0d4 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -11,6 +11,9 @@ ============================================================================*/ #include "cmCursesFilePathWidget.h" +#include "cmCursesPathWidget.h" +#include "cmState.h" + cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) : cmCursesPathWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h index 72adc77..86c78ce 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.h +++ b/Source/CursesDialog/cmCursesFilePathWidget.h @@ -12,6 +12,8 @@ #ifndef cmCursesFilePathWidget_h #define cmCursesFilePathWidget_h +#include // IWYU pragma: keep + #include "cmCursesPathWidget.h" class cmCursesFilePathWidget : public cmCursesPathWidget diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx index b3320c9..699dabc 100644 --- a/Source/CursesDialog/cmCursesForm.cxx +++ b/Source/CursesDialog/cmCursesForm.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesForm.h" +#include + cmsys::ofstream cmCursesForm::DebugFile; bool cmCursesForm::Debug = false; diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h index c0192fc..bf97c66 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -12,6 +12,8 @@ #ifndef cmCursesForm_h #define cmCursesForm_h +#include // IWYU pragma: keep + #include "cmCursesStandardIncludes.h" #include diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx index 784738b..0ed9240 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.cxx +++ b/Source/CursesDialog/cmCursesLabelWidget.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesLabelWidget.h" +#include "cmCursesWidget.h" + cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index ff645af..990078b 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -12,8 +12,13 @@ #ifndef cmCursesLabelWidget_h #define cmCursesLabelWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include + class cmCursesMainForm; class cmCursesLabelWidget : public cmCursesWidget diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 47f98a2..75b136c 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -11,10 +11,13 @@ ============================================================================*/ #include "cmCursesLongMessageForm.h" -#include "../cmSystemTools.h" -#include "../cmVersion.h" -#include "../cmake.h" +#include "cmCursesForm.h" #include "cmCursesMainForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmVersion.h" + +#include +#include inline int ctrl(int z) { diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index a12ed2f..f8e8544 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -12,11 +12,13 @@ #ifndef cmCursesLongMessageForm_h #define cmCursesLongMessageForm_h -#include "cmCursesStandardIncludes.h" +#include #include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" -class cmCursesCacheEntryComposite; +#include +#include class cmCursesLongMessageForm : public cmCursesForm { diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 1d036c4..d8d1a7d 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -11,19 +11,22 @@ ============================================================================*/ #include "cmCursesMainForm.h" -#include "../cmSystemTools.h" -#include "../cmVersion.h" -#include "../cmake.h" #include "cmAlgorithms.h" -#include "cmCursesBoolWidget.h" #include "cmCursesCacheEntryComposite.h" #include "cmCursesDummyWidget.h" -#include "cmCursesFilePathWidget.h" +#include "cmCursesForm.h" #include "cmCursesLabelWidget.h" #include "cmCursesLongMessageForm.h" -#include "cmCursesPathWidget.h" +#include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" +#include "cmCursesWidget.h" #include "cmState.h" +#include "cmSystemTools.h" +#include "cmVersion.h" +#include "cmake.h" + +#include +#include inline int ctrl(int z) { @@ -742,8 +745,6 @@ void cmCursesMainForm::FixValue(cmState::CacheEntryType type, } } -#include - void cmCursesMainForm::HandleInput() { int x = 0, y = 0; diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index d17ee33..1140945 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -12,13 +12,17 @@ #ifndef cmCursesMainForm_h #define cmCursesMainForm_h -#include "cmCursesStandardIncludes.h" +#include -#include "../cmState.h" #include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmState.h" + +#include +#include +#include class cmCursesCacheEntryComposite; -class cmCursesWidget; class cmake; /** \class cmCursesMainForm diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx index 9a88aef..f7a8cc6 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.cxx +++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx @@ -11,7 +11,8 @@ ============================================================================*/ #include "cmCursesOptionsWidget.h" -#include "cmCursesMainForm.h" +#include "cmCursesWidget.h" +#include "cmState.h" #define ctrl(z) ((z)&037) diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h index f88b6bc..80dccad 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.h +++ b/Source/CursesDialog/cmCursesOptionsWidget.h @@ -12,8 +12,14 @@ #ifndef cmCursesOptionsWidget_h #define cmCursesOptionsWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include +#include + class cmCursesMainForm; class cmCursesOptionsWidget : public cmCursesWidget diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index 33fffd1..2ee64c7 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -12,8 +12,12 @@ #include "cmCursesPathWidget.h" #include "cmCursesMainForm.h" +#include "cmCursesStringWidget.h" +#include "cmState.h" #include "cmSystemTools.h" +#include + cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left, int top) : cmCursesStringWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h index cd26df6..0ffce04 100644 --- a/Source/CursesDialog/cmCursesPathWidget.h +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -12,8 +12,15 @@ #ifndef cmCursesPathWidget_h #define cmCursesPathWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesStringWidget.h" +#include + +class cmCursesMainForm; + class cmCursesPathWidget : public cmCursesStringWidget { public: diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 0953978..4929958 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -14,8 +14,6 @@ #include -#include "../cmStandardIncludes.h" - #if defined(__sun__) && defined(__GNUC__) #define _MSE_INT_H #endif diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index db98a00..726a128 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -11,7 +11,14 @@ ============================================================================*/ #include "cmCursesStringWidget.h" +#include "cmCursesForm.h" #include "cmCursesMainForm.h" +#include "cmCursesStandardIncludes.h" +#include "cmCursesWidget.h" +#include "cmState.h" + +#include +#include inline int ctrl(int z) { diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index c8ca482..2bcf7e6 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -12,8 +12,13 @@ #ifndef cmCursesStringWidget_h #define cmCursesStringWidget_h +#include + +#include "cmCursesStandardIncludes.h" #include "cmCursesWidget.h" +#include + class cmCursesMainForm; /** \class cmCursesStringWidget diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx index 49f2795..ed76e7c 100644 --- a/Source/CursesDialog/cmCursesWidget.cxx +++ b/Source/CursesDialog/cmCursesWidget.cxx @@ -11,6 +11,8 @@ ============================================================================*/ #include "cmCursesWidget.h" +#include + cmCursesWidget::cmCursesWidget(int width, int height, int left, int top) { this->Field = new_field(height, width, top, left, 0, 0); diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index 2ac5bb8..3f438af 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -12,9 +12,12 @@ #ifndef cmCursesWidget_h #define cmCursesWidget_h +#include // IWYU pragma: keep + #include "cmCursesStandardIncludes.h" +#include "cmState.h" -#include "../cmState.h" +#include class cmCursesMainForm; ----------------------------------------------------------------------- Summary of changes: Source/CursesDialog/ccmake.cxx | 23 +++++++++++--------- Source/CursesDialog/cmCursesBoolWidget.cxx | 5 ++++- Source/CursesDialog/cmCursesBoolWidget.h | 3 +++ .../CursesDialog/cmCursesCacheEntryComposite.cxx | 10 +++++---- Source/CursesDialog/cmCursesCacheEntryComposite.h | 6 ++++- Source/CursesDialog/cmCursesDummyWidget.cxx | 3 +++ Source/CursesDialog/cmCursesDummyWidget.h | 3 +++ Source/CursesDialog/cmCursesFilePathWidget.cxx | 3 +++ Source/CursesDialog/cmCursesFilePathWidget.h | 2 ++ Source/CursesDialog/cmCursesForm.cxx | 2 ++ Source/CursesDialog/cmCursesForm.h | 2 ++ Source/CursesDialog/cmCursesLabelWidget.cxx | 2 ++ Source/CursesDialog/cmCursesLabelWidget.h | 5 +++++ Source/CursesDialog/cmCursesLongMessageForm.cxx | 9 +++++--- Source/CursesDialog/cmCursesLongMessageForm.h | 6 +++-- Source/CursesDialog/cmCursesMainForm.cxx | 17 ++++++++------- Source/CursesDialog/cmCursesMainForm.h | 10 ++++++--- Source/CursesDialog/cmCursesOptionsWidget.cxx | 3 ++- Source/CursesDialog/cmCursesOptionsWidget.h | 6 +++++ Source/CursesDialog/cmCursesPathWidget.cxx | 4 ++++ Source/CursesDialog/cmCursesPathWidget.h | 7 ++++++ Source/CursesDialog/cmCursesStandardIncludes.h | 2 -- Source/CursesDialog/cmCursesStringWidget.cxx | 7 ++++++ Source/CursesDialog/cmCursesStringWidget.h | 5 +++++ Source/CursesDialog/cmCursesWidget.cxx | 2 ++ Source/CursesDialog/cmCursesWidget.h | 5 ++++- 26 files changed, 116 insertions(+), 36 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Sep 4 00:01:08 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 4 Sep 2016 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-856-gfb357e5 Message-ID: <20160904040108.96271F5B61@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 fb357e5fef2e7803f2f745b6aa4cf63935628ed6 (commit) from bfdf1322e7638687c96b323b1df20fd9c08b3044 (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=fb357e5fef2e7803f2f745b6aa4cf63935628ed6 commit fb357e5fef2e7803f2f745b6aa4cf63935628ed6 Author: Kitware Robot AuthorDate: Sun Sep 4 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Sun Sep 4 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 811f4f7..d611daa 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 6) -set(CMake_VERSION_PATCH 20160903) +set(CMake_VERSION_PATCH 20160904) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From gjasny at googlemail.com Sun Sep 4 10:56:15 2016 From: gjasny at googlemail.com (Gregor Jasny) Date: Sun, 4 Sep 2016 10:56:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1760-gb8ececb Message-ID: <20160904145615.A6478F5950@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, next has been updated via b8ececb4b62f0fe2bb3fa7000bf00df327d76de5 (commit) via 60dcaaea133931a323180c30eafabe4576e72cb8 (commit) via fb357e5fef2e7803f2f745b6aa4cf63935628ed6 (commit) from dfa796fc2815c89ed7a1fcc119b12bcf6afc8294 (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=b8ececb4b62f0fe2bb3fa7000bf00df327d76de5 commit b8ececb4b62f0fe2bb3fa7000bf00df327d76de5 Merge: dfa796f 60dcaae Author: Gregor Jasny AuthorDate: Sun Sep 4 10:56:09 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Sep 4 10:56:09 2016 -0400 Merge topic 'tidy-readability-redundant-string-cstr' into next 60dcaaea tidy: Fix readability-redundant-string-cstr issues fb357e5f CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60dcaaea133931a323180c30eafabe4576e72cb8 commit 60dcaaea133931a323180c30eafabe4576e72cb8 Author: Gregor Jasny AuthorDate: Sun Sep 4 16:55:05 2016 +0200 Commit: Gregor Jasny CommitDate: Sun Sep 4 16:55:05 2016 +0200 tidy: Fix readability-redundant-string-cstr issues diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 640e437..14436da 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -330,8 +330,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, if (!cpack_dmg_disable_applications_symlink) { std::ostringstream application_link; application_link << staging.str() << "/Applications"; - cmSystemTools::CreateSymlink("/Applications", - application_link.str().c_str()); + cmSystemTools::CreateSymlink("/Applications", application_link.str()); } // Optionally add a custom volume icon ... @@ -755,7 +754,7 @@ std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix( // the current COMPONENT belongs to. std::string groupVar = "CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP"; - const char* _groupName = GetOption(groupVar.c_str()); + const char* _groupName = GetOption(groupVar); if (_groupName) { std::string groupName = _groupName; diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx index c0d2553..c36439f 100644 --- a/Source/CPack/cmCPackOSXX11Generator.cxx +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -102,15 +102,14 @@ int cmCPackOSXX11Generator::PackageFiles() } std::string applicationsLinkName = diskImageDirectory + "/Applications"; - cmSystemTools::CreateSymlink("/Applications", applicationsLinkName.c_str()); + cmSystemTools::CreateSymlink("/Applications", applicationsLinkName); - if (!this->CopyResourcePlistFile("VolumeIcon.icns", - diskImageDirectory.c_str(), + if (!this->CopyResourcePlistFile("VolumeIcon.icns", diskImageDirectory, ".VolumeIcon.icns", true) || - !this->CopyResourcePlistFile("DS_Store", diskImageDirectory.c_str(), - ".DS_Store", true) || + !this->CopyResourcePlistFile("DS_Store", diskImageDirectory, ".DS_Store", + true) || !this->CopyResourcePlistFile("background.png", - diskImageBackgroundImageDir.c_str(), + diskImageBackgroundImageDir, "background.png", true) || !this->CopyResourcePlistFile("RuntimeScript", dir) || !this->CopyResourcePlistFile("OSXX11.Info.plist", contDir, diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx index 19b587a..e5b96e3 100644 --- a/Source/CPack/cmCPackPKGGenerator.cxx +++ b/Source/CPack/cmCPackPKGGenerator.cxx @@ -225,8 +225,7 @@ void cmCPackPKGGenerator::CreateChoice(const cmCPackComponent& component, dirName += '/'; dirName += component.Name; dirName += this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"); - unsigned long installedSize = - component.GetInstalledSizeInKbytes(dirName.c_str()); + unsigned long installedSize = component.GetInstalledSizeInKbytes(dirName); xout.StartElement("pkg-ref"); xout.Attribute("id", packageId); @@ -283,7 +282,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name, { std::string uname = cmSystemTools::UpperCase(name); std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname; - const char* inFileName = this->GetOption(cpackVar.c_str()); + const char* inFileName = this->GetOption(cpackVar); if (!inFileName) { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() @@ -314,7 +313,7 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name, // Set this so that distribution.dist gets the right name (without // the path). - this->SetOption(("CPACK_RESOURCE_FILE_" + uname + "_NOPATH").c_str(), + this->SetOption("CPACK_RESOURCE_FILE_" + uname + "_NOPATH", (name + ext).c_str()); cmCPackLogger(cmCPackLog::LOG_VERBOSE, @@ -358,7 +357,7 @@ int cmCPackPKGGenerator::CopyInstallScript(const std::string& resdir, std::string dst = resdir; dst += "/"; dst += name; - cmSystemTools::CopyFileAlways(script.c_str(), dst.c_str()); + cmSystemTools::CopyFileAlways(script, dst); cmSystemTools::SetPermissions(dst.c_str(), 0777); cmCPackLogger(cmCPackLog::LOG_VERBOSE, "copy script : " << script << "\ninto " << dst << std::endl); diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index ce329ca..0704e9f 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -118,13 +118,13 @@ int cmCPackPackageMakerGenerator::PackageFiles() // then copy them into the resource directory and make // them executable if (preflight) { - this->CopyInstallScript(resDir.c_str(), preflight, "preflight"); + this->CopyInstallScript(resDir, preflight, "preflight"); } if (postflight) { - this->CopyInstallScript(resDir.c_str(), postflight, "postflight"); + this->CopyInstallScript(resDir, postflight, "postflight"); } if (postupgrade) { - this->CopyInstallScript(resDir.c_str(), postupgrade, "postupgrade"); + this->CopyInstallScript(resDir, postupgrade, "postupgrade"); } } else if (postflight) { // create a postflight component to house the script @@ -160,7 +160,7 @@ int cmCPackPackageMakerGenerator::PackageFiles() // copy postflight script into resource directory of .pkg std::string resourceDir = packageFile + "/Contents/Resources"; - this->CopyInstallScript(resourceDir.c_str(), postflight, "postflight"); + this->CopyInstallScript(resourceDir, postflight, "postflight"); } if (!this->Components.empty()) { @@ -254,9 +254,9 @@ int cmCPackPackageMakerGenerator::PackageFiles() this->SetOption("CPACK_MODULE_VERSION_SUFFIX", ""); // Copy or create all of the resource files we need. - if (!this->CopyCreateResourceFile("License", resDir.c_str()) || - !this->CopyCreateResourceFile("ReadMe", resDir.c_str()) || - !this->CopyCreateResourceFile("Welcome", resDir.c_str()) || + if (!this->CopyCreateResourceFile("License", resDir) || + !this->CopyCreateResourceFile("ReadMe", resDir) || + !this->CopyCreateResourceFile("Welcome", resDir) || !this->CopyResourcePlistFile("Info.plist") || !this->CopyResourcePlistFile("Description.plist")) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files" @@ -372,7 +372,7 @@ int cmCPackPackageMakerGenerator::InitializeInternal() } // Get path to the real PackageMaker, not a symlink: - pkgPath = cmSystemTools::GetRealPath(pkgPath.c_str()); + pkgPath = cmSystemTools::GetRealPath(pkgPath); // Up from there to find the version.plist file in the "Contents" dir: std::string contents_dir; contents_dir = cmSystemTools::GetFilenamePath(pkgPath); diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx index c2a13d0..d867046 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.cxx +++ b/Source/CPack/cmCPackProductBuildGenerator.cxx @@ -73,9 +73,9 @@ int cmCPackProductBuildGenerator::PackageFiles() // Copy or create all of the resource files we need. std::string resDir = packageDirFileName + "/Contents"; - if (!this->CopyCreateResourceFile("License", resDir.c_str()) || - !this->CopyCreateResourceFile("ReadMe", resDir.c_str()) || - !this->CopyCreateResourceFile("Welcome", resDir.c_str())) { + if (!this->CopyCreateResourceFile("License", resDir) || + !this->CopyCreateResourceFile("ReadMe", resDir) || + !this->CopyCreateResourceFile("Welcome", resDir)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files" << std::endl); return 0; @@ -185,10 +185,10 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage( // then copy them into the script directory and make // them executable if (preflight) { - this->CopyInstallScript(scriptDir.c_str(), preflight, "preinstall"); + this->CopyInstallScript(scriptDir, preflight, "preinstall"); } if (postflight) { - this->CopyInstallScript(scriptDir.c_str(), postflight, "postinstall"); + this->CopyInstallScript(scriptDir, postflight, "postinstall"); } // The command that will be used to run ProductBuild diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 6a2dfe8..473634d 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -80,7 +80,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, std::string str; if (cmSystemTools::GetEnv(var, str)) { if (this->EscapeQuotes) { - return this->AddString(cmSystemTools::EscapeQuotes(str.c_str())); + return this->AddString(cmSystemTools::EscapeQuotes(str)); } return this->AddString(str); } diff --git a/Source/cmFilePathUuid.cxx b/Source/cmFilePathUuid.cxx index b2def51..d47a0da 100644 --- a/Source/cmFilePathUuid.cxx +++ b/Source/cmFilePathUuid.cxx @@ -118,7 +118,7 @@ std::string cmFilePathUuid::GetChecksumString( // Calculate the file ( seed + relative path + name ) checksum std::vector hashBytes = cmCryptoHash::New("SHA256")->ByteHashString( - (sourceRelSeed + sourceRelPath + sourceFilename).c_str()); + sourceRelSeed + sourceRelPath + sourceFilename); checksumBase32 = cmBase32Encoder().encodeString(&hashBytes[0], hashBytes.size(), false); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b4bc084..5653820 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -397,7 +397,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( std::string listfile = root->GetCurrentSourceDirectory(); listfile += "/"; listfile += "CMakeLists.txt"; - allBuildGt->AddSource(listfile.c_str()); + allBuildGt->AddSource(listfile); // Add XCODE depend helper std::string dir = root->GetCurrentBinaryDirectory(); @@ -405,9 +405,9 @@ void cmGlobalXCodeGenerator::AddExtraTargets( if (this->XcodeVersion < 50) { makeHelper.push_back("make"); makeHelper.push_back("-C"); - makeHelper.push_back(dir.c_str()); + makeHelper.push_back(dir); makeHelper.push_back("-f"); - makeHelper.push_back(this->CurrentXCodeHackMakefile.c_str()); + makeHelper.push_back(this->CurrentXCodeHackMakefile); makeHelper.push_back(""); // placeholder, see below } @@ -480,7 +480,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( listfile = lg->GetCurrentSourceDirectory(); listfile += "/"; listfile += "CMakeLists.txt"; - target->AddSource(listfile.c_str()); + target->AddSource(listfile); } } } @@ -841,7 +841,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath( // lastKnownFileType as folder in order for Xcode to be able to // open the contents of the folder. // (Xcode 4.6 does not like explicitFileType=folder). - if (cmSystemTools::FileIsDirectory(fullpath.c_str())) { + if (cmSystemTools::FileIsDirectory(fullpath)) { fileType = (ext == "xcassets" ? "folder.assetcatalog" : "folder"); useLastKnownFileType = true; } else { @@ -856,7 +856,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath( // Store the file path relative to the top of the source tree. std::string path = this->RelativeToSource(fullpath.c_str()); - std::string name = cmSystemTools::GetFilenameName(path.c_str()); + std::string name = cmSystemTools::GetFilenameName(path); const char* sourceTree = (cmSystemTools::FileIsFullPath(path.c_str()) ? "" : "SOURCE_ROOT"); @@ -898,8 +898,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen) this->CurrentMakefile = gen->GetMakefile(); std::string outdir = cmSystemTools::CollapseFullPath( this->CurrentLocalGenerator->GetCurrentBinaryDirectory()); - cmSystemTools::SplitPath(outdir.c_str(), - this->CurrentOutputDirectoryComponents); + cmSystemTools::SplitPath(outdir, this->CurrentOutputDirectoryComponents); // Select the current set of configuration types. this->CurrentConfigurationTypes.clear(); @@ -951,7 +950,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( std::string targetName = gtgt->GetName(); // make sure ALL_BUILD, INSTALL, etc are only done once - if (this->SpecialTargetEmitted(targetName.c_str())) { + if (this->SpecialTargetEmitted(targetName)) { continue; } @@ -1223,7 +1222,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt) cmGeneratedFileStream fout(fname.c_str()); fout << "\n"; } - if (cmSourceFile* sf = mf->GetOrCreateSource(fname.c_str())) { + if (cmSourceFile* sf = mf->GetOrCreateSource(fname)) { sf->SetProperty("LANGUAGE", llang.c_str()); gtgt->AddSource(fname); } @@ -1468,7 +1467,7 @@ void cmGlobalXCodeGenerator::AddCommandsToBuildPhase( currentConfig != this->CurrentConfigurationTypes.end(); currentConfig++) { this->CreateCustomRulesMakefile(makefile.c_str(), target, commands, - currentConfig->c_str()); + *currentConfig); } std::string cdir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory(); @@ -1550,8 +1549,8 @@ void cmGlobalXCodeGenerator::CreateCustomRulesMakefile( ccg.GetDepends().begin(); d != ccg.GetDepends().end(); ++d) { std::string dep; - if (this->CurrentLocalGenerator->GetRealDependency(d->c_str(), - configName, dep)) { + if (this->CurrentLocalGenerator->GetRealDependency(*d, configName, + dep)) { makefileStream << "\\\n" << this->ConvertToRelativeForMake(dep.c_str()); } @@ -1662,7 +1661,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, } if (!extraLinkOptionsVar.empty()) { this->CurrentLocalGenerator->AddConfigVariableFlags( - extraLinkOptions, extraLinkOptionsVar.c_str(), configName); + extraLinkOptions, extraLinkOptionsVar, configName); } if (gtgt->GetType() == cmState::OBJECT_LIBRARY || @@ -1678,7 +1677,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, if (!configName.empty()) { std::string linkFlagsVar = "LINK_FLAGS_"; linkFlagsVar += cmSystemTools::UpperCase(configName); - if (const char* linkFlags = gtgt->GetProperty(linkFlagsVar.c_str())) { + if (const char* linkFlags = gtgt->GetProperty(linkFlagsVar)) { this->CurrentLocalGenerator->AppendFlags(extraLinkOptions, linkFlags); } } @@ -1916,7 +1915,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, configName); for (std::vector::iterator i = includes.begin(); i != includes.end(); ++i) { - if (this->NameResolvesToFramework(i->c_str())) { + if (this->NameResolvesToFramework(*i)) { std::string frameworkDir = *i; frameworkDir += "/../"; frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir); @@ -2165,7 +2164,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, std::string processed = ge.Parse(gtgt->GetProperty(*i)) ->Evaluate(this->CurrentLocalGenerator, configName); - buildSettings->AddAttribute(attribute.c_str(), + buildSettings->AddAttribute(attribute, this->CreateString(processed)); } } @@ -2195,7 +2194,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXAggregateTarget); - target->SetComment(gtgt->GetName().c_str()); + target->SetComment(gtgt->GetName()); cmXCodeObject* buildPhases = this->CreateObject(cmXCodeObject::OBJECT_LIST); std::vector emptyContentVector; this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0, @@ -2233,7 +2232,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( } } - target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()).c_str()); + target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId())); return target; } @@ -2257,7 +2256,7 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, comment += " \""; comment += gtgt->GetName(); comment += "\""; - configlist->SetComment(comment.c_str()); + configlist->SetComment(comment); target->AddAttribute("buildConfigurationList", this->CreateObjectReference(configlist)); for (unsigned int i = 0; i < configVector.size(); ++i) { @@ -2266,9 +2265,9 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, buildConfigurations->AddObject(config); cmXCodeObject* buildSettings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); - this->CreateBuildSettings(gtgt, buildSettings, configVector[i].c_str()); + this->CreateBuildSettings(gtgt, buildSettings, configVector[i]); config->AddAttribute("name", this->CreateString(configVector[i])); - config->SetComment(configVector[i].c_str()); + config->SetComment(configVector[i]); config->AddAttribute("buildSettings", buildSettings); } if (!configVector.empty()) { @@ -2367,7 +2366,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( cmXCodeObject* buildSettings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); defConfig = this->CurrentMakefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); - this->CreateBuildSettings(gtgt, buildSettings, defConfig.c_str()); + this->CreateBuildSettings(gtgt, buildSettings, defConfig); target->AddAttribute("buildSettings", buildSettings); } cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST); @@ -2385,7 +2384,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( fullName += gtgt->GetName(); fullName += ".a"; } else { - fullName = gtgt->GetFullName(defConfig.c_str()); + fullName = gtgt->GetFullName(defConfig); } fileRef->AddAttribute("path", this->CreateString(fullName)); if (this->XcodeVersion == 15) { @@ -2393,7 +2392,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( } fileRef->AddAttribute("sourceTree", this->CreateString("BUILT_PRODUCTS_DIR")); - fileRef->SetComment(gtgt->GetName().c_str()); + fileRef->SetComment(gtgt->GetName()); target->AddAttribute("productReference", this->CreateObjectReference(fileRef)); if (const char* productType = this->GetTargetProductType(gtgt)) { @@ -2401,7 +2400,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget( } target->SetTarget(gtgt); this->XCodeObjectMap[gtgt] = target; - target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId()).c_str()); + target->SetId(this->GetOrCreateId(gtgt->GetName(), target->GetId())); return target; } @@ -2426,15 +2425,14 @@ std::string cmGlobalXCodeGenerator::GetOrCreateId(const std::string& name, std::string guidStoreName = name; guidStoreName += "_GUID_CMAKE"; const char* storedGUID = - this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()); + this->CMakeInstance->GetCacheDefinition(guidStoreName); if (storedGUID) { return storedGUID; } - this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), id.c_str(), - "Stored Xcode object GUID", - cmState::INTERNAL); + this->CMakeInstance->AddCacheEntry( + guidStoreName, id.c_str(), "Stored Xcode object GUID", cmState::INTERNAL); return id; } @@ -2482,7 +2480,7 @@ void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings, std::string oldValue = attr->GetString(); oldValue += " "; oldValue += value; - attr->SetString(oldValue.c_str()); + attr->SetString(oldValue); } } } @@ -2582,7 +2580,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) std::vector const& libDeps = cli.GetDepends(); for (std::vector::const_iterator j = libDeps.begin(); j != libDeps.end(); ++j) { - target->AddDependLibrary(configName, j->c_str()); + target->AddDependLibrary(configName, *j); } } @@ -2891,8 +2889,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( std::string project_id = "PROJECT_"; project_id += root->GetProjectName(); this->RootObject->SetId( - this->GetOrCreateId(project_id.c_str(), this->RootObject->GetId()) - .c_str()); + this->GetOrCreateId(project_id.c_str(), this->RootObject->GetId())); group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); this->RootObject->AddAttribute("mainGroup", @@ -2963,7 +2960,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( comment += " \""; comment += this->CurrentProject; comment += "\""; - configlist->SetComment(comment.c_str()); + configlist->SetComment(comment); configlist->AddAttribute("defaultConfigurationIsVisible", this->CreateString("0")); configlist->AddAttribute("defaultConfigurationName", @@ -3373,8 +3370,7 @@ std::string cmGlobalXCodeGenerator::LookupFlags( std::string varName = varNamePrefix; varName += varNameLang; varName += varNameSuffix; - if (const char* varValue = - this->CurrentMakefile->GetDefinition(varName.c_str())) { + if (const char* varValue = this->CurrentMakefile->GetDefinition(varName)) { if (*varValue) { return varValue; } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cecf7b7..694a9f6 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1373,7 +1373,7 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target, } // Add preprocessor definitions for this target and configuration. - this->AddCompileDefinitions(defines, target, config, lang.c_str()); + this->AddCompileDefinitions(defines, target, config, lang); } std::string cmLocalGenerator::GetTargetFortranFlags( ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/CPack/cmCPackDragNDropGenerator.cxx | 5 +- Source/CPack/cmCPackOSXX11Generator.cxx | 11 ++-- Source/CPack/cmCPackPKGGenerator.cxx | 9 ++-- Source/CPack/cmCPackPackageMakerGenerator.cxx | 16 +++--- Source/CPack/cmCPackProductBuildGenerator.cxx | 10 ++-- Source/cmCommandArgumentParserHelper.cxx | 2 +- Source/cmFilePathUuid.cxx | 2 +- Source/cmGlobalXCodeGenerator.cxx | 70 ++++++++++++------------- Source/cmLocalGenerator.cxx | 2 +- 10 files changed, 61 insertions(+), 68 deletions(-) hooks/post-receive -- CMake From domen.vrankar at gmail.com Sun Sep 4 15:15:10 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sun, 4 Sep 2016 15:15:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1762-ged02aa4 Message-ID: <20160904191510.F30B7F38DC@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, next has been updated via ed02aa4047c6e5aff30d1cb20ab29678399379c4 (commit) via e42a39918f784d671ce7f51d9269cc754e263e44 (commit) from b8ececb4b62f0fe2bb3fa7000bf00df327d76de5 (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=ed02aa4047c6e5aff30d1cb20ab29678399379c4 commit ed02aa4047c6e5aff30d1cb20ab29678399379c4 Merge: b8ececb e42a399 Author: Domen Vrankar AuthorDate: Sun Sep 4 15:15:09 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Sep 4 15:15:09 2016 -0400 Merge topic 'cpack-deb-long-filenames' into next e42a3991 cpack-deb-long-filenames https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e42a39918f784d671ce7f51d9269cc754e263e44 commit e42a39918f784d671ce7f51d9269cc754e263e44 Author: Domen Vrankar AuthorDate: Sun Sep 4 21:13:24 2016 +0200 Commit: Domen Vrankar CommitDate: Sun Sep 4 21:13:24 2016 +0200 cpack-deb-long-filenames Support for long filenames in deb packages. See Issue #14332 diff --git a/Help/release/dev/cpack-deb-long-filenames.rst b/Help/release/dev/cpack-deb-long-filenames.rst new file mode 100644 index 0000000..6113eaf --- /dev/null +++ b/Help/release/dev/cpack-deb-long-filenames.rst @@ -0,0 +1,6 @@ +cpack-deb-long-filenames +------------------------ + +* The :module:`CPackDeb` module learned to support long file names + when archive format is set to GNU tar. + See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index c9678d6..1a7b923 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -177,6 +177,24 @@ # # See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections # +# .. variable:: CPACK_DEBIAN_ARCHIVE_TYPE +# +# The archive format used for creating the Debian package. +# +# * Mandatory : YES +# * Default : "paxr" +# +# Possible values are: +# +# - paxr +# - gnutar +# +# .. note:: +# +# Default pax archive format is the most portable format and generates +# packages that do not treat sparse files specially. +# GNU tar format on the other hand supports longer filenames. +# # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE # # The compression used for creating the Debian package. @@ -842,12 +860,24 @@ function(cpack_deb_prepare_package_vars) set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") endif() + 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) + else() + set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr") + endif() + # Compression: (recommended) if(NOT CPACK_DEBIAN_COMPRESSION_TYPE) set(CPACK_DEBIAN_COMPRESSION_TYPE "gzip") endif() - # Recommends: # You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS @@ -1000,6 +1030,7 @@ function(cpack_deb_prepare_package_vars) set(GEN_CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_DEBIAN_PACKAGE_MAINTAINER}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_PACKAGE_DESCRIPTION}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}" PARENT_SCOPE) + set(GEN_CPACK_DEBIAN_ARCHIVE_TYPE "${CPACK_DEBIAN_ARCHIVE_TYPE}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_COMPRESSION_TYPE "${CPACK_DEBIAN_COMPRESSION_TYPE}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_RECOMMENDS}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_SUGGESTS "${CPACK_DEBIAN_PACKAGE_SUGGESTS}" PARENT_SCOPE) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 1f3ac51..b960c0a 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -419,6 +419,12 @@ int cmCPackDebGenerator::createDeb() << debian_compression_type << std::endl); } + const char* debian_archive_type = + this->GetOption("GEN_CPACK_DEBIAN_ARCHIVE_TYPE"); + if (!debian_archive_type) { + debian_archive_type = "paxr"; + } + std::string filename_data_tar = strGenWDIR + "/data.tar" + compression_suffix; @@ -431,7 +437,9 @@ int cmCPackDebGenerator::createDeb() << filename_data_tar << "\" for writing" << std::endl); return 0; } - cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, "paxr"); + cmArchiveWrite data_tar(fileStream_data_tar, + tar_compression_type, + debian_archive_type); // uid/gid should be the one of the root user, and this root user has // always uid/gid equal to 0. @@ -535,7 +543,8 @@ int cmCPackDebGenerator::createDeb() return 0; } cmArchiveWrite control_tar(fileStream_control_tar, - cmArchiveWrite::CompressGZip, "paxr"); + cmArchiveWrite::CompressGZip, + debian_archive_type); // sets permissions and uid/gid for the files control_tar.SetUIDAndGID(0u, 0u); diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake new file mode 100644 index 0000000..dd72cf7 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "long_filenames_0.1.1-1_*.deb") +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt$") diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake new file mode 100644 index 0000000..0c1d77e --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake @@ -0,0 +1,7 @@ +function(get_test_prerequirements found_var) + find_program(FAKEROOT_EXECUTABLE NAMES fakeroot) + + if(FAKEROOT_EXECUTABLE) + set(${found_var} true PARENT_SCOPE) + endif() +endfunction() diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake new file mode 100644 index 0000000..169be1c --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake @@ -0,0 +1,23 @@ +# create structure required by non root dpkg install +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/updates") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "") + + +execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE} + -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir + --admindir=${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir + --log=${CMAKE_CURRENT_BINARY_DIR}/root_dir/dpkg.log + ${FOUND_FILE_1} + RESULT_VARIABLE install_result_ + ERROR_VARIABLE install_error_ + OUTPUT_QUIET + ) + +if(install_result_) + message(FATAL_ERROR "LONG_FILENAMES package error - result:" + " '${install_result_}'; text: '${install_error_}'") +endif() diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake new file mode 100644 index 0000000..39a6be4 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake @@ -0,0 +1,3 @@ +set(CPACK_PACKAGE_CONTACT "someone") +set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") +set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar") diff --git a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake index 197b99d..cb9a277 100644 --- a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake +++ b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake @@ -5,4 +5,11 @@ function(get_test_prerequirements found_var config_file) file(WRITE "${config_file}" "set(DPKG_EXECUTABLE \"${DPKG_EXECUTABLE}\")") set(${found_var} true PARENT_SCOPE) endif() + + # optional tool for some tests + find_program(FAKEROOT_EXECUTABLE fakeroot) + if(FAKEROOT_EXECUTABLE) + file(APPEND "${config_file}" + "\nset(FAKEROOT_EXECUTABLE \"${FAKEROOT_EXECUTABLE}\")") + endif() endfunction() diff --git a/Tests/RunCMake/CPack/LONG_FILENAMES.cmake b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake new file mode 100644 index 0000000..3242aef --- /dev/null +++ b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake @@ -0,0 +1,10 @@ +set(LONG_FILENAME + "${CMAKE_CURRENT_BINARY_DIR}/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt") + +file(WRITE + "${LONG_FILENAME}" + "long_filename_test") + +install(FILES ${LONG_FILENAME} DESTINATION foo) + +set(CPACK_PACKAGE_NAME "long_filenames") diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 44586d7..a3029cf 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -17,3 +17,4 @@ run_cpack_test(INSTALL_SCRIPTS "RPM" false) run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) run_cpack_test(DEBUGINFO "RPM" true) +run_cpack_test(LONG_FILENAMES "DEB" false) ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cpack-deb-long-filenames.rst | 6 ++++ Modules/CPackDeb.cmake | 33 +++++++++++++++++++- Source/CPack/cmCPackDebGenerator.cxx | 13 ++++++-- .../CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake | 5 +++ ....cmake => LONG_FILENAMES-Prerequirements.cmake} | 4 +-- .../CPack/DEB/LONG_FILENAMES-VerifyResult.cmake | 23 ++++++++++++++ ...cifics.cmake => LONG_FILENAMES-specifics.cmake} | 2 +- Tests/RunCMake/CPack/DEB/Prerequirements.cmake | 7 +++++ Tests/RunCMake/CPack/LONG_FILENAMES.cmake | 10 ++++++ Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + 10 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 Help/release/dev/cpack-deb-long-filenames.rst create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake copy Tests/RunCMake/CPack/DEB/{DEB_GENERATE_SHLIBS-Prerequirements.cmake => LONG_FILENAMES-Prerequirements.cmake} (58%) create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake copy Tests/RunCMake/CPack/DEB/{COMPONENTS_EMPTY_DIR-specifics.cmake => LONG_FILENAMES-specifics.cmake} (66%) create mode 100644 Tests/RunCMake/CPack/LONG_FILENAMES.cmake hooks/post-receive -- CMake From domen.vrankar at gmail.com Sun Sep 4 17:10:07 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Sun, 4 Sep 2016 17:10:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1764-g083f180 Message-ID: <20160904211007.D528CAF921@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, next has been updated via 083f1806004094f87741ba58655d7536dc05aa1d (commit) via 0d7c9712e7f60e3c7b7652d3fad45f7b4ffa7e23 (commit) from ed02aa4047c6e5aff30d1cb20ab29678399379c4 (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=083f1806004094f87741ba58655d7536dc05aa1d commit 083f1806004094f87741ba58655d7536dc05aa1d Merge: ed02aa4 0d7c971 Author: Domen Vrankar AuthorDate: Sun Sep 4 17:10:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Sep 4 17:10:07 2016 -0400 Merge topic 'cpack-deb-long-filenames' into next 0d7c9712 fixup! cpack-deb-long-filenames https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d7c9712e7f60e3c7b7652d3fad45f7b4ffa7e23 commit 0d7c9712e7f60e3c7b7652d3fad45f7b4ffa7e23 Author: Domen Vrankar AuthorDate: Sun Sep 4 23:09:53 2016 +0200 Commit: Domen Vrankar CommitDate: Sun Sep 4 23:09:53 2016 +0200 fixup! cpack-deb-long-filenames diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake index 169be1c..0452343 100644 --- a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake @@ -6,6 +6,9 @@ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "") +# some programs used by fakeroot require sbin in path so we should not +# leave this to chance (programs: ldconfig and start-stop-daemon) +set(ENV{PATH} "$ENV{PATH}:/usr/local/sbin:/usr/sbin:/sbin") execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE} -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Sep 5 00:01:10 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 5 Sep 2016 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-857-gf642872 Message-ID: <20160905040110.9B27AF5E21@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 f6428725bb0ae7e64866e3eca16a5ad8f007f916 (commit) from fb357e5fef2e7803f2f745b6aa4cf63935628ed6 (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=f6428725bb0ae7e64866e3eca16a5ad8f007f916 commit f6428725bb0ae7e64866e3eca16a5ad8f007f916 Author: Kitware Robot AuthorDate: Mon Sep 5 00:01:06 2016 -0400 Commit: Kitware Robot CommitDate: Mon Sep 5 00:01:06 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d611daa..c886a6a 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 6) -set(CMake_VERSION_PATCH 20160904) +set(CMake_VERSION_PATCH 20160905) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:11:41 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:11:41 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1767-g40cbdc2 Message-ID: <20160905131141.DB8DAF398C@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, next has been updated via 40cbdc24ce4fa2171ed001ccb09e4ddbe6689909 (commit) via f6fd0abc5bbfa7d677cd090ba8e2894d96afdde8 (commit) via f6428725bb0ae7e64866e3eca16a5ad8f007f916 (commit) from 083f1806004094f87741ba58655d7536dc05aa1d (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=40cbdc24ce4fa2171ed001ccb09e4ddbe6689909 commit 40cbdc24ce4fa2171ed001ccb09e4ddbe6689909 Merge: 083f180 f6fd0ab Author: Brad King AuthorDate: Mon Sep 5 09:11:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:11:40 2016 -0400 Merge topic 'genex-LINK_ONLY-not-linking' into next f6fd0abc Genex: Diagnose invalid LINK_ONLY usage instead of crashing f6428725 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6fd0abc5bbfa7d677cd090ba8e2894d96afdde8 commit f6fd0abc5bbfa7d677cd090ba8e2894d96afdde8 Author: Brad King AuthorDate: Mon Sep 5 09:04:30 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:06:00 2016 -0400 Genex: Diagnose invalid LINK_ONLY usage instead of crashing When `$` is used outside of linking we may evaluate it without a `dagChecker`. Do not dereference the NULL pointer and issue a diagnostic instead. Closes: #16287 diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 44e9ce1..c19a741 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -672,15 +672,20 @@ static const struct LinkOnlyNode : public cmGeneratorExpressionNode LinkOnlyNode() {} std::string Evaluate(const std::vector& parameters, - cmGeneratorExpressionContext* /*context*/, - const GeneratorExpressionContent* /*content*/, + cmGeneratorExpressionContext* context, + const GeneratorExpressionContent* content, cmGeneratorExpressionDAGChecker* dagChecker) const CM_OVERRIDE { + if (!dagChecker) { + reportError(context, content->GetOriginalExpression(), + "$ may only be used for linking"); + return std::string(); + } if (!dagChecker->GetTransitivePropertiesOnly()) { return parameters.front(); } - return ""; + return std::string(); } } linkOnlyNode; diff --git a/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-stderr.txt new file mode 100644 index 0000000..cded130 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at LINK_ONLY-not-linking.cmake:1 \(add_custom_target\): + Error evaluating generator expression: + + \$ + + \$ may only be used for linking +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking.cmake b/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking.cmake new file mode 100644 index 0000000..16db0a2 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking.cmake @@ -0,0 +1 @@ +add_custom_target(Custom ALL COMMAND ${CMAKE_COMMAND} -E echo $) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 625bab2..f5584d5 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -29,6 +29,7 @@ run_cmake(COMPILE_LANGUAGE-unknown-lang) run_cmake(TARGET_FILE-recursion) run_cmake(OUTPUT_NAME-recursion) run_cmake(TARGET_PROPERTY-LOCATION) +run_cmake(LINK_ONLY-not-linking) run_cmake(ImportedTarget-TARGET_PDB_FILE) if(LINKER_SUPPORTS_PDB) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/cmGeneratorExpressionNode.cxx | 11 ++++++++--- .../LINK_ONLY-not-linking-result.txt} | 0 .../GeneratorExpression/LINK_ONLY-not-linking-stderr.txt | 8 ++++++++ .../GeneratorExpression/LINK_ONLY-not-linking.cmake | 1 + Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake | 1 + 6 files changed, 19 insertions(+), 4 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorExpression/LINK_ONLY-not-linking-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-stderr.txt create mode 100644 Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:14:47 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:14:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1769-g6b3464e Message-ID: <20160905131447.77BCEF3D3F@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, next has been updated via 6b3464e88428f1c3856c610901265bc5cf4b71f0 (commit) via 6bca9d652806b40346e7e80726784d16c7634640 (commit) from 40cbdc24ce4fa2171ed001ccb09e4ddbe6689909 (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=6b3464e88428f1c3856c610901265bc5cf4b71f0 commit 6b3464e88428f1c3856c610901265bc5cf4b71f0 Merge: 40cbdc2 6bca9d6 Author: Brad King AuthorDate: Mon Sep 5 09:14:46 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:14:46 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 6bca9d65 fixup! Tests: Port GenerateExportHeader test to RunCMake infrastructure https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bca9d652806b40346e7e80726784d16c7634640 commit 6bca9d652806b40346e7e80726784d16c7634640 Author: Brad King AuthorDate: Mon Sep 5 09:14:32 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:14:32 2016 -0400 fixup! Tests: Port GenerateExportHeader test to RunCMake infrastructure diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash index a9ef62b..a7080fc 100755 --- a/Utilities/Scripts/clang-format.bash +++ b/Utilities/Scripts/clang-format.bash @@ -126,7 +126,7 @@ $git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '^Utilities/(KW|cm).*/' | # Exclude reference content. - egrep -z -v '^Tests/Module/GenerateExportHeader/reference/' | + egrep -z -v '^Tests/RunCMake/GenerateExportHeader/reference/' | # Exclude manually-formatted sources (e.g. with long lines). egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' | ----------------------------------------------------------------------- Summary of changes: Utilities/Scripts/clang-format.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:24:34 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:24:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1771-g462bb6d Message-ID: <20160905132434.3686FF55AD@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, next has been updated via 462bb6d997f8726cb035bf6a8e79302b41d1d2a5 (commit) via 0dd4aabd64ec6aeeeee8cd94276c247139882bf2 (commit) from 6b3464e88428f1c3856c610901265bc5cf4b71f0 (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=462bb6d997f8726cb035bf6a8e79302b41d1d2a5 commit 462bb6d997f8726cb035bf6a8e79302b41d1d2a5 Merge: 6b3464e 0dd4aab Author: Brad King AuthorDate: Mon Sep 5 09:24:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:24:33 2016 -0400 Merge topic 'cpack-deb-long-filenames' into next 0dd4aabd fixup! cpack-deb-long-filenames https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0dd4aabd64ec6aeeeee8cd94276c247139882bf2 commit 0dd4aabd64ec6aeeeee8cd94276c247139882bf2 Author: Brad King AuthorDate: Mon Sep 5 09:19:16 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:19:16 2016 -0400 fixup! cpack-deb-long-filenames diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index b960c0a..b909598 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -437,8 +437,7 @@ int cmCPackDebGenerator::createDeb() << filename_data_tar << "\" for writing" << std::endl); return 0; } - cmArchiveWrite data_tar(fileStream_data_tar, - tar_compression_type, + cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, debian_archive_type); // uid/gid should be the one of the root user, and this root user has ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackDebGenerator.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:26:50 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:26:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1773-g66afffa Message-ID: <20160905132650.0E8E3F5727@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, next has been updated via 66afffaff5060f50c97db78c212ca8ccfa38c01d (commit) via 4ffdd564eb32be6147cb8610bbf6c0b5496fc56a (commit) from 462bb6d997f8726cb035bf6a8e79302b41d1d2a5 (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=66afffaff5060f50c97db78c212ca8ccfa38c01d commit 66afffaff5060f50c97db78c212ca8ccfa38c01d Merge: 462bb6d 4ffdd56 Author: Brad King AuthorDate: Mon Sep 5 09:26:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:26:49 2016 -0400 Merge topic 'cpack-deb-long-filenames' into next 4ffdd564 CPack/DEB: Add option to select archive type https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ffdd564eb32be6147cb8610bbf6c0b5496fc56a commit 4ffdd564eb32be6147cb8610bbf6c0b5496fc56a Author: Domen Vrankar AuthorDate: Sun Sep 4 21:13:24 2016 +0200 Commit: Brad King CommitDate: Mon Sep 5 09:24:45 2016 -0400 CPack/DEB: Add option to select archive type Add a `CPACK_DEBIAN_ARCHIVE_TYPE` option that can be used to select an archive type that supports long file names. Closes: #14332 diff --git a/Help/release/dev/cpack-deb-long-filenames.rst b/Help/release/dev/cpack-deb-long-filenames.rst new file mode 100644 index 0000000..6113eaf --- /dev/null +++ b/Help/release/dev/cpack-deb-long-filenames.rst @@ -0,0 +1,6 @@ +cpack-deb-long-filenames +------------------------ + +* The :module:`CPackDeb` module learned to support long file names + when archive format is set to GNU tar. + See :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index c9678d6..1a7b923 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -177,6 +177,24 @@ # # See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections # +# .. variable:: CPACK_DEBIAN_ARCHIVE_TYPE +# +# The archive format used for creating the Debian package. +# +# * Mandatory : YES +# * Default : "paxr" +# +# Possible values are: +# +# - paxr +# - gnutar +# +# .. note:: +# +# Default pax archive format is the most portable format and generates +# packages that do not treat sparse files specially. +# GNU tar format on the other hand supports longer filenames. +# # .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE # # The compression used for creating the Debian package. @@ -842,12 +860,24 @@ function(cpack_deb_prepare_package_vars) set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") endif() + 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) + else() + set(CPACK_DEBIAN_ARCHIVE_TYPE "paxr") + endif() + # Compression: (recommended) if(NOT CPACK_DEBIAN_COMPRESSION_TYPE) set(CPACK_DEBIAN_COMPRESSION_TYPE "gzip") endif() - # Recommends: # You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS @@ -1000,6 +1030,7 @@ function(cpack_deb_prepare_package_vars) set(GEN_CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_DEBIAN_PACKAGE_MAINTAINER}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_PACKAGE_DESCRIPTION}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}" PARENT_SCOPE) + set(GEN_CPACK_DEBIAN_ARCHIVE_TYPE "${CPACK_DEBIAN_ARCHIVE_TYPE}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_COMPRESSION_TYPE "${CPACK_DEBIAN_COMPRESSION_TYPE}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_RECOMMENDS}" PARENT_SCOPE) set(GEN_CPACK_DEBIAN_PACKAGE_SUGGESTS "${CPACK_DEBIAN_PACKAGE_SUGGESTS}" PARENT_SCOPE) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 1f3ac51..b909598 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -419,6 +419,12 @@ int cmCPackDebGenerator::createDeb() << debian_compression_type << std::endl); } + const char* debian_archive_type = + this->GetOption("GEN_CPACK_DEBIAN_ARCHIVE_TYPE"); + if (!debian_archive_type) { + debian_archive_type = "paxr"; + } + std::string filename_data_tar = strGenWDIR + "/data.tar" + compression_suffix; @@ -431,7 +437,8 @@ int cmCPackDebGenerator::createDeb() << filename_data_tar << "\" for writing" << std::endl); return 0; } - cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, "paxr"); + cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, + debian_archive_type); // uid/gid should be the one of the root user, and this root user has // always uid/gid equal to 0. @@ -535,7 +542,8 @@ int cmCPackDebGenerator::createDeb() return 0; } cmArchiveWrite control_tar(fileStream_control_tar, - cmArchiveWrite::CompressGZip, "paxr"); + cmArchiveWrite::CompressGZip, + debian_archive_type); // sets permissions and uid/gid for the files control_tar.SetUIDAndGID(0u, 0u); diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake new file mode 100644 index 0000000..dd72cf7 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "long_filenames_0.1.1-1_*.deb") +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/foo/${whitespaces_}.*/usr/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt$") diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake new file mode 100644 index 0000000..0c1d77e --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-Prerequirements.cmake @@ -0,0 +1,7 @@ +function(get_test_prerequirements found_var) + find_program(FAKEROOT_EXECUTABLE NAMES fakeroot) + + if(FAKEROOT_EXECUTABLE) + set(${found_var} true PARENT_SCOPE) + endif() +endfunction() diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake new file mode 100644 index 0000000..0452343 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake @@ -0,0 +1,26 @@ +# create structure required by non root dpkg install +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/updates") +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "") + +# some programs used by fakeroot require sbin in path so we should not +# leave this to chance (programs: ldconfig and start-stop-daemon) +set(ENV{PATH} "$ENV{PATH}:/usr/local/sbin:/usr/sbin:/sbin") + +execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE} + -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir + --admindir=${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir + --log=${CMAKE_CURRENT_BINARY_DIR}/root_dir/dpkg.log + ${FOUND_FILE_1} + RESULT_VARIABLE install_result_ + ERROR_VARIABLE install_error_ + OUTPUT_QUIET + ) + +if(install_result_) + message(FATAL_ERROR "LONG_FILENAMES package error - result:" + " '${install_result_}'; text: '${install_error_}'") +endif() diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake new file mode 100644 index 0000000..39a6be4 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-specifics.cmake @@ -0,0 +1,3 @@ +set(CPACK_PACKAGE_CONTACT "someone") +set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") +set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar") diff --git a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake index 197b99d..cb9a277 100644 --- a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake +++ b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake @@ -5,4 +5,11 @@ function(get_test_prerequirements found_var config_file) file(WRITE "${config_file}" "set(DPKG_EXECUTABLE \"${DPKG_EXECUTABLE}\")") set(${found_var} true PARENT_SCOPE) endif() + + # optional tool for some tests + find_program(FAKEROOT_EXECUTABLE fakeroot) + if(FAKEROOT_EXECUTABLE) + file(APPEND "${config_file}" + "\nset(FAKEROOT_EXECUTABLE \"${FAKEROOT_EXECUTABLE}\")") + endif() endfunction() diff --git a/Tests/RunCMake/CPack/LONG_FILENAMES.cmake b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake new file mode 100644 index 0000000..3242aef --- /dev/null +++ b/Tests/RunCMake/CPack/LONG_FILENAMES.cmake @@ -0,0 +1,10 @@ +set(LONG_FILENAME + "${CMAKE_CURRENT_BINARY_DIR}/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt") + +file(WRITE + "${LONG_FILENAME}" + "long_filename_test") + +install(FILES ${LONG_FILENAME} DESTINATION foo) + +set(CPACK_PACKAGE_NAME "long_filenames") diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 44586d7..a3029cf 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -17,3 +17,4 @@ run_cpack_test(INSTALL_SCRIPTS "RPM" false) run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) run_cpack_test(DEBUGINFO "RPM" true) +run_cpack_test(LONG_FILENAMES "DEB" false) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:29:32 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:29:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-859-g750789a Message-ID: <20160905132932.8387CF5BE7@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 750789af426a2ae7f8374069f792371968281420 (commit) via 60dcaaea133931a323180c30eafabe4576e72cb8 (commit) from f6428725bb0ae7e64866e3eca16a5ad8f007f916 (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=750789af426a2ae7f8374069f792371968281420 commit 750789af426a2ae7f8374069f792371968281420 Merge: f642872 60dcaae Author: Brad King AuthorDate: Mon Sep 5 09:29:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:29:30 2016 -0400 Merge topic 'tidy-readability-redundant-string-cstr' 60dcaaea tidy: Fix readability-redundant-string-cstr issues ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackDragNDropGenerator.cxx | 5 +- Source/CPack/cmCPackOSXX11Generator.cxx | 11 ++-- Source/CPack/cmCPackPKGGenerator.cxx | 9 ++-- Source/CPack/cmCPackPackageMakerGenerator.cxx | 16 +++--- Source/CPack/cmCPackProductBuildGenerator.cxx | 10 ++-- Source/cmCommandArgumentParserHelper.cxx | 2 +- Source/cmFilePathUuid.cxx | 2 +- Source/cmGlobalXCodeGenerator.cxx | 70 ++++++++++++------------- Source/cmLocalGenerator.cxx | 2 +- 9 files changed, 60 insertions(+), 67 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:29:35 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:29:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-861-g4f83077 Message-ID: <20160905132935.401D6F5BE9@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 4f83077e2d3fffed1d86b1e14ea34343db62cc3a (commit) via 32f756c8226e2026d51307c4722aa6b98939c9e6 (commit) from 750789af426a2ae7f8374069f792371968281420 (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=4f83077e2d3fffed1d86b1e14ea34343db62cc3a commit 4f83077e2d3fffed1d86b1e14ea34343db62cc3a Merge: 750789a 32f756c Author: Brad King AuthorDate: Mon Sep 5 09:29:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:29:33 2016 -0400 Merge topic 'include-what-you-use' 32f756c8 CursesDialog: include what you use ----------------------------------------------------------------------- Summary of changes: Source/CursesDialog/ccmake.cxx | 23 +++++++++++--------- Source/CursesDialog/cmCursesBoolWidget.cxx | 5 ++++- Source/CursesDialog/cmCursesBoolWidget.h | 3 +++ .../CursesDialog/cmCursesCacheEntryComposite.cxx | 10 +++++---- Source/CursesDialog/cmCursesCacheEntryComposite.h | 6 ++++- Source/CursesDialog/cmCursesDummyWidget.cxx | 3 +++ Source/CursesDialog/cmCursesDummyWidget.h | 3 +++ Source/CursesDialog/cmCursesFilePathWidget.cxx | 3 +++ Source/CursesDialog/cmCursesFilePathWidget.h | 2 ++ Source/CursesDialog/cmCursesForm.cxx | 2 ++ Source/CursesDialog/cmCursesForm.h | 2 ++ Source/CursesDialog/cmCursesLabelWidget.cxx | 2 ++ Source/CursesDialog/cmCursesLabelWidget.h | 5 +++++ Source/CursesDialog/cmCursesLongMessageForm.cxx | 9 +++++--- Source/CursesDialog/cmCursesLongMessageForm.h | 6 +++-- Source/CursesDialog/cmCursesMainForm.cxx | 17 ++++++++------- Source/CursesDialog/cmCursesMainForm.h | 10 ++++++--- Source/CursesDialog/cmCursesOptionsWidget.cxx | 3 ++- Source/CursesDialog/cmCursesOptionsWidget.h | 6 +++++ Source/CursesDialog/cmCursesPathWidget.cxx | 4 ++++ Source/CursesDialog/cmCursesPathWidget.h | 7 ++++++ Source/CursesDialog/cmCursesStandardIncludes.h | 2 -- Source/CursesDialog/cmCursesStringWidget.cxx | 7 ++++++ Source/CursesDialog/cmCursesStringWidget.h | 5 +++++ Source/CursesDialog/cmCursesWidget.cxx | 2 ++ Source/CursesDialog/cmCursesWidget.h | 5 ++++- 26 files changed, 116 insertions(+), 36 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:29:50 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:29:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1776-gf63cc7a Message-ID: <20160905132950.54D0EF5BE6@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, next has been updated via f63cc7a5a50f65d8d087658a4cf7d780bbb3b041 (commit) via 4f83077e2d3fffed1d86b1e14ea34343db62cc3a (commit) via 750789af426a2ae7f8374069f792371968281420 (commit) from 66afffaff5060f50c97db78c212ca8ccfa38c01d (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=f63cc7a5a50f65d8d087658a4cf7d780bbb3b041 commit f63cc7a5a50f65d8d087658a4cf7d780bbb3b041 Merge: 66afffa 4f83077 Author: Brad King AuthorDate: Mon Sep 5 09:29:42 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:29:42 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:44:57 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:44:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1778-ga7083a7 Message-ID: <20160905134457.E27B2F3BCE@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, next has been updated via a7083a7af8037617200f7283e8167f315f13acf6 (commit) via 87998458c98ed15d77a0dd129ad1bea4968247c8 (commit) from f63cc7a5a50f65d8d087658a4cf7d780bbb3b041 (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=a7083a7af8037617200f7283e8167f315f13acf6 commit a7083a7af8037617200f7283e8167f315f13acf6 Merge: f63cc7a 8799845 Author: Brad King AuthorDate: Mon Sep 5 09:44:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:44:57 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 87998458 Tests: Port GenerateExportHeader test to RunCMake infrastructure https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87998458c98ed15d77a0dd129ad1bea4968247c8 commit 87998458c98ed15d77a0dd129ad1bea4968247c8 Author: Brad King AuthorDate: Thu Sep 1 15:22:05 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:44:10 2016 -0400 Tests: Port GenerateExportHeader test to RunCMake infrastructure This will allow build failure cases to be added later. diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt @@ -0,0 +1 @@ +.* ----------------------------------------------------------------------- Summary of changes: .../GEH-build-stderr.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) copy Tests/RunCMake/{file/LOCK-error-timeout-stdout.txt => GenerateExportHeader/GEH-build-stderr.txt} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 5 09:46:39 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 5 Sep 2016 09:46:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1782-g9e42dba Message-ID: <20160905134639.56CD8F3D32@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, next has been updated via 9e42dba027b1e2860a21dcf3617f13c8adac7204 (commit) via 72ecdd34cf6dbec293fe020e1aeed0a17a499061 (commit) via fc3dab0ea956db618fe2b77778ac413db846b422 (commit) via 4feba34d02fe42fd20209e5b247f91d8e0f7a2ac (commit) from a7083a7af8037617200f7283e8167f315f13acf6 (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=9e42dba027b1e2860a21dcf3617f13c8adac7204 commit 9e42dba027b1e2860a21dcf3617f13c8adac7204 Merge: a7083a7 72ecdd3 Author: Brad King AuthorDate: Mon Sep 5 09:46:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 09:46:37 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' into next 72ecdd34 Tests: Cleanup RunCMake.GenerateExportHeader somewhat fc3dab0e Tests: Port GenerateExportHeader test to RunCMake infrastructure 4feba34d GNU: Do not use -fvisibility on AIX or HP-UX https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72ecdd34cf6dbec293fe020e1aeed0a17a499061 commit 72ecdd34cf6dbec293fe020e1aeed0a17a499061 Author: Brad King AuthorDate: Thu Sep 1 15:38:46 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:45:42 2016 -0400 Tests: Cleanup RunCMake.GenerateExportHeader somewhat diff --git a/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt index fb4d95e..dc92486 100644 --- a/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.5) +cmake_minimum_required(VERSION 3.6) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt deleted file mode 100644 index 8d98f9d..0000000 --- a/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -.* diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index e2a2a3b..ee0871b 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -1,23 +1,8 @@ -cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) -cmake_policy(SET CMP0054 NEW) +# Test add_compiler_export_flags without deprecation warning. +set(CMAKE_WARN_DEPRECATED OFF) project(GenerateExportHeader) -# Prevent timeout on Watcom by not running the tests. -if ("${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom) - file(WRITE - "${CMAKE_CURRENT_BINARY_DIR}/main.cxx" - "int main() { return 0; } - " - ) - - add_executable( - GenerateExportHeader - "${CMAKE_CURRENT_BINARY_DIR}/main.cxx" - ) - return() -endif() - include(CheckCXXCompilerFlag) set( CMAKE_INCLUDE_CURRENT_DIR ON ) @@ -80,16 +65,16 @@ add_compiler_export_flags() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}) -message("#### COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) -message("#### COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) -message("#### WIN32: " ${WIN32}) -message("#### HAS_WERROR_FLAG: " ${HAS_WERROR_FLAG}) +message(STATUS "COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) +message(STATUS "COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) +message(STATUS "WIN32: " ${WIN32}) +message(STATUS "HAS_WERROR_FLAG: " ${HAS_WERROR_FLAG}) set(link_libraries) macro(macro_add_test_library name) add_subdirectory(${name}) include_directories(${name} - ${${name}_BINARY_DIR} # For the export header. + ${CMAKE_CURRENT_BINARY_DIR}/${name} # For the export header. ) list(APPEND link_libraries ${name}) endmacro() @@ -132,7 +117,7 @@ elseif(COMPILER_HAS_DEPRECATED) else() set(_platform Empty) endif() -message("#### Testing reference: ${_platform}") +message(STATUS "Testing reference: ${_platform}") target_compile_definitions(GenerateExportHeader PRIVATE "SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\"" diff --git a/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt index 9f8c8ef..77c18e0 100644 --- a/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt @@ -1,5 +1,3 @@ -project(c_identifier) - set(c_identifier_lib_SRCS c_identifier_class.cpp ) diff --git a/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp index 891bc42..887d777 100644 --- a/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp +++ b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp @@ -1,7 +1,7 @@ #include "c_identifier_class.h" -int main(int argc, char** argv) +int main() { CIdentifierClass cic; return cic.someMethod(); diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt index a057746..ff81f35 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(lib_shared_and_static) - include(GenerateExportHeader) set(CMAKE_CXX_VISIBILITY_PRESET hidden) @@ -33,6 +28,6 @@ generate_export_header(shared_variant CUSTOM_CONTENT_FROM_VARIABLE MY_CUSTOM_CONTENT ) -set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE) +target_compile_definitions(static_variant PUBLIC MYPREFIX_LIBSHARED_AND_STATIC_STATIC_DEFINE) export(TARGETS shared_variant static_variant FILE Targets.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt index e20adb1..c4a761c 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(libshared) - include(GenerateExportHeader) add_compiler_export_flags() diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt index b2db3ea..0fd136c 100644 --- a/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt @@ -1,8 +1,3 @@ - -cmake_minimum_required(VERSION 2.8) - -project(libstatic) - set(CMAKE_INCLUDE_CURRENT_DIR ON) include(GenerateExportHeader) diff --git a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt index aeeb13a..7822d9c 100644 --- a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt @@ -1,7 +1,3 @@ -cmake_minimum_required(VERSION 2.8) - -project(nodeprecated) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_defined) execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_not_defined) @@ -23,4 +19,4 @@ try_compile(Result ${CMAKE_CURRENT_BINARY_DIR}/nodeprecated_defined_build OUTPUT_VARIABLE Out ) -test_fail(Result "Built even with no-deprecated define") \ No newline at end of file +test_fail(Result "Built even with no-deprecated define") diff --git a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in index d8dc482..90cfa12 100644 --- a/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.6) project(nodeprecated_test) diff --git a/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp index eec46d3..f90d098 100644 --- a/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp +++ b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp @@ -1,7 +1,7 @@ #include "someclass.h" -int main(int, char**) +int main() { SomeClass sc; sc.someMethod(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc3dab0ea956db618fe2b77778ac413db846b422 commit fc3dab0ea956db618fe2b77778ac413db846b422 Author: Brad King AuthorDate: Thu Sep 1 15:22:05 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:45:42 2016 -0400 Tests: Port GenerateExportHeader test to RunCMake infrastructure This will allow build failure cases to be added later. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index d6c96e1..8293286 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -485,7 +485,6 @@ if(BUILD_TESTING) ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Module/ExternalData") - ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader) ADD_TEST_MACRO(Module.FindDependency FindDependency) ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 323a36b..fa3d0f9 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -141,6 +141,9 @@ add_RunCMake_test(DisallowedCommands) add_RunCMake_test(ExternalData) add_RunCMake_test(FeatureSummary) add_RunCMake_test(FPHSA) +if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom") + add_RunCMake_test(GenerateExportHeader) +endif() add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorPlatform) add_RunCMake_test(GeneratorToolset) diff --git a/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt new file mode 100644 index 0000000..fb4d95e --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.5) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-build-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/GEH.cmake similarity index 98% rename from Tests/Module/GenerateExportHeader/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/GEH.cmake index 56f0f28..e2a2a3b 100644 --- a/Tests/Module/GenerateExportHeader/CMakeLists.txt +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -78,6 +78,7 @@ add_subdirectory(lib_shared_and_static) add_compiler_export_flags() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}) message("#### COMPILER_HAS_DEPRECATED: " ${COMPILER_HAS_DEPRECATED}) message("#### COMPILER_HAS_HIDDEN_VISIBILITY: " ${COMPILER_HAS_HIDDEN_VISIBILITY}) diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake new file mode 100644 index 0000000..e534c1f --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake @@ -0,0 +1,17 @@ +include(RunCMake) + +function(run_GEH) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GEH-build) + set(RunCMake_TEST_NO_CLEAN 1) + if(RunCMake_GENERATOR MATCHES "Make|Ninja") + set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + endif() + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(GEH) + run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader) +endfunction() + +run_GEH() diff --git a/Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/c_identifier/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.cpp rename to Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.cpp diff --git a/Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.h b/Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.h similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/c_identifier_class.h rename to Tests/RunCMake/GenerateExportHeader/c_identifier/c_identifier_class.h diff --git a/Tests/Module/GenerateExportHeader/c_identifier/main.cpp b/Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/c_identifier/main.cpp rename to Tests/RunCMake/GenerateExportHeader/c_identifier/main.cpp diff --git a/Tests/Module/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/exportheader_test.cpp rename to Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp rename to Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h similarity index 100% rename from Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h rename to Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h diff --git a/Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/libshared/libshared.cpp rename to Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h similarity index 100% rename from Tests/Module/GenerateExportHeader/libshared/libshared.h rename to Tests/RunCMake/GenerateExportHeader/libshared/libshared.h diff --git a/Tests/Module/GenerateExportHeader/libstatic/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/libstatic/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/libstatic/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp rename to Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.h b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h similarity index 100% rename from Tests/Module/GenerateExportHeader/libstatic/libstatic.h rename to Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt.in b/Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/CMakeLists.txt.in rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/CMakeLists.txt.in diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/src/main.cpp diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.cpp similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.cpp diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.h b/Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.h similarity index 100% rename from Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.h rename to Tests/RunCMake/GenerateExportHeader/nodeprecated/src/someclass.h diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Empty/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Empty/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/MinGW/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/MinGW/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/Win32/libstatic_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libshared_export.h diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h b/Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h similarity index 100% rename from Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h rename to Tests/RunCMake/GenerateExportHeader/reference/WinEmpty/libstatic_export.h diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash index a9ef62b..a7080fc 100755 --- a/Utilities/Scripts/clang-format.bash +++ b/Utilities/Scripts/clang-format.bash @@ -126,7 +126,7 @@ $git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '^Utilities/(KW|cm).*/' | # Exclude reference content. - egrep -z -v '^Tests/Module/GenerateExportHeader/reference/' | + egrep -z -v '^Tests/RunCMake/GenerateExportHeader/reference/' | # Exclude manually-formatted sources (e.g. with long lines). egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' | https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4feba34d02fe42fd20209e5b247f91d8e0f7a2ac commit 4feba34d02fe42fd20209e5b247f91d8e0f7a2ac Author: Brad King AuthorDate: Sat Sep 3 07:50:47 2016 -0400 Commit: Brad King CommitDate: Mon Sep 5 09:45:13 2016 -0400 GNU: Do not use -fvisibility on AIX or HP-UX Use of `-fvisibility=hidden` warns: warning: visibility attribute not supported in this configuration; ignored diff --git a/Modules/Platform/AIX-GNU-CXX.cmake b/Modules/Platform/AIX-GNU-CXX.cmake index ec8e83f..d047801 100644 --- a/Modules/Platform/AIX-GNU-CXX.cmake +++ b/Modules/Platform/AIX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/AIX-GNU) __aix_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index df97ab1..ce6faff 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -34,4 +34,5 @@ macro(__aix_compiler_gnu lang) set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro() diff --git a/Modules/Platform/HP-UX-GNU-CXX.cmake b/Modules/Platform/HP-UX-GNU-CXX.cmake index 689bed0..ac72560 100644 --- a/Modules/Platform/HP-UX-GNU-CXX.cmake +++ b/Modules/Platform/HP-UX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/HP-UX-GNU) __hpux_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/HP-UX-GNU.cmake b/Modules/Platform/HP-UX-GNU.cmake index 6c71784..cbd8164 100644 --- a/Modules/Platform/HP-UX-GNU.cmake +++ b/Modules/Platform/HP-UX-GNU.cmake @@ -26,4 +26,5 @@ macro(__hpux_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From daniel at pfeifer-mail.de Mon Sep 5 16:10:31 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Mon, 5 Sep 2016 16:10:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1784-g83d0c93 Message-ID: <20160905201031.6F319E7A6B@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, next has been updated via 83d0c9351f516f3793551e8b6ef8fcea054dc9f5 (commit) via 1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 (commit) from 9e42dba027b1e2860a21dcf3617f13c8adac7204 (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=83d0c9351f516f3793551e8b6ef8fcea054dc9f5 commit 83d0c9351f516f3793551e8b6ef8fcea054dc9f5 Merge: 9e42dba 1a9de80 Author: Daniel Pfeifer AuthorDate: Mon Sep 5 16:10:29 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 16:10:29 2016 -0400 Merge topic 'macro-parenthesis' into next 1a9de803 surround macro arguments with parentheses https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 commit 1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 Author: Daniel Pfeifer AuthorDate: Mon Sep 5 22:09:49 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Sep 5 22:09:49 2016 +0200 surround macro arguments with parentheses diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 0d3725d..377fee1 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -87,17 +87,17 @@ int cmCPackArchiveGenerator::addOneComponentToArchive( */ #define DECLARE_AND_OPEN_ARCHIVE(filename, archive) \ cmGeneratedFileStream gf; \ - gf.Open(filename.c_str(), false, true); \ + gf.Open((filename).c_str(), false, true); \ if (!GenerateHeader(&gf)) { \ cmCPackLogger(cmCPackLog::LOG_ERROR, \ "Problem to generate Header for archive < " \ - << filename << ">." << std::endl); \ + << (filename) << ">." << std::endl); \ return 0; \ } \ cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \ - if (!archive) { \ + if (!(archive)) { \ cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to create archive < " \ - << filename << ">. ERROR =" << archive.GetError() \ + << (filename) << ">. ERROR =" << (archive).GetError() \ << std::endl); \ return 0; \ } diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index cdf292c..754bb5f 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -366,11 +366,11 @@ int cmCTestBuildHandler::ProcessHandler() regexes.clear(); \ cmCTestOptionalLog(this->CTest, DEBUG, \ this << "Add " #regexes << std::endl, this->Quiet); \ - for (it = strings.begin(); it != strings.end(); ++it) { \ + for (it = (strings).begin(); it != (strings).end(); ++it) { \ cmCTestOptionalLog(this->CTest, DEBUG, \ "Add " #strings ": " << *it << std::endl, \ this->Quiet); \ - regexes.push_back(it->c_str()); \ + (regexes).push_back(it->c_str()); \ } cmCTestBuildHandlerPopulateRegexVector(this->CustomErrorMatches, this->ErrorMatchRegex); diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index eec773f..91da239 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -25,9 +25,9 @@ #endif #define check_curl_result(result, errstr) \ - if (result != CURLE_OK && result != CURLE_NOT_BUILT_IN) { \ + if ((result) != CURLE_OK && (result) != CURLE_NOT_BUILT_IN) { \ e += e.empty() ? "" : "\n"; \ - e += errstr; \ + e += (errstr); \ e += ::curl_easy_strerror(result); \ } diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 13736b9..70612d1 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -166,7 +166,7 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os) #define GET_OPT_ARGUMENT(target) \ if ((i + 1 < argc) && !this->IsOption(argv[i + 1])) { \ - target = argv[i + 1]; \ + (target) = argv[i + 1]; \ i = i + 1; \ }; diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 2824f7e..e88e048 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -98,7 +98,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, { \ const char* value = mf->GetDefinition(cmakeDefinition); \ if (value) { \ - var = value; \ + (var) = value; \ } \ } @@ -111,7 +111,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, { \ const char* value = mf->GetDefinition(cmakeDefinition); \ if (value) { \ - var = mf->IsOn(cmakeDefinition); \ + (var) = mf->IsOn(cmakeDefinition); \ } \ } diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 7688c59..3402191 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -86,9 +86,10 @@ static bool isPolicyNewerThan(cmPolicies::PolicyID id, unsigned int majorV, switch (id) { #define POLICY_CASE(ID, V_MAJOR, V_MINOR, V_PATCH) \ case cmPolicies::ID: \ - return ( \ - majorV < V_MAJOR || (majorV == V_MAJOR && minorV + 1 < V_MINOR + 1) || \ - (majorV == V_MAJOR && minorV == V_MINOR && patchV + 1 < V_PATCH + 1)); + return (majorV < (V_MAJOR) || \ + (majorV == (V_MAJOR) && minorV + 1 < (V_MINOR) + 1) || \ + (majorV == (V_MAJOR) && minorV == (V_MINOR) && \ + patchV + 1 < (V_PATCH) + 1)); CM_FOR_EACH_POLICY_ID_VERSION(POLICY_CASE) #undef POLICY_CASE case cmPolicies::CMPCOUNT: diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index be0ee50..7da9975 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1484,7 +1484,7 @@ void list_item_verbose(FILE* out, struct archive_entry* entry) /* Format the time using 'ls -l' conventions. */ tim = archive_entry_mtime(entry); -#define HALF_YEAR (time_t)365 * 86400 / 2 +#define HALF_YEAR ((time_t)365 * 86400 / 2) #if defined(_WIN32) && !defined(__CYGWIN__) /* Windows' strftime function does not support %e format. */ #define DAY_FMT "%d" diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx index a31cc42..b419b9e 100644 --- a/Tests/CMakeLib/testGeneratedFileStream.cxx +++ b/Tests/CMakeLib/testGeneratedFileStream.cxx @@ -16,7 +16,7 @@ #include #define cmFailed(m1, m2) \ - std::cout << "FAILED: " << m1 << m2 << "\n"; \ + std::cout << "FAILED: " << (m1) << (m2) << "\n"; \ failed = 1 int testGeneratedFileStream(int /*unused*/, char* /*unused*/ []) diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx index 8e8d4c4..e834b93 100644 --- a/Tests/CMakeLib/testSystemTools.cxx +++ b/Tests/CMakeLib/testSystemTools.cxx @@ -14,9 +14,9 @@ #include #include -#define cmPassed(m) std::cout << "Passed: " << m << "\n" +#define cmPassed(m) std::cout << "Passed: " << (m) << "\n" #define cmFailed(m) \ - std::cout << "FAILED: " << m << "\n"; \ + std::cout << "FAILED: " << (m) << "\n"; \ failed = 1 int testSystemTools(int /*unused*/, char* /*unused*/ []) ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackArchiveGenerator.cxx | 8 ++++---- Source/CTest/cmCTestBuildHandler.cxx | 4 ++-- Source/cmCurl.cxx | 4 ++-- Source/cmDocumentation.cxx | 2 +- Source/cmGraphVizWriter.cxx | 4 ++-- Source/cmPolicies.cxx | 7 ++++--- Source/cmSystemTools.cxx | 2 +- Tests/CMakeLib/testGeneratedFileStream.cxx | 2 +- Tests/CMakeLib/testSystemTools.cxx | 4 ++-- 9 files changed, 19 insertions(+), 18 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Mon Sep 5 16:12:58 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Mon, 5 Sep 2016 16:12:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1786-gcb33be0 Message-ID: <20160905201259.85FA2F39AA@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, next has been updated via cb33be0a1655e5b9bd8abd609ac3c463182ac586 (commit) via 00b16a866aa3994263d7536a862225150c8dce1e (commit) from 83d0c9351f516f3793551e8b6ef8fcea054dc9f5 (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=cb33be0a1655e5b9bd8abd609ac3c463182ac586 commit cb33be0a1655e5b9bd8abd609ac3c463182ac586 Merge: 83d0c93 00b16a8 Author: Daniel Pfeifer AuthorDate: Mon Sep 5 16:12:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 16:12:57 2016 -0400 Merge topic 'qtdialog-tidy' into next 00b16a86 QtDialog: fix clang-tidy warnings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00b16a866aa3994263d7536a862225150c8dce1e commit 00b16a866aa3994263d7536a862225150c8dce1e Author: Daniel Pfeifer AuthorDate: Mon Sep 5 22:12:36 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Sep 5 22:12:36 2016 +0200 QtDialog: fix clang-tidy warnings diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx index dc7a4b0..a94c54b 100644 --- a/Source/QtDialog/AddCacheEntry.cxx +++ b/Source/QtDialog/AddCacheEntry.cxx @@ -64,7 +64,8 @@ QVariant AddCacheEntry::value() const QWidget* w = this->StackedWidget->currentWidget(); if (qobject_cast(w)) { return static_cast(w)->text(); - } else if (qobject_cast(w)) { + } + if (qobject_cast(w)) { return static_cast(w)->isChecked(); } return QVariant(); diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 5a8a5be..4de4bef 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -29,18 +29,19 @@ #include "cmSystemTools.h" // IWYU pragma: keep -static const char* cmDocumentationName[][2] = { { 0, +static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " cmake-gui - CMake GUI." }, - { 0, 0 } }; + { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationUsage[][2] = { - { 0, " cmake-gui [options]\n" - " cmake-gui [options] \n" - " cmake-gui [options] " }, - { 0, 0 } + { CM_NULLPTR, " cmake-gui [options]\n" + " cmake-gui [options] \n" + " cmake-gui [options] " }, + { CM_NULLPTR, CM_NULLPTR } }; -static const char* cmDocumentationOptions[][2] = { { 0, 0 } }; +static const char* cmDocumentationOptions[] + [2] = { { CM_NULLPTR, CM_NULLPTR } }; #if defined(Q_OS_MAC) static int cmOSXInstall(std::string dir); diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index fda3e58..5b84597 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -41,7 +41,7 @@ QCMakeThread::QCMakeThread(QObject* p) : QThread(p) - , CMakeInstance(NULL) + , CMakeInstance(CM_NULLPTR) { } @@ -57,7 +57,7 @@ void QCMakeThread::run() emit this->cmakeInitialized(); this->exec(); delete this->CMakeInstance; - this->CMakeInstance = NULL; + this->CMakeInstance = CM_NULLPTR; } CMakeSetupDialog::CMakeSetupDialog() diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index ca5e3b5..c34751a 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -129,8 +129,9 @@ bool StartCompilerSetup::crossCompilerSetup() const void StartCompilerSetup::onSelectionChanged(bool on) { - if (on) + if (on) { selectionChanged(); + } } void StartCompilerSetup::onGeneratorChanged(QString const& name) @@ -144,12 +145,15 @@ void StartCompilerSetup::onGeneratorChanged(QString const& name) int StartCompilerSetup::nextId() const { - if (compilerSetup()) + if (compilerSetup()) { return NativeSetup; - if (crossCompilerSetup()) + } + if (crossCompilerSetup()) { return CrossSetup; - if (crossCompilerToolChainFile()) + } + if (crossCompilerToolChainFile()) { return ToolchainSetup; + } return -1; } @@ -515,7 +519,8 @@ QString FirstConfigure::getCCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getCCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getCCompiler(); } return QString(); @@ -525,7 +530,8 @@ QString FirstConfigure::getCXXCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getCXXCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getCXXCompiler(); } return QString(); @@ -535,7 +541,8 @@ QString FirstConfigure::getFortranCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getFortranCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getFortranCompiler(); } return QString(); diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index cc1f4aa..88ea049 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -33,7 +33,7 @@ public: } protected: - bool filterAcceptsRow(int row, const QModelIndex& p) const + bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE { QStringList strs; const QAbstractItemModel* m = this->sourceModel(); @@ -87,7 +87,7 @@ public: protected: bool ShowAdvanced; - bool filterAcceptsRow(int row, const QModelIndex& p) const + bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE { const QAbstractItemModel* m = this->sourceModel(); QModelIndex idx = m->index(row, 0, p); @@ -160,7 +160,8 @@ QModelIndex QCMakeCacheView::moveCursor(CursorAction act, // want home/end to go to begin/end of rows, not columns if (act == MoveHome) { return this->model()->index(0, 1); - } else if (act == MoveEnd) { + } + if (act == MoveEnd) { return this->model()->index(this->model()->rowCount() - 1, 1); } return QTreeView::moveCursor(act, mod); @@ -538,15 +539,16 @@ void QCMakeCacheModelDelegate::setFileDialogFlag(bool f) this->FileDialogFlag = f; } -QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, - const QStyleOptionViewItem&, - const QModelIndex& idx) const +QWidget* QCMakeCacheModelDelegate::createEditor( + QWidget* p, const QStyleOptionViewItem& /*option*/, + const QModelIndex& idx) const { QModelIndex var = idx.sibling(idx.row(), 0); int type = var.data(QCMakeCacheModel::TypeRole).toInt(); if (type == QCMakeProperty::BOOL) { - return NULL; - } else if (type == QCMakeProperty::PATH) { + return CM_NULLPTR; + } + if (type == QCMakeProperty::PATH) { QCMakePathEditor* editor = new QCMakePathEditor(p, var.data(Qt::DisplayRole).toString()); QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, @@ -645,7 +647,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option, QStyleOptionButton opt; opt.QStyleOption::operator=(option); sz = sz.expandedTo( - style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, NULL) + style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, CM_NULLPTR) .size()); return sz; diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx index 4b3eb34..fc481b8 100644 --- a/Source/QtDialog/QCMakeWidgets.cxx +++ b/Source/QtDialog/QCMakeWidgets.cxx @@ -67,7 +67,7 @@ void QCMakeFilePathEditor::chooseFile() this->fileDialogExists(true); path = QFileDialog::getOpenFileName(this, title, info.absolutePath(), QString(), - NULL, QFileDialog::DontResolveSymlinks); + CM_NULLPTR, QFileDialog::DontResolveSymlinks); this->fileDialogExists(false); if (!path.isEmpty()) { @@ -99,7 +99,7 @@ void QCMakePathEditor::chooseFile() // use same QDirModel for all completers static QDirModel* fileDirModel() { - static QDirModel* m = NULL; + static QDirModel* m = CM_NULLPTR; if (!m) { m = new QDirModel(); } @@ -107,7 +107,7 @@ static QDirModel* fileDirModel() } static QDirModel* pathDirModel() { - static QDirModel* m = NULL; + static QDirModel* m = CM_NULLPTR; if (!m) { m = new QDirModel(); m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot); ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/AddCacheEntry.cxx | 3 ++- Source/QtDialog/CMakeSetup.cxx | 15 ++++++++------- Source/QtDialog/CMakeSetupDialog.cxx | 4 ++-- Source/QtDialog/FirstConfigure.cxx | 21 ++++++++++++++------- Source/QtDialog/QCMakeCacheView.cxx | 20 +++++++++++--------- Source/QtDialog/QCMakeWidgets.cxx | 6 +++--- 6 files changed, 40 insertions(+), 29 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Mon Sep 5 16:35:50 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Mon, 5 Sep 2016 16:35:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1788-g425a124 Message-ID: <20160905203550.C8057F5C01@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, next has been updated via 425a1248b7c91f3bd1d2a4facbfca2b7889878a6 (commit) via 8d52b94262c0201b37aab554d306a037a48e0ca3 (commit) from cb33be0a1655e5b9bd8abd609ac3c463182ac586 (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=425a1248b7c91f3bd1d2a4facbfca2b7889878a6 commit 425a1248b7c91f3bd1d2a4facbfca2b7889878a6 Merge: cb33be0 8d52b94 Author: Daniel Pfeifer AuthorDate: Mon Sep 5 16:35:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 16:35:49 2016 -0400 Merge topic 'qtdialog-tidy' into next 8d52b942 fixup! QtDialog: fix clang-tidy warnings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d52b94262c0201b37aab554d306a037a48e0ca3 commit 8d52b94262c0201b37aab554d306a037a48e0ca3 Author: Daniel Pfeifer AuthorDate: Mon Sep 5 22:35:31 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Sep 5 22:35:31 2016 +0200 fixup! QtDialog: fix clang-tidy warnings diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index bdb1962..276e2a5 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -3,6 +3,8 @@ #ifndef COMPILERS_HPP #define COMPILERS_HPP +#include + #include #include @@ -11,7 +13,7 @@ class Compilers : public QWidget, public Ui::Compilers { Q_OBJECT public: - Compilers(QWidget* p = NULL) + Compilers(QWidget* p = CM_NULLPTR) : QWidget(p) { this->setupUi(this); diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index a818c6b..7eadb09 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -13,6 +13,8 @@ #ifndef QCMake_h #define QCMake_h +#include + #include "cmake.h" #ifdef _MSC_VER @@ -71,7 +73,7 @@ class QCMake : public QObject { Q_OBJECT public: - QCMake(QObject* p = 0); + QCMake(QObject* p = CM_NULLPTR); ~QCMake(); public slots: /// load the cache file in a directory diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h index f1e87ce..0d95e63 100644 --- a/Source/QtDialog/QCMakeWidgets.h +++ b/Source/QtDialog/QCMakeWidgets.h @@ -13,6 +13,8 @@ #ifndef QCMakeWidgets_h #define QCMakeWidgets_h +#include + #include #include #include @@ -43,7 +45,7 @@ class QCMakePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakePathEditor(QWidget* p = CM_NULLPTR, const QString& var = QString()); void chooseFile(); }; @@ -52,7 +54,8 @@ class QCMakeFilePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakeFilePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakeFilePathEditor(QWidget* p = CM_NULLPTR, + const QString& var = QString()); void chooseFile(); }; ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/Compilers.h | 4 +++- Source/QtDialog/QCMake.h | 4 +++- Source/QtDialog/QCMakeWidgets.h | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Mon Sep 5 17:18:35 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Mon, 5 Sep 2016 17:18:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1790-g8752d76 Message-ID: <20160905211835.BFC40F4DC0@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, next has been updated via 8752d765ae63edd5153a0547727989a4efe4d809 (commit) via 0039ffa2163665856be1e772146442f2c7418c6c (commit) from 425a1248b7c91f3bd1d2a4facbfca2b7889878a6 (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=8752d765ae63edd5153a0547727989a4efe4d809 commit 8752d765ae63edd5153a0547727989a4efe4d809 Merge: 425a124 0039ffa Author: Daniel Pfeifer AuthorDate: Mon Sep 5 17:18:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 17:18:34 2016 -0400 Merge topic 'cm_nullptr' into next 0039ffa2 use CM_NULLPTR https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0039ffa2163665856be1e772146442f2c7418c6c commit 0039ffa2163665856be1e772146442f2c7418c6c Author: Daniel Pfeifer AuthorDate: Mon Sep 5 23:18:05 2016 +0200 Commit: Daniel Pfeifer CommitDate: Mon Sep 5 23:18:05 2016 +0200 use CM_NULLPTR diff --git a/Source/cmFilePathUuid.h b/Source/cmFilePathUuid.h index 87cfcf8..b54dc47 100644 --- a/Source/cmFilePathUuid.h +++ b/Source/cmFilePathUuid.h @@ -52,8 +52,9 @@ public: * @arg outputPrefix optional string to prepend to the result * @arg outputSuffix optional string to append to the result */ - std::string get(const std::string& filePath, const char* outputPrefix = NULL, - const char* outputSuffix = NULL); + std::string get(const std::string& filePath, + const char* outputPrefix = CM_NULLPTR, + const char* outputSuffix = CM_NULLPTR); private: void initParentDirs(const std::string& currentSrcDir, diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx index 7c53a3d..9878912 100644 --- a/Source/cmXMLParser.cxx +++ b/Source/cmXMLParser.cxx @@ -20,10 +20,10 @@ cmXMLParser::cmXMLParser() { - this->Parser = 0; + this->Parser = CM_NULLPTR; this->ParseError = 0; - this->ReportCallback = 0; - this->ReportCallbackData = 0; + this->ReportCallback = CM_NULLPTR; + this->ReportCallbackData = CM_NULLPTR; } cmXMLParser::~cmXMLParser() @@ -64,7 +64,7 @@ int cmXMLParser::InitializeParser() } // Create the expat XML parser. - this->Parser = XML_ParserCreate(0); + this->Parser = XML_ParserCreate(CM_NULLPTR); XML_SetElementHandler(static_cast(this->Parser), &cmXMLParserStartElement, &cmXMLParserEndElement); XML_SetCharacterDataHandler(static_cast(this->Parser), @@ -108,7 +108,7 @@ int cmXMLParser::CleanupParser() // Clean up the parser. XML_ParserFree(static_cast(this->Parser)); - this->Parser = 0; + this->Parser = CM_NULLPTR; return result; } @@ -165,7 +165,7 @@ const char* cmXMLParser::FindAttribute(const char** atts, } } } - return 0; + return CM_NULLPTR; } void cmXMLParserStartElement(void* parser, const char* name, const char** atts) diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 529c830..0bf0a7c 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -148,7 +148,8 @@ int main() it != end; ++it) { std::vector command; cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command); - if (!cmSystemTools::RunSingleCommand(command, 0, 0, 0, + if (!cmSystemTools::RunSingleCommand(command, CM_NULLPTR, CM_NULLPTR, + CM_NULLPTR, it->at("directory").c_str())) { std::cout << "ERROR: Failed to run command \"" << command[0] << "\"" << std::endl; diff --git a/Tests/CMakeLib/testXMLSafe.cxx b/Tests/CMakeLib/testXMLSafe.cxx index 356880c..c4aaf17 100644 --- a/Tests/CMakeLib/testXMLSafe.cxx +++ b/Tests/CMakeLib/testXMLSafe.cxx @@ -27,7 +27,7 @@ static test_pair const pairs[] = { { "angles <>", "angles <>" }, { "ampersand &", "ampersand &" }, { "bad-byte \x80", "bad-byte [NON-UTF-8-BYTE-0x80]" }, - { 0, 0 } + { CM_NULLPTR, CM_NULLPTR } }; int testXMLSafe(int /*unused*/, char* /*unused*/ []) ----------------------------------------------------------------------- Summary of changes: Source/cmFilePathUuid.h | 5 +++-- Source/cmXMLParser.cxx | 12 ++++++------ Tests/CMakeLib/run_compile_commands.cxx | 3 ++- Tests/CMakeLib/testXMLSafe.cxx | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From domen.vrankar at gmail.com Mon Sep 5 17:59:23 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Mon, 5 Sep 2016 17:59:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1792-ged5cd99 Message-ID: <20160905215923.6DE4EF59DF@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, next has been updated via ed5cd9993461fabf38e9986dc52b304cd5f2830b (commit) via d3c1b906906bd6abab1d42fc1166e117b7ce8567 (commit) from 8752d765ae63edd5153a0547727989a4efe4d809 (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=ed5cd9993461fabf38e9986dc52b304cd5f2830b commit ed5cd9993461fabf38e9986dc52b304cd5f2830b Merge: 8752d76 d3c1b90 Author: Domen Vrankar AuthorDate: Mon Sep 5 17:59:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 17:59:22 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next d3c1b906 cpack-deb-package-description-fallback https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3c1b906906bd6abab1d42fc1166e117b7ce8567 commit d3c1b906906bd6abab1d42fc1166e117b7ce8567 Author: Domen Vrankar AuthorDate: Mon Sep 5 23:58:33 2016 +0200 Commit: Domen Vrankar CommitDate: Mon Sep 5 23:58:33 2016 +0200 cpack-deb-package-description-fallback Breaking change of fallback variable precedence for CPACK_DEBIAN_PACKAGE_DESCRIPTION that matches CPackRPM behavior as much as possible. See Issue #16272 diff --git a/Help/release/dev/cpack-deb-package-description-fallback b/Help/release/dev/cpack-deb-package-description-fallback new file mode 100644 index 0000000..6300dfc --- /dev/null +++ b/Help/release/dev/cpack-deb-package-description-fallback @@ -0,0 +1,11 @@ +cpack-deb-package-description-fallback +-------------------------------------- + +* The :module:`CPackDeb` module learned new package description + override rules to match :module:`CPackRPM` module behavior. + **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` + variable is set to non default location then it is prefered to + :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable. + Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION` + was introduced for component based packaging. + See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index c9678d6..cbba186 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -156,16 +156,18 @@ # * Default : :code:`CPACK_PACKAGE_CONTACT` # # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION -# CPACK_COMPONENT__DESCRIPTION +# CPACK_DEBIAN__PACKAGE_DESCRIPTION # # The Debian package description # # * Mandatory : YES # * Default : # -# - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or -# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` -# +# - :variable:`CPACK_COMPONENT__DESCRIPTION` (component +# based installers only) if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default location content # # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION # CPACK_DEBIAN__PACKAGE_SECTION @@ -811,24 +813,21 @@ function(cpack_deb_prepare_package_vars) endif() # Description: (mandatory) - if(NOT CPACK_DEB_PACKAGE_COMPONENT) - if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + if(CPACK_DEB_PACKAGE_COMPONENT) + if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}") + elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}") endif() - else() - set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) - - # component description overrides package description - if(${component_description_var}) - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}}) - elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_description_var}") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + endif() + + if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + if(CPACK_PACKAGE_DESCRIPTION_FILE AND NOT "${CPACK_PACKAGE_DESCRIPTION_FILE}" STREQUAL "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") + else() # use default package description file content + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) endif() endif() diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in index 74d816c..6c5a655 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in @@ -15,8 +15,8 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) #set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) # overriding previous descriptions -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") -set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "applications_description") -set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") +set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_DESCRIPTION "applications_description") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") # libraries does not have any description and should inherit from CPACK_PACKAGE_DESCRIPTION_SUMMARY unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in index cda79bc..92226d8 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in @@ -17,10 +17,12 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) # overriding previous descriptions set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description 2") +# and override CPACK_PACKAGE_DESCRIPTION_SUMMARY because of precedence +set(CPACK_PACKAGE_DESCRIPTION_FILE + "@CPackComponentsDEB_SOURCE_DIR@/pkg_description.txt") + # Components do not have any description unset(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION) unset(CPACK_COMPONENT_HEADERS_DESCRIPTION) -unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) - set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "library description") diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake index 35ca74c..7b94ca0 100644 --- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake +++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake @@ -55,12 +55,12 @@ if(DPKGDEB_EXECUTABLE) message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'") if("${dpkg_package_name}" STREQUAL "mylib-applications") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description") endif() elseif("${dpkg_package_name}" STREQUAL "mylib-headers") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description") endif() diff --git a/Tests/CPackComponentsDEB/pkg_description.txt b/Tests/CPackComponentsDEB/pkg_description.txt new file mode 100644 index 0000000..99f8f9b --- /dev/null +++ b/Tests/CPackComponentsDEB/pkg_description.txt @@ -0,0 +1 @@ +Debian package description file ----------------------------------------------------------------------- Summary of changes: .../dev/cpack-deb-package-description-fallback | 11 ++++++ Modules/CPackDeb.cmake | 41 ++++++++++---------- ...LibCPackConfig-components-description1.cmake.in | 6 +-- ...LibCPackConfig-components-description2.cmake.in | 6 ++- ...CPackVerifyResult-components-description2.cmake | 4 +- Tests/CPackComponentsDEB/pkg_description.txt | 1 + 6 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 Help/release/dev/cpack-deb-package-description-fallback create mode 100644 Tests/CPackComponentsDEB/pkg_description.txt hooks/post-receive -- CMake From domen.vrankar at gmail.com Mon Sep 5 18:24:16 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Mon, 5 Sep 2016 18:24:16 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1794-gd16d98e Message-ID: <20160905222416.83902F56D0@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, next has been updated via d16d98e86a084508666fd9768b779ae0ce96763a (commit) via 87a944984abeacbc984e3197f7bcfe54faf6aaad (commit) from ed5cd9993461fabf38e9986dc52b304cd5f2830b (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=d16d98e86a084508666fd9768b779ae0ce96763a commit d16d98e86a084508666fd9768b779ae0ce96763a Merge: ed5cd99 87a9449 Author: Domen Vrankar AuthorDate: Mon Sep 5 18:24:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 5 18:24:15 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next 87a94498 fixup! cpack-deb-package-description-fallback https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87a944984abeacbc984e3197f7bcfe54faf6aaad commit 87a944984abeacbc984e3197f7bcfe54faf6aaad Author: Domen Vrankar AuthorDate: Tue Sep 6 00:23:41 2016 +0200 Commit: Domen Vrankar CommitDate: Tue Sep 6 00:23:41 2016 +0200 fixup! cpack-deb-package-description-fallback Default description file path is set by CPack.cmake script so handle the case when that script is not used. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index cbba186..25c25ae 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -167,7 +167,8 @@ # based installers only) if set, # - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location, # - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set, -# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default location content +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set, +# - or "no package description available" # # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION # CPACK_DEBIAN__PACKAGE_SECTION @@ -826,8 +827,10 @@ function(cpack_deb_prepare_package_vars) file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY) set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") - else() # use default package description file content + elseif(CPACK_PACKAGE_DESCRIPTION_FILE) # use default package description file content file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + else() + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "no package description available") endif() endif() ----------------------------------------------------------------------- Summary of changes: Modules/CPackDeb.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Sep 6 00:01:08 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 6 Sep 2016 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-862-g7727915 Message-ID: <20160906040109.0026FF5BFC@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 77279153953fb9e757481ac9eb299608f6f2aeba (commit) from 4f83077e2d3fffed1d86b1e14ea34343db62cc3a (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=77279153953fb9e757481ac9eb299608f6f2aeba commit 77279153953fb9e757481ac9eb299608f6f2aeba Author: Kitware Robot AuthorDate: Tue Sep 6 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Tue Sep 6 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c886a6a..fb13b21 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 6) -set(CMake_VERSION_PATCH 20160905) +set(CMake_VERSION_PATCH 20160906) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:40:14 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:40:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1797-gc5ad71b Message-ID: <20160906124014.9CCD0B0716@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, next has been updated via c5ad71bf6fb6db3530c060cd1d741c664b8e601a (commit) via 29768b03eabcff13b332497caf2fb0e1c1ca717b (commit) via 77279153953fb9e757481ac9eb299608f6f2aeba (commit) from d16d98e86a084508666fd9768b779ae0ce96763a (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=c5ad71bf6fb6db3530c060cd1d741c664b8e601a commit c5ad71bf6fb6db3530c060cd1d741c664b8e601a Merge: d16d98e 29768b0 Author: Brad King AuthorDate: Tue Sep 6 08:40:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:40:13 2016 -0400 Merge topic 'FindMatlab-fix-empty-list-index' into next 29768b03 FindMatlab: Avoid indexing an empty list of versions 77279153 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29768b03eabcff13b332497caf2fb0e1c1ca717b commit 29768b03eabcff13b332497caf2fb0e1c1ca717b Author: Brad King AuthorDate: Tue Sep 6 08:39:25 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 08:39:38 2016 -0400 FindMatlab: Avoid indexing an empty list of versions diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 9f96fe6..b501599 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1030,13 +1030,17 @@ function(_Matlab_get_version_from_root matlab_root matlab_known_version matlab_f set(matlab_list_of_all_versions) matlab_get_version_from_matlab_run("${Matlab_PROG_VERSION_STRING_AUTO_DETECT}" matlab_list_of_all_versions) - list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) + list(LENGTH matlab_list_of_all_versions list_of_all_versions_length) + if(${list_of_all_versions_length} GREATER 0) + list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) + else() + set(_matlab_version_tmp "") + endif() # set the version into the cache set(Matlab_VERSION_STRING_INTERNAL ${_matlab_version_tmp} CACHE INTERNAL "Matlab version (automatically determined)" FORCE) # warning, just in case several versions found (should not happen) - list(LENGTH matlab_list_of_all_versions list_of_all_versions_length) if((${list_of_all_versions_length} GREATER 1) AND MATLAB_FIND_DEBUG) message(WARNING "[MATLAB] Found several versions, taking the first one (versions found ${matlab_list_of_all_versions})") endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 8 ++++++-- Source/CMakeVersion.cmake | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:43:26 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:43:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1799-gf06dd2a Message-ID: <20160906124326.BDFC7F3C39@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, next has been updated via f06dd2a0451d2ad6546a1be7894a27f901a12577 (commit) via 62c5f9afc3bbe1e83ee63a1a8b9fe56b30c4849c (commit) from c5ad71bf6fb6db3530c060cd1d741c664b8e601a (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=f06dd2a0451d2ad6546a1be7894a27f901a12577 commit f06dd2a0451d2ad6546a1be7894a27f901a12577 Merge: c5ad71b 62c5f9a Author: Brad King AuthorDate: Tue Sep 6 08:43:25 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:43:25 2016 -0400 Merge topic 'qtdialog-tidy' into next 62c5f9af QtDialog: fix clang-tidy warnings https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62c5f9afc3bbe1e83ee63a1a8b9fe56b30c4849c commit 62c5f9afc3bbe1e83ee63a1a8b9fe56b30c4849c Author: Daniel Pfeifer AuthorDate: Mon Sep 5 22:12:36 2016 +0200 Commit: Brad King CommitDate: Tue Sep 6 08:42:54 2016 -0400 QtDialog: fix clang-tidy warnings diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx index dc7a4b0..a94c54b 100644 --- a/Source/QtDialog/AddCacheEntry.cxx +++ b/Source/QtDialog/AddCacheEntry.cxx @@ -64,7 +64,8 @@ QVariant AddCacheEntry::value() const QWidget* w = this->StackedWidget->currentWidget(); if (qobject_cast(w)) { return static_cast(w)->text(); - } else if (qobject_cast(w)) { + } + if (qobject_cast(w)) { return static_cast(w)->isChecked(); } return QVariant(); diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 5a8a5be..4de4bef 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -29,18 +29,19 @@ #include "cmSystemTools.h" // IWYU pragma: keep -static const char* cmDocumentationName[][2] = { { 0, +static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " cmake-gui - CMake GUI." }, - { 0, 0 } }; + { CM_NULLPTR, CM_NULLPTR } }; static const char* cmDocumentationUsage[][2] = { - { 0, " cmake-gui [options]\n" - " cmake-gui [options] \n" - " cmake-gui [options] " }, - { 0, 0 } + { CM_NULLPTR, " cmake-gui [options]\n" + " cmake-gui [options] \n" + " cmake-gui [options] " }, + { CM_NULLPTR, CM_NULLPTR } }; -static const char* cmDocumentationOptions[][2] = { { 0, 0 } }; +static const char* cmDocumentationOptions[] + [2] = { { CM_NULLPTR, CM_NULLPTR } }; #if defined(Q_OS_MAC) static int cmOSXInstall(std::string dir); diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index fda3e58..5b84597 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -41,7 +41,7 @@ QCMakeThread::QCMakeThread(QObject* p) : QThread(p) - , CMakeInstance(NULL) + , CMakeInstance(CM_NULLPTR) { } @@ -57,7 +57,7 @@ void QCMakeThread::run() emit this->cmakeInitialized(); this->exec(); delete this->CMakeInstance; - this->CMakeInstance = NULL; + this->CMakeInstance = CM_NULLPTR; } CMakeSetupDialog::CMakeSetupDialog() diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index bdb1962..276e2a5 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -3,6 +3,8 @@ #ifndef COMPILERS_HPP #define COMPILERS_HPP +#include + #include #include @@ -11,7 +13,7 @@ class Compilers : public QWidget, public Ui::Compilers { Q_OBJECT public: - Compilers(QWidget* p = NULL) + Compilers(QWidget* p = CM_NULLPTR) : QWidget(p) { this->setupUi(this); diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index ca5e3b5..c34751a 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -129,8 +129,9 @@ bool StartCompilerSetup::crossCompilerSetup() const void StartCompilerSetup::onSelectionChanged(bool on) { - if (on) + if (on) { selectionChanged(); + } } void StartCompilerSetup::onGeneratorChanged(QString const& name) @@ -144,12 +145,15 @@ void StartCompilerSetup::onGeneratorChanged(QString const& name) int StartCompilerSetup::nextId() const { - if (compilerSetup()) + if (compilerSetup()) { return NativeSetup; - if (crossCompilerSetup()) + } + if (crossCompilerSetup()) { return CrossSetup; - if (crossCompilerToolChainFile()) + } + if (crossCompilerToolChainFile()) { return ToolchainSetup; + } return -1; } @@ -515,7 +519,8 @@ QString FirstConfigure::getCCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getCCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getCCompiler(); } return QString(); @@ -525,7 +530,8 @@ QString FirstConfigure::getCXXCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getCXXCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getCXXCompiler(); } return QString(); @@ -535,7 +541,8 @@ QString FirstConfigure::getFortranCompiler() const { if (this->compilerSetup()) { return this->mNativeCompilerSetupPage->getFortranCompiler(); - } else if (this->crossCompilerSetup()) { + } + if (this->crossCompilerSetup()) { return this->mCrossCompilerSetupPage->getFortranCompiler(); } return QString(); diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index a818c6b..7eadb09 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -13,6 +13,8 @@ #ifndef QCMake_h #define QCMake_h +#include + #include "cmake.h" #ifdef _MSC_VER @@ -71,7 +73,7 @@ class QCMake : public QObject { Q_OBJECT public: - QCMake(QObject* p = 0); + QCMake(QObject* p = CM_NULLPTR); ~QCMake(); public slots: /// load the cache file in a directory diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index cc1f4aa..88ea049 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -33,7 +33,7 @@ public: } protected: - bool filterAcceptsRow(int row, const QModelIndex& p) const + bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE { QStringList strs; const QAbstractItemModel* m = this->sourceModel(); @@ -87,7 +87,7 @@ public: protected: bool ShowAdvanced; - bool filterAcceptsRow(int row, const QModelIndex& p) const + bool filterAcceptsRow(int row, const QModelIndex& p) const CM_OVERRIDE { const QAbstractItemModel* m = this->sourceModel(); QModelIndex idx = m->index(row, 0, p); @@ -160,7 +160,8 @@ QModelIndex QCMakeCacheView::moveCursor(CursorAction act, // want home/end to go to begin/end of rows, not columns if (act == MoveHome) { return this->model()->index(0, 1); - } else if (act == MoveEnd) { + } + if (act == MoveEnd) { return this->model()->index(this->model()->rowCount() - 1, 1); } return QTreeView::moveCursor(act, mod); @@ -538,15 +539,16 @@ void QCMakeCacheModelDelegate::setFileDialogFlag(bool f) this->FileDialogFlag = f; } -QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, - const QStyleOptionViewItem&, - const QModelIndex& idx) const +QWidget* QCMakeCacheModelDelegate::createEditor( + QWidget* p, const QStyleOptionViewItem& /*option*/, + const QModelIndex& idx) const { QModelIndex var = idx.sibling(idx.row(), 0); int type = var.data(QCMakeCacheModel::TypeRole).toInt(); if (type == QCMakeProperty::BOOL) { - return NULL; - } else if (type == QCMakeProperty::PATH) { + return CM_NULLPTR; + } + if (type == QCMakeProperty::PATH) { QCMakePathEditor* editor = new QCMakePathEditor(p, var.data(Qt::DisplayRole).toString()); QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, @@ -645,7 +647,7 @@ QSize QCMakeCacheModelDelegate::sizeHint(const QStyleOptionViewItem& option, QStyleOptionButton opt; opt.QStyleOption::operator=(option); sz = sz.expandedTo( - style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, NULL) + style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, CM_NULLPTR) .size()); return sz; diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx index 4b3eb34..fc481b8 100644 --- a/Source/QtDialog/QCMakeWidgets.cxx +++ b/Source/QtDialog/QCMakeWidgets.cxx @@ -67,7 +67,7 @@ void QCMakeFilePathEditor::chooseFile() this->fileDialogExists(true); path = QFileDialog::getOpenFileName(this, title, info.absolutePath(), QString(), - NULL, QFileDialog::DontResolveSymlinks); + CM_NULLPTR, QFileDialog::DontResolveSymlinks); this->fileDialogExists(false); if (!path.isEmpty()) { @@ -99,7 +99,7 @@ void QCMakePathEditor::chooseFile() // use same QDirModel for all completers static QDirModel* fileDirModel() { - static QDirModel* m = NULL; + static QDirModel* m = CM_NULLPTR; if (!m) { m = new QDirModel(); } @@ -107,7 +107,7 @@ static QDirModel* fileDirModel() } static QDirModel* pathDirModel() { - static QDirModel* m = NULL; + static QDirModel* m = CM_NULLPTR; if (!m) { m = new QDirModel(); m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot); diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h index f1e87ce..0d95e63 100644 --- a/Source/QtDialog/QCMakeWidgets.h +++ b/Source/QtDialog/QCMakeWidgets.h @@ -13,6 +13,8 @@ #ifndef QCMakeWidgets_h #define QCMakeWidgets_h +#include + #include #include #include @@ -43,7 +45,7 @@ class QCMakePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakePathEditor(QWidget* p = CM_NULLPTR, const QString& var = QString()); void chooseFile(); }; @@ -52,7 +54,8 @@ class QCMakeFilePathEditor : public QCMakeFileEditor { Q_OBJECT public: - QCMakeFilePathEditor(QWidget* p = NULL, const QString& var = QString()); + QCMakeFilePathEditor(QWidget* p = CM_NULLPTR, + const QString& var = QString()); void chooseFile(); }; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:50:52 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:50:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-864-g933fc4a Message-ID: <20160906125052.5B8DDF52D8@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 933fc4ac4708b79c23b4bb1a6c829af4efca7efa (commit) via 62c5f9afc3bbe1e83ee63a1a8b9fe56b30c4849c (commit) from 77279153953fb9e757481ac9eb299608f6f2aeba (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=933fc4ac4708b79c23b4bb1a6c829af4efca7efa commit 933fc4ac4708b79c23b4bb1a6c829af4efca7efa Merge: 7727915 62c5f9a Author: Brad King AuthorDate: Tue Sep 6 08:50:50 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:50:50 2016 -0400 Merge topic 'qtdialog-tidy' 62c5f9af QtDialog: fix clang-tidy warnings ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/AddCacheEntry.cxx | 3 ++- Source/QtDialog/CMakeSetup.cxx | 15 ++++++++------- Source/QtDialog/CMakeSetupDialog.cxx | 4 ++-- Source/QtDialog/Compilers.h | 4 +++- Source/QtDialog/FirstConfigure.cxx | 21 ++++++++++++++------- Source/QtDialog/QCMake.h | 4 +++- Source/QtDialog/QCMakeCacheView.cxx | 20 +++++++++++--------- Source/QtDialog/QCMakeWidgets.cxx | 6 +++--- Source/QtDialog/QCMakeWidgets.h | 7 +++++-- 9 files changed, 51 insertions(+), 33 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:50:54 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:50:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-866-geb226b3 Message-ID: <20160906125054.F22F4F5271@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 eb226b366f40da2d284bb60d57c2d8bcb85de607 (commit) via 0039ffa2163665856be1e772146442f2c7418c6c (commit) from 933fc4ac4708b79c23b4bb1a6c829af4efca7efa (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=eb226b366f40da2d284bb60d57c2d8bcb85de607 commit eb226b366f40da2d284bb60d57c2d8bcb85de607 Merge: 933fc4a 0039ffa Author: Brad King AuthorDate: Tue Sep 6 08:50:53 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:50:53 2016 -0400 Merge topic 'cm_nullptr' 0039ffa2 use CM_NULLPTR ----------------------------------------------------------------------- Summary of changes: Source/cmFilePathUuid.h | 5 +++-- Source/cmXMLParser.cxx | 12 ++++++------ Tests/CMakeLib/run_compile_commands.cxx | 3 ++- Tests/CMakeLib/testXMLSafe.cxx | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:50:57 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:50:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-868-g19255a3 Message-ID: <20160906125057.D7F0DF539C@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 19255a3516e230da77b18c051d89012bcabcd254 (commit) via 1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 (commit) from eb226b366f40da2d284bb60d57c2d8bcb85de607 (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=19255a3516e230da77b18c051d89012bcabcd254 commit 19255a3516e230da77b18c051d89012bcabcd254 Merge: eb226b3 1a9de80 Author: Brad King AuthorDate: Tue Sep 6 08:50:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:50:55 2016 -0400 Merge topic 'macro-parenthesis' 1a9de803 surround macro arguments with parentheses ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackArchiveGenerator.cxx | 8 ++++---- Source/CTest/cmCTestBuildHandler.cxx | 4 ++-- Source/cmCurl.cxx | 4 ++-- Source/cmDocumentation.cxx | 2 +- Source/cmGraphVizWriter.cxx | 4 ++-- Source/cmPolicies.cxx | 7 ++++--- Source/cmSystemTools.cxx | 2 +- Tests/CMakeLib/testGeneratedFileStream.cxx | 2 +- Tests/CMakeLib/testSystemTools.cxx | 4 ++-- 9 files changed, 19 insertions(+), 18 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:51:01 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:51:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-870-gcdc911d Message-ID: <20160906125101.1D733F52D8@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 cdc911dc53bca22ca56acf2b9a4a0d69e3120c9a (commit) via 4ffdd564eb32be6147cb8610bbf6c0b5496fc56a (commit) from 19255a3516e230da77b18c051d89012bcabcd254 (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=cdc911dc53bca22ca56acf2b9a4a0d69e3120c9a commit cdc911dc53bca22ca56acf2b9a4a0d69e3120c9a Merge: 19255a3 4ffdd56 Author: Brad King AuthorDate: Tue Sep 6 08:50:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:50:58 2016 -0400 Merge topic 'cpack-deb-long-filenames' 4ffdd564 CPack/DEB: Add option to select archive type ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cpack-deb-long-filenames.rst | 6 ++++ Modules/CPackDeb.cmake | 33 +++++++++++++++++++- Source/CPack/cmCPackDebGenerator.cxx | 12 +++++-- .../CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake | 5 +++ ....cmake => LONG_FILENAMES-Prerequirements.cmake} | 4 +-- .../CPack/DEB/LONG_FILENAMES-VerifyResult.cmake | 26 +++++++++++++++ ...cifics.cmake => LONG_FILENAMES-specifics.cmake} | 2 +- Tests/RunCMake/CPack/DEB/Prerequirements.cmake | 7 +++++ Tests/RunCMake/CPack/LONG_FILENAMES.cmake | 10 ++++++ Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + 10 files changed, 100 insertions(+), 6 deletions(-) create mode 100644 Help/release/dev/cpack-deb-long-filenames.rst create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-ExpectedFiles.cmake copy Tests/RunCMake/CPack/DEB/{DEB_GENERATE_SHLIBS-Prerequirements.cmake => LONG_FILENAMES-Prerequirements.cmake} (58%) create mode 100644 Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake copy Tests/RunCMake/CPack/DEB/{COMPONENTS_EMPTY_DIR-specifics.cmake => LONG_FILENAMES-specifics.cmake} (66%) create mode 100644 Tests/RunCMake/CPack/LONG_FILENAMES.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:51:04 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:51:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-874-g9109ba4 Message-ID: <20160906125104.B9136F52D8@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 9109ba434782a3514f1bc6a5fd3c063d231008f2 (commit) via 72ecdd34cf6dbec293fe020e1aeed0a17a499061 (commit) via fc3dab0ea956db618fe2b77778ac413db846b422 (commit) via 4feba34d02fe42fd20209e5b247f91d8e0f7a2ac (commit) from cdc911dc53bca22ca56acf2b9a4a0d69e3120c9a (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=9109ba434782a3514f1bc6a5fd3c063d231008f2 commit 9109ba434782a3514f1bc6a5fd3c063d231008f2 Merge: cdc911d 72ecdd3 Author: Brad King AuthorDate: Tue Sep 6 08:51:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:51:01 2016 -0400 Merge topic 'test-GenerateExportHeader-with-RunCMake' 72ecdd34 Tests: Cleanup RunCMake.GenerateExportHeader somewhat fc3dab0e Tests: Port GenerateExportHeader test to RunCMake infrastructure 4feba34d GNU: Do not use -fvisibility on AIX or HP-UX ----------------------------------------------------------------------- Summary of changes: Modules/Platform/AIX-GNU-CXX.cmake | 1 + Modules/Platform/AIX-GNU.cmake | 1 + Modules/Platform/HP-UX-GNU-CXX.cmake | 1 + Modules/Platform/HP-UX-GNU.cmake | 1 + Tests/CMakeLists.txt | 1 - Tests/RunCMake/CMakeLists.txt | 3 ++ .../CMakeLists.txt | 0 .../GEH-build-stderr.txt} | 0 .../GenerateExportHeader/GEH.cmake} | 32 ++++++-------------- .../GenerateExportHeader/RunCMakeTest.cmake | 17 +++++++++++ .../c_identifier/CMakeLists.txt | 2 -- .../c_identifier/c_identifier_class.cpp | 0 .../c_identifier/c_identifier_class.h | 0 .../GenerateExportHeader/c_identifier/main.cpp | 2 +- .../GenerateExportHeader/exportheader_test.cpp | 0 .../lib_shared_and_static/CMakeLists.txt | 7 +---- .../lib_shared_and_static/libshared_and_static.cpp | 0 .../lib_shared_and_static/libshared_and_static.h | 0 .../GenerateExportHeader/libshared/CMakeLists.txt | 5 --- .../GenerateExportHeader/libshared/libshared.cpp | 0 .../GenerateExportHeader/libshared/libshared.h | 0 .../GenerateExportHeader/libstatic/CMakeLists.txt | 5 --- .../GenerateExportHeader/libstatic/libstatic.cpp | 0 .../GenerateExportHeader/libstatic/libstatic.h | 0 .../nodeprecated/CMakeLists.txt | 6 +--- .../nodeprecated/CMakeLists.txt.in | 2 +- .../GenerateExportHeader/nodeprecated/src/main.cpp | 2 +- .../nodeprecated/src/someclass.cpp | 0 .../nodeprecated/src/someclass.h | 0 .../reference/Empty/libshared_export.h | 0 .../reference/Empty/libstatic_export.h | 0 .../reference/MinGW/libshared_export.h | 0 .../reference/MinGW/libstatic_export.h | 0 .../reference/UNIX/libshared_export.h | 0 .../reference/UNIX/libstatic_export.h | 0 .../UNIX_DeprecatedOnly/libshared_export.h | 0 .../UNIX_DeprecatedOnly/libstatic_export.h | 0 .../reference/Win32-Clang/libshared_export.h | 0 .../reference/Win32-Clang/libstatic_export.h | 0 .../reference/Win32/libshared_export.h | 0 .../reference/Win32/libstatic_export.h | 0 .../reference/WinEmpty/libshared_export.h | 0 .../reference/WinEmpty/libstatic_export.h | 0 Utilities/Scripts/clang-format.bash | 2 +- 44 files changed, 39 insertions(+), 51 deletions(-) copy Tests/RunCMake/{Android => GenerateExportHeader}/CMakeLists.txt (100%) copy Tests/RunCMake/{file/LOCK-error-timeout-stdout.txt => GenerateExportHeader/GEH-build-stderr.txt} (100%) rename Tests/{Module/GenerateExportHeader/CMakeLists.txt => RunCMake/GenerateExportHeader/GEH.cmake} (80%) create mode 100644 Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/CMakeLists.txt (92%) rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/c_identifier_class.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/c_identifier_class.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/c_identifier/main.cpp (73%) rename Tests/{Module => RunCMake}/GenerateExportHeader/exportheader_test.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt (84%) rename Tests/{Module => RunCMake}/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libshared/CMakeLists.txt (79%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libshared/libshared.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libshared/libshared.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libstatic/CMakeLists.txt (83%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libstatic/libstatic.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/libstatic/libstatic.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/CMakeLists.txt (89%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/CMakeLists.txt.in (89%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/main.cpp (77%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/someclass.cpp (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/nodeprecated/src/someclass.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Empty/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Empty/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/MinGW/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/MinGW/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32-Clang/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/Win32/libstatic_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/WinEmpty/libshared_export.h (100%) rename Tests/{Module => RunCMake}/GenerateExportHeader/reference/WinEmpty/libstatic_export.h (100%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:51:07 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:51:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-876-g8317ea0 Message-ID: <20160906125107.E0E01F5385@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 8317ea01aa3cf9319ef907e127fa6dbf9666cc53 (commit) via f6fd0abc5bbfa7d677cd090ba8e2894d96afdde8 (commit) from 9109ba434782a3514f1bc6a5fd3c063d231008f2 (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=8317ea01aa3cf9319ef907e127fa6dbf9666cc53 commit 8317ea01aa3cf9319ef907e127fa6dbf9666cc53 Merge: 9109ba4 f6fd0ab Author: Brad King AuthorDate: Tue Sep 6 08:51:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:51:05 2016 -0400 Merge topic 'genex-LINK_ONLY-not-linking' f6fd0abc Genex: Diagnose invalid LINK_ONLY usage instead of crashing ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpressionNode.cxx | 11 ++++++++--- .../LINK_ONLY-not-linking-result.txt} | 0 .../GeneratorExpression/LINK_ONLY-not-linking-stderr.txt | 8 ++++++++ .../GeneratorExpression/LINK_ONLY-not-linking.cmake | 1 + Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake | 1 + 5 files changed, 18 insertions(+), 3 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorExpression/LINK_ONLY-not-linking-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking-stderr.txt create mode 100644 Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:51:26 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:51:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1806-g85ce7bb Message-ID: <20160906125126.51FB6F5385@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, next has been updated via 85ce7bb6a15ad2d2b13635c04806ed62b2a1c32e (commit) via 8317ea01aa3cf9319ef907e127fa6dbf9666cc53 (commit) via 9109ba434782a3514f1bc6a5fd3c063d231008f2 (commit) via cdc911dc53bca22ca56acf2b9a4a0d69e3120c9a (commit) via 19255a3516e230da77b18c051d89012bcabcd254 (commit) via eb226b366f40da2d284bb60d57c2d8bcb85de607 (commit) via 933fc4ac4708b79c23b4bb1a6c829af4efca7efa (commit) from f06dd2a0451d2ad6546a1be7894a27f901a12577 (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=85ce7bb6a15ad2d2b13635c04806ed62b2a1c32e commit 85ce7bb6a15ad2d2b13635c04806ed62b2a1c32e Merge: f06dd2a 8317ea0 Author: Brad King AuthorDate: Tue Sep 6 08:51:18 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 08:51:18 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 08:55:33 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 08:55:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1808-gb1590ed Message-ID: <20160906125533.A8D1EF58FD@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, next has been updated via b1590ed97f354ba39106a56656fd5829395a0fdf (commit) via 13ecb9960b84fe12059630e8e677eff6ee9f1715 (commit) from 85ce7bb6a15ad2d2b13635c04806ed62b2a1c32e (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=b1590ed97f354ba39106a56656fd5829395a0fdf commit b1590ed97f354ba39106a56656fd5829395a0fdf Merge: 85ce7bb 13ecb99 Author: Brad King AuthorDate: Tue Sep 6 08:55:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 08:55:32 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next 13ecb996 Revert topic 'cpack-deb-package-description-fallback' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13ecb9960b84fe12059630e8e677eff6ee9f1715 commit 13ecb9960b84fe12059630e8e677eff6ee9f1715 Author: Brad King AuthorDate: Tue Sep 6 08:55:15 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 08:55:15 2016 -0400 Revert topic 'cpack-deb-package-description-fallback' diff --git a/Help/release/dev/cpack-deb-package-description-fallback b/Help/release/dev/cpack-deb-package-description-fallback deleted file mode 100644 index 6300dfc..0000000 --- a/Help/release/dev/cpack-deb-package-description-fallback +++ /dev/null @@ -1,11 +0,0 @@ -cpack-deb-package-description-fallback --------------------------------------- - -* The :module:`CPackDeb` module learned new package description - override rules to match :module:`CPackRPM` module behavior. - **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` - variable is set to non default location then it is prefered to - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable. - Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION` - was introduced for component based packaging. - See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 25c25ae..c9678d6 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -156,19 +156,16 @@ # * Default : :code:`CPACK_PACKAGE_CONTACT` # # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION -# CPACK_DEBIAN__PACKAGE_DESCRIPTION +# CPACK_COMPONENT__DESCRIPTION # # The Debian package description # # * Mandatory : YES # * Default : # -# - :variable:`CPACK_COMPONENT__DESCRIPTION` (component -# based installers only) if set, -# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location, -# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set, -# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set, -# - or "no package description available" +# - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or +# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` +# # # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION # CPACK_DEBIAN__PACKAGE_SECTION @@ -814,23 +811,24 @@ function(cpack_deb_prepare_package_vars) endif() # Description: (mandatory) - if(CPACK_DEB_PACKAGE_COMPONENT) - if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION) - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}") - elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}") + if(NOT CPACK_DEB_PACKAGE_COMPONENT) + if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) + message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION") + endif() + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) endif() - endif() - - if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(CPACK_PACKAGE_DESCRIPTION_FILE AND NOT "${CPACK_PACKAGE_DESCRIPTION_FILE}" STREQUAL "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") - file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) - elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY) - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") - elseif(CPACK_PACKAGE_DESCRIPTION_FILE) # use default package description file content - file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) - else() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "no package description available") + else() + set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) + + # component description overrides package description + if(${component_description_var}) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}}) + elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) + message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_description_var}") + endif() + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) endif() endif() diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in index 6c5a655..74d816c 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in @@ -15,8 +15,8 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) #set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) # overriding previous descriptions -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") -set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_DESCRIPTION "applications_description") -set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") +set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "applications_description") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") # libraries does not have any description and should inherit from CPACK_PACKAGE_DESCRIPTION_SUMMARY unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in index 92226d8..cda79bc 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in @@ -17,12 +17,10 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) # overriding previous descriptions set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description 2") -# and override CPACK_PACKAGE_DESCRIPTION_SUMMARY because of precedence -set(CPACK_PACKAGE_DESCRIPTION_FILE - "@CPackComponentsDEB_SOURCE_DIR@/pkg_description.txt") - # Components do not have any description unset(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION) unset(CPACK_COMPONENT_HEADERS_DESCRIPTION) +unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) + set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "library description") diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake index 7b94ca0..35ca74c 100644 --- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake +++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake @@ -55,12 +55,12 @@ if(DPKGDEB_EXECUTABLE) message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'") if("${dpkg_package_name}" STREQUAL "mylib-applications") - if(NOT "${dpkg_description}" STREQUAL "Debian package description file") + if(NOT "${dpkg_description}" STREQUAL "main description 2") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description") endif() elseif("${dpkg_package_name}" STREQUAL "mylib-headers") - if(NOT "${dpkg_description}" STREQUAL "Debian package description file") + if(NOT "${dpkg_description}" STREQUAL "main description 2") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description") endif() diff --git a/Tests/CPackComponentsDEB/pkg_description.txt b/Tests/CPackComponentsDEB/pkg_description.txt deleted file mode 100644 index 99f8f9b..0000000 --- a/Tests/CPackComponentsDEB/pkg_description.txt +++ /dev/null @@ -1 +0,0 @@ -Debian package description file ----------------------------------------------------------------------- Summary of changes: .../dev/cpack-deb-package-description-fallback | 11 ----- Modules/CPackDeb.cmake | 44 ++++++++++---------- ...LibCPackConfig-components-description1.cmake.in | 6 +-- ...LibCPackConfig-components-description2.cmake.in | 6 +-- ...CPackVerifyResult-components-description2.cmake | 4 +- Tests/CPackComponentsDEB/pkg_description.txt | 1 - 6 files changed, 28 insertions(+), 44 deletions(-) delete mode 100644 Help/release/dev/cpack-deb-package-description-fallback delete mode 100644 Tests/CPackComponentsDEB/pkg_description.txt hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 10:27:12 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 10:27:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1811-g2465396 Message-ID: <20160906142712.5BC4FF581A@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, next has been updated via 246539626a1dc8558202bd0b9a343b3e0af1f426 (commit) via 042aca557defd72d7205becb7e54c9f93793b496 (commit) via a756c74da58196f670633c1d08840dc6e3d62fea (commit) from b1590ed97f354ba39106a56656fd5829395a0fdf (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=246539626a1dc8558202bd0b9a343b3e0af1f426 commit 246539626a1dc8558202bd0b9a343b3e0af1f426 Merge: b1590ed 042aca5 Author: Brad King AuthorDate: Tue Sep 6 10:27:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 10:27:11 2016 -0400 Merge topic 'vs-minor-cleanups' into next 042aca55 VS: Verify that MSBuild.exe and devenv.com exist before using them a756c74d Help: Clarify meaning of MSVC variables https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=042aca557defd72d7205becb7e54c9f93793b496 commit 042aca557defd72d7205becb7e54c9f93793b496 Author: Brad King AuthorDate: Tue Sep 6 09:50:00 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 10:22:39 2016 -0400 VS: Verify that MSBuild.exe and devenv.com exist before using them diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 819feb1..ab87d67 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -350,16 +350,22 @@ std::string const& cmGlobalVisualStudio10Generator::GetMSBuildCommand() std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand() { std::string msbuild; - std::string mskey = - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\"; + std::string mskey; + + // Search in standard location. + mskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\"; mskey += this->GetToolsVersion(); mskey += ";MSBuildToolsPath"; if (cmSystemTools::ReadRegistryValue(mskey.c_str(), msbuild, cmSystemTools::KeyWOW64_32)) { cmSystemTools::ConvertToUnixSlashes(msbuild); - msbuild += "/"; + msbuild += "/MSBuild.exe"; + if (cmSystemTools::FileExists(msbuild, true)) { + return msbuild; + } } - msbuild += "MSBuild.exe"; + + msbuild = "MSBuild.exe"; return msbuild; } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 08be304..8d3964f 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -150,13 +150,20 @@ std::string const& cmGlobalVisualStudio7Generator::GetDevEnvCommand() std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand() { std::string vscmd; - std::string vskey = this->GetRegistryBase() + ";InstallDir"; + std::string vskey; + + // Search in standard location. + vskey = this->GetRegistryBase() + ";InstallDir"; if (cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd, cmSystemTools::KeyWOW64_32)) { cmSystemTools::ConvertToUnixSlashes(vscmd); - vscmd += "/"; + vscmd += "/devenv.com"; + if (cmSystemTools::FileExists(vscmd, true)) { + return vscmd; + } } - vscmd += "devenv.com"; + + vscmd = "devenv.com"; return vscmd; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a756c74da58196f670633c1d08840dc6e3d62fea commit a756c74da58196f670633c1d08840dc6e3d62fea Author: Brad King AuthorDate: Fri Sep 2 15:49:18 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 10:22:38 2016 -0400 Help: Clarify meaning of MSVC variables They correspond to toolsets, not VS IDE versions. diff --git a/Help/variable/MSVC10.rst b/Help/variable/MSVC10.rst index 33692ad..98e0493 100644 --- a/Help/variable/MSVC10.rst +++ b/Help/variable/MSVC10.rst @@ -1,6 +1,5 @@ MSVC10 ------ -``True`` when using Microsoft Visual C++ 10.0 - -Set to ``true`` when the compiler is version 10.0 of Microsoft Visual C++. +``True`` when using the Microsoft Visual Studio ``v100`` toolset +(``cl`` version 16) or another compiler that simulates it. diff --git a/Help/variable/MSVC11.rst b/Help/variable/MSVC11.rst index 3ab606d..42b7b86 100644 --- a/Help/variable/MSVC11.rst +++ b/Help/variable/MSVC11.rst @@ -1,6 +1,5 @@ MSVC11 ------ -``True`` when using Microsoft Visual C++ 11.0 - -Set to ``true`` when the compiler is version 11.0 of Microsoft Visual C++. +``True`` when using the Microsoft Visual Studio ``v110`` toolset +(``cl`` version 17) or another compiler that simulates it. diff --git a/Help/variable/MSVC12.rst b/Help/variable/MSVC12.rst index 15fa64b..0648f35 100644 --- a/Help/variable/MSVC12.rst +++ b/Help/variable/MSVC12.rst @@ -1,6 +1,5 @@ MSVC12 ------ -``True`` when using Microsoft Visual C++ 12.0. - -Set to ``true`` when the compiler is version 12.0 of Microsoft Visual C++. +``True`` when using the Microsoft Visual Studio ``v120`` toolset +(``cl`` version 18) or another compiler that simulates it. diff --git a/Help/variable/MSVC14.rst b/Help/variable/MSVC14.rst index 0b9125d..f67ebc7 100644 --- a/Help/variable/MSVC14.rst +++ b/Help/variable/MSVC14.rst @@ -1,6 +1,5 @@ MSVC14 ------ -``True`` when using Microsoft Visual C++ 14.0. - -Set to ``true`` when the compiler is version 14.0 of Microsoft Visual C++. +``True`` when using the Microsoft Visual Studio ``v140`` toolset +(``cl`` version 19) or another compiler that simulates it. diff --git a/Help/variable/MSVC80.rst b/Help/variable/MSVC80.rst index b17777c..0d33e82 100644 --- a/Help/variable/MSVC80.rst +++ b/Help/variable/MSVC80.rst @@ -1,6 +1,5 @@ MSVC80 ------ -``True`` when using Microsoft Visual C++ 8.0. - -Set to ``true`` when the compiler is version 8.0 of Microsoft Visual C++. +``True`` when using the Microsoft Visual Studio ``v80`` toolset +(``cl`` version 14) or another compiler that simulates it. diff --git a/Help/variable/MSVC90.rst b/Help/variable/MSVC90.rst index 7162d6c..1716e6f 100644 --- a/Help/variable/MSVC90.rst +++ b/Help/variable/MSVC90.rst @@ -1,6 +1,5 @@ MSVC90 ------ -``True`` when using Microsoft Visual C++ 9.0. - -Set to ``true`` when the compiler is version 9.0 of Microsoft Visual C++. +``True`` when using the Microsoft Visual Studio ``v90`` toolset +(``cl`` version 15) or another compiler that simulates it. ----------------------------------------------------------------------- Summary of changes: Help/variable/MSVC10.rst | 5 ++--- Help/variable/MSVC11.rst | 5 ++--- Help/variable/MSVC12.rst | 5 ++--- Help/variable/MSVC14.rst | 5 ++--- Help/variable/MSVC80.rst | 5 ++--- Help/variable/MSVC90.rst | 5 ++--- Source/cmGlobalVisualStudio10Generator.cxx | 14 ++++++++++---- Source/cmGlobalVisualStudio7Generator.cxx | 13 ++++++++++--- 8 files changed, 32 insertions(+), 25 deletions(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Tue Sep 6 11:45:59 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Tue, 6 Sep 2016 11:45:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1813-gd7cc684 Message-ID: <20160906154559.D2EF7F483E@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, next has been updated via d7cc6846e9bfce3f59161ee1485b181039276d6a (commit) via 1bc33257d48bb4b54333b755951967c6c3fa1df6 (commit) from 246539626a1dc8558202bd0b9a343b3e0af1f426 (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=d7cc6846e9bfce3f59161ee1485b181039276d6a commit d7cc6846e9bfce3f59161ee1485b181039276d6a Merge: 2465396 1bc3325 Author: Nils Gladitz AuthorDate: Tue Sep 6 11:45:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 11:45:58 2016 -0400 Merge topic 'wix-fix-static-prefix' into next 1bc33257 CPackWIX: Fix incomplete CPACK_WIX_SKIP_PROGRAM_FOLDER implementation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1bc33257d48bb4b54333b755951967c6c3fa1df6 commit 1bc33257d48bb4b54333b755951967c6c3fa1df6 Author: Michael St?rmer AuthorDate: Tue Sep 6 12:11:00 2016 +0200 Commit: Nils Gladitz CommitDate: Tue Sep 6 17:44:48 2016 +0200 CPackWIX: Fix incomplete CPACK_WIX_SKIP_PROGRAM_FOLDER implementation Commit 17bbf6af (CPackWIX: Implement new CPACK_WIX_SKIP_PROGRAM_FOLDER feature) generates GUIDs for most but not all components when the feature is active. Generate the remaining GUIDs as well. Co-Author: Nils Gladitz diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index d7f69a1..85e0ae3 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -35,6 +35,7 @@ cmCPackWIXGenerator::cmCPackWIXGenerator() : Patch(0) + , ComponentGuidType(cmWIXSourceWriter::WIX_GENERATED_GUID) { } @@ -234,6 +235,12 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration() } } + // if install folder is supposed to be set absolutely, the default + // component guid "*" cannot be used + if (cmSystemTools::IsOn(GetOption("CPACK_WIX_SKIP_PROGRAM_FOLDER"))) { + this->ComponentGuidType = cmWIXSourceWriter::CMAKE_GENERATED_GUID; + } + return true; } @@ -317,7 +324,9 @@ void cmCPackWIXGenerator::CreateWiXVariablesIncludeFile() { std::string includeFilename = this->CPackTopLevel + "/cpack_variables.wxi"; - cmWIXSourceWriter includeFile(this->Logger, includeFilename, true); + cmWIXSourceWriter includeFile(this->Logger, includeFilename, + this->ComponentGuidType, + cmWIXSourceWriter::INCLUDE_ELEMENT_ROOT); CopyDefinition(includeFile, "CPACK_WIX_PRODUCT_GUID"); CopyDefinition(includeFile, "CPACK_WIX_UPGRADE_GUID"); @@ -338,7 +347,9 @@ void cmCPackWIXGenerator::CreateWiXPropertiesIncludeFile() { std::string includeFilename = this->CPackTopLevel + "/properties.wxi"; - cmWIXSourceWriter includeFile(this->Logger, includeFilename, true); + cmWIXSourceWriter includeFile(this->Logger, includeFilename, + this->ComponentGuidType, + cmWIXSourceWriter::INCLUDE_ELEMENT_ROOT); std::string prefix = "CPACK_WIX_PROPERTY_"; std::vector options = GetOptions(); @@ -386,7 +397,9 @@ void cmCPackWIXGenerator::CreateWiXProductFragmentIncludeFile() { std::string includeFilename = this->CPackTopLevel + "/product_fragment.wxi"; - cmWIXSourceWriter includeFile(this->Logger, includeFilename, true); + cmWIXSourceWriter includeFile(this->Logger, includeFilename, + this->ComponentGuidType, + cmWIXSourceWriter::INCLUDE_ELEMENT_ROOT); this->Patch->ApplyFragment("#PRODUCT", includeFile); } @@ -413,13 +426,15 @@ void cmCPackWIXGenerator::AddDefinition(cmWIXSourceWriter& source, bool cmCPackWIXGenerator::CreateWiXSourceFiles() { + // if install folder is supposed to be set absolutely, the default + // component guid "*" cannot be used std::string directoryDefinitionsFilename = this->CPackTopLevel + "/directories.wxs"; this->WixSources.push_back(directoryDefinitionsFilename); cmWIXDirectoriesSourceWriter directoryDefinitions( - this->Logger, directoryDefinitionsFilename); + this->Logger, directoryDefinitionsFilename, this->ComponentGuidType); directoryDefinitions.BeginElement("Fragment"); std::string installRoot; @@ -439,13 +454,8 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles() this->WixSources.push_back(fileDefinitionsFilename); - cmWIXFilesSourceWriter fileDefinitions(this->Logger, - fileDefinitionsFilename); - - // if install folder is supposed to be set absolutely, the default - // component guid "*" cannot be used - fileDefinitions.GenerateComponentGuids = - cmSystemTools::IsOn(GetOption("CPACK_WIX_SKIP_PROGRAM_FOLDER")); + cmWIXFilesSourceWriter fileDefinitions(this->Logger, fileDefinitionsFilename, + this->ComponentGuidType); fileDefinitions.BeginElement("Fragment"); @@ -454,8 +464,8 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles() this->WixSources.push_back(featureDefinitionsFilename); - cmWIXFeaturesSourceWriter featureDefinitions(this->Logger, - featureDefinitionsFilename); + cmWIXFeaturesSourceWriter featureDefinitions( + this->Logger, featureDefinitionsFilename, this->ComponentGuidType); featureDefinitions.BeginElement("Fragment"); @@ -764,7 +774,8 @@ bool cmCPackWIXGenerator::CreateShortcutsOfSpecificType( fileDefinitions.BeginElement("Component"); fileDefinitions.AddAttribute("Id", componentId); - fileDefinitions.AddAttribute("Guid", "*"); + fileDefinitions.AddAttribute( + "Guid", fileDefinitions.CreateGuidFromComponentId(componentId)); this->Patch->ApplyFragment(componentId, fileDefinitions); diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h index 9d3a522..883df9a 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.h +++ b/Source/CPack/WiX/cmCPackWIXGenerator.h @@ -162,6 +162,8 @@ private: std::string CPackTopLevel; cmWIXPatch* Patch; + + cmWIXSourceWriter::GuidType ComponentGuidType; }; #endif diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx index 97e3a51..9704195 100644 --- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx @@ -13,8 +13,8 @@ #include "cmWIXDirectoriesSourceWriter.h" cmWIXDirectoriesSourceWriter::cmWIXDirectoriesSourceWriter( - cmCPackLog* logger, std::string const& filename) - : cmWIXSourceWriter(logger, filename) + cmCPackLog* logger, std::string const& filename, GuidType componentGuidType) + : cmWIXSourceWriter(logger, filename, componentGuidType) { } diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h index 023f4b8..6ebe281 100644 --- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h @@ -25,8 +25,8 @@ class cmWIXDirectoriesSourceWriter : public cmWIXSourceWriter { public: - cmWIXDirectoriesSourceWriter(cmCPackLog* logger, - std::string const& filename); + cmWIXDirectoriesSourceWriter(cmCPackLog* logger, std::string const& filename, + GuidType componentGuidType); void EmitStartMenuFolder(std::string const& startMenuFolder); diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx index 1747b62..7794935 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx @@ -13,8 +13,8 @@ #include "cmWIXFeaturesSourceWriter.h" cmWIXFeaturesSourceWriter::cmWIXFeaturesSourceWriter( - cmCPackLog* logger, std::string const& filename) - : cmWIXSourceWriter(logger, filename) + cmCPackLog* logger, std::string const& filename, GuidType componentGuidType) + : cmWIXSourceWriter(logger, filename, componentGuidType) { } @@ -24,7 +24,7 @@ void cmWIXFeaturesSourceWriter::CreateCMakePackageRegistryEntry( BeginElement("Component"); AddAttribute("Id", "CM_PACKAGE_REGISTRY"); AddAttribute("Directory", "TARGETDIR"); - AddAttribute("Guid", "*"); + AddAttribute("Guid", CreateGuidFromComponentId("CM_PACKAGE_REGISTRY")); std::string registryKey = std::string("Software\\Kitware\\CMake\\Packages\\") + package; diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h index ee9c17a..9974b63 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h @@ -23,7 +23,8 @@ class cmWIXFeaturesSourceWriter : public cmWIXSourceWriter { public: - cmWIXFeaturesSourceWriter(cmCPackLog* logger, std::string const& filename); + cmWIXFeaturesSourceWriter(cmCPackLog* logger, std::string const& filename, + GuidType componentGuidType); void CreateCMakePackageRegistryEntry(std::string const& package, std::string const& upgradeGuid); diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx index dde9635..846edde 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx @@ -24,9 +24,9 @@ #include cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger, - std::string const& filename) - : cmWIXSourceWriter(logger, filename) - , GenerateComponentGuids(false) + std::string const& filename, + GuidType componentGuidType) + : cmWIXSourceWriter(logger, filename, componentGuidType) { } @@ -130,13 +130,7 @@ std::string cmWIXFilesSourceWriter::EmitComponentFile( std::string componentId = std::string("CM_C") + id; std::string fileId = std::string("CM_F") + id; - std::string guid = "*"; - if (this->GenerateComponentGuids) { - std::string md5 = cmSystemTools::ComputeStringMD5(componentId); - cmUuid uuid; - std::vector ns; - guid = uuid.FromMd5(ns, md5); - } + std::string guid = CreateGuidFromComponentId(componentId); BeginElement("DirectoryRef"); AddAttribute("Id", directoryId); diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.h b/Source/CPack/WiX/cmWIXFilesSourceWriter.h index eeb84cb..c1952af 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.h @@ -26,7 +26,8 @@ class cmWIXFilesSourceWriter : public cmWIXSourceWriter { public: - cmWIXFilesSourceWriter(cmCPackLog* logger, std::string const& filename); + cmWIXFilesSourceWriter(cmCPackLog* logger, std::string const& filename, + GuidType componentGuidType); void EmitShortcut(std::string const& id, cmWIXShortcut const& shortcut, std::string const& shortcutPrefix, size_t shortcutIndex); @@ -47,8 +48,6 @@ public: std::string const& id, std::string const& filePath, cmWIXPatch& patch, cmInstalledFile const* installedFile); - - bool GenerateComponentGuids; }; #endif diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx index 2c0384e..a287424 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx @@ -14,19 +14,23 @@ #include +#include + #include cmWIXSourceWriter::cmWIXSourceWriter(cmCPackLog* logger, std::string const& filename, - bool isIncludeFile) + GuidType componentGuidType, + RootElementType rootElementType) : Logger(logger) , File(filename.c_str()) , State(DEFAULT) , SourceFilename(filename) + , ComponentGuidType(componentGuidType) { WriteXMLDeclaration(); - if (isIncludeFile) { + if (rootElementType == INCLUDE_ELEMENT_ROOT) { BeginElement("Include"); } else { BeginElement("Wix"); @@ -173,6 +177,19 @@ std::string cmWIXSourceWriter::CMakeEncodingToUtf8(std::string const& value) #endif } +std::string cmWIXSourceWriter::CreateGuidFromComponentId( + std::string const& componentId) +{ + std::string guid = "*"; + if (this->ComponentGuidType == CMAKE_GENERATED_GUID) { + std::string md5 = cmSystemTools::ComputeStringMD5(componentId); + cmUuid uuid; + std::vector ns; + guid = uuid.FromMd5(ns, md5); + } + return guid; +} + void cmWIXSourceWriter::WriteXMLDeclaration() { File << "" << std::endl; diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h index 4efc026..c29ffa7 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.h +++ b/Source/CPack/WiX/cmWIXSourceWriter.h @@ -26,8 +26,21 @@ class cmWIXSourceWriter { public: + enum GuidType + { + WIX_GENERATED_GUID, + CMAKE_GENERATED_GUID + }; + + enum RootElementType + { + WIX_ELEMENT_ROOT, + INCLUDE_ELEMENT_ROOT + }; + cmWIXSourceWriter(cmCPackLog* logger, std::string const& filename, - bool isIncludeFile = false); + GuidType componentGuidType, + RootElementType rootElementType = WIX_ELEMENT_ROOT); ~cmWIXSourceWriter(); @@ -45,6 +58,8 @@ public: void AddAttributeUnlessEmpty(std::string const& key, std::string const& value); + std::string CreateGuidFromComponentId(std::string const& componentId); + static std::string CMakeEncodingToUtf8(std::string const& value); protected: @@ -70,6 +85,8 @@ private: std::vector Elements; std::string SourceFilename; + + GuidType ComponentGuidType; }; #endif ----------------------------------------------------------------------- Summary of changes: Source/CPack/WiX/cmCPackWIXGenerator.cxx | 39 +++++++++++++-------- Source/CPack/WiX/cmCPackWIXGenerator.h | 2 ++ Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx | 4 +-- Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h | 4 +-- Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx | 6 ++-- Source/CPack/WiX/cmWIXFeaturesSourceWriter.h | 3 +- Source/CPack/WiX/cmWIXFilesSourceWriter.cxx | 14 +++----- Source/CPack/WiX/cmWIXFilesSourceWriter.h | 5 ++- Source/CPack/WiX/cmWIXSourceWriter.cxx | 21 +++++++++-- Source/CPack/WiX/cmWIXSourceWriter.h | 19 +++++++++- 10 files changed, 79 insertions(+), 38 deletions(-) hooks/post-receive -- CMake From domen.vrankar at gmail.com Tue Sep 6 13:41:39 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 6 Sep 2016 13:41:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1815-g345e669 Message-ID: <20160906174139.8C71AE21A4@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, next has been updated via 345e669b0663a23876c815d46463ea90685bd110 (commit) via 9afe1ed94c46071b5ec0b3ef288493d355de75db (commit) from d7cc6846e9bfce3f59161ee1485b181039276d6a (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=345e669b0663a23876c815d46463ea90685bd110 commit 345e669b0663a23876c815d46463ea90685bd110 Merge: d7cc684 9afe1ed Author: Domen Vrankar AuthorDate: Tue Sep 6 13:41:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 13:41:38 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next 9afe1ed9 cpack-deb-package-description-fallback https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9afe1ed94c46071b5ec0b3ef288493d355de75db commit 9afe1ed94c46071b5ec0b3ef288493d355de75db Author: Domen Vrankar AuthorDate: Mon Sep 5 23:58:33 2016 +0200 Commit: Domen Vrankar CommitDate: Tue Sep 6 19:39:43 2016 +0200 cpack-deb-package-description-fallback Breaking change of fallback variable precedence for CPACK_DEBIAN_PACKAGE_DESCRIPTION that matches CPackRPM behavior as much as possible. Closes: #16272 diff --git a/Help/release/dev/cpack-deb-package-description-fallback b/Help/release/dev/cpack-deb-package-description-fallback new file mode 100644 index 0000000..6300dfc --- /dev/null +++ b/Help/release/dev/cpack-deb-package-description-fallback @@ -0,0 +1,11 @@ +cpack-deb-package-description-fallback +-------------------------------------- + +* The :module:`CPackDeb` module learned new package description + override rules to match :module:`CPackRPM` module behavior. + **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` + variable is set to non default location then it is prefered to + :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable. + Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION` + was introduced for component based packaging. + See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 1a7b923..1032dfc 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -156,16 +156,19 @@ # * Default : :code:`CPACK_PACKAGE_CONTACT` # # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION -# CPACK_COMPONENT__DESCRIPTION +# CPACK_DEBIAN__PACKAGE_DESCRIPTION # # The Debian package description # # * Mandatory : YES # * Default : # -# - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or -# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` -# +# - :variable:`CPACK_COMPONENT__DESCRIPTION` (component +# based installers only) if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set, +# - or "no package description available" # # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION # CPACK_DEBIAN__PACKAGE_SECTION @@ -829,24 +832,23 @@ function(cpack_deb_prepare_package_vars) endif() # Description: (mandatory) - if(NOT CPACK_DEB_PACKAGE_COMPONENT) - if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + if(CPACK_DEB_PACKAGE_COMPONENT) + if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}") + elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}") endif() - else() - set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) - - # component description overrides package description - if(${component_description_var}) - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}}) - elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_description_var}") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + endif() + + if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + if(CPACK_PACKAGE_DESCRIPTION_FILE AND NOT "${CPACK_PACKAGE_DESCRIPTION_FILE}" STREQUAL "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") + elseif(CPACK_PACKAGE_DESCRIPTION_FILE) # use default package description file content + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + else() + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "no package description available") endif() endif() diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in index 74d816c..6c5a655 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in @@ -15,8 +15,8 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) #set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) # overriding previous descriptions -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") -set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "applications_description") -set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") +set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_DESCRIPTION "applications_description") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") # libraries does not have any description and should inherit from CPACK_PACKAGE_DESCRIPTION_SUMMARY unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in index cda79bc..92226d8 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in @@ -17,10 +17,12 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) # overriding previous descriptions set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description 2") +# and override CPACK_PACKAGE_DESCRIPTION_SUMMARY because of precedence +set(CPACK_PACKAGE_DESCRIPTION_FILE + "@CPackComponentsDEB_SOURCE_DIR@/pkg_description.txt") + # Components do not have any description unset(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION) unset(CPACK_COMPONENT_HEADERS_DESCRIPTION) -unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) - set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "library description") diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake index 35ca74c..7b94ca0 100644 --- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake +++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake @@ -55,12 +55,12 @@ if(DPKGDEB_EXECUTABLE) message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'") if("${dpkg_package_name}" STREQUAL "mylib-applications") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description") endif() elseif("${dpkg_package_name}" STREQUAL "mylib-headers") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description") endif() diff --git a/Tests/CPackComponentsDEB/pkg_description.txt b/Tests/CPackComponentsDEB/pkg_description.txt new file mode 100644 index 0000000..99f8f9b --- /dev/null +++ b/Tests/CPackComponentsDEB/pkg_description.txt @@ -0,0 +1 @@ +Debian package description file ----------------------------------------------------------------------- Summary of changes: .../dev/cpack-deb-package-description-fallback | 11 +++++ Modules/CPackDeb.cmake | 44 ++++++++++---------- ...LibCPackConfig-components-description1.cmake.in | 6 +-- ...LibCPackConfig-components-description2.cmake.in | 6 ++- ...CPackVerifyResult-components-description2.cmake | 4 +- Tests/CPackComponentsDEB/pkg_description.txt | 1 + 6 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 Help/release/dev/cpack-deb-package-description-fallback create mode 100644 Tests/CPackComponentsDEB/pkg_description.txt hooks/post-receive -- CMake From domen.vrankar at gmail.com Tue Sep 6 13:49:17 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 6 Sep 2016 13:49:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1817-gce7f0cb Message-ID: <20160906174917.BD0EDF3D32@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, next has been updated via ce7f0cbce58b4688991df6db0e00b944443b53d2 (commit) via a1fc9467271de8614be7c44e4b42613c7e5e2c58 (commit) from 345e669b0663a23876c815d46463ea90685bd110 (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=ce7f0cbce58b4688991df6db0e00b944443b53d2 commit ce7f0cbce58b4688991df6db0e00b944443b53d2 Merge: 345e669 a1fc946 Author: Domen Vrankar AuthorDate: Tue Sep 6 13:49:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 13:49:17 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next a1fc9467 fixup! cpack-deb-package-description-fallback https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1fc9467271de8614be7c44e4b42613c7e5e2c58 commit a1fc9467271de8614be7c44e4b42613c7e5e2c58 Author: Domen Vrankar AuthorDate: Tue Sep 6 19:48:36 2016 +0200 Commit: Domen Vrankar CommitDate: Tue Sep 6 19:48:36 2016 +0200 fixup! cpack-deb-package-description-fallback diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 1032dfc..423bb00 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -163,8 +163,7 @@ # * Mandatory : YES # * Default : # -# - :variable:`CPACK_COMPONENT__DESCRIPTION` (component -# based installers only) if set, +# - :variable:`CPACK_COMPONENT__DESCRIPTION` (component based installers only) if set, # - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location, # - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set, # - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set, ----------------------------------------------------------------------- Summary of changes: Modules/CPackDeb.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- CMake From domen.vrankar at gmail.com Tue Sep 6 13:51:23 2016 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 6 Sep 2016 13:51:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1819-gea86f38 Message-ID: <20160906175123.74929F45A7@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, next has been updated via ea86f387bd68596159f38b18863072769cf3df58 (commit) via 25899e8a9dcc633b6e7495a87299354a14cb834a (commit) from ce7f0cbce58b4688991df6db0e00b944443b53d2 (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=ea86f387bd68596159f38b18863072769cf3df58 commit ea86f387bd68596159f38b18863072769cf3df58 Merge: ce7f0cb 25899e8 Author: Domen Vrankar AuthorDate: Tue Sep 6 13:51:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 13:51:22 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next 25899e8a cpack-deb-package-description-fallback https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25899e8a9dcc633b6e7495a87299354a14cb834a commit 25899e8a9dcc633b6e7495a87299354a14cb834a Author: Domen Vrankar AuthorDate: Mon Sep 5 23:58:33 2016 +0200 Commit: Domen Vrankar CommitDate: Tue Sep 6 19:49:41 2016 +0200 cpack-deb-package-description-fallback Breaking change of fallback variable precedence for CPACK_DEBIAN_PACKAGE_DESCRIPTION that matches CPackRPM behavior as much as possible. Closes: #16272 diff --git a/Help/release/dev/cpack-deb-package-description-fallback b/Help/release/dev/cpack-deb-package-description-fallback new file mode 100644 index 0000000..6300dfc --- /dev/null +++ b/Help/release/dev/cpack-deb-package-description-fallback @@ -0,0 +1,11 @@ +cpack-deb-package-description-fallback +-------------------------------------- + +* The :module:`CPackDeb` module learned new package description + override rules to match :module:`CPackRPM` module behavior. + **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` + variable is set to non default location then it is prefered to + :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable. + Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION` + was introduced for component based packaging. + See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 1a7b923..423bb00 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -156,16 +156,18 @@ # * Default : :code:`CPACK_PACKAGE_CONTACT` # # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION -# CPACK_COMPONENT__DESCRIPTION +# CPACK_DEBIAN__PACKAGE_DESCRIPTION # # The Debian package description # # * Mandatory : YES # * Default : # -# - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or -# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` -# +# - :variable:`CPACK_COMPONENT__DESCRIPTION` (component based installers only) if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set, +# - or "no package description available" # # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION # CPACK_DEBIAN__PACKAGE_SECTION @@ -829,24 +831,23 @@ function(cpack_deb_prepare_package_vars) endif() # Description: (mandatory) - if(NOT CPACK_DEB_PACKAGE_COMPONENT) - if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + if(CPACK_DEB_PACKAGE_COMPONENT) + if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}") + elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}") endif() - else() - set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) - - # component description overrides package description - if(${component_description_var}) - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}}) - elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_description_var}") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + endif() + + if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + if(CPACK_PACKAGE_DESCRIPTION_FILE AND NOT "${CPACK_PACKAGE_DESCRIPTION_FILE}" STREQUAL "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") + elseif(CPACK_PACKAGE_DESCRIPTION_FILE) # use default package description file content + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + else() + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "no package description available") endif() endif() diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in index 74d816c..6c5a655 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in @@ -15,8 +15,8 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) #set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) # overriding previous descriptions -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") -set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "applications_description") -set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") +set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_DESCRIPTION "applications_description") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") # libraries does not have any description and should inherit from CPACK_PACKAGE_DESCRIPTION_SUMMARY unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in index cda79bc..92226d8 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in @@ -17,10 +17,12 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) # overriding previous descriptions set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description 2") +# and override CPACK_PACKAGE_DESCRIPTION_SUMMARY because of precedence +set(CPACK_PACKAGE_DESCRIPTION_FILE + "@CPackComponentsDEB_SOURCE_DIR@/pkg_description.txt") + # Components do not have any description unset(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION) unset(CPACK_COMPONENT_HEADERS_DESCRIPTION) -unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) - set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "library description") diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake index 35ca74c..7b94ca0 100644 --- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake +++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake @@ -55,12 +55,12 @@ if(DPKGDEB_EXECUTABLE) message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'") if("${dpkg_package_name}" STREQUAL "mylib-applications") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description") endif() elseif("${dpkg_package_name}" STREQUAL "mylib-headers") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description") endif() diff --git a/Tests/CPackComponentsDEB/pkg_description.txt b/Tests/CPackComponentsDEB/pkg_description.txt new file mode 100644 index 0000000..99f8f9b --- /dev/null +++ b/Tests/CPackComponentsDEB/pkg_description.txt @@ -0,0 +1 @@ +Debian package description file ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 15:31:10 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 15:31:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1821-g017e5a4 Message-ID: <20160906193110.290F6F5AA8@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, next has been updated via 017e5a49c0b5014fe1652f9f509a96acd0557f18 (commit) via 797ab8a07f04ace93957097bfab082d0d9030e4e (commit) from ea86f387bd68596159f38b18863072769cf3df58 (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=017e5a49c0b5014fe1652f9f509a96acd0557f18 commit 017e5a49c0b5014fe1652f9f509a96acd0557f18 Merge: ea86f38 797ab8a Author: Brad King AuthorDate: Tue Sep 6 15:31:08 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 15:31:08 2016 -0400 Merge topic 'fix-continue-after-error' into next 797ab8a0 cmMakefile: Restore nested error logic use of cmExecutionStatus https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=797ab8a07f04ace93957097bfab082d0d9030e4e commit 797ab8a07f04ace93957097bfab082d0d9030e4e Author: Brad King AuthorDate: Tue Sep 6 15:25:26 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 15:29:16 2016 -0400 cmMakefile: Restore nested error logic use of cmExecutionStatus Since commit 14a8d61f (cmMakefile: Port nested error logic away from cmExecutionStatus) we fail to continue processing function and macro bodies after non-fatal errors. A non-fatal error should not stop foreach loops, macro bodies, nested bodies, or the outer script. Add a test covering these cases, and revert the change to fix them. diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 14e1454..7302837 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -40,12 +40,16 @@ public: this->ReturnInvoked = false; this->BreakInvoked = false; this->ContinueInvoked = false; + this->NestedError = false; } + void SetNestedError(bool val) { this->NestedError = val; } + bool GetNestedError() { return this->NestedError; } private: bool ReturnInvoked; bool BreakInvoked; bool ContinueInvoked; + bool NestedError; }; #endif diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index f0e4854..40c54db 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -76,7 +76,7 @@ public: }; bool cmFunctionHelperCommand::InvokeInitialPass( - const std::vector& args, cmExecutionStatus&) + const std::vector& args, cmExecutionStatus& inStatus) { // Expand the argument list to the function. std::vector expandedArgs; @@ -129,11 +129,11 @@ bool cmFunctionHelperCommand::InvokeInitialPass( for (unsigned int c = 0; c < this->Functions.size(); ++c) { cmExecutionStatus status; if (!this->Makefile->ExecuteCommand(this->Functions[c], status) || - (cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured())) { + status.GetNestedError()) { // The error message should have already included the call stack // so we do not need to report an error here. functionScope.Quiet(); + inStatus.SetNestedError(true); return false; } if (status.GetReturnInvoked()) { diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9d312ee..ee9dc8a 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -159,11 +159,11 @@ bool cmMacroHelperCommand::InvokeInitialPass( } cmExecutionStatus status; if (!this->Makefile->ExecuteCommand(newLFF, status) || - (cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured())) { + status.GetNestedError()) { // The error message should have already included the call stack // so we do not need to report an error here. macroScope.Quiet(); + inStatus.SetNestedError(true); return false; } if (status.GetReturnInvoked()) { diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 11ccca1..a759993 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -117,6 +117,10 @@ cmMakefile::~cmMakefile() void cmMakefile::IssueMessage(cmake::MessageType t, std::string const& text) const { + assert(!this->ExecutionStatusStack.empty()); + if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) { + this->ExecutionStatusStack.back()->SetNestedError(true); + } this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); } @@ -277,19 +281,11 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, if (this->GetCMakeInstance()->GetTrace()) { this->PrintCommandTrace(lff); } - - bool hadPreviousNonFatalError = cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured(); - cmSystemTools::ResetErrorOccuredFlag(); - + // Try invoking the command. bool invokeSucceeded = pcmd->InvokeInitialPass(lff.Arguments, status); - bool hadNestedError = cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured(); - if (hadPreviousNonFatalError) { - cmSystemTools::SetErrorOccured(); - } + bool hadNestedError = status.GetNestedError(); if (!invokeSucceeded || hadNestedError) { - if (!hadNestedError && !cmSystemTools::GetFatalErrorOccured()) { + if (!hadNestedError) { // The command invocation requested that we report an error. this->IssueMessage(cmake::FATAL_ERROR, pcmd->GetError()); } diff --git a/Tests/RunCMake/Configure/ContinueAfterError-result.txt b/Tests/RunCMake/Configure/ContinueAfterError-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt new file mode 100644 index 0000000..f40a3ef --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt @@ -0,0 +1,13 @@ +^CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\): + error in loop body +Call Stack \(most recent call first\): + ContinueAfterError.cmake:[0-9]+ \(m\) + ContinueAfterError.cmake:[0-9]+ \(f\) + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\): + error in loop body +Call Stack \(most recent call first\): + ContinueAfterError.cmake:[0-9]+ \(m\) + ContinueAfterError.cmake:[0-9]+ \(f\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt new file mode 100644 index 0000000..f03aa07 --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt @@ -0,0 +1,11 @@ +-- before f +-- start f +-- start m +-- start loop body +-- end loop body +-- start loop body +-- end loop body +-- end m +-- end f +-- after f +-- Configuring incomplete, errors occurred! diff --git a/Tests/RunCMake/Configure/ContinueAfterError.cmake b/Tests/RunCMake/Configure/ContinueAfterError.cmake new file mode 100644 index 0000000..d094390 --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError.cmake @@ -0,0 +1,19 @@ +macro(m) + message(STATUS " start m") + foreach(i 1 2) + message(STATUS " start loop body") + message(SEND_ERROR "error in loop body") + message(STATUS " end loop body") + endforeach() + message(STATUS " end m") +endmacro() + +function(f) + message(STATUS " start f") + m() + message(STATUS " end f") +endfunction() + +message(STATUS "before f") +f() +message(STATUS "after f") diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake index 58e1a2a..91adb4e 100644 --- a/Tests/RunCMake/Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(ContinueAfterError) run_cmake(CustomTargetAfterError) run_cmake(ErrorLogs) run_cmake(FailCopyFileABI) ----------------------------------------------------------------------- Summary of changes: Source/cmExecutionStatus.h | 4 ++++ Source/cmFunctionCommand.cxx | 6 +++--- Source/cmMacroCommand.cxx | 4 ++-- Source/cmMakefile.cxx | 18 +++++++----------- .../ContinueAfterError-result.txt} | 0 .../Configure/ContinueAfterError-stderr.txt | 13 +++++++++++++ .../Configure/ContinueAfterError-stdout.txt | 11 +++++++++++ Tests/RunCMake/Configure/ContinueAfterError.cmake | 19 +++++++++++++++++++ Tests/RunCMake/Configure/RunCMakeTest.cmake | 1 + 9 files changed, 60 insertions(+), 16 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => Configure/ContinueAfterError-result.txt} (100%) create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stderr.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stdout.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 16:06:18 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 16:06:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1823-g87a9ffc Message-ID: <20160906200618.A8D61F5CEF@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, next has been updated via 87a9ffca5fca9f6098e6098060b762a20a630a0c (commit) via 65f031a4cd25ec5d1ef3dcba9b6bb3d60fc5ae06 (commit) from 017e5a49c0b5014fe1652f9f509a96acd0557f18 (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=87a9ffca5fca9f6098e6098060b762a20a630a0c commit 87a9ffca5fca9f6098e6098060b762a20a630a0c Merge: 017e5a4 65f031a Author: Brad King AuthorDate: Tue Sep 6 16:06:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 16:06:17 2016 -0400 Merge topic 'fix-continue-after-error' into next 65f031a4 Revert topic 'fix-continue-after-error' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65f031a4cd25ec5d1ef3dcba9b6bb3d60fc5ae06 commit 65f031a4cd25ec5d1ef3dcba9b6bb3d60fc5ae06 Author: Brad King AuthorDate: Tue Sep 6 16:05:57 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 16:05:57 2016 -0400 Revert topic 'fix-continue-after-error' It generates assertion failures. Further invstigation needed. diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 7302837..14e1454 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -40,16 +40,12 @@ public: this->ReturnInvoked = false; this->BreakInvoked = false; this->ContinueInvoked = false; - this->NestedError = false; } - void SetNestedError(bool val) { this->NestedError = val; } - bool GetNestedError() { return this->NestedError; } private: bool ReturnInvoked; bool BreakInvoked; bool ContinueInvoked; - bool NestedError; }; #endif diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 40c54db..f0e4854 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -76,7 +76,7 @@ public: }; bool cmFunctionHelperCommand::InvokeInitialPass( - const std::vector& args, cmExecutionStatus& inStatus) + const std::vector& args, cmExecutionStatus&) { // Expand the argument list to the function. std::vector expandedArgs; @@ -129,11 +129,11 @@ bool cmFunctionHelperCommand::InvokeInitialPass( for (unsigned int c = 0; c < this->Functions.size(); ++c) { cmExecutionStatus status; if (!this->Makefile->ExecuteCommand(this->Functions[c], status) || - status.GetNestedError()) { + (cmSystemTools::GetErrorOccuredFlag() && + !cmSystemTools::GetFatalErrorOccured())) { // The error message should have already included the call stack // so we do not need to report an error here. functionScope.Quiet(); - inStatus.SetNestedError(true); return false; } if (status.GetReturnInvoked()) { diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index ee9dc8a..9d312ee 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -159,11 +159,11 @@ bool cmMacroHelperCommand::InvokeInitialPass( } cmExecutionStatus status; if (!this->Makefile->ExecuteCommand(newLFF, status) || - status.GetNestedError()) { + (cmSystemTools::GetErrorOccuredFlag() && + !cmSystemTools::GetFatalErrorOccured())) { // The error message should have already included the call stack // so we do not need to report an error here. macroScope.Quiet(); - inStatus.SetNestedError(true); return false; } if (status.GetReturnInvoked()) { diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a759993..11ccca1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -117,10 +117,6 @@ cmMakefile::~cmMakefile() void cmMakefile::IssueMessage(cmake::MessageType t, std::string const& text) const { - assert(!this->ExecutionStatusStack.empty()); - if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) { - this->ExecutionStatusStack.back()->SetNestedError(true); - } this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); } @@ -281,11 +277,19 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, if (this->GetCMakeInstance()->GetTrace()) { this->PrintCommandTrace(lff); } - // Try invoking the command. + + bool hadPreviousNonFatalError = cmSystemTools::GetErrorOccuredFlag() && + !cmSystemTools::GetFatalErrorOccured(); + cmSystemTools::ResetErrorOccuredFlag(); + bool invokeSucceeded = pcmd->InvokeInitialPass(lff.Arguments, status); - bool hadNestedError = status.GetNestedError(); + bool hadNestedError = cmSystemTools::GetErrorOccuredFlag() && + !cmSystemTools::GetFatalErrorOccured(); + if (hadPreviousNonFatalError) { + cmSystemTools::SetErrorOccured(); + } if (!invokeSucceeded || hadNestedError) { - if (!hadNestedError) { + if (!hadNestedError && !cmSystemTools::GetFatalErrorOccured()) { // The command invocation requested that we report an error. this->IssueMessage(cmake::FATAL_ERROR, pcmd->GetError()); } diff --git a/Tests/RunCMake/Configure/ContinueAfterError-result.txt b/Tests/RunCMake/Configure/ContinueAfterError-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/Configure/ContinueAfterError-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt deleted file mode 100644 index f40a3ef..0000000 --- a/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt +++ /dev/null @@ -1,13 +0,0 @@ -^CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\): - error in loop body -Call Stack \(most recent call first\): - ContinueAfterError.cmake:[0-9]+ \(m\) - ContinueAfterError.cmake:[0-9]+ \(f\) - CMakeLists.txt:[0-9]+ \(include\) -+ -CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\): - error in loop body -Call Stack \(most recent call first\): - ContinueAfterError.cmake:[0-9]+ \(m\) - ContinueAfterError.cmake:[0-9]+ \(f\) - CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt deleted file mode 100644 index f03aa07..0000000 --- a/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt +++ /dev/null @@ -1,11 +0,0 @@ --- before f --- start f --- start m --- start loop body --- end loop body --- start loop body --- end loop body --- end m --- end f --- after f --- Configuring incomplete, errors occurred! diff --git a/Tests/RunCMake/Configure/ContinueAfterError.cmake b/Tests/RunCMake/Configure/ContinueAfterError.cmake deleted file mode 100644 index d094390..0000000 --- a/Tests/RunCMake/Configure/ContinueAfterError.cmake +++ /dev/null @@ -1,19 +0,0 @@ -macro(m) - message(STATUS " start m") - foreach(i 1 2) - message(STATUS " start loop body") - message(SEND_ERROR "error in loop body") - message(STATUS " end loop body") - endforeach() - message(STATUS " end m") -endmacro() - -function(f) - message(STATUS " start f") - m() - message(STATUS " end f") -endfunction() - -message(STATUS "before f") -f() -message(STATUS "after f") diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake index 91adb4e..58e1a2a 100644 --- a/Tests/RunCMake/Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake @@ -1,6 +1,5 @@ include(RunCMake) -run_cmake(ContinueAfterError) run_cmake(CustomTargetAfterError) run_cmake(ErrorLogs) run_cmake(FailCopyFileABI) ----------------------------------------------------------------------- Summary of changes: Source/cmExecutionStatus.h | 4 ---- Source/cmFunctionCommand.cxx | 6 +++--- Source/cmMacroCommand.cxx | 4 ++-- Source/cmMakefile.cxx | 18 +++++++++++------- .../Configure/ContinueAfterError-result.txt | 1 - .../Configure/ContinueAfterError-stderr.txt | 13 ------------- .../Configure/ContinueAfterError-stdout.txt | 11 ----------- Tests/RunCMake/Configure/ContinueAfterError.cmake | 19 ------------------- Tests/RunCMake/Configure/RunCMakeTest.cmake | 1 - 9 files changed, 16 insertions(+), 61 deletions(-) delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError-result.txt delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stderr.txt delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stdout.txt delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 6 16:27:25 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 6 Sep 2016 16:27:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1825-g45c6d45 Message-ID: <20160906202725.0B464F5AAB@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, next has been updated via 45c6d45ad795580eb861ca13b4d81f8f6d35943b (commit) via f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e (commit) from 87a9ffca5fca9f6098e6098060b762a20a630a0c (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=45c6d45ad795580eb861ca13b4d81f8f6d35943b commit 45c6d45ad795580eb861ca13b4d81f8f6d35943b Merge: 87a9ffc f1ad71d Author: Brad King AuthorDate: Tue Sep 6 16:27:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 16:27:23 2016 -0400 Merge topic 'fix-continue-after-error' into next f1ad71d7 cmMakefile: Restore nested error logic use of cmExecutionStatus https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e commit f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e Author: Brad King AuthorDate: Tue Sep 6 15:25:26 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 16:20:39 2016 -0400 cmMakefile: Restore nested error logic use of cmExecutionStatus Since commit 14a8d61f (cmMakefile: Port nested error logic away from cmExecutionStatus) we fail to continue processing function and macro bodies after non-fatal errors. A non-fatal error should not stop foreach loops, macro bodies, nested bodies, or the outer script. Add a test covering these cases, and revert the change to fix them. Also revert commit 2af853de (cmMakefile: Simplify IssueMessage implementation) because the assertion it added (which was removed by the above commit and is restored by reverting it) is incorrect. We do have code paths that call cmMakefile::IssueMessage with an empty execution stack, such as in CheckForUnusedVariables's LogUnused call. diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 14e1454..7302837 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -40,12 +40,16 @@ public: this->ReturnInvoked = false; this->BreakInvoked = false; this->ContinueInvoked = false; + this->NestedError = false; } + void SetNestedError(bool val) { this->NestedError = val; } + bool GetNestedError() { return this->NestedError; } private: bool ReturnInvoked; bool BreakInvoked; bool ContinueInvoked; + bool NestedError; }; #endif diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index f0e4854..40c54db 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -76,7 +76,7 @@ public: }; bool cmFunctionHelperCommand::InvokeInitialPass( - const std::vector& args, cmExecutionStatus&) + const std::vector& args, cmExecutionStatus& inStatus) { // Expand the argument list to the function. std::vector expandedArgs; @@ -129,11 +129,11 @@ bool cmFunctionHelperCommand::InvokeInitialPass( for (unsigned int c = 0; c < this->Functions.size(); ++c) { cmExecutionStatus status; if (!this->Makefile->ExecuteCommand(this->Functions[c], status) || - (cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured())) { + status.GetNestedError()) { // The error message should have already included the call stack // so we do not need to report an error here. functionScope.Quiet(); + inStatus.SetNestedError(true); return false; } if (status.GetReturnInvoked()) { diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9d312ee..ee9dc8a 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -159,11 +159,11 @@ bool cmMacroHelperCommand::InvokeInitialPass( } cmExecutionStatus status; if (!this->Makefile->ExecuteCommand(newLFF, status) || - (cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured())) { + status.GetNestedError()) { // The error message should have already included the call stack // so we do not need to report an error here. macroScope.Quiet(); + inStatus.SetNestedError(true); return false; } if (status.GetReturnInvoked()) { diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 11ccca1..e5a5e6e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -117,6 +117,11 @@ cmMakefile::~cmMakefile() void cmMakefile::IssueMessage(cmake::MessageType t, std::string const& text) const { + if (!this->ExecutionStatusStack.empty()) { + if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) { + this->ExecutionStatusStack.back()->SetNestedError(true); + } + } this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); } @@ -277,19 +282,11 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, if (this->GetCMakeInstance()->GetTrace()) { this->PrintCommandTrace(lff); } - - bool hadPreviousNonFatalError = cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured(); - cmSystemTools::ResetErrorOccuredFlag(); - + // Try invoking the command. bool invokeSucceeded = pcmd->InvokeInitialPass(lff.Arguments, status); - bool hadNestedError = cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured(); - if (hadPreviousNonFatalError) { - cmSystemTools::SetErrorOccured(); - } + bool hadNestedError = status.GetNestedError(); if (!invokeSucceeded || hadNestedError) { - if (!hadNestedError && !cmSystemTools::GetFatalErrorOccured()) { + if (!hadNestedError) { // The command invocation requested that we report an error. this->IssueMessage(cmake::FATAL_ERROR, pcmd->GetError()); } diff --git a/Tests/RunCMake/Configure/ContinueAfterError-result.txt b/Tests/RunCMake/Configure/ContinueAfterError-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt new file mode 100644 index 0000000..f40a3ef --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt @@ -0,0 +1,13 @@ +^CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\): + error in loop body +Call Stack \(most recent call first\): + ContinueAfterError.cmake:[0-9]+ \(m\) + ContinueAfterError.cmake:[0-9]+ \(f\) + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\): + error in loop body +Call Stack \(most recent call first\): + ContinueAfterError.cmake:[0-9]+ \(m\) + ContinueAfterError.cmake:[0-9]+ \(f\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt new file mode 100644 index 0000000..f03aa07 --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt @@ -0,0 +1,11 @@ +-- before f +-- start f +-- start m +-- start loop body +-- end loop body +-- start loop body +-- end loop body +-- end m +-- end f +-- after f +-- Configuring incomplete, errors occurred! diff --git a/Tests/RunCMake/Configure/ContinueAfterError.cmake b/Tests/RunCMake/Configure/ContinueAfterError.cmake new file mode 100644 index 0000000..d094390 --- /dev/null +++ b/Tests/RunCMake/Configure/ContinueAfterError.cmake @@ -0,0 +1,19 @@ +macro(m) + message(STATUS " start m") + foreach(i 1 2) + message(STATUS " start loop body") + message(SEND_ERROR "error in loop body") + message(STATUS " end loop body") + endforeach() + message(STATUS " end m") +endmacro() + +function(f) + message(STATUS " start f") + m() + message(STATUS " end f") +endfunction() + +message(STATUS "before f") +f() +message(STATUS "after f") diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake index 58e1a2a..91adb4e 100644 --- a/Tests/RunCMake/Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(ContinueAfterError) run_cmake(CustomTargetAfterError) run_cmake(ErrorLogs) run_cmake(FailCopyFileABI) ----------------------------------------------------------------------- Summary of changes: Source/cmExecutionStatus.h | 4 ++++ Source/cmFunctionCommand.cxx | 6 +++--- Source/cmMacroCommand.cxx | 4 ++-- Source/cmMakefile.cxx | 19 ++++++++----------- .../ContinueAfterError-result.txt} | 0 .../Configure/ContinueAfterError-stderr.txt | 13 +++++++++++++ .../Configure/ContinueAfterError-stdout.txt | 11 +++++++++++ Tests/RunCMake/Configure/ContinueAfterError.cmake | 19 +++++++++++++++++++ Tests/RunCMake/Configure/RunCMakeTest.cmake | 1 + 9 files changed, 61 insertions(+), 16 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => Configure/ContinueAfterError-result.txt} (100%) create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stderr.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stdout.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError.cmake hooks/post-receive -- CMake From rleigh at codelibre.net Tue Sep 6 17:04:40 2016 From: rleigh at codelibre.net (Roger Leigh) Date: Tue, 6 Sep 2016 17:04:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1827-gcb44094 Message-ID: <20160906210440.20D35F5BF6@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, next has been updated via cb44094bc5b30993d00e5bea055a02323b6dbee5 (commit) via 70d052f71ddbf15754073f0d3ba5621f5dc06524 (commit) from 45c6d45ad795580eb861ca13b4d81f8f6d35943b (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=cb44094bc5b30993d00e5bea055a02323b6dbee5 commit cb44094bc5b30993d00e5bea055a02323b6dbee5 Merge: 45c6d45 70d052f Author: Roger Leigh AuthorDate: Tue Sep 6 17:04:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 17:04:39 2016 -0400 Merge topic 'gid-func' into next 70d052f7 GNUInstallDirs: Add set_full_install_dir macro https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70d052f71ddbf15754073f0d3ba5621f5dc06524 commit 70d052f71ddbf15754073f0d3ba5621f5dc06524 Author: Roger Leigh AuthorDate: Sun Aug 28 18:19:02 2016 +0100 Commit: Roger Leigh CommitDate: Tue Sep 6 21:54:16 2016 +0100 GNUInstallDirs: Add set_full_install_dir macro diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index b42084e..eec9cb0 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -99,6 +99,22 @@ # `Filesystem Hierarchy Standard`_. # # .. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html +# +# Macros +# ^^^^^^ +# +# :: +# +# GNUInstallDirs_get_absolute_install_dir(absvar var) +# +# Set the given variable ``absvar`` to the absolute path contained +# within the variable ``var``. This is to allow the computation of an +# absolute path, accounting for all the special cases documented +# above. While this macro is used to compute the various +# ``CMAKE_INSTALL_FULL_`` variables, it is exposed publicly to +# allow users who create additional path variables to also compute +# absolute paths where necessary, using the same logic. +# #============================================================================= # Copyright 2015 Alex Turbov @@ -300,55 +316,59 @@ mark_as_advanced( CMAKE_INSTALL_DOCDIR ) -# Result directories -# -foreach(dir - BINDIR - SBINDIR - LIBEXECDIR - SYSCONFDIR - SHAREDSTATEDIR - LOCALSTATEDIR - LIBDIR - INCLUDEDIR - OLDINCLUDEDIR - DATAROOTDIR - DATADIR - INFODIR - LOCALEDIR - MANDIR - DOCDIR - ) - if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_${dir}}") +macro(GNUInstallDirs_get_absolute_install_dir absvar var) + if(NOT IS_ABSOLUTE "${${var}}") # Handle special cases: # - CMAKE_INSTALL_PREFIX == / # - CMAKE_INSTALL_PREFIX == /usr # - CMAKE_INSTALL_PREFIX == /opt/... if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/") if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}") + set(${absvar} "/${${var}}") else() - if (NOT "${CMAKE_INSTALL_${dir}}" MATCHES "^usr/") - set(CMAKE_INSTALL_${dir} "usr/${CMAKE_INSTALL_${dir}}") + if (NOT "${${var}}" MATCHES "^usr/") + set(${var} "usr/${${var}}") endif() - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}") + set(${absvar} "/${${var}}") endif() elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}") + set(${absvar} "/${${var}}") else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") + set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*") if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}${CMAKE_INSTALL_PREFIX}") + set(${absvar} "/${${var}}${CMAKE_INSTALL_PREFIX}") else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") + set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") + set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}") + set(${absvar} "${${var}}") endif() +endmacro() + +# Result directories +# +foreach(dir + BINDIR + SBINDIR + LIBEXECDIR + SYSCONFDIR + SHAREDSTATEDIR + LOCALSTATEDIR + LIBDIR + INCLUDEDIR + OLDINCLUDEDIR + DATAROOTDIR + DATADIR + INFODIR + LOCALEDIR + MANDIR + DOCDIR + ) + GNUInstallDirs_get_absolute_install_dir(CMAKE_INSTALL_FULL_${dir} CMAKE_INSTALL_${dir}) endforeach() ----------------------------------------------------------------------- Summary of changes: Modules/GNUInstallDirs.cmake | 80 ++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 30 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Tue Sep 6 18:22:01 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Tue, 6 Sep 2016 18:22:01 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1829-g343ef96 Message-ID: <20160906222201.321BDF57AD@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, next has been updated via 343ef96f1091e7ccab80d65f6ef9a225aa6d6064 (commit) via d47c7bf608d3ca23c8d518ff98a42d6d5f449a70 (commit) from cb44094bc5b30993d00e5bea055a02323b6dbee5 (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=343ef96f1091e7ccab80d65f6ef9a225aa6d6064 commit 343ef96f1091e7ccab80d65f6ef9a225aa6d6064 Merge: cb44094 d47c7bf Author: Daniel Pfeifer AuthorDate: Tue Sep 6 18:21:59 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 6 18:21:59 2016 -0400 Merge topic 'include-what-you-use' into next d47c7bf6 CPack: include what you use https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d47c7bf608d3ca23c8d518ff98a42d6d5f449a70 commit d47c7bf608d3ca23c8d518ff98a42d6d5f449a70 Author: Daniel Pfeifer AuthorDate: Wed Sep 7 00:21:35 2016 +0200 Commit: Daniel Pfeifer CommitDate: Wed Sep 7 00:21:35 2016 +0200 CPack: include what you use diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx index 4a5eb90..a6f1585 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx +++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx @@ -12,21 +12,20 @@ #include "cmCPackIFWGenerator.h" -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include "CPack/cmCPackComponentGroup.h" +#include "CPack/cmCPackGenerator.h" +#include "CPack/cmCPackLog.h" +#include "cmCPackIFWInstaller.h" +#include "cmCPackIFWPackage.h" +#include "cmCPackIFWRepository.h" +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" +#include "cmTimestamp.h" +#include "cmVersionConfig.h" +#include "cmXMLWriter.h" + +#include +#include cmCPackIFWGenerator::cmCPackIFWGenerator() { diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 12f2ca6..17d61bf 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -13,11 +13,19 @@ #ifndef cmCPackIFWGenerator_h #define cmCPackIFWGenerator_h -#include +#include +#include "CPack/cmCPackComponentGroup.h" +#include "CPack/cmCPackGenerator.h" #include "cmCPackIFWInstaller.h" #include "cmCPackIFWPackage.h" #include "cmCPackIFWRepository.h" +#include "cmTypeMacro.h" + +#include +#include +#include +#include class cmXMLWriter; diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 13a3613..5a3efc9 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -12,12 +12,16 @@ #include "cmCPackIFWInstaller.h" +#include "CPack/cmCPackGenerator.h" #include "cmCPackIFWGenerator.h" - -#include - -#include -#include +#include "cmCPackIFWPackage.h" +#include "cmCPackIFWRepository.h" +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" +#include "cmXMLWriter.h" + +#include +#include #ifdef cmCPackLogger #undef cmCPackLogger diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index 3170116..f72d379 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -13,10 +13,14 @@ #ifndef cmCPackIFWInstaller_h #define cmCPackIFWInstaller_h -#include +#include // IWYU pragma: keep + +#include +#include +#include -class cmCPackIFWPackage; class cmCPackIFWGenerator; +class cmCPackIFWPackage; class cmCPackIFWRepository; class cmXMLWriter; diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index 5db06e6..bc503fc 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -12,13 +12,20 @@ #include "cmCPackIFWPackage.h" +#include "CPack/cmCPackComponentGroup.h" +#include "CPack/cmCPackGenerator.h" +#include "CPack/cmCPackLog.h" #include "cmCPackIFWGenerator.h" - -#include - -#include -#include -#include +#include "cmCPackIFWInstaller.h" +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" +#include "cmTimestamp.h" +#include "cmXMLWriter.h" + +#include +#include +#include +#include //----------------------------------------------------------------- Logger --- #ifdef cmCPackLogger diff --git a/Source/CPack/IFW/cmCPackIFWPackage.h b/Source/CPack/IFW/cmCPackIFWPackage.h index 55b07ec..579eeb8 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.h +++ b/Source/CPack/IFW/cmCPackIFWPackage.h @@ -13,12 +13,16 @@ #ifndef cmCPackIFWPackage_h #define cmCPackIFWPackage_h -#include +#include // IWYU pragma: keep + +#include +#include +#include class cmCPackComponent; class cmCPackComponentGroup; -class cmCPackIFWInstaller; class cmCPackIFWGenerator; +class cmCPackIFWInstaller; class cmXMLWriter; /** \class cmCPackIFWPackage diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx index fcb1c77..947e420 100644 --- a/Source/CPack/IFW/cmCPackIFWRepository.cxx +++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx @@ -12,13 +12,15 @@ #include "cmCPackIFWRepository.h" +#include "CPack/cmCPackGenerator.h" #include "cmCPackIFWGenerator.h" +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" +#include "cmXMLParser.h" +#include "cmXMLWriter.h" -#include - -#include -#include -#include +#include +#include #ifdef cmCPackLogger #undef cmCPackLogger diff --git a/Source/CPack/IFW/cmCPackIFWRepository.h b/Source/CPack/IFW/cmCPackIFWRepository.h index 5ffb775..a0c535b 100644 --- a/Source/CPack/IFW/cmCPackIFWRepository.h +++ b/Source/CPack/IFW/cmCPackIFWRepository.h @@ -13,7 +13,10 @@ #ifndef cmCPackIFWRepository_h #define cmCPackIFWRepository_h -#include +#include // IWYU pragma: keep + +#include +#include class cmCPackIFWGenerator; class cmXMLWriter; diff --git a/Source/CPack/cmCPack7zGenerator.cxx b/Source/CPack/cmCPack7zGenerator.cxx index b01c216..39d2e54 100644 --- a/Source/CPack/cmCPack7zGenerator.cxx +++ b/Source/CPack/cmCPack7zGenerator.cxx @@ -12,6 +12,9 @@ #include "cmCPack7zGenerator.h" +#include "cmArchiveWrite.h" +#include "cmCPackArchiveGenerator.h" + cmCPack7zGenerator::cmCPack7zGenerator() : cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "7zip") { diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h index ddbcc34..94add69 100644 --- a/Source/CPack/cmCPack7zGenerator.h +++ b/Source/CPack/cmCPack7zGenerator.h @@ -13,7 +13,11 @@ #ifndef cmCPack7zGenerator_h #define cmCPack7zGenerator_h +#include + #include "cmCPackArchiveGenerator.h" +#include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPack7zGenerator * \brief A generator for 7z files diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 377fee1..ddf2ccb 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -12,17 +12,16 @@ #include "cmCPackArchiveGenerator.h" +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" -#include "cmake.h" -#include -#include -#include -#include +#include +#include +#include +#include cmCPackArchiveGenerator::cmCPackArchiveGenerator(cmArchiveWrite::Compress t, std::string const& format) diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index a018ebd..6db6fb0 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -13,9 +13,16 @@ #ifndef cmCPackArchiveGenerator_h #define cmCPackArchiveGenerator_h -#include "cmCPackGenerator.h" +#include #include "cmArchiveWrite.h" +#include "cmCPackGenerator.h" +#include "cmTypeMacro.h" + +#include +#include + +class cmCPackComponent; /** \class cmCPackArchiveGenerator * \brief A generator base for libarchive generation. diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h index 78b81b3..8e9218e 100644 --- a/Source/CPack/cmCPackComponentGroup.h +++ b/Source/CPack/cmCPackComponentGroup.h @@ -15,7 +15,8 @@ #include -#include "cmStandardIncludes.h" +#include +#include class cmCPackComponentGroup; diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index b909598..2e18265 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -13,16 +13,21 @@ #include "cmCPackDebGenerator.h" #include "cmArchiveWrite.h" +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" -#include "cmMakefile.h" #include "cmSystemTools.h" #include -#include - -#include // USHRT_MAX +#include +#include +#include +#include +#include +#include #include +#include // NOTE: // A debian package .deb is simply an 'ar' archive. The only subtle difference @@ -743,14 +748,6 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix( * SUCH DAMAGE. */ -#include -// include sys/stat.h after sys/types.h -#include - -#include -#include -#include - #define ARMAG "!\n" /* ar "magic number" */ #define SARMAG 8 /* strlen(ARMAG); */ diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h index bcdc509..c76bf99 100644 --- a/Source/CPack/cmCPackDebGenerator.h +++ b/Source/CPack/cmCPackDebGenerator.h @@ -13,7 +13,13 @@ #ifndef cmCPackDebGenerator_h #define cmCPackDebGenerator_h +#include + #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" + +#include +#include /** \class cmCPackDebGenerator * \brief A generator for Debian packages diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 96c218c..d6b58f2 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -17,14 +17,17 @@ #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" #include "cmXMLSafe.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" #include #include #include -#include +#include #include +#include #if defined(__HAIKU__) #include diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 23e4bb7..f89f349 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -13,15 +13,21 @@ #ifndef cmCPackGenerator_h #define cmCPackGenerator_h -#include "cmObject.h" +#include +#include "cmCPackComponentGroup.h" +#include "cmObject.h" #include "cmSystemTools.h" +#include "cmTypeMacro.h" + #include +#include +#include #include -#include "cmCPackComponentGroup.h" // cmCPackComponent and friends -// Forward declarations are insufficient since we use them in -// std::map data members below... +class cmCPackLog; +class cmInstalledFile; +class cmMakefile; #define cmCPackTypeMacro(klass, superclass) \ cmTypeMacro(klass, superclass); \ @@ -46,10 +52,6 @@ #endif #define cout no_cout_use_cmCPack_Log -class cmMakefile; -class cmCPackLog; -class cmInstalledFile; - /** \class cmCPackGenerator * \brief A superclass of all CPack Generators * diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index 0f0268f..fb84739 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -49,6 +49,9 @@ #include "cmAlgorithms.h" #include "cmCPackLog.h" +#include +#include + cmCPackGeneratorFactory::cmCPackGeneratorFactory() { if (cmCPackTGZGenerator::CanGenerate()) { diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index f0ed57a..4c07ea3 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -13,10 +13,17 @@ #ifndef cmCPackGeneratorFactory_h #define cmCPackGeneratorFactory_h +#include + #include "cmObject.h" +#include "cmTypeMacro.h" + +#include +#include +#include -class cmCPackLog; class cmCPackGenerator; +class cmCPackLog; /** \class cmCPackGeneratorFactory * \brief A container for CPack generators diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx index 339323e..8439de1 100644 --- a/Source/CPack/cmCPackLog.cxx +++ b/Source/CPack/cmCPackLog.cxx @@ -15,6 +15,8 @@ #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" +#include + cmCPackLog::cmCPackLog() { this->Verbose = false; diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h index 77f0f0b..c1bf82c 100644 --- a/Source/CPack/cmCPackLog.h +++ b/Source/CPack/cmCPackLog.h @@ -13,7 +13,14 @@ #ifndef cmCPackLog_h #define cmCPackLog_h +#include + #include "cmObject.h" +#include "cmTypeMacro.h" + +#include +#include +#include #define cmCPack_Log(ctSelf, logType, msg) \ do { \ diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index d8ff907..2db94f1 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -13,16 +13,19 @@ #include "cmCPackNSISGenerator.h" #include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmGeneratedFileStream.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" +#include #include -#include #include -#include +#include +#include +#include +#include +#include /* NSIS uses different command line syntax on Windows and others */ #ifdef _WIN32 diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index 4923cf0..ae03e6b 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -13,9 +13,18 @@ #ifndef cmCPackNSISGenerator_h #define cmCPackNSISGenerator_h +#include + #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" +#include #include +#include +#include + +class cmCPackComponent; +class cmCPackComponentGroup; /** \class cmCPackNSISGenerator * \brief A generator for NSIS files diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 5d81a49..0f2e9b9 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -11,9 +11,17 @@ ============================================================================*/ #include "cmCPackRPMGenerator.h" +#include "cmCPackComponentGroup.h" +#include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmSystemTools.h" +#include +#include +#include +#include +#include + cmCPackRPMGenerator::cmCPackRPMGenerator() { } diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index 4baef08..10c5572 100644 --- a/Source/CPack/cmCPackRPMGenerator.h +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -13,7 +13,12 @@ #ifndef cmCPackRPMGenerator_h #define cmCPackRPMGenerator_h +#include + #include "cmCPackGenerator.h" +#include "cmTypeMacro.h" + +#include /** \class cmCPackRPMGenerator * \brief A generator for RPM packages diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 4d07a7e..4c33a08 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -12,13 +12,15 @@ #include "cmCPackSTGZGenerator.h" +#include "cmCPackGenerator.h" #include "cmCPackLog.h" -#include "cmGlobalGenerator.h" -#include "cmMakefile.h" #include "cmSystemTools.h" -#include "cmake.h" #include +#include +#include +#include +#include #include // include sys/stat.h after sys/types.h diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h index 94cc8aa..2a68f2c 100644 --- a/Source/CPack/cmCPackSTGZGenerator.h +++ b/Source/CPack/cmCPackSTGZGenerator.h @@ -13,7 +13,13 @@ #ifndef cmCPackSTGZGenerator_h #define cmCPackSTGZGenerator_h +#include + +#include "cmCPackGenerator.h" #include "cmCPackTGZGenerator.h" +#include "cmTypeMacro.h" + +#include /** \class cmCPackSTGZGenerator * \brief A generator for Self extractable TGZ files diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx index 7c5c245..8df53a8 100644 --- a/Source/CPack/cmCPackTGZGenerator.cxx +++ b/Source/CPack/cmCPackTGZGenerator.cxx @@ -12,6 +12,9 @@ #include "cmCPackTGZGenerator.h" +#include "cmArchiveWrite.h" +#include "cmCPackArchiveGenerator.h" + cmCPackTGZGenerator::cmCPackTGZGenerator() : cmCPackArchiveGenerator(cmArchiveWrite::CompressGZip, "paxr") { diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h index cb7620c..78cd109 100644 --- a/Source/CPack/cmCPackTGZGenerator.h +++ b/Source/CPack/cmCPackTGZGenerator.h @@ -13,7 +13,11 @@ #ifndef cmCPackTGZGenerator_h #define cmCPackTGZGenerator_h +#include + #include "cmCPackArchiveGenerator.h" +#include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTGZGenerator * \brief A generator for TGZ files diff --git a/Source/CPack/cmCPackTXZGenerator.cxx b/Source/CPack/cmCPackTXZGenerator.cxx index d17a164..c708022 100644 --- a/Source/CPack/cmCPackTXZGenerator.cxx +++ b/Source/CPack/cmCPackTXZGenerator.cxx @@ -12,6 +12,9 @@ #include "cmCPackTXZGenerator.h" +#include "cmArchiveWrite.h" +#include "cmCPackArchiveGenerator.h" + cmCPackTXZGenerator::cmCPackTXZGenerator() : cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr") { diff --git a/Source/CPack/cmCPackTXZGenerator.h b/Source/CPack/cmCPackTXZGenerator.h index 87c92ef..6d6db74 100644 --- a/Source/CPack/cmCPackTXZGenerator.h +++ b/Source/CPack/cmCPackTXZGenerator.h @@ -13,7 +13,11 @@ #ifndef cmCPackTXZGenerator_h #define cmCPackTXZGenerator_h +#include + #include "cmCPackArchiveGenerator.h" +#include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTXZGenerator * \brief A generator for TXZ files diff --git a/Source/CPack/cmCPackTarBZip2Generator.cxx b/Source/CPack/cmCPackTarBZip2Generator.cxx index 694d392..09bda8c 100644 --- a/Source/CPack/cmCPackTarBZip2Generator.cxx +++ b/Source/CPack/cmCPackTarBZip2Generator.cxx @@ -12,6 +12,9 @@ #include "cmCPackTarBZip2Generator.h" +#include "cmArchiveWrite.h" +#include "cmCPackArchiveGenerator.h" + cmCPackTarBZip2Generator::cmCPackTarBZip2Generator() : cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, "paxr") { diff --git a/Source/CPack/cmCPackTarBZip2Generator.h b/Source/CPack/cmCPackTarBZip2Generator.h index 6fec882..d7b7277 100644 --- a/Source/CPack/cmCPackTarBZip2Generator.h +++ b/Source/CPack/cmCPackTarBZip2Generator.h @@ -13,7 +13,11 @@ #ifndef cmCPackTarBZip2Generator_h #define cmCPackTarBZip2Generator_h +#include + #include "cmCPackArchiveGenerator.h" +#include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTarBZip2Generator * \brief A generator for TarBZip2 files diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx index aec6893..a2b0b66 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.cxx +++ b/Source/CPack/cmCPackTarCompressGenerator.cxx @@ -12,6 +12,9 @@ #include "cmCPackTarCompressGenerator.h" +#include "cmArchiveWrite.h" +#include "cmCPackArchiveGenerator.h" + cmCPackTarCompressGenerator::cmCPackTarCompressGenerator() : cmCPackArchiveGenerator(cmArchiveWrite::CompressCompress, "paxr") { diff --git a/Source/CPack/cmCPackTarCompressGenerator.h b/Source/CPack/cmCPackTarCompressGenerator.h index 02926a2..9213d81 100644 --- a/Source/CPack/cmCPackTarCompressGenerator.h +++ b/Source/CPack/cmCPackTarCompressGenerator.h @@ -13,7 +13,11 @@ #ifndef cmCPackTarCompressGenerator_h #define cmCPackTarCompressGenerator_h -#include "cmCPackTGZGenerator.h" +#include + +#include "cmCPackArchiveGenerator.h" +#include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackTarCompressGenerator * \brief A generator for TarCompress files diff --git a/Source/CPack/cmCPackZIPGenerator.cxx b/Source/CPack/cmCPackZIPGenerator.cxx index 9b42e6d..f2a2547 100644 --- a/Source/CPack/cmCPackZIPGenerator.cxx +++ b/Source/CPack/cmCPackZIPGenerator.cxx @@ -12,6 +12,9 @@ #include "cmCPackZIPGenerator.h" +#include "cmArchiveWrite.h" +#include "cmCPackArchiveGenerator.h" + cmCPackZIPGenerator::cmCPackZIPGenerator() : cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "zip") { diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h index 1130826..fdb10a9 100644 --- a/Source/CPack/cmCPackZIPGenerator.h +++ b/Source/CPack/cmCPackZIPGenerator.h @@ -13,7 +13,11 @@ #ifndef cmCPackZIPGenerator_h #define cmCPackZIPGenerator_h +#include + #include "cmCPackArchiveGenerator.h" +#include "cmCPackGenerator.h" +#include "cmTypeMacro.h" /** \class cmCPackZIPGenerator * \brief A generator for ZIP files diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index de572c0..be524b3 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -9,22 +9,30 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmSystemTools.h" +#include -// Need these for documentation support. #include "cmCPackGenerator.h" #include "cmCPackGeneratorFactory.h" +#include "cmCPackLog.h" #include "cmDocumentation.h" +#include "cmDocumentationEntry.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmSystemTools.h" +#include "cmTypeMacro.h" +#include "cm_auto_ptr.hxx" #include "cmake.h" -#include "cmake.h" - -#include "cmCPackLog.h" #include #include -#include +#include +#include +#include +#include +#include +#include +#include static const char* cmDocumentationName[][2] = { { CM_NULLPTR, " cpack - Packaging driver provided by CMake." }, ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.cxx | 29 +++++++++++++------------- Source/CPack/IFW/cmCPackIFWGenerator.h | 10 ++++++++- Source/CPack/IFW/cmCPackIFWInstaller.cxx | 14 ++++++++----- Source/CPack/IFW/cmCPackIFWInstaller.h | 8 +++++-- Source/CPack/IFW/cmCPackIFWPackage.cxx | 19 +++++++++++------ Source/CPack/IFW/cmCPackIFWPackage.h | 8 +++++-- Source/CPack/IFW/cmCPackIFWRepository.cxx | 12 ++++++----- Source/CPack/IFW/cmCPackIFWRepository.h | 5 ++++- Source/CPack/cmCPack7zGenerator.cxx | 3 +++ Source/CPack/cmCPack7zGenerator.h | 4 ++++ Source/CPack/cmCPackArchiveGenerator.cxx | 13 ++++++------ Source/CPack/cmCPackArchiveGenerator.h | 9 +++++++- Source/CPack/cmCPackComponentGroup.h | 3 ++- Source/CPack/cmCPackDebGenerator.cxx | 21 ++++++++----------- Source/CPack/cmCPackDebGenerator.h | 6 ++++++ Source/CPack/cmCPackGenerator.cxx | 5 ++++- Source/CPack/cmCPackGenerator.h | 18 +++++++++------- Source/CPack/cmCPackGeneratorFactory.cxx | 3 +++ Source/CPack/cmCPackGeneratorFactory.h | 9 +++++++- Source/CPack/cmCPackLog.cxx | 2 ++ Source/CPack/cmCPackLog.h | 7 +++++++ Source/CPack/cmCPackNSISGenerator.cxx | 11 ++++++---- Source/CPack/cmCPackNSISGenerator.h | 9 ++++++++ Source/CPack/cmCPackRPMGenerator.cxx | 8 +++++++ Source/CPack/cmCPackRPMGenerator.h | 5 +++++ Source/CPack/cmCPackSTGZGenerator.cxx | 8 ++++--- Source/CPack/cmCPackSTGZGenerator.h | 6 ++++++ Source/CPack/cmCPackTGZGenerator.cxx | 3 +++ Source/CPack/cmCPackTGZGenerator.h | 4 ++++ Source/CPack/cmCPackTXZGenerator.cxx | 3 +++ Source/CPack/cmCPackTXZGenerator.h | 4 ++++ Source/CPack/cmCPackTarBZip2Generator.cxx | 3 +++ Source/CPack/cmCPackTarBZip2Generator.h | 4 ++++ Source/CPack/cmCPackTarCompressGenerator.cxx | 3 +++ Source/CPack/cmCPackTarCompressGenerator.h | 6 +++++- Source/CPack/cmCPackZIPGenerator.cxx | 3 +++ Source/CPack/cmCPackZIPGenerator.h | 4 ++++ Source/CPack/cpack.cxx | 20 ++++++++++++------ 38 files changed, 230 insertions(+), 82 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Sep 7 00:01:07 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Sep 2016 00:01:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-877-g21ace9d Message-ID: <20160907040107.6A161F5B22@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 21ace9d9c4317c2fb13066ec73b6119e1643321b (commit) from 8317ea01aa3cf9319ef907e127fa6dbf9666cc53 (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=21ace9d9c4317c2fb13066ec73b6119e1643321b commit 21ace9d9c4317c2fb13066ec73b6119e1643321b Author: Kitware Robot AuthorDate: Wed Sep 7 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Wed Sep 7 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index fb13b21..1b36905 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 6) -set(CMake_VERSION_PATCH 20160906) +set(CMake_VERSION_PATCH 20160907) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 08:14:46 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 08:14:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1831-ge9c23dd Message-ID: <20160907121446.85E8DF4E26@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, next has been updated via e9c23dd91637f50b0b4a352a86f0126365e128e0 (commit) via 290e4ce8a89819d6617fa404513d8a1629cafea7 (commit) from 343ef96f1091e7ccab80d65f6ef9a225aa6d6064 (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=e9c23dd91637f50b0b4a352a86f0126365e128e0 commit e9c23dd91637f50b0b4a352a86f0126365e128e0 Merge: 343ef96 290e4ce Author: Brad King AuthorDate: Wed Sep 7 08:14:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 08:14:45 2016 -0400 Merge topic 'install-export-root-prefix' into next 290e4ce8 install: Fix computed import prefix in export files when it is "/" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=290e4ce8a89819d6617fa404513d8a1629cafea7 commit 290e4ce8a89819d6617fa404513d8a1629cafea7 Author: Ben Keller AuthorDate: Tue May 10 11:44:40 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 16:47:02 2016 -0400 install: Fix computed import prefix in export files when it is "/" When exporting from a project (with install(EXPORT ...)), the `Targets.cmake` file contains logic for computing the `_IMPORT_PREFIX` from its own location. This `_IMPORT_PREFIX` is then used in the `Targets-.cmake` file to generate the `IMPORTED_LOCATION_`. The generation unconditionally appends a "/" to `_IMPORT_PREFIX` before appending the rest of the path. If `_IMPORT_PREFIX` is "/", then the `IMPORTED_LOCATION_` properties all start with exactly two leading slashes ("//"). Exactly two leading slashes is a special case in POSIX file paths, such that its interpretation is left up to the implementation. This means that changing the path prefix from "/" to "//" should not be allowed. Since references to `_IMPORT_PREFIX` are always followed by a "/", simply check the value to replace "/" with "". diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index ceba69a..bcadaa0 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -122,7 +122,10 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) "PATH)\n"; dest = cmSystemTools::GetFilenamePath(dest); } - os << "\n"; + os << "if(_IMPORT_PREFIX STREQUAL \"/\")\n" + << " set(_IMPORT_PREFIX \"\")\n" + << "endif()\n" + << "\n"; } std::vector missingTargets; ----------------------------------------------------------------------- Summary of changes: Source/cmExportInstallFileGenerator.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 08:28:07 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 08:28:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-880-gf76bcee Message-ID: <20160907122807.202EBF5D25@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 f76bcee9a6a95b566e36b533a5fa45b496eb456b (commit) via 0fd54137aed8e1f76ee614bf7532881a91a0cbc5 (commit) via b4d996c305face73bbde6cbc6c8c80d4ee8752a6 (commit) from 21ace9d9c4317c2fb13066ec73b6119e1643321b (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: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 08:28:07 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 08:28:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1836-g48a3bf4 Message-ID: <20160907122807.51D19F5D26@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, next has been updated via 48a3bf498b9ae3d558067639fa0a6daa028d26ca (commit) via f76bcee9a6a95b566e36b533a5fa45b496eb456b (commit) via 21ace9d9c4317c2fb13066ec73b6119e1643321b (commit) via 0fd54137aed8e1f76ee614bf7532881a91a0cbc5 (commit) via b4d996c305face73bbde6cbc6c8c80d4ee8752a6 (commit) from e9c23dd91637f50b0b4a352a86f0126365e128e0 (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=48a3bf498b9ae3d558067639fa0a6daa028d26ca commit 48a3bf498b9ae3d558067639fa0a6daa028d26ca Merge: e9c23dd f76bcee Author: Brad King AuthorDate: Wed Sep 7 08:27:54 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 08:27:54 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 08:28:07 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 08:28:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.6.1-32-g0fd5413 Message-ID: <20160907122807.6C1D2F5D27@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 0fd54137aed8e1f76ee614bf7532881a91a0cbc5 (commit) via befe8648a3813e35869e8ba8291f43cb8bfca962 (commit) via b4d996c305face73bbde6cbc6c8c80d4ee8752a6 (commit) via b61eab249f6d119e6353c02c4c79ccb15a3825b9 (commit) from f9fc8f83d0784d2f9b73bb0a476675b2f34c8fbe (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/FindHDF5.cmake | 70 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 08:54:14 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 08:54:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1838-g1a7490c Message-ID: <20160907125414.29D18F5C59@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, next has been updated via 1a7490c01445a431a0467f8bd0132f98c343ea9b (commit) via 4b53a693bd804b15380e8adfafc4de47f3f3e50e (commit) from 48a3bf498b9ae3d558067639fa0a6daa028d26ca (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=1a7490c01445a431a0467f8bd0132f98c343ea9b commit 1a7490c01445a431a0467f8bd0132f98c343ea9b Merge: 48a3bf4 4b53a69 Author: Brad King AuthorDate: Wed Sep 7 08:54:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 08:54:13 2016 -0400 Merge topic 'backport-curl-fix' into next 4b53a693 curl: Backport certificate reuse fix from 7.50.2 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b53a693bd804b15380e8adfafc4de47f3f3e50e commit 4b53a693bd804b15380e8adfafc4de47f3f3e50e Author: Brad King AuthorDate: Wed Sep 7 08:46:42 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 08:46:42 2016 -0400 curl: Backport certificate reuse fix from 7.50.2 Backport curl upstream commit curl-7_50_2~32 (nss: refuse previously loaded certificate from file, 2016-08-22). diff --git a/Utilities/cmcurl/lib/vtls/nss.c b/Utilities/cmcurl/lib/vtls/nss.c index ad33f25..e467360 100644 --- a/Utilities/cmcurl/lib/vtls/nss.c +++ b/Utilities/cmcurl/lib/vtls/nss.c @@ -1004,10 +1004,10 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg; struct Curl_easy *data = connssl->data; const char *nickname = connssl->client_nickname; + static const char pem_slotname[] = "PEM Token #1"; if(connssl->obj_clicert) { /* use the cert/key provided by PEM reader */ - static const char pem_slotname[] = "PEM Token #1"; SECItem cert_der = { 0, NULL, 0 }; void *proto_win = SSL_RevealPinArg(sock); struct CERTCertificateStr *cert; @@ -1069,6 +1069,12 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, if(NULL == nickname) nickname = "[unknown]"; + if(!strncmp(nickname, pem_slotname, sizeof(pem_slotname) - 1U)) { + failf(data, "NSS: refusing previously loaded certificate from file: %s", + nickname); + return SECFailure; + } + if(NULL == *pRetKey) { failf(data, "NSS: private key not found for certificate: %s", nickname); return SECFailure; ----------------------------------------------------------------------- Summary of changes: Utilities/cmcurl/lib/vtls/nss.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 08:58:14 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 08:58:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1842-g0aeffa8 Message-ID: <20160907125814.DCB4EF5DE3@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, next has been updated via 0aeffa8d1ffc19161fb49220441e39121872da5b (commit) via a3fed59970d77338db0f4bda4c2e90ebccbe9159 (commit) via c5dcd31e92c0a09009a340e3fe23ced4f6190b64 (commit) via 983371a6eb247a68b628ad63326b1f0607fcf006 (commit) from 1a7490c01445a431a0467f8bd0132f98c343ea9b (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=0aeffa8d1ffc19161fb49220441e39121872da5b commit 0aeffa8d1ffc19161fb49220441e39121872da5b Merge: 1a7490c a3fed59 Author: Brad King AuthorDate: Wed Sep 7 08:58:14 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 08:58:14 2016 -0400 Merge topic 'test-release' into next a3fed599 Merge branch 'release' into test-release c5dcd31e CMake 3.6.2 983371a6 Merge branch 'backport-curl-fix' into release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3fed59970d77338db0f4bda4c2e90ebccbe9159 commit a3fed59970d77338db0f4bda4c2e90ebccbe9159 Merge: f76bcee c5dcd31 Author: Brad King AuthorDate: Wed Sep 7 08:57:20 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 08:57:20 2016 -0400 Merge branch 'release' into test-release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5dcd31e92c0a09009a340e3fe23ced4f6190b64 commit c5dcd31e92c0a09009a340e3fe23ced4f6190b64 Author: Brad King AuthorDate: Wed Sep 7 08:55:56 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 08:55:56 2016 -0400 CMake 3.6.2 diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c1395e5..241cc8d 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 6) -set(CMake_VERSION_PATCH 1) +set(CMake_VERSION_PATCH 2) #set(CMake_VERSION_RC 0) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=983371a6eb247a68b628ad63326b1f0607fcf006 commit 983371a6eb247a68b628ad63326b1f0607fcf006 Merge: 0fd5413 4b53a69 Author: Brad King AuthorDate: Wed Sep 7 08:54:20 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 08:54:20 2016 -0400 Merge branch 'backport-curl-fix' into release ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:32:13 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:32:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1844-g10ca709 Message-ID: <20160907133213.3B6A8F5DC8@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, next has been updated via 10ca7096fadc19f2f005a7f5efc3c71ecc7448ec (commit) via 9343a6d101cfdf5489bcc09435a16d36ea858539 (commit) from 0aeffa8d1ffc19161fb49220441e39121872da5b (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=10ca7096fadc19f2f005a7f5efc3c71ecc7448ec commit 10ca7096fadc19f2f005a7f5efc3c71ecc7448ec Merge: 0aeffa8 9343a6d Author: Brad King AuthorDate: Wed Sep 7 09:32:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:32:12 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next 9343a6d1 fixup! cpack-deb-package-description-fallback https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9343a6d101cfdf5489bcc09435a16d36ea858539 commit 9343a6d101cfdf5489bcc09435a16d36ea858539 Author: Brad King AuthorDate: Wed Sep 7 09:25:25 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 09:31:53 2016 -0400 fixup! cpack-deb-package-description-fallback diff --git a/Help/release/dev/cpack-deb-package-description-fallback b/Help/release/dev/cpack-deb-package-description-fallback deleted file mode 100644 index 6300dfc..0000000 --- a/Help/release/dev/cpack-deb-package-description-fallback +++ /dev/null @@ -1,11 +0,0 @@ -cpack-deb-package-description-fallback --------------------------------------- - -* The :module:`CPackDeb` module learned new package description - override rules to match :module:`CPackRPM` module behavior. - **Breaking change**: If :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` - variable is set to non default location then it is prefered to - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable. - Also a new :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION` - was introduced for component based packaging. - See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`. diff --git a/Help/release/dev/cpack-deb-package-description-fallback.rst b/Help/release/dev/cpack-deb-package-description-fallback.rst new file mode 100644 index 0000000..71ca821 --- /dev/null +++ b/Help/release/dev/cpack-deb-package-description-fallback.rst @@ -0,0 +1,15 @@ +cpack-deb-package-description-fallback +-------------------------------------- + +* The :module:`CPackDeb` module gained a new + :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION` + variable for component-specific package descriptions. + +* The :module:`CPackDeb` module changed its package description + override rules to match :module:`CPackRPM` module behavior. + If the :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` variable is set to + a non-default location then it is preferred to the + :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable. + This is a behavior change from previous versions but produces + more consistent and expected behavior. + See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cpack-deb-package-description-fallback | 11 ----------- .../dev/cpack-deb-package-description-fallback.rst | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 Help/release/dev/cpack-deb-package-description-fallback create mode 100644 Help/release/dev/cpack-deb-package-description-fallback.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:34:24 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:34:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1846-g8a695f8 Message-ID: <20160907133424.D130FF5EEE@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, next has been updated via 8a695f895a2799b84ee65e05d664483370c627a5 (commit) via 332b089ad213a1aa89658fffd8f68c9064c6d3db (commit) from 10ca7096fadc19f2f005a7f5efc3c71ecc7448ec (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=8a695f895a2799b84ee65e05d664483370c627a5 commit 8a695f895a2799b84ee65e05d664483370c627a5 Merge: 10ca709 332b089 Author: Brad King AuthorDate: Wed Sep 7 09:34:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:34:24 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' into next 332b089a CPack/DEB: Make package description variable precedence match RPM https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=332b089ad213a1aa89658fffd8f68c9064c6d3db commit 332b089ad213a1aa89658fffd8f68c9064c6d3db Author: Domen Vrankar AuthorDate: Mon Sep 5 23:58:33 2016 +0200 Commit: Brad King CommitDate: Wed Sep 7 09:33:35 2016 -0400 CPack/DEB: Make package description variable precedence match RPM Make `CPACK_DEBIAN_PACKAGE_DESCRIPTION` fallback variable precedence match CPackRPM behavior as much as possible. This is technically a breaking change, but the new behavior is more consistent with expectation anyway. Closes: #16272 diff --git a/Help/release/dev/cpack-deb-package-description-fallback.rst b/Help/release/dev/cpack-deb-package-description-fallback.rst new file mode 100644 index 0000000..71ca821 --- /dev/null +++ b/Help/release/dev/cpack-deb-package-description-fallback.rst @@ -0,0 +1,15 @@ +cpack-deb-package-description-fallback +-------------------------------------- + +* The :module:`CPackDeb` module gained a new + :variable:`CPACK_DEBIAN__PACKAGE_DESCRIPTION` + variable for component-specific package descriptions. + +* The :module:`CPackDeb` module changed its package description + override rules to match :module:`CPackRPM` module behavior. + If the :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` variable is set to + a non-default location then it is preferred to the + :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` variable. + This is a behavior change from previous versions but produces + more consistent and expected behavior. + See :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION`. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 1a7b923..423bb00 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -156,16 +156,18 @@ # * Default : :code:`CPACK_PACKAGE_CONTACT` # # .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION -# CPACK_COMPONENT__DESCRIPTION +# CPACK_DEBIAN__PACKAGE_DESCRIPTION # # The Debian package description # # * Mandatory : YES # * Default : # -# - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set or -# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` -# +# - :variable:`CPACK_COMPONENT__DESCRIPTION` (component based installers only) if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set to non default location, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` if set, +# - :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` default value if set, +# - or "no package description available" # # .. variable:: CPACK_DEBIAN_PACKAGE_SECTION # CPACK_DEBIAN__PACKAGE_SECTION @@ -829,24 +831,23 @@ function(cpack_deb_prepare_package_vars) endif() # Description: (mandatory) - if(NOT CPACK_DEB_PACKAGE_COMPONENT) - if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + if(CPACK_DEB_PACKAGE_COMPONENT) + if(CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_${_local_component_name}_PACKAGE_DESCRIPTION}") + elseif(CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_COMPONENT_${_local_component_name}_DESCRIPTION}") endif() - else() - set(component_description_var CPACK_COMPONENT_${_local_component_name}_DESCRIPTION) - - # component description overrides package description - if(${component_description_var}) - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${${component_description_var}}) - elseif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) - message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION or ${component_description_var}") - endif() - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + endif() + + if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + if(CPACK_PACKAGE_DESCRIPTION_FILE AND NOT "${CPACK_PACKAGE_DESCRIPTION_FILE}" STREQUAL "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + elseif(CPACK_PACKAGE_DESCRIPTION_SUMMARY) + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") + elseif(CPACK_PACKAGE_DESCRIPTION_FILE) # use default package description file content + file(READ "${CPACK_PACKAGE_DESCRIPTION_FILE}" CPACK_DEBIAN_PACKAGE_DESCRIPTION) + else() + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "no package description available") endif() endif() diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in index 74d816c..6c5a655 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description1.cmake.in @@ -15,8 +15,8 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) #set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1) # overriding previous descriptions -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") -set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "applications_description") -set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description") +set(CPACK_DEBIAN_APPLICATIONS_PACKAGE_DESCRIPTION "applications_description") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION "headers_description") # libraries does not have any description and should inherit from CPACK_PACKAGE_DESCRIPTION_SUMMARY unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) diff --git a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in index cda79bc..92226d8 100644 --- a/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in +++ b/Tests/CPackComponentsDEB/MyLibCPackConfig-components-description2.cmake.in @@ -17,10 +17,12 @@ set(CPACK_COMPONENTS_IGNORE_GROUPS 1) # overriding previous descriptions set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "main description 2") +# and override CPACK_PACKAGE_DESCRIPTION_SUMMARY because of precedence +set(CPACK_PACKAGE_DESCRIPTION_FILE + "@CPackComponentsDEB_SOURCE_DIR@/pkg_description.txt") + # Components do not have any description unset(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION) unset(CPACK_COMPONENT_HEADERS_DESCRIPTION) -unset(CPACK_COMPONENT_LIBRARIES_DESCRIPTION) - set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "library description") diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake index 35ca74c..7b94ca0 100644 --- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake +++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake @@ -55,12 +55,12 @@ if(DPKGDEB_EXECUTABLE) message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'") if("${dpkg_package_name}" STREQUAL "mylib-applications") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description") endif() elseif("${dpkg_package_name}" STREQUAL "mylib-headers") - if(NOT "${dpkg_description}" STREQUAL "main description 2") + if(NOT "${dpkg_description}" STREQUAL "Debian package description file") set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all} "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description") endif() diff --git a/Tests/CPackComponentsDEB/pkg_description.txt b/Tests/CPackComponentsDEB/pkg_description.txt new file mode 100644 index 0000000..99f8f9b --- /dev/null +++ b/Tests/CPackComponentsDEB/pkg_description.txt @@ -0,0 +1 @@ +Debian package description file ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:40:27 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:40:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1848-g930d0f6 Message-ID: <20160907134027.8434FF398C@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, next has been updated via 930d0f6c8cf7ad0a6ffea015d31491589600937e (commit) via f8c222228d78472a1135800e3a51580186909027 (commit) from 8a695f895a2799b84ee65e05d664483370c627a5 (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=930d0f6c8cf7ad0a6ffea015d31491589600937e commit 930d0f6c8cf7ad0a6ffea015d31491589600937e Merge: 8a695f8 f8c2222 Author: Brad King AuthorDate: Wed Sep 7 09:40:26 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:40:26 2016 -0400 Merge topic 'GNUInstallDirs-function' into next f8c22222 fixup! GNUInstallDirs: Add set_full_install_dir macro https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8c222228d78472a1135800e3a51580186909027 commit f8c222228d78472a1135800e3a51580186909027 Author: Brad King AuthorDate: Wed Sep 7 09:39:48 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 09:39:48 2016 -0400 fixup! GNUInstallDirs: Add set_full_install_dir macro diff --git a/Help/release/dev/GNUInstallDirs-function.rst b/Help/release/dev/GNUInstallDirs-function.rst new file mode 100644 index 0000000..65ea7fb --- /dev/null +++ b/Help/release/dev/GNUInstallDirs-function.rst @@ -0,0 +1,5 @@ +GNUInstallDirs-function +----------------------- + +* The :module:`GNUInstallDirs` module gained a new + :command:`GNUInstallDirs_get_absolute_install_dir` command. diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index eec9cb0..0c80b8a 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -103,18 +103,19 @@ # Macros # ^^^^^^ # -# :: +# .. command:: GNUInstallDirs_get_absolute_install_dir # -# GNUInstallDirs_get_absolute_install_dir(absvar var) +# :: # -# Set the given variable ``absvar`` to the absolute path contained -# within the variable ``var``. This is to allow the computation of an -# absolute path, accounting for all the special cases documented -# above. While this macro is used to compute the various -# ``CMAKE_INSTALL_FULL_`` variables, it is exposed publicly to -# allow users who create additional path variables to also compute -# absolute paths where necessary, using the same logic. +# GNUInstallDirs_get_absolute_install_dir(absvar var) # +# Set the given variable ``absvar`` to the absolute path contained +# within the variable ``var``. This is to allow the computation of an +# absolute path, accounting for all the special cases documented +# above. While this macro is used to compute the various +# ``CMAKE_INSTALL_FULL_`` variables, it is exposed publicly to +# allow users who create additional path variables to also compute +# absolute paths where necessary, using the same logic. #============================================================================= # Copyright 2015 Alex Turbov ----------------------------------------------------------------------- Summary of changes: Help/release/dev/GNUInstallDirs-function.rst | 5 +++++ Modules/GNUInstallDirs.cmake | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 Help/release/dev/GNUInstallDirs-function.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:41:28 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:41:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1850-gcd86f89 Message-ID: <20160907134128.5E481F46C5@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, next has been updated via cd86f89237cbe29cc8eadb8e608e2c613a974f8b (commit) via 17a24dc3b9ed5e09b5382deb97343496af902ec0 (commit) from 930d0f6c8cf7ad0a6ffea015d31491589600937e (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=cd86f89237cbe29cc8eadb8e608e2c613a974f8b commit cd86f89237cbe29cc8eadb8e608e2c613a974f8b Merge: 930d0f6 17a24dc Author: Brad King AuthorDate: Wed Sep 7 09:41:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:41:27 2016 -0400 Merge topic 'GNUInstallDirs-function' into next 17a24dc3 GNUInstallDirs: Add macro to expose internal logic publicly https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17a24dc3b9ed5e09b5382deb97343496af902ec0 commit 17a24dc3b9ed5e09b5382deb97343496af902ec0 Author: Roger Leigh AuthorDate: Sun Aug 28 18:19:02 2016 +0100 Commit: Brad King CommitDate: Wed Sep 7 09:40:41 2016 -0400 GNUInstallDirs: Add macro to expose internal logic publicly diff --git a/Help/release/dev/GNUInstallDirs-function.rst b/Help/release/dev/GNUInstallDirs-function.rst new file mode 100644 index 0000000..65ea7fb --- /dev/null +++ b/Help/release/dev/GNUInstallDirs-function.rst @@ -0,0 +1,5 @@ +GNUInstallDirs-function +----------------------- + +* The :module:`GNUInstallDirs` module gained a new + :command:`GNUInstallDirs_get_absolute_install_dir` command. diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index b42084e..0c80b8a 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -99,6 +99,23 @@ # `Filesystem Hierarchy Standard`_. # # .. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html +# +# Macros +# ^^^^^^ +# +# .. command:: GNUInstallDirs_get_absolute_install_dir +# +# :: +# +# GNUInstallDirs_get_absolute_install_dir(absvar var) +# +# Set the given variable ``absvar`` to the absolute path contained +# within the variable ``var``. This is to allow the computation of an +# absolute path, accounting for all the special cases documented +# above. While this macro is used to compute the various +# ``CMAKE_INSTALL_FULL_`` variables, it is exposed publicly to +# allow users who create additional path variables to also compute +# absolute paths where necessary, using the same logic. #============================================================================= # Copyright 2015 Alex Turbov @@ -300,55 +317,59 @@ mark_as_advanced( CMAKE_INSTALL_DOCDIR ) -# Result directories -# -foreach(dir - BINDIR - SBINDIR - LIBEXECDIR - SYSCONFDIR - SHAREDSTATEDIR - LOCALSTATEDIR - LIBDIR - INCLUDEDIR - OLDINCLUDEDIR - DATAROOTDIR - DATADIR - INFODIR - LOCALEDIR - MANDIR - DOCDIR - ) - if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_${dir}}") +macro(GNUInstallDirs_get_absolute_install_dir absvar var) + if(NOT IS_ABSOLUTE "${${var}}") # Handle special cases: # - CMAKE_INSTALL_PREFIX == / # - CMAKE_INSTALL_PREFIX == /usr # - CMAKE_INSTALL_PREFIX == /opt/... if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/") if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}") + set(${absvar} "/${${var}}") else() - if (NOT "${CMAKE_INSTALL_${dir}}" MATCHES "^usr/") - set(CMAKE_INSTALL_${dir} "usr/${CMAKE_INSTALL_${dir}}") + if (NOT "${${var}}" MATCHES "^usr/") + set(${var} "usr/${${var}}") endif() - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}") + set(${absvar} "/${${var}}") endif() elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}") + set(${absvar} "/${${var}}") else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") + set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*") if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") - set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}${CMAKE_INSTALL_PREFIX}") + set(${absvar} "/${${var}}${CMAKE_INSTALL_PREFIX}") else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") + set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") + set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}") + set(${absvar} "${${var}}") endif() +endmacro() + +# Result directories +# +foreach(dir + BINDIR + SBINDIR + LIBEXECDIR + SYSCONFDIR + SHAREDSTATEDIR + LOCALSTATEDIR + LIBDIR + INCLUDEDIR + OLDINCLUDEDIR + DATAROOTDIR + DATADIR + INFODIR + LOCALEDIR + MANDIR + DOCDIR + ) + GNUInstallDirs_get_absolute_install_dir(CMAKE_INSTALL_FULL_${dir} CMAKE_INSTALL_${dir}) endforeach() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:48:20 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:48:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-882-g48b33b0 Message-ID: <20160907134820.523B3F5B27@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 48b33b0633f61d453146e2ce4813b9731c6f0836 (commit) via 29768b03eabcff13b332497caf2fb0e1c1ca717b (commit) from f76bcee9a6a95b566e36b533a5fa45b496eb456b (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=48b33b0633f61d453146e2ce4813b9731c6f0836 commit 48b33b0633f61d453146e2ce4813b9731c6f0836 Merge: f76bcee 29768b0 Author: Brad King AuthorDate: Wed Sep 7 09:48:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:48:17 2016 -0400 Merge topic 'FindMatlab-fix-empty-list-index' 29768b03 FindMatlab: Avoid indexing an empty list of versions ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:48:23 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:48:23 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-885-g6137054 Message-ID: <20160907134825.6C35EF5B20@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 6137054744e262cf8b1ddebfa4a08e00a0feffed (commit) via 042aca557defd72d7205becb7e54c9f93793b496 (commit) via a756c74da58196f670633c1d08840dc6e3d62fea (commit) from 48b33b0633f61d453146e2ce4813b9731c6f0836 (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=6137054744e262cf8b1ddebfa4a08e00a0feffed commit 6137054744e262cf8b1ddebfa4a08e00a0feffed Merge: 48b33b0 042aca5 Author: Brad King AuthorDate: Wed Sep 7 09:48:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:48:21 2016 -0400 Merge topic 'vs-minor-cleanups' 042aca55 VS: Verify that MSBuild.exe and devenv.com exist before using them a756c74d Help: Clarify meaning of MSVC variables ----------------------------------------------------------------------- Summary of changes: Help/variable/MSVC10.rst | 5 ++--- Help/variable/MSVC11.rst | 5 ++--- Help/variable/MSVC12.rst | 5 ++--- Help/variable/MSVC14.rst | 5 ++--- Help/variable/MSVC80.rst | 5 ++--- Help/variable/MSVC90.rst | 5 ++--- Source/cmGlobalVisualStudio10Generator.cxx | 14 ++++++++++---- Source/cmGlobalVisualStudio7Generator.cxx | 13 ++++++++++--- 8 files changed, 32 insertions(+), 25 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:48:28 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:48:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-887-gbb000ba Message-ID: <20160907134828.5F9EAF5B51@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 bb000ba4fa53a91354f6630f0ef0666ef31eda4c (commit) via 1bc33257d48bb4b54333b755951967c6c3fa1df6 (commit) from 6137054744e262cf8b1ddebfa4a08e00a0feffed (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=bb000ba4fa53a91354f6630f0ef0666ef31eda4c commit bb000ba4fa53a91354f6630f0ef0666ef31eda4c Merge: 6137054 1bc3325 Author: Brad King AuthorDate: Wed Sep 7 09:48:26 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:48:26 2016 -0400 Merge topic 'wix-fix-static-prefix' 1bc33257 CPackWIX: Fix incomplete CPACK_WIX_SKIP_PROGRAM_FOLDER implementation ----------------------------------------------------------------------- Summary of changes: Source/CPack/WiX/cmCPackWIXGenerator.cxx | 39 +++++++++++++-------- Source/CPack/WiX/cmCPackWIXGenerator.h | 2 ++ Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx | 4 +-- Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h | 4 +-- Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx | 6 ++-- Source/CPack/WiX/cmWIXFeaturesSourceWriter.h | 3 +- Source/CPack/WiX/cmWIXFilesSourceWriter.cxx | 14 +++----- Source/CPack/WiX/cmWIXFilesSourceWriter.h | 5 ++- Source/CPack/WiX/cmWIXSourceWriter.cxx | 21 +++++++++-- Source/CPack/WiX/cmWIXSourceWriter.h | 19 +++++++++- 10 files changed, 79 insertions(+), 38 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:48:31 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:48:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-889-g4469e98 Message-ID: <20160907134831.66A0AF5B57@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 4469e986ee2189378f9054231b796249e6db54e1 (commit) via d47c7bf608d3ca23c8d518ff98a42d6d5f449a70 (commit) from bb000ba4fa53a91354f6630f0ef0666ef31eda4c (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=4469e986ee2189378f9054231b796249e6db54e1 commit 4469e986ee2189378f9054231b796249e6db54e1 Merge: bb000ba d47c7bf Author: Brad King AuthorDate: Wed Sep 7 09:48:29 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:48:29 2016 -0400 Merge topic 'include-what-you-use' d47c7bf6 CPack: include what you use ----------------------------------------------------------------------- Summary of changes: Source/CPack/IFW/cmCPackIFWGenerator.cxx | 29 +++++++++++++------------- Source/CPack/IFW/cmCPackIFWGenerator.h | 10 ++++++++- Source/CPack/IFW/cmCPackIFWInstaller.cxx | 14 ++++++++----- Source/CPack/IFW/cmCPackIFWInstaller.h | 8 +++++-- Source/CPack/IFW/cmCPackIFWPackage.cxx | 19 +++++++++++------ Source/CPack/IFW/cmCPackIFWPackage.h | 8 +++++-- Source/CPack/IFW/cmCPackIFWRepository.cxx | 12 ++++++----- Source/CPack/IFW/cmCPackIFWRepository.h | 5 ++++- Source/CPack/cmCPack7zGenerator.cxx | 3 +++ Source/CPack/cmCPack7zGenerator.h | 4 ++++ Source/CPack/cmCPackArchiveGenerator.cxx | 13 ++++++------ Source/CPack/cmCPackArchiveGenerator.h | 9 +++++++- Source/CPack/cmCPackComponentGroup.h | 3 ++- Source/CPack/cmCPackDebGenerator.cxx | 21 ++++++++----------- Source/CPack/cmCPackDebGenerator.h | 6 ++++++ Source/CPack/cmCPackGenerator.cxx | 5 ++++- Source/CPack/cmCPackGenerator.h | 18 +++++++++------- Source/CPack/cmCPackGeneratorFactory.cxx | 3 +++ Source/CPack/cmCPackGeneratorFactory.h | 9 +++++++- Source/CPack/cmCPackLog.cxx | 2 ++ Source/CPack/cmCPackLog.h | 7 +++++++ Source/CPack/cmCPackNSISGenerator.cxx | 11 ++++++---- Source/CPack/cmCPackNSISGenerator.h | 9 ++++++++ Source/CPack/cmCPackRPMGenerator.cxx | 8 +++++++ Source/CPack/cmCPackRPMGenerator.h | 5 +++++ Source/CPack/cmCPackSTGZGenerator.cxx | 8 ++++--- Source/CPack/cmCPackSTGZGenerator.h | 6 ++++++ Source/CPack/cmCPackTGZGenerator.cxx | 3 +++ Source/CPack/cmCPackTGZGenerator.h | 4 ++++ Source/CPack/cmCPackTXZGenerator.cxx | 3 +++ Source/CPack/cmCPackTXZGenerator.h | 4 ++++ Source/CPack/cmCPackTarBZip2Generator.cxx | 3 +++ Source/CPack/cmCPackTarBZip2Generator.h | 4 ++++ Source/CPack/cmCPackTarCompressGenerator.cxx | 3 +++ Source/CPack/cmCPackTarCompressGenerator.h | 6 +++++- Source/CPack/cmCPackZIPGenerator.cxx | 3 +++ Source/CPack/cmCPackZIPGenerator.h | 4 ++++ Source/CPack/cpack.cxx | 20 ++++++++++++------ 38 files changed, 230 insertions(+), 82 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:48:34 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:48:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-891-g85bfec7 Message-ID: <20160907134834.81C34F5B5D@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 85bfec7572f84ba259e0eabe383f6dcb0bd45d9b (commit) via f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e (commit) from 4469e986ee2189378f9054231b796249e6db54e1 (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=85bfec7572f84ba259e0eabe383f6dcb0bd45d9b commit 85bfec7572f84ba259e0eabe383f6dcb0bd45d9b Merge: 4469e98 f1ad71d Author: Brad King AuthorDate: Wed Sep 7 09:48:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:48:32 2016 -0400 Merge topic 'fix-continue-after-error' f1ad71d7 cmMakefile: Restore nested error logic use of cmExecutionStatus ----------------------------------------------------------------------- Summary of changes: Source/cmExecutionStatus.h | 4 ++++ Source/cmFunctionCommand.cxx | 6 +++--- Source/cmMacroCommand.cxx | 4 ++-- Source/cmMakefile.cxx | 19 ++++++++----------- .../ContinueAfterError-result.txt} | 0 .../Configure/ContinueAfterError-stderr.txt | 13 +++++++++++++ .../Configure/ContinueAfterError-stdout.txt | 11 +++++++++++ Tests/RunCMake/Configure/ContinueAfterError.cmake | 19 +++++++++++++++++++ Tests/RunCMake/Configure/RunCMakeTest.cmake | 1 + 9 files changed, 61 insertions(+), 16 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => Configure/ContinueAfterError-result.txt} (100%) create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stderr.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stdout.txt create mode 100644 Tests/RunCMake/Configure/ContinueAfterError.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:48:37 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:48:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-893-g8665332 Message-ID: <20160907134837.85F17F5B74@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 866533251369604c03c32e1f657b4164b5c12348 (commit) via 332b089ad213a1aa89658fffd8f68c9064c6d3db (commit) from 85bfec7572f84ba259e0eabe383f6dcb0bd45d9b (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=866533251369604c03c32e1f657b4164b5c12348 commit 866533251369604c03c32e1f657b4164b5c12348 Merge: 85bfec7 332b089 Author: Brad King AuthorDate: Wed Sep 7 09:48:35 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:48:35 2016 -0400 Merge topic 'cpack-deb-package-description-fallback' 332b089a CPack/DEB: Make package description variable precedence match RPM ----------------------------------------------------------------------- Summary of changes: .../dev/cpack-deb-package-description-fallback.rst | 15 +++++++ Modules/CPackDeb.cmake | 43 ++++++++++---------- ...LibCPackConfig-components-description1.cmake.in | 6 +-- ...LibCPackConfig-components-description2.cmake.in | 6 ++- ...CPackVerifyResult-components-description2.cmake | 4 +- Tests/CPackComponentsDEB/pkg_description.txt | 1 + 6 files changed, 47 insertions(+), 28 deletions(-) create mode 100644 Help/release/dev/cpack-deb-package-description-fallback.rst create mode 100644 Tests/CPackComponentsDEB/pkg_description.txt hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:48:40 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:48:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-895-g7f7e5ea Message-ID: <20160907134840.65CECF5B80@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 7f7e5eafd8bc00259c9922a68a60c06ab67c91a9 (commit) via 17a24dc3b9ed5e09b5382deb97343496af902ec0 (commit) from 866533251369604c03c32e1f657b4164b5c12348 (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=7f7e5eafd8bc00259c9922a68a60c06ab67c91a9 commit 7f7e5eafd8bc00259c9922a68a60c06ab67c91a9 Merge: 8665332 17a24dc Author: Brad King AuthorDate: Wed Sep 7 09:48:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 09:48:38 2016 -0400 Merge topic 'GNUInstallDirs-function' 17a24dc3 GNUInstallDirs: Add macro to expose internal logic publicly ----------------------------------------------------------------------- Summary of changes: Help/release/dev/GNUInstallDirs-function.rst | 5 ++ Modules/GNUInstallDirs.cmake | 81 ++++++++++++++++---------- 2 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 Help/release/dev/GNUInstallDirs-function.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 09:49:20 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 09:49:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1858-gde88d33 Message-ID: <20160907134920.84D68F5B93@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, next has been updated via de88d33585aa66b163f280c4d2224437b53e6972 (commit) via 7f7e5eafd8bc00259c9922a68a60c06ab67c91a9 (commit) via 866533251369604c03c32e1f657b4164b5c12348 (commit) via 85bfec7572f84ba259e0eabe383f6dcb0bd45d9b (commit) via 4469e986ee2189378f9054231b796249e6db54e1 (commit) via bb000ba4fa53a91354f6630f0ef0666ef31eda4c (commit) via 6137054744e262cf8b1ddebfa4a08e00a0feffed (commit) via 48b33b0633f61d453146e2ce4813b9731c6f0836 (commit) from cd86f89237cbe29cc8eadb8e608e2c613a974f8b (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=de88d33585aa66b163f280c4d2224437b53e6972 commit de88d33585aa66b163f280c4d2224437b53e6972 Merge: cd86f89 7f7e5ea Author: Brad King AuthorDate: Wed Sep 7 09:48:52 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 09:48:52 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 10:32:05 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 10:32:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1863-g331f211 Message-ID: <20160907143205.EAF3CF5DBF@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, next has been updated via 331f211b3779db266082828c0febd51e0d94a3e9 (commit) via d28da906fed16ab7f45440db65c8c84e15b53996 (commit) via 8c65a5017fe6a6dfe6d57018e28decd7649588d4 (commit) via f70c71c5a9759324d9e610bc919832b7500fd116 (commit) via e11cd31fa0cce8210577ee46b6a33ee371f4fe64 (commit) from de88d33585aa66b163f280c4d2224437b53e6972 (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=331f211b3779db266082828c0febd51e0d94a3e9 commit 331f211b3779db266082828c0febd51e0d94a3e9 Merge: de88d33 d28da90 Author: Brad King AuthorDate: Wed Sep 7 10:32:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 10:32:04 2016 -0400 Merge topic 'fortran-depend-cleanup' into next d28da906 cmFortranParser: Inject a newline at end-of-file when missing 8c65a501 cmFortranParser: Revise indentation style to match rest of CMake f70c71c5 cmFortranLexer: Update to flex 2.6 e11cd31f Fortran: Warn when dependency scanning fails to parse a source file https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d28da906fed16ab7f45440db65c8c84e15b53996 commit d28da906fed16ab7f45440db65c8c84e15b53996 Author: Brad King AuthorDate: Mon Sep 5 14:18:32 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 15:52:40 2016 -0400 cmFortranParser: Inject a newline at end-of-file when missing Our parser grammar expects all statements to end in an `EOSTMT` token such as a newline. Ensure that the last statement in a file can be parsed even if it is missing a newline. diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index d27a192..2b58375 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -118,11 +118,13 @@ struct cmFortranFile : File(file) , Buffer(buffer) , Directory(dir) + , LastCharWasNewline(false) { } FILE* File; YY_BUFFER_STATE Buffer; std::string Directory; + bool LastCharWasNewline; }; struct cmFortranParser_s diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index d43d47c..639b3f0 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -119,8 +119,19 @@ int cmFortranParser_Input(cmFortranParser* parser, char* buffer, // Read from the file on top of the stack. If the stack is empty, // the end of the translation unit has been reached. if (!parser->FileStack.empty()) { - FILE* file = parser->FileStack.top().File; - return (int)fread(buffer, 1, bufferSize, file); + cmFortranFile& ff = parser->FileStack.top(); + FILE* file = ff.File; + size_t n = fread(buffer, 1, bufferSize, file); + if (n > 0) { + ff.LastCharWasNewline = buffer[n - 1] == '\n'; + } else if (!ff.LastCharWasNewline) { + // The file ended without a newline. Inject one so + // that the file always ends in an end-of-statement. + buffer[0] = '\n'; + n = 1; + ff.LastCharWasNewline = true; + } + return (int)n; } return 0; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c65a5017fe6a6dfe6d57018e28decd7649588d4 commit 8c65a5017fe6a6dfe6d57018e28decd7649588d4 Author: Brad King AuthorDate: Fri Sep 2 11:05:06 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 15:52:40 2016 -0400 cmFortranParser: Revise indentation style to match rest of CMake While at it, remove unused token CPP_TOENDL. diff --git a/Source/cmFortranParser.cxx b/Source/cmFortranParser.cxx index 21a6443..be2d5ab 100644 --- a/Source/cmFortranParser.cxx +++ b/Source/cmFortranParser.cxx @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -199,11 +199,10 @@ extern int cmFortran_yydebug; F90PPR_ENDIF = 280, COMMA = 281, DCOLON = 282, - CPP_TOENDL = 283, - UNTERMINATED_STRING = 284, - STRING = 285, - WORD = 286, - CPP_INCLUDE_ANGLE = 287 + UNTERMINATED_STRING = 283, + STRING = 284, + WORD = 285, + CPP_INCLUDE_ANGLE = 286 }; #endif /* Tokens. */ @@ -232,23 +231,24 @@ extern int cmFortran_yydebug; #define F90PPR_ENDIF 280 #define COMMA 281 #define DCOLON 282 -#define CPP_TOENDL 283 -#define UNTERMINATED_STRING 284 -#define STRING 285 -#define WORD 286 -#define CPP_INCLUDE_ANGLE 287 +#define UNTERMINATED_STRING 283 +#define STRING 284 +#define WORD 285 +#define CPP_INCLUDE_ANGLE 286 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 81 "cmFortranParser.y" /* yacc.c:355 */ char* string; -#line 251 "cmFortranParser.cxx" /* yacc.c:355 */ +#line 249 "cmFortranParser.cxx" /* yacc.c:355 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif @@ -503,10 +503,10 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 290 +#define YYLAST 249 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 33 +#define YYNTOKENS 32 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 16 /* YYNRULES -- Number of rules. */ @@ -517,7 +517,7 @@ union yyalloc /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 287 +#define YYMAXUTOK 286 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -554,19 +554,19 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32 + 25, 26, 27, 28, 29, 30, 31 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_uint8 yyrline[] = { - 0, 104, 104, 104, 106, 106, 108, 114, 124, 154, - 165, 178, 189, 196, 203, 210, 216, 222, 228, 234, - 239, 244, 249, 254, 258, 259, 260, 265, 265, 265, - 266, 266, 267, 267, 268, 268, 269, 269, 270, 270, - 271, 271, 272, 272, 273, 273, 274, 274, 277, 278, - 279, 280, 281, 282, 283 + 0, 103, 103, 103, 105, 105, 108, 113, 120, 138, + 146, 156, 164, 169, 174, 179, 184, 189, 194, 199, + 203, 207, 211, 215, 218, 219, 220, 225, 225, 225, + 226, 226, 227, 227, 228, 228, 229, 229, 230, 230, + 231, 231, 232, 232, 233, 233, 234, 234, 237, 238, + 239, 240, 241, 242, 243 }; #endif @@ -580,11 +580,10 @@ static const char *const yytname[] = "F90PPR_DEFINE", "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF", "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF", "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", - "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA", "DCOLON", "CPP_TOENDL", - "UNTERMINATED_STRING", "STRING", "WORD", "CPP_INCLUDE_ANGLE", "$accept", - "code", "stmt", "assignment_stmt", "keyword_stmt", "include", "define", - "undef", "ifdef", "ifndef", "if", "elif", "else", "endif", "other", - "misc_code", YY_NULLPTR + "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA", "DCOLON", "UNTERMINATED_STRING", + "STRING", "WORD", "CPP_INCLUDE_ANGLE", "$accept", "code", "stmt", + "assignment_stmt", "keyword_stmt", "include", "define", "undef", "ifdef", + "ifndef", "if", "elif", "else", "endif", "other", "misc_code", YY_NULLPTR }; #endif @@ -596,14 +595,14 @@ static const yytype_uint16 yytoknum[] = 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287 + 285, 286 }; # endif -#define YYPACT_NINF -30 +#define YYPACT_NINF -29 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-30))) + (!!((Yystate) == (-29))) #define YYTABLE_NINF -1 @@ -614,17 +613,17 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -30, 41, -30, -30, -30, -30, -29, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, 259, -30, -30, -30, - -30, -28, -23, -18, -16, -13, -30, -30, -30, -30, - 2, -30, -30, -30, -30, -12, -9, -30, -30, 64, - -30, -30, -30, -30, -30, 71, 77, 83, 112, -30, - -30, -30, -30, -30, -30, -30, -30, -30, 118, 124, - 130, -24, -30, 159, 165, -30, 171, 177, 206, 212, - 218, -30, -30, -30, -30, -30, -30, -30, -1, 224, - -30, -30, -30, -30, -30, -30, -30, -30, -30, 253, - -30 + -29, 41, -29, -29, -29, -29, -28, -29, -29, -29, + -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -29, -29, -29, -29, -29, 219, -29, -29, -29, + -29, -26, -22, -17, -15, -12, -29, -29, -29, -29, + 2, -29, -29, -29, -29, -11, -8, -29, -29, 64, + -29, -29, -29, -29, -29, 70, 75, 80, 108, -29, + -29, -29, -29, -29, -29, -29, -29, -29, 113, 118, + 123, -25, -29, 128, 156, -29, 161, 166, 171, 176, + 204, -29, -29, -29, -29, -29, -29, -29, 3, 209, + -29, -29, -29, -29, -29, -29, -29, -29, -29, 214, + -29 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -648,8 +647,8 @@ static const yytype_uint8 yydefact[] = /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -27, -30 + -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -29, -29, -29, -27, -29 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -664,98 +663,88 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 49, 41, 50, 88, 0, 59, 60, 61, 51, 55, + 49, 41, 88, 50, 0, 59, 60, 61, 51, 55, 56, 57, 58, 52, 68, 53, 69, 70, 54, 71, 73, 74, 72, 76, 77, 78, 79, 80, 62, 63, - 97, 64, 65, 66, 0, 0, 0, 0, 0, 0, + 64, 65, 66, 97, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 4, 89, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 75, 60, 61, - 99, 0, 26, 27, 81, 60, 61, 0, 0, 0, - 82, 60, 61, 0, 0, 0, 83, 60, 61, 0, - 62, 63, 0, 64, 65, 66, 0, 62, 63, 0, - 64, 65, 66, 62, 63, 0, 64, 65, 66, 62, - 63, 0, 64, 65, 66, 84, 60, 61, 0, 0, - 0, 85, 60, 61, 0, 0, 0, 86, 60, 61, - 0, 0, 0, 87, 60, 61, 0, 0, 62, 63, - 0, 64, 65, 66, 62, 63, 0, 64, 65, 66, - 62, 63, 0, 64, 65, 66, 62, 63, 0, 64, - 65, 66, 90, 60, 61, 0, 0, 0, 91, 60, - 61, 0, 0, 0, 92, 60, 61, 0, 0, 0, - 93, 60, 61, 0, 0, 62, 63, 0, 64, 65, - 66, 62, 63, 0, 64, 65, 66, 62, 63, 0, - 64, 65, 66, 62, 63, 0, 64, 65, 66, 94, - 60, 61, 0, 0, 0, 95, 60, 61, 0, 0, - 0, 96, 60, 61, 0, 0, 0, 98, 60, 61, - 0, 0, 62, 63, 0, 64, 65, 66, 62, 63, - 0, 64, 65, 66, 62, 63, 0, 64, 65, 66, - 62, 63, 0, 64, 65, 66, 100, 60, 61, 0, + 99, 26, 27, 81, 60, 61, 0, 0, 82, 60, + 61, 0, 0, 83, 60, 61, 0, 0, 0, 0, + 62, 63, 64, 65, 66, 0, 62, 63, 64, 65, + 66, 62, 63, 64, 65, 66, 62, 63, 64, 65, + 66, 84, 60, 61, 0, 0, 85, 60, 61, 0, + 0, 86, 60, 61, 0, 0, 87, 60, 61, 0, + 0, 90, 60, 61, 62, 63, 64, 65, 66, 62, + 63, 64, 65, 66, 62, 63, 64, 65, 66, 62, + 63, 64, 65, 66, 62, 63, 64, 65, 66, 91, + 60, 61, 0, 0, 92, 60, 61, 0, 0, 93, + 60, 61, 0, 0, 94, 60, 61, 0, 0, 95, + 60, 61, 62, 63, 64, 65, 66, 62, 63, 64, + 65, 66, 62, 63, 64, 65, 66, 62, 63, 64, + 65, 66, 62, 63, 64, 65, 66, 96, 60, 61, + 0, 0, 98, 60, 61, 0, 0, 100, 60, 61, 0, 0, 42, 43, 44, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, - 63, 0, 64, 65, 66, 45, 46, 0, 0, 47, - 48 + 62, 63, 64, 65, 66, 62, 63, 64, 65, 66, + 62, 63, 64, 65, 66, 45, 46, 0, 47, 48 }; static const yytype_int8 yycheck[] = { - 27, 30, 30, 27, -1, 3, 4, 5, 31, 36, - 37, 38, 39, 31, 41, 31, 43, 44, 31, 31, - 47, 48, 31, 50, 51, 52, 53, 54, 26, 27, - 31, 29, 30, 31, -1, -1, -1, -1, -1, -1, + 27, 29, 27, 29, -1, 3, 4, 5, 30, 36, + 37, 38, 39, 30, 41, 30, 43, 44, 30, 30, + 47, 48, 30, 50, 51, 52, 53, 54, 26, 27, + 28, 29, 30, 30, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 3, 72, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 3, 4, 5, - 97, -1, 31, 32, 3, 4, 5, -1, -1, -1, - 3, 4, 5, -1, -1, -1, 3, 4, 5, -1, - 26, 27, -1, 29, 30, 31, -1, 26, 27, -1, - 29, 30, 31, 26, 27, -1, 29, 30, 31, 26, - 27, -1, 29, 30, 31, 3, 4, 5, -1, -1, - -1, 3, 4, 5, -1, -1, -1, 3, 4, 5, - -1, -1, -1, 3, 4, 5, -1, -1, 26, 27, - -1, 29, 30, 31, 26, 27, -1, 29, 30, 31, - 26, 27, -1, 29, 30, 31, 26, 27, -1, 29, - 30, 31, 3, 4, 5, -1, -1, -1, 3, 4, - 5, -1, -1, -1, 3, 4, 5, -1, -1, -1, - 3, 4, 5, -1, -1, 26, 27, -1, 29, 30, - 31, 26, 27, -1, 29, 30, 31, 26, 27, -1, - 29, 30, 31, 26, 27, -1, 29, 30, 31, 3, - 4, 5, -1, -1, -1, 3, 4, 5, -1, -1, - -1, 3, 4, 5, -1, -1, -1, 3, 4, 5, - -1, -1, 26, 27, -1, 29, 30, 31, 26, 27, - -1, 29, 30, 31, 26, 27, -1, 29, 30, 31, - 26, 27, -1, 29, 30, 31, 3, 4, 5, -1, + 97, 30, 31, 3, 4, 5, -1, -1, 3, 4, + 5, -1, -1, 3, 4, 5, -1, -1, -1, -1, + 26, 27, 28, 29, 30, -1, 26, 27, 28, 29, + 30, 26, 27, 28, 29, 30, 26, 27, 28, 29, + 30, 3, 4, 5, -1, -1, 3, 4, 5, -1, + -1, 3, 4, 5, -1, -1, 3, 4, 5, -1, + -1, 3, 4, 5, 26, 27, 28, 29, 30, 26, + 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, + 27, 28, 29, 30, 26, 27, 28, 29, 30, 3, + 4, 5, -1, -1, 3, 4, 5, -1, -1, 3, + 4, 5, -1, -1, 3, 4, 5, -1, -1, 3, + 4, 5, 26, 27, 28, 29, 30, 26, 27, 28, + 29, 30, 26, 27, 28, 29, 30, 26, 27, 28, + 29, 30, 26, 27, 28, 29, 30, 3, 4, 5, + -1, -1, 3, 4, 5, -1, -1, 3, 4, 5, -1, -1, 3, 4, 5, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, - 27, -1, 29, 30, 31, 26, 27, -1, -1, 30, - 31 + 26, 27, 28, 29, 30, 26, 27, 28, 29, 30, + 26, 27, 28, 29, 30, 26, 27, -1, 29, 30 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 34, 0, 1, 3, 5, 6, 7, 8, 9, + 0, 33, 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 31, 32, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 30, 3, 4, 5, 26, 27, 30, 31, 47, - 30, 31, 31, 31, 31, 47, 47, 47, 47, 3, - 4, 5, 26, 27, 29, 30, 31, 48, 47, 47, - 47, 31, 31, 47, 47, 3, 47, 47, 47, 47, - 47, 3, 3, 3, 3, 3, 3, 3, 27, 47, - 3, 3, 3, 3, 3, 3, 3, 31, 3, 47, + 20, 21, 22, 23, 24, 25, 30, 31, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 29, 3, 4, 5, 26, 27, 29, 30, 46, + 29, 30, 30, 30, 30, 46, 46, 46, 46, 3, + 4, 5, 26, 27, 28, 29, 30, 47, 46, 46, + 46, 30, 30, 46, 46, 3, 46, 46, 46, 46, + 46, 3, 3, 3, 3, 3, 3, 3, 27, 46, + 3, 3, 3, 3, 3, 3, 3, 30, 3, 46, 3 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 33, 34, 34, 35, 35, 36, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, - 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, - 44, 44, 45, 45, 46, 46, 47, 47, 48, 48, - 48, 48, 48, 48, 48 + 0, 32, 33, 33, 34, 34, 35, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, + 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, + 43, 43, 44, 44, 45, 45, 46, 46, 47, 47, + 47, 47, 47, 47, 47 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1449,239 +1438,217 @@ yyreduce: switch (yyn) { case 6: -#line 109 "cmFortranParser.y" /* yacc.c:1646 */ +#line 108 "cmFortranParser.y" /* yacc.c:1646 */ { free((yyvsp[-3].string)); - } -#line 1457 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1446 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 7: -#line 115 "cmFortranParser.y" /* yacc.c:1646 */ +#line 113 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-1].string), "interface")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + if (cmFortranParserIsKeyword((yyvsp[-1].string), "interface")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_SetInInterface(parser, true); } free((yyvsp[-1].string)); - } -#line 1471 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1458 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 8: -#line 125 "cmFortranParser.y" /* yacc.c:1646 */ +#line 120 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-3].string), "use")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + if (cmFortranParserIsKeyword((yyvsp[-3].string), "use")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - } - else if (cmFortranParserIsKeyword((yyvsp[-3].string), "module")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } else if (cmFortranParserIsKeyword((yyvsp[-3].string), "module")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleModule(parser, (yyvsp[-2].string)); - } - else if (cmFortranParserIsKeyword((yyvsp[-3].string), "interface")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } else if (cmFortranParserIsKeyword((yyvsp[-3].string), "interface")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_SetInInterface(parser, true); - } - else if (cmFortranParserIsKeyword((yyvsp[-2].string), "interface") && - cmFortranParserIsKeyword((yyvsp[-3].string), "end")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } else if (cmFortranParserIsKeyword((yyvsp[-2].string), "interface") && + cmFortranParserIsKeyword((yyvsp[-3].string), "end")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_SetInInterface(parser, false); - } + } free((yyvsp[-3].string)); free((yyvsp[-2].string)); - } -#line 1505 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1481 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 9: -#line 155 "cmFortranParser.y" /* yacc.c:1646 */ +#line 138 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-4].string), "use")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + if (cmFortranParserIsKeyword((yyvsp[-4].string), "use")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - } + } free((yyvsp[-4].string)); free((yyvsp[-2].string)); - } -#line 1520 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1494 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 10: -#line 166 "cmFortranParser.y" /* yacc.c:1646 */ +#line 146 "cmFortranParser.y" /* yacc.c:1646 */ { if (cmFortranParserIsKeyword((yyvsp[-6].string), "use") && - cmFortranParserIsKeyword((yyvsp[-4].string), "non_intrinsic") ) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + cmFortranParserIsKeyword((yyvsp[-4].string), "non_intrinsic") ) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - } + } free((yyvsp[-6].string)); free((yyvsp[-4].string)); free((yyvsp[-2].string)); - } -#line 1537 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1509 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 11: -#line 179 "cmFortranParser.y" /* yacc.c:1646 */ +#line 156 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-3].string), "include")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + if (cmFortranParserIsKeyword((yyvsp[-3].string), "include")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); - } + } free((yyvsp[-3].string)); free((yyvsp[-2].string)); - } -#line 1552 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1522 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 12: -#line 190 "cmFortranParser.y" /* yacc.c:1646 */ +#line 164 "cmFortranParser.y" /* yacc.c:1646 */ { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); - } -#line 1563 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1532 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 13: -#line 197 "cmFortranParser.y" /* yacc.c:1646 */ +#line 169 "cmFortranParser.y" /* yacc.c:1646 */ { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); - } -#line 1574 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1542 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 14: -#line 204 "cmFortranParser.y" /* yacc.c:1646 */ +#line 174 "cmFortranParser.y" /* yacc.c:1646 */ { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); - } -#line 1585 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1552 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 15: -#line 211 "cmFortranParser.y" /* yacc.c:1646 */ +#line 179 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleDefine(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); - } -#line 1595 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1562 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 16: -#line 217 "cmFortranParser.y" /* yacc.c:1646 */ +#line 184 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUndef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); - } -#line 1605 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1572 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 17: -#line 223 "cmFortranParser.y" /* yacc.c:1646 */ +#line 189 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); - } -#line 1615 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1582 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 18: -#line 229 "cmFortranParser.y" /* yacc.c:1646 */ +#line 194 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); - } -#line 1625 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1592 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 19: -#line 235 "cmFortranParser.y" /* yacc.c:1646 */ +#line 199 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIf(parser); - } -#line 1634 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1601 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 20: -#line 240 "cmFortranParser.y" /* yacc.c:1646 */ +#line 203 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElif(parser); - } -#line 1643 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1610 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 21: -#line 245 "cmFortranParser.y" /* yacc.c:1646 */ +#line 207 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElse(parser); - } -#line 1652 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1619 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 22: -#line 250 "cmFortranParser.y" /* yacc.c:1646 */ +#line 211 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleEndif(parser); - } -#line 1661 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1628 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 23: -#line 255 "cmFortranParser.y" /* yacc.c:1646 */ +#line 215 "cmFortranParser.y" /* yacc.c:1646 */ { free((yyvsp[-3].string)); - } -#line 1669 "cmFortranParser.cxx" /* yacc.c:1646 */ + } +#line 1636 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 48: -#line 277 "cmFortranParser.y" /* yacc.c:1646 */ +#line 237 "cmFortranParser.y" /* yacc.c:1646 */ { free ((yyvsp[0].string)); } -#line 1675 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1642 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 49: -#line 278 "cmFortranParser.y" /* yacc.c:1646 */ +#line 238 "cmFortranParser.y" /* yacc.c:1646 */ { free ((yyvsp[0].string)); } -#line 1681 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1648 "cmFortranParser.cxx" /* yacc.c:1646 */ break; -#line 1685 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1652 "cmFortranParser.cxx" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1911,6 +1878,6 @@ yyreturn: #endif return yyresult; } -#line 286 "cmFortranParser.y" /* yacc.c:1906 */ +#line 246 "cmFortranParser.y" /* yacc.c:1906 */ /* End of grammar */ diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y index 83f441a..f8d461e 100644 --- a/Source/cmFortranParser.y +++ b/Source/cmFortranParser.y @@ -92,7 +92,6 @@ static bool cmFortranParserIsKeyword(const char* word, %token F90PPR_IFDEF F90PPR_IFNDEF F90PPR_IF %token F90PPR_ELSE F90PPR_ELIF F90PPR_ENDIF %token COMMA DCOLON -%token CPP_TOENDL %token UNTERMINATED_STRING %token STRING WORD %token CPP_INCLUDE_ANGLE @@ -105,156 +104,117 @@ code: /* empty */ | code stmt; stmt: keyword_stmt | assignment_stmt; -assignment_stmt: WORD ASSIGNMENT_OP other EOSTMT /* Ignore */ - { +assignment_stmt: + WORD ASSIGNMENT_OP other EOSTMT { free($1); - } + } keyword_stmt: - WORD EOSTMT - { - if (cmFortranParserIsKeyword($1, "interface")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + WORD EOSTMT { + if (cmFortranParserIsKeyword($1, "interface")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_SetInInterface(parser, true); } free($1); - } -| WORD WORD other EOSTMT - { - if (cmFortranParserIsKeyword($1, "use")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } +| WORD WORD other EOSTMT { + if (cmFortranParserIsKeyword($1, "use")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, $2); - } - else if (cmFortranParserIsKeyword($1, "module")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } else if (cmFortranParserIsKeyword($1, "module")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleModule(parser, $2); - } - else if (cmFortranParserIsKeyword($1, "interface")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } else if (cmFortranParserIsKeyword($1, "interface")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_SetInInterface(parser, true); - } - else if (cmFortranParserIsKeyword($2, "interface") && - cmFortranParserIsKeyword($1, "end")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } else if (cmFortranParserIsKeyword($2, "interface") && + cmFortranParserIsKeyword($1, "end")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_SetInInterface(parser, false); - } + } free($1); free($2); - } -| WORD DCOLON WORD other EOSTMT - { - if (cmFortranParserIsKeyword($1, "use")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } +| WORD DCOLON WORD other EOSTMT { + if (cmFortranParserIsKeyword($1, "use")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, $3); - } + } free($1); free($3); - } -| WORD COMMA WORD DCOLON WORD other EOSTMT - { + } +| WORD COMMA WORD DCOLON WORD other EOSTMT { if (cmFortranParserIsKeyword($1, "use") && - cmFortranParserIsKeyword($3, "non_intrinsic") ) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + cmFortranParserIsKeyword($3, "non_intrinsic") ) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, $5); - } + } free($1); free($3); free($5); - } -| WORD STRING other EOSTMT /* Ignore */ - { - if (cmFortranParserIsKeyword($1, "include")) - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } +| WORD STRING other EOSTMT { + if (cmFortranParserIsKeyword($1, "include")) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, $2); - } + } free($1); free($2); - } -| CPP_LINE_DIRECTIVE STRING other EOSTMT - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } +| CPP_LINE_DIRECTIVE STRING other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleLineDirective(parser, $2); free($2); - } -| CPP_INCLUDE_ANGLE other EOSTMT - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } +| CPP_INCLUDE_ANGLE other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, $1); free($1); - } -| include STRING other EOSTMT - { - cmFortranParser* parser = - cmFortran_yyget_extra(yyscanner); + } +| include STRING other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, $2); free($2); - } -| define WORD other EOSTMT - { + } +| define WORD other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleDefine(parser, $2); free($2); - } -| undef WORD other EOSTMT - { + } +| undef WORD other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUndef(parser, $2); free($2); - } -| ifdef WORD other EOSTMT - { + } +| ifdef WORD other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfdef(parser, $2); free($2); - } -| ifndef WORD other EOSTMT - { + } +| ifndef WORD other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfndef(parser, $2); free($2); - } -| if other EOSTMT - { + } +| if other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIf(parser); - } -| elif other EOSTMT - { + } +| elif other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElif(parser); - } -| else other EOSTMT - { + } +| else other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElse(parser); - } -| endif other EOSTMT - { + } +| endif other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleEndif(parser); - } -| WORD GARBAGE other EOSTMT /* Ignore */ - { + } +| WORD GARBAGE other EOSTMT { free($1); - } + } | GARBAGE other EOSTMT | EOSTMT | error diff --git a/Source/cmFortranParserTokens.h b/Source/cmFortranParserTokens.h index ac49840..176f6fe 100644 --- a/Source/cmFortranParserTokens.h +++ b/Source/cmFortranParserTokens.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -70,11 +70,10 @@ extern int cmFortran_yydebug; F90PPR_ENDIF = 280, COMMA = 281, DCOLON = 282, - CPP_TOENDL = 283, - UNTERMINATED_STRING = 284, - STRING = 285, - WORD = 286, - CPP_INCLUDE_ANGLE = 287 + UNTERMINATED_STRING = 283, + STRING = 284, + WORD = 285, + CPP_INCLUDE_ANGLE = 286 }; #endif /* Tokens. */ @@ -103,23 +102,24 @@ extern int cmFortran_yydebug; #define F90PPR_ENDIF 280 #define COMMA 281 #define DCOLON 282 -#define CPP_TOENDL 283 -#define UNTERMINATED_STRING 284 -#define STRING 285 -#define WORD 286 -#define CPP_INCLUDE_ANGLE 287 +#define UNTERMINATED_STRING 283 +#define STRING 284 +#define WORD 285 +#define CPP_INCLUDE_ANGLE 286 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 81 "cmFortranParser.y" /* yacc.c:1909 */ char* string; -#line 122 "cmFortranParserTokens.h" /* yacc.c:1909 */ +#line 120 "cmFortranParserTokens.h" /* yacc.c:1909 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f70c71c5a9759324d9e610bc919832b7500fd116 commit f70c71c5a9759324d9e610bc919832b7500fd116 Author: Brad King AuthorDate: Mon Sep 5 15:20:09 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 15:52:40 2016 -0400 cmFortranLexer: Update to flex 2.6 Revise the documented modifications we need to make to the flex-generated source file according to the needs of the new version. Also drop the duplicate copyright notice block from the generated file. diff --git a/Source/.gitattributes b/Source/.gitattributes index bd25ea8..5002b2a 100644 --- a/Source/.gitattributes +++ b/Source/.gitattributes @@ -3,3 +3,5 @@ cm_sha2.* whitespace=indent-with-non-tab # Preserve indentation style in generated code. cmListFileLexer.c whitespace=-tab-in-indent,-indent-with-non-tab +cmFortranLexer.cxx whitespace=-tab-in-indent,-indent-with-non-tab +cmFortranLexer.h whitespace=-tab-in-indent,-indent-with-non-tab diff --git a/Source/cmFortranLexer.cxx b/Source/cmFortranLexer.cxx index 7cde4cb..195c449 100644 --- a/Source/cmFortranLexer.cxx +++ b/Source/cmFortranLexer.cxx @@ -1,14 +1,3 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2015 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ #line 2 "cmFortranLexer.cxx" #line 4 "cmFortranLexer.cxx" @@ -19,8 +8,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 39 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -99,25 +88,13 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ @@ -204,83 +181,83 @@ typedef size_t yy_size_t; /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; - int yy_buffer_status; + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cmFortran_yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmFortran_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - }; + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the @@ -314,7 +291,7 @@ static void cmFortran_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yys YY_BUFFER_STATE cmFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *cmFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *cmFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -323,30 +300,30 @@ void cmFortran_yyfree (void * ,yyscan_t yyscanner ); #define yy_new_buffer cmFortran_yy_create_buffer #define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ cmFortran_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ + YY_CURRENT_BUFFER_LVALUE = \ cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } #define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ + { \ + if ( ! YY_CURRENT_BUFFER ){\ cmFortran_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ + YY_CURRENT_BUFFER_LVALUE = \ cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define cmFortran_yywrap(yyscanner) 1 +#define cmFortran_yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -358,27 +335,27 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 45 #define YY_END_OF_BUFFER 46 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; static yyconst flex_int16_t yy_accept[173] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -402,7 +379,7 @@ static yyconst flex_int16_t yy_accept[173] = 13, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, @@ -434,7 +411,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[42] = +static yyconst YY_CHAR yy_meta[42] = { 0, 1, 2, 2, 3, 4, 3, 3, 1, 1, 3, 3, 1, 3, 5, 1, 3, 1, 3, 6, 1, @@ -443,7 +420,7 @@ static yyconst flex_int32_t yy_meta[42] = 7 } ; -static yyconst flex_int16_t yy_base[182] = +static yyconst flex_uint16_t yy_base[182] = { 0, 0, 40, 0, 41, 220, 48, 44, 54, 56, 65, 220, 0, 535, 535, 216, 535, 81, 74, 535, 535, @@ -491,7 +468,7 @@ static yyconst flex_int16_t yy_def[182] = 172 } ; -static yyconst flex_int16_t yy_nxt[577] = +static yyconst flex_uint16_t yy_nxt[577] = { 0, 12, 13, 14, 13, 13, 15, 16, 12, 17, 18, 19, 12, 20, 12, 21, 22, 12, 23, 12, 24, @@ -636,7 +613,7 @@ static yyconst flex_int16_t yy_chk[577] = #line 2 "cmFortranLexer.in.l" /*============================================================================ CMake - Cross Platform Makefile Generator - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + Copyright 2000-2015 Kitware, Inc., Insight Software Consortium Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details. @@ -659,28 +636,21 @@ static yyconst flex_int16_t yy_chk[577] = This file must be translated to C and modified to build everywhere. -Run flex like this: +Run flex >= 2.6 like this: flex -i --prefix=cmFortran_yy --header-file=cmFortranLexer.h -ocmFortranLexer.cxx cmFortranLexer.in.l Modify cmFortranLexer.cxx: - - remove TABs - - remove use of the 'register' storage class specifier - - remove "yyscanner" argument from these methods: - yy_fatal_error, cmFortran_yyalloc, cmFortran_yyrealloc, cmFortran_yyfree + - remove trailing whitespace: sed -i 's/\s*$//' cmFortranLexer.h cmFortranLexer.cxx + - remove blank lines at end of file - remove "yyscanner = NULL" from end of cmFortran_yylex_destroy - remove all YY_BREAK lines occurring right after return statements - - change while ( 1 ) to for(;;) - -Modify cmFortranLexer.h: - - remove TABs - - remove the yy_init_globals function - - remove the block that includes unistd.h - - remove #line directives (avoids bogus warning on old Sun) + - add cast in cmFortran_yy_scan_bytes for loop condition of _yybytes_len to size_t */ #include "cmStandardLexer.h" +#undef YY_NO_UNPUT #define cmFortranLexer_cxx #include "cmFortranParser.h" /* Interface to parser object. */ @@ -696,7 +666,7 @@ Modify cmFortranLexer.h: /*--------------------------------------------------------------------------*/ -#line 689 "cmFortranLexer.cxx" +#line 670 "cmFortranLexer.cxx" #define INITIAL 0 #define free_fmt 1 @@ -729,8 +699,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; + int yy_n_chars; + int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -771,23 +741,23 @@ void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *cmFortran_yyget_in (yyscan_t yyscanner ); -void cmFortran_yyset_in (FILE * in_str ,yyscan_t yyscanner ); +void cmFortran_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); FILE *cmFortran_yyget_out (yyscan_t yyscanner ); -void cmFortran_yyset_out (FILE * out_str ,yyscan_t yyscanner ); +void cmFortran_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); -yy_size_t cmFortran_yyget_leng (yyscan_t yyscanner ); + int cmFortran_yyget_leng (yyscan_t yyscanner ); char *cmFortran_yyget_text (yyscan_t yyscanner ); int cmFortran_yyget_lineno (yyscan_t yyscanner ); -void cmFortran_yyset_lineno (int line_number ,yyscan_t yyscanner ); +void cmFortran_yyset_lineno (int _line_number ,yyscan_t yyscanner ); int cmFortran_yyget_column (yyscan_t yyscanner ); -void cmFortran_yyset_column (int column_no ,yyscan_t yyscanner ); +void cmFortran_yyset_column (int _column_no ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -801,8 +771,12 @@ extern int cmFortran_yywrap (yyscan_t yyscanner ); #endif #endif +#ifndef YY_NO_UNPUT + static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); +#endif + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif @@ -836,7 +810,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -844,33 +818,33 @@ static int input (yyscan_t yyscanner ); */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ \ #endif @@ -915,135 +889,135 @@ extern int cmFortran_yylex (yyscan_t yyscanner); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - cmFortran_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } + if ( ! YY_CURRENT_BUFFER ) { + cmFortran_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } - cmFortran_yy_load_buffer_state(yyscanner ); - } + cmFortran_yy_load_buffer_state(yyscanner ); + } - { -#line 72 "cmFortranLexer.in.l" + { +#line 65 "cmFortranLexer.in.l" -#line 956 "cmFortranLexer.cxx" +#line 941 "cmFortranLexer.cxx" - for(;;) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 173 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 535 ); + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 173 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 535 ); yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; case 1: YY_RULE_SETUP -#line 74 "cmFortranLexer.in.l" +#line 67 "cmFortranLexer.in.l" { cmFortranParser_StringStart(yyextra); cmFortranParser_SetOldStartcond(yyextra, YY_START); BEGIN(str_dq); } - YY_BREAK + YY_BREAK case 2: YY_RULE_SETUP -#line 80 "cmFortranLexer.in.l" +#line 73 "cmFortranLexer.in.l" { cmFortranParser_StringStart(yyextra); cmFortranParser_SetOldStartcond(yyextra, YY_START); BEGIN(str_sq); } - YY_BREAK + YY_BREAK case 3: -#line 87 "cmFortranLexer.in.l" +#line 80 "cmFortranLexer.in.l" case 4: YY_RULE_SETUP -#line 87 "cmFortranLexer.in.l" +#line 80 "cmFortranLexer.in.l" { BEGIN(cmFortranParser_GetOldStartcond(yyextra) ); yylvalp->string = strdup(cmFortranParser_StringEnd(yyextra)); @@ -1051,17 +1025,17 @@ YY_RULE_SETUP } case 5: /* rule 5 can match eol */ -#line 94 "cmFortranLexer.in.l" +#line 87 "cmFortranLexer.in.l" case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 94 "cmFortranLexer.in.l" +#line 87 "cmFortranLexer.in.l" /* Ignore (continued strings, free fmt) */ - YY_BREAK + YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP -#line 96 "cmFortranLexer.in.l" +#line 89 "cmFortranLexer.in.l" { if (cmFortranParser_GetOldStartcond(yyextra) == fixed_fmt) ; /* Ignore (cont. strings, fixed fmt) */ @@ -1070,11 +1044,11 @@ YY_RULE_SETUP unput(yytext[strlen(yytext)-1]); } } - YY_BREAK + YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 106 "cmFortranLexer.in.l" +#line 99 "cmFortranLexer.in.l" { unput ('\n'); BEGIN(INITIAL); @@ -1082,29 +1056,29 @@ YY_RULE_SETUP } case 9: YY_RULE_SETUP -#line 112 "cmFortranLexer.in.l" +#line 105 "cmFortranLexer.in.l" { cmFortranParser_StringAppend(yyextra, yytext[0]); } - YY_BREAK + YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP -#line 116 "cmFortranLexer.in.l" +#line 109 "cmFortranLexer.in.l" { return EOSTMT; } /* Treat comments like */ case 11: /* rule 11 can match eol */ YY_RULE_SETUP -#line 117 "cmFortranLexer.in.l" +#line 110 "cmFortranLexer.in.l" { return EOSTMT; } /* empty lines */ case 12: YY_RULE_SETUP -#line 119 "cmFortranLexer.in.l" +#line 112 "cmFortranLexer.in.l" { return CPP_LINE_DIRECTIVE; } case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 120 "cmFortranLexer.in.l" +#line 113 "cmFortranLexer.in.l" { yytext[yyleng-1] = 0; yylvalp->string = strdup(strchr(yytext, '<')+1); @@ -1112,530 +1086,534 @@ YY_RULE_SETUP } case 14: YY_RULE_SETUP -#line 125 "cmFortranLexer.in.l" +#line 118 "cmFortranLexer.in.l" { return CPP_INCLUDE; } case 15: YY_RULE_SETUP -#line 126 "cmFortranLexer.in.l" +#line 119 "cmFortranLexer.in.l" { return F90PPR_INCLUDE; } case 16: YY_RULE_SETUP -#line 127 "cmFortranLexer.in.l" +#line 120 "cmFortranLexer.in.l" { return COCO_INCLUDE; } case 17: YY_RULE_SETUP -#line 129 "cmFortranLexer.in.l" +#line 122 "cmFortranLexer.in.l" { return CPP_DEFINE; } case 18: YY_RULE_SETUP -#line 130 "cmFortranLexer.in.l" +#line 123 "cmFortranLexer.in.l" { return F90PPR_DEFINE; } case 19: YY_RULE_SETUP -#line 132 "cmFortranLexer.in.l" +#line 125 "cmFortranLexer.in.l" { return CPP_UNDEF; } case 20: YY_RULE_SETUP -#line 133 "cmFortranLexer.in.l" +#line 126 "cmFortranLexer.in.l" { return F90PPR_UNDEF; } case 21: YY_RULE_SETUP -#line 135 "cmFortranLexer.in.l" +#line 128 "cmFortranLexer.in.l" { return CPP_IFDEF; } case 22: YY_RULE_SETUP -#line 136 "cmFortranLexer.in.l" +#line 129 "cmFortranLexer.in.l" { return CPP_IFNDEF; } case 23: YY_RULE_SETUP -#line 137 "cmFortranLexer.in.l" +#line 130 "cmFortranLexer.in.l" { return CPP_IF; } case 24: YY_RULE_SETUP -#line 138 "cmFortranLexer.in.l" +#line 131 "cmFortranLexer.in.l" { return CPP_ELIF; } case 25: YY_RULE_SETUP -#line 139 "cmFortranLexer.in.l" +#line 132 "cmFortranLexer.in.l" { return CPP_ELSE; } case 26: YY_RULE_SETUP -#line 140 "cmFortranLexer.in.l" +#line 133 "cmFortranLexer.in.l" { return CPP_ENDIF; } case 27: YY_RULE_SETUP -#line 142 "cmFortranLexer.in.l" +#line 135 "cmFortranLexer.in.l" { return F90PPR_IFDEF; } case 28: YY_RULE_SETUP -#line 143 "cmFortranLexer.in.l" +#line 136 "cmFortranLexer.in.l" { return F90PPR_IFNDEF; } case 29: YY_RULE_SETUP -#line 144 "cmFortranLexer.in.l" +#line 137 "cmFortranLexer.in.l" { return F90PPR_IF; } case 30: YY_RULE_SETUP -#line 145 "cmFortranLexer.in.l" +#line 138 "cmFortranLexer.in.l" { return F90PPR_ELIF; } case 31: YY_RULE_SETUP -#line 146 "cmFortranLexer.in.l" +#line 139 "cmFortranLexer.in.l" { return F90PPR_ELSE; } case 32: YY_RULE_SETUP -#line 147 "cmFortranLexer.in.l" +#line 140 "cmFortranLexer.in.l" { return F90PPR_ENDIF; } /* Line continuations, possible involving comments. */ case 33: /* rule 33 can match eol */ YY_RULE_SETUP -#line 150 "cmFortranLexer.in.l" +#line 143 "cmFortranLexer.in.l" - YY_BREAK + YY_BREAK case 34: /* rule 34 can match eol */ YY_RULE_SETUP -#line 151 "cmFortranLexer.in.l" +#line 144 "cmFortranLexer.in.l" - YY_BREAK + YY_BREAK case 35: YY_RULE_SETUP -#line 153 "cmFortranLexer.in.l" +#line 146 "cmFortranLexer.in.l" { return COMMA; } case 36: YY_RULE_SETUP -#line 155 "cmFortranLexer.in.l" +#line 148 "cmFortranLexer.in.l" { return DCOLON; } case 37: /* rule 37 can match eol */ YY_RULE_SETUP -#line 157 "cmFortranLexer.in.l" +#line 150 "cmFortranLexer.in.l" { return GARBAGE; } case 38: YY_RULE_SETUP -#line 159 "cmFortranLexer.in.l" +#line 152 "cmFortranLexer.in.l" { return ASSIGNMENT_OP; } case 39: YY_RULE_SETUP -#line 161 "cmFortranLexer.in.l" +#line 154 "cmFortranLexer.in.l" { yylvalp->string = strdup(yytext); return WORD; } case 40: YY_RULE_SETUP -#line 166 "cmFortranLexer.in.l" +#line 159 "cmFortranLexer.in.l" { return GARBAGE; } case 41: /* rule 41 can match eol */ YY_RULE_SETUP -#line 168 "cmFortranLexer.in.l" +#line 161 "cmFortranLexer.in.l" { return EOSTMT; } case 42: YY_RULE_SETUP -#line 171 "cmFortranLexer.in.l" +#line 164 "cmFortranLexer.in.l" /* Ignore */ - YY_BREAK + YY_BREAK case 43: /* rule 43 can match eol */ YY_RULE_SETUP -#line 172 "cmFortranLexer.in.l" +#line 165 "cmFortranLexer.in.l" /* Ignore line-endings preceded by \ */ - YY_BREAK + YY_BREAK case 44: YY_RULE_SETUP -#line 174 "cmFortranLexer.in.l" +#line 167 "cmFortranLexer.in.l" { return *yytext; } case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(free_fmt): case YY_STATE_EOF(fixed_fmt): case YY_STATE_EOF(str_sq): case YY_STATE_EOF(str_dq): -#line 176 "cmFortranLexer.in.l" +#line 169 "cmFortranLexer.in.l" { if(!cmFortranParser_FilePop(yyextra) ) { return YY_NULL; } } - YY_BREAK + YY_BREAK case 45: YY_RULE_SETUP -#line 183 "cmFortranLexer.in.l" +#line 176 "cmFortranLexer.in.l" ECHO; - YY_BREAK -#line 1291 "cmFortranLexer.cxx" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * cmFortran_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( cmFortran_yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ + YY_BREAK +#line 1276 "cmFortranLexer.cxx" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmFortran_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmFortran_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of cmFortran_yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cmFortran_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cmFortran_yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmFortran_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + yy_size_t number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmFortran_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmFortran_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmFortran_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - return ret_val; + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 173 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 173 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + } + + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis - * next_state = yy_try_NUL_trans( current_state ); + * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; + int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 173 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 172); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 173 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_is_jam = (yy_current_state == 172); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) { - char *yy_cp; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_cp = yyg->yy_c_buf_p; - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; + /* undo effects of setting up yytext */ + *yy_cp = yyg->yy_hold_char; - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - yy_size_t number_to_move = yyg->yy_n_chars + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = yyg->yy_n_chars + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } - *--yy_cp = (char) c; + *--yy_cp = (char) c; - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; + yyg->yytext_ptr = yy_bp; + yyg->yy_hold_char = *yy_cp; + yyg->yy_c_buf_p = yy_cp; } +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -1644,74 +1622,74 @@ static int yy_get_next_buffer (yyscan_t yyscanner) #endif { - int c; + int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cmFortran_yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( cmFortran_yywrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmFortran_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmFortran_yywrap(yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(yyscanner); + return yyinput(yyscanner); #else - return input(yyscanner); + return input(yyscanner); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. @@ -1722,14 +1700,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! YY_CURRENT_BUFFER ){ + if ( ! YY_CURRENT_BUFFER ){ cmFortran_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = + YY_CURRENT_BUFFER_LVALUE = cmFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } + } - cmFortran_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - cmFortran_yy_load_buffer_state(yyscanner ); + cmFortran_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmFortran_yy_load_buffer_state(yyscanner ); } /** Switch to a different input buffer. @@ -1740,41 +1718,41 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* TODO. We should be able to replace this entire function body - * with - * cmFortran_yypop_buffer_state(); - * cmFortran_yypush_buffer_state(new_buffer); + /* TODO. We should be able to replace this entire function body + * with + * cmFortran_yypop_buffer_state(); + * cmFortran_yypush_buffer_state(new_buffer); */ - cmFortran_yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - cmFortran_yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (cmFortran_yywrap()) processing, but the only time this flag - * is looked at is after cmFortran_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; + cmFortran_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmFortran_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmFortran_yywrap()) processing, but the only time this flag + * is looked at is after cmFortran_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; } static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. @@ -1785,26 +1763,26 @@ static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) */ YY_BUFFER_STATE cmFortran_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; + YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); + b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = (yy_size_t)size; - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cmFortran_yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmFortran_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - cmFortran_yy_init_buffer(b,file ,yyscanner); + cmFortran_yy_init_buffer(b,file ,yyscanner); - return b; + return b; } /** Destroy the buffer. @@ -1815,16 +1793,16 @@ static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + if ( ! b ) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if ( b->yy_is_our_buffer ) - cmFortran_yyfree((void *) b->yy_ch_buf ,yyscanner ); + if ( b->yy_is_our_buffer ) + cmFortran_yyfree((void *) b->yy_ch_buf ,yyscanner ); - cmFortran_yyfree((void *) b ,yyscanner ); + cmFortran_yyfree((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. @@ -1834,13 +1812,13 @@ static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) static void cmFortran_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { - int oerrno = errno; + int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - cmFortran_yy_flush_buffer(b ,yyscanner); + cmFortran_yy_flush_buffer(b ,yyscanner); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; /* If b is the current buffer, then cmFortran_yy_init_buffer was _probably_ * called from cmFortran_yyrestart() or through yy_get_next_buffer. @@ -1853,7 +1831,7 @@ static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. @@ -1863,25 +1841,25 @@ static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) void cmFortran_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - cmFortran_yy_load_buffer_state(yyscanner ); + if ( b == YY_CURRENT_BUFFER ) + cmFortran_yy_load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -1893,28 +1871,28 @@ static void cmFortran_yy_load_buffer_state (yyscan_t yyscanner) void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - cmFortran_yyensure_buffer_stack(yyscanner); - - /* This block is copied from cmFortran_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from cmFortran_yy_switch_to_buffer. */ - cmFortran_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; + if (new_buffer == NULL) + return; + + cmFortran_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmFortran_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmFortran_yy_switch_to_buffer. */ + cmFortran_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. @@ -1924,18 +1902,18 @@ void cmFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscan void cmFortran_yypop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - cmFortran_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } + if (!YY_CURRENT_BUFFER) + return; + + cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmFortran_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } } /* Allocates the stack if it does not exist. @@ -1943,46 +1921,46 @@ void cmFortran_yypop_buffer_state (yyscan_t yyscanner) */ static void cmFortran_yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; + int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!yyg->yy_buffer_stack) { + if (!yyg->yy_buffer_stack) { - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmFortran_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -1993,31 +1971,31 @@ static void cmFortran_yyensure_buffer_stack (yyscan_t yyscanner) */ YY_BUFFER_STATE cmFortran_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - cmFortran_yy_switch_to_buffer(b ,yyscanner ); - - return b; + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) cmFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmFortran_yy_switch_to_buffer(b ,yyscanner ); + + return b; } /** Setup the input buffer state to scan a string. The next call to cmFortran_yylex() will @@ -2031,7 +2009,7 @@ YY_BUFFER_STATE cmFortran_yy_scan_buffer (char * base, yy_size_t size , yyscan YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return cmFortran_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); + return cmFortran_yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to cmFortran_yylex() will @@ -2041,62 +2019,64 @@ YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char * yystr , yyscan_t yyscan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) cmFortran_yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_bytes()" ); + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) _yybytes_len + 2; + buf = (char *) cmFortran_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmFortran_yy_scan_bytes()" ); - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; + for ( i = 0; i < (size_t)_yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = cmFortran_yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in cmFortran_yy_scan_bytes()" ); + b = cmFortran_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmFortran_yy_scan_bytes()" ); - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; - return b; + return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t) +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ @@ -2156,7 +2136,7 @@ FILE *cmFortran_yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t cmFortran_yyget_leng (yyscan_t yyscanner) +int cmFortran_yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -2183,10 +2163,10 @@ void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number The line number to set. + * @param _line_number line number * @param yyscanner The scanner object. */ -void cmFortran_yyset_lineno (int line_number , yyscan_t yyscanner) +void cmFortran_yyset_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -2194,14 +2174,14 @@ void cmFortran_yyset_lineno (int line_number , yyscan_t yyscanner) if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "cmFortran_yyset_lineno called with no buffer" ); - yylineno = line_number; + yylineno = _line_number; } /** Set the current column. - * @param column_no The column number to set. + * @param _column_no column number * @param yyscanner The scanner object. */ -void cmFortran_yyset_column (int column_no , yyscan_t yyscanner) +void cmFortran_yyset_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -2209,25 +2189,25 @@ void cmFortran_yyset_column (int column_no , yyscan_t yyscanner) if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "cmFortran_yyset_column called with no buffer" ); - yycolumn = column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see cmFortran_yy_switch_to_buffer */ -void cmFortran_yyset_in (FILE * in_str , yyscan_t yyscanner) +void cmFortran_yyset_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; + yyin = _in_str ; } -void cmFortran_yyset_out (FILE * out_str , yyscan_t yyscanner) +void cmFortran_yyset_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; + yyout = _out_str ; } int cmFortran_yyget_debug (yyscan_t yyscanner) @@ -2236,10 +2216,10 @@ int cmFortran_yyget_debug (yyscan_t yyscanner) return yy_flex_debug; } -void cmFortran_yyset_debug (int bdebug , yyscan_t yyscanner) +void cmFortran_yyset_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -2315,10 +2295,10 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from cmFortran_yylex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; + yyg->yy_c_buf_p = NULL; yyg->yy_init = 0; yyg->yy_start = 0; @@ -2331,8 +2311,8 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -2347,15 +2327,15 @@ int cmFortran_yylex_destroy (yyscan_t yyscanner) struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - cmFortran_yypop_buffer_state(yyscanner); - } + while(YY_CURRENT_BUFFER){ + cmFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmFortran_yypop_buffer_state(yyscanner); + } - /* Destroy the stack itself. */ - cmFortran_yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; + /* Destroy the stack itself. */ + cmFortran_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ cmFortran_yyfree(yyg->yy_start_stack ,yyscanner ); @@ -2377,48 +2357,58 @@ int cmFortran_yylex_destroy (yyscan_t yyscanner) #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - int n; - for ( n = 0; s[n]; ++n ) - ; + int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif -void *cmFortran_yyalloc (yy_size_t size , yyscan_t) +void *cmFortran_yyalloc (yy_size_t size , yyscan_t yyscanner) { - return (void *) malloc( size ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } -void *cmFortran_yyrealloc (void * ptr, yy_size_t size , yyscan_t) +void *cmFortran_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); } -void cmFortran_yyfree (void * ptr , yyscan_t) +void cmFortran_yyfree (void * ptr , yyscan_t yyscanner) { - free( (char *) ptr ); /* see cmFortran_yyrealloc() for (char *) cast */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see cmFortran_yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 182 "cmFortranLexer.in.l" +#line 176 "cmFortranLexer.in.l" diff --git a/Source/cmFortranLexer.h b/Source/cmFortranLexer.h index b9ff0dc..e20c0aa 100644 --- a/Source/cmFortranLexer.h +++ b/Source/cmFortranLexer.h @@ -1,26 +1,19 @@ -/*============================================================================ - CMake - Cross Platform Makefile Generator - Copyright 2000-2015 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ #ifndef cmFortran_yyHEADER_H #define cmFortran_yyHEADER_H 1 #define cmFortran_yyIN_HEADER 1 +#line 6 "cmFortranLexer.h" + +#line 8 "cmFortranLexer.h" + #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 39 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -99,25 +92,13 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* An opaque pointer. */ @@ -163,52 +144,52 @@ typedef size_t yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; - int yy_buffer_status; + int yy_buffer_status; - }; + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ void cmFortran_yyrestart (FILE *input_file ,yyscan_t yyscanner ); @@ -221,7 +202,7 @@ void cmFortran_yypop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE cmFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE cmFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *cmFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *cmFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -229,7 +210,7 @@ void cmFortran_yyfree (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define cmFortran_yywrap(yyscanner) 1 +#define cmFortran_yywrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -243,6 +224,14 @@ void cmFortran_yyfree (void * ,yyscan_t yyscanner ); #endif +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif @@ -266,23 +255,23 @@ void cmFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *cmFortran_yyget_in (yyscan_t yyscanner ); -void cmFortran_yyset_in (FILE * in_str ,yyscan_t yyscanner ); +void cmFortran_yyset_in (FILE * _in_str ,yyscan_t yyscanner ); FILE *cmFortran_yyget_out (yyscan_t yyscanner ); -void cmFortran_yyset_out (FILE * out_str ,yyscan_t yyscanner ); +void cmFortran_yyset_out (FILE * _out_str ,yyscan_t yyscanner ); -yy_size_t cmFortran_yyget_leng (yyscan_t yyscanner ); + int cmFortran_yyget_leng (yyscan_t yyscanner ); char *cmFortran_yyget_text (yyscan_t yyscanner ); int cmFortran_yyget_lineno (yyscan_t yyscanner ); -void cmFortran_yyset_lineno (int line_number ,yyscan_t yyscanner ); +void cmFortran_yyset_lineno (int _line_number ,yyscan_t yyscanner ); int cmFortran_yyget_column (yyscan_t yyscanner ); -void cmFortran_yyset_column (int column_no ,yyscan_t yyscanner ); +void cmFortran_yyset_column (int _column_no ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -348,5 +337,9 @@ extern int cmFortran_yylex (yyscan_t yyscanner); #undef YY_DECL #endif +#line 176 "cmFortranLexer.in.l" + + +#line 344 "cmFortranLexer.h" #undef cmFortran_yyIN_HEADER #endif /* cmFortran_yyHEADER_H */ diff --git a/Source/cmFortranLexer.in.l b/Source/cmFortranLexer.in.l index e59ff5f..aa879e8 100644 --- a/Source/cmFortranLexer.in.l +++ b/Source/cmFortranLexer.in.l @@ -24,28 +24,21 @@ This file must be translated to C and modified to build everywhere. -Run flex like this: +Run flex >= 2.6 like this: flex -i --prefix=cmFortran_yy --header-file=cmFortranLexer.h -ocmFortranLexer.cxx cmFortranLexer.in.l Modify cmFortranLexer.cxx: - - remove TABs - - remove use of the 'register' storage class specifier - - remove "yyscanner" argument from these methods: - yy_fatal_error, cmFortran_yyalloc, cmFortran_yyrealloc, cmFortran_yyfree + - remove trailing whitespace: sed -i 's/\s*$//' cmFortranLexer.h cmFortranLexer.cxx + - remove blank lines at end of file - remove "yyscanner = NULL" from end of cmFortran_yylex_destroy - remove all YY_BREAK lines occurring right after return statements - - change while ( 1 ) to for(;;) - -Modify cmFortranLexer.h: - - remove TABs - - remove the yy_init_globals function - - remove the block that includes unistd.h - - remove #line directives (avoids bogus warning on old Sun) + - add cast in yy_scan_bytes for loop condition of _yybytes_len to size_t */ #include "cmStandardLexer.h" +#undef YY_NO_UNPUT #define cmFortranLexer_cxx #include "cmFortranParser.h" /* Interface to parser object. */ diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index 57ad2af..d27a192 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -73,6 +73,7 @@ union cmFortran_yystype_u #define YYSTYPE cmFortran_yystype #define YYSTYPE_IS_DECLARED 1 #if !defined(cmFortranLexer_cxx) +#define YY_NO_UNISTD_H #include "cmFortranLexer.h" #endif #if !defined(cmFortranLexer_cxx) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e11cd31fa0cce8210577ee46b6a33ee371f4fe64 commit e11cd31fa0cce8210577ee46b6a33ee371f4fe64 Author: Brad King AuthorDate: Mon Sep 5 14:50:31 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 15:40:04 2016 -0400 Fortran: Warn when dependency scanning fails to parse a source file We expect to handle all relevant statements and ignore those that we do not understand. Warn if this process ever fails. Otherwise dependency information may be silently left out. diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 1eece98..b7e006d 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -130,6 +130,12 @@ bool cmDependsFortran::WriteDependencies(const std::set& sources, if (cmFortran_yyparse(parser.Scanner) != 0) { // Failed to parse the file. Report failure to write dependencies. okay = false; + /* clang-format off */ + std::cerr << + "warning: failed to parse dependencies from Fortran source " + "'" << src << "': " << parser.Error << std::endl + ; + /* clang-format on */ } } return okay; diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index 5f1c7ac..57ad2af 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -146,6 +146,9 @@ struct cmFortranParser_s // Buffer for string literals. std::string TokenString; + // Error message text if a parser error occurs. + std::string Error; + // Flag for whether lexer is reading from inside an interface. bool InInterface; diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index 71edf9f..d43d47c 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -164,11 +164,9 @@ int cmFortranParser_GetOldStartcond(cmFortranParser* parser) return parser->OldStartcond; } -void cmFortranParser_Error(cmFortranParser* /*unused*/, const char* /*unused*/) +void cmFortranParser_Error(cmFortranParser* parser, const char* msg) { - // If there is a parser error just ignore it. The source will not - // compile and the user will edit it. Then dependencies will have - // to be regenerated anyway. + parser->Error = msg ? msg : "unknown error"; } void cmFortranParser_RuleUse(cmFortranParser* parser, const char* name) ----------------------------------------------------------------------- Summary of changes: Source/.gitattributes | 2 + Source/cmDependsFortran.cxx | 6 + Source/cmFortranLexer.cxx | 1864 ++++++++++++++++++++-------------------- Source/cmFortranLexer.h | 147 ++-- Source/cmFortranLexer.in.l | 17 +- Source/cmFortranParser.cxx | 403 ++++----- Source/cmFortranParser.h | 6 + Source/cmFortranParser.y | 162 ++-- Source/cmFortranParserImpl.cxx | 21 +- Source/cmFortranParserTokens.h | 28 +- 10 files changed, 1291 insertions(+), 1365 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 11:55:27 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 11:55:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-897-g4dda181 Message-ID: <20160907155527.24E67C20BD@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 4dda1812f0c4d31eb587204098b05b20f796e67d (commit) via 4b53a693bd804b15380e8adfafc4de47f3f3e50e (commit) from 7f7e5eafd8bc00259c9922a68a60c06ab67c91a9 (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=4dda1812f0c4d31eb587204098b05b20f796e67d commit 4dda1812f0c4d31eb587204098b05b20f796e67d Merge: 7f7e5ea 4b53a69 Author: Brad King AuthorDate: Wed Sep 7 11:55:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 11:55:24 2016 -0400 Merge topic 'backport-curl-fix' 4b53a693 curl: Backport certificate reuse fix from 7.50.2 ----------------------------------------------------------------------- Summary of changes: Utilities/cmcurl/lib/vtls/nss.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 11:55:41 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 11:55:41 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1865-gcd4e485 Message-ID: <20160907155541.5569CC2153@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, next has been updated via cd4e485a98ef3e1f5151461a3e89955c7f1d10a6 (commit) via 4dda1812f0c4d31eb587204098b05b20f796e67d (commit) from 331f211b3779db266082828c0febd51e0d94a3e9 (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=cd4e485a98ef3e1f5151461a3e89955c7f1d10a6 commit cd4e485a98ef3e1f5151461a3e89955c7f1d10a6 Merge: 331f211 4dda181 Author: Brad King AuthorDate: Wed Sep 7 11:55:33 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 11:55:33 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 11:56:57 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 11:56:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.1-901-g024eecd Message-ID: <20160907155657.6AB22D7923@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 024eecd9106a4d3a6adebd918c0afdceb02cd4bb (commit) via e214ceaf0c74f322d2cb89b5030dd0efc1e46fbc (commit) via c5dcd31e92c0a09009a340e3fe23ced4f6190b64 (commit) via 983371a6eb247a68b628ad63326b1f0607fcf006 (commit) from 4dda1812f0c4d31eb587204098b05b20f796e67d (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: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 11:56:57 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 11:56:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1868-g5a9e906 Message-ID: <20160907155657.D3B0BD7A06@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, next has been updated via 5a9e906925cf7a4512fa8765be35b0d15feccd7f (commit) via 024eecd9106a4d3a6adebd918c0afdceb02cd4bb (commit) via e214ceaf0c74f322d2cb89b5030dd0efc1e46fbc (commit) from cd4e485a98ef3e1f5151461a3e89955c7f1d10a6 (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=5a9e906925cf7a4512fa8765be35b0d15feccd7f commit 5a9e906925cf7a4512fa8765be35b0d15feccd7f Merge: cd4e485 024eecd Author: Brad King AuthorDate: Wed Sep 7 11:56:41 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 11:56:41 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 11:56:57 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 11:56:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.6.1-35-gc5dcd31 Message-ID: <20160907155657.F12CAD7A06@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 c5dcd31e92c0a09009a340e3fe23ced4f6190b64 (commit) via 983371a6eb247a68b628ad63326b1f0607fcf006 (commit) via 4b53a693bd804b15380e8adfafc4de47f3f3e50e (commit) from 0fd54137aed8e1f76ee614bf7532881a91a0cbc5 (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 +- Utilities/cmcurl/lib/vtls/nss.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 15:18:20 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 15:18:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.1-1870-g11d249a Message-ID: <20160907191820.BB692F3BCE@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, next has been updated via 11d249a583a14be654790ab6c8ecc5814018b2a4 (commit) via f9973166e82c3f5d8e05e2ab57aceb15ff267295 (commit) from 5a9e906925cf7a4512fa8765be35b0d15feccd7f (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=11d249a583a14be654790ab6c8ecc5814018b2a4 commit 11d249a583a14be654790ab6c8ecc5814018b2a4 Merge: 5a9e906 f997316 Author: Brad King AuthorDate: Wed Sep 7 15:18:18 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 15:18:18 2016 -0400 Merge topic 'ExternalData-repeat-file' into next f9973166 ExternalData: Tolerate files duplicated across multiple targets https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9973166e82c3f5d8e05e2ab57aceb15ff267295 commit f9973166e82c3f5d8e05e2ab57aceb15ff267295 Author: Brad King AuthorDate: Wed Sep 7 15:09:19 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 15:17:33 2016 -0400 ExternalData: Tolerate files duplicated across multiple targets If multiple ExternalData_Target_Add calls generate the same output file then we need to avoid calling add_custom_command multiple times with that output. This was already done within a single target by setting a variable in the local function scope. This will not be visible in other calls though so we need to use a directory property instead to prevent adding a custom command multiple times for one output in a directory. Normally it is not safe to have multiple custom commands that produce the same output file across multiple independent targets, but since we use atomic replacement of outputs the resulting races should not be a problem. For the convenience of projects, tolerate this instead of diagnosing it. In particular, we previously allowed up to two copies of the custom command in one directory because CMake has a fallback from MAIN_DEPENDENCY to an `.rule` file. While at it, add a note to the documentation that typically only one external data target should be needed for a project. Reported-by: David Manthey diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index a0bffe7..e7f8408 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -86,6 +86,10 @@ Module Functions in one of the paths specified in the ``ExternalData_OBJECT_STORES`` variable. + Typically only one target is needed to manage all external data within + a project. Call this function once at the end of configuration after + all data references have been processed. + Module Variables ^^^^^^^^^^^^^^^^ @@ -394,8 +398,14 @@ function(ExternalData_add_target target) set(files "") - # Set "_ExternalData_FILE_${file}" for each output file to avoid duplicate - # rules. Use local data first to prefer real files over content links. + # Set a "_ExternalData_FILE_${file}" variable for each output file to avoid + # duplicate entries within this target. Set a directory property of the same + # name to avoid repeating custom commands with the same output in this directory. + # Repeating custom commands with the same output across directories or across + # targets in the same directory may be a race, but this is likely okay because + # we use atomic replacement of output files. + # + # Use local data first to prefer real files over content links. # Custom commands to copy or link local data. get_property(data_local GLOBAL PROPERTY _ExternalData_${target}_LOCAL) @@ -405,16 +415,20 @@ function(ExternalData_add_target target) list(GET tuple 1 name) if(NOT DEFINED "_ExternalData_FILE_${file}") set("_ExternalData_FILE_${file}" 1) - add_custom_command( - COMMENT "Generating ${file}" - OUTPUT "${file}" - COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} - -Dfile=${file} -Dname=${name} - -DExternalData_ACTION=local - -DExternalData_CONFIG=${config} - -P ${_ExternalData_SELF} - MAIN_DEPENDENCY "${name}" - ) + get_property(added DIRECTORY PROPERTY "_ExternalData_FILE_${file}") + if(NOT added) + set_property(DIRECTORY PROPERTY "_ExternalData_FILE_${file}" 1) + add_custom_command( + COMMENT "Generating ${file}" + OUTPUT "${file}" + COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} + -Dfile=${file} -Dname=${name} + -DExternalData_ACTION=local + -DExternalData_CONFIG=${config} + -P ${_ExternalData_SELF} + MAIN_DEPENDENCY "${name}" + ) + endif() list(APPEND files "${file}") endif() endforeach() @@ -429,23 +443,27 @@ function(ExternalData_add_target target) set(stamp "${ext}-stamp") if(NOT DEFINED "_ExternalData_FILE_${file}") set("_ExternalData_FILE_${file}" 1) - add_custom_command( - # Users care about the data file, so hide the hash/timestamp file. - COMMENT "Generating ${file}" - # The hash/timestamp file is the output from the build perspective. - # List the real file as a second output in case it is a broken link. - # The files must be listed in this order so CMake can hide from the - # make tool that a symlink target may not be newer than the input. - OUTPUT "${file}${stamp}" "${file}" - # Run the data fetch/update script. - COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} - -Dfile=${file} -Dname=${name} -Dext=${ext} - -DExternalData_ACTION=fetch - -DExternalData_CONFIG=${config} - -P ${_ExternalData_SELF} - # Update whenever the object hash changes. - MAIN_DEPENDENCY "${name}${ext}" - ) + get_property(added DIRECTORY PROPERTY "_ExternalData_FILE_${file}") + if(NOT added) + set_property(DIRECTORY PROPERTY "_ExternalData_FILE_${file}" 1) + add_custom_command( + # Users care about the data file, so hide the hash/timestamp file. + COMMENT "Generating ${file}" + # The hash/timestamp file is the output from the build perspective. + # List the real file as a second output in case it is a broken link. + # The files must be listed in this order so CMake can hide from the + # make tool that a symlink target may not be newer than the input. + OUTPUT "${file}${stamp}" "${file}" + # Run the data fetch/update script. + COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} + -Dfile=${file} -Dname=${name} -Dext=${ext} + -DExternalData_ACTION=fetch + -DExternalData_CONFIG=${config} + -P ${_ExternalData_SELF} + # Update whenever the object hash changes. + MAIN_DEPENDENCY "${name}${ext}" + ) + endif() list(APPEND files "${file}${stamp}") endif() endforeach() diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt index f07ab71..1018dd8 100644 --- a/Tests/Module/ExternalData/CMakeLists.txt +++ b/Tests/Module/ExternalData/CMakeLists.txt @@ -53,4 +53,5 @@ ExternalData_Add_Target(Data1) add_subdirectory(Data2) add_subdirectory(Data3) add_subdirectory(Data4) +add_subdirectory(Data5) add_subdirectory(DataNoSymlinks) diff --git a/Tests/Module/ExternalData/Data5/CMakeLists.txt b/Tests/Module/ExternalData/Data5/CMakeLists.txt new file mode 100644 index 0000000..13c7fab --- /dev/null +++ b/Tests/Module/ExternalData/Data5/CMakeLists.txt @@ -0,0 +1,22 @@ +# Test adding the same data file in multiple tests +ExternalData_Add_Test(Data5.A + NAME Data5Check.A + COMMAND ${CMAKE_COMMAND} + -D Data5=DATA{../Data.dat} + -P ${CMAKE_CURRENT_SOURCE_DIR}/Data5Check.cmake + ) +ExternalData_Add_Target(Data5.A) +ExternalData_Add_Test(Data5.B + NAME Data5Check.B + COMMAND ${CMAKE_COMMAND} + -D Data5=DATA{../Data.dat} + -P ${CMAKE_CURRENT_SOURCE_DIR}/Data5Check.cmake + ) +ExternalData_Add_Target(Data5.B) +ExternalData_Add_Test(Data5.C + NAME Data5Check.C + COMMAND ${CMAKE_COMMAND} + -D Data5=DATA{../Data.dat} + -P ${CMAKE_CURRENT_SOURCE_DIR}/Data5Check.cmake + ) +ExternalData_Add_Target(Data5.C) diff --git a/Tests/Module/ExternalData/Data5/Data5Check.cmake b/Tests/Module/ExternalData/Data5/Data5Check.cmake new file mode 100644 index 0000000..4dea9a4 --- /dev/null +++ b/Tests/Module/ExternalData/Data5/Data5Check.cmake @@ -0,0 +1,4 @@ +file(STRINGS "${Data5}" lines LIMIT_INPUT 1024) +if(NOT "x${lines}" STREQUAL "xInput file already transformed.") + message(SEND_ERROR "Input file:\n ${Data5}\ndoes not have expected content, but [[${lines}]]") +endif() ----------------------------------------------------------------------- Summary of changes: Modules/ExternalData.cmake | 76 +++++++++++++--------- Tests/Module/ExternalData/CMakeLists.txt | 1 + Tests/Module/ExternalData/Data5/CMakeLists.txt | 22 +++++++ Tests/Module/ExternalData/Data5/Data5Check.cmake | 4 ++ 4 files changed, 74 insertions(+), 29 deletions(-) create mode 100644 Tests/Module/ExternalData/Data5/CMakeLists.txt create mode 100644 Tests/Module/ExternalData/Data5/Data5Check.cmake hooks/post-receive -- CMake From robert.maynard at kitware.com Wed Sep 7 15:26:24 2016 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 7 Sep 2016 15:26:24 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.6.2, created. v3.6.2 Message-ID: <20160907192624.34843F570B@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.6.2 has been created at 9893496e9a282902248fe4876f232c7c8293b623 (tag) tagging c5dcd31e92c0a09009a340e3fe23ced4f6190b64 (commit) replaces v3.6.1 tagged by Brad King on Wed Sep 7 11:54:05 2016 -0400 - Log ----------------------------------------------------------------- CMake 3.6.2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJX0DgeAAoJEC0s7xA0khaE7dAP/js/SUePSOq8jFXzqD0Ri9ha XemAKmCDRx89oQdj3m2LP9WuDI4NNO1qeh4c68nar14XgRkPyzbByTBBRI0q1WgS mZPqT6oOBq/QJ5zoq2DcG4eUoBbUHQ7W9CBVIEJEogtYlNHlLkMcWFbzZbw/K9X0 kpoFK1X8YfYUMUBeGukeUhoLijbMgY3JtaCEJPtENV6uP62ijmMQ6w6cswmzjNJ6 ZIKJ3jmqpTehzP2/6gRkRmTWkI1F17Lkd7Fg7gO47QzSou2XDtlaA6FGIGHiCplI Q1m7nGbDsT+aSFCwMWKi9tzpEqM/yS/3q2Lx9lVm/l5HLQahZ50R9086N8FLWdhH 1yKRBqBqvb+zM+PirFdL0abJN/aYc09xj7bFdIoYab1dxd95rZY0lNqE6mXdVap+ wMtctcrlsPg9/AO1fiU7jBd8djXrNs+00k8OAnOVzlvdvkyDhaERmybGWqKJIS4k UTakWQCS108l9+byhqSyS5G2iY7u/eXDKgD7e8FeZLZhUc23LdffbJzv83dqN9tX ujEIPkMNfjfG2S0+16u/d8EUKAdjxhJ3RvZwrwLokYNSvzKDDvwI4Ph/O9m8QFEZ TkrPekK1Zx2PBGq4vFisvjXTc6nrTCSK8IRUHridexwt8RLbU41qVyhsFvNWhAu/ idM32M7RkCOsgroWRwwZ =A8Qb -----END PGP SIGNATURE----- Ben Boeckel (3): Intel-C: declare support for gnu11 Intel-C: support gnu89 and gnu99 extension flags Intel-C: standard flags are also supported in 12.0 Brad King (26): Merge branch 'FindProtobuf-restore-PROTOBUF_IMPORT_DIRS' into release Merge branch 'fix-findhdf5-definitions' into release Merge branch 'intel-gnu11-support' into release Add script to update curl from upstream Merge branch 'upstream-curl' into update-curl curl: Update script to get curl 7.50.1 Merge branch 'upstream-curl' into update-curl curl: Remove CMake-specific README Merge branch 'update-curl' into release VS: Fix VS 2015 .vcxproj debug setting for Windows7.1SDK toolset Merge branch 'vs14-debug-enum-older-toolsets' into release Merge branch 'update-cle-version-info' into release GetPrerequisites: Fix regression in gp_resolved_file_type Merge branch 'GetPrerequisites-fix-regression' into release Fortran: Fix .mod file comparison for Intel 16 format Merge branch 'intel-fortran-mod-diff' into release Merge branch 'vs-NsightTegra-empty-version' into release VS: Fix VS 2015 .vcxproj debug setting for v80 toolset Merge branch 'vs14-debug-enum-older-toolsets' into release FindHDF5: Fix regression in providing HDF5_IS_PARALLEL Merge branch 'FindHDF5-is-parallel' into release FindHDF5: Fix regression in finding hdf5hl_fortran Merge branch 'FindHDF5-fix-hl-fortran' into release curl: Backport certificate reuse fix from 7.50.2 Merge branch 'backport-curl-fix' into release CMake 3.6.2 Chuck Atkins (2): FindHDF5: Make sure compile definition vars keep the -D flag CrayLinuxEnvironment: Add alternative methods to get version info Curl Upstream (2): curl 2015-08-11 (1a7f66a3) curl 2016-08-03 (f2cb3a01) Fujii Hironori (1): VS: Fix out-of-bounds write on empty Nsight Tegra version Konstantin Sinitsyn (1): FindProtobuf: Restore support for PROTOBUF_IMPORT_DIRS ----------------------------------------------------------------------- hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 7 15:53:21 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 7 Sep 2016 15:53:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1839-g6dfacdc Message-ID: <20160907195321.BFB54F5A1A@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, next has been updated via 6dfacdc467dc87ef45a61359039003ba2f4a5d79 (commit) via bdc679a8aee4e6b9a8aea795bdbda2341d1e5d08 (commit) via a8936656faa14b27173f90046fef6259dceaa321 (commit) via 21346d3f12f6ec35680574df44430c7bfb2efecb (commit) from 11d249a583a14be654790ab6c8ecc5814018b2a4 (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=6dfacdc467dc87ef45a61359039003ba2f4a5d79 commit 6dfacdc467dc87ef45a61359039003ba2f4a5d79 Merge: 11d249a bdc679a Author: Brad King AuthorDate: Wed Sep 7 15:53:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 7 15:53:17 2016 -0400 Merge topic 'vs-15-generator' into next bdc679a8 VS15: Add Visual Studio 15 generator a8936656 VS: Update v140 flag tables from VS 15 MSBuild files 21346d3f Features: Record features for VS 15 Preview 4 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bdc679a8aee4e6b9a8aea795bdbda2341d1e5d08 commit bdc679a8aee4e6b9a8aea795bdbda2341d1e5d08 Author: Brad King AuthorDate: Fri Sep 2 16:15:11 2016 -0400 Commit: Brad King CommitDate: Wed Sep 7 15:49:08 2016 -0400 VS15: Add Visual Studio 15 generator Call the generator "Visual Studio 15" without any year because the preview version of VS 15 does not provide a year in the product name. Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator and update version numbers accordingly. Add the VS15 enumeration value. Note that we do not need to add a MSVC15 variable or v150 toolset because Visual Studio 15 comes with an updated version of the v140 toolset and remains ABI-compatible. Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14. Closes: #16143 diff --git a/Help/generator/Visual Studio 15.rst b/Help/generator/Visual Studio 15.rst new file mode 100644 index 0000000..2b9e33a --- /dev/null +++ b/Help/generator/Visual Studio 15.rst @@ -0,0 +1,16 @@ +Visual Studio 15 +---------------- + +Generates Visual Studio 15 project files. + +The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set +to specify a target platform name. + +For compatibility with CMake versions prior to 3.1, one may specify +a target platform name optionally at the end of this generator name: + +``Visual Studio 15 Win64`` + Specify target platform ``x64``. + +``Visual Studio 15 ARM`` + Specify target platform ``ARM``. diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst index cde8de8..3df3a81 100644 --- a/Help/manual/cmake-generators.7.rst +++ b/Help/manual/cmake-generators.7.rst @@ -82,6 +82,7 @@ Visual Studio Generators /generator/Visual Studio 11 2012 /generator/Visual Studio 12 2013 /generator/Visual Studio 14 2015 + /generator/Visual Studio 15 Other Generators ^^^^^^^^^^^^^^^^ diff --git a/Help/release/dev/vs-15-generator.rst b/Help/release/dev/vs-15-generator.rst new file mode 100644 index 0000000..be40cbc --- /dev/null +++ b/Help/release/dev/vs-15-generator.rst @@ -0,0 +1,4 @@ +vs-15-generator +--------------- + +* The :generator:`Visual Studio 15` generator was added. diff --git a/Help/variable/MSVC_VERSION.rst b/Help/variable/MSVC_VERSION.rst index ef3b0b5..e2aff3c 100644 --- a/Help/variable/MSVC_VERSION.rst +++ b/Help/variable/MSVC_VERSION.rst @@ -13,4 +13,4 @@ Known version numbers are:: 1600 = VS 10.0 1700 = VS 11.0 1800 = VS 12.0 - 1900 = VS 14.0 + 1900 = VS 14.0, 15.0 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 6c3ebf5..f5c2e52 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -492,6 +492,8 @@ if (WIN32) cmGlobalVisualStudio12Generator.cxx cmGlobalVisualStudio14Generator.h cmGlobalVisualStudio14Generator.cxx + cmGlobalVisualStudio15Generator.h + cmGlobalVisualStudio15Generator.cxx cmGlobalVisualStudioGenerator.cxx cmGlobalVisualStudioGenerator.h cmIDEFlagTable.h diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index ab87d67..8bb43ee 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -365,6 +365,20 @@ std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand() } } + // Search where VS15Preview places it. + mskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;"; + mskey += this->GetIDEVersion(); + if (cmSystemTools::ReadRegistryValue(mskey.c_str(), msbuild, + cmSystemTools::KeyWOW64_32)) { + cmSystemTools::ConvertToUnixSlashes(msbuild); + msbuild += "/MSBuild/"; + msbuild += this->GetIDEVersion(); + msbuild += "/Bin/MSBuild.exe"; + if (cmSystemTools::FileExists(msbuild, true)) { + return msbuild; + } + } + msbuild = "MSBuild.exe"; return msbuild; } diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx new file mode 100644 index 0000000..98076c3 --- /dev/null +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -0,0 +1,151 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmGlobalVisualStudio15Generator.h" + +#include "cmAlgorithms.h" +#include "cmLocalVisualStudio10Generator.h" +#include "cmMakefile.h" + +static const char vs15generatorName[] = "Visual Studio 15"; + +// Map generator name without year to name with year. +static const char* cmVS15GenName(const std::string& name, std::string& genName) +{ + if (strncmp(name.c_str(), vs15generatorName, + sizeof(vs15generatorName) - 1) != 0) { + return 0; + } + const char* p = name.c_str() + sizeof(vs15generatorName) - 1; + genName = std::string(vs15generatorName) + p; + return p; +} + +class cmGlobalVisualStudio15Generator::Factory + : public cmGlobalGeneratorFactory +{ +public: + virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name, + cmake* cm) const + { + std::string genName; + const char* p = cmVS15GenName(name, genName); + if (!p) { + return 0; + } + if (!*p) { + return new cmGlobalVisualStudio15Generator(cm, genName, ""); + } + if (*p++ != ' ') { + return 0; + } + if (strcmp(p, "Win64") == 0) { + return new cmGlobalVisualStudio15Generator(cm, genName, "x64"); + } + if (strcmp(p, "ARM") == 0) { + return new cmGlobalVisualStudio15Generator(cm, genName, "ARM"); + } + return 0; + } + + virtual void GetDocumentation(cmDocumentationEntry& entry) const + { + entry.Name = std::string(vs15generatorName) + " [arch]"; + entry.Brief = "Generates Visual Studio 15 project files. " + "Optional [arch] can be \"Win64\" or \"ARM\"."; + } + + virtual void GetGenerators(std::vector& names) const + { + names.push_back(vs15generatorName); + names.push_back(vs15generatorName + std::string(" ARM")); + names.push_back(vs15generatorName + std::string(" Win64")); + } + + bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } +}; + +cmGlobalGeneratorFactory* cmGlobalVisualStudio15Generator::NewFactory() +{ + return new Factory; +} + +cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( + cmake* cm, const std::string& name, const std::string& platformName) + : cmGlobalVisualStudio14Generator(cm, name, platformName) +{ + std::string vc15Express; + this->ExpressEdition = cmSystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\15.0\\Setup\\VC;" + "ProductDir", + vc15Express, cmSystemTools::KeyWOW64_32); + this->DefaultPlatformToolset = "v140"; + this->Version = VS15; +} + +bool cmGlobalVisualStudio15Generator::MatchesGeneratorName( + const std::string& name) const +{ + std::string genName; + if (cmVS15GenName(name, genName)) { + return genName == this->GetName(); + } + return false; +} + +void cmGlobalVisualStudio15Generator::WriteSLNHeader(std::ostream& fout) +{ + // Visual Studio 15 writes .sln format 12.00 + fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; + if (this->ExpressEdition) { + fout << "# Visual Studio Express 15 for Windows Desktop\n"; + } else { + fout << "# Visual Studio 15\n"; + } +} + +bool cmGlobalVisualStudio15Generator::SelectWindowsStoreToolset( + std::string& toolset) const +{ + if (cmHasLiteralPrefix(this->SystemVersion, "10.0")) { + if (this->IsWindowsStoreToolsetInstalled() && + this->IsWindowsDesktopToolsetInstalled()) { + toolset = "v140"; // VS 15 uses v140 toolset + return true; + } else { + return false; + } + } + return this->cmGlobalVisualStudio14Generator::SelectWindowsStoreToolset( + toolset); +} + +bool cmGlobalVisualStudio15Generator::IsWindowsDesktopToolsetInstalled() const +{ + const char desktop10Key[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" + "VisualStudio\\15.0\\VC\\Runtimes"; + + std::vector vc15; + return cmSystemTools::GetRegistrySubKeys(desktop10Key, vc15, + cmSystemTools::KeyWOW64_32); +} + +bool cmGlobalVisualStudio15Generator::IsWindowsStoreToolsetInstalled() const +{ + const char universal10Key[] = + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" + "VisualStudio\\15.0\\Setup\\Build Tools for Windows 10;SrcPath"; + + std::string win10SDK; + return cmSystemTools::ReadRegistryValue(universal10Key, win10SDK, + cmSystemTools::KeyWOW64_32); +} diff --git a/Source/cmGlobalVisualStudio15Generator.h b/Source/cmGlobalVisualStudio15Generator.h new file mode 100644 index 0000000..f673883 --- /dev/null +++ b/Source/cmGlobalVisualStudio15Generator.h @@ -0,0 +1,46 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmGlobalVisualStudio15Generator_h +#define cmGlobalVisualStudio15Generator_h + +#include "cmGlobalVisualStudio14Generator.h" + +/** \class cmGlobalVisualStudio15Generator */ +class cmGlobalVisualStudio15Generator : public cmGlobalVisualStudio14Generator +{ +public: + cmGlobalVisualStudio15Generator(cmake* cm, const std::string& name, + const std::string& platformName); + static cmGlobalGeneratorFactory* NewFactory(); + + virtual bool MatchesGeneratorName(const std::string& name) const; + + virtual void WriteSLNHeader(std::ostream& fout); + + virtual const char* GetToolsVersion() { return "15.0"; } +protected: + virtual bool SelectWindowsStoreToolset(std::string& toolset) const; + + virtual const char* GetIDEVersion() { return "15.0"; } + + // Used to verify that the Desktop toolset for the current generator is + // installed on the machine. + virtual bool IsWindowsDesktopToolsetInstalled() const; + + // These aren't virtual because we need to check if the selected version + // of the toolset is installed + bool IsWindowsStoreToolsetInstalled() const; + +private: + class Factory; +}; +#endif diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 8d3964f..0dc4497 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -163,6 +163,18 @@ std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand() } } + // Search where VS15Preview places it. + vskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;"; + vskey += this->GetIDEVersion(); + if (cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd, + cmSystemTools::KeyWOW64_32)) { + cmSystemTools::ConvertToUnixSlashes(vscmd); + vscmd += "/Common7/IDE/devenv.com"; + if (cmSystemTools::FileExists(vscmd, true)) { + return vscmd; + } + } + vscmd = "devenv.com"; return vscmd; } diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 1d456ff..3312ed6 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -34,7 +34,8 @@ public: VS11 = 110, VS12 = 120, /* VS13 = 130 was skipped */ - VS14 = 140 + VS14 = 140, + VS15 = 150 }; cmGlobalVisualStudioGenerator(cmake* cm); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 3b31d7b..9badda6 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -96,6 +96,7 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault() case cmGlobalVisualStudioGenerator::VS11: case cmGlobalVisualStudioGenerator::VS12: case cmGlobalVisualStudioGenerator::VS14: + case cmGlobalVisualStudioGenerator::VS15: // by default VS puts empty // for a project, to make our projects look the same put a new line // and space over for the closing as the default diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 25f9e3a..d6bea3d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -66,6 +66,7 @@ #include "cmGlobalVisualStudio11Generator.h" #include "cmGlobalVisualStudio12Generator.h" #include "cmGlobalVisualStudio14Generator.h" +#include "cmGlobalVisualStudio15Generator.h" #include "cmGlobalVisualStudio71Generator.h" #include "cmGlobalVisualStudio8Generator.h" #include "cmGlobalVisualStudio9Generator.h" @@ -1317,6 +1318,7 @@ int cmake::ActualConfigure() { "11.0", "Visual Studio 11 2012" }, { "12.0", "Visual Studio 12 2013" }, { "14.0", "Visual Studio 14 2015" }, + { "15.0", "Visual Studio 15" }, { 0, 0 } }; for (int i = 0; version[i].MSVersion != 0; i++) { @@ -1634,6 +1636,7 @@ void cmake::AddDefaultGenerators() { #if defined(_WIN32) && !defined(__CYGWIN__) #if !defined(CMAKE_BOOT_MINGW) + this->Generators.push_back(cmGlobalVisualStudio15Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory()); this->Generators.push_back(cmGlobalVisualStudio11Generator::NewFactory()); diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake index 4d0a0a1..27250cb 100644 --- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake @@ -3,7 +3,7 @@ include(RunCMake) set(RunCMake_GENERATOR_PLATFORM "") run_cmake(NoPlatform) -if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124])( 20[0-9][0-9])?$") +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[01245])( 20[0-9][0-9])?$") set(RunCMake_GENERATOR_PLATFORM "x64") run_cmake(x64Platform) else() @@ -17,7 +17,7 @@ set(RunCMake_TEST_OPTIONS -A "Extra Platform") run_cmake(TwoPlatforms) unset(RunCMake_TEST_OPTIONS) -if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124])( 20[0-9][0-9])?$") +if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[01245])( 20[0-9][0-9])?$") set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestPlatform-toolchain.cmake) run_cmake(TestPlatformToolchain) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 6220657..283a2a0 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -3,7 +3,7 @@ include(RunCMake) set(RunCMake_GENERATOR_TOOLSET "") run_cmake(NoToolset) -if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124]|Xcode" AND NOT XCODE_BELOW_3) +if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3) set(RunCMake_GENERATOR_TOOLSET "Test Toolset") run_cmake(TestToolset) else() @@ -17,7 +17,7 @@ set(RunCMake_TEST_OPTIONS -T "Extra Toolset") run_cmake(TwoToolsets) unset(RunCMake_TEST_OPTIONS) -if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124]|Xcode" AND NOT XCODE_BELOW_3) +if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3) set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake) run_cmake(TestToolsetToolchain) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index 20301c2..7465243 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 2.6) project(VSExternalInclude) -if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124]") +if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01245]") set(PROJECT_EXT vcxproj) else() set(PROJECT_EXT vcproj) @@ -55,7 +55,7 @@ add_dependencies(VSExternalInclude lib2) # and the sln file can no longer be the only source # of that depend. So, for VS 10 make the executable # depend on lib1 and lib2 -if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124]") +if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01245]") add_dependencies(VSExternalInclude lib1) endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8936656faa14b27173f90046fef6259dceaa321 commit a8936656faa14b27173f90046fef6259dceaa321 Author: Brad King AuthorDate: Fri Sep 2 16:14:20 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 10:22:39 2016 -0400 VS: Update v140 flag tables from VS 15 MSBuild files Run cmparseMSBuildXML.py on cl.xml, lib.xml, link.xml, and masm.xml to generate our flag tables: python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/1033/cl.xml" > cmVS14CLFlagTable.h python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/1033/lib.xml" > cmVS14LibFlagTable.h python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/1033/link.xml" > cmVS14LinkFlagTable.h python cmparseMSBuildXML.py -x ".../Common7/IDE/VC/VCTargets/BuildCustomizations/masm.xml" > cmVS14MASMFlagTable.h Manually integrate the changes with those we've made since earlier import to add the new flag mappings. diff --git a/Source/cmVS14CLFlagTable.h b/Source/cmVS14CLFlagTable.h index 5812e79..c48db68 100644 --- a/Source/cmVS14CLFlagTable.h +++ b/Source/cmVS14CLFlagTable.h @@ -60,6 +60,9 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { { "BufferSecurityCheck", "GS-", "Disable Security Check", "false", 0 }, { "BufferSecurityCheck", "GS", "Enable Security Check", "true", 0 }, + { "ControlFlowGuard", "guard:cf", "Yes", "Guard", 0 }, + { "ControlFlowGuard", "", "No", "false", 0 }, + { "EnableEnhancedInstructionSet", "arch:SSE", "Streaming SIMD Extensions", "StreamingSIMDExtensions", 0 }, { "EnableEnhancedInstructionSet", "arch:SSE2", "Streaming SIMD Extensions 2", @@ -76,6 +79,10 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { { "FloatingPointModel", "fp:strict", "Strict", "Strict", 0 }, { "FloatingPointModel", "fp:fast", "Fast", "Fast", 0 }, + { "LanguageStandard", "std:c++14", "ISO C++14 Standard", "stdcpp14", 0 }, + { "LanguageStandard", "std:c++latest", "ISO C++ Latest Draft Standard", + "stdcpplatest", 0 }, + { "PrecompiledHeader", "Yc", "Create", "Create", cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, { "PrecompiledHeader", "Yu", "Use", "Use", @@ -164,6 +171,9 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { { "TreatWChar_tAsBuiltInType", "Zc:wchar_t", "", "true", 0 }, { "ForceConformanceInForLoopScope", "Zc:forScope-", "", "false", 0 }, { "ForceConformanceInForLoopScope", "Zc:forScope", "", "true", 0 }, + { "RemoveUnreferencedCodeData", "Zc:inline", "", "true", 0 }, + { "EnforceTypeConversionRules", "Zc:rvalueCast-", "", "false", 0 }, + { "EnforceTypeConversionRules", "Zc:rvalueCast", "", "true", 0 }, { "RuntimeTypeInfo", "GR-", "", "false", 0 }, { "RuntimeTypeInfo", "GR", "", "true", 0 }, { "OpenMPSupport", "openmp-", "", "false", 0 }, @@ -215,6 +225,8 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = { "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, // String Properties + { "WarningVersion", "Wv:", "Warning Version", "", + cmVS7FlagTable::UserValue }, // Skip [TrackerLogDirectory] - no command line Switch. { "PreprocessOutputPath", "Fi", "Preprocess Output Path", "", cmVS7FlagTable::UserValue }, diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS14LinkFlagTable.h index 6e56422..596f880 100644 --- a/Source/cmVS14LinkFlagTable.h +++ b/Source/cmVS14LinkFlagTable.h @@ -35,6 +35,12 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = { { "UACExecutionLevel", "level='requireAdministrator'", "requireAdministrator", "RequireAdministrator", 0 }, + { "GenerateDebugInformation", "DEBUG:FASTLINK", + "Optimize for faster linking", "DebugFastLink", + cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", + cmVS7FlagTable::CaseInsensitive }, + { "SubSystem", "", "Not Set", "NotSet", 0 }, { "SubSystem", "SUBSYSTEM:CONSOLE", "Console", "Console", 0 }, { "SubSystem", "SUBSYSTEM:WINDOWS", "Windows", "Windows", 0 }, @@ -54,6 +60,8 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = { { "Driver", "DRIVER:WDM", "WDM", "WDM", 0 }, { "LinkTimeCodeGeneration", "", "Default", "Default", 0 }, + { "LinkTimeCodeGeneration", "LTCG:incremental", + "Use Fast Link Time Code Generation", "UseFastLinkTimeCodeGeneration", 0 }, { "LinkTimeCodeGeneration", "LTCG", "Use Link Time Code Generation", "UseLinkTimeCodeGeneration", 0 }, { "LinkTimeCodeGeneration", "LTCG:PGInstrument", @@ -121,6 +129,9 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = { { "CLRSupportLastError", "CLRSupportLastError:SYSTEMDLL", "System Dlls Only", "SystemDlls", 0 }, + { "LinkControlFlowGuard", "guard:cf", "Enable Security Check with Guard", + "Guard", 0 }, + // Bool Properties { "LinkIncremental", "INCREMENTAL:NO", "", "false", 0 }, { "LinkIncremental", "INCREMENTAL", "", "true", 0 }, @@ -138,10 +149,6 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = { { "UACUIAccess", "uiAccess='false'", "", "false", 0 }, { "UACUIAccess", "uiAccess='true'", "", "true", 0 }, { "ManifestEmbed", "manifest:embed", "", "true", 0 }, - { "GenerateDebugInformation", "DEBUG:FASTLINK", "", "DebugFastLink", - cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "", "Debug", - cmVS7FlagTable::CaseInsensitive }, { "MapExports", "MAPINFO:EXPORTS", "", "true", 0 }, { "AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0 }, { "AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0 }, @@ -195,6 +202,8 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = { { "AdditionalLibraryDirectories", "LIBPATH:", "Additional Library Directories", "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "Natvis", "NATVIS:", "Natvis files", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, // Skip [AdditionalDependencies] - no command line Switch. { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:", "Ignore Specific Default Libraries", "", diff --git a/Source/cmparseMSBuildXML.py b/Source/cmparseMSBuildXML.py index 056a0db..1b38d15 100755 --- a/Source/cmparseMSBuildXML.py +++ b/Source/cmparseMSBuildXML.py @@ -15,6 +15,9 @@ # "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V140/1033/cl.xml" # "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V140/1033/lib.xml" # "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V140/1033/link.xml" +# "${PROGRAMFILES}/Microsoft Visual Studio/VS15Preview/Common7/IDE/VC/VCTargets/1033/cl.xml" +# "${PROGRAMFILES}/Microsoft Visual Studio/VS15Preview/Common7/IDE/VC/VCTargets/1033/lib.xml" +# "${PROGRAMFILES}/Microsoft Visual Studio/VS15Preview/Common7/IDE/VC/VCTargets/1033/link.xml" # # BoolProperty true|false # simple example: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21346d3f12f6ec35680574df44430c7bfb2efecb commit 21346d3f12f6ec35680574df44430c7bfb2efecb Author: Brad King AuthorDate: Mon Sep 5 10:35:33 2016 -0400 Commit: Brad King CommitDate: Tue Sep 6 10:22:39 2016 -0400 Features: Record features for VS 15 Preview 4 diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake index 79d5962..5969586 100644 --- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake +++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake @@ -9,6 +9,9 @@ set(_cmake_oldestSupported "_MSC_VER >= 1600") +# VS version 15 (not 2015) introduces support for aggregate initializers. +set(_cmake_feature_test_cxx_aggregate_default_initializers "_MSC_FULL_VER >= 190024406") + # VS 2015 Update 2 introduces support for variable templates. # https://www.visualstudio.com/en-us/news/vs2015-update2-vs.aspx set(_cmake_feature_test_cxx_variable_templates "_MSC_FULL_VER >= 190023918") ----------------------------------------------------------------------- Summary of changes: ...ual Studio 14 2015.rst => Visual Studio 15.rst} | 10 +- Help/manual/cmake-generators.7.rst | 1 + Help/release/dev/vs-15-generator.rst | 4 + Help/variable/MSVC_VERSION.rst | 2 +- Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 3 + Source/CMakeLists.txt | 2 + Source/cmGlobalVisualStudio10Generator.cxx | 14 ++ Source/cmGlobalVisualStudio15Generator.cxx | 151 ++++++++++++++++++++ ...nerator.h => cmGlobalVisualStudio15Generator.h} | 29 ++-- Source/cmGlobalVisualStudio7Generator.cxx | 12 ++ Source/cmGlobalVisualStudioGenerator.h | 3 +- Source/cmVS14CLFlagTable.h | 12 ++ Source/cmVS14LinkFlagTable.h | 17 ++- Source/cmVisualStudioGeneratorOptions.cxx | 1 + Source/cmake.cxx | 3 + Source/cmparseMSBuildXML.py | 3 + .../RunCMake/GeneratorPlatform/RunCMakeTest.cmake | 4 +- Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 4 +- Tests/VSExternalInclude/CMakeLists.txt | 4 +- 19 files changed, 245 insertions(+), 34 deletions(-) copy Help/generator/{Visual Studio 14 2015.rst => Visual Studio 15.rst} (66%) create mode 100644 Help/release/dev/vs-15-generator.rst create mode 100644 Source/cmGlobalVisualStudio15Generator.cxx copy Source/{cmGlobalVisualStudio14Generator.h => cmGlobalVisualStudio15Generator.h} (62%) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Sep 8 00:01:08 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 8 Sep 2016 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-867-g5d0d9b3 Message-ID: <20160908040108.93D04F5C5F@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 5d0d9b36f26221e2de96bce2afb6334f2b8e8454 (commit) from 024eecd9106a4d3a6adebd918c0afdceb02cd4bb (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=5d0d9b36f26221e2de96bce2afb6334f2b8e8454 commit 5d0d9b36f26221e2de96bce2afb6334f2b8e8454 Author: Kitware Robot AuthorDate: Thu Sep 8 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Thu Sep 8 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1b36905..74f34b2 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 6) -set(CMake_VERSION_PATCH 20160907) +set(CMake_VERSION_PATCH 20160908) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From raffi.enficiaud at mines-paris.org Thu Sep 8 07:25:17 2016 From: raffi.enficiaud at mines-paris.org (Raffi Enficiaud) Date: Thu, 8 Sep 2016 07:25:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1841-gac75ecc Message-ID: <20160908112517.C1F0FF5018@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, next has been updated via ac75ecc1800c224c803b1de2af49f071b6aee36c (commit) via 5d0d9b36f26221e2de96bce2afb6334f2b8e8454 (commit) from 6dfacdc467dc87ef45a61359039003ba2f4a5d79 (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=ac75ecc1800c224c803b1de2af49f071b6aee36c commit ac75ecc1800c224c803b1de2af49f071b6aee36c Merge: 6dfacdc 5d0d9b3 Author: Raffi Enficiaud AuthorDate: Thu Sep 8 07:25:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 07:25:16 2016 -0400 Merge topic 'FindMatlab-regression-tests-print-on-error' into next 5d0d9b36 CMake Nightly Date Stamp ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From raffi.enficiaud at mines-paris.org Thu Sep 8 07:27:13 2016 From: raffi.enficiaud at mines-paris.org (Raffi Enficiaud) Date: Thu, 8 Sep 2016 07:27:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1843-g279bd66 Message-ID: <20160908112713.D0CE9F5211@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, next has been updated via 279bd661894dc24b19e83e0d5de07ec2061e7552 (commit) via 1031e5d99385317e74a4667da9865aebcb48bcbe (commit) from ac75ecc1800c224c803b1de2af49f071b6aee36c (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=279bd661894dc24b19e83e0d5de07ec2061e7552 commit 279bd661894dc24b19e83e0d5de07ec2061e7552 Merge: ac75ecc 1031e5d Author: Raffi Enficiaud AuthorDate: Thu Sep 8 07:27:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 07:27:13 2016 -0400 Merge topic 'FindMatlab-regression-tests-print-on-error' into next 1031e5d9 FindMatlab: add verbosity to the nightly tests https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1031e5d99385317e74a4667da9865aebcb48bcbe commit 1031e5d99385317e74a4667da9865aebcb48bcbe Author: Raffi Enficiaud AuthorDate: Thu Sep 8 13:26:42 2016 +0200 Commit: Raffi Enficiaud CommitDate: Thu Sep 8 13:26:42 2016 +0200 FindMatlab: add verbosity to the nightly tests diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8293286..7f43ec7 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1412,9 +1412,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release # Matlab module if(CMake_TEST_FindMatlab) - ADD_TEST_MACRO(FindMatlab.basic_checks ${CMAKE_CTEST_COMMAND} -C $) - ADD_TEST_MACRO(FindMatlab.versions_checks ${CMAKE_CTEST_COMMAND} -C $) - ADD_TEST_MACRO(FindMatlab.components_checks ${CMAKE_CTEST_COMMAND} -C $) + ADD_TEST_MACRO(FindMatlab.basic_checks ${CMAKE_CTEST_COMMAND} -V -C $) + ADD_TEST_MACRO(FindMatlab.versions_checks ${CMAKE_CTEST_COMMAND} -V -C $) + ADD_TEST_MACRO(FindMatlab.components_checks ${CMAKE_CTEST_COMMAND} -V -C $) endif() find_package(GTK2 QUIET) ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:36:50 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:36:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-869-g4c674eb Message-ID: <20160908133650.A7AA3F52FC@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 4c674eba7ab7d431f535639553be8dcce14276c4 (commit) via f9973166e82c3f5d8e05e2ab57aceb15ff267295 (commit) from 5d0d9b36f26221e2de96bce2afb6334f2b8e8454 (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=4c674eba7ab7d431f535639553be8dcce14276c4 commit 4c674eba7ab7d431f535639553be8dcce14276c4 Merge: 5d0d9b3 f997316 Author: Brad King AuthorDate: Thu Sep 8 09:36:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 09:36:47 2016 -0400 Merge topic 'ExternalData-repeat-file' f9973166 ExternalData: Tolerate files duplicated across multiple targets ----------------------------------------------------------------------- Summary of changes: Modules/ExternalData.cmake | 76 +++++++++++++--------- Tests/Module/ExternalData/CMakeLists.txt | 1 + Tests/Module/ExternalData/Data5/CMakeLists.txt | 22 +++++++ Tests/Module/ExternalData/Data5/Data5Check.cmake | 4 ++ 4 files changed, 74 insertions(+), 29 deletions(-) create mode 100644 Tests/Module/ExternalData/Data5/CMakeLists.txt create mode 100644 Tests/Module/ExternalData/Data5/Data5Check.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:36:53 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:36:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-871-g04657ee Message-ID: <20160908133653.80DF5F52D8@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 04657ee2f83cb446c5595090f256273a23be94a2 (commit) via 290e4ce8a89819d6617fa404513d8a1629cafea7 (commit) from 4c674eba7ab7d431f535639553be8dcce14276c4 (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=04657ee2f83cb446c5595090f256273a23be94a2 commit 04657ee2f83cb446c5595090f256273a23be94a2 Merge: 4c674eb 290e4ce Author: Brad King AuthorDate: Thu Sep 8 09:36:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 09:36:51 2016 -0400 Merge topic 'install-export-root-prefix' 290e4ce8 install: Fix computed import prefix in export files when it is "/" ----------------------------------------------------------------------- Summary of changes: Source/cmExportInstallFileGenerator.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:36:57 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:36:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-875-g988b380 Message-ID: <20160908133657.21FA7F5495@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 988b3806b6ad2f28ebd6b582ce18928407d0b011 (commit) via bdc679a8aee4e6b9a8aea795bdbda2341d1e5d08 (commit) via a8936656faa14b27173f90046fef6259dceaa321 (commit) via 21346d3f12f6ec35680574df44430c7bfb2efecb (commit) from 04657ee2f83cb446c5595090f256273a23be94a2 (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=988b3806b6ad2f28ebd6b582ce18928407d0b011 commit 988b3806b6ad2f28ebd6b582ce18928407d0b011 Merge: 04657ee bdc679a Author: Brad King AuthorDate: Thu Sep 8 09:36:54 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 09:36:54 2016 -0400 Merge topic 'vs-15-generator' bdc679a8 VS15: Add Visual Studio 15 generator a8936656 VS: Update v140 flag tables from VS 15 MSBuild files 21346d3f Features: Record features for VS 15 Preview 4 ----------------------------------------------------------------------- Summary of changes: ...ual Studio 14 2015.rst => Visual Studio 15.rst} | 10 +- Help/manual/cmake-generators.7.rst | 1 + Help/release/dev/vs-15-generator.rst | 4 + Help/variable/MSVC_VERSION.rst | 2 +- Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 3 + Source/CMakeLists.txt | 2 + Source/cmGlobalVisualStudio10Generator.cxx | 14 ++ Source/cmGlobalVisualStudio15Generator.cxx | 151 ++++++++++++++++++++ ...nerator.h => cmGlobalVisualStudio15Generator.h} | 29 ++-- Source/cmGlobalVisualStudio7Generator.cxx | 12 ++ Source/cmGlobalVisualStudioGenerator.h | 3 +- Source/cmVS14CLFlagTable.h | 12 ++ Source/cmVS14LinkFlagTable.h | 17 ++- Source/cmVisualStudioGeneratorOptions.cxx | 1 + Source/cmake.cxx | 3 + Source/cmparseMSBuildXML.py | 3 + .../RunCMake/GeneratorPlatform/RunCMakeTest.cmake | 4 +- Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 4 +- Tests/VSExternalInclude/CMakeLists.txt | 4 +- 19 files changed, 245 insertions(+), 34 deletions(-) copy Help/generator/{Visual Studio 14 2015.rst => Visual Studio 15.rst} (66%) create mode 100644 Help/release/dev/vs-15-generator.rst create mode 100644 Source/cmGlobalVisualStudio15Generator.cxx copy Source/{cmGlobalVisualStudio14Generator.h => cmGlobalVisualStudio15Generator.h} (62%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:36:59 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:36:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-880-gf506489 Message-ID: <20160908133659.DE830F5548@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 f506489d1ed222761f9ce752144a458290020e55 (commit) via d28da906fed16ab7f45440db65c8c84e15b53996 (commit) via 8c65a5017fe6a6dfe6d57018e28decd7649588d4 (commit) via f70c71c5a9759324d9e610bc919832b7500fd116 (commit) via e11cd31fa0cce8210577ee46b6a33ee371f4fe64 (commit) from 988b3806b6ad2f28ebd6b582ce18928407d0b011 (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=f506489d1ed222761f9ce752144a458290020e55 commit f506489d1ed222761f9ce752144a458290020e55 Merge: 988b380 d28da90 Author: Brad King AuthorDate: Thu Sep 8 09:36:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 09:36:57 2016 -0400 Merge topic 'fortran-depend-cleanup' d28da906 cmFortranParser: Inject a newline at end-of-file when missing 8c65a501 cmFortranParser: Revise indentation style to match rest of CMake f70c71c5 cmFortranLexer: Update to flex 2.6 e11cd31f Fortran: Warn when dependency scanning fails to parse a source file ----------------------------------------------------------------------- Summary of changes: Source/.gitattributes | 2 + Source/cmDependsFortran.cxx | 6 + Source/cmFortranLexer.cxx | 1864 ++++++++++++++++++++-------------------- Source/cmFortranLexer.h | 147 ++-- Source/cmFortranLexer.in.l | 17 +- Source/cmFortranParser.cxx | 403 ++++----- Source/cmFortranParser.h | 6 + Source/cmFortranParser.y | 162 ++-- Source/cmFortranParserImpl.cxx | 21 +- Source/cmFortranParserTokens.h | 28 +- 10 files changed, 1291 insertions(+), 1365 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:38:39 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:38:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1848-g51f0859 Message-ID: <20160908133839.1B3F3F560E@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, next has been updated via 51f085974000d064b2bc1040aff7b934520c7656 (commit) via f506489d1ed222761f9ce752144a458290020e55 (commit) via 988b3806b6ad2f28ebd6b582ce18928407d0b011 (commit) via 04657ee2f83cb446c5595090f256273a23be94a2 (commit) via 4c674eba7ab7d431f535639553be8dcce14276c4 (commit) from 279bd661894dc24b19e83e0d5de07ec2061e7552 (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=51f085974000d064b2bc1040aff7b934520c7656 commit 51f085974000d064b2bc1040aff7b934520c7656 Merge: 279bd66 f506489 Author: Brad King AuthorDate: Thu Sep 8 09:38:30 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 09:38:30 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:41:41 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:41:41 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1851-g6b56c21 Message-ID: <20160908134141.D0860C1C89@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, next has been updated via 6b56c21dc954629c65f4586dda1fc0578c7061d2 (commit) via 695f0d0d3a2db22d2ee3a426df8a1ec502cd471b (commit) via 1619fb46a88accd1e6864f0c9de27ae2fd46541a (commit) from 51f085974000d064b2bc1040aff7b934520c7656 (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=6b56c21dc954629c65f4586dda1fc0578c7061d2 commit 6b56c21dc954629c65f4586dda1fc0578c7061d2 Merge: 51f0859 695f0d0 Author: Brad King AuthorDate: Thu Sep 8 09:41:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 09:41:40 2016 -0400 Merge topic 'fortran-parser-keywords' into next 695f0d0d cmFortranParser: Parse keywords as lexical tokens 1619fb46 cmFortranParser: Simplify grammar by skipping unknown statements https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=695f0d0d3a2db22d2ee3a426df8a1ec502cd471b commit 695f0d0d3a2db22d2ee3a426df8a1ec502cd471b Author: Brad King AuthorDate: Mon Sep 5 15:54:51 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 09:40:02 2016 -0400 cmFortranParser: Parse keywords as lexical tokens Teach the lexer to match and return specific Fortran keywords as tokens. Update the parser to use these instead of always using a WORD token and then checking the text. This avoids extra string comparisons and will allow more grammar productions to be unambiguously added later for additional Fortran statements. diff --git a/Source/cmFortranLexer.cxx b/Source/cmFortranLexer.cxx index 195c449..7bcd993 100644 --- a/Source/cmFortranLexer.cxx +++ b/Source/cmFortranLexer.cxx @@ -347,8 +347,8 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 45 -#define YY_END_OF_BUFFER 46 +#define YY_NUM_RULES 50 +#define YY_END_OF_BUFFER 51 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -356,27 +356,30 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[173] = +static yyconst flex_int16_t yy_accept[199] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 46, 40, 42, 41, 44, 1, 40, 33, 2, 35, - 40, 41, 38, 40, 39, 40, 39, 42, 40, 41, - 40, 39, 9, 8, 9, 4, 3, 40, 0, 10, - 0, 0, 0, 0, 0, 33, 33, 34, 36, 38, - 40, 39, 0, 43, 39, 0, 0, 0, 12, 0, - 0, 0, 0, 0, 0, 40, 0, 11, 39, 0, - 0, 5, 0, 0, 0, 29, 0, 0, 33, 33, - 33, 33, 0, 0, 12, 12, 0, 0, 0, 23, - 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 51, 45, 47, 46, 49, 1, 45, 33, 2, 35, + 45, 46, 38, 45, 44, 44, 44, 44, 44, 45, + 44, 47, 45, 46, 45, 44, 9, 8, 9, 4, + 3, 45, 0, 10, 0, 0, 0, 0, 0, 33, + 33, 34, 36, 38, 45, 44, 44, 44, 44, 44, + 0, 48, 44, 0, 0, 0, 12, 0, 0, 0, + 0, 0, 0, 45, 0, 11, 44, 0, 0, 5, + 0, 0, 0, 29, 0, 0, 33, 33, 33, 33, + 0, 0, 39, 44, 44, 44, 43, 12, 12, 0, + + 0, 0, 23, 0, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 31, 0, 0, 0, 0, + 0, 0, 44, 44, 44, 0, 24, 25, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 32, 27, 0, + 0, 20, 0, 44, 44, 42, 0, 26, 21, 0, + 0, 0, 19, 0, 0, 18, 28, 0, 0, 40, + 44, 17, 22, 0, 7, 37, 7, 15, 0, 44, + 14, 16, 41, 0, 0, 0, 13, 0 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, - 0, 0, 0, 0, 0, 0, 0, 24, 25, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 32, 27, - 0, 0, 20, 0, 0, 26, 21, 0, 0, 0, - 19, 0, 0, 18, 28, 0, 0, 17, 22, 0, - 7, 37, 7, 15, 0, 14, 16, 0, 0, 0, - 13, 0 } ; static yyconst YY_CHAR yy_ec[256] = @@ -387,14 +390,14 @@ static yyconst YY_CHAR yy_ec[256] = 1, 5, 6, 7, 8, 9, 1, 10, 11, 1, 1, 12, 1, 13, 1, 1, 1, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 17, - 18, 19, 20, 1, 21, 21, 22, 23, 24, 25, - 21, 21, 26, 21, 21, 27, 21, 28, 21, 21, - 21, 21, 29, 21, 30, 21, 21, 21, 21, 21, - 1, 31, 1, 1, 32, 1, 21, 21, 33, 34, - - 35, 36, 21, 21, 37, 21, 21, 38, 21, 39, - 21, 21, 21, 21, 40, 21, 41, 21, 21, 21, - 21, 21, 1, 1, 1, 1, 1, 1, 1, 1, + 18, 19, 20, 1, 21, 22, 23, 24, 25, 26, + 22, 22, 27, 22, 22, 28, 29, 30, 31, 22, + 22, 32, 33, 34, 35, 22, 22, 22, 22, 22, + 1, 36, 1, 1, 37, 1, 21, 22, 38, 39, + + 40, 41, 22, 22, 42, 22, 22, 43, 29, 44, + 31, 22, 22, 32, 45, 34, 46, 22, 22, 22, + 22, 22, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -411,195 +414,211 @@ static yyconst YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst YY_CHAR yy_meta[42] = +static yyconst YY_CHAR yy_meta[47] = { 0, 1, 2, 2, 3, 4, 3, 3, 1, 1, 3, 3, 1, 3, 5, 1, 3, 1, 3, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 1, 5, 7, 7, 7, 7, 7, 7, 7, 7, - 7 + 7, 7, 7, 7, 7, 1, 5, 7, 7, 7, + 7, 7, 7, 7, 7, 7 } ; -static yyconst flex_uint16_t yy_base[182] = +static yyconst flex_uint16_t yy_base[208] = { 0, - 0, 40, 0, 41, 220, 48, 44, 54, 56, 65, - 220, 0, 535, 535, 216, 535, 81, 74, 535, 535, - 186, 535, 153, 145, 0, 85, 122, 87, 154, 155, - 195, 227, 535, 147, 91, 535, 535, 0, 147, 535, - 267, 34, 70, 74, 34, 122, 141, 535, 0, 535, - 112, 0, 98, 535, 0, 156, 307, 0, 143, 43, - 155, 151, 48, 101, 130, 348, 130, 535, 0, 121, - 197, 165, 172, 244, 182, 183, 191, 248, 273, 293, - 308, 314, 321, 246, 275, 216, 269, 299, 304, 327, - 307, 304, 312, 116, 107, 367, 535, 327, 334, 347, - - 347, 350, 352, 349, 354, 359, 357, 363, 366, 365, - 369, 372, 369, 373, 374, 101, 86, 372, 535, 535, - 378, 380, 386, 382, 388, 388, 389, 535, 535, 393, - 394, 396, 392, 430, 400, 56, 47, 403, 535, 535, - 409, 414, 535, 409, 416, 535, 535, 416, 419, 441, - 535, 117, 0, 535, 535, 423, 426, 535, 535, 430, - 535, 535, 535, 535, 432, 457, 535, 459, 0, 25, - 535, 535, 476, 483, 489, 492, 499, 506, 513, 520, - 527 + 0, 45, 0, 46, 392, 53, 49, 59, 61, 71, + 392, 0, 572, 572, 364, 572, 91, 77, 572, 572, + 342, 572, 317, 232, 0, 19, 42, 218, 40, 92, + 137, 96, 174, 240, 220, 257, 572, 238, 97, 572, + 572, 0, 205, 572, 302, 50, 77, 83, 59, 137, + 156, 572, 0, 572, 123, 0, 84, 130, 90, 92, + 167, 572, 0, 176, 347, 0, 190, 94, 175, 200, + 121, 92, 201, 393, 193, 572, 0, 162, 222, 175, + 171, 209, 176, 281, 184, 207, 307, 313, 328, 348, + 338, 111, 0, 205, 213, 125, 0, 354, 185, 280, + + 336, 300, 340, 309, 278, 321, 139, 130, 245, 572, + 335, 347, 351, 356, 360, 375, 375, 379, 383, 300, + 80, 381, 384, 390, 392, 393, 397, 399, 397, 402, + 403, 106, 105, 284, 572, 572, 407, 408, 411, 320, + 413, 413, 420, 419, 421, 420, 572, 572, 421, 426, + 428, 420, 467, 432, 101, 83, 438, 572, 572, 439, + 446, 572, 436, 449, 63, 0, 450, 572, 572, 450, + 453, 481, 572, 64, 0, 572, 572, 454, 460, 0, + 464, 572, 572, 463, 572, 572, 572, 572, 468, 471, + 495, 572, 0, 496, 0, 38, 572, 572, 513, 520, + + 526, 529, 536, 543, 550, 557, 564 } ; -static yyconst flex_int16_t yy_def[182] = +static yyconst flex_int16_t yy_def[208] = { 0, - 172, 1, 1, 1, 1, 1, 173, 173, 173, 173, - 172, 174, 172, 172, 175, 172, 174, 172, 172, 172, - 174, 172, 172, 174, 176, 174, 176, 172, 172, 172, - 177, 172, 172, 172, 172, 172, 172, 174, 175, 172, - 172, 172, 172, 172, 172, 172, 178, 172, 174, 172, - 174, 176, 172, 172, 27, 172, 172, 57, 174, 172, - 172, 172, 172, 172, 172, 177, 177, 172, 32, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 178, 178, - 178, 178, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 179, 180, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 181, 181, - 172, 0, 172, 172, 172, 172, 172, 172, 172, 172, - 172 + 198, 1, 1, 1, 1, 1, 199, 199, 199, 199, + 198, 200, 198, 198, 201, 198, 200, 198, 198, 198, + 200, 198, 198, 200, 202, 202, 202, 202, 202, 200, + 202, 198, 198, 198, 203, 198, 198, 198, 198, 198, + 198, 200, 201, 198, 198, 198, 198, 198, 198, 198, + 204, 198, 200, 198, 200, 202, 202, 202, 202, 202, + 198, 198, 31, 198, 198, 65, 200, 198, 198, 198, + 198, 198, 198, 203, 203, 198, 36, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 204, 204, 204, 204, + 198, 198, 202, 202, 202, 202, 202, 198, 198, 198, + + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 202, + 202, 202, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 202, 202, 202, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 202, 202, 202, 198, 198, 198, 198, + 198, 198, 198, 205, 206, 198, 198, 198, 198, 202, + 202, 198, 198, 198, 198, 198, 198, 198, 198, 202, + 198, 198, 202, 198, 207, 207, 198, 0, 198, 198, + + 198, 198, 198, 198, 198, 198, 198 } ; -static yyconst flex_uint16_t yy_nxt[577] = +static yyconst flex_uint16_t yy_nxt[619] = { 0, 12, 13, 14, 13, 13, 15, 16, 12, 17, 18, 19, 12, 20, 12, 21, 22, 12, 23, 12, 24, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 26, 27, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 28, 28, 171, 28, 28, 34, 29, 29, 28, - 30, 153, 28, 35, 36, 29, 34, 73, 34, 31, - 152, 78, 37, 35, 36, 35, 87, 34, 73, 32, - 32, 37, 78, 92, 35, 46, 46, 87, 46, 47, - 32, 32, 41, 48, 92, 41, 53, 54, 56, 53, - 137, 56, 71, 72, 57, 71, 74, 75, 76, 53, - - 54, 77, 53, 42, 43, 136, 44, 74, 75, 76, - 45, 117, 77, 83, 42, 43, 83, 44, 162, 162, - 116, 45, 38, 46, 46, 95, 46, 47, 93, 38, - 38, 48, 68, 38, 94, 55, 38, 84, 38, 93, - 38, 38, 80, 46, 86, 80, 81, 86, 84, 40, - 82, 70, 38, 55, 38, 58, 59, 56, 58, 65, - 56, 38, 38, 57, 51, 38, 96, 59, 38, 96, - 38, 50, 38, 38, 97, 90, 60, 61, 91, 62, - 63, 88, 89, 64, 38, 38, 90, 60, 61, 91, - 62, 63, 88, 89, 64, 66, 98, 68, 71, 72, - - 49, 71, 66, 66, 101, 102, 66, 98, 66, 66, - 103, 66, 104, 66, 66, 101, 102, 86, 40, 172, - 86, 103, 30, 104, 172, 66, 66, 67, 67, 68, - 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, - 69, 67, 67, 67, 67, 67, 67, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 67, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 41, 99, - 105, 41, 100, 106, 80, 46, 86, 80, 81, 86, - 99, 105, 82, 100, 106, 172, 172, 172, 85, 42, - 43, 172, 44, 107, 80, 46, 45, 80, 81, 172, - - 42, 43, 82, 44, 107, 172, 172, 45, 58, 80, - 46, 58, 80, 81, 172, 80, 46, 82, 80, 81, - 85, 172, 83, 82, 108, 83, 110, 109, 113, 60, - 61, 114, 62, 63, 115, 108, 64, 110, 109, 113, - 60, 61, 114, 62, 63, 115, 84, 64, 66, 111, - 68, 172, 118, 172, 112, 66, 66, 84, 119, 66, - 111, 66, 66, 118, 66, 112, 66, 66, 96, 119, - 120, 96, 121, 122, 123, 124, 97, 125, 66, 66, - 126, 120, 127, 121, 122, 123, 124, 128, 125, 129, - 130, 126, 131, 127, 132, 133, 134, 135, 128, 138, - - 129, 130, 139, 131, 140, 132, 133, 134, 135, 141, - 138, 142, 143, 139, 144, 140, 145, 146, 147, 148, - 141, 149, 142, 143, 151, 144, 154, 145, 146, 147, - 148, 150, 149, 155, 150, 151, 156, 154, 157, 158, - 159, 160, 150, 85, 155, 150, 164, 156, 165, 157, - 158, 159, 160, 166, 85, 167, 172, 164, 168, 165, - 168, 168, 172, 168, 166, 172, 167, 172, 172, 172, - 172, 172, 172, 169, 172, 169, 33, 33, 33, 33, - 33, 33, 33, 38, 172, 172, 172, 38, 38, 39, - 39, 39, 39, 39, 39, 39, 52, 172, 52, 67, - - 67, 67, 67, 67, 67, 67, 79, 79, 79, 79, - 79, 79, 79, 161, 161, 161, 172, 161, 161, 161, - 163, 172, 163, 172, 163, 163, 163, 170, 170, 170, - 170, 170, 172, 170, 11, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172 + 25, 25, 25, 25, 26, 25, 27, 25, 28, 25, + 25, 25, 25, 25, 29, 30, 31, 25, 25, 26, + 25, 27, 25, 25, 25, 29, 32, 32, 57, 32, + 32, 38, 33, 33, 32, 34, 197, 32, 39, 40, + 33, 38, 57, 38, 35, 186, 186, 41, 39, 40, + 39, 58, 60, 38, 81, 36, 36, 41, 50, 50, + 39, 50, 51, 181, 60, 58, 52, 175, 86, 81, + 36, 36, 45, 61, 62, 45, 61, 64, 79, 80, + + 64, 79, 86, 65, 82, 174, 83, 93, 84, 156, + 155, 144, 85, 96, 46, 47, 97, 48, 100, 82, + 83, 106, 93, 84, 91, 49, 85, 91, 96, 46, + 47, 97, 48, 100, 133, 106, 49, 42, 50, 50, + 119, 50, 51, 132, 42, 42, 52, 105, 42, 92, + 63, 42, 94, 42, 119, 42, 42, 88, 50, 122, + 88, 89, 105, 95, 92, 90, 108, 94, 61, 62, + 122, 61, 42, 63, 42, 66, 109, 64, 66, 109, + 64, 42, 42, 65, 110, 42, 99, 67, 42, 99, + 42, 99, 42, 42, 99, 76, 111, 68, 69, 114, + + 70, 71, 101, 67, 102, 107, 117, 44, 72, 42, + 42, 111, 68, 69, 114, 70, 71, 101, 102, 72, + 74, 117, 76, 79, 80, 103, 79, 74, 74, 104, + 118, 74, 120, 74, 74, 112, 74, 121, 74, 74, + 103, 113, 78, 104, 73, 118, 109, 120, 59, 109, + 112, 55, 121, 113, 110, 74, 74, 75, 75, 76, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 77, 75, 75, 75, 75, 75, 75, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 75, 77, 77, 77, 77, 77, 77, 77, + + 77, 77, 77, 45, 115, 123, 45, 130, 88, 50, + 116, 88, 89, 157, 88, 50, 90, 88, 89, 115, + 123, 130, 90, 126, 116, 46, 47, 157, 48, 88, + 50, 129, 88, 89, 143, 54, 49, 90, 126, 91, + 46, 47, 91, 48, 131, 143, 129, 49, 66, 88, + 50, 66, 88, 89, 161, 99, 53, 90, 99, 131, + 98, 134, 124, 127, 92, 161, 44, 98, 125, 128, + 68, 69, 135, 70, 71, 136, 134, 124, 127, 92, + 125, 72, 137, 128, 138, 68, 69, 135, 70, 71, + 136, 198, 72, 74, 34, 76, 198, 137, 139, 138, + + 74, 74, 140, 141, 74, 142, 74, 74, 145, 74, + 146, 74, 74, 139, 198, 147, 148, 140, 141, 149, + 142, 150, 151, 145, 152, 146, 153, 154, 74, 74, + 147, 148, 158, 159, 149, 160, 150, 151, 162, 152, + 163, 153, 154, 164, 165, 166, 168, 158, 159, 167, + 160, 169, 170, 162, 171, 163, 198, 173, 164, 165, + 166, 168, 176, 167, 177, 171, 169, 170, 172, 178, + 179, 172, 173, 180, 182, 183, 184, 176, 188, 177, + 98, 179, 172, 189, 178, 172, 190, 191, 180, 182, + 183, 184, 192, 188, 98, 193, 194, 194, 189, 194, + + 194, 190, 191, 198, 198, 198, 198, 192, 198, 198, + 193, 195, 195, 37, 37, 37, 37, 37, 37, 37, + 42, 198, 198, 198, 42, 42, 43, 43, 43, 43, + 43, 43, 43, 56, 198, 56, 75, 75, 75, 75, + 75, 75, 75, 87, 87, 87, 87, 87, 87, 87, + 185, 185, 185, 198, 185, 185, 185, 187, 198, 187, + 198, 187, 187, 187, 196, 196, 196, 196, 196, 198, + 196, 11, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198 } ; -static yyconst flex_int16_t yy_chk[577] = +static yyconst flex_int16_t yy_chk[619] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 170, 2, 4, 7, 2, 4, 6, - 6, 137, 6, 7, 7, 6, 8, 42, 9, 6, - 136, 45, 9, 8, 8, 9, 60, 10, 42, 6, - 6, 10, 45, 63, 10, 18, 18, 60, 18, 18, - 6, 6, 17, 18, 63, 17, 26, 26, 28, 26, - 117, 28, 35, 35, 28, 35, 43, 43, 44, 53, - - 53, 44, 53, 17, 17, 116, 17, 43, 43, 44, - 17, 95, 44, 51, 17, 17, 51, 17, 152, 152, - 94, 17, 27, 46, 46, 70, 46, 46, 64, 27, - 27, 46, 67, 27, 65, 27, 27, 51, 27, 64, - 27, 27, 47, 47, 59, 47, 47, 59, 51, 39, - 47, 34, 27, 27, 29, 29, 59, 56, 29, 30, - 56, 29, 29, 56, 24, 29, 72, 29, 29, 72, - 29, 23, 29, 29, 72, 62, 29, 29, 62, 29, - 29, 61, 61, 29, 29, 29, 62, 29, 29, 62, - 29, 29, 61, 61, 29, 31, 73, 31, 71, 71, - - 21, 71, 31, 31, 75, 76, 31, 73, 31, 31, - 76, 31, 77, 31, 31, 75, 76, 86, 15, 11, - 86, 76, 5, 77, 0, 31, 31, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 41, 74, - 78, 41, 74, 84, 79, 79, 85, 79, 79, 85, - 74, 78, 79, 74, 84, 0, 0, 0, 85, 41, - 41, 0, 41, 87, 80, 80, 41, 80, 80, 0, - - 41, 41, 80, 41, 87, 0, 0, 41, 57, 81, - 81, 57, 81, 81, 0, 82, 82, 81, 82, 82, - 57, 0, 83, 82, 88, 83, 89, 88, 91, 57, - 57, 92, 57, 57, 93, 88, 57, 89, 88, 91, - 57, 57, 92, 57, 57, 93, 83, 57, 66, 90, - 66, 0, 98, 0, 90, 66, 66, 83, 99, 66, - 90, 66, 66, 98, 66, 90, 66, 66, 96, 99, - 100, 96, 101, 102, 103, 104, 96, 105, 66, 66, - 106, 100, 107, 101, 102, 103, 104, 108, 105, 109, - 110, 106, 111, 107, 112, 113, 114, 115, 108, 118, - - 109, 110, 121, 111, 122, 112, 113, 114, 115, 123, - 118, 124, 125, 121, 126, 122, 127, 130, 131, 132, - 123, 133, 124, 125, 135, 126, 138, 127, 130, 131, - 132, 134, 133, 141, 134, 135, 142, 138, 144, 145, - 148, 149, 150, 134, 141, 150, 156, 142, 157, 144, - 145, 148, 149, 160, 150, 165, 0, 156, 166, 157, - 168, 166, 0, 168, 160, 0, 165, 0, 0, 0, - 0, 0, 0, 166, 0, 168, 173, 173, 173, 173, - 173, 173, 173, 174, 0, 0, 0, 174, 174, 175, - 175, 175, 175, 175, 175, 175, 176, 0, 176, 177, - - 177, 177, 177, 177, 177, 177, 178, 178, 178, 178, - 178, 178, 178, 179, 179, 179, 0, 179, 179, 179, - 180, 0, 180, 0, 180, 180, 180, 181, 181, 181, - 181, 181, 0, 181, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172 + 1, 1, 1, 1, 1, 1, 2, 4, 26, 2, + 4, 7, 2, 4, 6, 6, 196, 6, 7, 7, + 6, 8, 26, 9, 6, 174, 174, 9, 8, 8, + 9, 27, 29, 10, 46, 6, 6, 10, 18, 18, + 10, 18, 18, 165, 29, 27, 18, 156, 49, 46, + 6, 6, 17, 30, 30, 17, 30, 32, 39, 39, + + 32, 39, 49, 32, 47, 155, 47, 57, 48, 133, + 132, 121, 48, 59, 17, 17, 60, 17, 68, 47, + 47, 72, 57, 48, 55, 17, 48, 55, 59, 17, + 17, 60, 17, 68, 108, 72, 17, 31, 50, 50, + 92, 50, 50, 107, 31, 31, 50, 71, 31, 55, + 31, 31, 58, 31, 92, 31, 31, 51, 51, 96, + 51, 51, 71, 58, 55, 51, 78, 58, 61, 61, + 96, 61, 31, 31, 33, 33, 80, 64, 33, 80, + 64, 33, 33, 64, 80, 33, 99, 33, 33, 99, + 33, 67, 33, 33, 67, 75, 81, 33, 33, 83, + + 33, 33, 69, 67, 69, 73, 85, 43, 33, 33, + 33, 81, 33, 33, 83, 33, 33, 69, 69, 33, + 35, 85, 35, 79, 79, 70, 79, 35, 35, 70, + 86, 35, 94, 35, 35, 82, 35, 95, 35, 35, + 70, 82, 38, 70, 34, 86, 109, 94, 28, 109, + 82, 24, 95, 82, 109, 35, 35, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + + 36, 36, 36, 45, 84, 100, 45, 105, 87, 87, + 84, 87, 87, 134, 88, 88, 87, 88, 88, 84, + 100, 105, 88, 102, 84, 45, 45, 134, 45, 89, + 89, 104, 89, 89, 120, 23, 45, 89, 102, 91, + 45, 45, 91, 45, 106, 120, 104, 45, 65, 90, + 90, 65, 90, 90, 140, 98, 21, 90, 98, 106, + 65, 111, 101, 103, 91, 140, 15, 98, 101, 103, + 65, 65, 112, 65, 65, 113, 111, 101, 103, 91, + 101, 65, 114, 103, 115, 65, 65, 112, 65, 65, + 113, 11, 65, 74, 5, 74, 0, 114, 116, 115, + + 74, 74, 117, 118, 74, 119, 74, 74, 122, 74, + 123, 74, 74, 116, 0, 124, 125, 117, 118, 126, + 119, 127, 128, 122, 129, 123, 130, 131, 74, 74, + 124, 125, 137, 138, 126, 139, 127, 128, 141, 129, + 142, 130, 131, 143, 144, 145, 149, 137, 138, 146, + 139, 150, 151, 141, 152, 142, 0, 154, 143, 144, + 145, 149, 157, 146, 160, 152, 150, 151, 153, 161, + 163, 153, 154, 164, 167, 170, 171, 157, 178, 160, + 153, 163, 172, 179, 161, 172, 181, 184, 164, 167, + 170, 171, 189, 178, 172, 190, 191, 194, 179, 191, + + 194, 181, 184, 0, 0, 0, 0, 189, 0, 0, + 190, 191, 194, 199, 199, 199, 199, 199, 199, 199, + 200, 0, 0, 0, 200, 200, 201, 201, 201, 201, + 201, 201, 201, 202, 0, 202, 203, 203, 203, 203, + 203, 203, 203, 204, 204, 204, 204, 204, 204, 204, + 205, 205, 205, 0, 205, 205, 205, 206, 0, 206, + 0, 206, 206, 206, 207, 207, 207, 207, 207, 0, + 207, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198 } ; /* The intent behind this definition is that it'll catch @@ -666,7 +685,7 @@ Modify cmFortranLexer.cxx: /*--------------------------------------------------------------------------*/ -#line 670 "cmFortranLexer.cxx" +#line 689 "cmFortranLexer.cxx" #define INITIAL 0 #define free_fmt 1 @@ -937,7 +956,7 @@ YY_DECL #line 65 "cmFortranLexer.in.l" -#line 941 "cmFortranLexer.cxx" +#line 960 "cmFortranLexer.cxx" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -965,13 +984,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 173 ) + if ( yy_current_state >= 199 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 535 ); + while ( yy_base[yy_current_state] != 572 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1193,40 +1212,60 @@ YY_RULE_SETUP case 39: YY_RULE_SETUP #line 154 "cmFortranLexer.in.l" +{ return END; } +case 40: +YY_RULE_SETUP +#line 155 "cmFortranLexer.in.l" +{ return INCLUDE; } +case 41: +YY_RULE_SETUP +#line 156 "cmFortranLexer.in.l" +{ return INTERFACE; } +case 42: +YY_RULE_SETUP +#line 157 "cmFortranLexer.in.l" +{ return MODULE; } +case 43: +YY_RULE_SETUP +#line 158 "cmFortranLexer.in.l" +{ return USE; } +case 44: +YY_RULE_SETUP +#line 160 "cmFortranLexer.in.l" { yylvalp->string = strdup(yytext); return WORD; } -case 40: +case 45: YY_RULE_SETUP -#line 159 "cmFortranLexer.in.l" +#line 165 "cmFortranLexer.in.l" { return GARBAGE; } -case 41: -/* rule 41 can match eol */ +case 46: +/* rule 46 can match eol */ YY_RULE_SETUP -#line 161 "cmFortranLexer.in.l" +#line 167 "cmFortranLexer.in.l" { return EOSTMT; } -case 42: +case 47: YY_RULE_SETUP -#line 164 "cmFortranLexer.in.l" +#line 170 "cmFortranLexer.in.l" /* Ignore */ YY_BREAK -case 43: -/* rule 43 can match eol */ +case 48: +/* rule 48 can match eol */ YY_RULE_SETUP -#line 165 "cmFortranLexer.in.l" +#line 171 "cmFortranLexer.in.l" /* Ignore line-endings preceded by \ */ YY_BREAK -case 44: +case 49: YY_RULE_SETUP -#line 167 "cmFortranLexer.in.l" +#line 173 "cmFortranLexer.in.l" { return *yytext; } case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(free_fmt): case YY_STATE_EOF(fixed_fmt): case YY_STATE_EOF(str_sq): case YY_STATE_EOF(str_dq): -#line 169 "cmFortranLexer.in.l" +#line 175 "cmFortranLexer.in.l" { if(!cmFortranParser_FilePop(yyextra) ) { @@ -1234,12 +1273,12 @@ case YY_STATE_EOF(str_dq): } } YY_BREAK -case 45: +case 50: YY_RULE_SETUP -#line 176 "cmFortranLexer.in.l" +#line 182 "cmFortranLexer.in.l" ECHO; YY_BREAK -#line 1276 "cmFortranLexer.cxx" +#line 1320 "cmFortranLexer.cxx" case YY_END_OF_BUFFER: { @@ -1533,7 +1572,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 173 ) + if ( yy_current_state >= 199 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; @@ -1562,11 +1601,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 173 ) + if ( yy_current_state >= 199 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 172); + yy_is_jam = (yy_current_state == 198); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -2408,7 +2447,7 @@ void cmFortran_yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 176 "cmFortranLexer.in.l" +#line 182 "cmFortranLexer.in.l" diff --git a/Source/cmFortranLexer.h b/Source/cmFortranLexer.h index e20c0aa..cb175ec 100644 --- a/Source/cmFortranLexer.h +++ b/Source/cmFortranLexer.h @@ -337,7 +337,7 @@ extern int cmFortran_yylex (yyscan_t yyscanner); #undef YY_DECL #endif -#line 176 "cmFortranLexer.in.l" +#line 182 "cmFortranLexer.in.l" #line 344 "cmFortranLexer.h" diff --git a/Source/cmFortranLexer.in.l b/Source/cmFortranLexer.in.l index aa879e8..6870f7c 100644 --- a/Source/cmFortranLexer.in.l +++ b/Source/cmFortranLexer.in.l @@ -151,6 +151,12 @@ $[ \t]*endif { return F90PPR_ENDIF; } =|=> { return ASSIGNMENT_OP; } +[Ee][Nn][Dd] { return END; } +[Ii][Nn][Cc][Ll][Uu][Dd][Ee] { return INCLUDE; } +[Ii][Nn][Tt][Ee][Rr][Ff][Aa][Cc][Ee] { return INTERFACE; } +[Mm][Oo][Dd][Uu][Ll][Ee] { return MODULE; } +[Uu][Ss][Ee] { return USE; } + [a-zA-Z_][a-zA-Z_0-9]* { yylvalp->string = strdup(yytext); return WORD; diff --git a/Source/cmFortranParser.cxx b/Source/cmFortranParser.cxx index d60db29..bf4e7c4 100644 --- a/Source/cmFortranParser.cxx +++ b/Source/cmFortranParser.cxx @@ -123,12 +123,6 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message) cmFortranParser_Error(parser, message); } -static bool cmFortranParserIsKeyword(const char* word, - const char* keyword) -{ - return cmsysString_strcasecmp(word, keyword) == 0; -} - /* Disable some warnings in the generated code. */ #ifdef _MSC_VER # pragma warning (disable: 4102) /* Unused goto label. */ @@ -139,7 +133,7 @@ static bool cmFortranParserIsKeyword(const char* word, # pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */ #endif -#line 143 "cmFortranParser.cxx" /* yacc.c:339 */ +#line 137 "cmFortranParser.cxx" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -202,7 +196,12 @@ extern int cmFortran_yydebug; UNTERMINATED_STRING = 283, STRING = 284, WORD = 285, - CPP_INCLUDE_ANGLE = 286 + CPP_INCLUDE_ANGLE = 286, + END = 287, + INCLUDE = 288, + INTERFACE = 289, + MODULE = 290, + USE = 291 }; #endif /* Tokens. */ @@ -235,17 +234,22 @@ extern int cmFortran_yydebug; #define STRING 284 #define WORD 285 #define CPP_INCLUDE_ANGLE 286 +#define END 287 +#define INCLUDE 288 +#define INTERFACE 289 +#define MODULE 290 +#define USE 291 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 81 "cmFortranParser.y" /* yacc.c:355 */ +#line 75 "cmFortranParser.y" /* yacc.c:355 */ char* string; -#line 249 "cmFortranParser.cxx" /* yacc.c:355 */ +#line 253 "cmFortranParser.cxx" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; @@ -261,7 +265,7 @@ int cmFortran_yyparse (yyscan_t yyscanner); /* Copy the second part of user declarations. */ -#line 265 "cmFortranParser.cxx" /* yacc.c:358 */ +#line 269 "cmFortranParser.cxx" /* yacc.c:358 */ #ifdef short # undef short @@ -503,21 +507,21 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 216 +#define YYLAST 469 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 32 +#define YYNTOKENS 37 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 14 /* YYNRULES -- Number of rules. */ -#define YYNRULES 49 +#define YYNRULES 57 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 91 +#define YYNSTATES 109 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 286 +#define YYMAXUTOK 291 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -554,18 +558,20 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 103, 103, 103, 106, 113, 131, 139, 149, 157, - 162, 167, 172, 177, 182, 187, 192, 196, 200, 204, - 208, 209, 214, 214, 214, 215, 215, 216, 216, 217, - 217, 218, 218, 219, 219, 220, 220, 221, 221, 222, - 222, 223, 223, 226, 227, 228, 229, 230, 231, 232 + 0, 102, 102, 102, 105, 109, 114, 119, 124, 128, + 133, 141, 146, 151, 156, 161, 166, 171, 176, 181, + 185, 189, 193, 197, 198, 203, 203, 203, 204, 204, + 205, 205, 206, 206, 207, 207, 208, 208, 209, 209, + 210, 210, 211, 211, 212, 212, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226 }; #endif @@ -580,9 +586,9 @@ static const char *const yytname[] = "CPP_IFNDEF", "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF", "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA", "DCOLON", "UNTERMINATED_STRING", - "STRING", "WORD", "CPP_INCLUDE_ANGLE", "$accept", "code", "stmt", - "include", "define", "undef", "ifdef", "ifndef", "if", "elif", "else", - "endif", "other", "misc_code", YY_NULLPTR + "STRING", "WORD", "CPP_INCLUDE_ANGLE", "END", "INCLUDE", "INTERFACE", + "MODULE", "USE", "$accept", "code", "stmt", "include", "define", "undef", + "ifdef", "ifndef", "if", "elif", "else", "endif", "other", "misc_code", YY_NULLPTR }; #endif @@ -594,14 +600,14 @@ static const yytype_uint16 yytoknum[] = 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286 + 285, 286, 287, 288, 289, 290, 291 }; # endif -#define YYPACT_NINF -34 +#define YYPACT_NINF -38 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-34))) + (!!((Yystate) == (-38))) #define YYTABLE_NINF -1 @@ -612,16 +618,17 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -34, 18, -34, 1, -34, -23, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, 186, -34, -34, -22, -19, - -13, -10, -8, -34, -34, -34, -34, -34, -34, -34, - 17, 23, -34, -34, 41, -34, -34, -34, -34, -34, - 47, 52, 57, 85, 90, 31, -34, 95, 100, -34, - -34, -34, -34, -34, -34, -34, -34, -34, 105, 133, - 138, 143, 148, -34, -34, -34, -34, -34, 29, 153, - -34, -34, -34, -34, -34, -34, -34, -34, -34, 181, - -34 + -38, 39, -38, 3, -38, -20, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, -22, -16, 1, -8, + -6, -38, -4, -7, -3, -2, -1, -38, -38, -38, + -38, -38, -38, 62, -38, -38, -38, -38, -38, 0, + 2, -38, -38, -38, -38, -38, -38, 73, 107, 118, + 152, 163, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, 197, 208, 242, 253, + 6, -38, 287, 298, 332, 343, 377, 388, -38, -38, + -38, -38, -38, -38, -38, -38, -38, 4, 422, -38, + -38, -38, -38, -38, -38, -38, -38, 433, -38 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -629,30 +636,31 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 2, 0, 1, 0, 20, 0, 22, 23, 24, 26, - 25, 28, 27, 29, 31, 33, 37, 35, 39, 30, - 32, 34, 38, 36, 40, 0, 41, 3, 0, 0, - 0, 0, 0, 41, 41, 41, 41, 21, 41, 4, - 0, 0, 41, 41, 0, 41, 41, 41, 41, 41, - 0, 0, 0, 0, 0, 0, 41, 0, 0, 10, - 46, 45, 48, 47, 49, 44, 43, 42, 0, 0, - 0, 0, 0, 16, 17, 18, 19, 9, 0, 0, - 8, 5, 11, 12, 13, 14, 15, 41, 6, 0, - 7 + 2, 0, 1, 0, 23, 0, 25, 26, 27, 29, + 28, 31, 30, 32, 34, 36, 40, 38, 42, 33, + 35, 37, 41, 39, 43, 44, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 44, 44, 44, + 44, 24, 44, 0, 44, 44, 4, 44, 44, 0, + 0, 44, 44, 44, 44, 44, 44, 0, 0, 0, + 0, 0, 13, 54, 53, 56, 55, 57, 52, 46, + 47, 48, 49, 50, 51, 45, 0, 0, 0, 0, + 0, 44, 0, 0, 0, 0, 0, 0, 19, 20, + 21, 22, 12, 8, 11, 7, 6, 0, 0, 5, + 14, 15, 16, 17, 18, 44, 9, 0, 10 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -33, -34 + -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -37, -38 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 44, 67 + -1, 1, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 43, 75 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -660,90 +668,143 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 50, 51, 52, 53, 37, 54, 38, 45, 0, 57, - 58, 46, 68, 69, 70, 71, 72, 47, 2, 3, - 48, 4, 49, 79, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 59, 60, 61, 55, 25, 26, - 73, 60, 61, 56, 89, 74, 60, 61, 78, 87, - 75, 60, 61, 0, 0, 0, 0, 62, 63, 64, - 65, 66, 0, 62, 63, 64, 65, 66, 62, 63, - 64, 65, 66, 62, 63, 64, 65, 66, 76, 60, - 61, 0, 0, 77, 60, 61, 0, 0, 80, 60, - 61, 0, 0, 81, 60, 61, 0, 0, 82, 60, - 61, 62, 63, 64, 65, 66, 62, 63, 64, 65, - 66, 62, 63, 64, 65, 66, 62, 63, 64, 65, - 66, 62, 63, 64, 65, 66, 83, 60, 61, 0, - 0, 84, 60, 61, 0, 0, 85, 60, 61, 0, - 0, 86, 60, 61, 0, 0, 88, 60, 61, 62, - 63, 64, 65, 66, 62, 63, 64, 65, 66, 62, - 63, 64, 65, 66, 62, 63, 64, 65, 66, 62, - 63, 64, 65, 66, 90, 60, 61, 0, 0, 39, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 62, 63, 64, - 65, 66, 40, 41, 0, 42, 43 + 57, 58, 59, 60, 46, 61, 41, 76, 77, 42, + 78, 79, 44, 45, 82, 83, 84, 85, 86, 87, + 49, 50, 48, 53, 51, 52, 0, 54, 55, 56, + 80, 47, 81, 97, 105, 0, 0, 0, 0, 2, + 3, 0, 4, 0, 98, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 62, 63, 64, 107, 0, + 25, 26, 27, 28, 29, 30, 88, 63, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 67, 68, 69, 0, 70, 71, 72, 73, 74, 65, + 66, 67, 68, 69, 0, 70, 71, 72, 73, 74, + 89, 63, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 90, 63, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 66, 67, 68, 69, 0, 70, + 71, 72, 73, 74, 65, 66, 67, 68, 69, 0, + 70, 71, 72, 73, 74, 91, 63, 64, 0, 0, + 0, 0, 0, 0, 0, 0, 92, 63, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 67, 68, 69, 0, 70, 71, 72, 73, 74, 65, + 66, 67, 68, 69, 0, 70, 71, 72, 73, 74, + 93, 63, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 94, 63, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 66, 67, 68, 69, 0, 70, + 71, 72, 73, 74, 65, 66, 67, 68, 69, 0, + 70, 71, 72, 73, 74, 95, 63, 64, 0, 0, + 0, 0, 0, 0, 0, 0, 96, 63, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 67, 68, 69, 0, 70, 71, 72, 73, 74, 65, + 66, 67, 68, 69, 0, 70, 71, 72, 73, 74, + 99, 63, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 100, 63, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 66, 67, 68, 69, 0, 70, + 71, 72, 73, 74, 65, 66, 67, 68, 69, 0, + 70, 71, 72, 73, 74, 101, 63, 64, 0, 0, + 0, 0, 0, 0, 0, 0, 102, 63, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 67, 68, 69, 0, 70, 71, 72, 73, 74, 65, + 66, 67, 68, 69, 0, 70, 71, 72, 73, 74, + 103, 63, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 104, 63, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 65, 66, 67, 68, 69, 0, 70, + 71, 72, 73, 74, 65, 66, 67, 68, 69, 0, + 70, 71, 72, 73, 74, 106, 63, 64, 0, 0, + 0, 0, 0, 0, 0, 0, 108, 63, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 66, + 67, 68, 69, 0, 70, 71, 72, 73, 74, 65, + 66, 67, 68, 69, 0, 70, 71, 72, 73, 74 }; static const yytype_int8 yycheck[] = { - 33, 34, 35, 36, 3, 38, 29, 29, -1, 42, - 43, 30, 45, 46, 47, 48, 49, 30, 0, 1, - 30, 3, 30, 56, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 3, 4, 5, 30, 30, 31, - 3, 4, 5, 30, 87, 3, 4, 5, 27, 30, - 3, 4, 5, -1, -1, -1, -1, 26, 27, 28, - 29, 30, -1, 26, 27, 28, 29, 30, 26, 27, - 28, 29, 30, 26, 27, 28, 29, 30, 3, 4, - 5, -1, -1, 3, 4, 5, -1, -1, 3, 4, - 5, -1, -1, 3, 4, 5, -1, -1, 3, 4, - 5, 26, 27, 28, 29, 30, 26, 27, 28, 29, - 30, 26, 27, 28, 29, 30, 26, 27, 28, 29, - 30, 26, 27, 28, 29, 30, 3, 4, 5, -1, - -1, 3, 4, 5, -1, -1, 3, 4, 5, -1, - -1, 3, 4, 5, -1, -1, 3, 4, 5, 26, - 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, - 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, - 27, 28, 29, 30, 3, 4, 5, -1, -1, 3, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, - 29, 30, 26, 27, -1, 29, 30 + 37, 38, 39, 40, 3, 42, 3, 44, 45, 29, + 47, 48, 34, 29, 51, 52, 53, 54, 55, 56, + 26, 27, 30, 30, 30, 29, -1, 30, 30, 30, + 30, 30, 30, 27, 30, -1, -1, -1, -1, 0, + 1, -1, 3, -1, 81, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 3, 4, 5, 105, -1, + 31, 32, 33, 34, 35, 36, 3, 4, 5, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, + 28, 29, 30, -1, 32, 33, 34, 35, 36, 26, + 27, 28, 29, 30, -1, 32, 33, 34, 35, 36, + 3, 4, 5, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 26, 27, 28, 29, 30, -1, 32, + 33, 34, 35, 36, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, 36, 3, 4, 5, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, + 28, 29, 30, -1, 32, 33, 34, 35, 36, 26, + 27, 28, 29, 30, -1, 32, 33, 34, 35, 36, + 3, 4, 5, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 26, 27, 28, 29, 30, -1, 32, + 33, 34, 35, 36, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, 36, 3, 4, 5, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, + 28, 29, 30, -1, 32, 33, 34, 35, 36, 26, + 27, 28, 29, 30, -1, 32, 33, 34, 35, 36, + 3, 4, 5, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 26, 27, 28, 29, 30, -1, 32, + 33, 34, 35, 36, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, 36, 3, 4, 5, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, + 28, 29, 30, -1, 32, 33, 34, 35, 36, 26, + 27, 28, 29, 30, -1, 32, 33, 34, 35, 36, + 3, 4, 5, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 26, 27, 28, 29, 30, -1, 32, + 33, 34, 35, 36, 26, 27, 28, 29, 30, -1, + 32, 33, 34, 35, 36, 3, 4, 5, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, + 28, 29, 30, -1, 32, 33, 34, 35, 36, 26, + 27, 28, 29, 30, -1, 32, 33, 34, 35, 36 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 33, 0, 1, 3, 6, 7, 8, 9, 10, + 0, 38, 0, 1, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 30, 31, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 3, 29, 3, - 26, 27, 29, 30, 44, 29, 30, 30, 30, 30, - 44, 44, 44, 44, 44, 30, 30, 44, 44, 3, - 4, 5, 26, 27, 28, 29, 30, 45, 44, 44, - 44, 44, 44, 3, 3, 3, 3, 3, 27, 44, - 3, 3, 3, 3, 3, 3, 3, 30, 3, 44, - 3 + 21, 22, 23, 24, 25, 31, 32, 33, 34, 35, + 36, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 3, 29, 49, 34, 29, 3, 30, 30, 26, + 27, 30, 29, 30, 30, 30, 30, 49, 49, 49, + 49, 49, 3, 4, 5, 26, 27, 28, 29, 30, + 32, 33, 34, 35, 36, 50, 49, 49, 49, 49, + 30, 30, 49, 49, 49, 49, 49, 49, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 27, 49, 3, + 3, 3, 3, 3, 3, 30, 3, 49, 3 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 32, 33, 33, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 35, 35, 35, 36, 36, 37, 37, 38, - 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, - 43, 44, 44, 45, 45, 45, 45, 45, 45, 45 + 0, 37, 38, 38, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 40, 40, 40, 41, 41, + 42, 42, 43, 43, 44, 44, 45, 45, 46, 46, + 47, 47, 48, 48, 49, 49, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { - 0, 2, 0, 2, 2, 4, 5, 7, 4, 4, - 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 2, 0, 2, 2, 4, 4, 4, 4, 5, + 7, 4, 4, 3, 4, 4, 4, 4, 4, 3, + 3, 3, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0, 2, 1, 1, 1, 1, 1, 1, 1 + 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 }; @@ -1426,201 +1487,206 @@ yyreduce: switch (yyn) { case 4: -#line 106 "cmFortranParser.y" /* yacc.c:1646 */ +#line 105 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-1].string), "interface")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - } - free((yyvsp[-1].string)); + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); } -#line 1438 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1496 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 5: -#line 113 "cmFortranParser.y" /* yacc.c:1646 */ +#line 109 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-3].string), "use")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - } else if (cmFortranParserIsKeyword((yyvsp[-3].string), "module")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleModule(parser, (yyvsp[-2].string)); - } else if (cmFortranParserIsKeyword((yyvsp[-3].string), "interface")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - } else if (cmFortranParserIsKeyword((yyvsp[-2].string), "interface") && - cmFortranParserIsKeyword((yyvsp[-3].string), "end")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, false); - } - free((yyvsp[-3].string)); + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1461 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1506 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 6: -#line 131 "cmFortranParser.y" /* yacc.c:1646 */ +#line 114 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-4].string), "use")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); - } - free((yyvsp[-4].string)); + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleModule(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1474 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1516 "cmFortranParser.cxx" /* yacc.c:1646 */ break; case 7: -#line 139 "cmFortranParser.y" /* yacc.c:1646 */ +#line 119 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-6].string), "use") && - cmFortranParserIsKeyword((yyvsp[-4].string), "non_intrinsic") ) { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); + free((yyvsp[-2].string)); + } +#line 1526 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 8: +#line 124 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, false); + } +#line 1535 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 9: +#line 128 "cmFortranParser.y" /* yacc.c:1646 */ + { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); + free((yyvsp[-2].string)); + } +#line 1545 "cmFortranParser.cxx" /* yacc.c:1646 */ + break; + + case 10: +#line 133 "cmFortranParser.y" /* yacc.c:1646 */ + { + if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, (yyvsp[-2].string)); } - free((yyvsp[-6].string)); free((yyvsp[-4].string)); free((yyvsp[-2].string)); } -#line 1489 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1558 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 8: -#line 149 "cmFortranParser.y" /* yacc.c:1646 */ + case 11: +#line 141 "cmFortranParser.y" /* yacc.c:1646 */ { - if (cmFortranParserIsKeyword((yyvsp[-3].string), "include")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); - } - free((yyvsp[-3].string)); + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1502 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1568 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 9: -#line 157 "cmFortranParser.y" /* yacc.c:1646 */ + case 12: +#line 146 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1512 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1578 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 10: -#line 162 "cmFortranParser.y" /* yacc.c:1646 */ + case 13: +#line 151 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1522 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1588 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 11: -#line 167 "cmFortranParser.y" /* yacc.c:1646 */ + case 14: +#line 156 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1532 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1598 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 12: -#line 172 "cmFortranParser.y" /* yacc.c:1646 */ + case 15: +#line 161 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleDefine(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1542 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1608 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 13: -#line 177 "cmFortranParser.y" /* yacc.c:1646 */ + case 16: +#line 166 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUndef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1552 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1618 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 14: -#line 182 "cmFortranParser.y" /* yacc.c:1646 */ + case 17: +#line 171 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1562 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1628 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 15: -#line 187 "cmFortranParser.y" /* yacc.c:1646 */ + case 18: +#line 176 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1572 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1638 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 16: -#line 192 "cmFortranParser.y" /* yacc.c:1646 */ + case 19: +#line 181 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIf(parser); } -#line 1581 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1647 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 17: -#line 196 "cmFortranParser.y" /* yacc.c:1646 */ + case 20: +#line 185 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElif(parser); } -#line 1590 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1656 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 18: -#line 200 "cmFortranParser.y" /* yacc.c:1646 */ + case 21: +#line 189 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElse(parser); } -#line 1599 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1665 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 19: -#line 204 "cmFortranParser.y" /* yacc.c:1646 */ + case 22: +#line 193 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleEndif(parser); } -#line 1608 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1674 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 43: -#line 226 "cmFortranParser.y" /* yacc.c:1646 */ + case 46: +#line 215 "cmFortranParser.y" /* yacc.c:1646 */ { free ((yyvsp[0].string)); } -#line 1614 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1680 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 44: -#line 227 "cmFortranParser.y" /* yacc.c:1646 */ + case 52: +#line 221 "cmFortranParser.y" /* yacc.c:1646 */ { free ((yyvsp[0].string)); } -#line 1620 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1686 "cmFortranParser.cxx" /* yacc.c:1646 */ break; -#line 1624 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1690 "cmFortranParser.cxx" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1850,6 +1916,6 @@ yyreturn: #endif return yyresult; } -#line 235 "cmFortranParser.y" /* yacc.c:1906 */ +#line 229 "cmFortranParser.y" /* yacc.c:1906 */ /* End of grammar */ diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y index 686d2f4..b856a1a 100644 --- a/Source/cmFortranParser.y +++ b/Source/cmFortranParser.y @@ -52,12 +52,6 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message) cmFortranParser_Error(parser, message); } -static bool cmFortranParserIsKeyword(const char* word, - const char* keyword) -{ - return cmsysString_strcasecmp(word, keyword) == 0; -} - /* Disable some warnings in the generated code. */ #ifdef _MSC_VER # pragma warning (disable: 4102) /* Unused goto label. */ @@ -95,6 +89,11 @@ static bool cmFortranParserIsKeyword(const char* word, %token UNTERMINATED_STRING %token STRING WORD %token CPP_INCLUDE_ANGLE +%token END +%token INCLUDE +%token INTERFACE +%token MODULE +%token USE /*-------------------------------------------------------------------------*/ /* grammar */ @@ -103,55 +102,45 @@ static bool cmFortranParserIsKeyword(const char* word, code: /* empty */ | code stmt; stmt: - WORD EOSTMT { - if (cmFortranParserIsKeyword($1, "interface")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - } - free($1); + INTERFACE EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); } -| WORD WORD other EOSTMT { - if (cmFortranParserIsKeyword($1, "use")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, $2); - } else if (cmFortranParserIsKeyword($1, "module")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleModule(parser, $2); - } else if (cmFortranParserIsKeyword($1, "interface")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, true); - } else if (cmFortranParserIsKeyword($2, "interface") && - cmFortranParserIsKeyword($1, "end")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_SetInInterface(parser, false); - } - free($1); +| USE WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, $2); free($2); } -| WORD DCOLON WORD other EOSTMT { - if (cmFortranParserIsKeyword($1, "use")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleUse(parser, $3); - } - free($1); +| MODULE WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleModule(parser, $2); + free($2); + } +| INTERFACE WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, true); + free($2); + } +| END INTERFACE other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_SetInInterface(parser, false); + } +| USE DCOLON WORD other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleUse(parser, $3); free($3); } -| WORD COMMA WORD DCOLON WORD other EOSTMT { - if (cmFortranParserIsKeyword($1, "use") && - cmFortranParserIsKeyword($3, "non_intrinsic") ) { +| USE COMMA WORD DCOLON WORD other EOSTMT { + if (cmsysString_strcasecmp($3, "non_intrinsic") == 0) { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUse(parser, $5); } - free($1); free($3); free($5); } -| WORD STRING other EOSTMT { - if (cmFortranParserIsKeyword($1, "include")) { - cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleInclude(parser, $2); - } - free($1); +| INCLUDE STRING other EOSTMT { + cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); + cmFortranParser_RuleInclude(parser, $2); free($2); } | CPP_LINE_DIRECTIVE STRING other EOSTMT { @@ -224,6 +213,11 @@ other: /* empty */ | other misc_code ; misc_code: WORD { free ($1); } +| END +| INCLUDE +| INTERFACE +| MODULE +| USE | STRING { free ($1); } | GARBAGE | ASSIGNMENT_OP diff --git a/Source/cmFortranParserTokens.h b/Source/cmFortranParserTokens.h index 176f6fe..e988df4 100644 --- a/Source/cmFortranParserTokens.h +++ b/Source/cmFortranParserTokens.h @@ -73,7 +73,12 @@ extern int cmFortran_yydebug; UNTERMINATED_STRING = 283, STRING = 284, WORD = 285, - CPP_INCLUDE_ANGLE = 286 + CPP_INCLUDE_ANGLE = 286, + END = 287, + INCLUDE = 288, + INTERFACE = 289, + MODULE = 290, + USE = 291 }; #endif /* Tokens. */ @@ -106,17 +111,22 @@ extern int cmFortran_yydebug; #define STRING 284 #define WORD 285 #define CPP_INCLUDE_ANGLE 286 +#define END 287 +#define INCLUDE 288 +#define INTERFACE 289 +#define MODULE 290 +#define USE 291 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 81 "cmFortranParser.y" /* yacc.c:1909 */ +#line 75 "cmFortranParser.y" /* yacc.c:1909 */ char* string; -#line 120 "cmFortranParserTokens.h" /* yacc.c:1909 */ +#line 130 "cmFortranParserTokens.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1619fb46a88accd1e6864f0c9de27ae2fd46541a commit 1619fb46a88accd1e6864f0c9de27ae2fd46541a Author: Brad King AuthorDate: Mon Sep 5 11:22:30 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 09:40:02 2016 -0400 cmFortranParser: Simplify grammar by skipping unknown statements Our Fortran grammar is a bare minimum to extract dependencies. Other statement syntax can be ignored, so simply skip to the end of unrecognized statements. This allows some of our existing productions to be dropped. diff --git a/Source/cmFortranParser.cxx b/Source/cmFortranParser.cxx index be2d5ab..d60db29 100644 --- a/Source/cmFortranParser.cxx +++ b/Source/cmFortranParser.cxx @@ -503,16 +503,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 249 +#define YYLAST 216 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 32 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 16 +#define YYNNTS 14 /* YYNRULES -- Number of rules. */ -#define YYNRULES 54 +#define YYNRULES 49 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 101 +#define YYNSTATES 91 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -561,12 +561,11 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 103, 103, 103, 105, 105, 108, 113, 120, 138, - 146, 156, 164, 169, 174, 179, 184, 189, 194, 199, - 203, 207, 211, 215, 218, 219, 220, 225, 225, 225, - 226, 226, 227, 227, 228, 228, 229, 229, 230, 230, - 231, 231, 232, 232, 233, 233, 234, 234, 237, 238, - 239, 240, 241, 242, 243 + 0, 103, 103, 103, 106, 113, 131, 139, 149, 157, + 162, 167, 172, 177, 182, 187, 192, 196, 200, 204, + 208, 209, 214, 214, 214, 215, 215, 216, 216, 217, + 217, 218, 218, 219, 219, 220, 220, 221, 221, 222, + 222, 223, 223, 226, 227, 228, 229, 230, 231, 232 }; #endif @@ -582,8 +581,8 @@ static const char *const yytname[] = "F90PPR_IFDEF", "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA", "DCOLON", "UNTERMINATED_STRING", "STRING", "WORD", "CPP_INCLUDE_ANGLE", "$accept", "code", "stmt", - "assignment_stmt", "keyword_stmt", "include", "define", "undef", "ifdef", - "ifndef", "if", "elif", "else", "endif", "other", "misc_code", YY_NULLPTR + "include", "define", "undef", "ifdef", "ifndef", "if", "elif", "else", + "endif", "other", "misc_code", YY_NULLPTR }; #endif @@ -599,10 +598,10 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -29 +#define YYPACT_NINF -34 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-29))) + (!!((Yystate) == (-34))) #define YYTABLE_NINF -1 @@ -613,17 +612,16 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -29, 41, -29, -29, -29, -29, -28, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, 219, -29, -29, -29, - -29, -26, -22, -17, -15, -12, -29, -29, -29, -29, - 2, -29, -29, -29, -29, -11, -8, -29, -29, 64, - -29, -29, -29, -29, -29, 70, 75, 80, 108, -29, - -29, -29, -29, -29, -29, -29, -29, -29, 113, 118, - 123, -25, -29, 128, 156, -29, 161, 166, 171, 176, - 204, -29, -29, -29, -29, -29, -29, -29, 3, 209, - -29, -29, -29, -29, -29, -29, -29, -29, -29, 214, - -29 + -34, 18, -34, 1, -34, -23, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, 186, -34, -34, -22, -19, + -13, -10, -8, -34, -34, -34, -34, -34, -34, -34, + 17, 23, -34, -34, 41, -34, -34, -34, -34, -34, + 47, 52, 57, 85, 90, 31, -34, 95, 100, -34, + -34, -34, -34, -34, -34, -34, -34, -34, 105, 133, + 138, 143, 148, -34, -34, -34, -34, -34, 29, 153, + -34, -34, -34, -34, -34, -34, -34, -34, -34, 181, + -34 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -631,31 +629,30 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 2, 0, 1, 26, 25, 46, 0, 27, 28, 29, - 31, 30, 33, 32, 34, 36, 38, 42, 40, 44, - 35, 37, 39, 43, 41, 45, 0, 46, 3, 5, - 4, 0, 0, 0, 0, 0, 46, 46, 46, 46, - 0, 46, 7, 46, 46, 0, 0, 46, 46, 0, - 46, 46, 46, 46, 46, 0, 0, 0, 0, 24, - 51, 50, 53, 52, 54, 49, 48, 47, 0, 0, - 0, 0, 46, 0, 0, 13, 0, 0, 0, 0, - 0, 19, 20, 21, 22, 12, 6, 23, 0, 0, - 11, 8, 14, 15, 16, 17, 18, 46, 9, 0, - 10 + 2, 0, 1, 0, 20, 0, 22, 23, 24, 26, + 25, 28, 27, 29, 31, 33, 37, 35, 39, 30, + 32, 34, 38, 36, 40, 0, 41, 3, 0, 0, + 0, 0, 0, 41, 41, 41, 41, 21, 41, 4, + 0, 0, 41, 41, 0, 41, 41, 41, 41, 41, + 0, 0, 0, 0, 0, 0, 41, 0, 0, 10, + 46, 45, 48, 47, 49, 44, 43, 42, 0, 0, + 0, 0, 0, 16, 17, 18, 19, 9, 0, 0, + 8, 5, 11, 12, 13, 14, 15, 41, 6, 0, + 7 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -27, -29 + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -33, -34 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 67 + -1, 1, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 44, 67 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -663,99 +660,90 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 49, 41, 88, 50, 0, 59, 60, 61, 51, 55, - 56, 57, 58, 52, 68, 53, 69, 70, 54, 71, - 73, 74, 72, 76, 77, 78, 79, 80, 62, 63, - 64, 65, 66, 97, 0, 0, 0, 0, 0, 0, - 0, 2, 3, 0, 4, 89, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 75, 60, 61, - 99, 26, 27, 81, 60, 61, 0, 0, 82, 60, - 61, 0, 0, 83, 60, 61, 0, 0, 0, 0, - 62, 63, 64, 65, 66, 0, 62, 63, 64, 65, + 50, 51, 52, 53, 37, 54, 38, 45, 0, 57, + 58, 46, 68, 69, 70, 71, 72, 47, 2, 3, + 48, 4, 49, 79, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 59, 60, 61, 55, 25, 26, + 73, 60, 61, 56, 89, 74, 60, 61, 78, 87, + 75, 60, 61, 0, 0, 0, 0, 62, 63, 64, + 65, 66, 0, 62, 63, 64, 65, 66, 62, 63, + 64, 65, 66, 62, 63, 64, 65, 66, 76, 60, + 61, 0, 0, 77, 60, 61, 0, 0, 80, 60, + 61, 0, 0, 81, 60, 61, 0, 0, 82, 60, + 61, 62, 63, 64, 65, 66, 62, 63, 64, 65, 66, 62, 63, 64, 65, 66, 62, 63, 64, 65, - 66, 84, 60, 61, 0, 0, 85, 60, 61, 0, - 0, 86, 60, 61, 0, 0, 87, 60, 61, 0, - 0, 90, 60, 61, 62, 63, 64, 65, 66, 62, + 66, 62, 63, 64, 65, 66, 83, 60, 61, 0, + 0, 84, 60, 61, 0, 0, 85, 60, 61, 0, + 0, 86, 60, 61, 0, 0, 88, 60, 61, 62, 63, 64, 65, 66, 62, 63, 64, 65, 66, 62, - 63, 64, 65, 66, 62, 63, 64, 65, 66, 91, - 60, 61, 0, 0, 92, 60, 61, 0, 0, 93, - 60, 61, 0, 0, 94, 60, 61, 0, 0, 95, - 60, 61, 62, 63, 64, 65, 66, 62, 63, 64, - 65, 66, 62, 63, 64, 65, 66, 62, 63, 64, - 65, 66, 62, 63, 64, 65, 66, 96, 60, 61, - 0, 0, 98, 60, 61, 0, 0, 100, 60, 61, - 0, 0, 42, 43, 44, 0, 0, 0, 0, 0, - 62, 63, 64, 65, 66, 62, 63, 64, 65, 66, - 62, 63, 64, 65, 66, 45, 46, 0, 47, 48 + 63, 64, 65, 66, 62, 63, 64, 65, 66, 62, + 63, 64, 65, 66, 90, 60, 61, 0, 0, 39, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 62, 63, 64, + 65, 66, 40, 41, 0, 42, 43 }; static const yytype_int8 yycheck[] = { - 27, 29, 27, 29, -1, 3, 4, 5, 30, 36, - 37, 38, 39, 30, 41, 30, 43, 44, 30, 30, - 47, 48, 30, 50, 51, 52, 53, 54, 26, 27, - 28, 29, 30, 30, -1, -1, -1, -1, -1, -1, - -1, 0, 1, -1, 3, 72, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 3, 4, 5, - 97, 30, 31, 3, 4, 5, -1, -1, 3, 4, - 5, -1, -1, 3, 4, 5, -1, -1, -1, -1, - 26, 27, 28, 29, 30, -1, 26, 27, 28, 29, + 33, 34, 35, 36, 3, 38, 29, 29, -1, 42, + 43, 30, 45, 46, 47, 48, 49, 30, 0, 1, + 30, 3, 30, 56, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 3, 4, 5, 30, 30, 31, + 3, 4, 5, 30, 87, 3, 4, 5, 27, 30, + 3, 4, 5, -1, -1, -1, -1, 26, 27, 28, + 29, 30, -1, 26, 27, 28, 29, 30, 26, 27, + 28, 29, 30, 26, 27, 28, 29, 30, 3, 4, + 5, -1, -1, 3, 4, 5, -1, -1, 3, 4, + 5, -1, -1, 3, 4, 5, -1, -1, 3, 4, + 5, 26, 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, 27, 28, 29, - 30, 3, 4, 5, -1, -1, 3, 4, 5, -1, + 30, 26, 27, 28, 29, 30, 3, 4, 5, -1, -1, 3, 4, 5, -1, -1, 3, 4, 5, -1, - -1, 3, 4, 5, 26, 27, 28, 29, 30, 26, + -1, 3, 4, 5, -1, -1, 3, 4, 5, 26, + 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, 27, 28, 29, 30, 26, - 27, 28, 29, 30, 26, 27, 28, 29, 30, 3, - 4, 5, -1, -1, 3, 4, 5, -1, -1, 3, - 4, 5, -1, -1, 3, 4, 5, -1, -1, 3, - 4, 5, 26, 27, 28, 29, 30, 26, 27, 28, - 29, 30, 26, 27, 28, 29, 30, 26, 27, 28, - 29, 30, 26, 27, 28, 29, 30, 3, 4, 5, - -1, -1, 3, 4, 5, -1, -1, 3, 4, 5, - -1, -1, 3, 4, 5, -1, -1, -1, -1, -1, - 26, 27, 28, 29, 30, 26, 27, 28, 29, 30, - 26, 27, 28, 29, 30, 26, 27, -1, 29, 30 + 27, 28, 29, 30, 3, 4, 5, -1, -1, 3, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, + 29, 30, 26, 27, -1, 29, 30 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 33, 0, 1, 3, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 30, 31, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 29, 3, 4, 5, 26, 27, 29, 30, 46, - 29, 30, 30, 30, 30, 46, 46, 46, 46, 3, - 4, 5, 26, 27, 28, 29, 30, 47, 46, 46, - 46, 30, 30, 46, 46, 3, 46, 46, 46, 46, - 46, 3, 3, 3, 3, 3, 3, 3, 27, 46, - 3, 3, 3, 3, 3, 3, 3, 30, 3, 46, + 0, 33, 0, 1, 3, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 30, 31, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 3, 29, 3, + 26, 27, 29, 30, 44, 29, 30, 30, 30, 30, + 44, 44, 44, 44, 44, 30, 30, 44, 44, 3, + 4, 5, 26, 27, 28, 29, 30, 45, 44, 44, + 44, 44, 44, 3, 3, 3, 3, 3, 27, 44, + 3, 3, 3, 3, 3, 3, 3, 30, 3, 44, 3 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 32, 33, 33, 34, 34, 35, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, - 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, - 43, 43, 44, 44, 45, 45, 46, 46, 47, 47, - 47, 47, 47, 47, 47 + 0, 32, 33, 33, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 35, 35, 35, 36, 36, 37, 37, 38, + 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, + 43, 44, 44, 45, 45, 45, 45, 45, 45, 45 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { - 0, 2, 0, 2, 1, 1, 4, 2, 4, 5, - 7, 4, 4, 3, 4, 4, 4, 4, 4, 3, - 3, 3, 3, 4, 3, 1, 1, 1, 1, 1, + 0, 2, 0, 2, 2, 4, 5, 7, 4, 4, + 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, - 1, 1, 1, 1, 1 + 1, 0, 2, 1, 1, 1, 1, 1, 1, 1 }; @@ -1437,16 +1425,8 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 6: -#line 108 "cmFortranParser.y" /* yacc.c:1646 */ - { - free((yyvsp[-3].string)); - } -#line 1446 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 7: -#line 113 "cmFortranParser.y" /* yacc.c:1646 */ + case 4: +#line 106 "cmFortranParser.y" /* yacc.c:1646 */ { if (cmFortranParserIsKeyword((yyvsp[-1].string), "interface")) { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); @@ -1454,11 +1434,11 @@ yyreduce: } free((yyvsp[-1].string)); } -#line 1458 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1438 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 8: -#line 120 "cmFortranParser.y" /* yacc.c:1646 */ + case 5: +#line 113 "cmFortranParser.y" /* yacc.c:1646 */ { if (cmFortranParserIsKeyword((yyvsp[-3].string), "use")) { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); @@ -1477,11 +1457,11 @@ yyreduce: free((yyvsp[-3].string)); free((yyvsp[-2].string)); } -#line 1481 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1461 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 9: -#line 138 "cmFortranParser.y" /* yacc.c:1646 */ + case 6: +#line 131 "cmFortranParser.y" /* yacc.c:1646 */ { if (cmFortranParserIsKeyword((yyvsp[-4].string), "use")) { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); @@ -1490,11 +1470,11 @@ yyreduce: free((yyvsp[-4].string)); free((yyvsp[-2].string)); } -#line 1494 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1474 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 10: -#line 146 "cmFortranParser.y" /* yacc.c:1646 */ + case 7: +#line 139 "cmFortranParser.y" /* yacc.c:1646 */ { if (cmFortranParserIsKeyword((yyvsp[-6].string), "use") && cmFortranParserIsKeyword((yyvsp[-4].string), "non_intrinsic") ) { @@ -1505,11 +1485,11 @@ yyreduce: free((yyvsp[-4].string)); free((yyvsp[-2].string)); } -#line 1509 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1489 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 11: -#line 156 "cmFortranParser.y" /* yacc.c:1646 */ + case 8: +#line 149 "cmFortranParser.y" /* yacc.c:1646 */ { if (cmFortranParserIsKeyword((yyvsp[-3].string), "include")) { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); @@ -1518,137 +1498,129 @@ yyreduce: free((yyvsp[-3].string)); free((yyvsp[-2].string)); } -#line 1522 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1502 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 12: -#line 164 "cmFortranParser.y" /* yacc.c:1646 */ + case 9: +#line 157 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1532 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1512 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 13: -#line 169 "cmFortranParser.y" /* yacc.c:1646 */ + case 10: +#line 162 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1542 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1522 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 14: -#line 174 "cmFortranParser.y" /* yacc.c:1646 */ + case 11: +#line 167 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleInclude(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1552 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1532 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 15: -#line 179 "cmFortranParser.y" /* yacc.c:1646 */ + case 12: +#line 172 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleDefine(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1562 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1542 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 16: -#line 184 "cmFortranParser.y" /* yacc.c:1646 */ + case 13: +#line 177 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleUndef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1572 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1552 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 17: -#line 189 "cmFortranParser.y" /* yacc.c:1646 */ + case 14: +#line 182 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1582 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1562 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 18: -#line 194 "cmFortranParser.y" /* yacc.c:1646 */ + case 15: +#line 187 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string)); free((yyvsp[-2].string)); } -#line 1592 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1572 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 19: -#line 199 "cmFortranParser.y" /* yacc.c:1646 */ + case 16: +#line 192 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleIf(parser); } -#line 1601 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1581 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 20: -#line 203 "cmFortranParser.y" /* yacc.c:1646 */ + case 17: +#line 196 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElif(parser); } -#line 1610 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1590 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 21: -#line 207 "cmFortranParser.y" /* yacc.c:1646 */ + case 18: +#line 200 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleElse(parser); } -#line 1619 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1599 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 22: -#line 211 "cmFortranParser.y" /* yacc.c:1646 */ + case 19: +#line 204 "cmFortranParser.y" /* yacc.c:1646 */ { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleEndif(parser); } -#line 1628 "cmFortranParser.cxx" /* yacc.c:1646 */ - break; - - case 23: -#line 215 "cmFortranParser.y" /* yacc.c:1646 */ - { - free((yyvsp[-3].string)); - } -#line 1636 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1608 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 48: -#line 237 "cmFortranParser.y" /* yacc.c:1646 */ + case 43: +#line 226 "cmFortranParser.y" /* yacc.c:1646 */ { free ((yyvsp[0].string)); } -#line 1642 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1614 "cmFortranParser.cxx" /* yacc.c:1646 */ break; - case 49: -#line 238 "cmFortranParser.y" /* yacc.c:1646 */ + case 44: +#line 227 "cmFortranParser.y" /* yacc.c:1646 */ { free ((yyvsp[0].string)); } -#line 1648 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1620 "cmFortranParser.cxx" /* yacc.c:1646 */ break; -#line 1652 "cmFortranParser.cxx" /* yacc.c:1646 */ +#line 1624 "cmFortranParser.cxx" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1878,6 +1850,6 @@ yyreturn: #endif return yyresult; } -#line 246 "cmFortranParser.y" /* yacc.c:1906 */ +#line 235 "cmFortranParser.y" /* yacc.c:1906 */ /* End of grammar */ diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y index f8d461e..686d2f4 100644 --- a/Source/cmFortranParser.y +++ b/Source/cmFortranParser.y @@ -102,14 +102,7 @@ static bool cmFortranParserIsKeyword(const char* word, code: /* empty */ | code stmt; -stmt: keyword_stmt | assignment_stmt; - -assignment_stmt: - WORD ASSIGNMENT_OP other EOSTMT { - free($1); - } - -keyword_stmt: +stmt: WORD EOSTMT { if (cmFortranParserIsKeyword($1, "interface")) { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); @@ -212,12 +205,8 @@ keyword_stmt: cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); cmFortranParser_RuleEndif(parser); } -| WORD GARBAGE other EOSTMT { - free($1); - } -| GARBAGE other EOSTMT | EOSTMT -| error +| error EOSTMT /* tolerate unknown statements until their end */ ; ----------------------------------------------------------------------- Summary of changes: Source/cmFortranLexer.cxx | 477 ++++++++++++++++++++++------------------ Source/cmFortranLexer.h | 2 +- Source/cmFortranLexer.in.l | 6 + Source/cmFortranParser.cxx | 462 ++++++++++++++++++++------------------ Source/cmFortranParser.y | 95 ++++---- Source/cmFortranParserTokens.h | 16 +- 6 files changed, 567 insertions(+), 491 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:44:14 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:44:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1853-g951d17d Message-ID: <20160908134414.33C2CE1F25@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, next has been updated via 951d17d1883a8853d5054dc7bb4771e1006a78eb (commit) via 52b95d8893fb288a4a787d668b8456c12e887d5c (commit) from 6b56c21dc954629c65f4586dda1fc0578c7061d2 (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=951d17d1883a8853d5054dc7bb4771e1006a78eb commit 951d17d1883a8853d5054dc7bb4771e1006a78eb Merge: 6b56c21 52b95d8 Author: Brad King AuthorDate: Thu Sep 8 09:44:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 09:44:13 2016 -0400 Merge topic 'fortran-scanbuild-fixes' into next 52b95d88 CTestCustom: Suppress scan-build warnings in flex-generated lexer https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52b95d8893fb288a4a787d668b8456c12e887d5c commit 52b95d8893fb288a4a787d668b8456c12e887d5c Author: Brad King AuthorDate: Thu Sep 8 09:43:33 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 09:43:33 2016 -0400 CTestCustom: Suppress scan-build warnings in flex-generated lexer diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 1699492..8489178 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -81,6 +81,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "index_encoder.c.241.2. warning: Value stored to .out_start. is never read" "index.c.*warning: Access to field.*results in a dereference of a null pointer.*loaded from variable.*" "cm_sha2.*warning: Value stored to.*is never read" + "cmFortranLexer.cxx:[0-9]+:[0-9]+: warning: Call to 'realloc' has an allocation size of 0 bytes" "testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.." "liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined" "libuv/src/.*:[0-9]+:[0-9]+: warning: Dereference of null pointer" ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 09:51:33 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 09:51:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1857-gefcbc37 Message-ID: <20160908135133.9629AF4BF3@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, next has been updated via efcbc372ca2b964154bcdcb7f43e382aafd22d2d (commit) via f2c98e125fe0d7d59ce3ff58928d20ad41066685 (commit) via e83b96b793dbe9d525fc878f7e8df8304079e35d (commit) via aa6682802eecd0434088c16b51d198fea619b76d (commit) from 951d17d1883a8853d5054dc7bb4771e1006a78eb (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=efcbc372ca2b964154bcdcb7f43e382aafd22d2d commit efcbc372ca2b964154bcdcb7f43e382aafd22d2d Merge: 951d17d f2c98e1 Author: Brad King AuthorDate: Thu Sep 8 09:51:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 09:51:32 2016 -0400 Merge topic 'update-kwiml' into next f2c98e12 Merge branch 'upstream-KWIML' into update-kwiml e83b96b7 KWIML 2016-09-08 (d564b3c7) aa668280 kwiml: Update import script for new upstream URL https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2c98e125fe0d7d59ce3ff58928d20ad41066685 commit f2c98e125fe0d7d59ce3ff58928d20ad41066685 Merge: aa66828 e83b96b Author: Brad King AuthorDate: Thu Sep 8 09:50:05 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 09:50:31 2016 -0400 Merge branch 'upstream-KWIML' into update-kwiml * upstream-KWIML: KWIML 2016-09-08 (d564b3c7) Closes: #16290 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e83b96b793dbe9d525fc878f7e8df8304079e35d commit e83b96b793dbe9d525fc878f7e8df8304079e35d Author: KWIML Upstream AuthorDate: Thu Sep 8 09:28:56 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 09:50:04 2016 -0400 KWIML 2016-09-08 (d564b3c7) Code extracted from: https://gitlab.kitware.com/utils/kwiml.git at commit d564b3c71a6dcec9b1cd84afb498b14a69307780 (master). Upstream Shortlog ----------------- Brad King (1): d564b3c7 Update copyright year Richard W.M. Jones (1): 12f000d5 abi.h: Add RISC-V, a little-endian architecture. diff --git a/Copyright.txt b/Copyright.txt index a6204b0..515c4eb 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -1,5 +1,5 @@ Kitware Information Macro Library -Copyright 2010-2015 Kitware, Inc. +Copyright 2010-2016 Kitware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/kwiml/abi.h b/include/kwiml/abi.h index 3626361..5ffd542 100644 --- a/include/kwiml/abi.h +++ b/include/kwiml/abi.h @@ -1,6 +1,6 @@ /*============================================================================ Kitware Information Macro Library - Copyright 2010-2015 Kitware, Inc. + Copyright 2010-2016 Kitware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY was defined. #elif defined(__XTENSA_EL__) # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +/* RISC-V */ +#elif defined(__riscv__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + /* Unknown CPU */ #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) # error "Byte order of target CPU unknown." diff --git a/include/kwiml/int.h b/include/kwiml/int.h index b297ace..489c603 100644 --- a/include/kwiml/int.h +++ b/include/kwiml/int.h @@ -1,6 +1,6 @@ /*============================================================================ Kitware Information Macro Library - Copyright 2010-2015 Kitware, Inc. + Copyright 2010-2016 Kitware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/version.h.in b/src/version.h.in index e58e0dc..0ac8854 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -1,6 +1,6 @@ /*============================================================================ Kitware Information Macro Library - Copyright 2010-2015 Kitware, Inc. + Copyright 2010-2016 Kitware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa6682802eecd0434088c16b51d198fea619b76d commit aa6682802eecd0434088c16b51d198fea619b76d Author: Brad King AuthorDate: Thu Sep 8 09:49:01 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 09:49:39 2016 -0400 kwiml: Update import script for new upstream URL diff --git a/Utilities/Scripts/update-kwiml.bash b/Utilities/Scripts/update-kwiml.bash index 5c0d192..4497c92 100755 --- a/Utilities/Scripts/update-kwiml.bash +++ b/Utilities/Scripts/update-kwiml.bash @@ -7,7 +7,7 @@ shopt -s dotglob readonly name="KWIML" readonly ownership="KWIML Upstream " readonly subtree="Utilities/KWIML" -readonly repo="https://github.com/Kitware/KWIML.git" +readonly repo="https://gitlab.kitware.com/utils/kwiml.git" readonly tag="master" readonly shortlog=true readonly paths=" ----------------------------------------------------------------------- Summary of changes: Utilities/KWIML/Copyright.txt | 2 +- Utilities/KWIML/include/kwiml/abi.h | 6 +++++- Utilities/KWIML/include/kwiml/int.h | 2 +- Utilities/KWIML/src/version.h.in | 2 +- Utilities/Scripts/update-kwiml.bash | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 11:34:35 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 11:34:35 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1859-g28d08a9 Message-ID: <20160908153435.84DF9F5687@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, next has been updated via 28d08a9e6b7eb2f45773dc5754828eb8de35aa0a (commit) via cb299acc27d5f80b2fc801f0f57358ec9f0303d1 (commit) from efcbc372ca2b964154bcdcb7f43e382aafd22d2d (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=28d08a9e6b7eb2f45773dc5754828eb8de35aa0a commit 28d08a9e6b7eb2f45773dc5754828eb8de35aa0a Merge: efcbc37 cb299ac Author: Brad King AuthorDate: Thu Sep 8 11:34:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 11:34:33 2016 -0400 Merge topic 'parse_arguments_argv_n' into next cb299acc cmake_parse_arguments: Add option to read arguments from ARGC/ARGV# https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb299acc27d5f80b2fc801f0f57358ec9f0303d1 commit cb299acc27d5f80b2fc801f0f57358ec9f0303d1 Author: Bill Hoffman AuthorDate: Wed Sep 7 16:47:23 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 11:33:46 2016 -0400 cmake_parse_arguments: Add option to read arguments from ARGC/ARGV# The `ARGC`/`ARGV#` variables in function scope hold the original arguments with no ;-list flattening. Add a way for functions to cleanly parse arguments that may contain `;`. This also avoids extra copying of the arguments. Co-Author: Brad King diff --git a/Help/command/cmake_parse_arguments.rst b/Help/command/cmake_parse_arguments.rst index 6206611..ec4ffed 100644 --- a/Help/command/cmake_parse_arguments.rst +++ b/Help/command/cmake_parse_arguments.rst @@ -11,6 +11,17 @@ respective options. cmake_parse_arguments( args...) + cmake_parse_arguments(PARSE_ARGV N + ) + +The first signature reads processes arguments passed in the ``args...``. +This may be used in either a :command:`macro` or a :command:`function`. + +The ``PARSE_ARGV`` signature is only for use in a :command:`function` +body. In this case the arguments that are parsed come from the +``ARGV#`` variables of the calling function. The parsing starts with +the Nth argument, where ``N`` is an unsigned integer. This allows for +the values to have special characters like ``;`` in them. The ```` argument contains all options for the respective macro, i.e. keywords which can be used when calling the macro without any value diff --git a/Help/release/dev/parse_arguments_argv_n.rst b/Help/release/dev/parse_arguments_argv_n.rst new file mode 100644 index 0000000..758b72a --- /dev/null +++ b/Help/release/dev/parse_arguments_argv_n.rst @@ -0,0 +1,6 @@ +parse_arguments_argv_n +---------------------- + +* The :command:`cmake_parse_arguments` command gained a new + mode to read arguments directly from ``ARGC`` and ``ARGV#`` + variables inside a :command:`function` body. diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 8f524ec..f9313c5 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -20,6 +20,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, { // cmake_parse_arguments(prefix options single multi ) // 1 2 3 4 + // or + // cmake_parse_arguments(PARSE_ARGV N prefix options single multi) if (args.size() < 4) { this->SetError("must be called with at least 4 arguments."); return false; @@ -27,6 +29,27 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, std::vector::const_iterator argIter = args.begin(), argEnd = args.end(); + bool parseFromArgV = false; + unsigned long argvStart = 0; + if (*argIter == "PARSE_ARGV") { + if (args.size() != 6) { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + "PARSE_ARGV must be called with exactly 6 arguments."); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + parseFromArgV = true; + argIter++; // move past PARSE_ARGV + if (!cmSystemTools::StringToULong(argIter->c_str(), &argvStart)) { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, "PARSE_ARGV index '" + + *argIter + + "' is not an unsigned integer"); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + argIter++; // move past N + } // the first argument is the prefix const std::string prefix = (*argIter++) + "_"; @@ -90,11 +113,37 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, } insideValues = NONE; std::string currentArgName; - // Flatten ;-lists in the arguments into a single list as was done - // by the original function(CMAKE_PARSE_ARGUMENTS). list.clear(); - for (; argIter != argEnd; ++argIter) { - cmSystemTools::ExpandListArgument(*argIter, list); + if (!parseFromArgV) { + // Flatten ;-lists in the arguments into a single list as was done + // by the original function(CMAKE_PARSE_ARGUMENTS). + for (; argIter != argEnd; ++argIter) { + cmSystemTools::ExpandListArgument(*argIter, list); + } + } else { + // in the PARSE_ARGV move read the arguments from ARGC and ARGV# + std::string argc = this->Makefile->GetSafeDefinition("ARGC"); + unsigned long count; + if (!cmSystemTools::StringToULong(argc.c_str(), &count)) { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, + "PARSE_ARGV called with ARGC='" + argc + + "' that is not an unsigned integer"); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + for (unsigned long i = argvStart; i < count; ++i) { + std::ostringstream argName; + argName << "ARGV" << i; + const char* arg = this->Makefile->GetDefinition(argName.str()); + if (!arg) { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, + "PARSE_ARGV called with " + + argName.str() + " not set"); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + list.push_back(arg); + } } // iterate over the arguments list and fill in the values where applicable diff --git a/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake b/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake new file mode 100644 index 0000000..61bde03 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake @@ -0,0 +1,30 @@ +include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) + +function(test1) + cmake_parse_arguments(PARSE_ARGV 0 + pref "OPT1;OPT2" "SINGLE1;SINGLE2" "MULTI1;MULTI2") + + TEST(pref_OPT1 TRUE) + TEST(pref_OPT2 FALSE) + TEST(pref_SINGLE1 "foo;bar") + TEST(pref_SINGLE2 UNDEFINED) + TEST(pref_MULTI1 bar foo bar) + TEST(pref_MULTI2 UNDEFINED) + TEST(pref_UNPARSED_ARGUMENTS UNDEFINED) +endfunction() +test1(OPT1 SINGLE1 "foo;bar" MULTI1 bar foo bar) + +function(test2 arg1) + cmake_parse_arguments(PARSE_ARGV 1 + pref "OPT1;OPT2" "SINGLE1;SINGLE2" "MULTI1;MULTI2") + + TEST(arg1 "first named") + TEST(pref_OPT1 TRUE) + TEST(pref_OPT2 FALSE) + TEST(pref_SINGLE1 "foo;bar") + TEST(pref_SINGLE2 UNDEFINED) + TEST(pref_MULTI1 bar foo bar) + TEST(pref_MULTI2 UNDEFINED) + TEST(pref_UNPARSED_ARGUMENTS UNDEFINED) +endfunction() +test2("first named" OPT1 SINGLE1 "foo;bar" MULTI1 bar foo bar) diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt new file mode 100644 index 0000000..e44ab4d --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at BadArgvN1.cmake:[0-9]+ \(cmake_parse_arguments\): + PARSE_ARGV must be called with exactly 6 arguments. +Call Stack \(most recent call first\): + BadArgvN1.cmake:[0-9]+ \(test1\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake new file mode 100644 index 0000000..f894130 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake @@ -0,0 +1,4 @@ +function(test1) + cmake_parse_arguments(PARSE_ARGV 0 pref "" "" "" extra) +endfunction() +test1() diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt new file mode 100644 index 0000000..1dde86d --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at BadArgvN2.cmake:[0-9]+ \(cmake_parse_arguments\): + PARSE_ARGV index 'pref' is not an unsigned integer +Call Stack \(most recent call first\): + BadArgvN2.cmake:[0-9]+ \(test2\) + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake new file mode 100644 index 0000000..d20c2c8 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake @@ -0,0 +1,4 @@ +function(test2) + cmake_parse_arguments(PARSE_ARGV pref "" "" "" extra) +endfunction() +test2() diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt new file mode 100644 index 0000000..5a30dc9 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at BadArgvN3.cmake:[0-9]+ \(cmake_parse_arguments\): + PARSE_ARGV called with ARGC='' that is not an unsigned integer +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake new file mode 100644 index 0000000..8fb3fdd --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake @@ -0,0 +1 @@ +cmake_parse_arguments(PARSE_ARGV 0 pref "" "" "") diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt new file mode 100644 index 0000000..f4bdac4 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at BadArgvN4.cmake:[0-9]+ \(cmake_parse_arguments\): + PARSE_ARGV called with ARGV0 not set +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake new file mode 100644 index 0000000..b887a28 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake @@ -0,0 +1,3 @@ +set(ARGC 1) +cmake_parse_arguments(PARSE_ARGV 0 pref "" "" "") +unset(ARGC) diff --git a/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake b/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake index b89f1a5..22d7ee4 100644 --- a/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake @@ -5,3 +5,8 @@ run_cmake(Initialization) run_cmake(Mix) run_cmake(CornerCases) run_cmake(Errors) +run_cmake(ArgvN) +run_cmake(BadArgvN1) +run_cmake(BadArgvN2) +run_cmake(BadArgvN3) +run_cmake(BadArgvN4) ----------------------------------------------------------------------- Summary of changes: Help/command/cmake_parse_arguments.rst | 11 ++++ Help/release/dev/parse_arguments_argv_n.rst | 6 +++ Source/cmParseArgumentsCommand.cxx | 57 ++++++++++++++++++-- Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake | 30 +++++++++++ .../BadArgvN1-result.txt} | 0 .../cmake_parse_arguments/BadArgvN1-stderr.txt | 5 ++ .../RunCMake/cmake_parse_arguments/BadArgvN1.cmake | 4 ++ .../BadArgvN2-result.txt} | 0 .../cmake_parse_arguments/BadArgvN2-stderr.txt | 5 ++ .../RunCMake/cmake_parse_arguments/BadArgvN2.cmake | 4 ++ .../BadArgvN3-result.txt} | 0 .../cmake_parse_arguments/BadArgvN3-stderr.txt | 4 ++ .../RunCMake/cmake_parse_arguments/BadArgvN3.cmake | 1 + .../BadArgvN4-result.txt} | 0 .../cmake_parse_arguments/BadArgvN4-stderr.txt | 4 ++ .../RunCMake/cmake_parse_arguments/BadArgvN4.cmake | 3 ++ .../cmake_parse_arguments/RunCMakeTest.cmake | 5 ++ 17 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/parse_arguments_argv_n.rst create mode 100644 Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN1-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN2-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN3-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN4-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 11:54:11 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 11:54:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1863-g37d5107 Message-ID: <20160908155411.A1C49F5845@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, next has been updated via 37d5107091a9713090f73406b87053a05817c882 (commit) via ed92af3a7a746dfeb395b9fd783791fcae2b062f (commit) via 35447174ccece96d1b4e6304b94a31e03064500b (commit) via 15928265868c8bb7afba6d4ce9f2f27b56d685d5 (commit) from 28d08a9e6b7eb2f45773dc5754828eb8de35aa0a (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=37d5107091a9713090f73406b87053a05817c882 commit 37d5107091a9713090f73406b87053a05817c882 Merge: 28d08a9 ed92af3 Author: Brad King AuthorDate: Thu Sep 8 11:54:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 11:54:10 2016 -0400 Merge topic 'geh-failure-tests' into next ed92af3a Refactor GenerateExportHeader test code 35447174 Add data tests to GenerateExportHeader test 15928265 Add failure test for GenerateExportHeader https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed92af3a7a746dfeb395b9fd783791fcae2b062f commit ed92af3a7a746dfeb395b9fd783791fcae2b062f Author: Matthew Woehlke AuthorDate: Fri Sep 2 16:53:34 2016 -0400 Commit: Matthew Woehlke CommitDate: Wed Sep 7 10:47:22 2016 -0400 Refactor GenerateExportHeader test code Refactor the library code used in the GenerateExportHeader test to use an improved naming convention that more directly identifies what it being tested, making use of namespaces to avoid possible symbol collisions. This also eliminates duplicate cases such as `libshared()` and `libshared_not_exported()` which had the same decoration, and adds consistent pairings of _EXPORT and _DEPRECATED_EXPORT which were missing previously. The data tests from the previous commit are also added to `libstatic` and `libshared_and_static` for consistency. Note that there are no exported members of exported classes, as these are not allowed on Windows. diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index f3f2da9..4ba6abd 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -56,19 +56,29 @@ void compare(const char* refName, const char* testName) int main() { { - Libshared l; - l.libshared(); - l.libshared_exported(); - l.libshared_deprecated(); - l.libshared_not_exported(); + libshared::Class l; + //l.method(); LINK ERROR + l.method_exported(); + //l.method_deprecated(); LINK ERROR + l.method_deprecated_exported(); + //l.method_excluded(); LINK ERROR + + //use_int(l.data); LINK ERROR + use_int(l.data_exported); + //use_int(l.data_excluded); LINK ERROR + } + + { + libshared::ExportedClass l; + l.method(); + l.method_deprecated(); #ifdef _WIN32 - l.libshared_excluded(); + l.method_excluded(); #else - //l.libshared_excluded(); LINK ERROR (NOT WIN32) + //l.method_excluded(); LINK ERROR (NOT WIN32) #endif - use_int(l.data_exported); - use_int(l.data_not_exported); + use_int(l.data); #ifdef _WIN32 use_int(l.data_excluded); #else @@ -77,71 +87,76 @@ int main() } { - LibsharedNotExported l; - //l.libshared(); LINK ERROR - l.libshared_exported(); - l.libshared_deprecated(); - //l.libshared_not_exported(); LINK ERROR - //l.libshared_excluded(); LINK ERROR - - use_int(l.data_exported); - //use_int(l.data_not_exported); LINK ERROR - //use_int(l.data_excluded); LINK ERROR - } - - { - LibsharedExcluded l; - //l.libshared(); LINK ERROR - l.libshared_exported(); - l.libshared_deprecated(); - //l.libshared_not_exported(); LINK ERROR - //l.libshared_excluded(); LINK ERROR - + libshared::ExcludedClass l; + //l.method(); LINK ERROR + l.method_exported(); + //l.method_deprecated(); LINK ERROR + l.method_deprecated_exported(); + //l.method_excluded(); LINK ERROR + + //use_int(l.data); LINK ERROR use_int(l.data_exported); - //use_int(l.data_not_exported); LINK ERROR //use_int(l.data_excluded); LINK ERROR } - libshared_exported(); - libshared_deprecated(); - //libshared_not_exported(); LINK ERROR - //libshared_excluded(); LINK ERROR + //libshared::function(); LINK ERROR + libshared::function_exported(); + //libshared::function_deprecated(); LINK ERROR + libshared::function_deprecated_exported(); + //libshared::function_excluded(); LINK ERROR - use_int(data_exported); - //use_int(data_not_exported); LINK ERROR - //use_int(data_excluded); LINK ERROR + //use_int(libshared::data); LINK ERROR + use_int(libshared::data_exported); + //use_int(libshared::data_excluded); LINK ERROR { - Libstatic l; - l.libstatic(); - l.libstatic_exported(); - l.libstatic_deprecated(); - l.libstatic_not_exported(); - l.libstatic_excluded(); + libstatic::Class l; + l.method(); + l.method_exported(); + l.method_deprecated(); + l.method_deprecated_exported(); + l.method_excluded(); + + use_int(l.data); + use_int(l.data_exported); + use_int(l.data_excluded); } { - LibstaticNotExported l; - l.libstatic(); - l.libstatic_exported(); - l.libstatic_deprecated(); - l.libstatic_not_exported(); - l.libstatic_excluded(); + libstatic::ExportedClass l; + l.method(); + l.method_exported(); + l.method_deprecated(); + l.method_deprecated_exported(); + l.method_excluded(); + + use_int(l.data); + use_int(l.data_exported); + use_int(l.data_excluded); } { - LibstaticExcluded l; - l.libstatic(); - l.libstatic_exported(); - l.libstatic_deprecated(); - l.libstatic_not_exported(); - l.libstatic_excluded(); + libstatic::ExcludedClass l; + l.method(); + l.method_exported(); + l.method_deprecated(); + l.method_deprecated_exported(); + l.method_excluded(); + + use_int(l.data); + use_int(l.data_exported); + use_int(l.data_excluded); } - libstatic_exported(); - libstatic_deprecated(); - libstatic_not_exported(); - libstatic_excluded(); + libstatic::function(); + libstatic::function_exported(); + libstatic::function_deprecated(); + libstatic::function_deprecated_exported(); + libstatic::function_excluded(); + + use_int(libstatic::data); + use_int(libstatic::data_exported); + use_int(libstatic::data_excluded); #if defined(SRC_DIR) && defined(BIN_DIR) compare(SRC_DIR "/libshared_export.h", diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp index 846c207..9ac8381 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp @@ -1,106 +1,121 @@ - #include "libshared_and_static.h" #ifndef MY_CUSTOM_CONTENT_ADDED #error "MY_CUSTOM_CONTENT_ADDED not defined!" #endif -int LibsharedAndStatic::libshared_and_static() const +int libshared_and_static::Class::method() const { return 0; } -int LibsharedAndStatic::libshared_and_static_exported() const +int libshared_and_static::Class::method_exported() const { return 0; } -int LibsharedAndStatic::libshared_and_static_deprecated() const +int libshared_and_static::Class::method_deprecated() const { return 0; } -int LibsharedAndStatic::libshared_and_static_not_exported() const +int libshared_and_static::Class::method_deprecated_exported() const { return 0; } -int LibsharedAndStatic::libshared_and_static_excluded() const +int libshared_and_static::Class::method_excluded() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static() const -{ - return 0; -} +int const libshared_and_static::Class::data = 1; -int LibsharedAndStaticNotExported::libshared_and_static_exported() const +int const libshared_and_static::Class::data_exported = 1; + +int const libshared_and_static::Class::data_excluded = 1; + +int libshared_and_static::ExportedClass::method() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static_deprecated() const +int libshared_and_static::ExportedClass::method_deprecated() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static_not_exported() const +int libshared_and_static::ExportedClass::method_excluded() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static_excluded() const +int const libshared_and_static::ExportedClass::data = 1; + +int const libshared_and_static::ExportedClass::data_excluded = 1; + +int libshared_and_static::ExcludedClass::method() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static() const +int libshared_and_static::ExcludedClass::method_exported() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_exported() const +int libshared_and_static::ExcludedClass::method_deprecated() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_deprecated() const +int libshared_and_static::ExcludedClass::method_deprecated_exported() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_not_exported() const +int libshared_and_static::ExcludedClass::method_excluded() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_excluded() const +int const libshared_and_static::ExcludedClass::data = 1; + +int const libshared_and_static::ExcludedClass::data_exported = 1; + +int const libshared_and_static::ExcludedClass::data_excluded = 1; + +int libshared_and_static::function() { return 0; } -int libshared_and_static() +int libshared_and_static::function_exported() { return 0; } -int libshared_and_static_exported() +int libshared_and_static::function_deprecated() { return 0; } -int libshared_and_static_deprecated() +int libshared_and_static::function_deprecated_exported() { return 0; } -int libshared_and_static_not_exported() +int libshared_and_static::function_excluded() { return 0; } -int libshared_and_static_excluded() +int const libshared_and_static::data = 1; + +int const libshared_and_static::data_exported = 1; + +int const libshared_and_static::data_excluded = 1; + +void use_int(int) { - return 0; } diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h index ea672fe..14b0109 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h @@ -1,66 +1,81 @@ - -#ifndef SHARED_AND_STATIC_H -#define SHARED_AND_STATIC_H +#ifndef LIBSHARED_AND_STATIC_H +#define LIBSHARED_AND_STATIC_H #include "libshared_and_static_export.h" -class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT LibsharedAndStatic +namespace libshared_and_static +{ + +class Class { public: - int libshared_and_static() const; + int method() const; + + int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const; - int libshared_and_static_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED - libshared_and_static_deprecated() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int libshared_and_static_not_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; - int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT - libshared_and_static_excluded() const; + static int const data; + + static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported; + + static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; }; -class LibsharedAndStaticNotExported +class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT ExportedClass { public: - int libshared_and_static() const; + int method() const; - int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT - libshared_and_static_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED - libshared_and_static_deprecated() const; + int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; - int libshared_and_static_not_exported() const; + static int const data; - int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT - libshared_and_static_excluded() const; + static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; }; -class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT LibsharedAndStaticExcluded +class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT ExcludedClass { public: - int libshared_and_static() const; + int method() const; + + int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const; - int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT - libshared_and_static_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED - libshared_and_static_deprecated() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int libshared_and_static_not_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; - int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT - libshared_and_static_excluded() const; + static int const data; + + static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported; + + static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; }; -MYPREFIX_LIBSHARED_AND_STATIC_EXPORT int libshared_and_static_exported(); +int function(); + +int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT function_exported(); + +int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED function_deprecated(); + +int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT function_deprecated_exported(); + +int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT function_excluded(); + +extern int const data; -MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT int -libshared_and_static_deprecated(); +extern int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported; -int libshared_and_static_not_exported(); +extern int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; -int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT libshared_and_static_excluded(); +} // namespace libshared_and_static #endif diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp index 7e46ab5..328ef6f 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp @@ -1,129 +1,116 @@ - #include "libshared.h" -int Libshared::libshared() const +int libshared::Class::method() const { return 0; } -int Libshared::libshared_exported() const +int libshared::Class::method_exported() const { return 0; } -int Libshared::libshared_deprecated() const +int libshared::Class::method_deprecated() const { return 0; } -int Libshared::libshared_not_exported() const +int libshared::Class::method_deprecated_exported() const { return 0; } -int Libshared::libshared_excluded() const +int libshared::Class::method_excluded() const { return 0; } -int const Libshared::data_exported = 1; - -int const Libshared::data_not_exported = 1; - -int const Libshared::data_excluded = 1; +int const libshared::Class::data = 1; -int LibsharedNotExported::libshared() const -{ - return 0; -} +int const libshared::Class::data_exported = 1; -int LibsharedNotExported::libshared_exported() const -{ - return 0; -} +int const libshared::Class::data_excluded = 1; -int LibsharedNotExported::libshared_deprecated() const +int libshared::ExportedClass::method() const { return 0; } -int LibsharedNotExported::libshared_not_exported() const +int libshared::ExportedClass::method_deprecated() const { return 0; } -int LibsharedNotExported::libshared_excluded() const +int libshared::ExportedClass::method_excluded() const { return 0; } -int const LibsharedNotExported::data_exported = 1; - -int const LibsharedNotExported::data_not_exported = 1; +int const libshared::ExportedClass::data = 1; -int const LibsharedNotExported::data_excluded = 1; +int const libshared::ExportedClass::data_excluded = 1; -int LibsharedExcluded::libshared() const +int libshared::ExcludedClass::method() const { return 0; } -int LibsharedExcluded::libshared_exported() const +int libshared::ExcludedClass::method_exported() const { return 0; } -int LibsharedExcluded::libshared_deprecated() const +int libshared::ExcludedClass::method_deprecated() const { return 0; } -int LibsharedExcluded::libshared_not_exported() const +int libshared::ExcludedClass::method_deprecated_exported() const { return 0; } -int LibsharedExcluded::libshared_excluded() const +int libshared::ExcludedClass::method_excluded() const { return 0; } -int const LibsharedExcluded::data_exported = 1; +int const libshared::ExcludedClass::data = 1; -int const LibsharedExcluded::data_not_exported = 1; +int const libshared::ExcludedClass::data_exported = 1; -int const LibsharedExcluded::data_excluded = 1; +int const libshared::ExcludedClass::data_excluded = 1; -int libshared() +int libshared::function() { return 0; } -int libshared_exported() +int libshared::function_exported() { return 0; } -int libshared_deprecated() +int libshared::function_deprecated() { return 0; } -int libshared_not_exported() +int libshared::function_deprecated_exported() { return 0; } -int libshared_excluded() +int libshared::function_excluded() { return 0; } -int const data_exported = 1; +int const libshared::data = 1; -int const data_not_exported = 1; +int const libshared::data_exported = 1; -int const data_excluded = 1; +int const libshared::data_excluded = 1; void use_int(int) { diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h index 62879c2..d24905f 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h @@ -1,83 +1,83 @@ - #ifndef LIBSHARED_H #define LIBSHARED_H #include "libshared_export.h" -class LIBSHARED_EXPORT Libshared +namespace libshared +{ + +class Class { public: - int libshared() const; + int method() const; - int libshared_exported() const; + int LIBSHARED_EXPORT method_exported() const; - int LIBSHARED_DEPRECATED libshared_deprecated() const; + int LIBSHARED_DEPRECATED method_deprecated() const; - int libshared_not_exported() const; + int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSHARED_NO_EXPORT libshared_excluded() const; + int LIBSHARED_NO_EXPORT method_excluded() const; - static int const LIBSHARED_EXPORT data_exported; + static int const data; - static int const data_not_exported; + static int const LIBSHARED_EXPORT data_exported; static int const LIBSHARED_NO_EXPORT data_excluded; }; -class LibsharedNotExported +class LIBSHARED_EXPORT ExportedClass { public: - int libshared() const; - - int LIBSHARED_EXPORT libshared_exported() const; + int method() const; - int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const; + int LIBSHARED_DEPRECATED method_deprecated() const; - int libshared_not_exported() const; + int LIBSHARED_NO_EXPORT method_excluded() const; - int LIBSHARED_NO_EXPORT libshared_excluded() const; - - static int const LIBSHARED_EXPORT data_exported; - - static int const data_not_exported; + static int const data; static int const LIBSHARED_NO_EXPORT data_excluded; }; -class LIBSHARED_NO_EXPORT LibsharedExcluded +class LIBSHARED_NO_EXPORT ExcludedClass { public: - int libshared() const; + int method() const; - int LIBSHARED_EXPORT libshared_exported() const; + int LIBSHARED_EXPORT method_exported() const; - int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const; + int LIBSHARED_DEPRECATED method_deprecated() const; - int libshared_not_exported() const; + int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSHARED_NO_EXPORT libshared_excluded() const; + int LIBSHARED_NO_EXPORT method_excluded() const; - static int const LIBSHARED_EXPORT data_exported; + static int const data; - static int const data_not_exported; + static int const LIBSHARED_EXPORT data_exported; static int const LIBSHARED_NO_EXPORT data_excluded; }; -LIBSHARED_EXPORT int libshared_exported(); +int function(); -LIBSHARED_DEPRECATED_EXPORT int libshared_deprecated(); +int LIBSHARED_EXPORT function_exported(); -int libshared_not_exported(); +int LIBSHARED_DEPRECATED function_deprecated(); -int LIBSHARED_NO_EXPORT libshared_excluded(); +int LIBSHARED_DEPRECATED_EXPORT function_deprecated_exported(); -extern int const LIBSHARED_EXPORT data_exported; +int LIBSHARED_NO_EXPORT function_excluded(); -extern int const data_not_exported; +extern int const data; + +extern int const LIBSHARED_EXPORT data_exported; extern int const LIBSHARED_NO_EXPORT data_excluded; +} // namespace libshared + LIBSHARED_EXPORT void use_int(int); #endif diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp index 89381af..e1d1255 100644 --- a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp @@ -1,97 +1,125 @@ - #include "libstatic.h" -int Libstatic::libstatic() const +int libstatic::Class::method() const { return 0; } -int Libstatic::libstatic_exported() const +int libstatic::Class::method_exported() const { return 0; } -int Libstatic::libstatic_deprecated() const +int libstatic::Class::method_deprecated() const { return 0; } -int Libstatic::libstatic_not_exported() const +int libstatic::Class::method_deprecated_exported() const { return 0; } -int Libstatic::libstatic_excluded() const +int libstatic::Class::method_excluded() const { return 0; } -int LibstaticNotExported::libstatic() const +int const libstatic::Class::data = 1; + +int const libstatic::Class::data_exported = 1; + +int const libstatic::Class::data_excluded = 1; + +int libstatic::ExportedClass::method() const { return 0; } -int LibstaticNotExported::libstatic_exported() const +int libstatic::ExportedClass::method_exported() const { return 0; } -int LibstaticNotExported::libstatic_deprecated() const +int libstatic::ExportedClass::method_deprecated() const { return 0; } -int LibstaticNotExported::libstatic_not_exported() const +int libstatic::ExportedClass::method_deprecated_exported() const { return 0; } -int LibstaticNotExported::libstatic_excluded() const +int libstatic::ExportedClass::method_excluded() const { return 0; } -int LibstaticExcluded::libstatic() const +int const libstatic::ExportedClass::data = 1; + +int const libstatic::ExportedClass::data_exported = 1; + +int const libstatic::ExportedClass::data_excluded = 1; + +int libstatic::ExcludedClass::method() const { return 0; } -int LibstaticExcluded::libstatic_exported() const +int libstatic::ExcludedClass::method_exported() const { return 0; } -int LibstaticExcluded::libstatic_deprecated() const +int libstatic::ExcludedClass::method_deprecated() const { return 0; } -int LibstaticExcluded::libstatic_not_exported() const +int libstatic::ExcludedClass::method_deprecated_exported() const { return 0; } -int LibstaticExcluded::libstatic_excluded() const +int libstatic::ExcludedClass::method_excluded() const { return 0; } -int libstatic_exported() +int const libstatic::ExcludedClass::data = 1; + +int const libstatic::ExcludedClass::data_exported = 1; + +int const libstatic::ExcludedClass::data_excluded = 1; + +int libstatic::function() +{ + return 0; +} + +int libstatic::function_exported() { return 0; } -int libstatic_deprecated() +int libstatic::function_deprecated() { return 0; } -int libstatic_not_exported() +int libstatic::function_deprecated_exported() { return 0; } -int libstatic_excluded() +int libstatic::function_excluded() { return 0; } + +int const libstatic::data = 1; + +int const libstatic::data_exported = 1; + +int const libstatic::data_excluded = 1; diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h index 6072d9b..a40e732 100644 --- a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h @@ -1,57 +1,87 @@ - #ifndef LIBSTATIC_H #define LIBSTATIC_H #include "libstatic_export.h" -class LIBSTATIC_EXPORT Libstatic +namespace libstatic +{ + +class Class { public: - int libstatic() const; + int method() const; + + int LIBSTATIC_EXPORT method_exported() const; + + int LIBSTATIC_DEPRECATED method_deprecated() const; - int libstatic_exported() const; + int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSTATIC_DEPRECATED libstatic_deprecated() const; + int LIBSTATIC_NO_EXPORT method_excluded() const; - int libstatic_not_exported() const; + static int const data; - int LIBSTATIC_NO_EXPORT libstatic_excluded() const; + static int const LIBSTATIC_EXPORT data_exported; + + static int const LIBSTATIC_NO_EXPORT data_excluded; }; -class LibstaticNotExported +class LIBSTATIC_EXPORT ExportedClass { public: - int libstatic() const; + int method() const; + + int LIBSTATIC_EXPORT method_exported() const; + + int LIBSTATIC_DEPRECATED method_deprecated() const; + + int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSTATIC_EXPORT libstatic_exported() const; + int LIBSTATIC_NO_EXPORT method_excluded() const; - int LIBSTATIC_DEPRECATED libstatic_deprecated() const; + static int const data; - int libstatic_not_exported() const; + static int const LIBSTATIC_EXPORT data_exported; - int LIBSTATIC_NO_EXPORT libstatic_excluded() const; + static int const LIBSTATIC_NO_EXPORT data_excluded; }; -class LIBSTATIC_NO_EXPORT LibstaticExcluded +class LIBSTATIC_NO_EXPORT ExcludedClass { public: - int libstatic() const; + int method() const; - int LIBSTATIC_EXPORT libstatic_exported() const; + int LIBSTATIC_EXPORT method_exported() const; - int LIBSTATIC_DEPRECATED libstatic_deprecated() const; + int LIBSTATIC_DEPRECATED method_deprecated() const; - int libstatic_not_exported() const; + int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSTATIC_NO_EXPORT libstatic_excluded() const; + int LIBSTATIC_NO_EXPORT method_excluded() const; + + static int const data; + + static int const LIBSTATIC_EXPORT data_exported; + + static int const LIBSTATIC_NO_EXPORT data_excluded; }; -LIBSTATIC_EXPORT int libstatic_exported(); +int function(); + +int LIBSTATIC_EXPORT function_exported(); + +int LIBSTATIC_DEPRECATED function_deprecated(); + +int LIBSTATIC_DEPRECATED_EXPORT function_deprecated_exported(); + +int LIBSTATIC_NO_EXPORT function_excluded(); + +extern int const data; -LIBSTATIC_DEPRECATED_EXPORT int libstatic_deprecated(); +extern int const LIBSTATIC_EXPORT data_exported; -int libstatic_not_exported(); +extern int const LIBSTATIC_NO_EXPORT data_excluded; -int LIBSTATIC_NO_EXPORT libstatic_excluded(); +} // namespace libstatic #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35447174ccece96d1b4e6304b94a31e03064500b commit 35447174ccece96d1b4e6304b94a31e03064500b Author: Matthew Woehlke AuthorDate: Fri Sep 2 11:23:16 2016 -0400 Commit: Matthew Woehlke CommitDate: Wed Sep 7 10:47:21 2016 -0400 Add data tests to GenerateExportHeader test Add static data members and global variables to the GenerateExportHeader shared library, testing that export decoration for these works in addition to decoration of classes and free functions. diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index 4c1f2a9..f3f2da9 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -66,6 +66,14 @@ int main() #else //l.libshared_excluded(); LINK ERROR (NOT WIN32) #endif + + use_int(l.data_exported); + use_int(l.data_not_exported); +#ifdef _WIN32 + use_int(l.data_excluded); +#else + //use_int(l.data_excluded); LINK ERROR (NOT WIN32) +#endif } { @@ -75,6 +83,10 @@ int main() l.libshared_deprecated(); //l.libshared_not_exported(); LINK ERROR //l.libshared_excluded(); LINK ERROR + + use_int(l.data_exported); + //use_int(l.data_not_exported); LINK ERROR + //use_int(l.data_excluded); LINK ERROR } { @@ -84,6 +96,10 @@ int main() l.libshared_deprecated(); //l.libshared_not_exported(); LINK ERROR //l.libshared_excluded(); LINK ERROR + + use_int(l.data_exported); + //use_int(l.data_not_exported); LINK ERROR + //use_int(l.data_excluded); LINK ERROR } libshared_exported(); @@ -91,6 +107,10 @@ int main() //libshared_not_exported(); LINK ERROR //libshared_excluded(); LINK ERROR + use_int(data_exported); + //use_int(data_not_exported); LINK ERROR + //use_int(data_excluded); LINK ERROR + { Libstatic l; l.libstatic(); diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp index ad6d356..7e46ab5 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp @@ -26,6 +26,12 @@ int Libshared::libshared_excluded() const return 0; } +int const Libshared::data_exported = 1; + +int const Libshared::data_not_exported = 1; + +int const Libshared::data_excluded = 1; + int LibsharedNotExported::libshared() const { return 0; @@ -51,6 +57,12 @@ int LibsharedNotExported::libshared_excluded() const return 0; } +int const LibsharedNotExported::data_exported = 1; + +int const LibsharedNotExported::data_not_exported = 1; + +int const LibsharedNotExported::data_excluded = 1; + int LibsharedExcluded::libshared() const { return 0; @@ -76,6 +88,12 @@ int LibsharedExcluded::libshared_excluded() const return 0; } +int const LibsharedExcluded::data_exported = 1; + +int const LibsharedExcluded::data_not_exported = 1; + +int const LibsharedExcluded::data_excluded = 1; + int libshared() { return 0; @@ -100,3 +118,13 @@ int libshared_excluded() { return 0; } + +int const data_exported = 1; + +int const data_not_exported = 1; + +int const data_excluded = 1; + +void use_int(int) +{ +} diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h index bd9f2e3..62879c2 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h @@ -16,6 +16,12 @@ public: int libshared_not_exported() const; int LIBSHARED_NO_EXPORT libshared_excluded() const; + + static int const LIBSHARED_EXPORT data_exported; + + static int const data_not_exported; + + static int const LIBSHARED_NO_EXPORT data_excluded; }; class LibsharedNotExported @@ -30,6 +36,12 @@ public: int libshared_not_exported() const; int LIBSHARED_NO_EXPORT libshared_excluded() const; + + static int const LIBSHARED_EXPORT data_exported; + + static int const data_not_exported; + + static int const LIBSHARED_NO_EXPORT data_excluded; }; class LIBSHARED_NO_EXPORT LibsharedExcluded @@ -44,6 +56,12 @@ public: int libshared_not_exported() const; int LIBSHARED_NO_EXPORT libshared_excluded() const; + + static int const LIBSHARED_EXPORT data_exported; + + static int const data_not_exported; + + static int const LIBSHARED_NO_EXPORT data_excluded; }; LIBSHARED_EXPORT int libshared_exported(); @@ -54,4 +72,12 @@ int libshared_not_exported(); int LIBSHARED_NO_EXPORT libshared_excluded(); +extern int const LIBSHARED_EXPORT data_exported; + +extern int const data_not_exported; + +extern int const LIBSHARED_NO_EXPORT data_excluded; + +LIBSHARED_EXPORT void use_int(int); + #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15928265868c8bb7afba6d4ce9f2f27b56d685d5 commit 15928265868c8bb7afba6d4ce9f2f27b56d685d5 Author: Matthew Woehlke AuthorDate: Fri Sep 2 11:04:55 2016 -0400 Commit: Matthew Woehlke CommitDate: Wed Sep 7 10:47:21 2016 -0400 Add failure test for GenerateExportHeader Modify notation of statements in the GenerateExportHeader test expected to result in link errors. Modify script used to build the test to also generate a suite of modified sources, each having exactly one of the failing lines enabled, and to generate EXCLUDE_FROM_ALL executables for the same. Modify RunCMake script used to drive the test to read the list of such executables and try to build each of them, verifying that they do in fact fail to build. This will verify that the _NO_EXPORT macros are working as expected, and will also catch errors like the one that 0cbaaf2dc3e2 fixed. diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake new file mode 100644 index 0000000..88853b3 --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake @@ -0,0 +1,60 @@ +set(failure_test_executables + ${CMAKE_CURRENT_BINARY_DIR}/failure_test_targets) +file(WRITE ${failure_test_executables} "") + +# Read the input source file +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/exportheader_test.cpp content_post) +set(content_pre "") + +# Generate source files for failure test executables +set(counter 0) +while(1) + # Find first occurrence of link error marker in remaining content + string(REGEX MATCH "//([^;\n]+;) LINK ERROR( [(][^)]+[)])?\n(.*)" + match "${content_post}") + if(match STREQUAL "") + # No more matches + break() + endif() + + # Shift content buffers and extract failing statement + string(LENGTH "${content_post}" content_post_length) + string(LENGTH "${match}" matched_length) + math(EXPR shift_length "${content_post_length} - ${matched_length}") + + string(SUBSTRING "${content_post}" 0 ${shift_length} shift) + set(content_pre "${content_pre}${shift}") + set(content_post "${CMAKE_MATCH_3}") + set(content_active "//${CMAKE_MATCH_1} LINK ERROR${CMAKE_MATCH_2}") + set(statement "${CMAKE_MATCH_1}") + + # Check if potential error is conditional, and evaluate condition if so + string(REGEX REPLACE " [(]([^)]+)[)]" "\\1" condition "${CMAKE_MATCH_2}") + if(NOT condition STREQUAL "") + string(REGEX REPLACE " +" ";" condition "${condition}") + if(${condition}) + else() + message(STATUS "Not testing '${statement}'; " + "condition (${condition}) is FALSE") + set(content_pre "${content_pre}// link error removed\n") + continue() + endif() + endif() + + if(NOT skip) + message(STATUS "Creating failure test for '${statement}'") + math(EXPR counter "${counter} + 1") + + # Write new source file + set(out ${CMAKE_CURRENT_BINARY_DIR}/exportheader_failtest-${counter}.cpp) + file(WRITE ${out} "${content_pre}${statement}\n${content_post}") + + # Add executable for failure test + add_executable(GEH-fail-${counter} EXCLUDE_FROM_ALL ${out}) + target_link_libraries(GEH-fail-${counter} ${link_libraries}) + file(APPEND ${failure_test_executables} "GEH-fail-${counter}\n") + endif() + + # Add placeholder where failing statement was removed + set(content_pre "${content_pre}${content_active}\n") +endwhile() diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index ee0871b..cddba29 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -123,3 +123,5 @@ target_compile_definitions(GenerateExportHeader "SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\"" "BIN_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"" ) + +include(${CMAKE_CURRENT_LIST_DIR}/GEH-failures.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake index e534c1f..9423ef5 100644 --- a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake @@ -12,6 +12,16 @@ function(run_GEH) run_cmake(GEH) run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug) run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader) + + file(STRINGS "${RunCMake_TEST_BINARY_DIR}/failure_test_targets" + failure_test_targets) + + foreach(failure_test_target ${failure_test_targets}) + run_cmake_command(GEH-link-error ${CMAKE_COMMAND} + --build . + --config Debug + --target ${failure_test_target}) + endforeach() endfunction() run_GEH() diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index 26bea7e..4c1f2a9 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -3,14 +3,6 @@ #include "libstatic.h" -// #define BUILD_FAIL - -#ifndef BUILD_FAIL -#define DOES_NOT_BUILD(function) -#else -#define DOES_NOT_BUILD(function) function -#endif - #include #include #include @@ -69,32 +61,35 @@ int main() l.libshared_exported(); l.libshared_deprecated(); l.libshared_not_exported(); - - DOES_NOT_BUILD(l.libshared_excluded();) +#ifdef _WIN32 + l.libshared_excluded(); +#else + //l.libshared_excluded(); LINK ERROR (NOT WIN32) +#endif } { LibsharedNotExported l; - DOES_NOT_BUILD(l.libshared();) + //l.libshared(); LINK ERROR l.libshared_exported(); l.libshared_deprecated(); - DOES_NOT_BUILD(l.libshared_not_exported();) - DOES_NOT_BUILD(l.libshared_excluded();) + //l.libshared_not_exported(); LINK ERROR + //l.libshared_excluded(); LINK ERROR } { LibsharedExcluded l; - DOES_NOT_BUILD(l.libshared();) + //l.libshared(); LINK ERROR l.libshared_exported(); l.libshared_deprecated(); - DOES_NOT_BUILD(l.libshared_not_exported();) - DOES_NOT_BUILD(l.libshared_excluded();) + //l.libshared_not_exported(); LINK ERROR + //l.libshared_excluded(); LINK ERROR } libshared_exported(); libshared_deprecated(); - DOES_NOT_BUILD(libshared_not_exported();) - DOES_NOT_BUILD(libshared_excluded();) + //libshared_not_exported(); LINK ERROR + //libshared_excluded(); LINK ERROR { Libstatic l; @@ -128,10 +123,12 @@ int main() libstatic_not_exported(); libstatic_excluded(); +#if defined(SRC_DIR) && defined(BIN_DIR) compare(SRC_DIR "/libshared_export.h", BIN_DIR "/libshared/libshared_export.h"); compare(SRC_DIR "/libstatic_export.h", BIN_DIR "/libstatic/libstatic_export.h"); +#endif return 0; } ----------------------------------------------------------------------- Summary of changes: .../GenerateExportHeader/GEH-failures.cmake | 60 +++++++++ .../GEH-link-error-result.txt} | 0 ...-build-stderr.txt => GEH-link-error-stderr.txt} | 0 Tests/RunCMake/GenerateExportHeader/GEH.cmake | 2 + .../GenerateExportHeader/RunCMakeTest.cmake | 10 ++ .../GenerateExportHeader/exportheader_test.cpp | 138 ++++++++++++-------- .../lib_shared_and_static/libshared_and_static.cpp | 65 +++++---- .../lib_shared_and_static/libshared_and_static.h | 83 +++++++----- .../GenerateExportHeader/libshared/libshared.cpp | 65 +++++---- .../GenerateExportHeader/libshared/libshared.h | 72 ++++++---- .../GenerateExportHeader/libstatic/libstatic.cpp | 68 +++++++--- .../GenerateExportHeader/libstatic/libstatic.h | 76 +++++++---- 12 files changed, 436 insertions(+), 203 deletions(-) create mode 100644 Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake copy Tests/RunCMake/{CMP0060/CMP0060-OLD-Build-result.txt => GenerateExportHeader/GEH-link-error-result.txt} (100%) copy Tests/RunCMake/GenerateExportHeader/{GEH-build-stderr.txt => GEH-link-error-stderr.txt} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 8 14:59:48 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 8 Sep 2016 14:59:48 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1865-g6f43ab3 Message-ID: <20160908185948.53534F583D@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, next has been updated via 6f43ab3049540f3a0c62c50d9e6b43f10fa57897 (commit) via b00a344d11386940bb57c9e4321d95a82555f044 (commit) from 37d5107091a9713090f73406b87053a05817c882 (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=6f43ab3049540f3a0c62c50d9e6b43f10fa57897 commit 6f43ab3049540f3a0c62c50d9e6b43f10fa57897 Merge: 37d5107 b00a344 Author: Brad King AuthorDate: Thu Sep 8 14:59:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 14:59:47 2016 -0400 Merge topic 'geh-failure-tests' into next b00a344d Maybe skip GenerateExportHeader failure tests https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b00a344d11386940bb57c9e4321d95a82555f044 commit b00a344d11386940bb57c9e4321d95a82555f044 Author: Matthew Woehlke AuthorDate: Thu Sep 8 14:47:18 2016 -0400 Commit: Matthew Woehlke CommitDate: Thu Sep 8 14:47:18 2016 -0400 Maybe skip GenerateExportHeader failure tests When setting up the failure tests for GenerateExportHeader, check if the compiler actually hides non-exported stuff. If not, the failure tests won't fail, and will cause the overall test to fail. (Since this typically is only the case for very old compilers, simply skipping them as opposed to trying to do something more fine grained seems reasonably safe.) diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake index 88853b3..7182cdf 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake @@ -2,6 +2,13 @@ set(failure_test_executables ${CMAKE_CURRENT_BINARY_DIR}/failure_test_targets) file(WRITE ${failure_test_executables} "") +# Check if we should do anything. If the compiler doesn't support hidden +# visibility, the failure tests won't fail, so just write an empty targets +# list and punt. +if(NOT WIN32 AND NOT CYGWIN AND NOT COMPILER_HAS_HIDDEN_VISIBILITY) + return() +endif() + # Read the input source file file(READ ${CMAKE_CURRENT_SOURCE_DIR}/exportheader_test.cpp content_post) set(content_pre "") ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake | 7 +++++++ 1 file changed, 7 insertions(+) hooks/post-receive -- CMake From rleigh at codelibre.net Thu Sep 8 16:57:03 2016 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 8 Sep 2016 16:57:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1868-gb4ab772 Message-ID: <20160908205703.CF598F581A@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, next has been updated via b4ab772483a971880e4e2baa844dfa40124e8332 (commit) via 30d13fa92cafd44e84a5e3b95373a21f2373afce (commit) via efe622be144df37eeb0d09c924cd9ccd38b91b09 (commit) from 6f43ab3049540f3a0c62c50d9e6b43f10fa57897 (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=b4ab772483a971880e4e2baa844dfa40124e8332 commit b4ab772483a971880e4e2baa844dfa40124e8332 Merge: 6f43ab3 30d13fa Author: Roger Leigh AuthorDate: Thu Sep 8 16:57:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 16:57:00 2016 -0400 Merge topic 'bzip2-imported-targets' into next 30d13fa9 Tests: Add FindBZip2 unit tests efe622be FindBZip2: Add imported target https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30d13fa92cafd44e84a5e3b95373a21f2373afce commit 30d13fa92cafd44e84a5e3b95373a21f2373afce Author: Roger Leigh AuthorDate: Thu Sep 8 21:28:17 2016 +0100 Commit: Roger Leigh CommitDate: Thu Sep 8 21:54:43 2016 +0100 Tests: Add FindBZip2 unit tests diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8293286..aeff249 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1356,6 +1356,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindBoost) endif() + if(CMake_TEST_FindBZip2) + add_subdirectory(FindBZip2) + endif() + if(CMake_TEST_FindGSL) add_subdirectory(FindGSL) endif() diff --git a/Tests/FindBZip2/CMakeLists.txt b/Tests/FindBZip2/CMakeLists.txt new file mode 100644 index 0000000..0eb3b99 --- /dev/null +++ b/Tests/FindBZip2/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindBZip2.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindBZip2/Test" + "${CMake_BINARY_DIR}/Tests/FindBZip2/Test" + ${build_generator_args} + --build-project TestFindBZip2 + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) diff --git a/Tests/FindBZip2/Test/CMakeLists.txt b/Tests/FindBZip2/Test/CMakeLists.txt new file mode 100644 index 0000000..e9cb618 --- /dev/null +++ b/Tests/FindBZip2/Test/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.4) +project(TestFindBZip2 C) +include(CTest) + +find_package(BZip2 REQUIRED) + +add_definitions(-DCMAKE_EXPECTED_BZip2_VERSION="${BZip2_VERSION_STRING}") + +add_executable(test_tgt main.c) +target_link_libraries(test_tgt BZip2::BZip2) +add_test(NAME test_tgt COMMAND test_tgt) + +add_executable(test_var main.c) +target_include_directories(test_var PRIVATE ${BZIP2_INCLUDE_DIRS}) +target_link_libraries(test_var PRIVATE ${BZIP2_LIBRARIES}) +add_test(NAME test_var COMMAND test_var) diff --git a/Tests/FindBZip2/Test/main.c b/Tests/FindBZip2/Test/main.c new file mode 100644 index 0000000..f8d1ddc --- /dev/null +++ b/Tests/FindBZip2/Test/main.c @@ -0,0 +1,23 @@ +#include +#include +#include + +int main() +{ + int chunksize = 1024; + FILE *file = fopen("test.bzip2", "wb"); + char *buf = malloc(sizeof(char) * chunksize); + int error, rsize; + unsigned int in, out; + BZFILE *bzfile = BZ2_bzWriteOpen(&error, file, 64, 1, 10); + + /* Don't actually write anything for the purposes of the test */ + + BZ2_bzWriteClose(&error, bzfile, 1, &in, &out); + free(buf); + fclose(file); + + remove("test.bzip2"); + + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efe622be144df37eeb0d09c924cd9ccd38b91b09 commit efe622be144df37eeb0d09c924cd9ccd38b91b09 Author: Roger Leigh AuthorDate: Thu Sep 8 21:16:09 2016 +0100 Commit: Roger Leigh CommitDate: Thu Sep 8 21:16:09 2016 +0100 FindBZip2: Add imported target diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index b670025..ca7761d 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -64,6 +64,31 @@ if (BZIP2_FOUND) set(CMAKE_REQUIRED_LIBRARIES ${BZIP2_LIBRARIES}) CHECK_SYMBOL_EXISTS(BZ2_bzCompressInit "bzlib.h" BZIP2_NEED_PREFIX) cmake_pop_check_state() + + if(NOT TARGET BZip2::BZip2) + add_library(BZip2::BZip2 UNKNOWN IMPORTED) + set_target_properties(BZip2::BZip2 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIRS}") + + if(BZIP2_LIBRARY_RELEASE) + set_property(TARGET BZip2::BZip2 APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(BZip2::BZip2 PROPERTIES + IMPORTED_LOCATION_RELEASE "${BZIP2_LIBRARY_RELEASE}") + endif() + + if(BZIP2_LIBRARY_DEBUG) + set_property(TARGET BZip2::BZip2 APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(BZip2::BZip2 PROPERTIES + IMPORTED_LOCATION_DEBUG "${BZIP2_LIBRARY_DEBUG}") + endif() + + if(NOT BZIP2_LIBRARY_RELEASE AND NOT BZIP2_LIBRARY_DEBUG) + set_property(TARGET BZip2::BZip2 APPEND PROPERTY + IMPORTED_LOCATION "${BZIP2_LIBRARY}") + endif() + endif() endif () mark_as_advanced(BZIP2_INCLUDE_DIR) ----------------------------------------------------------------------- Summary of changes: Modules/FindBZip2.cmake | 25 +++++++++++++++++++++++++ Tests/CMakeLists.txt | 4 ++++ Tests/{FindICU => FindBZip2}/CMakeLists.txt | 8 ++++---- Tests/FindBZip2/Test/CMakeLists.txt | 16 ++++++++++++++++ Tests/FindBZip2/Test/main.c | 23 +++++++++++++++++++++++ 5 files changed, 72 insertions(+), 4 deletions(-) copy Tests/{FindICU => FindBZip2}/CMakeLists.txt (54%) create mode 100644 Tests/FindBZip2/Test/CMakeLists.txt create mode 100644 Tests/FindBZip2/Test/main.c hooks/post-receive -- CMake From rleigh at codelibre.net Thu Sep 8 16:57:17 2016 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 8 Sep 2016 16:57:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1870-g3fad31b Message-ID: <20160908205717.54676F581A@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, next has been updated via 3fad31b0c32aecf07dc29857e26ee3a803ec154b (commit) via d63ea37483c7f4b21e9b6e0f792c57ed7d567584 (commit) from b4ab772483a971880e4e2baa844dfa40124e8332 (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=3fad31b0c32aecf07dc29857e26ee3a803ec154b commit 3fad31b0c32aecf07dc29857e26ee3a803ec154b Merge: b4ab772 d63ea37 Author: Roger Leigh AuthorDate: Thu Sep 8 16:57:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 16:57:16 2016 -0400 Merge topic 'freebsd-kvm-link' into next d63ea374 Utilities: cmlibuv: Link with kvm on FreeBSD https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d63ea37483c7f4b21e9b6e0f792c57ed7d567584 commit d63ea37483c7f4b21e9b6e0f792c57ed7d567584 Author: Roger Leigh AuthorDate: Thu Sep 8 21:55:36 2016 +0100 Commit: Roger Leigh CommitDate: Thu Sep 8 21:55:36 2016 +0100 Utilities: cmlibuv: Link with kvm on FreeBSD diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index e25ac82..8837be6 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -168,6 +168,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + list(APPEND uv_libraries + kvm + ) list(APPEND uv_headers include/uv-bsd.h ) ----------------------------------------------------------------------- Summary of changes: Utilities/cmlibuv/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From rleigh at codelibre.net Thu Sep 8 17:01:49 2016 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 8 Sep 2016 17:01:49 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1872-gd803aae Message-ID: <20160908210149.599BEF58D8@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, next has been updated via d803aae6f865545c4cc0702a52f73871aaf1de0e (commit) via b3e62a0507a3cd749d9add0a5c926aa823e91827 (commit) from 3fad31b0c32aecf07dc29857e26ee3a803ec154b (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=d803aae6f865545c4cc0702a52f73871aaf1de0e commit d803aae6f865545c4cc0702a52f73871aaf1de0e Merge: 3fad31b b3e62a0 Author: Roger Leigh AuthorDate: Thu Sep 8 17:01:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 17:01:48 2016 -0400 Merge topic 'bzip2-imported-targets' into next b3e62a05 FindBZip2: Document imported target https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3e62a0507a3cd749d9add0a5c926aa823e91827 commit b3e62a0507a3cd749d9add0a5c926aa823e91827 Author: Roger Leigh AuthorDate: Thu Sep 8 22:01:02 2016 +0100 Commit: Roger Leigh CommitDate: Thu Sep 8 22:01:02 2016 +0100 FindBZip2: Document imported target diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index ca7761d..152d812 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -4,7 +4,16 @@ # # Try to find BZip2 # -# Once done this will define +# IMPORTED Targets +# ^^^^^^^^^^^^^^^^ +# +# This module defines :prop_tgt:`IMPORTED` target ``BZip2::BZip2``, if +# BZip2 has been found. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: # # :: # ----------------------------------------------------------------------- Summary of changes: Modules/FindBZip2.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Thu Sep 8 17:44:00 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Thu, 8 Sep 2016 17:44:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1877-g905f5f0 Message-ID: <20160908214400.345C2F4D3D@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, next has been updated via 905f5f00754d5e3e632b829e4f4f2e4db6f64f52 (commit) via befb6a645026bd7f64b6dc1dc1d370114f501375 (commit) via 3dde29bc72ad3b3f4cba6fc300df077fd4dc2a5c (commit) via 5d3b5bef11bc29bb00a14103433fea81e4dcc340 (commit) via ad42eb33b61ad262315bfa087dc7f4f0ddbca5fe (commit) from d803aae6f865545c4cc0702a52f73871aaf1de0e (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=905f5f00754d5e3e632b829e4f4f2e4db6f64f52 commit 905f5f00754d5e3e632b829e4f4f2e4db6f64f52 Merge: d803aae befb6a6 Author: Daniel Pfeifer AuthorDate: Thu Sep 8 17:43:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 17:43:58 2016 -0400 Merge topic 'clang-tidy' into next befb6a64 cmDependsFortran: simplify boolean expression 3dde29bc cmSystemTools: simplify boolean expressions 5d3b5bef QCMakeCacheView: simplify boolean expression ad42eb33 QCMakeCacheView: no else after return https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=befb6a645026bd7f64b6dc1dc1d370114f501375 commit befb6a645026bd7f64b6dc1dc1d370114f501375 Author: Daniel Pfeifer AuthorDate: Thu Sep 8 23:43:06 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 8 23:43:06 2016 +0200 cmDependsFortran: simplify boolean expression diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index b7e006d..eb4c1ec 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -712,10 +712,5 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, // Compare the remaining content. If no compiler id matched above, // including the case none was given, this will compare the whole // content. - if (!cmFortranStreamsDiffer(finModFile, finStampFile)) { - return false; - } - - // The modules are different. - return true; + return cmFortranStreamsDiffer(finModFile, finStampFile); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dde29bc72ad3b3f4cba6fc300df077fd4dc2a5c commit 3dde29bc72ad3b3f4cba6fc300df077fd4dc2a5c Author: Daniel Pfeifer AuthorDate: Thu Sep 8 23:41:31 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 8 23:41:31 2016 +0200 cmSystemTools: simplify boolean expressions diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7da9975..ae0323b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1766,9 +1766,7 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) if (!GetFileTime(hFrom, &timeCreation, &timeLastAccess, &timeLastWrite)) { return false; } - if (!SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite)) { - return false; - } + return SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite); #else struct stat fromStat; if (stat(fromFile, &fromStat) < 0) { @@ -1778,11 +1776,8 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) struct utimbuf buf; buf.actime = fromStat.st_atime; buf.modtime = fromStat.st_mtime; - if (utime(toFile, &buf) < 0) { - return false; - } + return utime(toFile, &buf) >= 0; #endif - return true; } cmSystemToolsFileTime* cmSystemTools::FileTimeNew() @@ -1828,16 +1823,11 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t) if (!h) { return false; } - if (!SetFileTime(h, &t->timeCreation, &t->timeLastAccess, - &t->timeLastWrite)) { - return false; - } + return SetFileTime(h, &t->timeCreation, &t->timeLastAccess, + &t->timeLastWrite); #else - if (utime(fname, &t->timeBuf) < 0) { - return false; - } + return utime(fname, &t->timeBuf) >= 0; #endif - return true; } #ifdef _WIN32 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d3b5bef11bc29bb00a14103433fea81e4dcc340 commit 5d3b5bef11bc29bb00a14103433fea81e4dcc340 Author: Daniel Pfeifer AuthorDate: Thu Sep 8 23:35:59 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 8 23:35:59 2016 +0200 QCMakeCacheView: simplify boolean expression diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index ec7918b..ed11f7b 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -95,10 +95,7 @@ protected: // if there are no children if (!m->hasChildren(idx)) { bool adv = m->data(idx, QCMakeCacheModel::AdvancedRole).toBool(); - if (!adv || (adv && this->ShowAdvanced)) { - return true; - } - return false; + return !adv || this->ShowAdvanced; } // check children https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad42eb33b61ad262315bfa087dc7f4f0ddbca5fe commit ad42eb33b61ad262315bfa087dc7f4f0ddbca5fe Author: Daniel Pfeifer AuthorDate: Thu Sep 8 23:33:08 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 8 23:33:08 2016 +0200 QCMakeCacheView: no else after return diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 88ea049..ec7918b 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -554,14 +554,16 @@ QWidget* QCMakeCacheModelDelegate::createEditor( QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, SLOT(setFileDialogFlag(bool))); return editor; - } else if (type == QCMakeProperty::FILEPATH) { + } + if (type == QCMakeProperty::FILEPATH) { QCMakeFilePathEditor* editor = new QCMakeFilePathEditor(p, var.data(Qt::DisplayRole).toString()); QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, SLOT(setFileDialogFlag(bool))); return editor; - } else if (type == QCMakeProperty::STRING && - var.data(QCMakeCacheModel::StringsRole).isValid()) { + } + if (type == QCMakeProperty::STRING && + var.data(QCMakeCacheModel::StringsRole).isValid()) { QCMakeComboBox* editor = new QCMakeComboBox( p, var.data(QCMakeCacheModel::StringsRole).toStringList()); editor->setFrame(false); ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/QCMakeCacheView.cxx | 13 ++++++------- Source/cmDependsFortran.cxx | 7 +------ Source/cmSystemTools.cxx | 20 +++++--------------- 3 files changed, 12 insertions(+), 28 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Thu Sep 8 17:55:07 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Thu, 8 Sep 2016 17:55:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1881-g59edc3f Message-ID: <20160908215507.85423F58D9@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, next has been updated via 59edc3fb74ca1eb857601c63bb01c682c1a8466b (commit) via cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 (commit) via 52052ef88b6f46a12c8430395ae8b419971fcb35 (commit) via 3b3622305bb950f16f238f030c8f32786ad3511a (commit) from 905f5f00754d5e3e632b829e4f4f2e4db6f64f52 (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=59edc3fb74ca1eb857601c63bb01c682c1a8466b commit 59edc3fb74ca1eb857601c63bb01c682c1a8466b Merge: 905f5f0 cc6b948 Author: Daniel Pfeifer AuthorDate: Thu Sep 8 17:55:06 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 8 17:55:06 2016 -0400 Merge topic 'cmGeneratorTarget-cleanup' into next cc6b948e cmGeneratorTarget: factor out common part of AddSources commands 52052ef8 cmGeneratorTarget: use erase-unique instead of reinitialization 3b362230 cmGeneratorTarget: don't clear container in destructor https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 commit cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 Author: Daniel Pfeifer AuthorDate: Wed Sep 7 21:14:29 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 8 23:47:16 2016 +0200 cmGeneratorTarget: factor out common part of AddSources commands diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 4baec03..7dd8e7f 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -468,9 +468,8 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config, return i->second; } -void cmGeneratorTarget::AddSource(const std::string& src) +void cmGeneratorTarget::AddSourceCommon(const std::string& src) { - this->Target->AddSource(src); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); cmGeneratorExpression ge(lfbt); CM_AUTO_PTR cge = ge.Parse(src); @@ -480,19 +479,17 @@ void cmGeneratorTarget::AddSource(const std::string& src) this->LinkImplementationLanguageIsContextDependent = true; } +void cmGeneratorTarget::AddSource(const std::string& src) +{ + this->Target->AddSource(src); + this->AddSourceCommon(src); +} + void cmGeneratorTarget::AddTracedSources(std::vector const& srcs) { this->Target->AddTracedSources(srcs); if (!srcs.empty()) { - std::string srcFiles = cmJoin(srcs, ";"); - this->SourceFilesMap.clear(); - this->LinkImplementationLanguageIsContextDependent = true; - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - CM_AUTO_PTR cge = ge.Parse(srcFiles); - cge->SetEvaluateForBuildsystem(true); - this->SourceEntries.push_back( - new cmGeneratorTarget::TargetPropertyEntry(cge)); + this->AddSourceCommon(cmJoin(srcs, ";")); } } diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 173f15d..715220e 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -540,6 +540,8 @@ public: std::string GetFortranModuleDirectory() const; private: + void AddSourceCommon(const std::string& src); + std::string CreateFortranModuleDirectory() const; mutable bool FortranModuleDirectoryCreated; mutable std::string FortranModuleDirectory; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52052ef88b6f46a12c8430395ae8b419971fcb35 commit 52052ef88b6f46a12c8430395ae8b419971fcb35 Author: Daniel Pfeifer AuthorDate: Wed Sep 7 21:03:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 8 23:46:45 2016 +0200 cmGeneratorTarget: use erase-unique instead of reinitialization Just to make it easier to find places where containers are cleared in order to be recomputed. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 25917f8..4baec03 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -839,14 +839,10 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory( &dagChecker, result, excludeImported); } - std::set unique; - for (std::vector::iterator li = result.begin(); - li != result.end(); ++li) { - cmSystemTools::ConvertToUnixSlashes(*li); - unique.insert(*li); - } - result.clear(); - result.insert(result.end(), unique.begin(), unique.end()); + std::for_each(result.begin(), result.end(), + cmSystemTools::ConvertToUnixSlashes); + std::sort(result.begin(), result.end()); + result.erase(std::unique(result.begin(), result.end()), result.end()); IncludeCacheType::value_type entry(config_upper, result); iter = this->SystemIncludesCache.insert(entry).first; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b3622305bb950f16f238f030c8f32786ad3511a commit 3b3622305bb950f16f238f030c8f32786ad3511a Author: Daniel Pfeifer AuthorDate: Wed Sep 7 20:40:18 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 8 23:46:18 2016 +0200 cmGeneratorTarget: don't clear container in destructor It will be destroyed anyway. This also makes it easier to search for places where containers are atually cleared in order to be recomputed. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ee2907c..25917f8 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -327,7 +327,6 @@ cmGeneratorTarget::~cmGeneratorTarget() cmDeleteAll(this->CompileDefinitionsEntries); cmDeleteAll(this->SourceEntries); cmDeleteAll(this->LinkInformation); - this->LinkInformation.clear(); } cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 32 ++++++++++++-------------------- Source/cmGeneratorTarget.h | 2 ++ 2 files changed, 14 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Sep 9 00:01:08 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 9 Sep 2016 00:01:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-881-gd62a5df Message-ID: <20160909040108.A5C48F57D8@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 d62a5dfc86a4d0f48f93494065f7a835c9140bb6 (commit) from f506489d1ed222761f9ce752144a458290020e55 (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=d62a5dfc86a4d0f48f93494065f7a835c9140bb6 commit d62a5dfc86a4d0f48f93494065f7a835c9140bb6 Author: Kitware Robot AuthorDate: Fri Sep 9 00:01:05 2016 -0400 Commit: Kitware Robot CommitDate: Fri Sep 9 00:01:05 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 74f34b2..a0020d1 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 6) -set(CMake_VERSION_PATCH 20160908) +set(CMake_VERSION_PATCH 20160909) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Fri Sep 9 06:40:27 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 9 Sep 2016 06:40:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1884-g740f009 Message-ID: <20160909104027.5F935C164F@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, next has been updated via 740f009e4c4ad8b532f7b4e478d0863d4be1ce6a (commit) via 0259faf1e8b19b72f54645817a0b4cd146d9ca26 (commit) via d62a5dfc86a4d0f48f93494065f7a835c9140bb6 (commit) from 59edc3fb74ca1eb857601c63bb01c682c1a8466b (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=740f009e4c4ad8b532f7b4e478d0863d4be1ce6a commit 740f009e4c4ad8b532f7b4e478d0863d4be1ce6a Merge: 59edc3f 0259faf Author: Nils Gladitz AuthorDate: Fri Sep 9 06:40:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 06:40:11 2016 -0400 Merge topic 'wix-feature-patch' into next 0259faf1 CPackWIX: Enabled patching of WIX tags d62a5dfc CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0259faf1e8b19b72f54645817a0b4cd146d9ca26 commit 0259faf1e8b19b72f54645817a0b4cd146d9ca26 Author: Michael St?rmer AuthorDate: Fri Sep 9 10:53:26 2016 +0200 Commit: Nils Gladitz CommitDate: Fri Sep 9 11:34:43 2016 +0200 CPackWIX: Enabled patching of WIX tags diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index 08ff0cb..d02df2d 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -147,7 +147,7 @@ # } # # Currently fragments can be injected into most -# Component, File and Directory elements. +# Component, File, Directory and Feature elements. # # The following additional special Ids can be used: # diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 85e0ae3..ba5787e 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -628,7 +628,7 @@ bool cmCPackWIXGenerator::CreateFeatureHierarchy( i != ComponentGroups.end(); ++i) { cmCPackComponentGroup const& group = i->second; if (group.ParentGroup == 0) { - featureDefinitions.EmitFeatureForComponentGroup(group); + featureDefinitions.EmitFeatureForComponentGroup(group, *this->Patch); } } @@ -638,7 +638,7 @@ bool cmCPackWIXGenerator::CreateFeatureHierarchy( cmCPackComponent const& component = i->second; if (!component.Group) { - featureDefinitions.EmitFeatureForComponent(component); + featureDefinitions.EmitFeatureForComponent(component, *this->Patch); } } diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx index 7794935..c9f17cc 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx @@ -42,7 +42,7 @@ void cmWIXFeaturesSourceWriter::CreateCMakePackageRegistryEntry( } void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup( - cmCPackComponentGroup const& group) + cmCPackComponentGroup const& group, cmWIXPatch& patch) { BeginElement("Feature"); AddAttribute("Id", "CM_G_" + group.Name); @@ -57,20 +57,22 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup( for (std::vector::const_iterator i = group.Subgroups.begin(); i != group.Subgroups.end(); ++i) { - EmitFeatureForComponentGroup(**i); + EmitFeatureForComponentGroup(**i, patch); } for (std::vector::const_iterator i = group.Components.begin(); i != group.Components.end(); ++i) { - EmitFeatureForComponent(**i); + EmitFeatureForComponent(**i, patch); } + patch.ApplyFragment("CM_G_" + group.Name, *this); + EndElement("Feature"); } void cmWIXFeaturesSourceWriter::EmitFeatureForComponent( - cmCPackComponent const& component) + cmCPackComponent const& component, cmWIXPatch& patch) { BeginElement("Feature"); AddAttribute("Id", "CM_C_" + component.Name); @@ -90,6 +92,8 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponent( AddAttribute("Level", "2"); } + patch.ApplyFragment("CM_C_" + component.Name, *this); + EndElement("Feature"); } diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h index 9974b63..124ed42 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h @@ -13,6 +13,7 @@ #ifndef cmWIXFeaturesSourceWriter_h #define cmWIXFeaturesSourceWriter_h +#include "cmWIXPatch.h" #include "cmWIXSourceWriter.h" #include @@ -29,9 +30,11 @@ public: void CreateCMakePackageRegistryEntry(std::string const& package, std::string const& upgradeGuid); - void EmitFeatureForComponentGroup(const cmCPackComponentGroup& group); + void EmitFeatureForComponentGroup(const cmCPackComponentGroup& group, + cmWIXPatch& patch); - void EmitFeatureForComponent(const cmCPackComponent& component); + void EmitFeatureForComponent(const cmCPackComponent& component, + cmWIXPatch& patch); void EmitComponentRef(std::string const& id); }; ----------------------------------------------------------------------- Summary of changes: Modules/CPackWIX.cmake | 2 +- Source/CMakeVersion.cmake | 2 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 4 ++-- Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx | 12 ++++++++---- Source/CPack/WiX/cmWIXFeaturesSourceWriter.h | 7 +++++-- 5 files changed, 17 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Fri Sep 9 07:03:46 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 9 Sep 2016 07:03:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1886-g804588e Message-ID: <20160909110346.557D2F5B9E@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, next has been updated via 804588e64dcbe7075d4272edd26975bf76a435d5 (commit) via c17b7f72344fbd328c66d01689e47f1520677bef (commit) from 740f009e4c4ad8b532f7b4e478d0863d4be1ce6a (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=804588e64dcbe7075d4272edd26975bf76a435d5 commit 804588e64dcbe7075d4272edd26975bf76a435d5 Merge: 740f009 c17b7f7 Author: Nils Gladitz AuthorDate: Fri Sep 9 07:03:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 07:03:45 2016 -0400 Merge topic 'wix-feature-patch' into next c17b7f72 !fixup: Add missing topic release note https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c17b7f72344fbd328c66d01689e47f1520677bef commit c17b7f72344fbd328c66d01689e47f1520677bef Author: Nils Gladitz AuthorDate: Fri Sep 9 13:03:19 2016 +0200 Commit: Nils Gladitz CommitDate: Fri Sep 9 13:03:19 2016 +0200 !fixup: Add missing topic release note diff --git a/Help/release/dev/wix-feature-patch.rst b/Help/release/dev/wix-feature-patch.rst new file mode 100644 index 0000000..0b1cbe3 --- /dev/null +++ b/Help/release/dev/wix-feature-patch.rst @@ -0,0 +1,5 @@ +wix-feature-patch +----------------- + +* The CPack WIX generator now supports + CPACK_WIX_PATCH_FILE fragments for Feature elements. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/wix-feature-patch.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Help/release/dev/wix-feature-patch.rst hooks/post-receive -- CMake From nilsgladitz at gmail.com Fri Sep 9 07:04:11 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Fri, 9 Sep 2016 07:04:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1888-g9753c73 Message-ID: <20160909110411.AA83DF5BA9@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, next has been updated via 9753c73bcf72c2dbba11c93406501126e93a5baa (commit) via c0bccc51df0eda22b4a7aa5833e1204412b39fc8 (commit) from 804588e64dcbe7075d4272edd26975bf76a435d5 (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=9753c73bcf72c2dbba11c93406501126e93a5baa commit 9753c73bcf72c2dbba11c93406501126e93a5baa Merge: 804588e c0bccc5 Author: Nils Gladitz AuthorDate: Fri Sep 9 07:04:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 07:04:10 2016 -0400 Merge topic 'wix-feature-patch' into next c0bccc51 CPackWIX: Enabled patching of WIX tags https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0bccc51df0eda22b4a7aa5833e1204412b39fc8 commit c0bccc51df0eda22b4a7aa5833e1204412b39fc8 Author: Michael St?rmer AuthorDate: Fri Sep 9 10:53:26 2016 +0200 Commit: Nils Gladitz CommitDate: Fri Sep 9 13:03:57 2016 +0200 CPackWIX: Enabled patching of WIX tags diff --git a/Help/release/dev/wix-feature-patch.rst b/Help/release/dev/wix-feature-patch.rst new file mode 100644 index 0000000..0b1cbe3 --- /dev/null +++ b/Help/release/dev/wix-feature-patch.rst @@ -0,0 +1,5 @@ +wix-feature-patch +----------------- + +* The CPack WIX generator now supports + CPACK_WIX_PATCH_FILE fragments for Feature elements. diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index 08ff0cb..d02df2d 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -147,7 +147,7 @@ # } # # Currently fragments can be injected into most -# Component, File and Directory elements. +# Component, File, Directory and Feature elements. # # The following additional special Ids can be used: # diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 85e0ae3..ba5787e 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -628,7 +628,7 @@ bool cmCPackWIXGenerator::CreateFeatureHierarchy( i != ComponentGroups.end(); ++i) { cmCPackComponentGroup const& group = i->second; if (group.ParentGroup == 0) { - featureDefinitions.EmitFeatureForComponentGroup(group); + featureDefinitions.EmitFeatureForComponentGroup(group, *this->Patch); } } @@ -638,7 +638,7 @@ bool cmCPackWIXGenerator::CreateFeatureHierarchy( cmCPackComponent const& component = i->second; if (!component.Group) { - featureDefinitions.EmitFeatureForComponent(component); + featureDefinitions.EmitFeatureForComponent(component, *this->Patch); } } diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx index 7794935..c9f17cc 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx @@ -42,7 +42,7 @@ void cmWIXFeaturesSourceWriter::CreateCMakePackageRegistryEntry( } void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup( - cmCPackComponentGroup const& group) + cmCPackComponentGroup const& group, cmWIXPatch& patch) { BeginElement("Feature"); AddAttribute("Id", "CM_G_" + group.Name); @@ -57,20 +57,22 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup( for (std::vector::const_iterator i = group.Subgroups.begin(); i != group.Subgroups.end(); ++i) { - EmitFeatureForComponentGroup(**i); + EmitFeatureForComponentGroup(**i, patch); } for (std::vector::const_iterator i = group.Components.begin(); i != group.Components.end(); ++i) { - EmitFeatureForComponent(**i); + EmitFeatureForComponent(**i, patch); } + patch.ApplyFragment("CM_G_" + group.Name, *this); + EndElement("Feature"); } void cmWIXFeaturesSourceWriter::EmitFeatureForComponent( - cmCPackComponent const& component) + cmCPackComponent const& component, cmWIXPatch& patch) { BeginElement("Feature"); AddAttribute("Id", "CM_C_" + component.Name); @@ -90,6 +92,8 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponent( AddAttribute("Level", "2"); } + patch.ApplyFragment("CM_C_" + component.Name, *this); + EndElement("Feature"); } diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h index 9974b63..124ed42 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h @@ -13,6 +13,7 @@ #ifndef cmWIXFeaturesSourceWriter_h #define cmWIXFeaturesSourceWriter_h +#include "cmWIXPatch.h" #include "cmWIXSourceWriter.h" #include @@ -29,9 +30,11 @@ public: void CreateCMakePackageRegistryEntry(std::string const& package, std::string const& upgradeGuid); - void EmitFeatureForComponentGroup(const cmCPackComponentGroup& group); + void EmitFeatureForComponentGroup(const cmCPackComponentGroup& group, + cmWIXPatch& patch); - void EmitFeatureForComponent(const cmCPackComponent& component); + void EmitFeatureForComponent(const cmCPackComponent& component, + cmWIXPatch& patch); void EmitComponentRef(std::string const& id); }; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 10:26:33 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 10:26:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1890-gfc294ee Message-ID: <20160909142633.52D3AF59C9@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, next has been updated via fc294ee3521d42734791b04bc33d18deb5e39383 (commit) via 93dba286bffe6f4267b29a67016d0e0dff3b1bd5 (commit) from 9753c73bcf72c2dbba11c93406501126e93a5baa (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=fc294ee3521d42734791b04bc33d18deb5e39383 commit fc294ee3521d42734791b04bc33d18deb5e39383 Merge: 9753c73 93dba28 Author: Brad King AuthorDate: Fri Sep 9 10:26:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 10:26:30 2016 -0400 Merge topic 'warn-cmake-version' into next 93dba286 Warn when building with CMake older than 2.8.12.2 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93dba286bffe6f4267b29a67016d0e0dff3b1bd5 commit 93dba286bffe6f4267b29a67016d0e0dff3b1bd5 Author: Brad King AuthorDate: Fri Sep 9 10:24:56 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 10:24:56 2016 -0400 Warn when building with CMake older than 2.8.12.2 We will soon require this version to build CMake itself. Add a warning to help find automated builds that are using an older version. diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ef2ca2..97b8561 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,10 @@ if(POLICY CMP0053) endif() project(CMake) +if(CMAKE_VERSION VERSION_LESS 2.8.12.2) + message(WARNING "CMake >= 2.8.12.2 will soon be required. You are using '${CMAKE_VERSION}'.") +endif() + if(CMAKE_BOOTSTRAP) # Running from bootstrap script. Set local variable and remove from cache. set(CMAKE_BOOTSTRAP 1) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 10:30:02 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 10:30:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1892-g2d65227 Message-ID: <20160909143002.27DABF57AE@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, next has been updated via 2d65227983c95fe9e33efbdc507e9c9fbf605e0f (commit) via 861f1b3da65d3eda55e0e1f29d628aa3fb643f70 (commit) from fc294ee3521d42734791b04bc33d18deb5e39383 (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=2d65227983c95fe9e33efbdc507e9c9fbf605e0f commit 2d65227983c95fe9e33efbdc507e9c9fbf605e0f Merge: fc294ee 861f1b3 Author: Brad King AuthorDate: Fri Sep 9 10:30:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 10:30:01 2016 -0400 Merge topic 'vs-default-v100' into next 861f1b3d VS: Do not default to missing v100 64-bit toolset on VS 2010 Express https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=861f1b3da65d3eda55e0e1f29d628aa3fb643f70 commit 861f1b3da65d3eda55e0e1f29d628aa3fb643f70 Author: Brad King AuthorDate: Fri Sep 9 10:17:23 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 10:17:23 2016 -0400 VS: Do not default to missing v100 64-bit toolset on VS 2010 Express Since commit 059c230d (VS: Explicitly default to v100 toolset in Visual Studio 2010, 2016-07-21) the VS 2010 generator now correctly defaults to the v100 toolset instead of no toolset. However, this broke our logic for defaulting to the `Windows7.1SDK` toolset for 64-bit builds on VS 2010 Express. Fix the logic by ignoring the `v100` default in the case. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index df831e5..4d8eb6f 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -461,6 +461,10 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand( bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf) { + if (this->DefaultPlatformToolset == "v100") { + // The v100 64-bit toolset does not exist in the express edition. + this->DefaultPlatformToolset.clear(); + } if (this->GetPlatformToolset()) { return true; } ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 10:58:25 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 10:58:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1894-g4ca4ed5 Message-ID: <20160909145825.73F34F5D31@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, next has been updated via 4ca4ed50a47ff7136fed3337698b74e0ad91582f (commit) via 258b7b283379a10e9fd527c2d863f1ddc7c5fa74 (commit) from 2d65227983c95fe9e33efbdc507e9c9fbf605e0f (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=4ca4ed50a47ff7136fed3337698b74e0ad91582f commit 4ca4ed50a47ff7136fed3337698b74e0ad91582f Merge: 2d65227 258b7b2 Author: Brad King AuthorDate: Fri Sep 9 10:58:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 10:58:24 2016 -0400 Merge topic 'GetPrerequisites-absolute-ucrt' into next 258b7b28 GetPrerequisites: Recognize absolute paths to UCRT system libraries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=258b7b283379a10e9fd527c2d863f1ddc7c5fa74 commit 258b7b283379a10e9fd527c2d863f1ddc7c5fa74 Author: Brad King AuthorDate: Thu Sep 8 10:21:35 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 10:24:01 2016 -0400 GetPrerequisites: Recognize absolute paths to UCRT system libraries The matching expression added by commit v3.5.0-rc1~33^2 (GetPrerequisites: Define api-ms-win-* files as system libraries, 2016-01-19) did not account for absolute paths to the UCRT libraries. We already recognize absolute paths to the MSVC runtime libraries. Do this for UCRT libraries too. Issue: #16240 diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 58f5a92..127fda2 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -544,7 +544,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var) string(TOLOWER "$ENV{windir}" windir) file(TO_CMAKE_PATH "${windir}" windir) - if(lower MATCHES "^(api-ms-win-|${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*msvc[^/]+dll)") + if(lower MATCHES "^(${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*(msvc|api-ms-win-)[^/]+dll)") set(is_system 1) endif() @@ -572,7 +572,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var) string(TOLOWER "${env_windir}" windir) string(TOLOWER "${env_sysdir}" sysroot) - if(lower MATCHES "^(api-ms-win-|${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*msvc[^/]+dll)") + if(lower MATCHES "^(${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*(msvc|api-ms-win-)[^/]+dll)") set(is_system 1) endif() endif() ----------------------------------------------------------------------- Summary of changes: Modules/GetPrerequisites.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:11:22 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:11:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1896-gc0f6295 Message-ID: <20160909151122.2FB1AD788E@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, next has been updated via c0f629593ed05793666c23e1478d142bd6577d25 (commit) via 6a497bb0a3a92ac13d637ee200db4d6cd43cb121 (commit) from 4ca4ed50a47ff7136fed3337698b74e0ad91582f (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=c0f629593ed05793666c23e1478d142bd6577d25 commit c0f629593ed05793666c23e1478d142bd6577d25 Merge: 4ca4ed5 6a497bb Author: Brad King AuthorDate: Fri Sep 9 11:11:21 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:11:21 2016 -0400 Merge topic 'libuv-link-kvm' into next 6a497bb0 libuv: Link with kvm on FreeBSD https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a497bb0a3a92ac13d637ee200db4d6cd43cb121 commit 6a497bb0a3a92ac13d637ee200db4d6cd43cb121 Author: Roger Leigh AuthorDate: Thu Sep 8 21:55:36 2016 +0100 Commit: Brad King CommitDate: Fri Sep 9 11:07:46 2016 -0400 libuv: Link with kvm on FreeBSD Add it unconditionally. It is present in FreeBSD 11, 10 and 9. diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index e25ac82..8837be6 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -168,6 +168,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + list(APPEND uv_libraries + kvm + ) list(APPEND uv_headers include/uv-bsd.h ) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:12:40 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:12:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1898-ge238ac6 Message-ID: <20160909151240.CA93BE18DC@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, next has been updated via e238ac6f443823896be5c95435e253971f152722 (commit) via c6d83a15d8ac11cba1388e853a9b321ca4e9c87a (commit) from c0f629593ed05793666c23e1478d142bd6577d25 (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=e238ac6f443823896be5c95435e253971f152722 commit e238ac6f443823896be5c95435e253971f152722 Merge: c0f6295 c6d83a1 Author: Brad King AuthorDate: Fri Sep 9 11:12:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:12:39 2016 -0400 Merge topic 'libuv-link-kvm' into next c6d83a15 libuv: Link with kvm on NetBSD and OpenBSD https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6d83a15d8ac11cba1388e853a9b321ca4e9c87a commit c6d83a15d8ac11cba1388e853a9b321ca4e9c87a Author: Brad King AuthorDate: Fri Sep 9 11:11:40 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 11:11:40 2016 -0400 libuv: Link with kvm on NetBSD and OpenBSD We include the `kvm.h` header on these platforms and call kvm APIs. Link with the library to ensure they are available. diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index 8837be6..1b384b5 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -181,6 +181,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") endif() if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") + list(APPEND uv_libraries + kvm + ) list(APPEND uv_headers include/uv-bsd.h ) @@ -191,6 +194,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") endif() if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + list(APPEND uv_libraries + kvm + ) list(APPEND uv_headers include/uv-bsd.h ) ----------------------------------------------------------------------- Summary of changes: Utilities/cmlibuv/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:17:57 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:17:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-883-g188a42a Message-ID: <20160909151757.656ACF397D@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 188a42a72fb313521d1f2d459af45ac00d519c3e (commit) via 1031e5d99385317e74a4667da9865aebcb48bcbe (commit) from d62a5dfc86a4d0f48f93494065f7a835c9140bb6 (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=188a42a72fb313521d1f2d459af45ac00d519c3e commit 188a42a72fb313521d1f2d459af45ac00d519c3e Merge: d62a5df 1031e5d Author: Brad King AuthorDate: Fri Sep 9 11:17:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:17:55 2016 -0400 Merge topic 'FindMatlab-regression-tests-print-on-error' 1031e5d9 FindMatlab: add verbosity to the nightly tests ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:18:00 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:18:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-887-g7c05f13 Message-ID: <20160909151800.8887FF398C@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 7c05f1371c95102efac91dcf71acd08f570a446f (commit) via f2c98e125fe0d7d59ce3ff58928d20ad41066685 (commit) via e83b96b793dbe9d525fc878f7e8df8304079e35d (commit) via aa6682802eecd0434088c16b51d198fea619b76d (commit) from 188a42a72fb313521d1f2d459af45ac00d519c3e (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=7c05f1371c95102efac91dcf71acd08f570a446f commit 7c05f1371c95102efac91dcf71acd08f570a446f Merge: 188a42a f2c98e1 Author: Brad King AuthorDate: Fri Sep 9 11:17:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:17:58 2016 -0400 Merge topic 'update-kwiml' f2c98e12 Merge branch 'upstream-KWIML' into update-kwiml e83b96b7 KWIML 2016-09-08 (d564b3c7) aa668280 kwiml: Update import script for new upstream URL ----------------------------------------------------------------------- Summary of changes: Utilities/KWIML/Copyright.txt | 2 +- Utilities/KWIML/include/kwiml/abi.h | 6 +++++- Utilities/KWIML/include/kwiml/int.h | 2 +- Utilities/KWIML/src/version.h.in | 2 +- Utilities/Scripts/update-kwiml.bash | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:18:03 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:18:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-889-g46cf415 Message-ID: <20160909151803.A2196F3B5E@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 46cf4151c4c95627ce57363f128ba17aa2d647b8 (commit) via 52b95d8893fb288a4a787d668b8456c12e887d5c (commit) from 7c05f1371c95102efac91dcf71acd08f570a446f (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=46cf4151c4c95627ce57363f128ba17aa2d647b8 commit 46cf4151c4c95627ce57363f128ba17aa2d647b8 Merge: 7c05f13 52b95d8 Author: Brad King AuthorDate: Fri Sep 9 11:18:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:18:01 2016 -0400 Merge topic 'fortran-scanbuild-fixes' 52b95d88 CTestCustom: Suppress scan-build warnings in flex-generated lexer ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:18:06 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:18:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-892-gc580227 Message-ID: <20160909151806.94833F3AEC@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 c58022717341eddb7dfa490c78e4d4d6a2f95af8 (commit) via 695f0d0d3a2db22d2ee3a426df8a1ec502cd471b (commit) via 1619fb46a88accd1e6864f0c9de27ae2fd46541a (commit) from 46cf4151c4c95627ce57363f128ba17aa2d647b8 (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=c58022717341eddb7dfa490c78e4d4d6a2f95af8 commit c58022717341eddb7dfa490c78e4d4d6a2f95af8 Merge: 46cf415 695f0d0 Author: Brad King AuthorDate: Fri Sep 9 11:18:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:18:04 2016 -0400 Merge topic 'fortran-parser-keywords' 695f0d0d cmFortranParser: Parse keywords as lexical tokens 1619fb46 cmFortranParser: Simplify grammar by skipping unknown statements ----------------------------------------------------------------------- Summary of changes: Source/cmFortranLexer.cxx | 477 ++++++++++++++++++++++------------------ Source/cmFortranLexer.h | 2 +- Source/cmFortranLexer.in.l | 6 + Source/cmFortranParser.cxx | 462 ++++++++++++++++++++------------------ Source/cmFortranParser.y | 95 ++++---- Source/cmFortranParserTokens.h | 16 +- 6 files changed, 567 insertions(+), 491 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:18:09 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:18:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-894-gc40cbcc Message-ID: <20160909151809.F22ACF39CC@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 c40cbccf7d51c2d12a26c3cfc333199fad482c5b (commit) via cb299acc27d5f80b2fc801f0f57358ec9f0303d1 (commit) from c58022717341eddb7dfa490c78e4d4d6a2f95af8 (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=c40cbccf7d51c2d12a26c3cfc333199fad482c5b commit c40cbccf7d51c2d12a26c3cfc333199fad482c5b Merge: c580227 cb299ac Author: Brad King AuthorDate: Fri Sep 9 11:18:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:18:07 2016 -0400 Merge topic 'parse_arguments_argv_n' cb299acc cmake_parse_arguments: Add option to read arguments from ARGC/ARGV# ----------------------------------------------------------------------- Summary of changes: Help/command/cmake_parse_arguments.rst | 11 ++++ Help/release/dev/parse_arguments_argv_n.rst | 6 +++ Source/cmParseArgumentsCommand.cxx | 57 ++++++++++++++++++-- Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake | 30 +++++++++++ .../BadArgvN1-result.txt} | 0 .../cmake_parse_arguments/BadArgvN1-stderr.txt | 5 ++ .../RunCMake/cmake_parse_arguments/BadArgvN1.cmake | 4 ++ .../BadArgvN2-result.txt} | 0 .../cmake_parse_arguments/BadArgvN2-stderr.txt | 5 ++ .../RunCMake/cmake_parse_arguments/BadArgvN2.cmake | 4 ++ .../BadArgvN3-result.txt} | 0 .../cmake_parse_arguments/BadArgvN3-stderr.txt | 4 ++ .../RunCMake/cmake_parse_arguments/BadArgvN3.cmake | 1 + .../BadArgvN4-result.txt} | 0 .../cmake_parse_arguments/BadArgvN4-stderr.txt | 4 ++ .../RunCMake/cmake_parse_arguments/BadArgvN4.cmake | 3 ++ .../cmake_parse_arguments/RunCMakeTest.cmake | 5 ++ 17 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/parse_arguments_argv_n.rst create mode 100644 Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN1-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN2-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN3-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => cmake_parse_arguments/BadArgvN4-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:18:12 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:18:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-898-g2572b82 Message-ID: <20160909151812.DCB48F399D@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 2572b824d4b81de83a1b16dee84d8754e846522c (commit) via cc6b948e5ea86996fe65014ce8f97bf92b46e4c0 (commit) via 52052ef88b6f46a12c8430395ae8b419971fcb35 (commit) via 3b3622305bb950f16f238f030c8f32786ad3511a (commit) from c40cbccf7d51c2d12a26c3cfc333199fad482c5b (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=2572b824d4b81de83a1b16dee84d8754e846522c commit 2572b824d4b81de83a1b16dee84d8754e846522c Merge: c40cbcc cc6b948 Author: Brad King AuthorDate: Fri Sep 9 11:18:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:18:10 2016 -0400 Merge topic 'cmGeneratorTarget-cleanup' cc6b948e cmGeneratorTarget: factor out common part of AddSources commands 52052ef8 cmGeneratorTarget: use erase-unique instead of reinitialization 3b362230 cmGeneratorTarget: don't clear container in destructor ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 32 ++++++++++++-------------------- Source/cmGeneratorTarget.h | 2 ++ 2 files changed, 14 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:18:33 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:18:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1905-g1ff6b5b Message-ID: <20160909151833.79FE9F39BB@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, next has been updated via 1ff6b5bd0fe83473ff25b48336329e90399ff4c4 (commit) via 2572b824d4b81de83a1b16dee84d8754e846522c (commit) via c40cbccf7d51c2d12a26c3cfc333199fad482c5b (commit) via c58022717341eddb7dfa490c78e4d4d6a2f95af8 (commit) via 46cf4151c4c95627ce57363f128ba17aa2d647b8 (commit) via 7c05f1371c95102efac91dcf71acd08f570a446f (commit) via 188a42a72fb313521d1f2d459af45ac00d519c3e (commit) from e238ac6f443823896be5c95435e253971f152722 (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=1ff6b5bd0fe83473ff25b48336329e90399ff4c4 commit 1ff6b5bd0fe83473ff25b48336329e90399ff4c4 Merge: e238ac6 2572b82 Author: Brad King AuthorDate: Fri Sep 9 11:18:25 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 11:18:25 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:32:40 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:32:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-900-gd5e4cdc Message-ID: <20160909153240.4EC8FF5887@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 d5e4cdc0f8c846cdf17f3276d77d352a7644bc88 (commit) via 258b7b283379a10e9fd527c2d863f1ddc7c5fa74 (commit) from 2572b824d4b81de83a1b16dee84d8754e846522c (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=d5e4cdc0f8c846cdf17f3276d77d352a7644bc88 commit d5e4cdc0f8c846cdf17f3276d77d352a7644bc88 Merge: 2572b82 258b7b2 Author: Brad King AuthorDate: Fri Sep 9 11:32:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:32:38 2016 -0400 Merge topic 'GetPrerequisites-absolute-ucrt' 258b7b28 GetPrerequisites: Recognize absolute paths to UCRT system libraries ----------------------------------------------------------------------- Summary of changes: Modules/GetPrerequisites.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:32:55 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:32:55 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1907-gccc35f7 Message-ID: <20160909153255.710C4F589B@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, next has been updated via ccc35f729ad4ce6fa23288ae77e14c87eb1ca0a0 (commit) via d5e4cdc0f8c846cdf17f3276d77d352a7644bc88 (commit) from 1ff6b5bd0fe83473ff25b48336329e90399ff4c4 (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=ccc35f729ad4ce6fa23288ae77e14c87eb1ca0a0 commit ccc35f729ad4ce6fa23288ae77e14c87eb1ca0a0 Merge: 1ff6b5b d5e4cdc Author: Brad King AuthorDate: Fri Sep 9 11:32:48 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 11:32:48 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:41:56 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:41:56 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1910-g80b043a Message-ID: <20160909154156.CBAF0D7A63@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, next has been updated via 80b043a53de8a349d00632b52a5cb3b2292b1be8 (commit) via db938513ff3c6d6bd0805da3a8256e6498fc58db (commit) via 9aa619cbc14d2ab83ca2c00655cb8384bc752d3c (commit) from ccc35f729ad4ce6fa23288ae77e14c87eb1ca0a0 (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=80b043a53de8a349d00632b52a5cb3b2292b1be8 commit 80b043a53de8a349d00632b52a5cb3b2292b1be8 Merge: ccc35f7 db93851 Author: Brad King AuthorDate: Fri Sep 9 11:41:55 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:41:55 2016 -0400 Merge topic 'bzip2-imported-targets' into next db938513 Help: Add notes for topic 'bzip2-imported-targets' 9aa619cb fixup! Tests: Add FindBZip2 unit tests https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db938513ff3c6d6bd0805da3a8256e6498fc58db commit db938513ff3c6d6bd0805da3a8256e6498fc58db Author: Brad King AuthorDate: Fri Sep 9 11:37:25 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 11:37:25 2016 -0400 Help: Add notes for topic 'bzip2-imported-targets' diff --git a/Help/release/dev/bzip2-imported-targets.rst b/Help/release/dev/bzip2-imported-targets.rst new file mode 100644 index 0000000..be58b96 --- /dev/null +++ b/Help/release/dev/bzip2-imported-targets.rst @@ -0,0 +1,4 @@ +bzip2-imported-targets +---------------------- + +* The :module:`FindBZip2` module now provides imported targets. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9aa619cbc14d2ab83ca2c00655cb8384bc752d3c commit 9aa619cbc14d2ab83ca2c00655cb8384bc752d3c Author: Brad King AuthorDate: Fri Sep 9 11:36:27 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 11:36:27 2016 -0400 fixup! Tests: Add FindBZip2 unit tests diff --git a/Tests/FindBZip2/Test/main.c b/Tests/FindBZip2/Test/main.c index f8d1ddc..8e24c94 100644 --- a/Tests/FindBZip2/Test/main.c +++ b/Tests/FindBZip2/Test/main.c @@ -1,15 +1,15 @@ +#include #include #include -#include int main() { int chunksize = 1024; - FILE *file = fopen("test.bzip2", "wb"); - char *buf = malloc(sizeof(char) * chunksize); + FILE* file = fopen("test.bzip2", "wb"); + char* buf = malloc(sizeof(char) * chunksize); int error, rsize; unsigned int in, out; - BZFILE *bzfile = BZ2_bzWriteOpen(&error, file, 64, 1, 10); + BZFILE* bzfile = BZ2_bzWriteOpen(&error, file, 64, 1, 10); /* Don't actually write anything for the purposes of the test */ ----------------------------------------------------------------------- Summary of changes: Help/release/dev/bzip2-imported-targets.rst | 4 ++++ Tests/FindBZip2/Test/main.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/bzip2-imported-targets.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 11:43:00 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 11:43:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1914-gafee770 Message-ID: <20160909154300.E81EAE17B4@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, next has been updated via afee770b4bba3997c10d188c400c7376ab3b36ec (commit) via 79eba4b7abf940501a5b2060e8aaa3048d743652 (commit) via 069cac584f3fccfad54b4fcce8d7e8584a009c51 (commit) via e9ce050342c34b92e0eaa281a4e454c9b78a41d9 (commit) from 80b043a53de8a349d00632b52a5cb3b2292b1be8 (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=afee770b4bba3997c10d188c400c7376ab3b36ec commit afee770b4bba3997c10d188c400c7376ab3b36ec Merge: 80b043a 79eba4b Author: Brad King AuthorDate: Fri Sep 9 11:43:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 11:43:00 2016 -0400 Merge topic 'bzip2-imported-targets' into next 79eba4b7 Help: Add notes for topic 'bzip2-imported-targets' 069cac58 Tests: Add FindBZip2 unit tests e9ce0503 FindBZip2: Add imported target https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79eba4b7abf940501a5b2060e8aaa3048d743652 commit 79eba4b7abf940501a5b2060e8aaa3048d743652 Author: Brad King AuthorDate: Fri Sep 9 11:37:25 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 11:42:35 2016 -0400 Help: Add notes for topic 'bzip2-imported-targets' diff --git a/Help/release/dev/bzip2-imported-targets.rst b/Help/release/dev/bzip2-imported-targets.rst new file mode 100644 index 0000000..be58b96 --- /dev/null +++ b/Help/release/dev/bzip2-imported-targets.rst @@ -0,0 +1,4 @@ +bzip2-imported-targets +---------------------- + +* The :module:`FindBZip2` module now provides imported targets. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=069cac584f3fccfad54b4fcce8d7e8584a009c51 commit 069cac584f3fccfad54b4fcce8d7e8584a009c51 Author: Roger Leigh AuthorDate: Thu Sep 8 21:28:17 2016 +0100 Commit: Brad King CommitDate: Fri Sep 9 11:42:35 2016 -0400 Tests: Add FindBZip2 unit tests diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8293286..aeff249 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1356,6 +1356,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindBoost) endif() + if(CMake_TEST_FindBZip2) + add_subdirectory(FindBZip2) + endif() + if(CMake_TEST_FindGSL) add_subdirectory(FindGSL) endif() diff --git a/Tests/FindBZip2/CMakeLists.txt b/Tests/FindBZip2/CMakeLists.txt new file mode 100644 index 0000000..0eb3b99 --- /dev/null +++ b/Tests/FindBZip2/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindBZip2.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindBZip2/Test" + "${CMake_BINARY_DIR}/Tests/FindBZip2/Test" + ${build_generator_args} + --build-project TestFindBZip2 + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) diff --git a/Tests/FindBZip2/Test/CMakeLists.txt b/Tests/FindBZip2/Test/CMakeLists.txt new file mode 100644 index 0000000..e9cb618 --- /dev/null +++ b/Tests/FindBZip2/Test/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.4) +project(TestFindBZip2 C) +include(CTest) + +find_package(BZip2 REQUIRED) + +add_definitions(-DCMAKE_EXPECTED_BZip2_VERSION="${BZip2_VERSION_STRING}") + +add_executable(test_tgt main.c) +target_link_libraries(test_tgt BZip2::BZip2) +add_test(NAME test_tgt COMMAND test_tgt) + +add_executable(test_var main.c) +target_include_directories(test_var PRIVATE ${BZIP2_INCLUDE_DIRS}) +target_link_libraries(test_var PRIVATE ${BZIP2_LIBRARIES}) +add_test(NAME test_var COMMAND test_var) diff --git a/Tests/FindBZip2/Test/main.c b/Tests/FindBZip2/Test/main.c new file mode 100644 index 0000000..8e24c94 --- /dev/null +++ b/Tests/FindBZip2/Test/main.c @@ -0,0 +1,23 @@ +#include +#include +#include + +int main() +{ + int chunksize = 1024; + FILE* file = fopen("test.bzip2", "wb"); + char* buf = malloc(sizeof(char) * chunksize); + int error, rsize; + unsigned int in, out; + BZFILE* bzfile = BZ2_bzWriteOpen(&error, file, 64, 1, 10); + + /* Don't actually write anything for the purposes of the test */ + + BZ2_bzWriteClose(&error, bzfile, 1, &in, &out); + free(buf); + fclose(file); + + remove("test.bzip2"); + + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9ce050342c34b92e0eaa281a4e454c9b78a41d9 commit e9ce050342c34b92e0eaa281a4e454c9b78a41d9 Author: Roger Leigh AuthorDate: Thu Sep 8 21:16:09 2016 +0100 Commit: Brad King CommitDate: Fri Sep 9 11:42:34 2016 -0400 FindBZip2: Add imported target diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index b670025..152d812 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -4,7 +4,16 @@ # # Try to find BZip2 # -# Once done this will define +# IMPORTED Targets +# ^^^^^^^^^^^^^^^^ +# +# This module defines :prop_tgt:`IMPORTED` target ``BZip2::BZip2``, if +# BZip2 has been found. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: # # :: # @@ -64,6 +73,31 @@ if (BZIP2_FOUND) set(CMAKE_REQUIRED_LIBRARIES ${BZIP2_LIBRARIES}) CHECK_SYMBOL_EXISTS(BZ2_bzCompressInit "bzlib.h" BZIP2_NEED_PREFIX) cmake_pop_check_state() + + if(NOT TARGET BZip2::BZip2) + add_library(BZip2::BZip2 UNKNOWN IMPORTED) + set_target_properties(BZip2::BZip2 PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIRS}") + + if(BZIP2_LIBRARY_RELEASE) + set_property(TARGET BZip2::BZip2 APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(BZip2::BZip2 PROPERTIES + IMPORTED_LOCATION_RELEASE "${BZIP2_LIBRARY_RELEASE}") + endif() + + if(BZIP2_LIBRARY_DEBUG) + set_property(TARGET BZip2::BZip2 APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(BZip2::BZip2 PROPERTIES + IMPORTED_LOCATION_DEBUG "${BZIP2_LIBRARY_DEBUG}") + endif() + + if(NOT BZIP2_LIBRARY_RELEASE AND NOT BZIP2_LIBRARY_DEBUG) + set_property(TARGET BZip2::BZip2 APPEND PROPERTY + IMPORTED_LOCATION "${BZIP2_LIBRARY}") + endif() + endif() endif () mark_as_advanced(BZIP2_INCLUDE_DIR) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 14:49:06 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 14:49:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1916-g2758bf0 Message-ID: <20160909184906.AEA69F56D1@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, next has been updated via 2758bf0877fb0c157aaa4b730e138bbad1bf12a3 (commit) via 87f057e62a474c724580262edc803e043920cf5b (commit) from afee770b4bba3997c10d188c400c7376ab3b36ec (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=2758bf0877fb0c157aaa4b730e138bbad1bf12a3 commit 2758bf0877fb0c157aaa4b730e138bbad1bf12a3 Merge: afee770 87f057e Author: Brad King AuthorDate: Fri Sep 9 14:49:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 14:49:05 2016 -0400 Merge topic 'drop-cygwin-binary' into next 87f057e6 Utilities/Release: Drop Cygwin binary https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87f057e62a474c724580262edc803e043920cf5b commit 87f057e62a474c724580262edc803e043920cf5b Author: Brad King AuthorDate: Fri Sep 9 14:43:11 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 14:48:10 2016 -0400 Utilities/Release: Drop Cygwin binary Cygwin has packaged CMake independently of upstream for a long time. See its [cygport](https://github.com/cygwinports/cmake). diff --git a/Source/CPack/cygwin.readme b/Source/CPack/cygwin.readme deleted file mode 100644 index c0cd4b9..0000000 --- a/Source/CPack/cygwin.readme +++ /dev/null @@ -1,69 +0,0 @@ -http://cygwin.com/setup.html - - -Need to produce two tar files: - -Source- - -- create subdirs -- copy src -- duplicate src -- configure files into duplicate src - CPack.cygwin-readme.in - CPack.cygwin-install.sh.in - CPack.setup.hint.in -- diff duplicate src and orig src -- write diff into toplevel -- create tar file call super class - -cmake-2.2.3-1 - - -1. a source release -cmake-2.2.3-2-src.tar.bz2 - -cmake-2.2.3-2.patch has cmake-2.2.3/CYGWIN-PATCHES/cmake.README cmake-2.2.3/CYGWIN-PATCHES/setup.hint -cmake-2.2.3-2.sh -> script to create cygwin release -cmake-2.2.3.tar.bz2 -> unmodified cmake sources for 2.2.3 - - - - - -2 a binary release -cmake-2.2.3-2.tar.bz2 - -normal binary release with use as the root of the tree: - -Here is the bootstrap command used: - - ${SOURCE_DIR}/bootstrap --prefix=/usr --datadir=/share/cmake-${VER} \ - --docdir=/share/doc/cmake-${VER} --mandir=/share/man - -CMAKE_DOC_DIR /share/doc/${PKG}-${VER} -CMAKE_MAN_DIR /share/man -CMAKE_DATA_DIR /share/${PKG}-${VER} - -Here is the directory stucture: - -usr/bin/cmake.exe -usr/share/doc/cmake-2.2.3/MANIFEST *** -usr/share/doc/Cygwin/cmake-2.2.3-2.README **** -usr/share/cmake-2.2.3/Modules - - - -usr/bin -usr/share/cmake-2.2.3/include -usr/share/cmake-2.2.3/Modules/Platform -usr/share/cmake-2.2.3/Modules -usr/share/cmake-2.2.3/Templates -usr/share/cmake-2.2.3 -usr/share/doc/cmake-2.2.3 -usr/share/doc/Cygwin -usr/share/doc -usr/share/man/man1 -usr/share/man -usr/share -usr - diff --git a/Templates/cygwin-package.sh.in b/Templates/cygwin-package.sh.in deleted file mode 100755 index 69b6c0f..0000000 --- a/Templates/cygwin-package.sh.in +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh - -# this is a sample shell script used for building a cmake -# based project for a cygwin setup package. - -# get the current directory -TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` - -# create build directory -mkdirs() -{ - ( - mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" - ) -} - -# cd into -# untar source tree and apply patch -prep() -{ - ( - cd "$TOP_DIR" && - tar xvfj @CPACK_PACKAGE_FILE_NAME at .tar.bz2 - patch -p0 < "@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .patch" && - mkdirs - ) -} - -# configure the build tree in .build directory -# of the source tree -conf() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - cmake .. - ) -} - -# build the package in the .build directory -build() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make && - make test - ) -} - -# clean the build tree -clean() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make clean - ) -} - -# create the package -pkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - cpack && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .tar.bz2 "$TOP_DIR" - ) -} - -# create the source package -spkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - cpack --config CPackSourceConfig.cmake && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 "$TOP_DIR" - ) -} - -# clean up -finish() -{ - ( - rm -rf "@CPACK_PACKAGE_FILE_NAME@" - ) -} - -case $1 in - prep) prep ; STATUS=$? ;; - mkdirs) mkdirs ; STATUS=$? ;; - conf) conf ; STATUS=$? ;; - build) build ; STATUS=$? ;; - clean) clean ; STATUS=$? ;; - package) pkg ; STATUS=$? ;; - pkg) pkg ; STATUS=$? ;; - src-package) spkg ; STATUS=$? ;; - spkg) spkg ; STATUS=$? ;; - finish) finish ; STATUS=$? ;; - all) ( - prep && conf && build && pkg && spkg && finish ; - STATUS=$? - ) ;; - *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;; -esac -exit ${STATUS} diff --git a/Utilities/Release/Cygwin/CMakeLists.txt b/Utilities/Release/Cygwin/CMakeLists.txt deleted file mode 100644 index 73a8220..0000000 --- a/Utilities/Release/Cygwin/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -file(GLOB INSTALLED_CURSES /usr/bin/cygncurses-*.dll) -set(MAX 0) -foreach(f ${INSTALLED_CURSES}) - if(NOT "${f}" MATCHES "\\+") - string(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}") - if(NUMBER GREATER MAX) - set(MAX ${NUMBER}) - endif() - endif() -endforeach() -string(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}") -set(CMAKE_NCURSES_VERSION "libncurses${MAX}") -message(STATUS "Using curses version: libncurses${MAX}") -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in" - "${CMake_BINARY_DIR}/setup.hint") -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in" - "${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README") -install_files(/share/doc/Cygwin FILES - ${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README - ) -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in" - ${CPACK_CYGWIN_BUILD_SCRIPT}) -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in" - ${CPACK_CYGWIN_PATCH_FILE}) - diff --git a/Utilities/Release/Cygwin/README.cygwin.in b/Utilities/Release/Cygwin/README.cygwin.in deleted file mode 100644 index 17cf2a1..0000000 --- a/Utilities/Release/Cygwin/README.cygwin.in +++ /dev/null @@ -1,42 +0,0 @@ -cmake --------------------------------------- -Runtime requirements: - cygwin-1.5.21(0.156/4/2) or newer - -Build requirements - cygwin-1.5.21(0.156/4/2) or newer - make - -Canonical homepage: - https://cmake.org - -Canonical download: - ftp://www.cmake.org/pub/cmake/ - ------------------------------------- - -Build instructions: - unpack @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 - if you use setup to install this src package, it will be - unpacked under /usr/src automatically - cd /usr/src - ./@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .sh all - -This will create: - /usr/src/@CPACK_PACKAGE_FILE_NAME at .tar.bz2 - /usr/src/@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 - -------------------------------------------- - -Port Notes: - -The directory /usr/share/@CPACK_PACKAGE_FILE_NAME@/include is purposely not -located at /usr/include/@CPACK_PACKAGE_FILE_NAME@ or /usr/include/cmake. The -files it contains are not meant for inclusion in any C or C++ program. -They are used for compiling dynamically loadable CMake commands inside -projects that provide them. CMake will automatically provide the -proper include path when the files are needed. - ------------------- - -Cygwin port maintained by: CMake Developers diff --git a/Utilities/Release/Cygwin/cygwin-package.sh.in b/Utilities/Release/Cygwin/cygwin-package.sh.in deleted file mode 100755 index dff27f1..0000000 --- a/Utilities/Release/Cygwin/cygwin-package.sh.in +++ /dev/null @@ -1,90 +0,0 @@ -TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` - -# create build directory -mkdirs() -{ - ( - mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" - ) -} - -# cd into -# untar source tree and apply patch -prep() -{ - ( - cd "$TOP_DIR" && - tar xvfj @CPACK_PACKAGE_FILE_NAME at .tar.bz2 - patch -p0 < "@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .patch" && - mkdirs - ) -} - -conf() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - ../bootstrap --parallel=2 - ) -} - -build() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make -j2 && - make test - ) -} - -clean() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make clean - ) -} - -pkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - ./bin/cpack && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .tar.bz2 "$TOP_DIR" - ) -} - -spkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - ./bin/cpack --config CPackSourceConfig.cmake && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 "$TOP_DIR" - ) -} - -finish() -{ - ( - rm -rf "@CPACK_PACKAGE_FILE_NAME@" - ) -} - -case $1 in - prep) prep ; STATUS=$? ;; - mkdirs) mkdirs ; STATUS=$? ;; - conf) conf ; STATUS=$? ;; - build) build ; STATUS=$? ;; - clean) clean ; STATUS=$? ;; - package) pkg ; STATUS=$? ;; - pkg) pkg ; STATUS=$? ;; - src-package) spkg ; STATUS=$? ;; - spkg) spkg ; STATUS=$? ;; - finish) finish ; STATUS=$? ;; - all) ( - prep && conf && build && pkg && spkg && finish ; - STATUS=$? - ) ;; - *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;; -esac -exit ${STATUS} diff --git a/Utilities/Release/Cygwin/cygwin-patch.diff.in b/Utilities/Release/Cygwin/cygwin-patch.diff.in deleted file mode 100644 index e69de29..0000000 diff --git a/Utilities/Release/Cygwin/cygwin-setup.hint.in b/Utilities/Release/Cygwin/cygwin-setup.hint.in deleted file mode 100644 index a2532fc..0000000 --- a/Utilities/Release/Cygwin/cygwin-setup.hint.in +++ /dev/null @@ -1,5 +0,0 @@ -# CMake setup.hint file for cygwin setup.exe program -category: Devel -requires: libgcc1 libidn11 @CMAKE_NCURSES_VERSION@ libstdc++6 -sdesc: "A cross platform build manager" -ldesc: "CMake is a cross platform build manager. It allows you to specify build parameters for C and C++ programs in a cross platform manner. For cygwin Makefiles will be generated. CMake is also capable of generating microsoft project files, nmake, and borland makefiles. CMake can also perform system inspection operations like finding installed libraries and header files." diff --git a/Utilities/Release/README b/Utilities/Release/README index 12eafe1..ed1d52e 100644 --- a/Utilities/Release/README +++ b/Utilities/Release/README @@ -15,7 +15,4 @@ Then as kitware at hythloth, using an up-to-date CMake: create-cmake-release.cmake: script to run to create release sh scripts Add or remove machines in create-cmake-release.cmake. -Cygwin -> directory that contains cpack cygwin package files used in - CMakeCPack.cmake - machine_release.cmake : config files for each machine diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index 192549e..7b144f1 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -12,7 +12,6 @@ set(RELEASE_SCRIPTS_BATCH_1 ) set(RELEASE_SCRIPTS_BATCH_2 - cygwin_release.cmake # Cygwin x86 win64_release.cmake # Windows x64 ) diff --git a/Utilities/Release/cygwin_release.cmake b/Utilities/Release/cygwin_release.cmake deleted file mode 100644 index ca3e794..0000000 --- a/Utilities/Release/cygwin_release.cmake +++ /dev/null @@ -1,32 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseCygwin") -set(PROCESSORS 9) -set(BOOTSTRAP_ARGS "") -set(MAKE_PROGRAM "make") -set(MAKE "${MAKE_PROGRAM} -j8") -set(HOST dash2win64) -set(CPACK_BINARY_GENERATORS "CygwinBinary") -set(CPACK_SOURCE_GENERATORS "CygwinSource") -set(MAKE_PROGRAM "make") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE -CTEST_TEST_TIMEOUT:STRING=7200 -DART_TESTING_TIMEOUT:STRING=7200 -SPHINX_HTML:BOOL=ON -SPHINX_MAN:BOOL=ON -CMake_INSTALL_DEPENDENCIES:BOOL=ON -") -set(CXX g++) -set(CC gcc) -set(GIT_EXTRA "git config core.autocrlf false") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) - -# WARNING: Temporary fix!! This exclusion of the ExternalProject test -# is temporary until we can set up a new cygwin build machine. -# It only fails because of cygwin/non-cygwin "svn" mismatches in this -# particular environment. This is less than ideal, but at least it -# allows us to produce cygwin builds in the short term. -set(EXTRA_CTEST_ARGS "-E ExternalProject") - -set(LOCAL_DIR cygwin) - -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 0d9c784..0db89b5 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -108,10 +108,6 @@ foreach(gen ${generators}) if("${gen}" STREQUAL "TBZ2") set(SUFFIXES ${SUFFIXES} "*.tar.bz2") endif() - if("${gen}" MATCHES "Cygwin") - set(SUFFIXES ${SUFFIXES} "*.tar.bz2") - set(extra_files setup.hint) - endif() if("${gen}" STREQUAL "TZ") set(SUFFIXES ${SUFFIXES} "*.tar.Z") endif() ----------------------------------------------------------------------- Summary of changes: Source/CPack/cygwin.readme | 69 ----------------- Templates/cygwin-package.sh.in | 103 ------------------------- Utilities/Release/Cygwin/CMakeLists.txt | 25 ------ Utilities/Release/Cygwin/README.cygwin.in | 42 ---------- Utilities/Release/Cygwin/cygwin-package.sh.in | 90 --------------------- Utilities/Release/Cygwin/cygwin-setup.hint.in | 5 -- Utilities/Release/README | 3 - Utilities/Release/create-cmake-release.cmake | 1 - Utilities/Release/cygwin_release.cmake | 32 -------- Utilities/Release/release_cmake.cmake | 4 - 10 files changed, 374 deletions(-) delete mode 100644 Source/CPack/cygwin.readme delete mode 100755 Templates/cygwin-package.sh.in delete mode 100644 Utilities/Release/Cygwin/CMakeLists.txt delete mode 100644 Utilities/Release/Cygwin/README.cygwin.in delete mode 100755 Utilities/Release/Cygwin/cygwin-package.sh.in delete mode 100644 Utilities/Release/Cygwin/cygwin-patch.diff.in delete mode 100644 Utilities/Release/Cygwin/cygwin-setup.hint.in delete mode 100644 Utilities/Release/cygwin_release.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 9 15:07:18 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 9 Sep 2016 15:07:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1918-ge0aa392 Message-ID: <20160909190718.D9400F5D6E@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, next has been updated via e0aa392d59fed43a0de907fc31518adc8ca1d74e (commit) via f74feae77f3e0eba265c0255af8cddb93b4482df (commit) from 2758bf0877fb0c157aaa4b730e138bbad1bf12a3 (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=e0aa392d59fed43a0de907fc31518adc8ca1d74e commit e0aa392d59fed43a0de907fc31518adc8ca1d74e Merge: 2758bf0 f74feae Author: Brad King AuthorDate: Fri Sep 9 15:07:18 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 15:07:18 2016 -0400 Merge topic 'geh-failure-tests' into next f74feae7 Tests: Fix GenerateExportHeader failure tests on Cygwin https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f74feae77f3e0eba265c0255af8cddb93b4482df commit f74feae77f3e0eba265c0255af8cddb93b4482df Author: Brad King AuthorDate: Fri Sep 9 15:02:23 2016 -0400 Commit: Brad King CommitDate: Fri Sep 9 15:03:04 2016 -0400 Tests: Fix GenerateExportHeader failure tests on Cygwin They need to be conditioned just as Windows. diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index 4ba6abd..db1ab49 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -72,17 +72,17 @@ int main() libshared::ExportedClass l; l.method(); l.method_deprecated(); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) l.method_excluded(); #else - //l.method_excluded(); LINK ERROR (NOT WIN32) + //l.method_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN) #endif use_int(l.data); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) use_int(l.data_excluded); #else - //use_int(l.data_excluded); LINK ERROR (NOT WIN32) + //use_int(l.data_excluded); LINK ERROR (NOT WIN32 AND NOT CYGWIN) #endif } ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From bill.hoffman at kitware.com Fri Sep 9 16:53:45 2016 From: bill.hoffman at kitware.com (Bill Hoffman) Date: Fri, 9 Sep 2016 16:53:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1922-gf8fc47d Message-ID: <20160909205345.951B8F5AE0@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, next has been updated via f8fc47db59a6cbd16a4fdd3238e82f8a5561631f (commit) via e42471b9d4e4e99f38200a87121f46a7991510cd (commit) via 9e8dc649129b8ec711d6fb854d4f9576c0dd4dc9 (commit) via 7d2e9dd88c154707c7434c27edb34de948a51d60 (commit) from e0aa392d59fed43a0de907fc31518adc8ca1d74e (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=f8fc47db59a6cbd16a4fdd3238e82f8a5561631f commit f8fc47db59a6cbd16a4fdd3238e82f8a5561631f Merge: e0aa392 e42471b Author: Bill Hoffman AuthorDate: Fri Sep 9 16:53:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 9 16:53:44 2016 -0400 Merge topic 'extend_matlab_unit_test' into next e42471b9 remove stray } 9e8dc649 use single value args 7d2e9dd8 Extend matlab_add_unit_test to run arbitrary code for the test. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e42471b9d4e4e99f38200a87121f46a7991510cd commit e42471b9d4e4e99f38200a87121f46a7991510cd Author: Bill Hoffman AuthorDate: Fri Sep 9 16:33:36 2016 -0400 Commit: Bill Hoffman CommitDate: Fri Sep 9 16:33:36 2016 -0400 remove stray } diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index fd222fd..0462bd0 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -788,7 +788,7 @@ function(matlab_add_unit_test) add_test(NAME ${${prefix}_NAME} COMMAND ${CMAKE_COMMAND} "-Dtest_name=${${prefix}_NAME}" - "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}}" + "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}" "-Dtest_timeout=${${prefix}_TIMEOUT}" "-Doutput_directory=${_matlab_temporary_folder}" "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" @@ -796,7 +796,7 @@ function(matlab_add_unit_test) "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" - "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}}" + "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}" "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e8dc649129b8ec711d6fb854d4f9576c0dd4dc9 commit 9e8dc649129b8ec711d6fb854d4f9576c0dd4dc9 Author: Bill Hoffman AuthorDate: Fri Sep 9 14:44:48 2016 -0400 Commit: Bill Hoffman CommitDate: Fri Sep 9 14:44:48 2016 -0400 use single value args diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 7c03635..fd222fd 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -773,9 +773,10 @@ function(matlab_add_unit_test) endif() set(options NO_UNITTEST_FRAMEWORK) - set(oneValueArgs NAME UNITTEST_FILE TIMEOUT WORKING_DIRECTORY) - set(multiValueArgs UNITTEST_PRECOMMAND ADDITIONAL_PATH - MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS CUSTOM_TEST_COMMAND) + set(oneValueArgs NAME UNITTEST_FILE TIMEOUT WORKING_DIRECTORY + UNITTEST_PRECOMMAND CUSTOM_TEST_COMMAND) + set(multiValueArgs ADDITIONAL_PATH MATLAB_ADDITIONAL_STARTUP_OPTIONS + TEST_ARGS) set(prefix _matlab_unittest_prefix) cmake_parse_arguments(PARSE_ARGV 0 ${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d2e9dd88c154707c7434c27edb34de948a51d60 commit 7d2e9dd88c154707c7434c27edb34de948a51d60 Author: Bill Hoffman AuthorDate: Tue Aug 30 15:02:35 2016 -0400 Commit: Bill Hoffman CommitDate: Fri Sep 9 14:41:53 2016 -0400 Extend matlab_add_unit_test to run arbitrary code for the test. This commit allows a custom matlab set of commands to be run as the test instead of runtests('matlab_file_name'). It also escapes strings for matlab commands to allow for complicated matlab commands to be passed into the tests. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index b501599..7c03635 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -635,7 +635,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve set(devnull INPUT_FILE NUL) endif() - # timeout set to 30 seconds, in case it does not start + # timeout set to 120 seconds, in case it does not start # note as said before OUTPUT_VARIABLE cannot be used in a platform # independent manner however, not setting it would flush the output of Matlab # in the current console (unix variant) @@ -644,12 +644,17 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve OUTPUT_VARIABLE _matlab_version_from_cmd_dummy RESULT_VARIABLE _matlab_result_version_call ERROR_VARIABLE _matlab_result_version_call_error - TIMEOUT 30 + TIMEOUT 120 WORKING_DIRECTORY "${_matlab_temporary_folder}" ${devnull} ) - - + if("${_matlab_result_version_call}" MATCHES "timeout") + if(MATLAB_FIND_DEBUG) + message(WARNING "[MATLAB] Unable to determine the version of Matlab." + " Matlab call timed out after 120 seconds.") + endif() + return() + endif() if(${_matlab_result_version_call}) if(MATLAB_FIND_DEBUG) message(WARNING "[MATLAB] Unable to determine the version of Matlab. Matlab call returned with error ${_matlab_result_version_call}.") @@ -698,7 +703,6 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve endfunction() - #.rst: # .. command:: matlab_add_unit_test # @@ -720,6 +724,7 @@ endfunction() # matlab_add_unit_test( # NAME # UNITTEST_FILE matlab_file_containing_unittest.m +# [CUSTOM_MATLAB_COMMAND matlab_command_to_run_as_test] # [UNITTEST_PRECOMMAND matlab_command_to_run] # [TIMEOUT timeout] # [ADDITIONAL_PATH path1 [path2 ...]] @@ -735,6 +740,11 @@ endfunction() # ``UNITTEST_FILE`` # the matlab unittest file. Its path will be automatically # added to the Matlab path. +# ``CUSTOM_MATLAB_COMMAND`` +# Matlab script command to run as the test. +# IIf this is not set, then the following is run: +# "runtests('matlab_file_name'), exit(max([ans(1,:).Failed])) +# matlab_file_name comes from UNITTEST_FILE without the .m. # ``UNITTEST_PRECOMMAND`` # Matlab script command to be ran before the file # containing the test (eg. GPU device initialisation based on CMake @@ -748,6 +758,7 @@ endfunction() # ``MATLAB_ADDITIONAL_STARTUP_OPTIONS`` # a list of additional option in order # to run Matlab from the command line. +# -nosplash -nodesktop -nodisplay are always added. # ``TEST_ARGS`` # Additional options provided to the add_test command. These # options are added to the default options (eg. "CONFIGURATIONS Release") @@ -762,11 +773,12 @@ function(matlab_add_unit_test) endif() set(options NO_UNITTEST_FRAMEWORK) - set(oneValueArgs NAME UNITTEST_PRECOMMAND UNITTEST_FILE TIMEOUT) - set(multiValueArgs ADDITIONAL_PATH MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS) + set(oneValueArgs NAME UNITTEST_FILE TIMEOUT WORKING_DIRECTORY) + set(multiValueArgs UNITTEST_PRECOMMAND ADDITIONAL_PATH + MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS CUSTOM_TEST_COMMAND) set(prefix _matlab_unittest_prefix) - cmake_parse_arguments(${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + cmake_parse_arguments(PARSE_ARGV 0 ${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ) if(NOT ${prefix}_NAME) message(FATAL_ERROR "[MATLAB] The Matlab test name cannot be empty") @@ -774,15 +786,17 @@ function(matlab_add_unit_test) add_test(NAME ${${prefix}_NAME} COMMAND ${CMAKE_COMMAND} - -Dtest_name=${${prefix}_NAME} - -Dadditional_paths=${${prefix}_ADDITIONAL_PATH} - -Dtest_timeout=${${prefix}_TIMEOUT} - -Doutput_directory=${_matlab_temporary_folder} - -DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM} - -Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK} - -DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS} - -Dunittest_file_to_run=${${prefix}_UNITTEST_FILE} - -Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND} + "-Dtest_name=${${prefix}_NAME}" + "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}}" + "-Dtest_timeout=${${prefix}_TIMEOUT}" + "-Doutput_directory=${_matlab_temporary_folder}" + "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" + "-DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM}" + "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" + "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" + "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" + "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}}" + "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} ${${prefix}_UNPARSED_ARGUMENTS} @@ -1034,7 +1048,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_known_version matlab_f if(${list_of_all_versions_length} GREATER 0) list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) else() - set(_matlab_version_tmp "") + set(_matlab_version_tmp "unknown") endif() # set the version into the cache diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index 0ef4c3e..1045be8 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -23,11 +23,12 @@ # -DMatlab_PROGRAM=matlab_exe_location # -DMatlab_ADDITIONNAL_STARTUP_OPTIONS="" # -Dtest_name=name_of_the_test +# -Dcustom_Matlab_test_command="" # -Dcmd_to_run_before_test="" # -Dunittest_file_to_run # -P FindMatlab_TestsRedirect.cmake -set(Matlab_UNIT_TESTS_CMD -nosplash -nojvm -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) +set(Matlab_UNIT_TESTS_CMD -nosplash -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) if(WIN32) set(Matlab_UNIT_TESTS_CMD ${Matlab_UNIT_TESTS_CMD} -wait) endif() @@ -36,6 +37,13 @@ if(NOT test_timeout) set(test_timeout 180) endif() +# If timeout is -1, then do not put a timeout on the execute_process +if(test_timeout EQUAL -1) + set(test_timeout "") +else() + set(test_timeout TIMEOUT ${test_timeout}) +endif() + if(NOT cmd_to_run_before_test) set(cmd_to_run_before_test) endif() @@ -50,16 +58,27 @@ foreach(s IN LISTS additional_paths) endif() endforeach() -set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") +if(custom_Matlab_test_command) + set(unittest_to_run "${custom_Matlab_test_command}") +else() + set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") +endif() + + if(no_unittest_framework) set(unittest_to_run "try, ${unittest_file_to_run_name}, catch err, disp('An exception has been thrown during the execution'), disp(err), disp(err.stack), exit(1), end, exit(0)") endif() set(Matlab_SCRIPT_TO_RUN - "addpath(${concat_string}), path, ${cmd_to_run_before_test}, ${unittest_to_run}" + "addpath(${concat_string}); ${cmd_to_run_before_test}; ${unittest_to_run}" ) -set(Matlab_LOG_FILE "${output_directory}/${test_name}.log") +if(NOT working_directory) + set(working_directory "${output_directory}") +endif() + +string(REPLACE "/" "_" clean_test_name "${test_name}") +set(Matlab_LOG_FILE "${output_directory}/${clean_test_name}.log") set(devnull) if(UNIX) @@ -69,11 +88,11 @@ elseif(WIN32) endif() execute_process( - COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${test_name}.log" -r "${Matlab_SCRIPT_TO_RUN}" + COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${Matlab_LOG_FILE}" -r "${Matlab_SCRIPT_TO_RUN}" RESULT_VARIABLE res - TIMEOUT ${test_timeout} + ${test_timeout} OUTPUT_QUIET # we do not want the output twice - WORKING_DIRECTORY "${output_directory}" + WORKING_DIRECTORY ${working_directory} ${devnull} ) @@ -87,5 +106,5 @@ message("Matlab test ${name_of_the_test} output:\n${matlab_log_content}") # if w if(NOT (res EQUAL 0)) - message( FATAL_ERROR "[MATLAB] TEST FAILED" ) + message( FATAL_ERROR "[MATLAB] TEST FAILED Matlab returned ${res}" ) endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 51 ++++++++++++++++++++++++------------- Modules/MatlabTestsRedirect.cmake | 35 +++++++++++++++++++------ 2 files changed, 60 insertions(+), 26 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Sep 10 00:01:12 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 10 Sep 2016 00:01:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-901-gd90432c Message-ID: <20160910040112.9B4E1F5B0D@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 d90432c335ae4695c520d304c385fb75c8ab0956 (commit) from d5e4cdc0f8c846cdf17f3276d77d352a7644bc88 (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=d90432c335ae4695c520d304c385fb75c8ab0956 commit d90432c335ae4695c520d304c385fb75c8ab0956 Author: Kitware Robot AuthorDate: Sat Sep 10 00:01:08 2016 -0400 Commit: Kitware Robot CommitDate: Sat Sep 10 00:01:08 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a0020d1..0ba8915 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 6) -set(CMake_VERSION_PATCH 20160909) +set(CMake_VERSION_PATCH 20160910) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Sat Sep 10 08:18:59 2016 From: brad.king at kitware.com (Brad King) Date: Sat, 10 Sep 2016 08:18:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1924-ga7316d4 Message-ID: <20160910121859.4E896F39AB@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, next has been updated via a7316d4696dc3e6b4d5fae8b09132f0821c2e810 (commit) via 70324a8882b6a93aef68549b3ccbb427feb908b2 (commit) from f8fc47db59a6cbd16a4fdd3238e82f8a5561631f (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=a7316d4696dc3e6b4d5fae8b09132f0821c2e810 commit a7316d4696dc3e6b4d5fae8b09132f0821c2e810 Merge: f8fc47d 70324a8 Author: Brad King AuthorDate: Sat Sep 10 08:18:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Sat Sep 10 08:18:58 2016 -0400 Merge topic 'drop-cygwin-binary' into next 70324a88 fixup! Utilities/Release: Drop Cygwin binary https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70324a8882b6a93aef68549b3ccbb427feb908b2 commit 70324a8882b6a93aef68549b3ccbb427feb908b2 Author: Brad King AuthorDate: Sat Sep 10 08:18:43 2016 -0400 Commit: Brad King CommitDate: Sat Sep 10 08:18:43 2016 -0400 fixup! Utilities/Release: Drop Cygwin binary diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index 4d7c6fd..47bb7cf 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -190,31 +190,6 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") endif() - # cygwin specific packaging stuff - if(CYGWIN) - # setup the cygwin package name - set(CPACK_PACKAGE_NAME cmake) - # setup the name of the package for cygwin cmake-2.4.3 - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CMake_VERSION}") - # the source has the same name as the binary - set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) - # Create a cygwin version number in case there are changes for cygwin - # that are not reflected upstream in CMake - set(CPACK_CYGWIN_PATCH_NUMBER 1 CACHE STRING "patch number for CMake cygwin packages") - mark_as_advanced(CPACK_CYGWIN_PATCH_NUMBER) - # These files are required by the cmCPackCygwinSourceGenerator and the files - # put into the release tar files. - set(CPACK_CYGWIN_BUILD_SCRIPT - "${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.sh") - set(CPACK_CYGWIN_PATCH_FILE - "${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.patch") - # include the sub directory cmake file for cygwin that - # configures some files and adds some install targets - # this file uses some of the package file name variables - include(Utilities/Release/Cygwin/CMakeLists.txt) - endif() - set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991") if(MSVC AND NOT "$ENV{WIX}" STREQUAL "") ----------------------------------------------------------------------- Summary of changes: CMakeCPack.cmake | 25 ------------------------- 1 file changed, 25 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Sep 11 00:01:11 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 11 Sep 2016 00:01:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-902-g4e3166a Message-ID: <20160911040117.1F67CF5AD2@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 4e3166ae1a2f83ee7917a5ac0b9b98da38d8fd7c (commit) from d90432c335ae4695c520d304c385fb75c8ab0956 (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=4e3166ae1a2f83ee7917a5ac0b9b98da38d8fd7c commit 4e3166ae1a2f83ee7917a5ac0b9b98da38d8fd7c Author: Kitware Robot AuthorDate: Sun Sep 11 00:01:06 2016 -0400 Commit: Kitware Robot CommitDate: Sun Sep 11 00:01:06 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0ba8915..2640266 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 6) -set(CMake_VERSION_PATCH 20160910) +set(CMake_VERSION_PATCH 20160911) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Sun Sep 11 14:32:17 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sun, 11 Sep 2016 14:32:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1926-g997dd7f Message-ID: <20160911183217.2E7B4F5BE7@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, next has been updated via 997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 (commit) via 8154a4b097286c61d0a98703bd5662dd79bd9b97 (commit) from a7316d4696dc3e6b4d5fae8b09132f0821c2e810 (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=997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 commit 997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 Merge: a7316d4 8154a4b Author: Daniel Pfeifer AuthorDate: Sun Sep 11 14:32:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Sun Sep 11 14:32:15 2016 -0400 Merge topic 'clang-tidy' into next 8154a4b0 fixup! cmSystemTools: simplify boolean expressions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8154a4b097286c61d0a98703bd5662dd79bd9b97 commit 8154a4b097286c61d0a98703bd5662dd79bd9b97 Author: Daniel Pfeifer AuthorDate: Sun Sep 11 20:31:43 2016 +0200 Commit: Daniel Pfeifer CommitDate: Sun Sep 11 20:31:43 2016 +0200 fixup! cmSystemTools: simplify boolean expressions diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ae0323b..7352217 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1766,7 +1766,7 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) if (!GetFileTime(hFrom, &timeCreation, &timeLastAccess, &timeLastWrite)) { return false; } - return SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite); + return SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite) != 0; #else struct stat fromStat; if (stat(fromFile, &fromStat) < 0) { @@ -1824,7 +1824,7 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t) return false; } return SetFileTime(h, &t->timeCreation, &t->timeLastAccess, - &t->timeLastWrite); + &t->timeLastWrite) != 0; #else return utime(fname, &t->timeBuf) >= 0; #endif ----------------------------------------------------------------------- Summary of changes: Source/cmSystemTools.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Sep 12 00:01:10 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 12 Sep 2016 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-903-g5088765 Message-ID: <20160912040111.0844BF5759@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 5088765a2c3620bc652db538ae0054941cc23406 (commit) from 4e3166ae1a2f83ee7917a5ac0b9b98da38d8fd7c (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=5088765a2c3620bc652db538ae0054941cc23406 commit 5088765a2c3620bc652db538ae0054941cc23406 Author: Kitware Robot AuthorDate: Mon Sep 12 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Mon Sep 12 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2640266..e77c982 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 6) -set(CMake_VERSION_PATCH 20160911) +set(CMake_VERSION_PATCH 20160912) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:23:05 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:23:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1928-ga70a613 Message-ID: <20160912132305.B35BFF52FC@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, next has been updated via a70a6138c3c27f2772990020fdebd36004b810c0 (commit) via db915a3785186d7fe208825cc47121fbf377aa21 (commit) from 997dd7fe2e6cb1369d6c8435bf34fd25f51728d9 (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=a70a6138c3c27f2772990020fdebd36004b810c0 commit a70a6138c3c27f2772990020fdebd36004b810c0 Merge: 997dd7f db915a3 Author: Brad King AuthorDate: Mon Sep 12 09:23:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:23:04 2016 -0400 Merge topic 'drop-cygwin-binary' into next db915a37 Utilities/Release: Drop Cygwin binary https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db915a3785186d7fe208825cc47121fbf377aa21 commit db915a3785186d7fe208825cc47121fbf377aa21 Author: Brad King AuthorDate: Fri Sep 9 14:43:11 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 09:22:50 2016 -0400 Utilities/Release: Drop Cygwin binary Cygwin has packaged CMake independently of upstream for a long time. See its [cygport](https://github.com/cygwinports/cmake). diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index 4d7c6fd..47bb7cf 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -190,31 +190,6 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") endif() - # cygwin specific packaging stuff - if(CYGWIN) - # setup the cygwin package name - set(CPACK_PACKAGE_NAME cmake) - # setup the name of the package for cygwin cmake-2.4.3 - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CMake_VERSION}") - # the source has the same name as the binary - set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) - # Create a cygwin version number in case there are changes for cygwin - # that are not reflected upstream in CMake - set(CPACK_CYGWIN_PATCH_NUMBER 1 CACHE STRING "patch number for CMake cygwin packages") - mark_as_advanced(CPACK_CYGWIN_PATCH_NUMBER) - # These files are required by the cmCPackCygwinSourceGenerator and the files - # put into the release tar files. - set(CPACK_CYGWIN_BUILD_SCRIPT - "${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.sh") - set(CPACK_CYGWIN_PATCH_FILE - "${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.patch") - # include the sub directory cmake file for cygwin that - # configures some files and adds some install targets - # this file uses some of the package file name variables - include(Utilities/Release/Cygwin/CMakeLists.txt) - endif() - set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991") if(MSVC AND NOT "$ENV{WIX}" STREQUAL "") diff --git a/Source/CPack/cygwin.readme b/Source/CPack/cygwin.readme deleted file mode 100644 index c0cd4b9..0000000 --- a/Source/CPack/cygwin.readme +++ /dev/null @@ -1,69 +0,0 @@ -http://cygwin.com/setup.html - - -Need to produce two tar files: - -Source- - -- create subdirs -- copy src -- duplicate src -- configure files into duplicate src - CPack.cygwin-readme.in - CPack.cygwin-install.sh.in - CPack.setup.hint.in -- diff duplicate src and orig src -- write diff into toplevel -- create tar file call super class - -cmake-2.2.3-1 - - -1. a source release -cmake-2.2.3-2-src.tar.bz2 - -cmake-2.2.3-2.patch has cmake-2.2.3/CYGWIN-PATCHES/cmake.README cmake-2.2.3/CYGWIN-PATCHES/setup.hint -cmake-2.2.3-2.sh -> script to create cygwin release -cmake-2.2.3.tar.bz2 -> unmodified cmake sources for 2.2.3 - - - - - -2 a binary release -cmake-2.2.3-2.tar.bz2 - -normal binary release with use as the root of the tree: - -Here is the bootstrap command used: - - ${SOURCE_DIR}/bootstrap --prefix=/usr --datadir=/share/cmake-${VER} \ - --docdir=/share/doc/cmake-${VER} --mandir=/share/man - -CMAKE_DOC_DIR /share/doc/${PKG}-${VER} -CMAKE_MAN_DIR /share/man -CMAKE_DATA_DIR /share/${PKG}-${VER} - -Here is the directory stucture: - -usr/bin/cmake.exe -usr/share/doc/cmake-2.2.3/MANIFEST *** -usr/share/doc/Cygwin/cmake-2.2.3-2.README **** -usr/share/cmake-2.2.3/Modules - - - -usr/bin -usr/share/cmake-2.2.3/include -usr/share/cmake-2.2.3/Modules/Platform -usr/share/cmake-2.2.3/Modules -usr/share/cmake-2.2.3/Templates -usr/share/cmake-2.2.3 -usr/share/doc/cmake-2.2.3 -usr/share/doc/Cygwin -usr/share/doc -usr/share/man/man1 -usr/share/man -usr/share -usr - diff --git a/Templates/cygwin-package.sh.in b/Templates/cygwin-package.sh.in deleted file mode 100755 index 69b6c0f..0000000 --- a/Templates/cygwin-package.sh.in +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh - -# this is a sample shell script used for building a cmake -# based project for a cygwin setup package. - -# get the current directory -TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` - -# create build directory -mkdirs() -{ - ( - mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" - ) -} - -# cd into -# untar source tree and apply patch -prep() -{ - ( - cd "$TOP_DIR" && - tar xvfj @CPACK_PACKAGE_FILE_NAME at .tar.bz2 - patch -p0 < "@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .patch" && - mkdirs - ) -} - -# configure the build tree in .build directory -# of the source tree -conf() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - cmake .. - ) -} - -# build the package in the .build directory -build() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make && - make test - ) -} - -# clean the build tree -clean() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make clean - ) -} - -# create the package -pkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - cpack && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .tar.bz2 "$TOP_DIR" - ) -} - -# create the source package -spkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - cpack --config CPackSourceConfig.cmake && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 "$TOP_DIR" - ) -} - -# clean up -finish() -{ - ( - rm -rf "@CPACK_PACKAGE_FILE_NAME@" - ) -} - -case $1 in - prep) prep ; STATUS=$? ;; - mkdirs) mkdirs ; STATUS=$? ;; - conf) conf ; STATUS=$? ;; - build) build ; STATUS=$? ;; - clean) clean ; STATUS=$? ;; - package) pkg ; STATUS=$? ;; - pkg) pkg ; STATUS=$? ;; - src-package) spkg ; STATUS=$? ;; - spkg) spkg ; STATUS=$? ;; - finish) finish ; STATUS=$? ;; - all) ( - prep && conf && build && pkg && spkg && finish ; - STATUS=$? - ) ;; - *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;; -esac -exit ${STATUS} diff --git a/Utilities/Release/Cygwin/CMakeLists.txt b/Utilities/Release/Cygwin/CMakeLists.txt deleted file mode 100644 index 73a8220..0000000 --- a/Utilities/Release/Cygwin/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -file(GLOB INSTALLED_CURSES /usr/bin/cygncurses-*.dll) -set(MAX 0) -foreach(f ${INSTALLED_CURSES}) - if(NOT "${f}" MATCHES "\\+") - string(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}") - if(NUMBER GREATER MAX) - set(MAX ${NUMBER}) - endif() - endif() -endforeach() -string(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}") -set(CMAKE_NCURSES_VERSION "libncurses${MAX}") -message(STATUS "Using curses version: libncurses${MAX}") -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in" - "${CMake_BINARY_DIR}/setup.hint") -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in" - "${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README") -install_files(/share/doc/Cygwin FILES - ${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README - ) -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in" - ${CPACK_CYGWIN_BUILD_SCRIPT}) -configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in" - ${CPACK_CYGWIN_PATCH_FILE}) - diff --git a/Utilities/Release/Cygwin/README.cygwin.in b/Utilities/Release/Cygwin/README.cygwin.in deleted file mode 100644 index 17cf2a1..0000000 --- a/Utilities/Release/Cygwin/README.cygwin.in +++ /dev/null @@ -1,42 +0,0 @@ -cmake --------------------------------------- -Runtime requirements: - cygwin-1.5.21(0.156/4/2) or newer - -Build requirements - cygwin-1.5.21(0.156/4/2) or newer - make - -Canonical homepage: - https://cmake.org - -Canonical download: - ftp://www.cmake.org/pub/cmake/ - ------------------------------------- - -Build instructions: - unpack @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 - if you use setup to install this src package, it will be - unpacked under /usr/src automatically - cd /usr/src - ./@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .sh all - -This will create: - /usr/src/@CPACK_PACKAGE_FILE_NAME at .tar.bz2 - /usr/src/@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 - -------------------------------------------- - -Port Notes: - -The directory /usr/share/@CPACK_PACKAGE_FILE_NAME@/include is purposely not -located at /usr/include/@CPACK_PACKAGE_FILE_NAME@ or /usr/include/cmake. The -files it contains are not meant for inclusion in any C or C++ program. -They are used for compiling dynamically loadable CMake commands inside -projects that provide them. CMake will automatically provide the -proper include path when the files are needed. - ------------------- - -Cygwin port maintained by: CMake Developers diff --git a/Utilities/Release/Cygwin/cygwin-package.sh.in b/Utilities/Release/Cygwin/cygwin-package.sh.in deleted file mode 100755 index dff27f1..0000000 --- a/Utilities/Release/Cygwin/cygwin-package.sh.in +++ /dev/null @@ -1,90 +0,0 @@ -TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` - -# create build directory -mkdirs() -{ - ( - mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" - ) -} - -# cd into -# untar source tree and apply patch -prep() -{ - ( - cd "$TOP_DIR" && - tar xvfj @CPACK_PACKAGE_FILE_NAME at .tar.bz2 - patch -p0 < "@CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .patch" && - mkdirs - ) -} - -conf() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - ../bootstrap --parallel=2 - ) -} - -build() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make -j2 && - make test - ) -} - -clean() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - make clean - ) -} - -pkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - ./bin/cpack && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at .tar.bz2 "$TOP_DIR" - ) -} - -spkg() -{ - ( - cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && - ./bin/cpack --config CPackSourceConfig.cmake && - mv @CPACK_PACKAGE_FILE_NAME at -@CPACK_CYGWIN_PATCH_NUMBER at -src.tar.bz2 "$TOP_DIR" - ) -} - -finish() -{ - ( - rm -rf "@CPACK_PACKAGE_FILE_NAME@" - ) -} - -case $1 in - prep) prep ; STATUS=$? ;; - mkdirs) mkdirs ; STATUS=$? ;; - conf) conf ; STATUS=$? ;; - build) build ; STATUS=$? ;; - clean) clean ; STATUS=$? ;; - package) pkg ; STATUS=$? ;; - pkg) pkg ; STATUS=$? ;; - src-package) spkg ; STATUS=$? ;; - spkg) spkg ; STATUS=$? ;; - finish) finish ; STATUS=$? ;; - all) ( - prep && conf && build && pkg && spkg && finish ; - STATUS=$? - ) ;; - *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;; -esac -exit ${STATUS} diff --git a/Utilities/Release/Cygwin/cygwin-patch.diff.in b/Utilities/Release/Cygwin/cygwin-patch.diff.in deleted file mode 100644 index e69de29..0000000 diff --git a/Utilities/Release/Cygwin/cygwin-setup.hint.in b/Utilities/Release/Cygwin/cygwin-setup.hint.in deleted file mode 100644 index a2532fc..0000000 --- a/Utilities/Release/Cygwin/cygwin-setup.hint.in +++ /dev/null @@ -1,5 +0,0 @@ -# CMake setup.hint file for cygwin setup.exe program -category: Devel -requires: libgcc1 libidn11 @CMAKE_NCURSES_VERSION@ libstdc++6 -sdesc: "A cross platform build manager" -ldesc: "CMake is a cross platform build manager. It allows you to specify build parameters for C and C++ programs in a cross platform manner. For cygwin Makefiles will be generated. CMake is also capable of generating microsoft project files, nmake, and borland makefiles. CMake can also perform system inspection operations like finding installed libraries and header files." diff --git a/Utilities/Release/README b/Utilities/Release/README index 12eafe1..ed1d52e 100644 --- a/Utilities/Release/README +++ b/Utilities/Release/README @@ -15,7 +15,4 @@ Then as kitware at hythloth, using an up-to-date CMake: create-cmake-release.cmake: script to run to create release sh scripts Add or remove machines in create-cmake-release.cmake. -Cygwin -> directory that contains cpack cygwin package files used in - CMakeCPack.cmake - machine_release.cmake : config files for each machine diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index 192549e..7b144f1 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -12,7 +12,6 @@ set(RELEASE_SCRIPTS_BATCH_1 ) set(RELEASE_SCRIPTS_BATCH_2 - cygwin_release.cmake # Cygwin x86 win64_release.cmake # Windows x64 ) diff --git a/Utilities/Release/cygwin_release.cmake b/Utilities/Release/cygwin_release.cmake deleted file mode 100644 index ca3e794..0000000 --- a/Utilities/Release/cygwin_release.cmake +++ /dev/null @@ -1,32 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseCygwin") -set(PROCESSORS 9) -set(BOOTSTRAP_ARGS "") -set(MAKE_PROGRAM "make") -set(MAKE "${MAKE_PROGRAM} -j8") -set(HOST dash2win64) -set(CPACK_BINARY_GENERATORS "CygwinBinary") -set(CPACK_SOURCE_GENERATORS "CygwinSource") -set(MAKE_PROGRAM "make") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE -CTEST_TEST_TIMEOUT:STRING=7200 -DART_TESTING_TIMEOUT:STRING=7200 -SPHINX_HTML:BOOL=ON -SPHINX_MAN:BOOL=ON -CMake_INSTALL_DEPENDENCIES:BOOL=ON -") -set(CXX g++) -set(CC gcc) -set(GIT_EXTRA "git config core.autocrlf false") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) - -# WARNING: Temporary fix!! This exclusion of the ExternalProject test -# is temporary until we can set up a new cygwin build machine. -# It only fails because of cygwin/non-cygwin "svn" mismatches in this -# particular environment. This is less than ideal, but at least it -# allows us to produce cygwin builds in the short term. -set(EXTRA_CTEST_ARGS "-E ExternalProject") - -set(LOCAL_DIR cygwin) - -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 0d9c784..0db89b5 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -108,10 +108,6 @@ foreach(gen ${generators}) if("${gen}" STREQUAL "TBZ2") set(SUFFIXES ${SUFFIXES} "*.tar.bz2") endif() - if("${gen}" MATCHES "Cygwin") - set(SUFFIXES ${SUFFIXES} "*.tar.bz2") - set(extra_files setup.hint) - endif() if("${gen}" STREQUAL "TZ") set(SUFFIXES ${SUFFIXES} "*.tar.Z") endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:24:27 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:24:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1930-gf0d742b Message-ID: <20160912132427.E832EF5452@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, next has been updated via f0d742bd3d3ef68cb52f17d1819325503557d463 (commit) via 0068c91c95561c27005eba4a8f02ac48d3dc6757 (commit) from a70a6138c3c27f2772990020fdebd36004b810c0 (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=f0d742bd3d3ef68cb52f17d1819325503557d463 commit f0d742bd3d3ef68cb52f17d1819325503557d463 Merge: a70a613 0068c91 Author: Brad King AuthorDate: Mon Sep 12 09:24:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:24:27 2016 -0400 Merge topic 'warn-cmake-version' into next 0068c91c Revert "Warn when building with CMake older than 2.8.12.2" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0068c91c95561c27005eba4a8f02ac48d3dc6757 commit 0068c91c95561c27005eba4a8f02ac48d3dc6757 Author: Brad King AuthorDate: Mon Sep 12 09:23:55 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 09:23:55 2016 -0400 Revert "Warn when building with CMake older than 2.8.12.2" This reverts commit 93dba286bffe6f4267b29a67016d0e0dff3b1bd5. diff --git a/CMakeLists.txt b/CMakeLists.txt index 97b8561..4ef2ca2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,10 +18,6 @@ if(POLICY CMP0053) endif() project(CMake) -if(CMAKE_VERSION VERSION_LESS 2.8.12.2) - message(WARNING "CMake >= 2.8.12.2 will soon be required. You are using '${CMAKE_VERSION}'.") -endif() - if(CMAKE_BOOTSTRAP) # Running from bootstrap script. Set local variable and remove from cache. set(CMAKE_BOOTSTRAP 1) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:29:21 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:29:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1933-g975f8c5 Message-ID: <20160912132921.109B5F59E1@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, next has been updated via 975f8c53e326f0afe1981947d1a601fd3696be87 (commit) via 73128b823c2fe8f63fcdc4c8c92c3672b6f05f3c (commit) via 8f324c7cefea75a12c0f58977177edf263f42e9f (commit) from f0d742bd3d3ef68cb52f17d1819325503557d463 (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=975f8c53e326f0afe1981947d1a601fd3696be87 commit 975f8c53e326f0afe1981947d1a601fd3696be87 Merge: f0d742b 73128b8 Author: Brad King AuthorDate: Mon Sep 12 09:29:20 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:29:20 2016 -0400 Merge topic 'clang-tidy' into next 73128b82 cmDependsFortran: simplify boolean expression 8f324c7c cmSystemTools: simplify boolean expressions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73128b823c2fe8f63fcdc4c8c92c3672b6f05f3c commit 73128b823c2fe8f63fcdc4c8c92c3672b6f05f3c Author: Daniel Pfeifer AuthorDate: Thu Sep 8 23:43:06 2016 +0200 Commit: Brad King CommitDate: Mon Sep 12 09:28:21 2016 -0400 cmDependsFortran: simplify boolean expression diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index b7e006d..eb4c1ec 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -712,10 +712,5 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, // Compare the remaining content. If no compiler id matched above, // including the case none was given, this will compare the whole // content. - if (!cmFortranStreamsDiffer(finModFile, finStampFile)) { - return false; - } - - // The modules are different. - return true; + return cmFortranStreamsDiffer(finModFile, finStampFile); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f324c7cefea75a12c0f58977177edf263f42e9f commit 8f324c7cefea75a12c0f58977177edf263f42e9f Author: Daniel Pfeifer AuthorDate: Thu Sep 8 23:41:31 2016 +0200 Commit: Brad King CommitDate: Mon Sep 12 09:28:21 2016 -0400 cmSystemTools: simplify boolean expressions diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7da9975..7352217 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1766,9 +1766,7 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) if (!GetFileTime(hFrom, &timeCreation, &timeLastAccess, &timeLastWrite)) { return false; } - if (!SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite)) { - return false; - } + return SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite) != 0; #else struct stat fromStat; if (stat(fromFile, &fromStat) < 0) { @@ -1778,11 +1776,8 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) struct utimbuf buf; buf.actime = fromStat.st_atime; buf.modtime = fromStat.st_mtime; - if (utime(toFile, &buf) < 0) { - return false; - } + return utime(toFile, &buf) >= 0; #endif - return true; } cmSystemToolsFileTime* cmSystemTools::FileTimeNew() @@ -1828,16 +1823,11 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t) if (!h) { return false; } - if (!SetFileTime(h, &t->timeCreation, &t->timeLastAccess, - &t->timeLastWrite)) { - return false; - } + return SetFileTime(h, &t->timeCreation, &t->timeLastAccess, + &t->timeLastWrite) != 0; #else - if (utime(fname, &t->timeBuf) < 0) { - return false; - } + return utime(fname, &t->timeBuf) >= 0; #endif - return true; } #ifdef _WIN32 ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:31:31 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:31:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-906-g71a70c0 Message-ID: <20160912133131.9348CF5B58@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 71a70c0e6c9aac54d61107fe9f1f1bf7c211821b (commit) via c6d83a15d8ac11cba1388e853a9b321ca4e9c87a (commit) via 6a497bb0a3a92ac13d637ee200db4d6cd43cb121 (commit) from 5088765a2c3620bc652db538ae0054941cc23406 (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=71a70c0e6c9aac54d61107fe9f1f1bf7c211821b commit 71a70c0e6c9aac54d61107fe9f1f1bf7c211821b Merge: 5088765 c6d83a1 Author: Brad King AuthorDate: Mon Sep 12 09:31:29 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:31:29 2016 -0400 Merge topic 'libuv-link-kvm' c6d83a15 libuv: Link with kvm on NetBSD and OpenBSD 6a497bb0 libuv: Link with kvm on FreeBSD ----------------------------------------------------------------------- Summary of changes: Utilities/cmlibuv/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:31:34 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:31:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-908-g58e5660 Message-ID: <20160912133134.D34F6F5B58@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 58e56607c12789b41a722e03576c090584da4bf6 (commit) via 861f1b3da65d3eda55e0e1f29d628aa3fb643f70 (commit) from 71a70c0e6c9aac54d61107fe9f1f1bf7c211821b (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=58e56607c12789b41a722e03576c090584da4bf6 commit 58e56607c12789b41a722e03576c090584da4bf6 Merge: 71a70c0 861f1b3 Author: Brad King AuthorDate: Mon Sep 12 09:31:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:31:32 2016 -0400 Merge topic 'vs-default-v100' 861f1b3d VS: Do not default to missing v100 64-bit toolset on VS 2010 Express ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:31:38 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:31:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-910-gf27f6f8 Message-ID: <20160912133138.41018F5B61@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 f27f6f8f3fa571d656edba6f254bf47cea0bb6d8 (commit) via c0bccc51df0eda22b4a7aa5833e1204412b39fc8 (commit) from 58e56607c12789b41a722e03576c090584da4bf6 (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=f27f6f8f3fa571d656edba6f254bf47cea0bb6d8 commit f27f6f8f3fa571d656edba6f254bf47cea0bb6d8 Merge: 58e5660 c0bccc5 Author: Brad King AuthorDate: Mon Sep 12 09:31:35 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:31:35 2016 -0400 Merge topic 'wix-feature-patch' c0bccc51 CPackWIX: Enabled patching of WIX tags ----------------------------------------------------------------------- Summary of changes: Help/release/dev/wix-feature-patch.rst | 5 +++++ Modules/CPackWIX.cmake | 2 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 4 ++-- Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx | 12 ++++++++---- Source/CPack/WiX/cmWIXFeaturesSourceWriter.h | 7 +++++-- 5 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 Help/release/dev/wix-feature-patch.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:31:41 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:31:41 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-912-ga3aaf0a Message-ID: <20160912133141.2DB2AF5516@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 a3aaf0a1815c99bed1acf4578c3aef34d6ef3cdc (commit) via db915a3785186d7fe208825cc47121fbf377aa21 (commit) from f27f6f8f3fa571d656edba6f254bf47cea0bb6d8 (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=a3aaf0a1815c99bed1acf4578c3aef34d6ef3cdc commit a3aaf0a1815c99bed1acf4578c3aef34d6ef3cdc Merge: f27f6f8 db915a3 Author: Brad King AuthorDate: Mon Sep 12 09:31:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:31:39 2016 -0400 Merge topic 'drop-cygwin-binary' db915a37 Utilities/Release: Drop Cygwin binary ----------------------------------------------------------------------- Summary of changes: CMakeCPack.cmake | 25 ------ Source/CPack/cygwin.readme | 69 ----------------- Templates/cygwin-package.sh.in | 103 ------------------------- Utilities/Release/Cygwin/CMakeLists.txt | 25 ------ Utilities/Release/Cygwin/README.cygwin.in | 42 ---------- Utilities/Release/Cygwin/cygwin-package.sh.in | 90 --------------------- Utilities/Release/Cygwin/cygwin-setup.hint.in | 5 -- Utilities/Release/README | 3 - Utilities/Release/create-cmake-release.cmake | 1 - Utilities/Release/cygwin_release.cmake | 32 -------- Utilities/Release/release_cmake.cmake | 4 - 11 files changed, 399 deletions(-) delete mode 100644 Source/CPack/cygwin.readme delete mode 100755 Templates/cygwin-package.sh.in delete mode 100644 Utilities/Release/Cygwin/CMakeLists.txt delete mode 100644 Utilities/Release/Cygwin/README.cygwin.in delete mode 100755 Utilities/Release/Cygwin/cygwin-package.sh.in delete mode 100644 Utilities/Release/Cygwin/cygwin-patch.diff.in delete mode 100644 Utilities/Release/Cygwin/cygwin-setup.hint.in delete mode 100644 Utilities/Release/cygwin_release.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:31:44 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:31:44 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-916-gb3b238c Message-ID: <20160912133144.82F37F37EC@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 b3b238c3cc8cfd1f320faf0233ae860dcfcbfda0 (commit) via 79eba4b7abf940501a5b2060e8aaa3048d743652 (commit) via 069cac584f3fccfad54b4fcce8d7e8584a009c51 (commit) via e9ce050342c34b92e0eaa281a4e454c9b78a41d9 (commit) from a3aaf0a1815c99bed1acf4578c3aef34d6ef3cdc (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=b3b238c3cc8cfd1f320faf0233ae860dcfcbfda0 commit b3b238c3cc8cfd1f320faf0233ae860dcfcbfda0 Merge: a3aaf0a 79eba4b Author: Brad King AuthorDate: Mon Sep 12 09:31:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:31:41 2016 -0400 Merge topic 'bzip2-imported-targets' 79eba4b7 Help: Add notes for topic 'bzip2-imported-targets' 069cac58 Tests: Add FindBZip2 unit tests e9ce0503 FindBZip2: Add imported target ----------------------------------------------------------------------- Summary of changes: Help/release/dev/bzip2-imported-targets.rst | 4 +++ Modules/FindBZip2.cmake | 36 ++++++++++++++++++++++++++- Tests/CMakeLists.txt | 4 +++ Tests/{FindICU => FindBZip2}/CMakeLists.txt | 8 +++--- Tests/FindBZip2/Test/CMakeLists.txt | 16 ++++++++++++ Tests/FindBZip2/Test/main.c | 23 +++++++++++++++++ 6 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 Help/release/dev/bzip2-imported-targets.rst copy Tests/{FindICU => FindBZip2}/CMakeLists.txt (54%) create mode 100644 Tests/FindBZip2/Test/CMakeLists.txt create mode 100644 Tests/FindBZip2/Test/main.c hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:31:47 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:31:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-921-g03bae46 Message-ID: <20160912133148.47EB5F5472@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 03bae46865f2abb3a74728986f523a30d79eb095 (commit) via 73128b823c2fe8f63fcdc4c8c92c3672b6f05f3c (commit) via 8f324c7cefea75a12c0f58977177edf263f42e9f (commit) via 5d3b5bef11bc29bb00a14103433fea81e4dcc340 (commit) via ad42eb33b61ad262315bfa087dc7f4f0ddbca5fe (commit) from b3b238c3cc8cfd1f320faf0233ae860dcfcbfda0 (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=03bae46865f2abb3a74728986f523a30d79eb095 commit 03bae46865f2abb3a74728986f523a30d79eb095 Merge: b3b238c 73128b8 Author: Brad King AuthorDate: Mon Sep 12 09:31:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 09:31:45 2016 -0400 Merge topic 'clang-tidy' 73128b82 cmDependsFortran: simplify boolean expression 8f324c7c cmSystemTools: simplify boolean expressions 5d3b5bef QCMakeCacheView: simplify boolean expression ad42eb33 QCMakeCacheView: no else after return ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/QCMakeCacheView.cxx | 13 ++++++------- Source/cmDependsFortran.cxx | 7 +------ Source/cmSystemTools.cxx | 20 +++++--------------- 3 files changed, 12 insertions(+), 28 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 09:32:18 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 09:32:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1943-gdeeb60e Message-ID: <20160912133218.9314AF5B78@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, next has been updated via deeb60ef1fb7d23d4a6a5579b6745197dc033411 (commit) via 03bae46865f2abb3a74728986f523a30d79eb095 (commit) via b3b238c3cc8cfd1f320faf0233ae860dcfcbfda0 (commit) via a3aaf0a1815c99bed1acf4578c3aef34d6ef3cdc (commit) via f27f6f8f3fa571d656edba6f254bf47cea0bb6d8 (commit) via 58e56607c12789b41a722e03576c090584da4bf6 (commit) via 71a70c0e6c9aac54d61107fe9f1f1bf7c211821b (commit) via 5088765a2c3620bc652db538ae0054941cc23406 (commit) via 4e3166ae1a2f83ee7917a5ac0b9b98da38d8fd7c (commit) via d90432c335ae4695c520d304c385fb75c8ab0956 (commit) from 975f8c53e326f0afe1981947d1a601fd3696be87 (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=deeb60ef1fb7d23d4a6a5579b6745197dc033411 commit deeb60ef1fb7d23d4a6a5579b6745197dc033411 Merge: 975f8c5 03bae46 Author: Brad King AuthorDate: Mon Sep 12 09:32:07 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 09:32:07 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 10:09:42 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 10:09:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1945-gc6d96a2 Message-ID: <20160912140942.A2CF4C15FE@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, next has been updated via c6d96a2f67c494ef9a918225cd95498d42dcc5a8 (commit) via 68b616696283212ecc6fcbdbab16e84a5d773f33 (commit) from deeb60ef1fb7d23d4a6a5579b6745197dc033411 (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=c6d96a2f67c494ef9a918225cd95498d42dcc5a8 commit c6d96a2f67c494ef9a918225cd95498d42dcc5a8 Merge: deeb60e 68b6166 Author: Brad King AuthorDate: Mon Sep 12 10:09:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 10:09:41 2016 -0400 Merge topic 'geh-failure-tests' into next 68b61669 Tests: Fix GenerateExportHeader code style https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68b616696283212ecc6fcbdbab16e84a5d773f33 commit 68b616696283212ecc6fcbdbab16e84a5d773f33 Author: Brad King AuthorDate: Mon Sep 12 10:09:08 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 10:09:08 2016 -0400 Tests: Fix GenerateExportHeader code style diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index db1ab49..7e3e0e4 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -57,15 +57,15 @@ int main() { { libshared::Class l; - //l.method(); LINK ERROR + // l.method(); LINK ERROR l.method_exported(); - //l.method_deprecated(); LINK ERROR + // l.method_deprecated(); LINK ERROR l.method_deprecated_exported(); - //l.method_excluded(); LINK ERROR + // l.method_excluded(); LINK ERROR - //use_int(l.data); LINK ERROR + // use_int(l.data); LINK ERROR use_int(l.data_exported); - //use_int(l.data_excluded); LINK ERROR + // use_int(l.data_excluded); LINK ERROR } { @@ -75,39 +75,39 @@ int main() #if defined(_WIN32) || defined(__CYGWIN__) l.method_excluded(); #else - //l.method_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN) +// l.method_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN) #endif use_int(l.data); #if defined(_WIN32) || defined(__CYGWIN__) use_int(l.data_excluded); #else - //use_int(l.data_excluded); LINK ERROR (NOT WIN32 AND NOT CYGWIN) +// use_int(l.data_excluded); LINK ERROR (NOT WIN32 AND NOT CYGWIN) #endif } { libshared::ExcludedClass l; - //l.method(); LINK ERROR + // l.method(); LINK ERROR l.method_exported(); - //l.method_deprecated(); LINK ERROR + // l.method_deprecated(); LINK ERROR l.method_deprecated_exported(); - //l.method_excluded(); LINK ERROR + // l.method_excluded(); LINK ERROR - //use_int(l.data); LINK ERROR + // use_int(l.data); LINK ERROR use_int(l.data_exported); - //use_int(l.data_excluded); LINK ERROR + // use_int(l.data_excluded); LINK ERROR } - //libshared::function(); LINK ERROR + // libshared::function(); LINK ERROR libshared::function_exported(); - //libshared::function_deprecated(); LINK ERROR + // libshared::function_deprecated(); LINK ERROR libshared::function_deprecated_exported(); - //libshared::function_excluded(); LINK ERROR + // libshared::function_excluded(); LINK ERROR - //use_int(libshared::data); LINK ERROR + // use_int(libshared::data); LINK ERROR use_int(libshared::data_exported); - //use_int(libshared::data_excluded); LINK ERROR + // use_int(libshared::data_excluded); LINK ERROR { libstatic::Class l; diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h index 14b0109..2c3fcfd 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h @@ -3,8 +3,7 @@ #include "libshared_and_static_export.h" -namespace libshared_and_static -{ +namespace libshared_and_static { class Class { @@ -15,7 +14,8 @@ public: int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT method_deprecated_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT + method_deprecated_exported() const; int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; @@ -49,7 +49,8 @@ public: int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT method_deprecated_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT + method_deprecated_exported() const; int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; @@ -66,7 +67,8 @@ int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT function_exported(); int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED function_deprecated(); -int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT function_deprecated_exported(); +int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT +function_deprecated_exported(); int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT function_excluded(); diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h index d24905f..6574bd5 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h @@ -3,8 +3,7 @@ #include "libshared_export.h" -namespace libshared -{ +namespace libshared { class Class { diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h index a40e732..1017e12 100644 --- a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h @@ -3,8 +3,7 @@ #include "libstatic_export.h" -namespace libstatic -{ +namespace libstatic { class Class { ----------------------------------------------------------------------- Summary of changes: .../GenerateExportHeader/exportheader_test.cpp | 34 ++++++++++---------- .../lib_shared_and_static/libshared_and_static.h | 12 ++++--- .../GenerateExportHeader/libshared/libshared.h | 3 +- .../GenerateExportHeader/libstatic/libstatic.h | 3 +- 4 files changed, 26 insertions(+), 26 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 10:45:19 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 10:45:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1949-g0d40713 Message-ID: <20160912144519.76E93F33A5@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, next has been updated via 0d40713426baaf6368eea90012c431656501d28d (commit) via 612d6f29f8743ec100f135aed55d0920b3ea9fda (commit) via ce76abb4c49a85d491a99318637c6e9e37729f6e (commit) via 8f95b93b41622d428522ae10cfe1bc2fde13c78c (commit) from c6d96a2f67c494ef9a918225cd95498d42dcc5a8 (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=0d40713426baaf6368eea90012c431656501d28d commit 0d40713426baaf6368eea90012c431656501d28d Merge: c6d96a2 612d6f2 Author: Brad King AuthorDate: Mon Sep 12 10:45:18 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 10:45:18 2016 -0400 Merge topic 'geh-failure-tests' into next 612d6f29 Tests: Refactor GenerateExportHeader test code ce76abb4 Tests: Add data symbols to GenerateExportHeader test 8f95b93b Tests: Add failure test for GenerateExportHeader https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=612d6f29f8743ec100f135aed55d0920b3ea9fda commit 612d6f29f8743ec100f135aed55d0920b3ea9fda Author: Matthew Woehlke AuthorDate: Fri Sep 2 16:53:34 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 10:29:20 2016 -0400 Tests: Refactor GenerateExportHeader test code Refactor the library code used in the GenerateExportHeader test to use an improved naming convention that more directly identifies what it being tested, making use of namespaces to avoid possible symbol collisions. This also eliminates duplicate cases such as `libshared()` and `libshared_not_exported()` which had the same decoration, and adds consistent pairings of _EXPORT and _DEPRECATED_EXPORT which were missing previously. The data tests from the previous commit are also added to `libstatic` and `libshared_and_static` for consistency. Note that there are no exported members of exported classes, as these are not allowed on Windows. diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index fc6cceb..7e3e0e4 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -56,19 +56,29 @@ void compare(const char* refName, const char* testName) int main() { { - Libshared l; - l.libshared(); - l.libshared_exported(); - l.libshared_deprecated(); - l.libshared_not_exported(); + libshared::Class l; + // l.method(); LINK ERROR + l.method_exported(); + // l.method_deprecated(); LINK ERROR + l.method_deprecated_exported(); + // l.method_excluded(); LINK ERROR + + // use_int(l.data); LINK ERROR + use_int(l.data_exported); + // use_int(l.data_excluded); LINK ERROR + } + + { + libshared::ExportedClass l; + l.method(); + l.method_deprecated(); #if defined(_WIN32) || defined(__CYGWIN__) - l.libshared_excluded(); + l.method_excluded(); #else -// l.libshared_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN) +// l.method_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN) #endif - use_int(l.data_exported); - use_int(l.data_not_exported); + use_int(l.data); #if defined(_WIN32) || defined(__CYGWIN__) use_int(l.data_excluded); #else @@ -77,71 +87,76 @@ int main() } { - LibsharedNotExported l; - // l.libshared(); LINK ERROR - l.libshared_exported(); - l.libshared_deprecated(); - // l.libshared_not_exported(); LINK ERROR - // l.libshared_excluded(); LINK ERROR - - use_int(l.data_exported); - // use_int(l.data_not_exported); LINK ERROR - // use_int(l.data_excluded); LINK ERROR - } - - { - LibsharedExcluded l; - // l.libshared(); LINK ERROR - l.libshared_exported(); - l.libshared_deprecated(); - // l.libshared_not_exported(); LINK ERROR - // l.libshared_excluded(); LINK ERROR - + libshared::ExcludedClass l; + // l.method(); LINK ERROR + l.method_exported(); + // l.method_deprecated(); LINK ERROR + l.method_deprecated_exported(); + // l.method_excluded(); LINK ERROR + + // use_int(l.data); LINK ERROR use_int(l.data_exported); - // use_int(l.data_not_exported); LINK ERROR // use_int(l.data_excluded); LINK ERROR } - libshared_exported(); - libshared_deprecated(); - // libshared_not_exported(); LINK ERROR - // libshared_excluded(); LINK ERROR + // libshared::function(); LINK ERROR + libshared::function_exported(); + // libshared::function_deprecated(); LINK ERROR + libshared::function_deprecated_exported(); + // libshared::function_excluded(); LINK ERROR - use_int(data_exported); - // use_int(data_not_exported); LINK ERROR - // use_int(data_excluded); LINK ERROR + // use_int(libshared::data); LINK ERROR + use_int(libshared::data_exported); + // use_int(libshared::data_excluded); LINK ERROR { - Libstatic l; - l.libstatic(); - l.libstatic_exported(); - l.libstatic_deprecated(); - l.libstatic_not_exported(); - l.libstatic_excluded(); + libstatic::Class l; + l.method(); + l.method_exported(); + l.method_deprecated(); + l.method_deprecated_exported(); + l.method_excluded(); + + use_int(l.data); + use_int(l.data_exported); + use_int(l.data_excluded); } { - LibstaticNotExported l; - l.libstatic(); - l.libstatic_exported(); - l.libstatic_deprecated(); - l.libstatic_not_exported(); - l.libstatic_excluded(); + libstatic::ExportedClass l; + l.method(); + l.method_exported(); + l.method_deprecated(); + l.method_deprecated_exported(); + l.method_excluded(); + + use_int(l.data); + use_int(l.data_exported); + use_int(l.data_excluded); } { - LibstaticExcluded l; - l.libstatic(); - l.libstatic_exported(); - l.libstatic_deprecated(); - l.libstatic_not_exported(); - l.libstatic_excluded(); + libstatic::ExcludedClass l; + l.method(); + l.method_exported(); + l.method_deprecated(); + l.method_deprecated_exported(); + l.method_excluded(); + + use_int(l.data); + use_int(l.data_exported); + use_int(l.data_excluded); } - libstatic_exported(); - libstatic_deprecated(); - libstatic_not_exported(); - libstatic_excluded(); + libstatic::function(); + libstatic::function_exported(); + libstatic::function_deprecated(); + libstatic::function_deprecated_exported(); + libstatic::function_excluded(); + + use_int(libstatic::data); + use_int(libstatic::data_exported); + use_int(libstatic::data_excluded); #if defined(SRC_DIR) && defined(BIN_DIR) compare(SRC_DIR "/libshared_export.h", diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp index 846c207..9ac8381 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp @@ -1,106 +1,121 @@ - #include "libshared_and_static.h" #ifndef MY_CUSTOM_CONTENT_ADDED #error "MY_CUSTOM_CONTENT_ADDED not defined!" #endif -int LibsharedAndStatic::libshared_and_static() const +int libshared_and_static::Class::method() const { return 0; } -int LibsharedAndStatic::libshared_and_static_exported() const +int libshared_and_static::Class::method_exported() const { return 0; } -int LibsharedAndStatic::libshared_and_static_deprecated() const +int libshared_and_static::Class::method_deprecated() const { return 0; } -int LibsharedAndStatic::libshared_and_static_not_exported() const +int libshared_and_static::Class::method_deprecated_exported() const { return 0; } -int LibsharedAndStatic::libshared_and_static_excluded() const +int libshared_and_static::Class::method_excluded() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static() const -{ - return 0; -} +int const libshared_and_static::Class::data = 1; -int LibsharedAndStaticNotExported::libshared_and_static_exported() const +int const libshared_and_static::Class::data_exported = 1; + +int const libshared_and_static::Class::data_excluded = 1; + +int libshared_and_static::ExportedClass::method() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static_deprecated() const +int libshared_and_static::ExportedClass::method_deprecated() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static_not_exported() const +int libshared_and_static::ExportedClass::method_excluded() const { return 0; } -int LibsharedAndStaticNotExported::libshared_and_static_excluded() const +int const libshared_and_static::ExportedClass::data = 1; + +int const libshared_and_static::ExportedClass::data_excluded = 1; + +int libshared_and_static::ExcludedClass::method() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static() const +int libshared_and_static::ExcludedClass::method_exported() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_exported() const +int libshared_and_static::ExcludedClass::method_deprecated() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_deprecated() const +int libshared_and_static::ExcludedClass::method_deprecated_exported() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_not_exported() const +int libshared_and_static::ExcludedClass::method_excluded() const { return 0; } -int LibsharedAndStaticExcluded::libshared_and_static_excluded() const +int const libshared_and_static::ExcludedClass::data = 1; + +int const libshared_and_static::ExcludedClass::data_exported = 1; + +int const libshared_and_static::ExcludedClass::data_excluded = 1; + +int libshared_and_static::function() { return 0; } -int libshared_and_static() +int libshared_and_static::function_exported() { return 0; } -int libshared_and_static_exported() +int libshared_and_static::function_deprecated() { return 0; } -int libshared_and_static_deprecated() +int libshared_and_static::function_deprecated_exported() { return 0; } -int libshared_and_static_not_exported() +int libshared_and_static::function_excluded() { return 0; } -int libshared_and_static_excluded() +int const libshared_and_static::data = 1; + +int const libshared_and_static::data_exported = 1; + +int const libshared_and_static::data_excluded = 1; + +void use_int(int) { - return 0; } diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h index ea672fe..2c3fcfd 100644 --- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h +++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h @@ -1,66 +1,83 @@ - -#ifndef SHARED_AND_STATIC_H -#define SHARED_AND_STATIC_H +#ifndef LIBSHARED_AND_STATIC_H +#define LIBSHARED_AND_STATIC_H #include "libshared_and_static_export.h" -class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT LibsharedAndStatic +namespace libshared_and_static { + +class Class { public: - int libshared_and_static() const; + int method() const; + + int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const; + + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int libshared_and_static_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT + method_deprecated_exported() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED - libshared_and_static_deprecated() const; + int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; - int libshared_and_static_not_exported() const; + static int const data; - int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT - libshared_and_static_excluded() const; + static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported; + + static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; }; -class LibsharedAndStaticNotExported +class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT ExportedClass { public: - int libshared_and_static() const; + int method() const; - int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT - libshared_and_static_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED - libshared_and_static_deprecated() const; + int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; - int libshared_and_static_not_exported() const; + static int const data; - int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT - libshared_and_static_excluded() const; + static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; }; -class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT LibsharedAndStaticExcluded +class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT ExcludedClass { public: - int libshared_and_static() const; + int method() const; + + int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const; + + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const; - int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT - libshared_and_static_exported() const; + int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT + method_deprecated_exported() const; - int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED - libshared_and_static_deprecated() const; + int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const; - int libshared_and_static_not_exported() const; + static int const data; - int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT - libshared_and_static_excluded() const; + static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported; + + static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; }; -MYPREFIX_LIBSHARED_AND_STATIC_EXPORT int libshared_and_static_exported(); +int function(); + +int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT function_exported(); + +int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED function_deprecated(); + +int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT +function_deprecated_exported(); + +int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT function_excluded(); + +extern int const data; -MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT int -libshared_and_static_deprecated(); +extern int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported; -int libshared_and_static_not_exported(); +extern int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded; -int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT libshared_and_static_excluded(); +} // namespace libshared_and_static #endif diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp index 7e46ab5..328ef6f 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp @@ -1,129 +1,116 @@ - #include "libshared.h" -int Libshared::libshared() const +int libshared::Class::method() const { return 0; } -int Libshared::libshared_exported() const +int libshared::Class::method_exported() const { return 0; } -int Libshared::libshared_deprecated() const +int libshared::Class::method_deprecated() const { return 0; } -int Libshared::libshared_not_exported() const +int libshared::Class::method_deprecated_exported() const { return 0; } -int Libshared::libshared_excluded() const +int libshared::Class::method_excluded() const { return 0; } -int const Libshared::data_exported = 1; - -int const Libshared::data_not_exported = 1; - -int const Libshared::data_excluded = 1; +int const libshared::Class::data = 1; -int LibsharedNotExported::libshared() const -{ - return 0; -} +int const libshared::Class::data_exported = 1; -int LibsharedNotExported::libshared_exported() const -{ - return 0; -} +int const libshared::Class::data_excluded = 1; -int LibsharedNotExported::libshared_deprecated() const +int libshared::ExportedClass::method() const { return 0; } -int LibsharedNotExported::libshared_not_exported() const +int libshared::ExportedClass::method_deprecated() const { return 0; } -int LibsharedNotExported::libshared_excluded() const +int libshared::ExportedClass::method_excluded() const { return 0; } -int const LibsharedNotExported::data_exported = 1; - -int const LibsharedNotExported::data_not_exported = 1; +int const libshared::ExportedClass::data = 1; -int const LibsharedNotExported::data_excluded = 1; +int const libshared::ExportedClass::data_excluded = 1; -int LibsharedExcluded::libshared() const +int libshared::ExcludedClass::method() const { return 0; } -int LibsharedExcluded::libshared_exported() const +int libshared::ExcludedClass::method_exported() const { return 0; } -int LibsharedExcluded::libshared_deprecated() const +int libshared::ExcludedClass::method_deprecated() const { return 0; } -int LibsharedExcluded::libshared_not_exported() const +int libshared::ExcludedClass::method_deprecated_exported() const { return 0; } -int LibsharedExcluded::libshared_excluded() const +int libshared::ExcludedClass::method_excluded() const { return 0; } -int const LibsharedExcluded::data_exported = 1; +int const libshared::ExcludedClass::data = 1; -int const LibsharedExcluded::data_not_exported = 1; +int const libshared::ExcludedClass::data_exported = 1; -int const LibsharedExcluded::data_excluded = 1; +int const libshared::ExcludedClass::data_excluded = 1; -int libshared() +int libshared::function() { return 0; } -int libshared_exported() +int libshared::function_exported() { return 0; } -int libshared_deprecated() +int libshared::function_deprecated() { return 0; } -int libshared_not_exported() +int libshared::function_deprecated_exported() { return 0; } -int libshared_excluded() +int libshared::function_excluded() { return 0; } -int const data_exported = 1; +int const libshared::data = 1; -int const data_not_exported = 1; +int const libshared::data_exported = 1; -int const data_excluded = 1; +int const libshared::data_excluded = 1; void use_int(int) { diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h index 62879c2..6574bd5 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h @@ -1,83 +1,82 @@ - #ifndef LIBSHARED_H #define LIBSHARED_H #include "libshared_export.h" -class LIBSHARED_EXPORT Libshared +namespace libshared { + +class Class { public: - int libshared() const; + int method() const; - int libshared_exported() const; + int LIBSHARED_EXPORT method_exported() const; - int LIBSHARED_DEPRECATED libshared_deprecated() const; + int LIBSHARED_DEPRECATED method_deprecated() const; - int libshared_not_exported() const; + int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSHARED_NO_EXPORT libshared_excluded() const; + int LIBSHARED_NO_EXPORT method_excluded() const; - static int const LIBSHARED_EXPORT data_exported; + static int const data; - static int const data_not_exported; + static int const LIBSHARED_EXPORT data_exported; static int const LIBSHARED_NO_EXPORT data_excluded; }; -class LibsharedNotExported +class LIBSHARED_EXPORT ExportedClass { public: - int libshared() const; - - int LIBSHARED_EXPORT libshared_exported() const; - - int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const; - - int libshared_not_exported() const; + int method() const; - int LIBSHARED_NO_EXPORT libshared_excluded() const; + int LIBSHARED_DEPRECATED method_deprecated() const; - static int const LIBSHARED_EXPORT data_exported; + int LIBSHARED_NO_EXPORT method_excluded() const; - static int const data_not_exported; + static int const data; static int const LIBSHARED_NO_EXPORT data_excluded; }; -class LIBSHARED_NO_EXPORT LibsharedExcluded +class LIBSHARED_NO_EXPORT ExcludedClass { public: - int libshared() const; + int method() const; - int LIBSHARED_EXPORT libshared_exported() const; + int LIBSHARED_EXPORT method_exported() const; - int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const; + int LIBSHARED_DEPRECATED method_deprecated() const; - int libshared_not_exported() const; + int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSHARED_NO_EXPORT libshared_excluded() const; + int LIBSHARED_NO_EXPORT method_excluded() const; - static int const LIBSHARED_EXPORT data_exported; + static int const data; - static int const data_not_exported; + static int const LIBSHARED_EXPORT data_exported; static int const LIBSHARED_NO_EXPORT data_excluded; }; -LIBSHARED_EXPORT int libshared_exported(); +int function(); -LIBSHARED_DEPRECATED_EXPORT int libshared_deprecated(); +int LIBSHARED_EXPORT function_exported(); -int libshared_not_exported(); +int LIBSHARED_DEPRECATED function_deprecated(); -int LIBSHARED_NO_EXPORT libshared_excluded(); +int LIBSHARED_DEPRECATED_EXPORT function_deprecated_exported(); -extern int const LIBSHARED_EXPORT data_exported; +int LIBSHARED_NO_EXPORT function_excluded(); -extern int const data_not_exported; +extern int const data; + +extern int const LIBSHARED_EXPORT data_exported; extern int const LIBSHARED_NO_EXPORT data_excluded; +} // namespace libshared + LIBSHARED_EXPORT void use_int(int); #endif diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp index 89381af..e1d1255 100644 --- a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp @@ -1,97 +1,125 @@ - #include "libstatic.h" -int Libstatic::libstatic() const +int libstatic::Class::method() const { return 0; } -int Libstatic::libstatic_exported() const +int libstatic::Class::method_exported() const { return 0; } -int Libstatic::libstatic_deprecated() const +int libstatic::Class::method_deprecated() const { return 0; } -int Libstatic::libstatic_not_exported() const +int libstatic::Class::method_deprecated_exported() const { return 0; } -int Libstatic::libstatic_excluded() const +int libstatic::Class::method_excluded() const { return 0; } -int LibstaticNotExported::libstatic() const +int const libstatic::Class::data = 1; + +int const libstatic::Class::data_exported = 1; + +int const libstatic::Class::data_excluded = 1; + +int libstatic::ExportedClass::method() const { return 0; } -int LibstaticNotExported::libstatic_exported() const +int libstatic::ExportedClass::method_exported() const { return 0; } -int LibstaticNotExported::libstatic_deprecated() const +int libstatic::ExportedClass::method_deprecated() const { return 0; } -int LibstaticNotExported::libstatic_not_exported() const +int libstatic::ExportedClass::method_deprecated_exported() const { return 0; } -int LibstaticNotExported::libstatic_excluded() const +int libstatic::ExportedClass::method_excluded() const { return 0; } -int LibstaticExcluded::libstatic() const +int const libstatic::ExportedClass::data = 1; + +int const libstatic::ExportedClass::data_exported = 1; + +int const libstatic::ExportedClass::data_excluded = 1; + +int libstatic::ExcludedClass::method() const { return 0; } -int LibstaticExcluded::libstatic_exported() const +int libstatic::ExcludedClass::method_exported() const { return 0; } -int LibstaticExcluded::libstatic_deprecated() const +int libstatic::ExcludedClass::method_deprecated() const { return 0; } -int LibstaticExcluded::libstatic_not_exported() const +int libstatic::ExcludedClass::method_deprecated_exported() const { return 0; } -int LibstaticExcluded::libstatic_excluded() const +int libstatic::ExcludedClass::method_excluded() const { return 0; } -int libstatic_exported() +int const libstatic::ExcludedClass::data = 1; + +int const libstatic::ExcludedClass::data_exported = 1; + +int const libstatic::ExcludedClass::data_excluded = 1; + +int libstatic::function() +{ + return 0; +} + +int libstatic::function_exported() { return 0; } -int libstatic_deprecated() +int libstatic::function_deprecated() { return 0; } -int libstatic_not_exported() +int libstatic::function_deprecated_exported() { return 0; } -int libstatic_excluded() +int libstatic::function_excluded() { return 0; } + +int const libstatic::data = 1; + +int const libstatic::data_exported = 1; + +int const libstatic::data_excluded = 1; diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h index 6072d9b..1017e12 100644 --- a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h +++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h @@ -1,57 +1,86 @@ - #ifndef LIBSTATIC_H #define LIBSTATIC_H #include "libstatic_export.h" -class LIBSTATIC_EXPORT Libstatic +namespace libstatic { + +class Class { public: - int libstatic() const; + int method() const; + + int LIBSTATIC_EXPORT method_exported() const; + + int LIBSTATIC_DEPRECATED method_deprecated() const; - int libstatic_exported() const; + int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSTATIC_DEPRECATED libstatic_deprecated() const; + int LIBSTATIC_NO_EXPORT method_excluded() const; - int libstatic_not_exported() const; + static int const data; - int LIBSTATIC_NO_EXPORT libstatic_excluded() const; + static int const LIBSTATIC_EXPORT data_exported; + + static int const LIBSTATIC_NO_EXPORT data_excluded; }; -class LibstaticNotExported +class LIBSTATIC_EXPORT ExportedClass { public: - int libstatic() const; + int method() const; + + int LIBSTATIC_EXPORT method_exported() const; + + int LIBSTATIC_DEPRECATED method_deprecated() const; + + int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSTATIC_EXPORT libstatic_exported() const; + int LIBSTATIC_NO_EXPORT method_excluded() const; - int LIBSTATIC_DEPRECATED libstatic_deprecated() const; + static int const data; - int libstatic_not_exported() const; + static int const LIBSTATIC_EXPORT data_exported; - int LIBSTATIC_NO_EXPORT libstatic_excluded() const; + static int const LIBSTATIC_NO_EXPORT data_excluded; }; -class LIBSTATIC_NO_EXPORT LibstaticExcluded +class LIBSTATIC_NO_EXPORT ExcludedClass { public: - int libstatic() const; + int method() const; - int LIBSTATIC_EXPORT libstatic_exported() const; + int LIBSTATIC_EXPORT method_exported() const; - int LIBSTATIC_DEPRECATED libstatic_deprecated() const; + int LIBSTATIC_DEPRECATED method_deprecated() const; - int libstatic_not_exported() const; + int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const; - int LIBSTATIC_NO_EXPORT libstatic_excluded() const; + int LIBSTATIC_NO_EXPORT method_excluded() const; + + static int const data; + + static int const LIBSTATIC_EXPORT data_exported; + + static int const LIBSTATIC_NO_EXPORT data_excluded; }; -LIBSTATIC_EXPORT int libstatic_exported(); +int function(); + +int LIBSTATIC_EXPORT function_exported(); + +int LIBSTATIC_DEPRECATED function_deprecated(); + +int LIBSTATIC_DEPRECATED_EXPORT function_deprecated_exported(); + +int LIBSTATIC_NO_EXPORT function_excluded(); + +extern int const data; -LIBSTATIC_DEPRECATED_EXPORT int libstatic_deprecated(); +extern int const LIBSTATIC_EXPORT data_exported; -int libstatic_not_exported(); +extern int const LIBSTATIC_NO_EXPORT data_excluded; -int LIBSTATIC_NO_EXPORT libstatic_excluded(); +} // namespace libstatic #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce76abb4c49a85d491a99318637c6e9e37729f6e commit ce76abb4c49a85d491a99318637c6e9e37729f6e Author: Matthew Woehlke AuthorDate: Fri Sep 2 11:23:16 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 10:28:59 2016 -0400 Tests: Add data symbols to GenerateExportHeader test Add static data members and global variables to the GenerateExportHeader shared library, testing that export decoration for these works in addition to decoration of classes and free functions. diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index 3a4e7dd..fc6cceb 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -66,6 +66,14 @@ int main() #else // l.libshared_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN) #endif + + use_int(l.data_exported); + use_int(l.data_not_exported); +#if defined(_WIN32) || defined(__CYGWIN__) + use_int(l.data_excluded); +#else +// use_int(l.data_excluded); LINK ERROR (NOT WIN32 AND NOT CYGWIN) +#endif } { @@ -75,6 +83,10 @@ int main() l.libshared_deprecated(); // l.libshared_not_exported(); LINK ERROR // l.libshared_excluded(); LINK ERROR + + use_int(l.data_exported); + // use_int(l.data_not_exported); LINK ERROR + // use_int(l.data_excluded); LINK ERROR } { @@ -84,6 +96,10 @@ int main() l.libshared_deprecated(); // l.libshared_not_exported(); LINK ERROR // l.libshared_excluded(); LINK ERROR + + use_int(l.data_exported); + // use_int(l.data_not_exported); LINK ERROR + // use_int(l.data_excluded); LINK ERROR } libshared_exported(); @@ -91,6 +107,10 @@ int main() // libshared_not_exported(); LINK ERROR // libshared_excluded(); LINK ERROR + use_int(data_exported); + // use_int(data_not_exported); LINK ERROR + // use_int(data_excluded); LINK ERROR + { Libstatic l; l.libstatic(); diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp index ad6d356..7e46ab5 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp @@ -26,6 +26,12 @@ int Libshared::libshared_excluded() const return 0; } +int const Libshared::data_exported = 1; + +int const Libshared::data_not_exported = 1; + +int const Libshared::data_excluded = 1; + int LibsharedNotExported::libshared() const { return 0; @@ -51,6 +57,12 @@ int LibsharedNotExported::libshared_excluded() const return 0; } +int const LibsharedNotExported::data_exported = 1; + +int const LibsharedNotExported::data_not_exported = 1; + +int const LibsharedNotExported::data_excluded = 1; + int LibsharedExcluded::libshared() const { return 0; @@ -76,6 +88,12 @@ int LibsharedExcluded::libshared_excluded() const return 0; } +int const LibsharedExcluded::data_exported = 1; + +int const LibsharedExcluded::data_not_exported = 1; + +int const LibsharedExcluded::data_excluded = 1; + int libshared() { return 0; @@ -100,3 +118,13 @@ int libshared_excluded() { return 0; } + +int const data_exported = 1; + +int const data_not_exported = 1; + +int const data_excluded = 1; + +void use_int(int) +{ +} diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h index bd9f2e3..62879c2 100644 --- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h @@ -16,6 +16,12 @@ public: int libshared_not_exported() const; int LIBSHARED_NO_EXPORT libshared_excluded() const; + + static int const LIBSHARED_EXPORT data_exported; + + static int const data_not_exported; + + static int const LIBSHARED_NO_EXPORT data_excluded; }; class LibsharedNotExported @@ -30,6 +36,12 @@ public: int libshared_not_exported() const; int LIBSHARED_NO_EXPORT libshared_excluded() const; + + static int const LIBSHARED_EXPORT data_exported; + + static int const data_not_exported; + + static int const LIBSHARED_NO_EXPORT data_excluded; }; class LIBSHARED_NO_EXPORT LibsharedExcluded @@ -44,6 +56,12 @@ public: int libshared_not_exported() const; int LIBSHARED_NO_EXPORT libshared_excluded() const; + + static int const LIBSHARED_EXPORT data_exported; + + static int const data_not_exported; + + static int const LIBSHARED_NO_EXPORT data_excluded; }; LIBSHARED_EXPORT int libshared_exported(); @@ -54,4 +72,12 @@ int libshared_not_exported(); int LIBSHARED_NO_EXPORT libshared_excluded(); +extern int const LIBSHARED_EXPORT data_exported; + +extern int const data_not_exported; + +extern int const LIBSHARED_NO_EXPORT data_excluded; + +LIBSHARED_EXPORT void use_int(int); + #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f95b93b41622d428522ae10cfe1bc2fde13c78c commit 8f95b93b41622d428522ae10cfe1bc2fde13c78c Author: Matthew Woehlke AuthorDate: Fri Sep 2 11:04:55 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 10:27:45 2016 -0400 Tests: Add failure test for GenerateExportHeader Modify notation of statements in the GenerateExportHeader test expected to result in link errors. Modify script used to build the test to also generate a suite of modified sources, each having exactly one of the failing lines enabled, and to generate EXCLUDE_FROM_ALL executables for the same. Modify RunCMake script used to drive the test to read the list of such executables and try to build each of them, verifying that they do in fact fail to build. This will verify that the _NO_EXPORT macros are working as expected, and will also catch errors like the one that commit 0cbaaf2d (GenerateExportHeader: Fix add_compiler_export_flags regression, 2016-09-01) fixed. When setting up the failure tests for GenerateExportHeader, check if the compiler actually hides non-exported stuff. If not, the failure tests won't fail, and will cause the overall test to fail. Since this typically is only the case for very old compilers, simply skipping them as opposed to trying to do something more fine grained seems reasonably safe. diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake new file mode 100644 index 0000000..7182cdf --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake @@ -0,0 +1,67 @@ +set(failure_test_executables + ${CMAKE_CURRENT_BINARY_DIR}/failure_test_targets) +file(WRITE ${failure_test_executables} "") + +# Check if we should do anything. If the compiler doesn't support hidden +# visibility, the failure tests won't fail, so just write an empty targets +# list and punt. +if(NOT WIN32 AND NOT CYGWIN AND NOT COMPILER_HAS_HIDDEN_VISIBILITY) + return() +endif() + +# Read the input source file +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/exportheader_test.cpp content_post) +set(content_pre "") + +# Generate source files for failure test executables +set(counter 0) +while(1) + # Find first occurrence of link error marker in remaining content + string(REGEX MATCH "//([^;\n]+;) LINK ERROR( [(][^)]+[)])?\n(.*)" + match "${content_post}") + if(match STREQUAL "") + # No more matches + break() + endif() + + # Shift content buffers and extract failing statement + string(LENGTH "${content_post}" content_post_length) + string(LENGTH "${match}" matched_length) + math(EXPR shift_length "${content_post_length} - ${matched_length}") + + string(SUBSTRING "${content_post}" 0 ${shift_length} shift) + set(content_pre "${content_pre}${shift}") + set(content_post "${CMAKE_MATCH_3}") + set(content_active "//${CMAKE_MATCH_1} LINK ERROR${CMAKE_MATCH_2}") + set(statement "${CMAKE_MATCH_1}") + + # Check if potential error is conditional, and evaluate condition if so + string(REGEX REPLACE " [(]([^)]+)[)]" "\\1" condition "${CMAKE_MATCH_2}") + if(NOT condition STREQUAL "") + string(REGEX REPLACE " +" ";" condition "${condition}") + if(${condition}) + else() + message(STATUS "Not testing '${statement}'; " + "condition (${condition}) is FALSE") + set(content_pre "${content_pre}// link error removed\n") + continue() + endif() + endif() + + if(NOT skip) + message(STATUS "Creating failure test for '${statement}'") + math(EXPR counter "${counter} + 1") + + # Write new source file + set(out ${CMAKE_CURRENT_BINARY_DIR}/exportheader_failtest-${counter}.cpp) + file(WRITE ${out} "${content_pre}${statement}\n${content_post}") + + # Add executable for failure test + add_executable(GEH-fail-${counter} EXCLUDE_FROM_ALL ${out}) + target_link_libraries(GEH-fail-${counter} ${link_libraries}) + file(APPEND ${failure_test_executables} "GEH-fail-${counter}\n") + endif() + + # Add placeholder where failing statement was removed + set(content_pre "${content_pre}${content_active}\n") +endwhile() diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index ee0871b..cddba29 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -123,3 +123,5 @@ target_compile_definitions(GenerateExportHeader "SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\"" "BIN_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"" ) + +include(${CMAKE_CURRENT_LIST_DIR}/GEH-failures.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake index e534c1f..9423ef5 100644 --- a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake @@ -12,6 +12,16 @@ function(run_GEH) run_cmake(GEH) run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug) run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader) + + file(STRINGS "${RunCMake_TEST_BINARY_DIR}/failure_test_targets" + failure_test_targets) + + foreach(failure_test_target ${failure_test_targets}) + run_cmake_command(GEH-link-error ${CMAKE_COMMAND} + --build . + --config Debug + --target ${failure_test_target}) + endforeach() endfunction() run_GEH() diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp index 26bea7e..3a4e7dd 100644 --- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp @@ -3,14 +3,6 @@ #include "libstatic.h" -// #define BUILD_FAIL - -#ifndef BUILD_FAIL -#define DOES_NOT_BUILD(function) -#else -#define DOES_NOT_BUILD(function) function -#endif - #include #include #include @@ -69,32 +61,35 @@ int main() l.libshared_exported(); l.libshared_deprecated(); l.libshared_not_exported(); - - DOES_NOT_BUILD(l.libshared_excluded();) +#if defined(_WIN32) || defined(__CYGWIN__) + l.libshared_excluded(); +#else +// l.libshared_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN) +#endif } { LibsharedNotExported l; - DOES_NOT_BUILD(l.libshared();) + // l.libshared(); LINK ERROR l.libshared_exported(); l.libshared_deprecated(); - DOES_NOT_BUILD(l.libshared_not_exported();) - DOES_NOT_BUILD(l.libshared_excluded();) + // l.libshared_not_exported(); LINK ERROR + // l.libshared_excluded(); LINK ERROR } { LibsharedExcluded l; - DOES_NOT_BUILD(l.libshared();) + // l.libshared(); LINK ERROR l.libshared_exported(); l.libshared_deprecated(); - DOES_NOT_BUILD(l.libshared_not_exported();) - DOES_NOT_BUILD(l.libshared_excluded();) + // l.libshared_not_exported(); LINK ERROR + // l.libshared_excluded(); LINK ERROR } libshared_exported(); libshared_deprecated(); - DOES_NOT_BUILD(libshared_not_exported();) - DOES_NOT_BUILD(libshared_excluded();) + // libshared_not_exported(); LINK ERROR + // libshared_excluded(); LINK ERROR { Libstatic l; @@ -128,10 +123,12 @@ int main() libstatic_not_exported(); libstatic_excluded(); +#if defined(SRC_DIR) && defined(BIN_DIR) compare(SRC_DIR "/libshared_export.h", BIN_DIR "/libshared/libshared_export.h"); compare(SRC_DIR "/libstatic_export.h", BIN_DIR "/libstatic/libstatic_export.h"); +#endif return 0; } ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 11:44:52 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 11:44:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1951-gfc24ddf Message-ID: <20160912154452.CA2DCE5D24@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, next has been updated via fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56 (commit) via 9370b697e994e3b85549f07cbd54223e3e5d714f (commit) from 0d40713426baaf6368eea90012c431656501d28d (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=fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56 commit fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56 Merge: 0d40713 9370b69 Author: Brad King AuthorDate: Mon Sep 12 11:44:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 11:44:52 2016 -0400 Merge topic 'link-generated-rpaths-first' into next 9370b697 Re-order link line to place RPATH entries before libraries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9370b697e994e3b85549f07cbd54223e3e5d714f commit 9370b697e994e3b85549f07cbd54223e3e5d714f Author: Dan Kegel AuthorDate: Fri Sep 9 13:45:41 2016 -0700 Commit: Brad King CommitDate: Mon Sep 12 10:51:18 2016 -0400 Re-order link line to place RPATH entries before libraries Since we support adding arbitrary flags to the link line via `target_link_libraries` the project/user may add their own RPATH flags (typically for system library locations). Re-order the link line to place our generated RPATH entries before the libraries so that they also come before flag-specified entries. Otherwise our in-build-tree RPATH entries may not be preferred by the dynamic loader and we could collide with libraries in the system directories. Closes: #16293 diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 694a9f6..c0ecba3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1531,9 +1531,6 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, linkLibs += " "; } - // Write the library flags to the build rule. - fout << linkLibs; - // Check what kind of rpath flags to use. if (cli.GetRuntimeSep().empty()) { // Each rpath entry gets its own option ("-R a -R b -R c") @@ -1560,6 +1557,9 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, } } + // Write the library flags to the build rule. + fout << linkLibs; + // Add the linker runtime search path if any. std::string rpath_link = cli.GetRPathLinkString(); if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) { ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 11:54:32 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 11:54:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1953-gca8727a Message-ID: <20160912155432.A0D1EF57D1@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, next has been updated via ca8727ae1c08f29308875d06bee274c6e7c039f7 (commit) via 4f349a8656e4652edacad787d38834255f13a0a5 (commit) from fc24ddfc9b93d8a7c4ca1ab8fe5c4a50804a0a56 (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=ca8727ae1c08f29308875d06bee274c6e7c039f7 commit ca8727ae1c08f29308875d06bee274c6e7c039f7 Merge: fc24ddf 4f349a8 Author: Brad King AuthorDate: Mon Sep 12 11:54:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 11:54:32 2016 -0400 Merge topic 'doc-separate_arguments-formatting' into next 4f349a86 Help: Fix formatting in separate_arguments documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f349a8656e4652edacad787d38834255f13a0a5 commit 4f349a8656e4652edacad787d38834255f13a0a5 Author: James Touton AuthorDate: Sun Sep 11 21:23:24 2016 -0700 Commit: Brad King CommitDate: Mon Sep 12 11:53:21 2016 -0400 Help: Fix formatting in separate_arguments documentation Make backslashes visible in the text. Rename VARIABLE to in second signature for consistency with the first signature. Add link to referenced MSDN documentation. diff --git a/Help/command/separate_arguments.rst b/Help/command/separate_arguments.rst index 0e3e5a5..1fd3cd1 100644 --- a/Help/command/separate_arguments.rst +++ b/Help/command/separate_arguments.rst @@ -13,19 +13,21 @@ entire command line must be given in one "" argument. The ``UNIX_COMMAND`` mode separates arguments by unquoted whitespace. It recognizes both single-quote and double-quote pairs. A backslash -escapes the next literal character (\" is "); there are no special -escapes (\n is just n). +escapes the next literal character (``\"`` is ``"``); there are no special +escapes (``\n`` is just ``n``). The ``WINDOWS_COMMAND`` mode parses a windows command-line using the same syntax the runtime library uses to construct argv at startup. It separates arguments by whitespace that is not double-quoted. Backslashes are literal unless they precede double-quotes. See the -MSDN article "Parsing C Command-Line Arguments" for details. +MSDN article `Parsing C Command-Line Arguments`_ for details. + +.. _`Parsing C Command-Line Arguments`: https://msdn.microsoft.com/library/a1y7w461.aspx :: - separate_arguments(VARIABLE) + separate_arguments() -Convert the value of ``VARIABLE`` to a semi-colon separated list. All +Convert the value of ```` to a semi-colon separated list. All spaces are replaced with ';'. This helps with generating command lines. ----------------------------------------------------------------------- Summary of changes: Help/command/separate_arguments.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 11:57:17 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 11:57:17 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-925-ga7305ef Message-ID: <20160912155717.EEAA5F58C8@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 a7305ef00a70518f7abb66211ef09b0ca6d4af71 (commit) via 612d6f29f8743ec100f135aed55d0920b3ea9fda (commit) via ce76abb4c49a85d491a99318637c6e9e37729f6e (commit) via 8f95b93b41622d428522ae10cfe1bc2fde13c78c (commit) from 03bae46865f2abb3a74728986f523a30d79eb095 (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=a7305ef00a70518f7abb66211ef09b0ca6d4af71 commit a7305ef00a70518f7abb66211ef09b0ca6d4af71 Merge: 03bae46 612d6f2 Author: Brad King AuthorDate: Mon Sep 12 11:57:15 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 11:57:15 2016 -0400 Merge topic 'geh-failure-tests' 612d6f29 Tests: Refactor GenerateExportHeader test code ce76abb4 Tests: Add data symbols to GenerateExportHeader test 8f95b93b Tests: Add failure test for GenerateExportHeader ----------------------------------------------------------------------- Summary of changes: .../GenerateExportHeader/GEH-failures.cmake | 67 ++++++++++ .../GEH-link-error-result.txt} | 0 ...-build-stderr.txt => GEH-link-error-stderr.txt} | 0 Tests/RunCMake/GenerateExportHeader/GEH.cmake | 2 + .../GenerateExportHeader/RunCMakeTest.cmake | 10 ++ .../GenerateExportHeader/exportheader_test.cpp | 138 ++++++++++++-------- .../lib_shared_and_static/libshared_and_static.cpp | 65 +++++---- .../lib_shared_and_static/libshared_and_static.h | 85 +++++++----- .../GenerateExportHeader/libshared/libshared.cpp | 65 +++++---- .../GenerateExportHeader/libshared/libshared.h | 71 ++++++---- .../GenerateExportHeader/libstatic/libstatic.cpp | 68 +++++++--- .../GenerateExportHeader/libstatic/libstatic.h | 75 +++++++---- 12 files changed, 443 insertions(+), 203 deletions(-) create mode 100644 Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake copy Tests/RunCMake/{CMP0060/CMP0060-OLD-Build-result.txt => GenerateExportHeader/GEH-link-error-result.txt} (100%) copy Tests/RunCMake/GenerateExportHeader/{GEH-build-stderr.txt => GEH-link-error-stderr.txt} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 11:57:34 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 11:57:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1955-g9a6ada8 Message-ID: <20160912155734.67649F58CF@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, next has been updated via 9a6ada8bb11f910c752cc53a623bf21058b4ca70 (commit) via a7305ef00a70518f7abb66211ef09b0ca6d4af71 (commit) from ca8727ae1c08f29308875d06bee274c6e7c039f7 (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=9a6ada8bb11f910c752cc53a623bf21058b4ca70 commit 9a6ada8bb11f910c752cc53a623bf21058b4ca70 Merge: ca8727a a7305ef Author: Brad King AuthorDate: Mon Sep 12 11:57:25 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 11:57:25 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 13:25:53 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 13:25:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1958-gb727346 Message-ID: <20160912172553.48CEBF59C0@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, next has been updated via b727346b4081504076b8fd48550325fa7eb31496 (commit) via b7142b44279f5099047bfdb63316cf85e9cb6903 (commit) via fc45ed9c6a9eac8ff21348014e4a732e97fcdaff (commit) from 9a6ada8bb11f910c752cc53a623bf21058b4ca70 (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=b727346b4081504076b8fd48550325fa7eb31496 commit b727346b4081504076b8fd48550325fa7eb31496 Merge: 9a6ada8 b7142b4 Author: Brad King AuthorDate: Mon Sep 12 13:25:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 13:25:51 2016 -0400 Merge topic 'update-kwsys' into next b7142b44 Merge branch 'upstream-KWSys' into update-kwsys fc45ed9c KWSys 2016-09-09 (669e3a06) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7142b44279f5099047bfdb63316cf85e9cb6903 commit b7142b44279f5099047bfdb63316cf85e9cb6903 Merge: a7305ef fc45ed9 Author: Brad King AuthorDate: Mon Sep 12 13:14:58 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 13:14:58 2016 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2016-09-09 (669e3a06) diff --cc Source/kwsys/ConsoleBuf.hxx.in index 0000000,8aeeda1..8aeeda1 mode 000000,100644..100644 --- a/Source/kwsys/ConsoleBuf.hxx.in +++ b/Source/kwsys/ConsoleBuf.hxx.in diff --cc Source/kwsys/testConsoleBuf.cxx index 0000000,591a2d1..591a2d1 mode 000000,100644..100644 --- a/Source/kwsys/testConsoleBuf.cxx +++ b/Source/kwsys/testConsoleBuf.cxx diff --cc Source/kwsys/testConsoleBuf.hxx index 0000000,855028b..855028b mode 000000,100644..100644 --- a/Source/kwsys/testConsoleBuf.hxx +++ b/Source/kwsys/testConsoleBuf.hxx diff --cc Source/kwsys/testConsoleBufChild.cxx index 0000000,3b9ab71..3b9ab71 mode 000000,100644..100644 --- a/Source/kwsys/testConsoleBufChild.cxx +++ b/Source/kwsys/testConsoleBufChild.cxx https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc45ed9c6a9eac8ff21348014e4a732e97fcdaff commit fc45ed9c6a9eac8ff21348014e4a732e97fcdaff Author: KWSys Upstream AuthorDate: Fri Sep 9 15:24:24 2016 +0300 Commit: Brad King CommitDate: Mon Sep 12 13:14:35 2016 -0400 KWSys 2016-09-09 (669e3a06) Code extracted from: http://public.kitware.com/KWSys.git at commit 669e3a069e309eba155faf3a2af85802147a18a7 (master). Upstream Shortlog ----------------- D?vis Mos?ns (1): 669e3a06 ConsoleBuf: Use a custom std::streambuf for console output on Windows diff --git a/CMakeLists.txt b/CMakeLists.txt index 87f6048..c4fe5e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_USE_FStream 1) SET(KWSYS_USE_String 1) SET(KWSYS_USE_SystemInformation 1) + SET(KWSYS_USE_ConsoleBuf 1) ENDIF() # Enforce component dependencies. @@ -154,6 +155,9 @@ ENDIF() IF(KWSYS_USE_FStream) SET(KWSYS_USE_Encoding 1) ENDIF() +IF(KWSYS_USE_ConsoleBuf) + SET(KWSYS_USE_Encoding 1) +ENDIF() # Setup the large file support default. IF(KWSYS_LFS_DISABLE) @@ -673,7 +677,7 @@ SET(KWSYS_HXX_FILES Configure String # Add selected C++ classes. SET(cppclasses Directory DynamicLoader Encoding Glob RegularExpression SystemTools - CommandLineArguments IOStream FStream SystemInformation + CommandLineArguments IOStream FStream SystemInformation ConsoleBuf ) FOREACH(cpp ${cppclasses}) IF(KWSYS_USE_${cpp}) @@ -926,6 +930,20 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) testFStream ) ENDIF() + IF(KWSYS_USE_ConsoleBuf) + ADD_EXECUTABLE(testConsoleBufChild testConsoleBufChild.cxx) + SET_PROPERTY(TARGET testConsoleBufChild PROPERTY LABELS ${KWSYS_LABELS_EXE}) + TARGET_LINK_LIBRARIES(testConsoleBufChild ${KWSYS_NAMESPACE}) + SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} + testConsoleBuf + ) + IF("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" AND + NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0") + set_property(SOURCE testConsoleBuf.cxx testConsoleBufChild.cxx PROPERTY COMPILE_FLAGS /utf-8) + ENDIF() + SET_PROPERTY(SOURCE testConsoleBuf.cxx APPEND PROPERTY COMPILE_DEFINITIONS + KWSYS_ENCODING_DEFAULT_CODEPAGE=${KWSYS_ENCODING_DEFAULT_CODEPAGE}) + ENDIF() IF(KWSYS_USE_SystemInformation) SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testSystemInformation) ENDIF() diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in new file mode 100644 index 0000000..8aeeda1 --- /dev/null +++ b/ConsoleBuf.hxx.in @@ -0,0 +1,348 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef @KWSYS_NAMESPACE at _ConsoleBuf_hxx +#define @KWSYS_NAMESPACE at _ConsoleBuf_hxx + +#include <@KWSYS_NAMESPACE@/Configure.hxx> +#include <@KWSYS_NAMESPACE@/Encoding.hxx> +#include +#include +#include +#include +#include +#include + +#if defined(_WIN32) +# include +# if __cplusplus >= 201103L +# include +# endif +#endif + +namespace @KWSYS_NAMESPACE@ +{ +#if defined(_WIN32) + + template > + class @KWSYS_NAMESPACE at _EXPORT BasicConsoleBuf : + public std::basic_streambuf { + public: + typedef typename Traits::int_type int_type; + typedef typename Traits::char_type char_type; + + class Manager { + public: + Manager(std::basic_ios &ios, const bool err = false) + : m_consolebuf(0) + { + m_ios = &ios; + try { + m_consolebuf = new BasicConsoleBuf(err); + m_streambuf = m_ios->rdbuf(m_consolebuf); + } catch (const std::runtime_error& ex) { + std::cerr << "Failed to create ConsoleBuf!" << std::endl + << ex.what() << std::endl; + }; + } + + ~Manager() + { + if (m_consolebuf) { + delete m_consolebuf; + m_ios->rdbuf(m_streambuf); + } + } + + private: + std::basic_ios *m_ios; + std::basic_streambuf *m_streambuf; + BasicConsoleBuf *m_consolebuf; + }; + + BasicConsoleBuf(const bool err = false) : + flush_on_newline(true), + input_pipe_codepage(0), + output_pipe_codepage(0), + input_file_codepage(CP_UTF8), + output_file_codepage(CP_UTF8), + m_consolesCodepage(0) + { + m_hInput = ::GetStdHandle(STD_INPUT_HANDLE); + checkHandle(true, "STD_INPUT_HANDLE"); + if (!setActiveInputCodepage()) { + throw std::runtime_error("setActiveInputCodepage failed!"); + } + m_hOutput = err ? ::GetStdHandle(STD_ERROR_HANDLE) : + ::GetStdHandle(STD_OUTPUT_HANDLE); + checkHandle(false, err ? "STD_ERROR_HANDLE" : "STD_OUTPUT_HANDLE"); + if (!setActiveOutputCodepage()) { + throw std::runtime_error("setActiveOutputCodepage failed!"); + } + _setg(); + _setp(); + } + + ~BasicConsoleBuf() throw() + { + sync(); + } + + bool activateCodepageChange() + { + return setActiveInputCodepage() && setActiveOutputCodepage(); + } + + protected: + virtual int sync() { + bool success = true; + if (m_hInput && m_isConsoleInput && + ::FlushConsoleInputBuffer(m_hInput) == 0) { + success = false; + } + if (m_hOutput && !m_obuffer.empty()) { + const std::wstring wbuffer = getBuffer(m_obuffer); + if (m_isConsoleOutput) { + DWORD charsWritten; + success = ::WriteConsoleW(m_hOutput, wbuffer.c_str(), + (DWORD)wbuffer.size(), &charsWritten, + NULL) == 0 ? false : true; + } else { + DWORD bytesWritten; + std::string buffer; + success = encodeOutputBuffer(wbuffer, buffer); + if (success) { + success = ::WriteFile(m_hOutput, buffer.c_str(), + (DWORD)buffer.size(), &bytesWritten, + NULL) == 0 ? false : true; + } + } + } + m_ibuffer.clear(); + m_obuffer.clear(); + _setg(); + _setp(); + return success ? 0 : -1; + } + + virtual int_type underflow() { + if (this->gptr() >= this->egptr()) { + if (!m_hInput) { + _setg(true); + return Traits::eof(); + } + if (m_isConsoleInput) { + wchar_t wbuffer[128]; + DWORD charsRead; + if (::ReadConsoleW(m_hInput, wbuffer, (sizeof(wbuffer) / sizeof(wbuffer[0])) - 1, + &charsRead, NULL) == 0 || charsRead == 0) { + _setg(true); + return Traits::eof(); + } + wbuffer[charsRead] = L'\0'; + setBuffer(wbuffer, m_ibuffer); + } else { + std::wstring totalBuffer; + std::wstring wbuffer; + char buffer[128]; + DWORD bytesRead; + while (::ReadFile(m_hInput, buffer, (sizeof(buffer) / sizeof(buffer[0])) - 1, + &bytesRead, NULL) == 0) { + if (::GetLastError() == ERROR_MORE_DATA) { + buffer[bytesRead] = '\0'; + if (decodeInputBuffer(buffer, wbuffer)) { + totalBuffer += wbuffer; + continue; + } + } + _setg(true); + return Traits::eof(); + } + buffer[bytesRead] = '\0'; + if (!decodeInputBuffer(buffer, wbuffer)) { + _setg(true); + return Traits::eof(); + } + totalBuffer += wbuffer; + setBuffer(totalBuffer, m_ibuffer); + } + _setg(); + } + return Traits::to_int_type(*this->gptr()); + } + + virtual int_type overflow(int_type ch = Traits::eof()) { + if (!Traits::eq_int_type(ch, Traits::eof())) { + char_type chr = Traits::to_char_type(ch); + m_obuffer += chr; + if ((flush_on_newline && Traits::eq(chr, '\n')) || + Traits::eq_int_type(ch, 0x00)) { + sync(); + } + return ch; + } + sync(); + return Traits::eof(); + } + + public: + bool flush_on_newline; + UINT input_pipe_codepage; + UINT output_pipe_codepage; + UINT input_file_codepage; + UINT output_file_codepage; + + private: + HANDLE m_hInput; + HANDLE m_hOutput; + std::basic_string m_ibuffer; + std::basic_string m_obuffer; + bool m_isConsoleInput; + bool m_isConsoleOutput; + UINT m_activeInputCodepage; + UINT m_activeOutputCodepage; + UINT m_consolesCodepage; + void checkHandle(bool input, std::string handleName) { + if ((input && m_hInput == INVALID_HANDLE_VALUE) || + (!input && m_hOutput == INVALID_HANDLE_VALUE)) { + std::string errmsg = "GetStdHandle(" + handleName + + ") returned INVALID_HANDLE_VALUE"; +#if __cplusplus >= 201103L + throw std::system_error(::GetLastError(), + std::system_category(), errmsg); +#else + throw std::runtime_error(errmsg); +#endif + } + } + UINT getConsolesCodepage() { + if (!m_consolesCodepage) { + m_consolesCodepage = GetConsoleCP(); + if (!m_consolesCodepage) { + m_consolesCodepage = GetACP(); + } + } + return m_consolesCodepage; + } + bool setActiveInputCodepage() { + m_isConsoleInput = false; + switch (GetFileType(m_hInput)) { + case FILE_TYPE_DISK: + m_activeInputCodepage = input_file_codepage; + break; + case FILE_TYPE_CHAR: + m_isConsoleInput = true; + break; + case FILE_TYPE_PIPE: + m_activeInputCodepage = input_pipe_codepage; + break; + default: + return false; + } + if (!m_isConsoleInput && m_activeInputCodepage == 0) { + m_activeInputCodepage = getConsolesCodepage(); + } + return true; + } + bool setActiveOutputCodepage() { + m_isConsoleOutput = false; + switch (GetFileType(m_hOutput)) { + case FILE_TYPE_DISK: + m_activeOutputCodepage = output_file_codepage; + break; + case FILE_TYPE_CHAR: + m_isConsoleOutput = true; + break; + case FILE_TYPE_PIPE: + m_activeOutputCodepage = output_pipe_codepage; + break; + default: + return false; + } + if (!m_isConsoleOutput && m_activeOutputCodepage == 0) { + m_activeOutputCodepage = getConsolesCodepage(); + } + return true; + } + void _setg(bool empty = false) { + if (!empty) { + this->setg((char_type *)m_ibuffer.data(), + (char_type *)m_ibuffer.data(), + (char_type *)m_ibuffer.data() + m_ibuffer.size()); + } else { + this->setg((char_type *)m_ibuffer.data(), + (char_type *)m_ibuffer.data() + m_ibuffer.size(), + (char_type *)m_ibuffer.data() + m_ibuffer.size()); + } + } + void _setp() { + this->setp((char_type *)m_obuffer.data(), + (char_type *)m_obuffer.data() + m_obuffer.size()); + } + bool encodeOutputBuffer(const std::wstring wbuffer, + std::string &buffer) { + const int length = WideCharToMultiByte(m_activeOutputCodepage, 0, + wbuffer.c_str(), + (int)wbuffer.size(), NULL, 0, + NULL, NULL); + char *buf = new char[length + 1]; + const bool success = WideCharToMultiByte(m_activeOutputCodepage, 0, + wbuffer.c_str(), + (int)wbuffer.size(), buf, + length, NULL, NULL) > 0 + ? true : false; + buf[length] = '\0'; + buffer = buf; + delete[] buf; + return success; + } + bool decodeInputBuffer(const char *buffer, std::wstring &wbuffer) { + int actualCodepage = m_activeInputCodepage; + const char BOM_UTF8[] = { char(0xEF), char(0xBB), char(0xBF) }; + if (std::memcmp(buffer, BOM_UTF8, sizeof(BOM_UTF8)) == 0) { + // PowerShell uses UTF-8 with BOM for pipes + actualCodepage = CP_UTF8; + buffer += sizeof(BOM_UTF8); + } + const int wlength = MultiByteToWideChar(actualCodepage, 0, buffer, + -1, NULL, 0); + wchar_t *wbuf = new wchar_t[wlength]; + const bool success = MultiByteToWideChar(actualCodepage, 0, buffer, + -1, wbuf, wlength) > 0 + ? true : false; + wbuffer = wbuf; + delete[] wbuf; + return success; + } + std::wstring getBuffer(const std::basic_string buffer) { + return Encoding::ToWide(buffer); + } + std::wstring getBuffer(const std::basic_string buffer) { + return buffer; + } + void setBuffer(const std::wstring wbuffer, + std::basic_string &target) { + target = Encoding::ToNarrow(wbuffer); + } + void setBuffer(const std::wstring wbuffer, + std::basic_string &target) { + target = wbuffer; + } + + }; // BasicConsoleBuf class + + typedef BasicConsoleBuf ConsoleBuf; + typedef BasicConsoleBuf WConsoleBuf; + +#endif +} // KWSYS_NAMESPACE + +#endif diff --git a/testConsoleBuf.cxx b/testConsoleBuf.cxx new file mode 100644 index 0000000..591a2d1 --- /dev/null +++ b/testConsoleBuf.cxx @@ -0,0 +1,603 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "kwsysPrivate.h" + +#include KWSYS_HEADER(Encoding.hxx) + +// Work-around CMake dependency scanning limitation. This must +// duplicate the above list of headers. +#if 0 +# include "Encoding.hxx.in" +#endif + +#if defined(_WIN32) + +#include +#include +#include +#include +#include +#include "testConsoleBuf.hxx" + +#if defined(_MSC_VER) && _MSC_VER >= 1800 +# define KWSYS_WINDOWS_DEPRECATED_GetVersion +#endif +// ??????? +static const WCHAR UnicodeInputTestString[] = L"\u064A\u0648\u0646\u064A\u0643\u0648\u062F!"; +static UINT TestCodepage = KWSYS_ENCODING_DEFAULT_CODEPAGE; + +static const DWORD waitTimeout = 10 * 1000; +static STARTUPINFO startupInfo; +static PROCESS_INFORMATION processInfo; +static HANDLE syncEvent; +static std::string encodedInputTestString; +static std::string encodedTestString; + +//---------------------------------------------------------------------------- +static bool createProcess(HANDLE hIn, HANDLE hOut, HANDLE hErr) +{ + BOOL bInheritHandles = FALSE; + DWORD dwCreationFlags = 0; + memset(&processInfo, 0, sizeof(processInfo)); + memset(&startupInfo, 0, sizeof(startupInfo)); + startupInfo.cb = sizeof(startupInfo); + startupInfo.dwFlags = STARTF_USESHOWWINDOW; + startupInfo.wShowWindow = SW_HIDE; + if (hIn || hOut || hErr) { + startupInfo.dwFlags |= STARTF_USESTDHANDLES; + startupInfo.hStdInput = hIn; + startupInfo.hStdOutput = hOut; + startupInfo.hStdError = hErr; + bInheritHandles = TRUE; + } + + WCHAR cmd[MAX_PATH]; + if (GetModuleFileNameW(NULL, cmd, MAX_PATH) == 0) { + std::cerr << "GetModuleFileName failed!" << std::endl; + return false; + } + WCHAR *p = cmd + wcslen(cmd); + while (p > cmd && *p != L'\\') p--; + *(p+1) = 0; + wcscat(cmd, cmdConsoleBufChild); + wcscat(cmd, L".exe"); + + bool success = CreateProcessW(NULL, // No module name (use command line) + cmd, // Command line + NULL, // Process handle not inheritable + NULL, // Thread handle not inheritable + bInheritHandles, // Set handle inheritance + dwCreationFlags, + NULL, // Use parent's environment block + NULL, // Use parent's starting directory + &startupInfo, // Pointer to STARTUPINFO structure + &processInfo) != 0; // Pointer to PROCESS_INFORMATION structure + if (!success) { + DWORD lastError = GetLastError(); + std::cerr.setf(std::ios::hex, std::ios::basefield); + std::cerr << "CreateProcess(" << kwsys::Encoding::ToNarrow(cmd) + << ") failed with error: 0x" << lastError << "!" << std::endl; + LPWSTR message; + if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + lastError, + 0, + (LPWSTR)&message, 0, + NULL) + ) { + std::cerr << "Error message: " << kwsys::Encoding::ToNarrow(message) << std::endl; + HeapFree(GetProcessHeap(), 0, message); + } else { + std::cerr << "FormatMessage() failed with error: 0x" << GetLastError() << "!" << std::endl; + } + std::cerr.unsetf(std::ios::hex); + } + return success; +} + +//---------------------------------------------------------------------------- +static void finishProcess(bool success) +{ + if (success) { + success = WaitForSingleObject(processInfo.hProcess, waitTimeout) + == WAIT_OBJECT_0; + }; + if (!success) { + TerminateProcess(processInfo.hProcess, 1); + } + CloseHandle(processInfo.hProcess); + CloseHandle(processInfo.hThread); +} + +//---------------------------------------------------------------------------- +static bool createPipe(PHANDLE readPipe, PHANDLE writePipe) +{ + SECURITY_ATTRIBUTES securityAttributes; + securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + securityAttributes.bInheritHandle = TRUE; + securityAttributes.lpSecurityDescriptor = NULL; + return CreatePipe(readPipe, writePipe, &securityAttributes, 0) == 0 + ? false : true; +} + +//---------------------------------------------------------------------------- +static void finishPipe(HANDLE readPipe, HANDLE writePipe) +{ + if (readPipe != INVALID_HANDLE_VALUE) { + CloseHandle(readPipe); + } + if (writePipe != INVALID_HANDLE_VALUE) { + CloseHandle(writePipe); + } +} + +//---------------------------------------------------------------------------- +static HANDLE createFile(LPCWSTR fileName) +{ + SECURITY_ATTRIBUTES securityAttributes; + securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + securityAttributes.bInheritHandle = TRUE; + securityAttributes.lpSecurityDescriptor = NULL; + + HANDLE file = CreateFileW(fileName, + GENERIC_READ | GENERIC_WRITE, + 0, // do not share + &securityAttributes, + CREATE_ALWAYS, // overwrite existing + FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, + NULL); // no template + if (file == INVALID_HANDLE_VALUE) { + std::cerr << "CreateFile(" << kwsys::Encoding::ToNarrow(fileName) + << ") failed!" << std::endl; + } + return file; +} + +//---------------------------------------------------------------------------- +static void finishFile(HANDLE file) +{ + if (file != INVALID_HANDLE_VALUE) { + CloseHandle(file); + } +} + +//---------------------------------------------------------------------------- + +#ifndef MAPVK_VK_TO_VSC +# define MAPVK_VK_TO_VSC (0) +#endif + +static void writeInputKeyEvent(INPUT_RECORD inputBuffer[], WCHAR chr) +{ + inputBuffer[0].EventType = KEY_EVENT; + inputBuffer[0].Event.KeyEvent.bKeyDown = TRUE; + inputBuffer[0].Event.KeyEvent.wRepeatCount = 1; + SHORT keyCode = VkKeyScanW(chr); + if (keyCode == -1) { + // Character can't be entered with current keyboard layout + // Just set any, it doesn't really matter + keyCode = 'K'; + } + inputBuffer[0].Event.KeyEvent.wVirtualKeyCode = LOBYTE(keyCode); + inputBuffer[0].Event.KeyEvent.wVirtualScanCode = + MapVirtualKey(inputBuffer[0].Event.KeyEvent.wVirtualKeyCode, + MAPVK_VK_TO_VSC); + inputBuffer[0].Event.KeyEvent.uChar.UnicodeChar = chr; + inputBuffer[0].Event.KeyEvent.dwControlKeyState = 0; + if ((HIBYTE(keyCode) & 1) == 1) { + inputBuffer[0].Event.KeyEvent.dwControlKeyState |= SHIFT_PRESSED; + } + if ((HIBYTE(keyCode) & 2) == 2) { + inputBuffer[0].Event.KeyEvent.dwControlKeyState |= RIGHT_CTRL_PRESSED; + } + if ((HIBYTE(keyCode) & 4) == 4) { + inputBuffer[0].Event.KeyEvent.dwControlKeyState |= RIGHT_ALT_PRESSED; + } + inputBuffer[1].EventType = inputBuffer[0].EventType; + inputBuffer[1].Event.KeyEvent.bKeyDown = FALSE; + inputBuffer[1].Event.KeyEvent.wRepeatCount = 1; + inputBuffer[1].Event.KeyEvent.wVirtualKeyCode = inputBuffer[0].Event. + KeyEvent.wVirtualKeyCode; + inputBuffer[1].Event.KeyEvent.wVirtualScanCode = inputBuffer[0].Event. + KeyEvent.wVirtualScanCode; + inputBuffer[1].Event.KeyEvent.uChar.UnicodeChar = inputBuffer[0].Event. + KeyEvent.uChar.UnicodeChar; + inputBuffer[1].Event.KeyEvent.dwControlKeyState = 0; +} + +//---------------------------------------------------------------------------- +static int testPipe() +{ + int didFail = 1; + HANDLE inPipeRead = INVALID_HANDLE_VALUE; + HANDLE inPipeWrite = INVALID_HANDLE_VALUE; + HANDLE outPipeRead = INVALID_HANDLE_VALUE; + HANDLE outPipeWrite = INVALID_HANDLE_VALUE; + HANDLE errPipeRead = INVALID_HANDLE_VALUE; + HANDLE errPipeWrite = INVALID_HANDLE_VALUE; + UINT currentCodepage = GetConsoleCP(); + char buffer[200]; + try { + if (!createPipe(&inPipeRead, &inPipeWrite) || + !createPipe(&outPipeRead, &outPipeWrite) || + !createPipe(&errPipeRead, &errPipeWrite)) { + throw std::runtime_error("createFile failed!"); + } + if (TestCodepage == CP_ACP) { + TestCodepage = GetACP(); + } + if (!SetConsoleCP(TestCodepage)) { + throw std::runtime_error("SetConsoleCP failed!"); + } + + DWORD bytesWritten = 0; + if (!WriteFile(inPipeWrite, encodedInputTestString.c_str(), + (DWORD)encodedInputTestString.size(), &bytesWritten, NULL) + || bytesWritten == 0) { + throw std::runtime_error("WriteFile failed!"); + } + + if (createProcess(inPipeRead, outPipeWrite, errPipeWrite)) { + try { + Sleep(100); + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + DWORD bytesRead = 0; + if (!ReadFile(outPipeRead, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + if ((bytesRead < encodedTestString.size() + 1 + encodedInputTestString.size() + && !ReadFile(outPipeRead, buffer + bytesRead, + sizeof(buffer) - bytesRead, &bytesRead, NULL)) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + if (memcmp(buffer, encodedTestString.c_str(), + encodedTestString.size()) == 0 && + memcmp(buffer + encodedTestString.size() + 1, + encodedInputTestString.c_str(), + encodedInputTestString.size()) == 0) { + bytesRead = 0; + if (!ReadFile(errPipeRead, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + buffer[bytesRead - 1] = 0; + didFail = encodedTestString.compare(buffer) == 0 ? 0 : 1; + } + if (didFail != 0) { + std::cerr << "Pipe's output didn't match expected output!" << std::endl << std::flush; + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishProcess(didFail == 0); + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishPipe(inPipeRead, inPipeWrite); + finishPipe(outPipeRead, outPipeWrite); + finishPipe(errPipeRead, errPipeWrite); + SetConsoleCP(currentCodepage); + return didFail; +} + +//---------------------------------------------------------------------------- +static int testFile() +{ + int didFail = 1; + HANDLE inFile = INVALID_HANDLE_VALUE; + HANDLE outFile = INVALID_HANDLE_VALUE; + HANDLE errFile = INVALID_HANDLE_VALUE; + try { + if ((inFile = createFile(L"stdinFile.txt")) == INVALID_HANDLE_VALUE || + (outFile = createFile(L"stdoutFile.txt")) == INVALID_HANDLE_VALUE || + (errFile = createFile(L"stderrFile.txt")) == INVALID_HANDLE_VALUE) { + throw std::runtime_error("createFile failed!"); + } + int length = 0; + DWORD bytesWritten = 0; + char buffer[200]; + + if ((length = WideCharToMultiByte(TestCodepage, 0, UnicodeInputTestString, -1, + buffer, sizeof(buffer), + NULL, NULL)) == 0) { + throw std::runtime_error("WideCharToMultiByte failed!"); + } + buffer[length - 1] = '\n'; + if (!WriteFile(inFile, buffer, length, &bytesWritten, NULL) + || bytesWritten == 0) { + throw std::runtime_error("WriteFile failed!"); + } + if (SetFilePointer(inFile, 0, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER) { + throw std::runtime_error("SetFilePointer failed!"); + } + + if (createProcess(inFile, outFile, errFile)) { + DWORD bytesRead = 0; + try { + Sleep(100); + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + if (SetFilePointer(outFile, 0, 0, FILE_BEGIN) + == INVALID_SET_FILE_POINTER) { + throw std::runtime_error("SetFilePointer failed!"); + } + if (!ReadFile(outFile, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + buffer[bytesRead - 1] = 0; + if (memcmp(buffer, encodedTestString.c_str(), + encodedTestString.size()) == 0 && + memcmp(buffer + encodedTestString.size() + 1, + encodedInputTestString.c_str(), + encodedInputTestString.size() - 1) == 0) { + bytesRead = 0; + if (SetFilePointer(errFile, 0, 0, FILE_BEGIN) + == INVALID_SET_FILE_POINTER) { + throw std::runtime_error("SetFilePointer failed!"); + } + if (!ReadFile(errFile, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + buffer[bytesRead - 1] = 0; + didFail = encodedTestString.compare(buffer) == 0 ? 0 : 1; + } + if (didFail != 0) { + std::cerr << "File's output didn't match expected output!" << std::endl << std::flush; + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishProcess(didFail == 0); + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishFile(inFile); + finishFile(outFile); + finishFile(errFile); + return didFail; +} + +#ifndef _WIN32_WINNT_VISTA +# define _WIN32_WINNT_VISTA 0x0600 +#endif + +//---------------------------------------------------------------------------- +static int testConsole() +{ + int didFail = 1; + HANDLE parentIn = GetStdHandle(STD_INPUT_HANDLE); + HANDLE parentOut = GetStdHandle(STD_OUTPUT_HANDLE); + HANDLE parentErr = GetStdHandle(STD_ERROR_HANDLE); + HANDLE hIn = parentIn; + HANDLE hOut = parentOut; + DWORD consoleMode; + bool newConsole = false; + bool forceNewConsole = false; + bool restoreConsole = false; + LPCWSTR TestFaceName = L"Lucida Console"; + const DWORD TestFontFamily = 0x00000036; + const DWORD TestFontSize = 0x000c0000; + HKEY hConsoleKey; + WCHAR FaceName[200]; + DWORD FaceNameSize = sizeof(FaceName); + DWORD FontFamily = TestFontFamily; + DWORD FontSize = TestFontSize; +#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersion +# pragma warning (push) +# ifdef __INTEL_COMPILER +# pragma warning (disable:1478) +# else +# pragma warning (disable:4996) +# endif +#endif + const bool isVistaOrGreater = LOBYTE(LOWORD(GetVersion())) >= HIBYTE(_WIN32_WINNT_VISTA); +#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersion +# pragma warning (pop) +#endif + if (!isVistaOrGreater) { + if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Console", 0, KEY_READ | KEY_WRITE, + &hConsoleKey) == ERROR_SUCCESS) { + DWORD dwordSize = sizeof(DWORD); + if (RegQueryValueExW(hConsoleKey, L"FontFamily", NULL, NULL, + (LPBYTE)&FontFamily, &dwordSize) == ERROR_SUCCESS) { + if (FontFamily != TestFontFamily) { + RegQueryValueExW(hConsoleKey, L"FaceName", NULL, NULL, + (LPBYTE)FaceName, &FaceNameSize); + RegQueryValueExW(hConsoleKey, L"FontSize", NULL, NULL, + (LPBYTE)&FontSize, &dwordSize); + + RegSetValueExW(hConsoleKey, L"FontFamily", 0, REG_DWORD, + (BYTE *)&TestFontFamily, sizeof(TestFontFamily)); + RegSetValueExW(hConsoleKey, L"FaceName", 0, REG_SZ, + (BYTE *)TestFaceName, (DWORD)((wcslen(TestFaceName) + 1) * sizeof(WCHAR))); + RegSetValueExW(hConsoleKey, L"FontSize", 0, REG_DWORD, + (BYTE *)&TestFontSize, sizeof(TestFontSize)); + + restoreConsole = true; + forceNewConsole = true; + } + } else { + std::cerr << "RegGetValueW(FontFamily) failed!" << std::endl << std::flush; + } + RegCloseKey(hConsoleKey); + } else { + std::cerr << "RegOpenKeyExW(HKEY_CURRENT_USER\\Console) failed!" << std::endl << std::flush; + } + } + if (forceNewConsole || GetConsoleMode(parentOut, &consoleMode) == 0) { + // Not a real console, let's create new one. + FreeConsole(); + if (!AllocConsole()) { + std::cerr << "AllocConsole failed!" << std::endl << std::flush; + return didFail; + } + SECURITY_ATTRIBUTES securityAttributes; + securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + securityAttributes.bInheritHandle = TRUE; + securityAttributes.lpSecurityDescriptor = NULL; + hIn = CreateFileW(L"CONIN$", GENERIC_READ | GENERIC_WRITE, 0, + &securityAttributes, OPEN_EXISTING, 0, NULL); + hOut = CreateFileW(L"CONOUT$", GENERIC_READ | GENERIC_WRITE, 0, + &securityAttributes, OPEN_EXISTING, 0, NULL); + SetStdHandle(STD_INPUT_HANDLE, hIn); + SetStdHandle(STD_OUTPUT_HANDLE, hOut); + SetStdHandle(STD_ERROR_HANDLE, hOut); + newConsole = true; + } + +#if _WIN32_WINNT >= _WIN32_WINNT_VISTA + if (isVistaOrGreater) { + CONSOLE_FONT_INFOEX consoleFont; + memset(&consoleFont, 0, sizeof(consoleFont)); + consoleFont.cbSize = sizeof(consoleFont); + HMODULE kernel32 = LoadLibraryW(L"kernel32.dll"); + typedef BOOL (WINAPI *GetCurrentConsoleFontExFunc)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); + typedef BOOL (WINAPI *SetCurrentConsoleFontExFunc)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); + GetCurrentConsoleFontExFunc getConsoleFont = (GetCurrentConsoleFontExFunc)GetProcAddress(kernel32, "GetCurrentConsoleFontEx"); + SetCurrentConsoleFontExFunc setConsoleFont = (SetCurrentConsoleFontExFunc)GetProcAddress(kernel32, "SetCurrentConsoleFontEx"); + if (getConsoleFont(hOut, FALSE, &consoleFont)) { + if (consoleFont.FontFamily != TestFontFamily) { + consoleFont.FontFamily = TestFontFamily; + wcscpy(consoleFont.FaceName, TestFaceName); + if (!setConsoleFont(hOut, FALSE, &consoleFont)) { + std::cerr << "SetCurrentConsoleFontEx failed!" << std::endl << std::flush; + } + } + } else { + std::cerr << "GetCurrentConsoleFontEx failed!" << std::endl << std::flush; + } + } else { +#endif + if (restoreConsole && RegOpenKeyExW(HKEY_CURRENT_USER, L"Console", 0, + KEY_WRITE, &hConsoleKey) == ERROR_SUCCESS) { + RegSetValueExW(hConsoleKey, L"FontFamily", 0, REG_DWORD, + (BYTE *)&FontFamily, sizeof(FontFamily)); + RegSetValueExW(hConsoleKey, L"FaceName", 0, REG_SZ, + (BYTE *)FaceName, FaceNameSize); + RegSetValueExW(hConsoleKey, L"FontSize", 0, REG_DWORD, + (BYTE *)&FontSize, sizeof(FontSize)); + RegCloseKey(hConsoleKey); + } +#if _WIN32_WINNT >= _WIN32_WINNT_VISTA + } +#endif + + if (createProcess(NULL, NULL, NULL)) { + try { + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + INPUT_RECORD inputBuffer[(sizeof(UnicodeInputTestString) / + sizeof(UnicodeInputTestString[0])) * 2]; + memset(&inputBuffer, 0, sizeof(inputBuffer)); + unsigned int i = 0; + for (i = 0; i < (sizeof(UnicodeInputTestString) / + sizeof(UnicodeInputTestString[0]) - 1); i++) { + writeInputKeyEvent(&inputBuffer[i*2], UnicodeInputTestString[i]); + } + writeInputKeyEvent(&inputBuffer[i*2], VK_RETURN); + DWORD eventsWritten = 0; + if (!WriteConsoleInputW(hIn, inputBuffer, sizeof(inputBuffer) / + sizeof(inputBuffer[0]), + &eventsWritten) || eventsWritten == 0) { + throw std::runtime_error("WriteConsoleInput failed!"); + } + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + CONSOLE_SCREEN_BUFFER_INFO screenBufferInfo; + if (!GetConsoleScreenBufferInfo(hOut, &screenBufferInfo)) { + throw std::runtime_error("GetConsoleScreenBufferInfo failed!"); + } + + COORD coord; + DWORD charsRead = 0; + coord.X = 0; + coord.Y = screenBufferInfo.dwCursorPosition.Y - 4; + WCHAR *outputBuffer = new WCHAR[screenBufferInfo.dwSize.X * 4]; + if (!ReadConsoleOutputCharacterW(hOut, outputBuffer, + screenBufferInfo.dwSize.X * 4, coord, &charsRead) + || charsRead == 0) { + delete[] outputBuffer; + throw std::runtime_error("ReadConsoleOutputCharacter failed!"); + } + std::wstring wideTestString = kwsys::Encoding::ToWide(encodedTestString); + std::wstring wideInputTestString = kwsys::Encoding::ToWide(encodedInputTestString); + if (memcmp(outputBuffer, wideTestString.c_str(), wideTestString.size()) == 0 && + memcmp(outputBuffer + screenBufferInfo.dwSize.X * 1, + wideTestString.c_str(), wideTestString.size()) == 0 && + memcmp(outputBuffer + screenBufferInfo.dwSize.X * 2, + UnicodeInputTestString, sizeof(UnicodeInputTestString) - + sizeof(WCHAR)) == 0 && + memcmp(outputBuffer + screenBufferInfo.dwSize.X * 3, + wideInputTestString.c_str(), wideInputTestString.size() - 1) == 0 + ) { + didFail = 0; + } else { + std::cerr << "Console's output didn't match expected output!" << std::endl << std::flush; + } + delete[] outputBuffer; + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishProcess(didFail == 0); + } + if (newConsole) { + SetStdHandle(STD_INPUT_HANDLE, parentIn); + SetStdHandle(STD_OUTPUT_HANDLE, parentOut); + SetStdHandle(STD_ERROR_HANDLE, parentErr); + CloseHandle(hIn); + CloseHandle(hOut); + FreeConsole(); + } + return didFail; +} + +#endif + +//---------------------------------------------------------------------------- +int testConsoleBuf(int, char*[]) +{ + int ret = 0; + +#if defined(_WIN32) + syncEvent = CreateEventW(NULL, + FALSE, // auto-reset event + FALSE, // initial state is nonsignaled + SyncEventName); // object name + if (!syncEvent) { + std::cerr << "CreateEvent failed " << GetLastError() << std::endl; + return 1; + } + + encodedTestString = kwsys::Encoding::ToNarrow(UnicodeTestString); + encodedInputTestString = kwsys::Encoding::ToNarrow(UnicodeInputTestString); + encodedInputTestString += "\n"; + + ret |= testPipe(); + ret |= testFile(); + ret |= testConsole(); + + CloseHandle(syncEvent); +#endif + + return ret; +} diff --git a/testConsoleBuf.hxx b/testConsoleBuf.hxx new file mode 100644 index 0000000..855028b --- /dev/null +++ b/testConsoleBuf.hxx @@ -0,0 +1,24 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef testConsoleBuf_hxx +#define testConsoleBuf_hxx + +static const wchar_t cmdConsoleBufChild[] = L"testConsoleBufChild"; + +static const wchar_t SyncEventName[] = L"SyncEvent"; + +// ??????? ????? ???????! +static const wchar_t UnicodeTestString[] = L"\u092F\u0942\u0928\u093F\u0915\u094B\u0921 " + L"\u03B5\u03AF\u03BD\u03B1\u03B9 " + L"\u0437\u0434\u043E\u0440\u043E\u0432\u043E!"; + +#endif diff --git a/testConsoleBufChild.cxx b/testConsoleBufChild.cxx new file mode 100644 index 0000000..3b9ab71 --- /dev/null +++ b/testConsoleBufChild.cxx @@ -0,0 +1,61 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "kwsysPrivate.h" + +#include KWSYS_HEADER(ConsoleBuf.hxx) +#include KWSYS_HEADER(Encoding.hxx) + +// Work-around CMake dependency scanning limitation. This must +// duplicate the above list of headers. +#if 0 +# include "ConsoleBuf.hxx.in" +# include "Encoding.hxx.in" +#endif + +#include +#include "testConsoleBuf.hxx" + +//---------------------------------------------------------------------------- +int main(int argc, const char* argv[]) +{ +#if defined(_WIN32) + kwsys::ConsoleBuf::Manager out(std::cout); + kwsys::ConsoleBuf::Manager err(std::cerr, true); + kwsys::ConsoleBuf::Manager in(std::cin); + + if (argc > 1) { + std::cout << argv[1] << std::endl; + std::cerr << argv[1] << std::endl; + } else { + std::string str = kwsys::Encoding::ToNarrow(UnicodeTestString); + std::cout << str << std::endl; + std::cerr << str << std::endl; + } + + std::string input; + HANDLE syncEvent = OpenEventW(EVENT_MODIFY_STATE, FALSE, SyncEventName); + if (syncEvent) { + SetEvent(syncEvent); + } + + std::cin >> input; + std::cout << input << std::endl; + if (syncEvent) { + SetEvent(syncEvent); + CloseHandle(syncEvent); + } +#else + static_cast(argc); + static_cast(argv); +#endif + return 0; +} ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CMakeLists.txt | 20 +- Source/kwsys/ConsoleBuf.hxx.in | 348 +++++++++++++ Source/kwsys/testConsoleBuf.cxx | 603 ++++++++++++++++++++++ Source/{cmUtils.hxx => kwsys/testConsoleBuf.hxx} | 22 +- Source/kwsys/testConsoleBufChild.cxx | 61 +++ 5 files changed, 1041 insertions(+), 13 deletions(-) create mode 100644 Source/kwsys/ConsoleBuf.hxx.in create mode 100644 Source/kwsys/testConsoleBuf.cxx copy Source/{cmUtils.hxx => kwsys/testConsoleBuf.hxx} (50%) create mode 100644 Source/kwsys/testConsoleBufChild.cxx hooks/post-receive -- CMake From nilsgladitz at gmail.com Mon Sep 12 13:41:36 2016 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 12 Sep 2016 13:41:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1960-g5ba3f1a Message-ID: <20160912174136.10F00D7919@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, next has been updated via 5ba3f1a9068a6504c8a3ae5987a090c6fe787b40 (commit) via b35311ca44b7e8b40cc48aaac6cefbe8ca4ddba8 (commit) from b727346b4081504076b8fd48550325fa7eb31496 (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=5ba3f1a9068a6504c8a3ae5987a090c6fe787b40 commit 5ba3f1a9068a6504c8a3ae5987a090c6fe787b40 Merge: b727346 b35311c Author: Nils Gladitz AuthorDate: Mon Sep 12 13:41:35 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 13:41:35 2016 -0400 Merge topic 'fix-ctest-segfault' into next b35311ca CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabled https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b35311ca44b7e8b40cc48aaac6cefbe8ca4ddba8 commit b35311ca44b7e8b40cc48aaac6cefbe8ca4ddba8 Author: Nils Gladitz AuthorDate: Mon Sep 12 18:29:08 2016 +0200 Commit: Nils Gladitz CommitDate: Mon Sep 12 19:40:13 2016 +0200 CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabled Before the change the list of externals was queried only before the svn update. With the change the list is queried both before and after. This should also be more accurate since the list of externals might change during the update. diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx index f680612..0832820 100644 --- a/Source/CTest/cmCTestSVN.cxx +++ b/Source/CTest/cmCTestSVN.cxx @@ -108,13 +108,8 @@ std::string cmCTestSVN::LoadInfo(SVNInfo& svninfo) void cmCTestSVN::NoteOldRevision() { - // Info for root repository - this->Repositories.push_back(SVNInfo("")); - this->RootInfo = &(this->Repositories.back()); - // Info for the external repositories - this->LoadExternals(); + this->LoadRepositories(); - // Get info for all the repositories std::list::iterator itbeg = this->Repositories.begin(); std::list::iterator itend = this->Repositories.end(); for (; itbeg != itend; itbeg++) { @@ -134,7 +129,8 @@ void cmCTestSVN::NoteOldRevision() void cmCTestSVN::NoteNewRevision() { - // Get info for the external repositories + this->LoadRepositories(); + std::list::iterator itbeg = this->Repositories.begin(); std::list::iterator itend = this->Repositories.end(); for (; itbeg != itend; itbeg++) { @@ -534,8 +530,13 @@ private: } }; -void cmCTestSVN::LoadExternals() +void cmCTestSVN::LoadRepositories() { + // Info for root repository + this->Repositories.clear(); + this->Repositories.push_back(SVNInfo("")); + this->RootInfo = &(this->Repositories.back()); + // Run "svn status" to get the list of external repositories std::vector svn_status; svn_status.push_back("status"); diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h index 6f2374d..2301b10 100644 --- a/Source/CTest/cmCTestSVN.h +++ b/Source/CTest/cmCTestSVN.h @@ -86,7 +86,7 @@ private: SVNInfo* RootInfo; std::string LoadInfo(SVNInfo& svninfo); - void LoadExternals(); + void LoadRepositories(); void LoadModifications() CM_OVERRIDE; void LoadRevisions() CM_OVERRIDE; void LoadRevisions(SVNInfo& svninfo); ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestSVN.cxx | 17 +++++++++-------- Source/CTest/cmCTestSVN.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 14:34:38 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 14:34:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1962-ge5a23b9 Message-ID: <20160912183438.3AAD0F5C15@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, next has been updated via e5a23b9d152d9114bfdb65caeb7c33c35ab21b59 (commit) via 4dd997da541be93b0cfacdd8483eaec8dd2a76d5 (commit) from 5ba3f1a9068a6504c8a3ae5987a090c6fe787b40 (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=e5a23b9d152d9114bfdb65caeb7c33c35ab21b59 commit e5a23b9d152d9114bfdb65caeb7c33c35ab21b59 Merge: 5ba3f1a 4dd997d Author: Brad King AuthorDate: Mon Sep 12 14:34:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 14:34:37 2016 -0400 Merge topic 'file-download-unexpected-arg' into next 4dd997da file(DOWNLOAD|UPLOAD): Warn on unexpected arguments https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dd997da541be93b0cfacdd8483eaec8dd2a76d5 commit 4dd997da541be93b0cfacdd8483eaec8dd2a76d5 Author: Ruslan Baratov AuthorDate: Fri Sep 9 23:19:39 2016 +0300 Commit: Ruslan Baratov CommitDate: Fri Sep 9 23:19:39 2016 +0300 file(DOWNLOAD|UPLOAD): Warn on unexpected arguments Emit warning message on unparsed argument instead of silently ignoring it. Can't stop with the error message because it may break old code. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 835b118..ae7a511 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2564,6 +2564,11 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) return false; } hashMatchMSG = algo + " hash"; + } else { + // Do not return error for compatibility reason. + std::string err = "Unexpected argument: "; + err += *i; + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str()); } ++i; } @@ -2812,6 +2817,11 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) statusVar = *i; } else if (*i == "SHOW_PROGRESS") { showProgress = true; + } else { + // Do not return error for compatibility reason. + std::string err = "Unexpected argument: "; + err += *i; + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str()); } ++i; diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt new file mode 100644 index 0000000..82a78c9 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning \(dev\) at DOWNLOAD-unused-argument.cmake:[0-9]+ \(file\): + Unexpected argument: JUNK +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake new file mode 100644 index 0000000..2e3fbe1 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake @@ -0,0 +1,5 @@ +file(DOWNLOAD + "file://${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt" + "${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt" + JUNK + ) diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index 5f85bba..4c05f24 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -1,6 +1,8 @@ include(RunCMake) run_cmake(DOWNLOAD-hash-mismatch) +run_cmake(DOWNLOAD-unused-argument) +run_cmake(UPLOAD-unused-argument) run_cmake(INSTALL-DIRECTORY) run_cmake(INSTALL-MESSAGE-bad) run_cmake(FileOpenFailRead) diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument-result.txt b/Tests/RunCMake/file/UPLOAD-unused-argument-result.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt b/Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt new file mode 100644 index 0000000..3c1b744 --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning \(dev\) at UPLOAD-unused-argument.cmake:[0-9]+ \(file\): + Unexpected argument: JUNK +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument.cmake b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake new file mode 100644 index 0000000..94ac9ac --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake @@ -0,0 +1,5 @@ +file(UPLOAD + "${CMAKE_CURRENT_SOURCE_DIR}/UPLOAD-unused-argument.txt" + "file://${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt" + JUNK + ) diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument.txt b/Tests/RunCMake/file/UPLOAD-unused-argument.txt new file mode 100644 index 0000000..e69de29 ----------------------------------------------------------------------- Summary of changes: Source/cmFileCommand.cxx | 10 ++++++++++ .../RunCMake/file/DOWNLOAD-unused-argument-result.txt | 0 Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt | 5 +++++ Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake | 5 +++++ .../RunCMake/file/DOWNLOAD-unused-argument.txt | 0 Tests/RunCMake/file/RunCMakeTest.cmake | 2 ++ .../RunCMake/file/UPLOAD-unused-argument-result.txt | 0 Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt | 5 +++++ Tests/RunCMake/file/UPLOAD-unused-argument.cmake | 5 +++++ .../RunCMake/file/UPLOAD-unused-argument.txt | 0 10 files changed, 32 insertions(+) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/DOWNLOAD-unused-argument.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/UPLOAD-unused-argument-result.txt (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-unused-argument.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/UPLOAD-unused-argument.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 15:23:11 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 15:23:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1965-gca930ba Message-ID: <20160912192311.DD2E5F4C3F@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, next has been updated via ca930ba20f364bd9613a2df1da0074b1260ddf0b (commit) via 410add400803340581eccf5ac1c83c8d4e40ad5a (commit) via 751f7b5255d861abc3105d3d971164293b3dec60 (commit) from e5a23b9d152d9114bfdb65caeb7c33c35ab21b59 (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=ca930ba20f364bd9613a2df1da0074b1260ddf0b commit ca930ba20f364bd9613a2df1da0074b1260ddf0b Merge: e5a23b9 410add4 Author: Brad King AuthorDate: Mon Sep 12 15:23:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 15:23:10 2016 -0400 Merge topic 'timestamp-names' into next 410add40 Help: Add notes for topic 'timestamp-names' 751f7b52 string(TIMESTAMP ...): add '%a' and '%b' format specifiers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=410add400803340581eccf5ac1c83c8d4e40ad5a commit 410add400803340581eccf5ac1c83c8d4e40ad5a Author: Brad King AuthorDate: Mon Sep 12 15:15:50 2016 -0400 Commit: Brad King CommitDate: Mon Sep 12 15:15:50 2016 -0400 Help: Add notes for topic 'timestamp-names' diff --git a/Help/release/dev/timestamp-names.rst b/Help/release/dev/timestamp-names.rst new file mode 100644 index 0000000..ea54b5c --- /dev/null +++ b/Help/release/dev/timestamp-names.rst @@ -0,0 +1,6 @@ +timestamp-names +--------------- + +* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)` + commands gained support for the ``%a`` and ``%b`` placeholders. + These are the abbreviated weekday and month names. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=751f7b5255d861abc3105d3d971164293b3dec60 commit 751f7b5255d861abc3105d3d971164293b3dec60 Author: Ruslan Baratov AuthorDate: Sat Sep 10 00:39:26 2016 +0300 Commit: Ruslan Baratov CommitDate: Mon Sep 12 19:07:38 2016 +0300 string(TIMESTAMP ...): add '%a' and '%b' format specifiers %b: Abbreviated month name (e.g. Oct). %a: Abbreviated weekday name (e.g. Fri). diff --git a/Help/command/string.rst b/Help/command/string.rst index 19a095a..8028333 100644 --- a/Help/command/string.rst +++ b/Help/command/string.rst @@ -278,12 +278,14 @@ specifiers: %I The hour on a 12-hour clock (01-12). %j The day of the current year (001-366). %m The month of the current year (01-12). + %b Abbreviated month name (e.g. Oct). %M The minute of the current hour (00-59). %s Seconds since midnight (UTC) 1-Jan-1970 (UNIX time). %S The second of the current minute. 60 represents a leap second. (00-60) %U The week number of the current year (00-53). %w The day of the current week. 0 is Sunday. (0-6) + %a Abbreviated weekday name (e.g. Fri). %y The last two digits of the current year (00-99) %Y The current year. diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index 61b74db..a94212c 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -123,6 +123,8 @@ std::string cmTimestamp::AddTimestampComponent(char flag, formatString += flag; switch (flag) { + case 'a': + case 'b': case 'd': case 'H': case 'I': diff --git a/Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake b/Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake new file mode 100644 index 0000000..1cd44ff --- /dev/null +++ b/Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake @@ -0,0 +1,11 @@ +string(TIMESTAMP output "%a;%b") +message("~${output}~") + +list(LENGTH output output_length) + +set(expected_output_length 2) + +if(NOT output_length EQUAL ${expected_output_length}) + message(FATAL_ERROR "expected ${expected_output_length} entries in output " + "with all specifiers; found ${output_length}") +endif() diff --git a/Tests/CMakeTests/StringTest.cmake.in b/Tests/CMakeTests/StringTest.cmake.in index aba35fe..a45b205 100644 --- a/Tests/CMakeTests/StringTest.cmake.in +++ b/Tests/CMakeTests/StringTest.cmake.in @@ -36,6 +36,8 @@ set(TIMESTAMP-IncompleteSpecifier-RESULT 0) set(TIMESTAMP-IncompleteSpecifier-STDERR "~foobar%~") set(TIMESTAMP-AllSpecifiers-RESULT 0) set(TIMESTAMP-AllSpecifiers-STDERR "~[0-9]+(;[0-9]+)*~") +set(TIMESTAMP-MonthWeekNames-RESULT 0) +set(TIMESTAMP-MonthWeekNames-STDERR "~[^%]+;[^%]+~") set(TIMESTAMP-UnixTime-RESULT 0) set(TIMESTAMP-UnixTime-STDERR "~[1-9][0-9]+~") @@ -60,6 +62,7 @@ check_cmake_test(String TIMESTAMP-UnknownSpecifier TIMESTAMP-IncompleteSpecifier TIMESTAMP-AllSpecifiers + TIMESTAMP-MonthWeekNames TIMESTAMP-UnixTime ) ----------------------------------------------------------------------- Summary of changes: Help/command/string.rst | 2 ++ Help/release/dev/timestamp-names.rst | 6 ++++++ Source/cmTimestamp.cxx | 2 ++ ...AllSpecifiers.cmake => String-TIMESTAMP-MonthWeekNames.cmake} | 4 ++-- Tests/CMakeTests/StringTest.cmake.in | 3 +++ 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 Help/release/dev/timestamp-names.rst copy Tests/CMakeTests/{String-TIMESTAMP-AllSpecifiers.cmake => String-TIMESTAMP-MonthWeekNames.cmake} (73%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Sep 12 16:03:26 2016 From: brad.king at kitware.com (Brad King) Date: Mon, 12 Sep 2016 16:03:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1969-gaed1d8b Message-ID: <20160912200326.C6C76F5938@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, next has been updated via aed1d8b3c44fb6e1eced38b8d568dd36a0103eb0 (commit) via 3e58b9af57074ded65566330c33999bdfac191a8 (commit) via c73967cb4a0217b2d0825f67d6fd56af2b4d6b7f (commit) via 366e38284d0a111542a5c87ded6ad21fa641cb2c (commit) from ca930ba20f364bd9613a2df1da0074b1260ddf0b (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=aed1d8b3c44fb6e1eced38b8d568dd36a0103eb0 commit aed1d8b3c44fb6e1eced38b8d568dd36a0103eb0 Merge: ca930ba 3e58b9a Author: Brad King AuthorDate: Mon Sep 12 16:03:25 2016 -0400 Commit: CMake Topic Stage CommitDate: Mon Sep 12 16:03:25 2016 -0400 Merge topic 'cmake-server-prepare' into next 3e58b9af cmake: Factor out method to find the CMakeCache.txt file c73967cb cmake: Introduce ReportCapabilitiesJson 366e3828 Update .gitignore https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e58b9af57074ded65566330c33999bdfac191a8 commit 3e58b9af57074ded65566330c33999bdfac191a8 Author: Tobias Hunger AuthorDate: Fri Sep 9 14:49:30 2016 +0200 Commit: Tobias Hunger CommitDate: Mon Sep 12 22:00:22 2016 +0200 cmake: Factor out method to find the CMakeCache.txt file diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 4edf228..0d61a3d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1046,6 +1046,28 @@ const char* cmake::GetHomeOutputDirectory() const return this->State->GetBinaryDirectory(); } +std::string cmake::FindCacheFile(const std::string& binaryDir) const +{ + std::string cachePath = binaryDir; + cmSystemTools::ConvertToUnixSlashes(cachePath); + std::string cacheFile = cachePath; + cacheFile += "/CMakeCache.txt"; + if (!cmSystemTools::FileExists(cacheFile.c_str())) { + // search in parent directories for cache + std::string cmakeFiles = cachePath; + cmakeFiles += "/CMakeFiles"; + if (cmSystemTools::FileExists(cmakeFiles.c_str())) { + std::string cachePathFound = + cmSystemTools::FileExistsInParentDirectories("CMakeCache.txt", + cachePath.c_str(), "/"); + if (!cachePathFound.empty()) { + cachePath = cmSystemTools::GetFilenamePath(cachePathFound); + } + } + } + return cachePath; +} + void cmake::SetGlobalGenerator(cmGlobalGenerator* gg) { if (!gg) { @@ -2344,24 +2366,8 @@ int cmake::Build(const std::string& dir, const std::string& target, std::cerr << "Error: " << dir << " is not a directory\n"; return 1; } - std::string cachePath = dir; - cmSystemTools::ConvertToUnixSlashes(cachePath); - std::string cacheFile = cachePath; - cacheFile += "/CMakeCache.txt"; - if (!cmSystemTools::FileExists(cacheFile.c_str())) { - // search in parent directories for cache - std::string cmakeFiles = cachePath; - cmakeFiles += "/CMakeFiles"; - if (cmSystemTools::FileExists(cmakeFiles.c_str())) { - std::string cachePathFound = - cmSystemTools::FileExistsInParentDirectories("CMakeCache.txt", - cachePath.c_str(), "/"); - if (!cachePathFound.empty()) { - cachePath = cmSystemTools::GetFilenamePath(cachePathFound); - } - } - } + std::string cachePath = FindCacheFile(dir); if (!this->LoadCache(cachePath)) { std::cerr << "Error: could not load cache\n"; return 1; diff --git a/Source/cmake.h b/Source/cmake.h index 8dd0128..30661d9 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -193,6 +193,9 @@ public: return this->GlobalGenerator; } + ///! Return the full path to where the CMakeCache.txt file should be. + std::string FindCacheFile(const std::string& binaryDir) const; + ///! Return the global generator assigned to this instance of cmake void SetGlobalGenerator(cmGlobalGenerator*); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c73967cb4a0217b2d0825f67d6fd56af2b4d6b7f commit c73967cb4a0217b2d0825f67d6fd56af2b4d6b7f Author: Tobias Hunger AuthorDate: Fri Sep 9 10:01:43 2016 +0200 Commit: Tobias Hunger CommitDate: Mon Sep 12 17:24:06 2016 +0200 cmake: Introduce ReportCapabilitiesJson Introduce cmake::ReportCapabilitiesJson which returns a the Json object that is serialized in cmake::ReportCapabilities. This allows to re-use the information in cmake-server. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index d6bea3d..4edf228 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -35,7 +35,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cmGraphVizWriter.h" #include "cmVariableWatch.h" -#include + #include #endif @@ -233,10 +233,9 @@ cmake::~cmake() delete this->FileComparison; } -std::string cmake::ReportCapabilities() const -{ - std::string result; #if defined(CMAKE_BUILD_WITH_CMAKE) +Json::Value cmake::ReportCapabilitiesJson() const +{ Json::Value obj = Json::objectValue; // Version information: Json::Value version = Json::objectValue; @@ -287,8 +286,16 @@ std::string cmake::ReportCapabilities() const #else obj["serverMode"] = false; #endif + return obj; +} +#endif + +std::string cmake::ReportCapabilities() const +{ + std::string result; +#if defined(CMAKE_BUILD_WITH_CMAKE) Json::FastWriter writer; - result = writer.write(obj); + result = writer.write(this->ReportCapabilitiesJson()); #else result = "Not supported"; #endif diff --git a/Source/cmake.h b/Source/cmake.h index 9dc429d..8dd0128 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -24,6 +24,10 @@ #include #include +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cm_jsoncpp_value.h" +#endif + class cmExternalMakefileProjectGeneratorFactory; class cmFileTimeComparison; class cmGlobalGenerator; @@ -118,6 +122,9 @@ public: /// Destructor ~cmake(); +#if defined(CMAKE_BUILD_WITH_CMAKE) + Json::Value ReportCapabilitiesJson() const; +#endif std::string ReportCapabilities() const; static const char* GetCMakeFilesDirectory() { return "/CMakeFiles"; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=366e38284d0a111542a5c87ded6ad21fa641cb2c commit 366e38284d0a111542a5c87ded6ad21fa641cb2c Author: Tobias Hunger AuthorDate: Fri Sep 9 10:01:43 2016 +0200 Commit: Tobias Hunger CommitDate: Mon Sep 12 17:23:50 2016 +0200 Update .gitignore Ignore *.user* files from QtCreator and *.pyc files. diff --git a/.gitignore b/.gitignore index 0d09cdc..5d1732d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Exclude MacOS Finder files. .DS_Store + +*.user* + +*.pyc +Testing ----------------------------------------------------------------------- Summary of changes: .gitignore | 5 +++++ Source/cmake.cxx | 57 +++++++++++++++++++++++++++++++++--------------------- Source/cmake.h | 10 ++++++++++ 3 files changed, 50 insertions(+), 22 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Sep 13 00:01:09 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Sep 2016 00:01:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-926-g1ba87fd Message-ID: <20160913040109.C722DF53B1@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 1ba87fd1749ee3f46d9da1a5eb9798584a280676 (commit) from a7305ef00a70518f7abb66211ef09b0ca6d4af71 (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=1ba87fd1749ee3f46d9da1a5eb9798584a280676 commit 1ba87fd1749ee3f46d9da1a5eb9798584a280676 Author: Kitware Robot AuthorDate: Tue Sep 13 00:01:06 2016 -0400 Commit: Kitware Robot CommitDate: Tue Sep 13 00:01:06 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e77c982..d05d345 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 6) -set(CMake_VERSION_PATCH 20160912) +set(CMake_VERSION_PATCH 20160913) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:26:45 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:26:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1971-g1836176 Message-ID: <20160913152645.338D9F4AAC@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, next has been updated via 1836176eaf5e06b30916e815d0f8badbe256e08e (commit) via da0eaa8917027547cfcb082a076a60af104a2c5c (commit) from aed1d8b3c44fb6e1eced38b8d568dd36a0103eb0 (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=1836176eaf5e06b30916e815d0f8badbe256e08e commit 1836176eaf5e06b30916e815d0f8badbe256e08e Merge: aed1d8b da0eaa8 Author: Brad King AuthorDate: Tue Sep 13 11:26:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:26:44 2016 -0400 Merge topic 'update-kwsys' into next da0eaa89 Utilities/Release: Suppress KWSys ConsoelBuf test on Windows binaries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da0eaa8917027547cfcb082a076a60af104a2c5c commit da0eaa8917027547cfcb082a076a60af104a2c5c Author: Brad King AuthorDate: Tue Sep 13 11:25:51 2016 -0400 Commit: Brad King CommitDate: Tue Sep 13 11:25:51 2016 -0400 Utilities/Release: Suppress KWSys ConsoelBuf test on Windows binaries The test strangely fails on the machine we use to build the binaries. Simply suppress it pending further investigation. diff --git a/Utilities/Release/win32_release.cmake b/Utilities/Release/win32_release.cmake index a27efda..0500829 100644 --- a/Utilities/Release/win32_release.cmake +++ b/Utilities/Release/win32_release.cmake @@ -27,6 +27,7 @@ get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") if(CMAKE_CREATE_VERSION STREQUAL "nightly") # Some tests fail spuriously too often. - set(EXTRA_CTEST_ARGS "-E Qt5Autogen") + # ConsoleBuf fails on dash3win7 and nowhere else (??). + set(EXTRA_CTEST_ARGS "-E 'Qt5Autogen|ConsoleBuf'") endif() include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/win64_release.cmake b/Utilities/Release/win64_release.cmake index e39a610..d053b92 100644 --- a/Utilities/Release/win64_release.cmake +++ b/Utilities/Release/win64_release.cmake @@ -28,6 +28,7 @@ get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") if(CMAKE_CREATE_VERSION STREQUAL "nightly") # Some tests fail spuriously too often. - set(EXTRA_CTEST_ARGS "-E Qt5Autogen") + # ConsoleBuf fails on dash3win7 and nowhere else (??). + set(EXTRA_CTEST_ARGS "-E 'Qt5Autogen|ConsoleBuf'") endif() include(${path}/release_cmake.cmake) ----------------------------------------------------------------------- Summary of changes: Utilities/Release/win32_release.cmake | 3 ++- Utilities/Release/win64_release.cmake | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:40:37 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:40:37 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-928-g8a56e31 Message-ID: <20160913154037.DC9F2BB2E5@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 8a56e311ec244a5e9c44457de0cb90643958e0ad (commit) via 4dd997da541be93b0cfacdd8483eaec8dd2a76d5 (commit) from 1ba87fd1749ee3f46d9da1a5eb9798584a280676 (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=8a56e311ec244a5e9c44457de0cb90643958e0ad commit 8a56e311ec244a5e9c44457de0cb90643958e0ad Merge: 1ba87fd 4dd997d Author: Brad King AuthorDate: Tue Sep 13 11:40:35 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:40:35 2016 -0400 Merge topic 'file-download-unexpected-arg' 4dd997da file(DOWNLOAD|UPLOAD): Warn on unexpected arguments ----------------------------------------------------------------------- Summary of changes: Source/cmFileCommand.cxx | 10 ++++++++++ .../RunCMake/file/DOWNLOAD-unused-argument-result.txt | 0 Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt | 5 +++++ Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake | 5 +++++ .../RunCMake/file/DOWNLOAD-unused-argument.txt | 0 Tests/RunCMake/file/RunCMakeTest.cmake | 2 ++ .../RunCMake/file/UPLOAD-unused-argument-result.txt | 0 Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt | 5 +++++ Tests/RunCMake/file/UPLOAD-unused-argument.cmake | 5 +++++ .../RunCMake/file/UPLOAD-unused-argument.txt | 0 10 files changed, 32 insertions(+) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/DOWNLOAD-unused-argument.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/UPLOAD-unused-argument-result.txt (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-unused-argument.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/UPLOAD-unused-argument.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:40:40 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:40:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-930-g5b85a3e Message-ID: <20160913154040.D66DEC15FE@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 5b85a3e26c5426dd563787a3460d53e6e751de28 (commit) via 9370b697e994e3b85549f07cbd54223e3e5d714f (commit) from 8a56e311ec244a5e9c44457de0cb90643958e0ad (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=5b85a3e26c5426dd563787a3460d53e6e751de28 commit 5b85a3e26c5426dd563787a3460d53e6e751de28 Merge: 8a56e31 9370b69 Author: Brad King AuthorDate: Tue Sep 13 11:40:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:40:38 2016 -0400 Merge topic 'link-generated-rpaths-first' 9370b697 Re-order link line to place RPATH entries before libraries ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:40:43 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:40:43 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-932-g2fbd309 Message-ID: <20160913154043.9B71DC1C63@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 2fbd3094491fbedf3dea6b864f34dd2f85a12b57 (commit) via 4f349a8656e4652edacad787d38834255f13a0a5 (commit) from 5b85a3e26c5426dd563787a3460d53e6e751de28 (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=2fbd3094491fbedf3dea6b864f34dd2f85a12b57 commit 2fbd3094491fbedf3dea6b864f34dd2f85a12b57 Merge: 5b85a3e 4f349a8 Author: Brad King AuthorDate: Tue Sep 13 11:40:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:40:41 2016 -0400 Merge topic 'doc-separate_arguments-formatting' 4f349a86 Help: Fix formatting in separate_arguments documentation ----------------------------------------------------------------------- Summary of changes: Help/command/separate_arguments.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:40:46 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:40:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-934-gf51f4ee Message-ID: <20160913154046.5AF9FC1C70@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 f51f4ee9a34faeeb6ed22ea4e894dbac7572abc7 (commit) via b35311ca44b7e8b40cc48aaac6cefbe8ca4ddba8 (commit) from 2fbd3094491fbedf3dea6b864f34dd2f85a12b57 (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=f51f4ee9a34faeeb6ed22ea4e894dbac7572abc7 commit f51f4ee9a34faeeb6ed22ea4e894dbac7572abc7 Merge: 2fbd309 b35311c Author: Brad King AuthorDate: Tue Sep 13 11:40:44 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:40:44 2016 -0400 Merge topic 'fix-ctest-segfault' b35311ca CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabled ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestSVN.cxx | 17 +++++++++-------- Source/CTest/cmCTestSVN.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:40:49 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:40:49 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-937-g994e98b Message-ID: <20160913154049.5352DC1C78@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 994e98bf415183a6b360f05a43cedf53778e5a7a (commit) via 410add400803340581eccf5ac1c83c8d4e40ad5a (commit) via 751f7b5255d861abc3105d3d971164293b3dec60 (commit) from f51f4ee9a34faeeb6ed22ea4e894dbac7572abc7 (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=994e98bf415183a6b360f05a43cedf53778e5a7a commit 994e98bf415183a6b360f05a43cedf53778e5a7a Merge: f51f4ee 410add4 Author: Brad King AuthorDate: Tue Sep 13 11:40:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:40:47 2016 -0400 Merge topic 'timestamp-names' 410add40 Help: Add notes for topic 'timestamp-names' 751f7b52 string(TIMESTAMP ...): add '%a' and '%b' format specifiers ----------------------------------------------------------------------- Summary of changes: Help/command/string.rst | 2 ++ Help/release/dev/timestamp-names.rst | 6 ++++++ Source/cmTimestamp.cxx | 2 ++ ...AllSpecifiers.cmake => String-TIMESTAMP-MonthWeekNames.cmake} | 4 ++-- Tests/CMakeTests/StringTest.cmake.in | 3 +++ 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 Help/release/dev/timestamp-names.rst copy Tests/CMakeTests/{String-TIMESTAMP-AllSpecifiers.cmake => String-TIMESTAMP-MonthWeekNames.cmake} (73%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:40:52 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:40:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-941-g112f758 Message-ID: <20160913154052.582FCC0FA9@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 112f758223737464959a593084a357ba5d572e8b (commit) via 3e58b9af57074ded65566330c33999bdfac191a8 (commit) via c73967cb4a0217b2d0825f67d6fd56af2b4d6b7f (commit) via 366e38284d0a111542a5c87ded6ad21fa641cb2c (commit) from 994e98bf415183a6b360f05a43cedf53778e5a7a (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=112f758223737464959a593084a357ba5d572e8b commit 112f758223737464959a593084a357ba5d572e8b Merge: 994e98b 3e58b9a Author: Brad King AuthorDate: Tue Sep 13 11:40:50 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:40:50 2016 -0400 Merge topic 'cmake-server-prepare' 3e58b9af cmake: Factor out method to find the CMakeCache.txt file c73967cb cmake: Introduce ReportCapabilitiesJson 366e3828 Update .gitignore ----------------------------------------------------------------------- Summary of changes: .gitignore | 5 +++++ Source/cmake.cxx | 57 +++++++++++++++++++++++++++++++++--------------------- Source/cmake.h | 10 ++++++++++ 3 files changed, 50 insertions(+), 22 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:44:43 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:44:43 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1979-g23034b9 Message-ID: <20160913154443.A20E1E1EE5@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, next has been updated via 23034b94d4722644d91047a5ba70d3f5f129d472 (commit) via 112f758223737464959a593084a357ba5d572e8b (commit) via 994e98bf415183a6b360f05a43cedf53778e5a7a (commit) via f51f4ee9a34faeeb6ed22ea4e894dbac7572abc7 (commit) via 2fbd3094491fbedf3dea6b864f34dd2f85a12b57 (commit) via 5b85a3e26c5426dd563787a3460d53e6e751de28 (commit) via 8a56e311ec244a5e9c44457de0cb90643958e0ad (commit) via 1ba87fd1749ee3f46d9da1a5eb9798584a280676 (commit) from 1836176eaf5e06b30916e815d0f8badbe256e08e (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=23034b94d4722644d91047a5ba70d3f5f129d472 commit 23034b94d4722644d91047a5ba70d3f5f129d472 Merge: 1836176 112f758 Author: Brad King AuthorDate: Tue Sep 13 11:44:35 2016 -0400 Commit: Brad King CommitDate: Tue Sep 13 11:44:35 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 11:57:25 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 11:57:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1981-g82c7905 Message-ID: <20160913155725.960A6F550B@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, next has been updated via 82c79051ec8c1790f98485b59caed1736fdf9d8e (commit) via e952f1bdc7e5da3e50b9b36aeed6005c8d947ca6 (commit) from 23034b94d4722644d91047a5ba70d3f5f129d472 (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=82c79051ec8c1790f98485b59caed1736fdf9d8e commit 82c79051ec8c1790f98485b59caed1736fdf9d8e Merge: 23034b9 e952f1b Author: Brad King AuthorDate: Tue Sep 13 11:57:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 11:57:24 2016 -0400 Merge topic 'cmake-E-help-order' into next e952f1bd cmcmd: Fix sort order in help output https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e952f1bdc7e5da3e50b9b36aeed6005c8d947ca6 commit e952f1bdc7e5da3e50b9b36aeed6005c8d947ca6 Author: Tobias Hunger AuthorDate: Tue Sep 13 10:59:19 2016 +0200 Commit: Tobias Hunger CommitDate: Tue Sep 13 11:47:03 2016 +0200 cmcmd: Fix sort order in help output sort "sleep" before "tar", not after diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index c2e1d53..900bba0 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -91,9 +91,9 @@ void CMakeCommandUsage(const char* program) << " remove_directory dir - remove a directory and its contents\n" << " rename oldname newname - rename a file or directory " "(on one volume)\n" + << " sleep ... - sleep for given number of seconds\n" << " tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]\n" << " - create or extract a tar or zip archive\n" - << " sleep ... - sleep for given number of seconds\n" << " time command [args...] - run command and return elapsed time\n" << " touch file - touch a file.\n" << " touch_nocreate file - touch a file but do not create it.\n" ----------------------------------------------------------------------- Summary of changes: Source/cmcmd.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 12:53:26 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 12:53:26 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1985-g8f24764 Message-ID: <20160913165326.9BB4FF5922@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, next has been updated via 8f2476403501201d548e1225351cd1bcbe69beb0 (commit) via 42ce9f1e7178b3535726c0c885cc7c9f760cc8b6 (commit) via d5257063b04a95aca3d144f860698a3c7181e554 (commit) via f81b9475f3724eef5d9e81b9190e30f5df09c808 (commit) from 82c79051ec8c1790f98485b59caed1736fdf9d8e (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=8f2476403501201d548e1225351cd1bcbe69beb0 commit 8f2476403501201d548e1225351cd1bcbe69beb0 Merge: 82c7905 42ce9f1 Author: Brad King AuthorDate: Tue Sep 13 12:53:24 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 12:53:24 2016 -0400 Merge topic 'add_androidmk_generator' into next 42ce9f1e Add support for creating prebuilt Android.mk files d5257063 Export: Virtualize file generation step helpers f81b9475 Export: Factor out file generation steps into helpers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42ce9f1e7178b3535726c0c885cc7c9f760cc8b6 commit 42ce9f1e7178b3535726c0c885cc7c9f760cc8b6 Author: Bill Hoffman AuthorDate: Tue Jul 12 13:26:55 2016 -0400 Commit: Brad King CommitDate: Tue Sep 13 12:47:43 2016 -0400 Add support for creating prebuilt Android.mk files Add options to the `install()` and `export()` commands to export the targets we build into Android.mk files that reference them as prebuilt libraries with associated usage requirements (compile definitions, include directories, link libraries). This will allow CMake-built projects to be imported into projects using the Android NDK build system. Closes: #15562 diff --git a/Help/command/export.rst b/Help/command/export.rst index 4419dc1..53675a7 100644 --- a/Help/command/export.rst +++ b/Help/command/export.rst @@ -55,3 +55,18 @@ build tree. In some cases, for example for packaging and for system wide installations, it is not desirable to write the user package registry. If the :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable is enabled, the ``export(PACKAGE)`` command will do nothing. + +:: + + export(TARGETS [target1 [target2 [...]]] [ANDROID_MK ]) + +This signature exports cmake built targets to the android ndk build system +by creating an Android.mk file that references the prebuilt targets. The +Android NDK supports the use of prebuilt libraries, both static and shared. +This allows cmake to build the libraries of a project and make them available +to an ndk build system complete with transitive dependencies, include flags +and defines required to use the libraries. The signature takes a list of +targets and puts them in the Android.mk file specified by the ```` +given. This signature can only be used if policy CMP0022 is NEW for all +targets given. A error will be issued if that policy is set to OLD for one +of the targets. diff --git a/Help/command/install.rst b/Help/command/install.rst index aaf12cc..d57dd75 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -314,7 +314,8 @@ Installing Exports :: install(EXPORT DESTINATION - [NAMESPACE ] [FILE .cmake] + [NAMESPACE ] [[FILE .cmake]| + [EXPORT_ANDROID_MK .mk]] [PERMISSIONS permissions...] [CONFIGURATIONS [Debug|Release|...]] [EXPORT_LINK_INTERFACE_LIBRARIES] @@ -342,6 +343,13 @@ specified that does not match that given to the targets associated with included in the export but a target to which it links is not included the behavior is unspecified. +In additon to cmake language files, the ``EXPORT_ANDROID_MK`` option maybe +used to specifiy an export to the android ndk build system. The Android +NDK supports the use of prebuilt libraries, both static and shared. This +allows cmake to build the libraries of a project and make them available +to an ndk build system complete with transitive dependencies, include flags +and defines required to use the libraries. + The ``EXPORT`` form is useful to help outside projects use targets built and installed by the current project. For example, the code @@ -349,9 +357,11 @@ and installed by the current project. For example, the code install(TARGETS myexe EXPORT myproj DESTINATION bin) install(EXPORT myproj NAMESPACE mp_ DESTINATION lib/myproj) + install(EXPORT_ANDROID_MK myexp DESTINATION share/ndk-modules) will install the executable myexe to ``/bin`` and code to import -it in the file ``/lib/myproj/myproj.cmake``. An outside project +it in the file ``/lib/myproj/myproj.cmake`` and +``/lib/share/ndk-modules/Android.mk``. An outside project may load this file with the include command and reference the ``myexe`` executable from the installation tree using the imported target name ``mp_myexe`` as if the target were built in its own tree. diff --git a/Help/release/dev/add_androidmk_generator.rst b/Help/release/dev/add_androidmk_generator.rst new file mode 100644 index 0000000..dd7867c --- /dev/null +++ b/Help/release/dev/add_androidmk_generator.rst @@ -0,0 +1,10 @@ +add_androidmk_generator +----------------------- + +* The :command:`install` command gained an ``EXPORT_ANDROID_MK`` + subcommand to install ``Android.mk`` files referencing installed + libraries as prebuilts for the Android NDK build system. + +* The :command:`export` command gained an ``ANDROID_MK`` option + to generate ``Android.mk`` files referencing CMake-built + libraries as prebuilts for the Android NDK build system. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index f5c2e52..39773e1 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -221,10 +221,14 @@ set(SRCS cmExprLexer.cxx cmExprParser.cxx cmExprParserHelper.cxx + cmExportBuildAndroidMKGenerator.h + cmExportBuildAndroidMKGenerator.cxx cmExportBuildFileGenerator.h cmExportBuildFileGenerator.cxx cmExportFileGenerator.h cmExportFileGenerator.cxx + cmExportInstallAndroidMKGenerator.h + cmExportInstallAndroidMKGenerator.cxx cmExportInstallFileGenerator.h cmExportInstallFileGenerator.cxx cmExportTryCompileFileGenerator.h diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx new file mode 100644 index 0000000..3247cc8 --- /dev/null +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -0,0 +1,193 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmExportBuildAndroidMKGenerator.h" + +#include "cmExportSet.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmTargetExport.h" + +cmExportBuildAndroidMKGenerator::cmExportBuildAndroidMKGenerator() +{ + this->LG = CM_NULLPTR; + this->ExportSet = CM_NULLPTR; +} + +void cmExportBuildAndroidMKGenerator::GenerateImportHeaderCode( + std::ostream& os, const std::string&) +{ + os << "LOCAL_PATH := $(call my-dir)\n\n"; +} + +void cmExportBuildAndroidMKGenerator::GenerateImportFooterCode(std::ostream&) +{ +} + +void cmExportBuildAndroidMKGenerator::GenerateExpectedTargetsCode( + std::ostream&, const std::string&) +{ +} + +void cmExportBuildAndroidMKGenerator::GenerateImportTargetCode( + std::ostream& os, const cmGeneratorTarget* target) +{ + std::string targetName = this->Namespace; + targetName += target->GetExportName(); + os << "include $(CLEAR_VARS)\n"; + os << "LOCAL_MODULE := "; + os << targetName << "\n"; + os << "LOCAL_SRC_FILES := "; + std::string path = target->GetLocalGenerator()->ConvertToOutputFormat( + target->GetFullPath(), cmOutputConverter::MAKERULE); + os << path << "\n"; +} + +void cmExportBuildAndroidMKGenerator::GenerateImportPropertyCode( + std::ostream&, const std::string&, cmGeneratorTarget const*, + ImportPropertyMap const&) +{ +} + +void cmExportBuildAndroidMKGenerator::GenerateMissingTargetsCheckCode( + std::ostream&, const std::vector&) +{ +} + +void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( + const cmGeneratorTarget* target, std::ostream& os, + const ImportPropertyMap& properties) +{ + std::string config = ""; + if (this->Configurations.size()) { + config = this->Configurations[0]; + } + cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( + target, os, properties, cmExportBuildAndroidMKGenerator::BUILD, config); +} + +void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( + const cmGeneratorTarget* target, std::ostream& os, + const ImportPropertyMap& properties, GenerateType type, + std::string const& config) +{ + const bool newCMP0022Behavior = + target->GetPolicyStatusCMP0022() != cmPolicies::WARN && + target->GetPolicyStatusCMP0022() != cmPolicies::OLD; + if (!newCMP0022Behavior) { + std::ostringstream w; + if (type == cmExportBuildAndroidMKGenerator::BUILD) { + w << "export(TARGETS ... ANDROID_MK) called with policy CMP0022"; + } else { + w << "install( EXPORT_ANDROID_MK ...) called with policy CMP0022"; + } + w << " set to OLD for target " << target->Target->GetName() << ". " + << "The export will only work with CMP0022 set to NEW."; + target->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + } + if (!properties.empty()) { + os << "LOCAL_CPP_FEATURES := rtti exceptions\n"; + for (ImportPropertyMap::const_iterator pi = properties.begin(); + pi != properties.end(); ++pi) { + if (pi->first == "INTERFACE_COMPILE_OPTIONS") { + os << "LOCAL_CPP_FEATURES += "; + os << (pi->second) << "\n"; + } else if (pi->first == "INTERFACE_LINK_LIBRARIES") { + // need to look at list in pi->second and see if static or shared + // FindTargetToLink + // target->GetLocalGenerator()->FindGeneratorTargetToUse() + // then add to LOCAL_CPPFLAGS + std::vector libraries; + cmSystemTools::ExpandListArgument(pi->second, libraries); + std::string staticLibs; + std::string sharedLibs; + std::string ldlibs; + for (std::vector::iterator i = libraries.begin(); + i != libraries.end(); ++i) { + cmGeneratorTarget* gt = + target->GetLocalGenerator()->FindGeneratorTargetToUse(*i); + if (gt) { + + if (gt->GetType() == cmState::SHARED_LIBRARY || + gt->GetType() == cmState::MODULE_LIBRARY) { + sharedLibs += " " + *i; + } else { + staticLibs += " " + *i; + } + } else { + // evaluate any generator expressions with the current + // build type of the makefile + cmGeneratorExpression ge; + CM_AUTO_PTR cge = ge.Parse(*i); + std::string evaluated = + cge->Evaluate(target->GetLocalGenerator(), config); + bool relpath = false; + if (type == cmExportBuildAndroidMKGenerator::INSTALL) { + relpath = i->substr(0, 3) == "../"; + } + // check for full path or if it already has a -l, or + // in the case of an install check for relative paths + // if it is full or a link library then use string directly + if (cmSystemTools::FileIsFullPath(evaluated) || + evaluated.substr(0, 2) == "-l" || relpath) { + ldlibs += " " + evaluated; + // if it is not a path and does not have a -l then add -l + } else if (!evaluated.empty()) { + ldlibs += " -l" + evaluated; + } + } + } + if (!sharedLibs.empty()) { + os << "LOCAL_SHARED_LIBRARIES :=" << sharedLibs << "\n"; + } + if (!staticLibs.empty()) { + os << "LOCAL_STATIC_LIBRARIES :=" << staticLibs << "\n"; + } + if (!ldlibs.empty()) { + os << "LOCAL_EXPORT_LDLIBS :=" << ldlibs << "\n"; + } + } else if (pi->first == "INTERFACE_INCLUDE_DIRECTORIES") { + std::string includes = pi->second; + std::vector includeList; + cmSystemTools::ExpandListArgument(includes, includeList); + os << "LOCAL_EXPORT_C_INCLUDES := "; + std::string end; + for (std::vector::iterator i = includeList.begin(); + i != includeList.end(); ++i) { + os << end << *i; + end = "\\\n"; + } + os << "\n"; + } else { + os << "# " << pi->first << " " << (pi->second) << "\n"; + } + } + } + switch (target->GetType()) { + case cmState::SHARED_LIBRARY: + case cmState::MODULE_LIBRARY: + os << "include $(PREBUILT_SHARED_LIBRARY)\n"; + break; + case cmState::STATIC_LIBRARY: + os << "include $(PREBUILT_STATIC_LIBRARY)\n"; + break; + case cmState::EXECUTABLE: + case cmState::UTILITY: + case cmState::OBJECT_LIBRARY: + case cmState::GLOBAL_TARGET: + case cmState::INTERFACE_LIBRARY: + case cmState::UNKNOWN_LIBRARY: + break; + } + os << "\n"; +} diff --git a/Source/cmExportBuildAndroidMKGenerator.h b/Source/cmExportBuildAndroidMKGenerator.h new file mode 100644 index 0000000..e26aba0 --- /dev/null +++ b/Source/cmExportBuildAndroidMKGenerator.h @@ -0,0 +1,68 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmExportBuildAndroidMKGenerator_h +#define cmExportBuildAndroidMKGenerator_h + +#include "cmExportBuildFileGenerator.h" +#include "cmListFileCache.h" + +class cmExportSet; + +/** \class cmExportBuildAndroidMKGenerator + * \brief Generate a file exporting targets from a build tree. + * + * cmExportBuildAndroidMKGenerator generates a file exporting targets from + * a build tree. This exports the targets to the Android ndk build tool + * makefile format for prebuilt libraries. + * + * This is used to implement the EXPORT() command. + */ +class cmExportBuildAndroidMKGenerator : public cmExportBuildFileGenerator +{ +public: + cmExportBuildAndroidMKGenerator(); + // this is so cmExportInstallAndroidMKGenerator can share this + // function as they are almost the same + enum GenerateType + { + BUILD, + INSTALL + }; + static void GenerateInterfaceProperties(cmGeneratorTarget const* target, + std::ostream& os, + const ImportPropertyMap& properties, + GenerateType type, + std::string const& config); + +protected: + // Implement virtual methods from the superclass. + virtual void GeneratePolicyHeaderCode(std::ostream&) {} + virtual void GeneratePolicyFooterCode(std::ostream&) {} + virtual void GenerateImportHeaderCode(std::ostream& os, + const std::string& config = ""); + virtual void GenerateImportFooterCode(std::ostream& os); + virtual void GenerateImportTargetCode(std::ostream& os, + const cmGeneratorTarget* target); + virtual void GenerateExpectedTargetsCode(std::ostream& os, + const std::string& expectedTargets); + virtual void GenerateImportPropertyCode(std::ostream& os, + const std::string& config, + cmGeneratorTarget const* target, + ImportPropertyMap const& properties); + virtual void GenerateMissingTargetsCheckCode( + std::ostream& os, const std::vector& missingTargets); + virtual void GenerateInterfaceProperties( + cmGeneratorTarget const* target, std::ostream& os, + const ImportPropertyMap& properties); +}; + +#endif diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index fc62492..134a63f 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -18,6 +18,7 @@ #include #include +#include "cmExportBuildAndroidMKGenerator.h" #include "cmExportBuildFileGenerator.h" #if defined(__HAIKU__) @@ -34,6 +35,7 @@ cmExportCommand::cmExportCommand() , Namespace(&Helper, "NAMESPACE", &ArgumentGroup) , Filename(&Helper, "FILE", &ArgumentGroup) , ExportOld(&Helper, "EXPORT_LINK_INTERFACE_LIBRARIES", &ArgumentGroup) + , AndroidMKFile(&Helper, "ANDROID_MK") { this->ExportSet = CM_NULLPTR; } @@ -66,13 +68,18 @@ bool cmExportCommand::InitialPass(std::vector const& args, } std::string fname; - if (!this->Filename.WasFound()) { + bool android = false; + if (this->AndroidMKFile.WasFound()) { + fname = this->AndroidMKFile.GetString(); + android = true; + } + if (!this->Filename.WasFound() && fname.empty()) { if (args[0] != "EXPORT") { this->SetError("FILE option missing."); return false; } fname = this->ExportSetName.GetString() + ".cmake"; - } else { + } else if (fname.empty()) { // Make sure the file has a .cmake extension. if (cmSystemTools::GetFilenameLastExtension(this->Filename.GetCString()) != ".cmake") { @@ -176,7 +183,12 @@ bool cmExportCommand::InitialPass(std::vector const& args, } // Setup export file generation. - cmExportBuildFileGenerator* ebfg = new cmExportBuildFileGenerator; + cmExportBuildFileGenerator* ebfg = CM_NULLPTR; + if (android) { + ebfg = new cmExportBuildAndroidMKGenerator; + } else { + ebfg = new cmExportBuildFileGenerator; + } ebfg->SetExportFile(fname.c_str()); ebfg->SetNamespace(this->Namespace.GetCString()); ebfg->SetAppendMode(this->Append.IsEnabled()); diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index 0a149af..481d2c5 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -54,6 +54,7 @@ private: cmCAString Namespace; cmCAString Filename; cmCAEnabler ExportOld; + cmCAString AndroidMKFile; cmExportSet* ExportSet; diff --git a/Source/cmExportInstallAndroidMKGenerator.cxx b/Source/cmExportInstallAndroidMKGenerator.cxx new file mode 100644 index 0000000..8f815b7 --- /dev/null +++ b/Source/cmExportInstallAndroidMKGenerator.cxx @@ -0,0 +1,146 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmExportInstallAndroidMKGenerator.h" + +#include "cmAlgorithms.h" +#include "cmExportBuildAndroidMKGenerator.h" +#include "cmExportSet.h" +#include "cmExportSetMap.h" +#include "cmGeneratedFileStream.h" +#include "cmGeneratorTarget.h" +#include "cmGlobalGenerator.h" +#include "cmInstallExportGenerator.h" +#include "cmInstallTargetGenerator.h" +#include "cmLocalGenerator.h" +#include "cmTargetExport.h" + +cmExportInstallAndroidMKGenerator::cmExportInstallAndroidMKGenerator( + cmInstallExportGenerator* iegen) + : cmExportInstallFileGenerator(iegen) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateImportHeaderCode( + std::ostream& os, const std::string&) +{ + std::string installDir = this->IEGen->GetDestination(); + os << "LOCAL_PATH := $(call my-dir)\n"; + size_t numDotDot = cmSystemTools::CountChar(installDir.c_str(), '/'); + numDotDot += (installDir.size() > 0) ? 1 : 0; + std::string path; + for (size_t n = 0; n < numDotDot; n++) { + path += "/.."; + } + os << "_IMPORT_PREFIX := " + << "$(LOCAL_PATH)" << path << "\n\n"; + for (std::vector::const_iterator tei = + this->IEGen->GetExportSet()->GetTargetExports()->begin(); + tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) { + // Collect import properties for this target. + cmTargetExport const* te = *tei; + if (te->Target->GetType() == cmState::INTERFACE_LIBRARY) { + continue; + } + std::string dest; + if (te->LibraryGenerator) { + dest = te->LibraryGenerator->GetDestination(""); + } + if (te->ArchiveGenerator) { + dest = te->ArchiveGenerator->GetDestination(""); + } + te->Target->Target->SetProperty("__dest", dest.c_str()); + } +} + +void cmExportInstallAndroidMKGenerator::GenerateImportFooterCode(std::ostream&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateImportTargetCode( + std::ostream& os, const cmGeneratorTarget* target) +{ + std::string targetName = this->Namespace; + targetName += target->GetExportName(); + os << "include $(CLEAR_VARS)\n"; + os << "LOCAL_MODULE := "; + os << targetName << "\n"; + os << "LOCAL_SRC_FILES := $(_IMPORT_PREFIX)/"; + os << target->Target->GetProperty("__dest") << "/"; + std::string config = ""; + if (this->Configurations.size()) { + config = this->Configurations[0]; + } + os << target->GetFullName(config) << "\n"; +} + +void cmExportInstallAndroidMKGenerator::GenerateExpectedTargetsCode( + std::ostream&, const std::string&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateImportPropertyCode( + std::ostream&, const std::string&, cmGeneratorTarget const*, + ImportPropertyMap const&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateMissingTargetsCheckCode( + std::ostream&, const std::vector&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateInterfaceProperties( + cmGeneratorTarget const* target, std::ostream& os, + const ImportPropertyMap& properties) +{ + std::string config = ""; + if (this->Configurations.size()) { + config = this->Configurations[0]; + } + cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( + target, os, properties, cmExportBuildAndroidMKGenerator::INSTALL, config); +} + +void cmExportInstallAndroidMKGenerator::LoadConfigFiles(std::ostream&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateImportPrefix(std::ostream&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateRequiredCMakeVersion( + std::ostream&, const char*) +{ +} + +void cmExportInstallAndroidMKGenerator::CleanupTemporaryVariables( + std::ostream&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateImportedFileCheckLoop( + std::ostream&) +{ +} + +void cmExportInstallAndroidMKGenerator::GenerateImportedFileChecksCode( + std::ostream&, cmGeneratorTarget*, ImportPropertyMap const&, + const std::set&) +{ +} + +bool cmExportInstallAndroidMKGenerator::GenerateImportFileConfig( + const std::string&, std::vector&) +{ + return true; +} diff --git a/Source/cmExportInstallAndroidMKGenerator.h b/Source/cmExportInstallAndroidMKGenerator.h new file mode 100644 index 0000000..4b9f51c --- /dev/null +++ b/Source/cmExportInstallAndroidMKGenerator.h @@ -0,0 +1,72 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmExportInstallAndroidMKGenerator_h +#define cmExportInstallAndroidMKGenerator_h + +#include "cmExportInstallFileGenerator.h" + +class cmInstallExportGenerator; +class cmInstallTargetGenerator; + +/** \class cmExportInstallAndroidMKGenerator + * \brief Generate a file exporting targets from an install tree. + * + * cmExportInstallAndroidMKGenerator generates files exporting targets from + * install an installation tree. The files are placed in a temporary + * location for installation by cmInstallExportGenerator. The file format + * is for the ndk build system and is a makefile fragment specifing prebuilt + * libraries to the ndk build system. + * + * This is used to implement the INSTALL(EXPORT_ANDROID_MK) command. + */ +class cmExportInstallAndroidMKGenerator : public cmExportInstallFileGenerator +{ +public: + /** Construct with the export installer that will install the + files. */ + cmExportInstallAndroidMKGenerator(cmInstallExportGenerator* iegen); + +protected: + // Implement virtual methods from the superclass. + virtual void GeneratePolicyHeaderCode(std::ostream&) {} + virtual void GeneratePolicyFooterCode(std::ostream&) {} + virtual void GenerateImportHeaderCode(std::ostream& os, + const std::string& config = ""); + virtual void GenerateImportFooterCode(std::ostream& os); + virtual void GenerateImportTargetCode(std::ostream& os, + const cmGeneratorTarget* target); + virtual void GenerateExpectedTargetsCode(std::ostream& os, + const std::string& expectedTargets); + virtual void GenerateImportPropertyCode(std::ostream& os, + const std::string& config, + cmGeneratorTarget const* target, + ImportPropertyMap const& properties); + virtual void GenerateMissingTargetsCheckCode( + std::ostream& os, const std::vector& missingTargets); + virtual void GenerateInterfaceProperties( + cmGeneratorTarget const* target, std::ostream& os, + const ImportPropertyMap& properties); + virtual void GenerateImportPrefix(std::ostream& os); + virtual void LoadConfigFiles(std::ostream&); + virtual void GenerateRequiredCMakeVersion(std::ostream& os, + const char* versionString); + virtual void CleanupTemporaryVariables(std::ostream&); + virtual void GenerateImportedFileCheckLoop(std::ostream& os); + virtual void GenerateImportedFileChecksCode( + std::ostream& os, cmGeneratorTarget* target, + ImportPropertyMap const& properties, + const std::set& importedLocations); + virtual bool GenerateImportFileConfig(const std::string& config, + std::vector&); +}; + +#endif diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 4912eac..e464bce 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -83,6 +83,8 @@ bool cmInstallCommand::InitialPass(std::vector const& args, return this->HandleDirectoryMode(args); } else if (args[0] == "EXPORT") { return this->HandleExportMode(args); + } else if (args[0] == "EXPORT_ANDROID_MK") { + return this->HandleExportAndroidMKMode(args); } // Unknown mode. @@ -1097,6 +1099,100 @@ bool cmInstallCommand::HandleDirectoryMode( return true; } +bool cmInstallCommand::HandleExportAndroidMKMode( + std::vector const& args) +{ +#ifdef CMAKE_BUILD_WITH_CMAKE + // This is the EXPORT mode. + cmInstallCommandArguments ica(this->DefaultComponentName); + cmCAString exp(&ica.Parser, "EXPORT_ANDROID_MK"); + cmCAString name_space(&ica.Parser, "NAMESPACE", &ica.ArgumentGroup); + cmCAEnabler exportOld(&ica.Parser, "EXPORT_LINK_INTERFACE_LIBRARIES", + &ica.ArgumentGroup); + cmCAString filename(&ica.Parser, "FILE", &ica.ArgumentGroup); + exp.Follows(0); + + ica.ArgumentGroup.Follows(&exp); + std::vector unknownArgs; + ica.Parse(&args, &unknownArgs); + + if (!unknownArgs.empty()) { + // Unknown argument. + std::ostringstream e; + e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\"."; + this->SetError(e.str()); + return false; + } + + if (!ica.Finalize()) { + return false; + } + + // Make sure there is a destination. + if (ica.GetDestination().empty()) { + // A destination is required. + std::ostringstream e; + e << args[0] << " given no DESTINATION!"; + this->SetError(e.str()); + return false; + } + + // Check the file name. + std::string fname = filename.GetString(); + if (fname.find_first_of(":/\\") != fname.npos) { + std::ostringstream e; + e << args[0] << " given invalid export file name \"" << fname << "\". " + << "The FILE argument may not contain a path. " + << "Specify the path in the DESTINATION argument."; + this->SetError(e.str()); + return false; + } + + // Check the file extension. + if (!fname.empty() && + cmSystemTools::GetFilenameLastExtension(fname) != ".mk") { + std::ostringstream e; + e << args[0] << " given invalid export file name \"" << fname << "\". " + << "The FILE argument must specify a name ending in \".mk\"."; + this->SetError(e.str()); + return false; + } + if (fname.find_first_of(":/\\") != fname.npos) { + std::ostringstream e; + e << args[0] << " given export name \"" << exp.GetString() << "\". " + << "This name cannot be safely converted to a file name. " + << "Specify a different export name or use the FILE option to set " + << "a file name explicitly."; + this->SetError(e.str()); + return false; + } + // Use the default name + if (fname.empty()) { + fname = "Android.mk"; + } + + cmExportSet* exportSet = + this->Makefile->GetGlobalGenerator()->GetExportSets()[exp.GetString()]; + + cmInstallGenerator::MessageLevel message = + cmInstallGenerator::SelectMessageLevel(this->Makefile); + + // Create the export install generator. + cmInstallExportGenerator* exportGenerator = new cmInstallExportGenerator( + exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(), + ica.GetConfigurations(), ica.GetComponent().c_str(), message, + ica.GetExcludeFromAll(), fname.c_str(), name_space.GetCString(), + exportOld.IsEnabled(), true); + this->Makefile->AddInstallGenerator(exportGenerator); + + return true; +#else + static_cast(args); + this->SetError("EXPORT_ANDROID_MK not supported in bootstrap cmake"); + return false; +#endif +} + bool cmInstallCommand::HandleExportMode(std::vector const& args) { // This is the EXPORT mode. @@ -1203,7 +1299,7 @@ bool cmInstallCommand::HandleExportMode(std::vector const& args) exportSet, ica.GetDestination().c_str(), ica.GetPermissions().c_str(), ica.GetConfigurations(), ica.GetComponent().c_str(), message, ica.GetExcludeFromAll(), fname.c_str(), name_space.GetCString(), - exportOld.IsEnabled()); + exportOld.IsEnabled(), false); this->Makefile->AddInstallGenerator(exportGenerator); return true; diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index 3718ad5..7bc974c 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -48,6 +48,7 @@ private: bool HandleFilesMode(std::vector const& args); bool HandleDirectoryMode(std::vector const& args); bool HandleExportMode(std::vector const& args); + bool HandleExportAndroidMKMode(std::vector const& args); bool MakeFilesFullPath(const char* modeName, const std::vector& relFiles, std::vector& absFiles); diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportAndroidMKGenerator.cxx similarity index 59% copy from Source/cmInstallExportGenerator.cxx copy to Source/cmInstallExportAndroidMKGenerator.cxx index 27628f4..43bdc01 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportAndroidMKGenerator.cxx @@ -1,3 +1,4 @@ + /*============================================================================ CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, Inc., Insight Software Consortium @@ -9,120 +10,42 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#include "cmInstallExportGenerator.h" +#include "cmInstallExportAndroidMKGenerator.h" -#include -#include -#include -#include +#include #include "cmExportInstallFileGenerator.h" #include "cmExportSet.h" -#include "cmInstallType.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmInstallFilesGenerator.h" +#include "cmInstallTargetGenerator.h" #include "cmLocalGenerator.h" -#include "cmSystemTools.h" +#include "cmMakefile.h" #include "cmake.h" -cmInstallExportGenerator::cmInstallExportGenerator( +cmInstallExportAndroidMKGenerator::cmInstallExportAndroidMKGenerator( cmExportSet* exportSet, const char* destination, const char* file_permissions, std::vector const& configurations, const char* component, MessageLevel message, bool exclude_from_all, const char* filename, const char* name_space, bool exportOld) - : cmInstallGenerator(destination, configurations, component, message, - exclude_from_all) - , ExportSet(exportSet) - , FilePermissions(file_permissions) - , FileName(filename) - , Namespace(name_space) - , ExportOld(exportOld) - , LocalGenerator(CM_NULLPTR) + : cmInstallExportGenerator(exportSet, destination, file_permissions, + configurations, component, message, + exclude_from_all, filename, name_space, exportOld) { - this->EFGen = new cmExportInstallFileGenerator(this); - exportSet->AddInstallation(this); } -cmInstallExportGenerator::~cmInstallExportGenerator() +cmInstallExportAndroidMKGenerator::~cmInstallExportAndroidMKGenerator() { - delete this->EFGen; } -void cmInstallExportGenerator::Compute(cmLocalGenerator* lg) +void cmInstallExportAndroidMKGenerator::Compute(cmLocalGenerator* lg) { this->LocalGenerator = lg; this->ExportSet->Compute(lg); } -void cmInstallExportGenerator::ComputeTempDir() -{ - // Choose a temporary directory in which to generate the import - // files to be installed. - this->TempDir = this->LocalGenerator->GetCurrentBinaryDirectory(); - this->TempDir += cmake::GetCMakeFilesDirectory(); - this->TempDir += "/Export"; - if (this->Destination.empty()) { - return; - } - this->TempDir += "/"; - - // Enforce a maximum length. - bool useMD5 = false; -#if defined(_WIN32) || defined(__CYGWIN__) - std::string::size_type const max_total_len = 250; -#else - std::string::size_type const max_total_len = 1000; -#endif - // Will generate files of the form "/-.". - std::string::size_type const len = this->TempDir.size() + 1 + - this->FileName.size() + 1 + this->GetMaxConfigLength(); - if (len < max_total_len) { - // Keep the total path length below the limit. - std::string::size_type const max_len = max_total_len - len; - if (this->Destination.size() > max_len) { - useMD5 = true; - } - } else { - useMD5 = true; - } - if (useMD5) { - // Replace the destination path with a hash to keep it short. - this->TempDir += cmSystemTools::ComputeStringMD5(this->Destination); - } else { - std::string dest = this->Destination; - // Avoid unix full paths. - if (dest[0] == '/') { - dest[0] = '_'; - } - // Avoid windows full paths by removing colons. - std::replace(dest.begin(), dest.end(), ':', '_'); - // Avoid relative paths that go up the tree. - cmSystemTools::ReplaceString(dest, "../", "__/"); - // Avoid spaces. - std::replace(dest.begin(), dest.end(), ' ', '_'); - this->TempDir += dest; - } -} - -size_t cmInstallExportGenerator::GetMaxConfigLength() const -{ - // Always use at least 8 for "noconfig". - size_t len = 8; - if (this->ConfigurationTypes->empty()) { - if (this->ConfigurationName.size() > 8) { - len = this->ConfigurationName.size(); - } - } else { - for (std::vector::const_iterator ci = - this->ConfigurationTypes->begin(); - ci != this->ConfigurationTypes->end(); ++ci) { - if (ci->size() > len) { - len = ci->size(); - } - } - } - return len; -} - -void cmInstallExportGenerator::GenerateScript(std::ostream& os) +void cmInstallExportAndroidMKGenerator::GenerateScript(std::ostream& os) { // Skip empty sets. if (ExportSet->GetTargetExports()->empty()) { @@ -165,8 +88,8 @@ void cmInstallExportGenerator::GenerateScript(std::ostream& os) this->cmInstallGenerator::GenerateScript(os); } -void cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os, - Indent const& indent) +void cmInstallExportAndroidMKGenerator::GenerateScriptConfigs( + std::ostream& os, Indent const& indent) { // Create the main install rules first. this->cmInstallGenerator::GenerateScriptConfigs(os, indent); @@ -188,8 +111,8 @@ void cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os, } } -void cmInstallExportGenerator::GenerateScriptActions(std::ostream& os, - Indent const& indent) +void cmInstallExportAndroidMKGenerator::GenerateScriptActions( + std::ostream& os, Indent const& indent) { // Remove old per-configuration export files if the main changes. std::string installedDir = "$ENV{DESTDIR}"; diff --git a/Source/cmInstallExportAndroidMKGenerator.h b/Source/cmInstallExportAndroidMKGenerator.h new file mode 100644 index 0000000..158972d --- /dev/null +++ b/Source/cmInstallExportAndroidMKGenerator.h @@ -0,0 +1,46 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmInstallExportAndroidMKGenerator_h +#define cmInstallExportAndroidMKGenerator_h + +#include "cmInstallExportGenerator.h" + +class cmExportInstallFileGenerator; +class cmInstallFilesGenerator; +class cmInstallTargetGenerator; +class cmExportSet; +class cmMakefile; + +/** \class cmInstallExportAndroidMKGenerator + * \brief Generate rules for creating an export files. + */ +class cmInstallExportAndroidMKGenerator : public cmInstallExportGenerator +{ +public: + cmInstallExportAndroidMKGenerator( + cmExportSet* exportSet, const char* dest, const char* file_permissions, + const std::vector& configurations, const char* component, + MessageLevel message, bool exclude_from_all, const char* filename, + const char* name_space, bool exportOld); + ~cmInstallExportAndroidMKGenerator(); + + void Compute(cmLocalGenerator* lg); + +protected: + virtual void GenerateScript(std::ostream& os); + virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent); + virtual void GenerateScriptActions(std::ostream& os, Indent const& indent); + void GenerateImportFile(cmExportSet const* exportSet); + void GenerateImportFile(const char* config, cmExportSet const* exportSet); +}; + +#endif diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 27628f4..5ea7faf 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -16,6 +16,9 @@ #include #include +#ifdef CMAKE_BUILD_WITH_CMAKE +#include "cmExportInstallAndroidMKGenerator.h" +#endif #include "cmExportInstallFileGenerator.h" #include "cmExportSet.h" #include "cmInstallType.h" @@ -27,7 +30,7 @@ cmInstallExportGenerator::cmInstallExportGenerator( cmExportSet* exportSet, const char* destination, const char* file_permissions, std::vector const& configurations, const char* component, MessageLevel message, bool exclude_from_all, - const char* filename, const char* name_space, bool exportOld) + const char* filename, const char* name_space, bool exportOld, bool android) : cmInstallGenerator(destination, configurations, component, message, exclude_from_all) , ExportSet(exportSet) @@ -37,7 +40,13 @@ cmInstallExportGenerator::cmInstallExportGenerator( , ExportOld(exportOld) , LocalGenerator(CM_NULLPTR) { - this->EFGen = new cmExportInstallFileGenerator(this); + if (android) { +#ifdef CMAKE_BUILD_WITH_CMAKE + this->EFGen = new cmExportInstallAndroidMKGenerator(this); +#endif + } else { + this->EFGen = new cmExportInstallFileGenerator(this); + } exportSet->AddInstallation(this); } diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h index 5539827..ac02386 100644 --- a/Source/cmInstallExportGenerator.h +++ b/Source/cmInstallExportGenerator.h @@ -37,7 +37,8 @@ public: const std::vector& configurations, const char* component, MessageLevel message, bool exclude_from_all, const char* filename, - const char* name_space, bool exportOld); + const char* name_space, bool exportOld, + bool android); ~cmInstallExportGenerator() CM_OVERRIDE; cmExportSet* GetExportSet() { return this->ExportSet; } diff --git a/Tests/RunCMake/AndroidMK/AndroidMK-check.cmake b/Tests/RunCMake/AndroidMK/AndroidMK-check.cmake new file mode 100644 index 0000000..691e326 --- /dev/null +++ b/Tests/RunCMake/AndroidMK/AndroidMK-check.cmake @@ -0,0 +1,30 @@ +# This file does a regex file compare on the generated +# Android.mk files from the AndroidMK test + +macro(compare_file_to_expected file expected_file) + file(READ "${file}" ANDROID_MK) + # clean up new lines + string(REGEX REPLACE "\r\n" "\n" ANDROID_MK "${ANDROID_MK}") + string(REGEX REPLACE "\n+$" "" ANDROID_MK "${ANDROID_MK}") + # read in the expected regex file + file(READ "${expected_file}" expected) + # clean up new lines + string(REGEX REPLACE "\r\n" "\n" expected "${expected}") + string(REGEX REPLACE "\n+$" "" expected "${expected}") + # compare the file to the expected regex and if there is not a match + # put an error message in RunCMake_TEST_FAILED + if(NOT "${ANDROID_MK}" MATCHES "${expected}") + set(RunCMake_TEST_FAILED + "${file} does not match ${expected_file}: + +Android.mk contents = [\n${ANDROID_MK}\n] +Expected = [\n${expected}\n]") + endif() +endmacro() + +compare_file_to_expected( +"${RunCMake_BINARY_DIR}/AndroidMK-build/Android.mk" +"${RunCMake_TEST_SOURCE_DIR}/expectedBuildAndroidMK.txt") +compare_file_to_expected( +"${RunCMake_BINARY_DIR}/AndroidMK-build/CMakeFiles/Export/share/ndk-modules/Android.mk" +"${RunCMake_TEST_SOURCE_DIR}/expectedInstallAndroidMK.txt") diff --git a/Tests/RunCMake/AndroidMK/AndroidMK.cmake b/Tests/RunCMake/AndroidMK/AndroidMK.cmake new file mode 100644 index 0000000..ed21e58 --- /dev/null +++ b/Tests/RunCMake/AndroidMK/AndroidMK.cmake @@ -0,0 +1,11 @@ +project(build) +set(CMAKE_BUILD_TYPE Debug) +add_library(foo foo.cxx) +add_library(car foo.cxx) +add_library(bar foo.cxx) +add_library(dog foo.cxx) +target_link_libraries(foo car bar dog debug -lm) +export(TARGETS bar dog car foo ANDROID_MK + ${build_BINARY_DIR}/Android.mk) +install(TARGETS bar dog car foo DESTINATION lib EXPORT myexp) +install(EXPORT_ANDROID_MK myexp DESTINATION share/ndk-modules) diff --git a/Tests/RunCMake/AndroidMK/CMakeLists.txt b/Tests/RunCMake/AndroidMK/CMakeLists.txt new file mode 100644 index 0000000..576787a --- /dev/null +++ b/Tests/RunCMake/AndroidMK/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.5) +project(${RunCMake_TEST} NONE) # or languages needed +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/AndroidMK/RunCMakeTest.cmake b/Tests/RunCMake/AndroidMK/RunCMakeTest.cmake new file mode 100644 index 0000000..786d45b --- /dev/null +++ b/Tests/RunCMake/AndroidMK/RunCMakeTest.cmake @@ -0,0 +1,2 @@ +include(RunCMake) +run_cmake(AndroidMK) diff --git a/Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt b/Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt new file mode 100644 index 0000000..def8fcb --- /dev/null +++ b/Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt @@ -0,0 +1,23 @@ +LOCAL_PATH.*call my-dir.* +include.*CLEAR_VARS.* +LOCAL_MODULE.*bar +LOCAL_SRC_FILES.*bar.* +include.*PREBUILT_STATIC_LIBRARY.* +.* +include.*CLEAR_VARS.* +LOCAL_MODULE.*dog +LOCAL_SRC_FILES.*.*dog.* +include.*PREBUILT_STATIC_LIBRARY.* +.* +include.*CLEAR_VARS.* +LOCAL_MODULE.*car +LOCAL_SRC_FILES.*.*car.* +include.*PREBUILT_STATIC_LIBRARY.* +.* +include.*CLEAR_VARS.* +LOCAL_MODULE.*foo +LOCAL_SRC_FILES.*.*foo.* +LOCAL_CPP_FEATURES.*rtti exceptions +LOCAL_STATIC_LIBRARIES.*car bar dog +LOCAL_EXPORT_LDLIBS := -lm +include.*PREBUILT_STATIC_LIBRARY.* diff --git a/Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt b/Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt new file mode 100644 index 0000000..1bdb308 --- /dev/null +++ b/Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt @@ -0,0 +1,25 @@ +LOCAL_PATH.*call my-dir.* +_IMPORT_PREFIX.*LOCAL_PATH./../.. + +include.*CLEAR_VARS.* +LOCAL_MODULE.*bar +LOCAL_SRC_FILES.*_IMPORT_PREFIX./lib.*bar.* +include.*PREBUILT_STATIC_LIBRARY.* + +include.*CLEAR_VARS. +LOCAL_MODULE.*dog +LOCAL_SRC_FILES.*_IMPORT_PREFIX./lib.*dog.* +include.*PREBUILT_STATIC_LIBRARY.* + +include.*CLEAR_VARS.* +LOCAL_MODULE.*car +LOCAL_SRC_FILES.*_IMPORT_PREFIX./lib.*car.* +include.*PREBUILT_STATIC_LIBRARY.* + +include.*CLEAR_VARS.* +LOCAL_MODULE.*foo +LOCAL_SRC_FILES.*_IMPORT_PREFIX\)/lib.*foo.* +LOCAL_CPP_FEATURES.*rtti exceptions +LOCAL_STATIC_LIBRARIES.*car bar dog +LOCAL_EXPORT_LDLIBS := -lm +include.*PREBUILT_STATIC_LIBRARY.* diff --git a/Tests/RunCMake/AndroidMK/foo.cxx b/Tests/RunCMake/AndroidMK/foo.cxx new file mode 100644 index 0000000..3695dc9 --- /dev/null +++ b/Tests/RunCMake/AndroidMK/foo.cxx @@ -0,0 +1,3 @@ +void foo() +{ +} diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index fa3d0f9..e36b2a6 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -331,6 +331,8 @@ add_RunCMake_test_group(CPack "DEB;RPM;TGZ") # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used add_RunCMake_test(AutoExportDll) +add_RunCMake_test(AndroidMK) + if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN) if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja") message(FATAL_ERROR "Android tests supported only by Makefile and Ninja generators") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5257063b04a95aca3d144f860698a3c7181e554 commit d5257063b04a95aca3d144f860698a3c7181e554 Author: Bill Hoffman AuthorDate: Tue Jul 12 13:26:55 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 10:37:33 2016 -0400 Export: Virtualize file generation step helpers Allow subclasses to override the actual content generation. diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 5234597..d106ab7 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -78,27 +78,28 @@ protected: std::vector& missingTargets); // Methods to implement export file code generation. - void GeneratePolicyHeaderCode(std::ostream& os); - void GeneratePolicyFooterCode(std::ostream& os); - void GenerateImportHeaderCode(std::ostream& os, - const std::string& config = ""); - void GenerateImportFooterCode(std::ostream& os); + virtual void GeneratePolicyHeaderCode(std::ostream& os); + virtual void GeneratePolicyFooterCode(std::ostream& os); + virtual void GenerateImportHeaderCode(std::ostream& os, + const std::string& config = ""); + virtual void GenerateImportFooterCode(std::ostream& os); void GenerateImportVersionCode(std::ostream& os); - void GenerateImportTargetCode(std::ostream& os, - cmGeneratorTarget const* target); - void GenerateImportPropertyCode(std::ostream& os, const std::string& config, - cmGeneratorTarget const* target, - ImportPropertyMap const& properties); - void GenerateImportedFileChecksCode( + virtual void GenerateImportTargetCode(std::ostream& os, + cmGeneratorTarget const* target); + virtual void GenerateImportPropertyCode(std::ostream& os, + const std::string& config, + cmGeneratorTarget const* target, + ImportPropertyMap const& properties); + virtual void GenerateImportedFileChecksCode( std::ostream& os, cmGeneratorTarget* target, ImportPropertyMap const& properties, const std::set& importedLocations); - void GenerateImportedFileCheckLoop(std::ostream& os); - void GenerateMissingTargetsCheckCode( + virtual void GenerateImportedFileCheckLoop(std::ostream& os); + virtual void GenerateMissingTargetsCheckCode( std::ostream& os, const std::vector& missingTargets); - void GenerateExpectedTargetsCode(std::ostream& os, - const std::string& expectedTargets); + virtual void GenerateExpectedTargetsCode(std::ostream& os, + const std::string& expectedTargets); // Collect properties with detailed information about targets beyond // their location on disk. @@ -142,9 +143,9 @@ protected: ImportPropertyMap& properties); void PopulateCompatibleInterfaceProperties(cmGeneratorTarget* target, ImportPropertyMap& properties); - void GenerateInterfaceProperties(cmGeneratorTarget const* target, - std::ostream& os, - const ImportPropertyMap& properties); + virtual void GenerateInterfaceProperties( + cmGeneratorTarget const* target, std::ostream& os, + const ImportPropertyMap& properties); void PopulateIncludeDirectoriesInterface( cmTargetExport* target, cmGeneratorExpression::PreprocessContext preprocessRule, @@ -171,8 +172,8 @@ protected: std::vector& missingTargets, FreeTargetsReplace replace = NoReplaceFreeTargets); - void GenerateRequiredCMakeVersion(std::ostream& os, - const char* versionString); + virtual void GenerateRequiredCMakeVersion(std::ostream& os, + const char* versionString); // The namespace in which the exports are placed in the generated file. std::string Namespace; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index fe34efd..63f2d40 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -81,16 +81,16 @@ protected: const std::string& name); /** Generate the relative import prefix. */ - void GenerateImportPrefix(std::ostream&); + virtual void GenerateImportPrefix(std::ostream&); /** Generate the relative import prefix. */ - void LoadConfigFiles(std::ostream&); + virtual void LoadConfigFiles(std::ostream&); - void CleanupTemporaryVariables(std::ostream&); + virtual void CleanupTemporaryVariables(std::ostream&); /** Generate a per-configuration file for the targets. */ - bool GenerateImportFileConfig(const std::string& config, - std::vector& missingTargets); + virtual bool GenerateImportFileConfig( + const std::string& config, std::vector& missingTargets); /** Fill in properties indicating installed file locations. */ void SetImportLocationProperty(const std::string& config, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f81b9475f3724eef5d9e81b9190e30f5df09c808 commit f81b9475f3724eef5d9e81b9190e30f5df09c808 Author: Bill Hoffman AuthorDate: Tue Jul 12 13:26:55 2016 -0400 Commit: Brad King CommitDate: Thu Sep 8 10:37:31 2016 -0400 Export: Factor out file generation steps into helpers Do not actually generate any content in the driving code paths. Use helpers for that. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 23c77d9..c4c7d7d 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -96,24 +96,8 @@ bool cmExportFileGenerator::GenerateImportFile() } std::ostream& os = *foutPtr; - // Protect that file against use with older CMake versions. - /* clang-format off */ - os << "# Generated by CMake\n\n"; - os << "if(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n" - << " message(FATAL_ERROR \"CMake >= 2.6.0 required\")\n" - << "endif()\n"; - /* clang-format on */ - - // Isolate the file policy level. - // We use 2.6 here instead of the current version because newer - // versions of CMake should be able to export files imported by 2.6 - // until the import format changes. - /* clang-format off */ - os << "cmake_policy(PUSH)\n" - << "cmake_policy(VERSION 2.6)\n"; - /* clang-format on */ - // Start with the import file header. + this->GeneratePolicyHeaderCode(os); this->GenerateImportHeaderCode(os); // Create all the imported targets. @@ -121,7 +105,7 @@ bool cmExportFileGenerator::GenerateImportFile() // End with the import file footer. this->GenerateImportFooterCode(os); - os << "cmake_policy(POP)\n"; + this->GeneratePolicyFooterCode(os); return result; } @@ -832,6 +816,31 @@ void cmExportFileGenerator::SetImportLinkProperty( properties[prop] = link_entries; } +void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os) +{ + // Protect that file against use with older CMake versions. + /* clang-format off */ + os << "# Generated by CMake\n\n"; + os << "if(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n" + << " message(FATAL_ERROR \"CMake >= 2.6.0 required\")\n" + << "endif()\n"; + /* clang-format on */ + + // Isolate the file policy level. + // We use 2.6 here instead of the current version because newer + // versions of CMake should be able to export files imported by 2.6 + // until the import format changes. + /* clang-format off */ + os << "cmake_policy(PUSH)\n" + << "cmake_policy(VERSION 2.6)\n"; + /* clang-format on */ +} + +void cmExportFileGenerator::GeneratePolicyFooterCode(std::ostream& os) +{ + os << "cmake_policy(POP)\n"; +} + void cmExportFileGenerator::GenerateImportHeaderCode(std::ostream& os, const std::string& config) { diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 354994a..5234597 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -78,6 +78,8 @@ protected: std::vector& missingTargets); // Methods to implement export file code generation. + void GeneratePolicyHeaderCode(std::ostream& os); + void GeneratePolicyFooterCode(std::ostream& os); void GenerateImportHeaderCode(std::ostream& os, const std::string& config = ""); void GenerateImportFooterCode(std::ostream& os); diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index bcadaa0..f47038f 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -75,58 +75,8 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) this->GenerateExpectedTargetsCode(os, expectedTargets); } - // Set an _IMPORT_PREFIX variable for import location properties - // to reference if they are relative to the install prefix. - std::string installPrefix = - this->IEGen->GetLocalGenerator()->GetMakefile()->GetSafeDefinition( - "CMAKE_INSTALL_PREFIX"); - std::string const& expDest = this->IEGen->GetDestination(); - if (cmSystemTools::FileIsFullPath(expDest)) { - // The export file is being installed to an absolute path so the - // package is not relocatable. Use the configured install prefix. - /* clang-format off */ - os << - "# The installation prefix configured by this project.\n" - "set(_IMPORT_PREFIX \"" << installPrefix << "\")\n" - "\n"; - /* clang-format on */ - } else { - // Add code to compute the installation prefix relative to the - // import file location. - std::string absDest = installPrefix + "/" + expDest; - std::string absDestS = absDest + "/"; - os << "# Compute the installation prefix relative to this file.\n" - << "get_filename_component(_IMPORT_PREFIX" - << " \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"; - if (cmHasLiteralPrefix(absDestS.c_str(), "/lib/") || - cmHasLiteralPrefix(absDestS.c_str(), "/lib64/") || - cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib/") || - cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/")) { - // Handle "/usr move" symlinks created by some Linux distros. - /* clang-format off */ - os << - "# Use original install prefix when loaded through a\n" - "# cross-prefix symbolic link such as /lib -> /usr/lib.\n" - "get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)\n" - "get_filename_component(_realOrig \"" << absDest << "\" REALPATH)\n" - "if(_realCurr STREQUAL _realOrig)\n" - " set(_IMPORT_PREFIX \"" << absDest << "\")\n" - "endif()\n" - "unset(_realOrig)\n" - "unset(_realCurr)\n"; - /* clang-format on */ - } - std::string dest = expDest; - while (!dest.empty()) { - os << "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" " - "PATH)\n"; - dest = cmSystemTools::GetFilenamePath(dest); - } - os << "if(_IMPORT_PREFIX STREQUAL \"/\")\n" - << " set(_IMPORT_PREFIX \"\")\n" - << "endif()\n" - << "\n"; - } + // Compute the relative import prefix for the file + this->GenerateImportPrefix(os); std::vector missingTargets; @@ -204,24 +154,9 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) this->GenerateRequiredCMakeVersion(os, "2.8.12"); } - // Now load per-configuration properties for them. - /* clang-format off */ - os << "# Load information for each installed configuration.\n" - << "get_filename_component(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" - << "file(GLOB CONFIG_FILES \"${_DIR}/" - << this->GetConfigImportFileGlob() << "\")\n" - << "foreach(f ${CONFIG_FILES})\n" - << " include(${f})\n" - << "endforeach()\n" - << "\n"; - /* clang-format on */ + this->LoadConfigFiles(os); - // Cleanup the import prefix variable. - /* clang-format off */ - os << "# Cleanup temporary variables.\n" - << "set(_IMPORT_PREFIX)\n" - << "\n"; - /* clang-format on */ + this->CleanupTemporaryVariables(os); this->GenerateImportedFileCheckLoop(os); bool result = true; @@ -242,6 +177,86 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) return result; } +void cmExportInstallFileGenerator::GenerateImportPrefix(std::ostream& os) +{ + // Set an _IMPORT_PREFIX variable for import location properties + // to reference if they are relative to the install prefix. + std::string installPrefix = + this->IEGen->GetLocalGenerator()->GetMakefile()->GetSafeDefinition( + "CMAKE_INSTALL_PREFIX"); + std::string const& expDest = this->IEGen->GetDestination(); + if (cmSystemTools::FileIsFullPath(expDest)) { + // The export file is being installed to an absolute path so the + // package is not relocatable. Use the configured install prefix. + /* clang-format off */ + os << + "# The installation prefix configured by this project.\n" + "set(_IMPORT_PREFIX \"" << installPrefix << "\")\n" + "\n"; + /* clang-format on */ + } else { + // Add code to compute the installation prefix relative to the + // import file location. + std::string absDest = installPrefix + "/" + expDest; + std::string absDestS = absDest + "/"; + os << "# Compute the installation prefix relative to this file.\n" + << "get_filename_component(_IMPORT_PREFIX" + << " \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"; + if (cmHasLiteralPrefix(absDestS.c_str(), "/lib/") || + cmHasLiteralPrefix(absDestS.c_str(), "/lib64/") || + cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib/") || + cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/")) { + // Handle "/usr move" symlinks created by some Linux distros. + /* clang-format off */ + os << + "# Use original install prefix when loaded through a\n" + "# cross-prefix symbolic link such as /lib -> /usr/lib.\n" + "get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)\n" + "get_filename_component(_realOrig \"" << absDest << "\" REALPATH)\n" + "if(_realCurr STREQUAL _realOrig)\n" + " set(_IMPORT_PREFIX \"" << absDest << "\")\n" + "endif()\n" + "unset(_realOrig)\n" + "unset(_realCurr)\n"; + /* clang-format on */ + } + std::string dest = expDest; + while (!dest.empty()) { + os << "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" " + "PATH)\n"; + dest = cmSystemTools::GetFilenamePath(dest); + } + os << "if(_IMPORT_PREFIX STREQUAL \"/\")\n" + << " set(_IMPORT_PREFIX \"\")\n" + << "endif()\n" + << "\n"; + } +} + +void cmExportInstallFileGenerator::CleanupTemporaryVariables(std::ostream& os) +{ + /* clang-format off */ + os << "# Cleanup temporary variables.\n" + << "set(_IMPORT_PREFIX)\n" + << "\n"; + /* clang-format on */ +} + +void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os) +{ + // Now load per-configuration properties for them. + /* clang-format off */ + os << "# Load information for each installed configuration.\n" + << "get_filename_component(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" + << "file(GLOB CONFIG_FILES \"${_DIR}/" + << this->GetConfigImportFileGlob() << "\")\n" + << "foreach(f ${CONFIG_FILES})\n" + << " include(${f})\n" + << "endforeach()\n" + << "\n"; + /* clang-format on */ +} + void cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string& input) { std::string::size_type pos = 0; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index c693dc1..fe34efd 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -80,6 +80,14 @@ protected: std::vector FindNamespaces(cmGlobalGenerator* gg, const std::string& name); + /** Generate the relative import prefix. */ + void GenerateImportPrefix(std::ostream&); + + /** Generate the relative import prefix. */ + void LoadConfigFiles(std::ostream&); + + void CleanupTemporaryVariables(std::ostream&); + /** Generate a per-configuration file for the targets. */ bool GenerateImportFileConfig(const std::string& config, std::vector& missingTargets); ----------------------------------------------------------------------- Summary of changes: Help/command/export.rst | 15 ++ Help/command/install.rst | 14 +- Help/release/dev/add_androidmk_generator.rst | 10 + Source/CMakeLists.txt | 4 + Source/cmExportBuildAndroidMKGenerator.cxx | 193 ++++++++++++++++++++ Source/cmExportBuildAndroidMKGenerator.h | 68 +++++++ Source/cmExportCommand.cxx | 18 +- Source/cmExportCommand.h | 1 + Source/cmExportFileGenerator.cxx | 45 +++-- Source/cmExportFileGenerator.h | 39 ++-- Source/cmExportInstallAndroidMKGenerator.cxx | 146 +++++++++++++++ Source/cmExportInstallAndroidMKGenerator.h | 72 ++++++++ Source/cmExportInstallFileGenerator.cxx | 153 +++++++++------- Source/cmExportInstallFileGenerator.h | 12 +- Source/cmInstallCommand.cxx | 98 +++++++++- Source/cmInstallCommand.h | 1 + ...r.cxx => cmInstallExportAndroidMKGenerator.cxx} | 115 ++---------- Source/cmInstallExportAndroidMKGenerator.h | 46 +++++ Source/cmInstallExportGenerator.cxx | 13 +- Source/cmInstallExportGenerator.h | 3 +- Tests/RunCMake/AndroidMK/AndroidMK-check.cmake | 30 +++ Tests/RunCMake/AndroidMK/AndroidMK.cmake | 11 ++ .../{ClangTidy => AndroidMK}/CMakeLists.txt | 2 +- Tests/RunCMake/AndroidMK/RunCMakeTest.cmake | 2 + .../RunCMake/AndroidMK/expectedBuildAndroidMK.txt | 23 +++ .../AndroidMK/expectedInstallAndroidMK.txt | 25 +++ .../foo.cpp => RunCMake/AndroidMK/foo.cxx} | 0 Tests/RunCMake/CMakeLists.txt | 2 + 28 files changed, 948 insertions(+), 213 deletions(-) create mode 100644 Help/release/dev/add_androidmk_generator.rst create mode 100644 Source/cmExportBuildAndroidMKGenerator.cxx create mode 100644 Source/cmExportBuildAndroidMKGenerator.h create mode 100644 Source/cmExportInstallAndroidMKGenerator.cxx create mode 100644 Source/cmExportInstallAndroidMKGenerator.h copy Source/{cmInstallExportGenerator.cxx => cmInstallExportAndroidMKGenerator.cxx} (59%) create mode 100644 Source/cmInstallExportAndroidMKGenerator.h create mode 100644 Tests/RunCMake/AndroidMK/AndroidMK-check.cmake create mode 100644 Tests/RunCMake/AndroidMK/AndroidMK.cmake copy Tests/RunCMake/{ClangTidy => AndroidMK}/CMakeLists.txt (56%) create mode 100644 Tests/RunCMake/AndroidMK/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt create mode 100644 Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt copy Tests/{CTestCoverageCollectGCOV/TestProject/3rdparty/foo.cpp => RunCMake/AndroidMK/foo.cxx} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 13:52:58 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 13:52:58 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1987-g579af61 Message-ID: <20160913175258.56FB1F58C4@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, next has been updated via 579af61dae6e3346891f1b53f806d7889335364a (commit) via e5ba1041be862212a3ad66bd51930fc7beeb8140 (commit) from 8f2476403501201d548e1225351cd1bcbe69beb0 (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=579af61dae6e3346891f1b53f806d7889335364a commit 579af61dae6e3346891f1b53f806d7889335364a Merge: 8f24764 e5ba104 Author: Brad King AuthorDate: Tue Sep 13 13:52:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 13:52:57 2016 -0400 Merge topic 'file-curl-userpw' into next e5ba1041 file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5ba1041be862212a3ad66bd51930fc7beeb8140 commit e5ba1041be862212a3ad66bd51930fc7beeb8140 Author: Ruslan Baratov AuthorDate: Tue Sep 13 20:24:12 2016 +0300 Commit: Ruslan Baratov CommitDate: Tue Sep 13 20:24:12 2016 +0300 file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption diff --git a/Help/command/file.rst b/Help/command/file.rst index 256d16d..f8727f0 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -222,6 +222,9 @@ Options to both ``DOWNLOAD`` and ``UPLOAD`` are: ``TIMEOUT `` Terminate the operation after a given total time has elapsed. +``USERPWD :`` + Set username and password for operation. + Additional options to ``DOWNLOAD`` are: ``EXPECTED_HASH ALGO=`` diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index ae7a511..2c226cd 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2481,6 +2481,7 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) std::string hashMatchMSG; CM_AUTO_PTR hash; bool showProgress = false; + std::string userpwd; while (i != args.end()) { if (*i == "TIMEOUT") { @@ -2564,6 +2565,13 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) return false; } hashMatchMSG = algo + " hash"; + } else if (*i == "USERPWD") { + ++i; + if (i == args.end()) { + this->SetError("DOWNLOAD missing string for USERPWD."); + return false; + } + userpwd = *i; } else { // Do not return error for compatibility reason. std::string err = "Unexpected argument: "; @@ -2703,6 +2711,11 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) check_curl_result(res, "DOWNLOAD cannot set progress data: "); } + if (!userpwd.empty()) { + res = ::curl_easy_setopt(curl, CURLOPT_USERPWD, userpwd.c_str()); + check_curl_result(res, "DOWNLOAD cannot set user password: "); + } + res = ::curl_easy_perform(curl); /* always cleanup */ @@ -2783,6 +2796,7 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) std::string logVar; std::string statusVar; bool showProgress = false; + std::string userpwd; while (i != args.end()) { if (*i == "TIMEOUT") { @@ -2817,6 +2831,13 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) statusVar = *i; } else if (*i == "SHOW_PROGRESS") { showProgress = true; + } else if (*i == "USERPWD") { + ++i; + if (i == args.end()) { + this->SetError("UPLOAD missing string for USERPWD."); + return false; + } + userpwd = *i; } else { // Do not return error for compatibility reason. std::string err = "Unexpected argument: "; @@ -2930,6 +2951,11 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) ::curl_easy_setopt(curl, CURLOPT_INFILESIZE, static_cast(file_size)); check_curl_result(res, "UPLOAD cannot set input file size: "); + if (!userpwd.empty()) { + res = ::curl_easy_setopt(curl, CURLOPT_USERPWD, userpwd.c_str()); + check_curl_result(res, "UPLOAD cannot set user password: "); + } + res = ::curl_easy_perform(curl); /* always cleanup */ diff --git a/Tests/RunCMake/file/DOWNLOAD-pass-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-pass-not-set-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-pass-not-set-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt new file mode 100644 index 0000000..2fa2731 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at DOWNLOAD-pass-not-set.cmake:[0-9]+ \(file\): + file DOWNLOAD missing string for USERPWD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake new file mode 100644 index 0000000..61eff6d --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake @@ -0,0 +1 @@ +file(DOWNLOAD "" "" USERPWD) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index 4c05f24..d8e9ce0 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -2,7 +2,9 @@ include(RunCMake) run_cmake(DOWNLOAD-hash-mismatch) run_cmake(DOWNLOAD-unused-argument) +run_cmake(DOWNLOAD-pass-not-set) run_cmake(UPLOAD-unused-argument) +run_cmake(UPLOAD-pass-not-set) run_cmake(INSTALL-DIRECTORY) run_cmake(INSTALL-MESSAGE-bad) run_cmake(FileOpenFailRead) diff --git a/Tests/RunCMake/file/UPLOAD-pass-not-set-result.txt b/Tests/RunCMake/file/UPLOAD-pass-not-set-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-pass-not-set-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt b/Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt new file mode 100644 index 0000000..089c0ad --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at UPLOAD-pass-not-set.cmake:[0-9]+ \(file\): + file UPLOAD missing string for USERPWD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/UPLOAD-pass-not-set.cmake b/Tests/RunCMake/file/UPLOAD-pass-not-set.cmake new file mode 100644 index 0000000..4f3d86c --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-pass-not-set.cmake @@ -0,0 +1 @@ +file(UPLOAD "" "" USERPWD) ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 3 +++ Source/cmFileCommand.cxx | 26 ++++++++++++++++++++ .../DOWNLOAD-pass-not-set-result.txt} | 0 .../RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt | 4 +++ Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake | 1 + Tests/RunCMake/file/RunCMakeTest.cmake | 2 ++ .../UPLOAD-pass-not-set-result.txt} | 0 Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt | 4 +++ Tests/RunCMake/file/UPLOAD-pass-not-set.cmake | 1 + 9 files changed, 41 insertions(+) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/DOWNLOAD-pass-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/UPLOAD-pass-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-pass-not-set.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 14:01:46 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 14:01:46 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1990-gb129f20 Message-ID: <20160913180146.983E3F5C60@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, next has been updated via b129f20547e849650e9aee1b3b2b0a6835c748e2 (commit) via 1f8613e9bab142a839ec3c4dafd1aff1ba7487c7 (commit) via 385e6a274da286befb38a0d540845383f393b79f (commit) from 579af61dae6e3346891f1b53f806d7889335364a (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=b129f20547e849650e9aee1b3b2b0a6835c748e2 commit b129f20547e849650e9aee1b3b2b0a6835c748e2 Merge: 579af61 1f8613e Author: Brad King AuthorDate: Tue Sep 13 14:01:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 14:01:45 2016 -0400 Merge topic 'ctest-subdir-spaces' into next 1f8613e9 Fix CTest test file generation for spaces in subdirectory names 385e6a27 cmLocalGenerator: Refactor test subdirectory generation loop https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f8613e9bab142a839ec3c4dafd1aff1ba7487c7 commit 1f8613e9bab142a839ec3c4dafd1aff1ba7487c7 Author: Stefano Soffia AuthorDate: Mon Sep 12 23:01:50 2016 +0200 Commit: Brad King CommitDate: Tue Sep 13 13:58:46 2016 -0400 Fix CTest test file generation for spaces in subdirectory names Encode the subdirectory names properly for CMake syntax. Closes: #16299 diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index abe0c23..a76bed3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -181,6 +181,7 @@ void cmLocalGenerator::GenerateTestFiles() // TODO: Use add_subdirectory instead? std::string outP = i->GetDirectory().GetCurrentBinary(); outP = this->ConvertToRelativePath(outP, START_OUTPUT); + outP = cmOutputConverter::EscapeForCMake(outP); fout << "subdirs(" << outP << ")" << std::endl; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=385e6a274da286befb38a0d540845383f393b79f commit 385e6a274da286befb38a0d540845383f393b79f Author: Stefano Soffia AuthorDate: Mon Sep 12 23:01:50 2016 +0200 Commit: Brad King CommitDate: Tue Sep 13 13:57:59 2016 -0400 cmLocalGenerator: Refactor test subdirectory generation loop diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c0ecba3..abe0c23 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -175,15 +175,13 @@ void cmLocalGenerator::GenerateTestFiles() (*gi)->Compute(this); (*gi)->Generate(fout, config, configurationTypes); } - size_t i; - std::vector children = - this->Makefile->GetStateSnapshot().GetChildren(); - for (i = 0; i < children.size(); ++i) { + typedef std::vector vec_t; + vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren(); + for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) { // TODO: Use add_subdirectory instead? - fout << "subdirs("; - std::string outP = children[i].GetDirectory().GetCurrentBinary(); - fout << this->ConvertToRelativePath(outP, START_OUTPUT); - fout << ")" << std::endl; + std::string outP = i->GetDirectory().GetCurrentBinary(); + outP = this->ConvertToRelativePath(outP, START_OUTPUT); + fout << "subdirs(" << outP << ")" << std::endl; } } ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Tue Sep 13 15:09:06 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 13 Sep 2016 15:09:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1993-gd3a223e Message-ID: <20160913190906.67286AAC01@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, next has been updated via d3a223e4918e3c7eeba9ec2511309399f987cf7a (commit) via 7845d2aaf7e4f2080892107a4d2e73d6a966ba6f (commit) via 6a9ed3d4aeee576dd87af77fe51a781c5fe64b79 (commit) from b129f20547e849650e9aee1b3b2b0a6835c748e2 (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=d3a223e4918e3c7eeba9ec2511309399f987cf7a commit d3a223e4918e3c7eeba9ec2511309399f987cf7a Merge: b129f20 7845d2a Author: Ben Boeckel AuthorDate: Tue Sep 13 15:09:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 15:09:05 2016 -0400 Merge topic 'detect-relink-incompat' into next 7845d2aa ninja: error out on relink requirements 6a9ed3d4 cmGeneratorTarget: factor out a space https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7845d2aaf7e4f2080892107a4d2e73d6a966ba6f commit 7845d2aaf7e4f2080892107a4d2e73d6a966ba6f Author: Ben Boeckel AuthorDate: Tue Sep 13 11:23:19 2016 -0400 Commit: Ben Boeckel CommitDate: Tue Sep 13 13:53:26 2016 -0400 ninja: error out on relink requirements Ninja does not support PRE_INSTALL_SCRIPT properties and does not perform the relink required by installation without help from some other mechanism, so error out if it would be required. See #16304. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 4f8c036..32dd150 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1162,7 +1162,23 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall( // If either a build or install tree rpath is set then the rpath // will likely change between the build tree and install tree and // this target must be relinked. - return this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); + bool have_rpath = + this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); + bool is_ninja = + this->LocalGenerator->GetGlobalGenerator()->GetName() == "Ninja"; + + if (have_rpath && is_ninja) { + std::ostringstream w; + w << "Ninja does not support relinking before installation " + "on non-ELF platforms. This has been detected as a \"" + << this->Makefile->GetDefinition("CMAKE_EXECUTABLE_FORMAT") + << "\" platform."; + + cmake* cm = this->LocalGenerator->GetCMakeInstance(); + cm->IssueMessage(cmake::FATAL_ERROR, w.str(), this->GetBacktrace()); + } + + return have_rpath; } bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a9ed3d4aeee576dd87af77fe51a781c5fe64b79 commit 6a9ed3d4aeee576dd87af77fe51a781c5fe64b79 Author: Ben Boeckel AuthorDate: Tue Sep 13 11:22:42 2016 -0400 Commit: Ben Boeckel CommitDate: Tue Sep 13 11:22:42 2016 -0400 cmGeneratorTarget: factor out a space diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7dd8e7f..4f8c036 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1280,11 +1280,11 @@ bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir( if (!this->Makefile->IsSet("CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG")) { std::ostringstream w; - w << "Attempting to use"; + w << "Attempting to use "; if (macosx_rpath) { - w << " MACOSX_RPATH"; + w << "MACOSX_RPATH"; } else { - w << " @rpath"; + w << "@rpath"; } w << " without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being set."; w << " This could be because you are using a Mac OS X version"; ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 16:13:12 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 16:13:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1995-g375be98 Message-ID: <20160913201312.4F99BD77F0@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, next has been updated via 375be98a45b2f56c60724bf79518534b3ab5088f (commit) via 1ca2d5d1db5117058e884bcfb226e17e090f29d0 (commit) from d3a223e4918e3c7eeba9ec2511309399f987cf7a (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=375be98a45b2f56c60724bf79518534b3ab5088f commit 375be98a45b2f56c60724bf79518534b3ab5088f Merge: d3a223e 1ca2d5d Author: Brad King AuthorDate: Tue Sep 13 16:13:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 16:13:10 2016 -0400 Merge topic 'cmake-gui-open-project' into next 1ca2d5d1 cmake-gui: Add button to open the generated project https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ca2d5d1db5117058e884bcfb226e17e090f29d0 commit 1ca2d5d1db5117058e884bcfb226e17e090f29d0 Author: Nico He?ler AuthorDate: Fri Jan 22 16:11:03 2016 +0100 Commit: Brad King CommitDate: Tue Sep 13 16:11:29 2016 -0400 cmake-gui: Add button to open the generated project Look for VS or Xcode project files at the top of the build tree. If present, enable an "Open Project" button to open them through the OS desktop services. diff --git a/Help/release/dev/cmake-gui-open-project.rst b/Help/release/dev/cmake-gui-open-project.rst new file mode 100644 index 0000000..32f0f0f --- /dev/null +++ b/Help/release/dev/cmake-gui-open-project.rst @@ -0,0 +1,5 @@ +cmake-gui-open-project +---------------------- + +* :manual:`cmake-gui(1)` gained a button to open the generated project file + for :ref:`Visual Studio Generators` and the :generator:`Xcode` generator. diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 5b84597..14ce3f7 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -227,6 +228,8 @@ void CMakeSetupDialog::initialize() QObject::connect(this->GenerateButton, SIGNAL(clicked(bool)), this, SLOT(doGenerate())); + QObject::connect(this->OpenProjectButton, SIGNAL(clicked(bool)), this, + SLOT(doOpenProject())); QObject::connect(this->BrowseSourceDirectoryButton, SIGNAL(clicked(bool)), this, SLOT(doSourceBrowse())); @@ -499,6 +502,26 @@ void CMakeSetupDialog::doGenerate() this->ConfigureNeeded = true; } +QString CMakeSetupDialog::getProjectFilename() +{ + QStringList nameFilter; + nameFilter << "*.sln" + << "*.xcodeproj"; + QDir directory(this->BinaryDirectory->currentText()); + QStringList nlnFile = directory.entryList(nameFilter); + + if (nlnFile.count() == 1) { + return this->BinaryDirectory->currentText() + "/" + nlnFile.at(0); + } + + return QString(); +} + +void CMakeSetupDialog::doOpenProject() +{ + QDesktopServices::openUrl(QUrl::fromLocalFile(this->getProjectFilename())); +} + void CMakeSetupDialog::closeEvent(QCloseEvent* e) { // prompt for close if there are unsaved changes, and we're not busy @@ -617,6 +640,11 @@ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir) this->BinaryDirectory->setEditText(dir); this->BinaryDirectory->blockSignals(false); } + if (!this->getProjectFilename().isEmpty()) { + this->OpenProjectButton->setEnabled(true); + } else { + this->OpenProjectButton->setEnabled(false); + } } void CMakeSetupDialog::doBinaryBrowse() @@ -1002,22 +1030,28 @@ void CMakeSetupDialog::enterState(CMakeSetupDialog::State s) if (s == Interrupting) { this->ConfigureButton->setEnabled(false); this->GenerateButton->setEnabled(false); + this->OpenProjectButton->setEnabled(false); } else if (s == Configuring) { this->setEnabledState(false); this->GenerateButton->setEnabled(false); this->GenerateAction->setEnabled(false); + this->OpenProjectButton->setEnabled(false); this->ConfigureButton->setText(tr("&Stop")); } else if (s == Generating) { this->CacheModified = false; this->setEnabledState(false); this->ConfigureButton->setEnabled(false); this->GenerateAction->setEnabled(false); + this->OpenProjectButton->setEnabled(false); this->GenerateButton->setText(tr("&Stop")); } else if (s == ReadyConfigure) { this->setEnabledState(true); this->GenerateButton->setEnabled(true); this->GenerateAction->setEnabled(true); this->ConfigureButton->setEnabled(true); + if (!this->getProjectFilename().isEmpty()) { + this->OpenProjectButton->setEnabled(true); + } this->ConfigureButton->setText(tr("&Configure")); this->GenerateButton->setText(tr("&Generate")); } else if (s == ReadyGenerate) { @@ -1025,6 +1059,9 @@ void CMakeSetupDialog::enterState(CMakeSetupDialog::State s) this->GenerateButton->setEnabled(true); this->GenerateAction->setEnabled(true); this->ConfigureButton->setEnabled(true); + if (!this->getProjectFilename().isEmpty()) { + this->OpenProjectButton->setEnabled(true); + } this->ConfigureButton->setText(tr("&Configure")); this->GenerateButton->setText(tr("&Generate")); } diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 2a4ea7a..992de01 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -41,6 +41,8 @@ protected slots: void initialize(); void doConfigure(); void doGenerate(); + QString getProjectFilename(); + void doOpenProject(); void doInstallForCommandLine(); void doHelp(); void doAbout(); diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui index b04bd93..8d8e0cd 100644 --- a/Source/QtDialog/CMakeSetupDialog.ui +++ b/Source/QtDialog/CMakeSetupDialog.ui @@ -238,6 +238,13 @@ + + + + Open &Project + + + ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cmake-gui-open-project.rst | 5 ++++ Source/QtDialog/CMakeSetupDialog.cxx | 37 +++++++++++++++++++++++++++ Source/QtDialog/CMakeSetupDialog.h | 2 ++ Source/QtDialog/CMakeSetupDialog.ui | 7 +++++ 4 files changed, 51 insertions(+) create mode 100644 Help/release/dev/cmake-gui-open-project.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Sep 13 16:42:00 2016 From: brad.king at kitware.com (Brad King) Date: Tue, 13 Sep 2016 16:42:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-1998-g154dcb8 Message-ID: <20160913204200.655C0C215A@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, next has been updated via 154dcb8a6ecea90335d13f7671b005ca520a63a1 (commit) via b07862c453ad0ea7308e2841316631886620a668 (commit) via 07f69bd5cc9b6b4bc040327f315620c736ec15ba (commit) from 375be98a45b2f56c60724bf79518534b3ab5088f (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=154dcb8a6ecea90335d13f7671b005ca520a63a1 commit 154dcb8a6ecea90335d13f7671b005ca520a63a1 Merge: 375be98 b07862c Author: Brad King AuthorDate: Tue Sep 13 16:41:58 2016 -0400 Commit: CMake Topic Stage CommitDate: Tue Sep 13 16:41:58 2016 -0400 Merge topic 'add-strverscmp' into next b07862c4 Tests: Add test for our strverscmp implementation 07f69bd5 cmSystemTools: Add strverscmp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b07862c453ad0ea7308e2841316631886620a668 commit b07862c453ad0ea7308e2841316631886620a668 Author: Pierluigi Taddei AuthorDate: Mon Sep 12 23:13:13 2016 +0200 Commit: Brad King CommitDate: Tue Sep 13 11:52:29 2016 -0400 Tests: Add test for our strverscmp implementation Cover typical examples and the ordering defined by the `strverscmp(3)` man page. diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx index e834b93..4ac06d7 100644 --- a/Tests/CMakeLib/testSystemTools.cxx +++ b/Tests/CMakeLib/testSystemTools.cxx @@ -31,5 +31,101 @@ int testSystemTools(int /*unused*/, char* /*unused*/ []) } else { cmFailed("cmSystemTools::UpperCase is working"); } + + // ---------------------------------------------------------------------- + // Test cmSystemTools::strverscmp + if (cmSystemTools::strverscmp("", "") != 0) { + // empty string + cmFailed("cmSystemTools::strverscmp error empty string"); + } + if (cmSystemTools::strverscmp("lib_1.1.0", "") < 0) { + // empty string goes first + cmFailed("cmSystemTools::strverscmp error empty string goes first"); + } + if (cmSystemTools::strverscmp("abc", "ab") < 0) { + // shortest goes first + cmFailed("cmSystemTools::strverscmp shortest non digit"); + } + if (cmSystemTools::strverscmp("12345", "123") < 0) { + // only numbers + cmFailed("cmSystemTools::strverscmp error only numbers"); + } + if (cmSystemTools::strverscmp("12345", "00345") < + 0) { // only numbers, same length + cmFailed("cmSystemTools::strverscmp error only numbers, same length"); + } + if (cmSystemTools::strverscmp("12abcde", "12abcc") <= 0) { + cmFailed("cmSystemTools::strverscmp standard order"); + } + if (cmSystemTools::strverscmp("lib_1.10.0", "lib_1.1.0") < 0) { + // symmetric + cmFailed("cmSystemTools::strverscmp error /symmetric"); + } + if (cmSystemTools::strverscmp("lib_1.1.0", "lib_1.001.000") < + 0) { // multiple zeros + cmFailed("cmSystemTools::strverscmp error multiple zeros"); + } + if (cmSystemTools::strverscmp("lib_1.2_2", "lib_1.2_10") >= + 0) { // last number + cmFailed("cmSystemTools::strverscmp error last number"); + } + if (cmSystemTools::strverscmp("lib", "lib") != 0) { + // same string + cmFailed("cmSystemTools::strverscmp error same string"); + } + if (cmSystemTools::strverscmp("2lib", "21lib") >= 0) { + // suffix letter + cmFailed("cmSystemTools::strverscmp suffix letter"); + } + if (cmSystemTools::strverscmp("002lib", "02lib") >= 0) { + // suffix letter decimal + cmFailed("cmSystemTools::strverscmp suffix letter decimal"); + } + if (cmSystemTools::strverscmp("9a", "10") >= 0) { + // letter filler + cmFailed("cmSystemTools::strverscmp error letter filler"); + } + if (cmSystemTools::strverscmp("01", "010") >= 0) { + // decimal comparison + cmFailed("cmSystemTools::strverscmp errordecimal comparison"); + } + if (cmSystemTools::strverscmp("01", "0") >= 0) { + // zero and decimal + cmFailed("cmSystemTools::strverscmp error zero and decimal"); + } + if (cmSystemTools::strverscmp("000", "00") >= 0) { + // zero and decimal + cmFailed("cmSystemTools::strverscmp error zero and decimal"); + } + if (cmSystemTools::strverscmp("000", "0001") < 0) { + // zero and decimal + cmFailed("cmSystemTools::strverscmp leading zeros"); + } + + // test sorting using standard strvercmp input + std::vector testString; + testString.push_back("000"); + testString.push_back("00"); + testString.push_back("01"); + testString.push_back("010"); + testString.push_back("09"); + testString.push_back("0"); + testString.push_back("1"); + testString.push_back("9"); + testString.push_back("10"); + + // test global ordering of input strings + for (size_t i = 0; i < testString.size() - 1; i++) { + for (size_t j = i + 1; j < testString.size(); j++) { + if (cmSystemTools::strverscmp(testString[i], testString[j]) >= 0) { + cmFailed("cmSystemTools::strverscmp error in comparing strings " + + testString[i] + " " + testString[j]); + } + } + } + + if (!failed) { + cmPassed("cmSystemTools::strverscmp working"); + } return failed; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07f69bd5cc9b6b4bc040327f315620c736ec15ba commit 07f69bd5cc9b6b4bc040327f315620c736ec15ba Author: Brad King AuthorDate: Tue Sep 13 08:37:00 2016 -0400 Commit: Brad King CommitDate: Tue Sep 13 11:52:28 2016 -0400 cmSystemTools: Add strverscmp Add support for natural string order by comparing non-numerical character directly and numerical number by firstly collecting contiguous digits. The order is defined by the `strverscmp(3)` manual [1]. [1] http://man7.org/linux/man-pages/man3/strverscmp.3.html Inspired-by: Pierluigi Taddei diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7da9975..a0a9c50 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2426,6 +2426,83 @@ bool cmSystemTools::VersionCompareGreaterEq(std::string const& lhs, lhs.c_str(), rhs.c_str()); } +static size_t cm_strverscmp_find_first_difference_or_end(const char* lhs, + const char* rhs) +{ + size_t i = 0; + /* Step forward until we find a difference or both strings end together. + The difference may lie on the null-terminator of one string. */ + while (lhs[i] == rhs[i] && lhs[i] != 0) { + ++i; + } + return i; +} + +static size_t cm_strverscmp_find_digits_begin(const char* s, size_t i) +{ + /* Step back until we are not preceded by a digit. */ + while (i > 0 && isdigit(s[i - 1])) { + --i; + } + return i; +} + +static size_t cm_strverscmp_find_digits_end(const char* s, size_t i) +{ + /* Step forward over digits. */ + while (isdigit(s[i])) { + ++i; + } + return i; +} + +static size_t cm_strverscmp_count_leading_zeros(const char* s, size_t b) +{ + size_t i = b; + /* Step forward over zeros that are followed by another digit. */ + while (s[i] == '0' && isdigit(s[i + 1])) { + ++i; + } + return i - b; +} + +static int cm_strverscmp(const char* lhs, const char* rhs) +{ + size_t const i = cm_strverscmp_find_first_difference_or_end(lhs, rhs); + if (lhs[i] != rhs[i]) { + /* The strings differ starting at 'i'. Check for a digit sequence. */ + size_t const b = cm_strverscmp_find_digits_begin(lhs, i); + if (b != i || (isdigit(lhs[i]) && isdigit(rhs[i]))) { + /* A digit sequence starts at 'b', preceding or at 'i'. */ + + /* Look for leading zeros, implying a leading decimal point. */ + size_t const lhs_zeros = cm_strverscmp_count_leading_zeros(lhs, b); + size_t const rhs_zeros = cm_strverscmp_count_leading_zeros(rhs, b); + if (lhs_zeros != rhs_zeros) { + /* The side with more leading zeros orders first. */ + return rhs_zeros > lhs_zeros ? 1 : -1; + } + if (lhs_zeros == 0) { + /* No leading zeros; compare digit sequence lengths. */ + size_t const lhs_end = cm_strverscmp_find_digits_end(lhs, i); + size_t const rhs_end = cm_strverscmp_find_digits_end(rhs, i); + if (lhs_end != rhs_end) { + /* The side with fewer digits orders first. */ + return lhs_end > rhs_end ? 1 : -1; + } + } + } + } + + /* Ordering was not decided by digit sequence lengths; compare bytes. */ + return lhs[i] - rhs[i]; +} + +int cmSystemTools::strverscmp(std::string const& lhs, std::string const& rhs) +{ + return cm_strverscmp(lhs.c_str(), rhs.c_str()); +} + bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, bool* removed) { diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 3c1a9f4..aecf40e 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -306,6 +306,16 @@ public: std::string const& rhs); /** + * Compare two ASCII strings using natural versioning order. + * Non-numerical characters are compared directly. + * Numerical characters are first globbed such that, e.g. + * `test000 < test01 < test0 < test1 < test10`. + * Return a value less than, equal to, or greater than zero if lhs + * precedes, equals, or succeeds rhs in the defined ordering. + */ + static int strverscmp(std::string const& lhs, std::string const& rhs); + + /** * Determine the file type based on the extension */ static FileFormat GetFileFormat(const char* ext); ----------------------------------------------------------------------- Summary of changes: Source/cmSystemTools.cxx | 77 +++++++++++++++++++++++++++++ Source/cmSystemTools.h | 10 ++++ Tests/CMakeLib/testSystemTools.cxx | 96 ++++++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Sep 14 00:01:06 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 14 Sep 2016 00:01:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-942-g989ca43 Message-ID: <20160914040107.0198EF5BD4@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 989ca432e4d842e50f07a1ff05dc4a65fc9881cb (commit) from 112f758223737464959a593084a357ba5d572e8b (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=989ca432e4d842e50f07a1ff05dc4a65fc9881cb commit 989ca432e4d842e50f07a1ff05dc4a65fc9881cb Author: Kitware Robot AuthorDate: Wed Sep 14 00:01:04 2016 -0400 Commit: Kitware Robot CommitDate: Wed Sep 14 00:01:04 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d05d345..c61ef42 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 6) -set(CMake_VERSION_PATCH 20160913) +set(CMake_VERSION_PATCH 20160914) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:48:43 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:48:43 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2000-g9784f18 Message-ID: <20160914124843.4741CEE5BC@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, next has been updated via 9784f18e93be58286002a1d500b5ae2bf4cb4c2b (commit) via abeb42f1d9efc113ab16600d354f8ad1dd85281f (commit) from 154dcb8a6ecea90335d13f7671b005ca520a63a1 (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=9784f18e93be58286002a1d500b5ae2bf4cb4c2b commit 9784f18e93be58286002a1d500b5ae2bf4cb4c2b Merge: 154dcb8 abeb42f Author: Brad King AuthorDate: Wed Sep 14 08:48:41 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 08:48:41 2016 -0400 Merge topic 'file-curl-userpw' into next abeb42f1 Help: Add notes for topic 'file-curl-userpw' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abeb42f1d9efc113ab16600d354f8ad1dd85281f commit abeb42f1d9efc113ab16600d354f8ad1dd85281f Author: Brad King AuthorDate: Wed Sep 14 08:48:23 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 08:48:23 2016 -0400 Help: Add notes for topic 'file-curl-userpw' diff --git a/Help/release/dev/file-curl-userpw.rst b/Help/release/dev/file-curl-userpw.rst new file mode 100644 index 0000000..4ae1fee --- /dev/null +++ b/Help/release/dev/file-curl-userpw.rst @@ -0,0 +1,5 @@ +file-curl-userpw +---------------- + +* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands + gained a ``USERPWD :`` option. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/file-curl-userpw.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Help/release/dev/file-curl-userpw.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:56:15 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:56:15 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-944-g321c179 Message-ID: <20160914125615.34A03F550B@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 321c1799620fdb0251f070f2258470ae95c34e7c (commit) via 1ca2d5d1db5117058e884bcfb226e17e090f29d0 (commit) from 989ca432e4d842e50f07a1ff05dc4a65fc9881cb (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=321c1799620fdb0251f070f2258470ae95c34e7c commit 321c1799620fdb0251f070f2258470ae95c34e7c Merge: 989ca43 1ca2d5d Author: Brad King AuthorDate: Wed Sep 14 08:56:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 08:56:12 2016 -0400 Merge topic 'cmake-gui-open-project' 1ca2d5d1 cmake-gui: Add button to open the generated project ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cmake-gui-open-project.rst | 5 ++++ Source/QtDialog/CMakeSetupDialog.cxx | 37 +++++++++++++++++++++++++++ Source/QtDialog/CMakeSetupDialog.h | 2 ++ Source/QtDialog/CMakeSetupDialog.ui | 7 +++++ 4 files changed, 51 insertions(+) create mode 100644 Help/release/dev/cmake-gui-open-project.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:56:18 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:56:18 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-947-g35e3836 Message-ID: <20160914125618.204A4F55BF@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 35e3836589535bae12208a403011c7e95e589a85 (commit) via 1f8613e9bab142a839ec3c4dafd1aff1ba7487c7 (commit) via 385e6a274da286befb38a0d540845383f393b79f (commit) from 321c1799620fdb0251f070f2258470ae95c34e7c (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=35e3836589535bae12208a403011c7e95e589a85 commit 35e3836589535bae12208a403011c7e95e589a85 Merge: 321c179 1f8613e Author: Brad King AuthorDate: Wed Sep 14 08:56:16 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 08:56:16 2016 -0400 Merge topic 'ctest-subdir-spaces' 1f8613e9 Fix CTest test file generation for spaces in subdirectory names 385e6a27 cmLocalGenerator: Refactor test subdirectory generation loop ----------------------------------------------------------------------- Summary of changes: Source/cmLocalGenerator.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:56:21 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:56:21 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-951-gb936235 Message-ID: <20160914125621.EB7C2F56D5@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 b93623550dceac981aa4cc49f9e892c497aee49a (commit) via 42ce9f1e7178b3535726c0c885cc7c9f760cc8b6 (commit) via d5257063b04a95aca3d144f860698a3c7181e554 (commit) via f81b9475f3724eef5d9e81b9190e30f5df09c808 (commit) from 35e3836589535bae12208a403011c7e95e589a85 (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=b93623550dceac981aa4cc49f9e892c497aee49a commit b93623550dceac981aa4cc49f9e892c497aee49a Merge: 35e3836 42ce9f1 Author: Brad King AuthorDate: Wed Sep 14 08:56:19 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 08:56:19 2016 -0400 Merge topic 'add_androidmk_generator' 42ce9f1e Add support for creating prebuilt Android.mk files d5257063 Export: Virtualize file generation step helpers f81b9475 Export: Factor out file generation steps into helpers ----------------------------------------------------------------------- Summary of changes: Help/command/export.rst | 15 ++ Help/command/install.rst | 14 +- Help/release/dev/add_androidmk_generator.rst | 10 + Source/CMakeLists.txt | 4 + Source/cmExportBuildAndroidMKGenerator.cxx | 193 ++++++++++++++++++++ Source/cmExportBuildAndroidMKGenerator.h | 68 +++++++ Source/cmExportCommand.cxx | 18 +- Source/cmExportCommand.h | 1 + Source/cmExportFileGenerator.cxx | 45 +++-- Source/cmExportFileGenerator.h | 39 ++-- Source/cmExportInstallAndroidMKGenerator.cxx | 146 +++++++++++++++ Source/cmExportInstallAndroidMKGenerator.h | 72 ++++++++ Source/cmExportInstallFileGenerator.cxx | 153 +++++++++------- Source/cmExportInstallFileGenerator.h | 12 +- Source/cmInstallCommand.cxx | 98 +++++++++- Source/cmInstallCommand.h | 1 + ...r.cxx => cmInstallExportAndroidMKGenerator.cxx} | 115 ++---------- Source/cmInstallExportAndroidMKGenerator.h | 46 +++++ Source/cmInstallExportGenerator.cxx | 13 +- Source/cmInstallExportGenerator.h | 3 +- Tests/RunCMake/AndroidMK/AndroidMK-check.cmake | 30 +++ Tests/RunCMake/AndroidMK/AndroidMK.cmake | 11 ++ .../{ClangTidy => AndroidMK}/CMakeLists.txt | 2 +- Tests/RunCMake/AndroidMK/RunCMakeTest.cmake | 2 + .../RunCMake/AndroidMK/expectedBuildAndroidMK.txt | 23 +++ .../AndroidMK/expectedInstallAndroidMK.txt | 25 +++ .../foo.cpp => RunCMake/AndroidMK/foo.cxx} | 0 Tests/RunCMake/CMakeLists.txt | 2 + 28 files changed, 948 insertions(+), 213 deletions(-) create mode 100644 Help/release/dev/add_androidmk_generator.rst create mode 100644 Source/cmExportBuildAndroidMKGenerator.cxx create mode 100644 Source/cmExportBuildAndroidMKGenerator.h create mode 100644 Source/cmExportInstallAndroidMKGenerator.cxx create mode 100644 Source/cmExportInstallAndroidMKGenerator.h copy Source/{cmInstallExportGenerator.cxx => cmInstallExportAndroidMKGenerator.cxx} (59%) create mode 100644 Source/cmInstallExportAndroidMKGenerator.h create mode 100644 Tests/RunCMake/AndroidMK/AndroidMK-check.cmake create mode 100644 Tests/RunCMake/AndroidMK/AndroidMK.cmake copy Tests/RunCMake/{ClangTidy => AndroidMK}/CMakeLists.txt (56%) create mode 100644 Tests/RunCMake/AndroidMK/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/AndroidMK/expectedBuildAndroidMK.txt create mode 100644 Tests/RunCMake/AndroidMK/expectedInstallAndroidMK.txt copy Tests/{CTestCoverageCollectGCOV/TestProject/3rdparty/foo.cpp => RunCMake/AndroidMK/foo.cxx} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:56:25 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:56:25 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-954-g171ea5d Message-ID: <20160914125625.32DF2F55AC@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 171ea5d3cf58c40807ad9afaf80c0100993f98cb (commit) via abeb42f1d9efc113ab16600d354f8ad1dd85281f (commit) via e5ba1041be862212a3ad66bd51930fc7beeb8140 (commit) from b93623550dceac981aa4cc49f9e892c497aee49a (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=171ea5d3cf58c40807ad9afaf80c0100993f98cb commit 171ea5d3cf58c40807ad9afaf80c0100993f98cb Merge: b936235 abeb42f Author: Brad King AuthorDate: Wed Sep 14 08:56:22 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 08:56:22 2016 -0400 Merge topic 'file-curl-userpw' abeb42f1 Help: Add notes for topic 'file-curl-userpw' e5ba1041 file(DOWNLOAD|UPLOAD): Add 'USERPWD' suboption ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 3 +++ Help/release/dev/file-curl-userpw.rst | 5 ++++ Source/cmFileCommand.cxx | 26 ++++++++++++++++++++ .../DOWNLOAD-pass-not-set-result.txt} | 0 .../RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt | 4 +++ Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake | 1 + Tests/RunCMake/file/RunCMakeTest.cmake | 2 ++ .../UPLOAD-pass-not-set-result.txt} | 0 Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt | 4 +++ Tests/RunCMake/file/UPLOAD-pass-not-set.cmake | 1 + 10 files changed, 46 insertions(+) create mode 100644 Help/release/dev/file-curl-userpw.rst copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/DOWNLOAD-pass-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-pass-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-pass-not-set.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/UPLOAD-pass-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-pass-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-pass-not-set.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:56:27 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:56:27 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-956-ge9dbb27 Message-ID: <20160914125627.F0329F56E6@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 e9dbb272e0075516f8d6a970a6eb70be6234c4b6 (commit) via e952f1bdc7e5da3e50b9b36aeed6005c8d947ca6 (commit) from 171ea5d3cf58c40807ad9afaf80c0100993f98cb (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=e9dbb272e0075516f8d6a970a6eb70be6234c4b6 commit e9dbb272e0075516f8d6a970a6eb70be6234c4b6 Merge: 171ea5d e952f1b Author: Brad King AuthorDate: Wed Sep 14 08:56:25 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 08:56:25 2016 -0400 Merge topic 'cmake-E-help-order' e952f1bd cmcmd: Fix sort order in help output ----------------------------------------------------------------------- Summary of changes: Source/cmcmd.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:57:00 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:57:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2007-gfc3c18f Message-ID: <20160914125700.A0C6DF3D8C@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, next has been updated via fc3c18fa230681196ae29b72bf715b065945ad3e (commit) via e9dbb272e0075516f8d6a970a6eb70be6234c4b6 (commit) via 171ea5d3cf58c40807ad9afaf80c0100993f98cb (commit) via b93623550dceac981aa4cc49f9e892c497aee49a (commit) via 35e3836589535bae12208a403011c7e95e589a85 (commit) via 321c1799620fdb0251f070f2258470ae95c34e7c (commit) via 989ca432e4d842e50f07a1ff05dc4a65fc9881cb (commit) from 9784f18e93be58286002a1d500b5ae2bf4cb4c2b (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=fc3c18fa230681196ae29b72bf715b065945ad3e commit fc3c18fa230681196ae29b72bf715b065945ad3e Merge: 9784f18 e9dbb27 Author: Brad King AuthorDate: Wed Sep 14 08:56:43 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 08:56:43 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 08:59:24 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 08:59:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2009-g911af87 Message-ID: <20160914125924.7D921F57E2@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, next has been updated via 911af875017d698f057d8cdcd5d26b8186b6631a (commit) via e0fd7e8a0881bbc45add0e25ed2e9158abca2a93 (commit) from fc3c18fa230681196ae29b72bf715b065945ad3e (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=911af875017d698f057d8cdcd5d26b8186b6631a commit 911af875017d698f057d8cdcd5d26b8186b6631a Merge: fc3c18f e0fd7e8 Author: Brad King AuthorDate: Wed Sep 14 08:59:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 08:59:23 2016 -0400 Merge topic 'extend_matlab_unit_test' into next e0fd7e8a Revert topic 'extend_matlab_unit_test' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0fd7e8a0881bbc45add0e25ed2e9158abca2a93 commit e0fd7e8a0881bbc45add0e25ed2e9158abca2a93 Author: Brad King AuthorDate: Wed Sep 14 08:59:09 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 08:59:09 2016 -0400 Revert topic 'extend_matlab_unit_test' It will be revised and restored. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 0462bd0..b501599 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -635,7 +635,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve set(devnull INPUT_FILE NUL) endif() - # timeout set to 120 seconds, in case it does not start + # timeout set to 30 seconds, in case it does not start # note as said before OUTPUT_VARIABLE cannot be used in a platform # independent manner however, not setting it would flush the output of Matlab # in the current console (unix variant) @@ -644,17 +644,12 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve OUTPUT_VARIABLE _matlab_version_from_cmd_dummy RESULT_VARIABLE _matlab_result_version_call ERROR_VARIABLE _matlab_result_version_call_error - TIMEOUT 120 + TIMEOUT 30 WORKING_DIRECTORY "${_matlab_temporary_folder}" ${devnull} ) - if("${_matlab_result_version_call}" MATCHES "timeout") - if(MATLAB_FIND_DEBUG) - message(WARNING "[MATLAB] Unable to determine the version of Matlab." - " Matlab call timed out after 120 seconds.") - endif() - return() - endif() + + if(${_matlab_result_version_call}) if(MATLAB_FIND_DEBUG) message(WARNING "[MATLAB] Unable to determine the version of Matlab. Matlab call returned with error ${_matlab_result_version_call}.") @@ -703,6 +698,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve endfunction() + #.rst: # .. command:: matlab_add_unit_test # @@ -724,7 +720,6 @@ endfunction() # matlab_add_unit_test( # NAME # UNITTEST_FILE matlab_file_containing_unittest.m -# [CUSTOM_MATLAB_COMMAND matlab_command_to_run_as_test] # [UNITTEST_PRECOMMAND matlab_command_to_run] # [TIMEOUT timeout] # [ADDITIONAL_PATH path1 [path2 ...]] @@ -740,11 +735,6 @@ endfunction() # ``UNITTEST_FILE`` # the matlab unittest file. Its path will be automatically # added to the Matlab path. -# ``CUSTOM_MATLAB_COMMAND`` -# Matlab script command to run as the test. -# IIf this is not set, then the following is run: -# "runtests('matlab_file_name'), exit(max([ans(1,:).Failed])) -# matlab_file_name comes from UNITTEST_FILE without the .m. # ``UNITTEST_PRECOMMAND`` # Matlab script command to be ran before the file # containing the test (eg. GPU device initialisation based on CMake @@ -758,7 +748,6 @@ endfunction() # ``MATLAB_ADDITIONAL_STARTUP_OPTIONS`` # a list of additional option in order # to run Matlab from the command line. -# -nosplash -nodesktop -nodisplay are always added. # ``TEST_ARGS`` # Additional options provided to the add_test command. These # options are added to the default options (eg. "CONFIGURATIONS Release") @@ -773,13 +762,11 @@ function(matlab_add_unit_test) endif() set(options NO_UNITTEST_FRAMEWORK) - set(oneValueArgs NAME UNITTEST_FILE TIMEOUT WORKING_DIRECTORY - UNITTEST_PRECOMMAND CUSTOM_TEST_COMMAND) - set(multiValueArgs ADDITIONAL_PATH MATLAB_ADDITIONAL_STARTUP_OPTIONS - TEST_ARGS) + set(oneValueArgs NAME UNITTEST_PRECOMMAND UNITTEST_FILE TIMEOUT) + set(multiValueArgs ADDITIONAL_PATH MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS) set(prefix _matlab_unittest_prefix) - cmake_parse_arguments(PARSE_ARGV 0 ${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ) + cmake_parse_arguments(${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) if(NOT ${prefix}_NAME) message(FATAL_ERROR "[MATLAB] The Matlab test name cannot be empty") @@ -787,17 +774,15 @@ function(matlab_add_unit_test) add_test(NAME ${${prefix}_NAME} COMMAND ${CMAKE_COMMAND} - "-Dtest_name=${${prefix}_NAME}" - "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}" - "-Dtest_timeout=${${prefix}_TIMEOUT}" - "-Doutput_directory=${_matlab_temporary_folder}" - "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" - "-DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM}" - "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" - "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" - "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" - "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}" - "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" + -Dtest_name=${${prefix}_NAME} + -Dadditional_paths=${${prefix}_ADDITIONAL_PATH} + -Dtest_timeout=${${prefix}_TIMEOUT} + -Doutput_directory=${_matlab_temporary_folder} + -DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM} + -Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK} + -DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS} + -Dunittest_file_to_run=${${prefix}_UNITTEST_FILE} + -Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND} -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} ${${prefix}_UNPARSED_ARGUMENTS} @@ -1049,7 +1034,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_known_version matlab_f if(${list_of_all_versions_length} GREATER 0) list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) else() - set(_matlab_version_tmp "unknown") + set(_matlab_version_tmp "") endif() # set the version into the cache diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index 1045be8..0ef4c3e 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -23,12 +23,11 @@ # -DMatlab_PROGRAM=matlab_exe_location # -DMatlab_ADDITIONNAL_STARTUP_OPTIONS="" # -Dtest_name=name_of_the_test -# -Dcustom_Matlab_test_command="" # -Dcmd_to_run_before_test="" # -Dunittest_file_to_run # -P FindMatlab_TestsRedirect.cmake -set(Matlab_UNIT_TESTS_CMD -nosplash -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) +set(Matlab_UNIT_TESTS_CMD -nosplash -nojvm -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) if(WIN32) set(Matlab_UNIT_TESTS_CMD ${Matlab_UNIT_TESTS_CMD} -wait) endif() @@ -37,13 +36,6 @@ if(NOT test_timeout) set(test_timeout 180) endif() -# If timeout is -1, then do not put a timeout on the execute_process -if(test_timeout EQUAL -1) - set(test_timeout "") -else() - set(test_timeout TIMEOUT ${test_timeout}) -endif() - if(NOT cmd_to_run_before_test) set(cmd_to_run_before_test) endif() @@ -58,27 +50,16 @@ foreach(s IN LISTS additional_paths) endif() endforeach() -if(custom_Matlab_test_command) - set(unittest_to_run "${custom_Matlab_test_command}") -else() - set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") -endif() - - +set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") if(no_unittest_framework) set(unittest_to_run "try, ${unittest_file_to_run_name}, catch err, disp('An exception has been thrown during the execution'), disp(err), disp(err.stack), exit(1), end, exit(0)") endif() set(Matlab_SCRIPT_TO_RUN - "addpath(${concat_string}); ${cmd_to_run_before_test}; ${unittest_to_run}" + "addpath(${concat_string}), path, ${cmd_to_run_before_test}, ${unittest_to_run}" ) -if(NOT working_directory) - set(working_directory "${output_directory}") -endif() - -string(REPLACE "/" "_" clean_test_name "${test_name}") -set(Matlab_LOG_FILE "${output_directory}/${clean_test_name}.log") +set(Matlab_LOG_FILE "${output_directory}/${test_name}.log") set(devnull) if(UNIX) @@ -88,11 +69,11 @@ elseif(WIN32) endif() execute_process( - COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${Matlab_LOG_FILE}" -r "${Matlab_SCRIPT_TO_RUN}" + COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${test_name}.log" -r "${Matlab_SCRIPT_TO_RUN}" RESULT_VARIABLE res - ${test_timeout} + TIMEOUT ${test_timeout} OUTPUT_QUIET # we do not want the output twice - WORKING_DIRECTORY ${working_directory} + WORKING_DIRECTORY "${output_directory}" ${devnull} ) @@ -106,5 +87,5 @@ message("Matlab test ${name_of_the_test} output:\n${matlab_log_content}") # if w if(NOT (res EQUAL 0)) - message( FATAL_ERROR "[MATLAB] TEST FAILED Matlab returned ${res}" ) + message( FATAL_ERROR "[MATLAB] TEST FAILED" ) endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 51 +++++++++++++------------------------ Modules/MatlabTestsRedirect.cmake | 35 ++++++------------------- 2 files changed, 26 insertions(+), 60 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:02:00 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:02:00 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2011-g9e722dc Message-ID: <20160914130200.C95B2F3FE5@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, next has been updated via 9e722dc6a52b9c2e1c4960ace4e20a349eebcdcc (commit) via 43eff66eec36e506acc34de58528b9885b647222 (commit) from 911af875017d698f057d8cdcd5d26b8186b6631a (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=9e722dc6a52b9c2e1c4960ace4e20a349eebcdcc commit 9e722dc6a52b9c2e1c4960ace4e20a349eebcdcc Merge: 911af87 43eff66 Author: Brad King AuthorDate: Wed Sep 14 09:02:00 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:02:00 2016 -0400 Merge topic 'detect-relink-incompat' into next 43eff66e Revert "ninja: error out on relink requirements" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43eff66eec36e506acc34de58528b9885b647222 commit 43eff66eec36e506acc34de58528b9885b647222 Author: Brad King AuthorDate: Wed Sep 14 09:01:35 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:01:35 2016 -0400 Revert "ninja: error out on relink requirements" This reverts commit 7845d2aaf7e4f2080892107a4d2e73d6a966ba6f. It will be revised and restored. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 32dd150..4f8c036 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1162,23 +1162,7 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall( // If either a build or install tree rpath is set then the rpath // will likely change between the build tree and install tree and // this target must be relinked. - bool have_rpath = - this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); - bool is_ninja = - this->LocalGenerator->GetGlobalGenerator()->GetName() == "Ninja"; - - if (have_rpath && is_ninja) { - std::ostringstream w; - w << "Ninja does not support relinking before installation " - "on non-ELF platforms. This has been detected as a \"" - << this->Makefile->GetDefinition("CMAKE_EXECUTABLE_FORMAT") - << "\" platform."; - - cmake* cm = this->LocalGenerator->GetCMakeInstance(); - cm->IssueMessage(cmake::FATAL_ERROR, w.str(), this->GetBacktrace()); - } - - return have_rpath; + return this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); } bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:02:31 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:02:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-958-gea69e03 Message-ID: <20160914130231.EE06DF5808@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 ea69e03afaeff76d2141ab4a330f3489297a3a41 (commit) via 6a9ed3d4aeee576dd87af77fe51a781c5fe64b79 (commit) from e9dbb272e0075516f8d6a970a6eb70be6234c4b6 (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=ea69e03afaeff76d2141ab4a330f3489297a3a41 commit ea69e03afaeff76d2141ab4a330f3489297a3a41 Merge: e9dbb27 6a9ed3d Author: Brad King AuthorDate: Wed Sep 14 09:02:29 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:02:29 2016 -0400 Merge topic 'minor-cleanup' 6a9ed3d4 cmGeneratorTarget: factor out a space ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:02:47 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:02:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2013-gf886dc2 Message-ID: <20160914130247.50AE6F58DA@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, next has been updated via f886dc2825f1a6ab17d74d52e8bbfd776e496ace (commit) via ea69e03afaeff76d2141ab4a330f3489297a3a41 (commit) from 9e722dc6a52b9c2e1c4960ace4e20a349eebcdcc (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=f886dc2825f1a6ab17d74d52e8bbfd776e496ace commit f886dc2825f1a6ab17d74d52e8bbfd776e496ace Merge: 9e722dc ea69e03 Author: Brad King AuthorDate: Wed Sep 14 09:02:39 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:02:39 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:10:14 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:10:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2015-ge8148b8 Message-ID: <20160914131014.6A61EC1C73@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, next has been updated via e8148b823b5dc6fabc65a705029540b125c496ed (commit) via 12bb19867ed2daaa08ff848af7da33227bb90402 (commit) from f886dc2825f1a6ab17d74d52e8bbfd776e496ace (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=e8148b823b5dc6fabc65a705029540b125c496ed commit e8148b823b5dc6fabc65a705029540b125c496ed Merge: f886dc2 12bb198 Author: Brad King AuthorDate: Wed Sep 14 09:10:13 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:10:13 2016 -0400 Merge topic 'add-strverscmp' into next 12bb1986 fixup! Tests: Add test for our strverscmp implementation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12bb19867ed2daaa08ff848af7da33227bb90402 commit 12bb19867ed2daaa08ff848af7da33227bb90402 Author: Pierluigi Taddei AuthorDate: Tue Sep 13 23:02:49 2016 +0200 Commit: Brad King CommitDate: Wed Sep 14 09:10:01 2016 -0400 fixup! Tests: Add test for our strverscmp implementation diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx index 4ac06d7..5b5c8d2 100644 --- a/Tests/CMakeLib/testSystemTools.cxx +++ b/Tests/CMakeLib/testSystemTools.cxx @@ -19,6 +19,13 @@ std::cout << "FAILED: " << (m) << "\n"; \ failed = 1 +#define cmAssert(exp, m) \ + if ((exp)) { \ + cmPassed(m); \ + } else { \ + cmFailed(m); \ + } + int testSystemTools(int /*unused*/, char* /*unused*/ []) { int failed = 0; @@ -26,81 +33,42 @@ int testSystemTools(int /*unused*/, char* /*unused*/ []) // Test cmSystemTools::UpperCase std::string str = "abc"; std::string strupper = "ABC"; - if (cmSystemTools::UpperCase(str) == strupper) { - cmPassed("cmSystemTools::UpperCase is working"); - } else { - cmFailed("cmSystemTools::UpperCase is working"); - } + cmAssert(cmSystemTools::UpperCase(str) == strupper, + "cmSystemTools::UpperCase"); // ---------------------------------------------------------------------- // Test cmSystemTools::strverscmp - if (cmSystemTools::strverscmp("", "") != 0) { - // empty string - cmFailed("cmSystemTools::strverscmp error empty string"); - } - if (cmSystemTools::strverscmp("lib_1.1.0", "") < 0) { - // empty string goes first - cmFailed("cmSystemTools::strverscmp error empty string goes first"); - } - if (cmSystemTools::strverscmp("abc", "ab") < 0) { - // shortest goes first - cmFailed("cmSystemTools::strverscmp shortest non digit"); - } - if (cmSystemTools::strverscmp("12345", "123") < 0) { - // only numbers - cmFailed("cmSystemTools::strverscmp error only numbers"); - } - if (cmSystemTools::strverscmp("12345", "00345") < - 0) { // only numbers, same length - cmFailed("cmSystemTools::strverscmp error only numbers, same length"); - } - if (cmSystemTools::strverscmp("12abcde", "12abcc") <= 0) { - cmFailed("cmSystemTools::strverscmp standard order"); - } - if (cmSystemTools::strverscmp("lib_1.10.0", "lib_1.1.0") < 0) { - // symmetric - cmFailed("cmSystemTools::strverscmp error /symmetric"); - } - if (cmSystemTools::strverscmp("lib_1.1.0", "lib_1.001.000") < - 0) { // multiple zeros - cmFailed("cmSystemTools::strverscmp error multiple zeros"); - } - if (cmSystemTools::strverscmp("lib_1.2_2", "lib_1.2_10") >= - 0) { // last number - cmFailed("cmSystemTools::strverscmp error last number"); - } - if (cmSystemTools::strverscmp("lib", "lib") != 0) { - // same string - cmFailed("cmSystemTools::strverscmp error same string"); - } - if (cmSystemTools::strverscmp("2lib", "21lib") >= 0) { - // suffix letter - cmFailed("cmSystemTools::strverscmp suffix letter"); - } - if (cmSystemTools::strverscmp("002lib", "02lib") >= 0) { - // suffix letter decimal - cmFailed("cmSystemTools::strverscmp suffix letter decimal"); - } - if (cmSystemTools::strverscmp("9a", "10") >= 0) { - // letter filler - cmFailed("cmSystemTools::strverscmp error letter filler"); - } - if (cmSystemTools::strverscmp("01", "010") >= 0) { - // decimal comparison - cmFailed("cmSystemTools::strverscmp errordecimal comparison"); - } - if (cmSystemTools::strverscmp("01", "0") >= 0) { - // zero and decimal - cmFailed("cmSystemTools::strverscmp error zero and decimal"); - } - if (cmSystemTools::strverscmp("000", "00") >= 0) { - // zero and decimal - cmFailed("cmSystemTools::strverscmp error zero and decimal"); - } - if (cmSystemTools::strverscmp("000", "0001") < 0) { - // zero and decimal - cmFailed("cmSystemTools::strverscmp leading zeros"); - } + cmAssert(cmSystemTools::strverscmp("", "") == 0, "strverscmp empty string"); + cmAssert(cmSystemTools::strverscmp("abc", "") > 0, + "strverscmp string vs empty string"); + cmAssert(cmSystemTools::strverscmp("abc", "abc") == 0, + "strverscmp same string"); + cmAssert(cmSystemTools::strverscmp("abd", "abc") > 0, + "strverscmp character string"); + cmAssert(cmSystemTools::strverscmp("abc", "abd") < 0, + "strverscmp symmetric"); + cmAssert(cmSystemTools::strverscmp("12345", "12344") > 0, + "strverscmp natural numbers"); + cmAssert(cmSystemTools::strverscmp("100", "99") > 0, + "strverscmp natural numbers different digits"); + cmAssert(cmSystemTools::strverscmp("12345", "00345") > 0, + "strverscmp natural against decimal (same length)"); + cmAssert(cmSystemTools::strverscmp("99999999999999", "99999999999991") > 0, + "strverscmp natural overflow"); + cmAssert(cmSystemTools::strverscmp("00000000000009", "00000000000001") > 0, + "strverscmp deciaml precision"); + cmAssert(cmSystemTools::strverscmp("a.b.c.0", "a.b.c.000") > 0, + "strverscmp multiple zeros"); + cmAssert(cmSystemTools::strverscmp("lib_1.2_10", "lib_1.2_2") > 0, + "strverscmp last number "); + cmAssert(cmSystemTools::strverscmp("12lib", "2lib") > 0, + "strverscmp first number "); + cmAssert(cmSystemTools::strverscmp("02lib", "002lib") > 0, + "strverscmp first number decimal "); + cmAssert(cmSystemTools::strverscmp("10", "9a") > 0, + "strverscmp letter filler "); + cmAssert(cmSystemTools::strverscmp("000", "0001") > 0, + "strverscmp zero and leading zeros "); // test sorting using standard strvercmp input std::vector testString; ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLib/testSystemTools.cxx | 112 +++++++++++++----------------------- 1 file changed, 40 insertions(+), 72 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:10:57 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:10:57 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2017-g1576d2d Message-ID: <20160914131057.DAAF3C240E@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, next has been updated via 1576d2dc40abc74a9ae9c9cf7951f3003cf4ed9b (commit) via 884943251b16d3e34901a6533944e6b78ef8eb03 (commit) from e8148b823b5dc6fabc65a705029540b125c496ed (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=1576d2dc40abc74a9ae9c9cf7951f3003cf4ed9b commit 1576d2dc40abc74a9ae9c9cf7951f3003cf4ed9b Merge: e8148b8 8849432 Author: Brad King AuthorDate: Wed Sep 14 09:10:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:10:57 2016 -0400 Merge topic 'add-strverscmp' into next 88494325 Tests: Add test for our strverscmp implementation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=884943251b16d3e34901a6533944e6b78ef8eb03 commit 884943251b16d3e34901a6533944e6b78ef8eb03 Author: Pierluigi Taddei AuthorDate: Mon Sep 12 23:13:13 2016 +0200 Commit: Brad King CommitDate: Wed Sep 14 09:10:18 2016 -0400 Tests: Add test for our strverscmp implementation Cover typical examples and the ordering defined by the `strverscmp(3)` man page. diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx index e834b93..5b5c8d2 100644 --- a/Tests/CMakeLib/testSystemTools.cxx +++ b/Tests/CMakeLib/testSystemTools.cxx @@ -19,6 +19,13 @@ std::cout << "FAILED: " << (m) << "\n"; \ failed = 1 +#define cmAssert(exp, m) \ + if ((exp)) { \ + cmPassed(m); \ + } else { \ + cmFailed(m); \ + } + int testSystemTools(int /*unused*/, char* /*unused*/ []) { int failed = 0; @@ -26,10 +33,67 @@ int testSystemTools(int /*unused*/, char* /*unused*/ []) // Test cmSystemTools::UpperCase std::string str = "abc"; std::string strupper = "ABC"; - if (cmSystemTools::UpperCase(str) == strupper) { - cmPassed("cmSystemTools::UpperCase is working"); - } else { - cmFailed("cmSystemTools::UpperCase is working"); + cmAssert(cmSystemTools::UpperCase(str) == strupper, + "cmSystemTools::UpperCase"); + + // ---------------------------------------------------------------------- + // Test cmSystemTools::strverscmp + cmAssert(cmSystemTools::strverscmp("", "") == 0, "strverscmp empty string"); + cmAssert(cmSystemTools::strverscmp("abc", "") > 0, + "strverscmp string vs empty string"); + cmAssert(cmSystemTools::strverscmp("abc", "abc") == 0, + "strverscmp same string"); + cmAssert(cmSystemTools::strverscmp("abd", "abc") > 0, + "strverscmp character string"); + cmAssert(cmSystemTools::strverscmp("abc", "abd") < 0, + "strverscmp symmetric"); + cmAssert(cmSystemTools::strverscmp("12345", "12344") > 0, + "strverscmp natural numbers"); + cmAssert(cmSystemTools::strverscmp("100", "99") > 0, + "strverscmp natural numbers different digits"); + cmAssert(cmSystemTools::strverscmp("12345", "00345") > 0, + "strverscmp natural against decimal (same length)"); + cmAssert(cmSystemTools::strverscmp("99999999999999", "99999999999991") > 0, + "strverscmp natural overflow"); + cmAssert(cmSystemTools::strverscmp("00000000000009", "00000000000001") > 0, + "strverscmp deciaml precision"); + cmAssert(cmSystemTools::strverscmp("a.b.c.0", "a.b.c.000") > 0, + "strverscmp multiple zeros"); + cmAssert(cmSystemTools::strverscmp("lib_1.2_10", "lib_1.2_2") > 0, + "strverscmp last number "); + cmAssert(cmSystemTools::strverscmp("12lib", "2lib") > 0, + "strverscmp first number "); + cmAssert(cmSystemTools::strverscmp("02lib", "002lib") > 0, + "strverscmp first number decimal "); + cmAssert(cmSystemTools::strverscmp("10", "9a") > 0, + "strverscmp letter filler "); + cmAssert(cmSystemTools::strverscmp("000", "0001") > 0, + "strverscmp zero and leading zeros "); + + // test sorting using standard strvercmp input + std::vector testString; + testString.push_back("000"); + testString.push_back("00"); + testString.push_back("01"); + testString.push_back("010"); + testString.push_back("09"); + testString.push_back("0"); + testString.push_back("1"); + testString.push_back("9"); + testString.push_back("10"); + + // test global ordering of input strings + for (size_t i = 0; i < testString.size() - 1; i++) { + for (size_t j = i + 1; j < testString.size(); j++) { + if (cmSystemTools::strverscmp(testString[i], testString[j]) >= 0) { + cmFailed("cmSystemTools::strverscmp error in comparing strings " + + testString[i] + " " + testString[j]); + } + } + } + + if (!failed) { + cmPassed("cmSystemTools::strverscmp working"); } return failed; } ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:13:47 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:13:47 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2019-g11c17bb Message-ID: <20160914131347.DB601E4B01@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, next has been updated via 11c17bba362bdb958f80ade09d0fad7a8067c67d (commit) via c31573b9641e0f1bc7a34149506db51f3494323b (commit) from 1576d2dc40abc74a9ae9c9cf7951f3003cf4ed9b (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=11c17bba362bdb958f80ade09d0fad7a8067c67d commit 11c17bba362bdb958f80ade09d0fad7a8067c67d Merge: 1576d2d c31573b Author: Brad King AuthorDate: Wed Sep 14 09:13:47 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:13:47 2016 -0400 Merge topic 'python-3.7' into next c31573b9 FindPython{Interp,Libs}: Add version 3.7 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c31573b9641e0f1bc7a34149506db51f3494323b commit c31573b9641e0f1bc7a34149506db51f3494323b Author: Yen Chi Hsuan AuthorDate: Wed Sep 14 20:54:07 2016 +0800 Commit: Brad King CommitDate: Wed Sep 14 09:13:15 2016 -0400 FindPython{Interp,Libs}: Add version 3.7 diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index e194185..4d726f2 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -52,7 +52,7 @@ unset(_Python_NAMES) set(_PYTHON1_VERSIONS 1.6 1.5) set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) -set(_PYTHON3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0) +set(_PYTHON3_VERSIONS 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) if(PythonInterp_FIND_VERSION) if(PythonInterp_FIND_VERSION_COUNT GREATER 1) diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index ab92f86..d9916a1 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -84,7 +84,7 @@ set(CMAKE_FIND_FRAMEWORK LAST) set(_PYTHON1_VERSIONS 1.6 1.5) set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) -set(_PYTHON3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0) +set(_PYTHON3_VERSIONS 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) if(PythonLibs_FIND_VERSION) if(PythonLibs_FIND_VERSION_COUNT GREATER 1) ----------------------------------------------------------------------- Summary of changes: Modules/FindPythonInterp.cmake | 2 +- Modules/FindPythonLibs.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:41:38 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:41:38 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2023-g63a47fe Message-ID: <20160914134138.EA18CD77FF@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, next has been updated via 63a47fe6c1a37b6f1d8d3cb57a2bfaef3684ecf7 (commit) via e0a8a7b26a4f2cb2aef4cef31f1b61f71f7de2de (commit) via 68157b1e88a1adcb2329c8cbe463c280c0609283 (commit) via 603cfc410cb4907745719bfa555f7453cb385ecb (commit) from 11c17bba362bdb958f80ade09d0fad7a8067c67d (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=63a47fe6c1a37b6f1d8d3cb57a2bfaef3684ecf7 commit 63a47fe6c1a37b6f1d8d3cb57a2bfaef3684ecf7 Merge: 11c17bb e0a8a7b Author: Brad King AuthorDate: Wed Sep 14 09:41:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:41:37 2016 -0400 Merge topic 'update-kwsys' into next e0a8a7b2 Merge branch 'upstream-KWSys' into update-kwsys 68157b1e KWSys 2016-09-14 (e736efa1) 603cfc41 Revert "Utilities/Release: Suppress KWSys ConsoelBuf test on Windows binaries" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0a8a7b26a4f2cb2aef4cef31f1b61f71f7de2de commit e0a8a7b26a4f2cb2aef4cef31f1b61f71f7de2de Merge: 603cfc4 68157b1 Author: Brad King AuthorDate: Wed Sep 14 09:41:20 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:41:20 2016 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2016-09-14 (e736efa1) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68157b1e88a1adcb2329c8cbe463c280c0609283 commit 68157b1e88a1adcb2329c8cbe463c280c0609283 Author: KWSys Upstream AuthorDate: Wed Sep 14 09:32:09 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:41:19 2016 -0400 KWSys 2016-09-14 (e736efa1) Code extracted from: http://public.kitware.com/KWSys.git at commit e736efa13ad42a4245b95774d114720ad0877c5b (master). Upstream Shortlog ----------------- Brad King (1): e736efa1 ConsoleBuf: Always compile test source for host Windows version diff --git a/testConsoleBuf.cxx b/testConsoleBuf.cxx index 591a2d1..3dec097 100644 --- a/testConsoleBuf.cxx +++ b/testConsoleBuf.cxx @@ -11,6 +11,12 @@ ============================================================================*/ #include "kwsysPrivate.h" +// Ignore Windows version levels defined by command-line flags. This +// source needs access to all APIs available on the host in order for +// the test to run properly. The test binary is not installed anyway. +#undef _WIN32_WINNT +#undef NTDDI_VERSION + #include KWSYS_HEADER(Encoding.hxx) // Work-around CMake dependency scanning limitation. This must https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=603cfc410cb4907745719bfa555f7453cb385ecb commit 603cfc410cb4907745719bfa555f7453cb385ecb Author: Brad King AuthorDate: Wed Sep 14 09:41:08 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:41:08 2016 -0400 Revert "Utilities/Release: Suppress KWSys ConsoelBuf test on Windows binaries" This reverts commit da0eaa8917027547cfcb082a076a60af104a2c5c. diff --git a/Utilities/Release/win32_release.cmake b/Utilities/Release/win32_release.cmake index 0500829..a27efda 100644 --- a/Utilities/Release/win32_release.cmake +++ b/Utilities/Release/win32_release.cmake @@ -27,7 +27,6 @@ get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") if(CMAKE_CREATE_VERSION STREQUAL "nightly") # Some tests fail spuriously too often. - # ConsoleBuf fails on dash3win7 and nowhere else (??). - set(EXTRA_CTEST_ARGS "-E 'Qt5Autogen|ConsoleBuf'") + set(EXTRA_CTEST_ARGS "-E Qt5Autogen") endif() include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/win64_release.cmake b/Utilities/Release/win64_release.cmake index d053b92..e39a610 100644 --- a/Utilities/Release/win64_release.cmake +++ b/Utilities/Release/win64_release.cmake @@ -28,7 +28,6 @@ get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") if(CMAKE_CREATE_VERSION STREQUAL "nightly") # Some tests fail spuriously too often. - # ConsoleBuf fails on dash3win7 and nowhere else (??). - set(EXTRA_CTEST_ARGS "-E 'Qt5Autogen|ConsoleBuf'") + set(EXTRA_CTEST_ARGS "-E Qt5Autogen") endif() include(${path}/release_cmake.cmake) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/testConsoleBuf.cxx | 6 ++++++ Utilities/Release/win32_release.cmake | 3 +-- Utilities/Release/win64_release.cmake | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:42:40 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:42:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2026-g4ce64ff Message-ID: <20160914134240.8C9D4DE59F@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, next has been updated via 4ce64ff92d4a22e935fe3048bc7446c667c210f6 (commit) via e4fc770fa39f8433147cae4849923286e5b3511a (commit) via b80d6136321fb6c2be019dec4af4b1e486389e2c (commit) from 63a47fe6c1a37b6f1d8d3cb57a2bfaef3684ecf7 (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=4ce64ff92d4a22e935fe3048bc7446c667c210f6 commit 4ce64ff92d4a22e935fe3048bc7446c667c210f6 Merge: 63a47fe e4fc770 Author: Brad King AuthorDate: Wed Sep 14 09:42:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:42:39 2016 -0400 Merge topic 'update-kwsys' into next e4fc770f Merge branch 'upstream-KWSys' into update-kwsys b80d6136 KWSys 2016-09-14 (e736efa1) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4fc770fa39f8433147cae4849923286e5b3511a commit e4fc770fa39f8433147cae4849923286e5b3511a Merge: a7305ef b80d613 Author: Brad King AuthorDate: Wed Sep 14 09:41:55 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:41:55 2016 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2016-09-14 (e736efa1) diff --cc Source/kwsys/ConsoleBuf.hxx.in index 0000000,8aeeda1..8aeeda1 mode 000000,100644..100644 --- a/Source/kwsys/ConsoleBuf.hxx.in +++ b/Source/kwsys/ConsoleBuf.hxx.in diff --cc Source/kwsys/testConsoleBuf.cxx index 0000000,3dec097..3dec097 mode 000000,100644..100644 --- a/Source/kwsys/testConsoleBuf.cxx +++ b/Source/kwsys/testConsoleBuf.cxx diff --cc Source/kwsys/testConsoleBuf.hxx index 0000000,855028b..855028b mode 000000,100644..100644 --- a/Source/kwsys/testConsoleBuf.hxx +++ b/Source/kwsys/testConsoleBuf.hxx diff --cc Source/kwsys/testConsoleBufChild.cxx index 0000000,3b9ab71..3b9ab71 mode 000000,100644..100644 --- a/Source/kwsys/testConsoleBufChild.cxx +++ b/Source/kwsys/testConsoleBufChild.cxx https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b80d6136321fb6c2be019dec4af4b1e486389e2c commit b80d6136321fb6c2be019dec4af4b1e486389e2c Author: KWSys Upstream AuthorDate: Wed Sep 14 09:32:09 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:41:49 2016 -0400 KWSys 2016-09-14 (e736efa1) Code extracted from: http://public.kitware.com/KWSys.git at commit e736efa13ad42a4245b95774d114720ad0877c5b (master). Upstream Shortlog ----------------- Brad King (1): e736efa1 ConsoleBuf: Always compile test source for host Windows version D?vis Mos?ns (1): 669e3a06 ConsoleBuf: Use a custom std::streambuf for console output on Windows diff --git a/CMakeLists.txt b/CMakeLists.txt index 87f6048..c4fe5e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_USE_FStream 1) SET(KWSYS_USE_String 1) SET(KWSYS_USE_SystemInformation 1) + SET(KWSYS_USE_ConsoleBuf 1) ENDIF() # Enforce component dependencies. @@ -154,6 +155,9 @@ ENDIF() IF(KWSYS_USE_FStream) SET(KWSYS_USE_Encoding 1) ENDIF() +IF(KWSYS_USE_ConsoleBuf) + SET(KWSYS_USE_Encoding 1) +ENDIF() # Setup the large file support default. IF(KWSYS_LFS_DISABLE) @@ -673,7 +677,7 @@ SET(KWSYS_HXX_FILES Configure String # Add selected C++ classes. SET(cppclasses Directory DynamicLoader Encoding Glob RegularExpression SystemTools - CommandLineArguments IOStream FStream SystemInformation + CommandLineArguments IOStream FStream SystemInformation ConsoleBuf ) FOREACH(cpp ${cppclasses}) IF(KWSYS_USE_${cpp}) @@ -926,6 +930,20 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) testFStream ) ENDIF() + IF(KWSYS_USE_ConsoleBuf) + ADD_EXECUTABLE(testConsoleBufChild testConsoleBufChild.cxx) + SET_PROPERTY(TARGET testConsoleBufChild PROPERTY LABELS ${KWSYS_LABELS_EXE}) + TARGET_LINK_LIBRARIES(testConsoleBufChild ${KWSYS_NAMESPACE}) + SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} + testConsoleBuf + ) + IF("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" AND + NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0") + set_property(SOURCE testConsoleBuf.cxx testConsoleBufChild.cxx PROPERTY COMPILE_FLAGS /utf-8) + ENDIF() + SET_PROPERTY(SOURCE testConsoleBuf.cxx APPEND PROPERTY COMPILE_DEFINITIONS + KWSYS_ENCODING_DEFAULT_CODEPAGE=${KWSYS_ENCODING_DEFAULT_CODEPAGE}) + ENDIF() IF(KWSYS_USE_SystemInformation) SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testSystemInformation) ENDIF() diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in new file mode 100644 index 0000000..8aeeda1 --- /dev/null +++ b/ConsoleBuf.hxx.in @@ -0,0 +1,348 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef @KWSYS_NAMESPACE at _ConsoleBuf_hxx +#define @KWSYS_NAMESPACE at _ConsoleBuf_hxx + +#include <@KWSYS_NAMESPACE@/Configure.hxx> +#include <@KWSYS_NAMESPACE@/Encoding.hxx> +#include +#include +#include +#include +#include +#include + +#if defined(_WIN32) +# include +# if __cplusplus >= 201103L +# include +# endif +#endif + +namespace @KWSYS_NAMESPACE@ +{ +#if defined(_WIN32) + + template > + class @KWSYS_NAMESPACE at _EXPORT BasicConsoleBuf : + public std::basic_streambuf { + public: + typedef typename Traits::int_type int_type; + typedef typename Traits::char_type char_type; + + class Manager { + public: + Manager(std::basic_ios &ios, const bool err = false) + : m_consolebuf(0) + { + m_ios = &ios; + try { + m_consolebuf = new BasicConsoleBuf(err); + m_streambuf = m_ios->rdbuf(m_consolebuf); + } catch (const std::runtime_error& ex) { + std::cerr << "Failed to create ConsoleBuf!" << std::endl + << ex.what() << std::endl; + }; + } + + ~Manager() + { + if (m_consolebuf) { + delete m_consolebuf; + m_ios->rdbuf(m_streambuf); + } + } + + private: + std::basic_ios *m_ios; + std::basic_streambuf *m_streambuf; + BasicConsoleBuf *m_consolebuf; + }; + + BasicConsoleBuf(const bool err = false) : + flush_on_newline(true), + input_pipe_codepage(0), + output_pipe_codepage(0), + input_file_codepage(CP_UTF8), + output_file_codepage(CP_UTF8), + m_consolesCodepage(0) + { + m_hInput = ::GetStdHandle(STD_INPUT_HANDLE); + checkHandle(true, "STD_INPUT_HANDLE"); + if (!setActiveInputCodepage()) { + throw std::runtime_error("setActiveInputCodepage failed!"); + } + m_hOutput = err ? ::GetStdHandle(STD_ERROR_HANDLE) : + ::GetStdHandle(STD_OUTPUT_HANDLE); + checkHandle(false, err ? "STD_ERROR_HANDLE" : "STD_OUTPUT_HANDLE"); + if (!setActiveOutputCodepage()) { + throw std::runtime_error("setActiveOutputCodepage failed!"); + } + _setg(); + _setp(); + } + + ~BasicConsoleBuf() throw() + { + sync(); + } + + bool activateCodepageChange() + { + return setActiveInputCodepage() && setActiveOutputCodepage(); + } + + protected: + virtual int sync() { + bool success = true; + if (m_hInput && m_isConsoleInput && + ::FlushConsoleInputBuffer(m_hInput) == 0) { + success = false; + } + if (m_hOutput && !m_obuffer.empty()) { + const std::wstring wbuffer = getBuffer(m_obuffer); + if (m_isConsoleOutput) { + DWORD charsWritten; + success = ::WriteConsoleW(m_hOutput, wbuffer.c_str(), + (DWORD)wbuffer.size(), &charsWritten, + NULL) == 0 ? false : true; + } else { + DWORD bytesWritten; + std::string buffer; + success = encodeOutputBuffer(wbuffer, buffer); + if (success) { + success = ::WriteFile(m_hOutput, buffer.c_str(), + (DWORD)buffer.size(), &bytesWritten, + NULL) == 0 ? false : true; + } + } + } + m_ibuffer.clear(); + m_obuffer.clear(); + _setg(); + _setp(); + return success ? 0 : -1; + } + + virtual int_type underflow() { + if (this->gptr() >= this->egptr()) { + if (!m_hInput) { + _setg(true); + return Traits::eof(); + } + if (m_isConsoleInput) { + wchar_t wbuffer[128]; + DWORD charsRead; + if (::ReadConsoleW(m_hInput, wbuffer, (sizeof(wbuffer) / sizeof(wbuffer[0])) - 1, + &charsRead, NULL) == 0 || charsRead == 0) { + _setg(true); + return Traits::eof(); + } + wbuffer[charsRead] = L'\0'; + setBuffer(wbuffer, m_ibuffer); + } else { + std::wstring totalBuffer; + std::wstring wbuffer; + char buffer[128]; + DWORD bytesRead; + while (::ReadFile(m_hInput, buffer, (sizeof(buffer) / sizeof(buffer[0])) - 1, + &bytesRead, NULL) == 0) { + if (::GetLastError() == ERROR_MORE_DATA) { + buffer[bytesRead] = '\0'; + if (decodeInputBuffer(buffer, wbuffer)) { + totalBuffer += wbuffer; + continue; + } + } + _setg(true); + return Traits::eof(); + } + buffer[bytesRead] = '\0'; + if (!decodeInputBuffer(buffer, wbuffer)) { + _setg(true); + return Traits::eof(); + } + totalBuffer += wbuffer; + setBuffer(totalBuffer, m_ibuffer); + } + _setg(); + } + return Traits::to_int_type(*this->gptr()); + } + + virtual int_type overflow(int_type ch = Traits::eof()) { + if (!Traits::eq_int_type(ch, Traits::eof())) { + char_type chr = Traits::to_char_type(ch); + m_obuffer += chr; + if ((flush_on_newline && Traits::eq(chr, '\n')) || + Traits::eq_int_type(ch, 0x00)) { + sync(); + } + return ch; + } + sync(); + return Traits::eof(); + } + + public: + bool flush_on_newline; + UINT input_pipe_codepage; + UINT output_pipe_codepage; + UINT input_file_codepage; + UINT output_file_codepage; + + private: + HANDLE m_hInput; + HANDLE m_hOutput; + std::basic_string m_ibuffer; + std::basic_string m_obuffer; + bool m_isConsoleInput; + bool m_isConsoleOutput; + UINT m_activeInputCodepage; + UINT m_activeOutputCodepage; + UINT m_consolesCodepage; + void checkHandle(bool input, std::string handleName) { + if ((input && m_hInput == INVALID_HANDLE_VALUE) || + (!input && m_hOutput == INVALID_HANDLE_VALUE)) { + std::string errmsg = "GetStdHandle(" + handleName + + ") returned INVALID_HANDLE_VALUE"; +#if __cplusplus >= 201103L + throw std::system_error(::GetLastError(), + std::system_category(), errmsg); +#else + throw std::runtime_error(errmsg); +#endif + } + } + UINT getConsolesCodepage() { + if (!m_consolesCodepage) { + m_consolesCodepage = GetConsoleCP(); + if (!m_consolesCodepage) { + m_consolesCodepage = GetACP(); + } + } + return m_consolesCodepage; + } + bool setActiveInputCodepage() { + m_isConsoleInput = false; + switch (GetFileType(m_hInput)) { + case FILE_TYPE_DISK: + m_activeInputCodepage = input_file_codepage; + break; + case FILE_TYPE_CHAR: + m_isConsoleInput = true; + break; + case FILE_TYPE_PIPE: + m_activeInputCodepage = input_pipe_codepage; + break; + default: + return false; + } + if (!m_isConsoleInput && m_activeInputCodepage == 0) { + m_activeInputCodepage = getConsolesCodepage(); + } + return true; + } + bool setActiveOutputCodepage() { + m_isConsoleOutput = false; + switch (GetFileType(m_hOutput)) { + case FILE_TYPE_DISK: + m_activeOutputCodepage = output_file_codepage; + break; + case FILE_TYPE_CHAR: + m_isConsoleOutput = true; + break; + case FILE_TYPE_PIPE: + m_activeOutputCodepage = output_pipe_codepage; + break; + default: + return false; + } + if (!m_isConsoleOutput && m_activeOutputCodepage == 0) { + m_activeOutputCodepage = getConsolesCodepage(); + } + return true; + } + void _setg(bool empty = false) { + if (!empty) { + this->setg((char_type *)m_ibuffer.data(), + (char_type *)m_ibuffer.data(), + (char_type *)m_ibuffer.data() + m_ibuffer.size()); + } else { + this->setg((char_type *)m_ibuffer.data(), + (char_type *)m_ibuffer.data() + m_ibuffer.size(), + (char_type *)m_ibuffer.data() + m_ibuffer.size()); + } + } + void _setp() { + this->setp((char_type *)m_obuffer.data(), + (char_type *)m_obuffer.data() + m_obuffer.size()); + } + bool encodeOutputBuffer(const std::wstring wbuffer, + std::string &buffer) { + const int length = WideCharToMultiByte(m_activeOutputCodepage, 0, + wbuffer.c_str(), + (int)wbuffer.size(), NULL, 0, + NULL, NULL); + char *buf = new char[length + 1]; + const bool success = WideCharToMultiByte(m_activeOutputCodepage, 0, + wbuffer.c_str(), + (int)wbuffer.size(), buf, + length, NULL, NULL) > 0 + ? true : false; + buf[length] = '\0'; + buffer = buf; + delete[] buf; + return success; + } + bool decodeInputBuffer(const char *buffer, std::wstring &wbuffer) { + int actualCodepage = m_activeInputCodepage; + const char BOM_UTF8[] = { char(0xEF), char(0xBB), char(0xBF) }; + if (std::memcmp(buffer, BOM_UTF8, sizeof(BOM_UTF8)) == 0) { + // PowerShell uses UTF-8 with BOM for pipes + actualCodepage = CP_UTF8; + buffer += sizeof(BOM_UTF8); + } + const int wlength = MultiByteToWideChar(actualCodepage, 0, buffer, + -1, NULL, 0); + wchar_t *wbuf = new wchar_t[wlength]; + const bool success = MultiByteToWideChar(actualCodepage, 0, buffer, + -1, wbuf, wlength) > 0 + ? true : false; + wbuffer = wbuf; + delete[] wbuf; + return success; + } + std::wstring getBuffer(const std::basic_string buffer) { + return Encoding::ToWide(buffer); + } + std::wstring getBuffer(const std::basic_string buffer) { + return buffer; + } + void setBuffer(const std::wstring wbuffer, + std::basic_string &target) { + target = Encoding::ToNarrow(wbuffer); + } + void setBuffer(const std::wstring wbuffer, + std::basic_string &target) { + target = wbuffer; + } + + }; // BasicConsoleBuf class + + typedef BasicConsoleBuf ConsoleBuf; + typedef BasicConsoleBuf WConsoleBuf; + +#endif +} // KWSYS_NAMESPACE + +#endif diff --git a/testConsoleBuf.cxx b/testConsoleBuf.cxx new file mode 100644 index 0000000..3dec097 --- /dev/null +++ b/testConsoleBuf.cxx @@ -0,0 +1,609 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "kwsysPrivate.h" + +// Ignore Windows version levels defined by command-line flags. This +// source needs access to all APIs available on the host in order for +// the test to run properly. The test binary is not installed anyway. +#undef _WIN32_WINNT +#undef NTDDI_VERSION + +#include KWSYS_HEADER(Encoding.hxx) + +// Work-around CMake dependency scanning limitation. This must +// duplicate the above list of headers. +#if 0 +# include "Encoding.hxx.in" +#endif + +#if defined(_WIN32) + +#include +#include +#include +#include +#include +#include "testConsoleBuf.hxx" + +#if defined(_MSC_VER) && _MSC_VER >= 1800 +# define KWSYS_WINDOWS_DEPRECATED_GetVersion +#endif +// ??????? +static const WCHAR UnicodeInputTestString[] = L"\u064A\u0648\u0646\u064A\u0643\u0648\u062F!"; +static UINT TestCodepage = KWSYS_ENCODING_DEFAULT_CODEPAGE; + +static const DWORD waitTimeout = 10 * 1000; +static STARTUPINFO startupInfo; +static PROCESS_INFORMATION processInfo; +static HANDLE syncEvent; +static std::string encodedInputTestString; +static std::string encodedTestString; + +//---------------------------------------------------------------------------- +static bool createProcess(HANDLE hIn, HANDLE hOut, HANDLE hErr) +{ + BOOL bInheritHandles = FALSE; + DWORD dwCreationFlags = 0; + memset(&processInfo, 0, sizeof(processInfo)); + memset(&startupInfo, 0, sizeof(startupInfo)); + startupInfo.cb = sizeof(startupInfo); + startupInfo.dwFlags = STARTF_USESHOWWINDOW; + startupInfo.wShowWindow = SW_HIDE; + if (hIn || hOut || hErr) { + startupInfo.dwFlags |= STARTF_USESTDHANDLES; + startupInfo.hStdInput = hIn; + startupInfo.hStdOutput = hOut; + startupInfo.hStdError = hErr; + bInheritHandles = TRUE; + } + + WCHAR cmd[MAX_PATH]; + if (GetModuleFileNameW(NULL, cmd, MAX_PATH) == 0) { + std::cerr << "GetModuleFileName failed!" << std::endl; + return false; + } + WCHAR *p = cmd + wcslen(cmd); + while (p > cmd && *p != L'\\') p--; + *(p+1) = 0; + wcscat(cmd, cmdConsoleBufChild); + wcscat(cmd, L".exe"); + + bool success = CreateProcessW(NULL, // No module name (use command line) + cmd, // Command line + NULL, // Process handle not inheritable + NULL, // Thread handle not inheritable + bInheritHandles, // Set handle inheritance + dwCreationFlags, + NULL, // Use parent's environment block + NULL, // Use parent's starting directory + &startupInfo, // Pointer to STARTUPINFO structure + &processInfo) != 0; // Pointer to PROCESS_INFORMATION structure + if (!success) { + DWORD lastError = GetLastError(); + std::cerr.setf(std::ios::hex, std::ios::basefield); + std::cerr << "CreateProcess(" << kwsys::Encoding::ToNarrow(cmd) + << ") failed with error: 0x" << lastError << "!" << std::endl; + LPWSTR message; + if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + lastError, + 0, + (LPWSTR)&message, 0, + NULL) + ) { + std::cerr << "Error message: " << kwsys::Encoding::ToNarrow(message) << std::endl; + HeapFree(GetProcessHeap(), 0, message); + } else { + std::cerr << "FormatMessage() failed with error: 0x" << GetLastError() << "!" << std::endl; + } + std::cerr.unsetf(std::ios::hex); + } + return success; +} + +//---------------------------------------------------------------------------- +static void finishProcess(bool success) +{ + if (success) { + success = WaitForSingleObject(processInfo.hProcess, waitTimeout) + == WAIT_OBJECT_0; + }; + if (!success) { + TerminateProcess(processInfo.hProcess, 1); + } + CloseHandle(processInfo.hProcess); + CloseHandle(processInfo.hThread); +} + +//---------------------------------------------------------------------------- +static bool createPipe(PHANDLE readPipe, PHANDLE writePipe) +{ + SECURITY_ATTRIBUTES securityAttributes; + securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + securityAttributes.bInheritHandle = TRUE; + securityAttributes.lpSecurityDescriptor = NULL; + return CreatePipe(readPipe, writePipe, &securityAttributes, 0) == 0 + ? false : true; +} + +//---------------------------------------------------------------------------- +static void finishPipe(HANDLE readPipe, HANDLE writePipe) +{ + if (readPipe != INVALID_HANDLE_VALUE) { + CloseHandle(readPipe); + } + if (writePipe != INVALID_HANDLE_VALUE) { + CloseHandle(writePipe); + } +} + +//---------------------------------------------------------------------------- +static HANDLE createFile(LPCWSTR fileName) +{ + SECURITY_ATTRIBUTES securityAttributes; + securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + securityAttributes.bInheritHandle = TRUE; + securityAttributes.lpSecurityDescriptor = NULL; + + HANDLE file = CreateFileW(fileName, + GENERIC_READ | GENERIC_WRITE, + 0, // do not share + &securityAttributes, + CREATE_ALWAYS, // overwrite existing + FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, + NULL); // no template + if (file == INVALID_HANDLE_VALUE) { + std::cerr << "CreateFile(" << kwsys::Encoding::ToNarrow(fileName) + << ") failed!" << std::endl; + } + return file; +} + +//---------------------------------------------------------------------------- +static void finishFile(HANDLE file) +{ + if (file != INVALID_HANDLE_VALUE) { + CloseHandle(file); + } +} + +//---------------------------------------------------------------------------- + +#ifndef MAPVK_VK_TO_VSC +# define MAPVK_VK_TO_VSC (0) +#endif + +static void writeInputKeyEvent(INPUT_RECORD inputBuffer[], WCHAR chr) +{ + inputBuffer[0].EventType = KEY_EVENT; + inputBuffer[0].Event.KeyEvent.bKeyDown = TRUE; + inputBuffer[0].Event.KeyEvent.wRepeatCount = 1; + SHORT keyCode = VkKeyScanW(chr); + if (keyCode == -1) { + // Character can't be entered with current keyboard layout + // Just set any, it doesn't really matter + keyCode = 'K'; + } + inputBuffer[0].Event.KeyEvent.wVirtualKeyCode = LOBYTE(keyCode); + inputBuffer[0].Event.KeyEvent.wVirtualScanCode = + MapVirtualKey(inputBuffer[0].Event.KeyEvent.wVirtualKeyCode, + MAPVK_VK_TO_VSC); + inputBuffer[0].Event.KeyEvent.uChar.UnicodeChar = chr; + inputBuffer[0].Event.KeyEvent.dwControlKeyState = 0; + if ((HIBYTE(keyCode) & 1) == 1) { + inputBuffer[0].Event.KeyEvent.dwControlKeyState |= SHIFT_PRESSED; + } + if ((HIBYTE(keyCode) & 2) == 2) { + inputBuffer[0].Event.KeyEvent.dwControlKeyState |= RIGHT_CTRL_PRESSED; + } + if ((HIBYTE(keyCode) & 4) == 4) { + inputBuffer[0].Event.KeyEvent.dwControlKeyState |= RIGHT_ALT_PRESSED; + } + inputBuffer[1].EventType = inputBuffer[0].EventType; + inputBuffer[1].Event.KeyEvent.bKeyDown = FALSE; + inputBuffer[1].Event.KeyEvent.wRepeatCount = 1; + inputBuffer[1].Event.KeyEvent.wVirtualKeyCode = inputBuffer[0].Event. + KeyEvent.wVirtualKeyCode; + inputBuffer[1].Event.KeyEvent.wVirtualScanCode = inputBuffer[0].Event. + KeyEvent.wVirtualScanCode; + inputBuffer[1].Event.KeyEvent.uChar.UnicodeChar = inputBuffer[0].Event. + KeyEvent.uChar.UnicodeChar; + inputBuffer[1].Event.KeyEvent.dwControlKeyState = 0; +} + +//---------------------------------------------------------------------------- +static int testPipe() +{ + int didFail = 1; + HANDLE inPipeRead = INVALID_HANDLE_VALUE; + HANDLE inPipeWrite = INVALID_HANDLE_VALUE; + HANDLE outPipeRead = INVALID_HANDLE_VALUE; + HANDLE outPipeWrite = INVALID_HANDLE_VALUE; + HANDLE errPipeRead = INVALID_HANDLE_VALUE; + HANDLE errPipeWrite = INVALID_HANDLE_VALUE; + UINT currentCodepage = GetConsoleCP(); + char buffer[200]; + try { + if (!createPipe(&inPipeRead, &inPipeWrite) || + !createPipe(&outPipeRead, &outPipeWrite) || + !createPipe(&errPipeRead, &errPipeWrite)) { + throw std::runtime_error("createFile failed!"); + } + if (TestCodepage == CP_ACP) { + TestCodepage = GetACP(); + } + if (!SetConsoleCP(TestCodepage)) { + throw std::runtime_error("SetConsoleCP failed!"); + } + + DWORD bytesWritten = 0; + if (!WriteFile(inPipeWrite, encodedInputTestString.c_str(), + (DWORD)encodedInputTestString.size(), &bytesWritten, NULL) + || bytesWritten == 0) { + throw std::runtime_error("WriteFile failed!"); + } + + if (createProcess(inPipeRead, outPipeWrite, errPipeWrite)) { + try { + Sleep(100); + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + DWORD bytesRead = 0; + if (!ReadFile(outPipeRead, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + if ((bytesRead < encodedTestString.size() + 1 + encodedInputTestString.size() + && !ReadFile(outPipeRead, buffer + bytesRead, + sizeof(buffer) - bytesRead, &bytesRead, NULL)) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + if (memcmp(buffer, encodedTestString.c_str(), + encodedTestString.size()) == 0 && + memcmp(buffer + encodedTestString.size() + 1, + encodedInputTestString.c_str(), + encodedInputTestString.size()) == 0) { + bytesRead = 0; + if (!ReadFile(errPipeRead, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + buffer[bytesRead - 1] = 0; + didFail = encodedTestString.compare(buffer) == 0 ? 0 : 1; + } + if (didFail != 0) { + std::cerr << "Pipe's output didn't match expected output!" << std::endl << std::flush; + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishProcess(didFail == 0); + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishPipe(inPipeRead, inPipeWrite); + finishPipe(outPipeRead, outPipeWrite); + finishPipe(errPipeRead, errPipeWrite); + SetConsoleCP(currentCodepage); + return didFail; +} + +//---------------------------------------------------------------------------- +static int testFile() +{ + int didFail = 1; + HANDLE inFile = INVALID_HANDLE_VALUE; + HANDLE outFile = INVALID_HANDLE_VALUE; + HANDLE errFile = INVALID_HANDLE_VALUE; + try { + if ((inFile = createFile(L"stdinFile.txt")) == INVALID_HANDLE_VALUE || + (outFile = createFile(L"stdoutFile.txt")) == INVALID_HANDLE_VALUE || + (errFile = createFile(L"stderrFile.txt")) == INVALID_HANDLE_VALUE) { + throw std::runtime_error("createFile failed!"); + } + int length = 0; + DWORD bytesWritten = 0; + char buffer[200]; + + if ((length = WideCharToMultiByte(TestCodepage, 0, UnicodeInputTestString, -1, + buffer, sizeof(buffer), + NULL, NULL)) == 0) { + throw std::runtime_error("WideCharToMultiByte failed!"); + } + buffer[length - 1] = '\n'; + if (!WriteFile(inFile, buffer, length, &bytesWritten, NULL) + || bytesWritten == 0) { + throw std::runtime_error("WriteFile failed!"); + } + if (SetFilePointer(inFile, 0, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER) { + throw std::runtime_error("SetFilePointer failed!"); + } + + if (createProcess(inFile, outFile, errFile)) { + DWORD bytesRead = 0; + try { + Sleep(100); + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + if (SetFilePointer(outFile, 0, 0, FILE_BEGIN) + == INVALID_SET_FILE_POINTER) { + throw std::runtime_error("SetFilePointer failed!"); + } + if (!ReadFile(outFile, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + buffer[bytesRead - 1] = 0; + if (memcmp(buffer, encodedTestString.c_str(), + encodedTestString.size()) == 0 && + memcmp(buffer + encodedTestString.size() + 1, + encodedInputTestString.c_str(), + encodedInputTestString.size() - 1) == 0) { + bytesRead = 0; + if (SetFilePointer(errFile, 0, 0, FILE_BEGIN) + == INVALID_SET_FILE_POINTER) { + throw std::runtime_error("SetFilePointer failed!"); + } + if (!ReadFile(errFile, buffer, sizeof(buffer), &bytesRead, NULL) + || bytesRead == 0) { + throw std::runtime_error("ReadFile failed!"); + } + buffer[bytesRead - 1] = 0; + didFail = encodedTestString.compare(buffer) == 0 ? 0 : 1; + } + if (didFail != 0) { + std::cerr << "File's output didn't match expected output!" << std::endl << std::flush; + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishProcess(didFail == 0); + } + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishFile(inFile); + finishFile(outFile); + finishFile(errFile); + return didFail; +} + +#ifndef _WIN32_WINNT_VISTA +# define _WIN32_WINNT_VISTA 0x0600 +#endif + +//---------------------------------------------------------------------------- +static int testConsole() +{ + int didFail = 1; + HANDLE parentIn = GetStdHandle(STD_INPUT_HANDLE); + HANDLE parentOut = GetStdHandle(STD_OUTPUT_HANDLE); + HANDLE parentErr = GetStdHandle(STD_ERROR_HANDLE); + HANDLE hIn = parentIn; + HANDLE hOut = parentOut; + DWORD consoleMode; + bool newConsole = false; + bool forceNewConsole = false; + bool restoreConsole = false; + LPCWSTR TestFaceName = L"Lucida Console"; + const DWORD TestFontFamily = 0x00000036; + const DWORD TestFontSize = 0x000c0000; + HKEY hConsoleKey; + WCHAR FaceName[200]; + DWORD FaceNameSize = sizeof(FaceName); + DWORD FontFamily = TestFontFamily; + DWORD FontSize = TestFontSize; +#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersion +# pragma warning (push) +# ifdef __INTEL_COMPILER +# pragma warning (disable:1478) +# else +# pragma warning (disable:4996) +# endif +#endif + const bool isVistaOrGreater = LOBYTE(LOWORD(GetVersion())) >= HIBYTE(_WIN32_WINNT_VISTA); +#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersion +# pragma warning (pop) +#endif + if (!isVistaOrGreater) { + if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Console", 0, KEY_READ | KEY_WRITE, + &hConsoleKey) == ERROR_SUCCESS) { + DWORD dwordSize = sizeof(DWORD); + if (RegQueryValueExW(hConsoleKey, L"FontFamily", NULL, NULL, + (LPBYTE)&FontFamily, &dwordSize) == ERROR_SUCCESS) { + if (FontFamily != TestFontFamily) { + RegQueryValueExW(hConsoleKey, L"FaceName", NULL, NULL, + (LPBYTE)FaceName, &FaceNameSize); + RegQueryValueExW(hConsoleKey, L"FontSize", NULL, NULL, + (LPBYTE)&FontSize, &dwordSize); + + RegSetValueExW(hConsoleKey, L"FontFamily", 0, REG_DWORD, + (BYTE *)&TestFontFamily, sizeof(TestFontFamily)); + RegSetValueExW(hConsoleKey, L"FaceName", 0, REG_SZ, + (BYTE *)TestFaceName, (DWORD)((wcslen(TestFaceName) + 1) * sizeof(WCHAR))); + RegSetValueExW(hConsoleKey, L"FontSize", 0, REG_DWORD, + (BYTE *)&TestFontSize, sizeof(TestFontSize)); + + restoreConsole = true; + forceNewConsole = true; + } + } else { + std::cerr << "RegGetValueW(FontFamily) failed!" << std::endl << std::flush; + } + RegCloseKey(hConsoleKey); + } else { + std::cerr << "RegOpenKeyExW(HKEY_CURRENT_USER\\Console) failed!" << std::endl << std::flush; + } + } + if (forceNewConsole || GetConsoleMode(parentOut, &consoleMode) == 0) { + // Not a real console, let's create new one. + FreeConsole(); + if (!AllocConsole()) { + std::cerr << "AllocConsole failed!" << std::endl << std::flush; + return didFail; + } + SECURITY_ATTRIBUTES securityAttributes; + securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + securityAttributes.bInheritHandle = TRUE; + securityAttributes.lpSecurityDescriptor = NULL; + hIn = CreateFileW(L"CONIN$", GENERIC_READ | GENERIC_WRITE, 0, + &securityAttributes, OPEN_EXISTING, 0, NULL); + hOut = CreateFileW(L"CONOUT$", GENERIC_READ | GENERIC_WRITE, 0, + &securityAttributes, OPEN_EXISTING, 0, NULL); + SetStdHandle(STD_INPUT_HANDLE, hIn); + SetStdHandle(STD_OUTPUT_HANDLE, hOut); + SetStdHandle(STD_ERROR_HANDLE, hOut); + newConsole = true; + } + +#if _WIN32_WINNT >= _WIN32_WINNT_VISTA + if (isVistaOrGreater) { + CONSOLE_FONT_INFOEX consoleFont; + memset(&consoleFont, 0, sizeof(consoleFont)); + consoleFont.cbSize = sizeof(consoleFont); + HMODULE kernel32 = LoadLibraryW(L"kernel32.dll"); + typedef BOOL (WINAPI *GetCurrentConsoleFontExFunc)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); + typedef BOOL (WINAPI *SetCurrentConsoleFontExFunc)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); + GetCurrentConsoleFontExFunc getConsoleFont = (GetCurrentConsoleFontExFunc)GetProcAddress(kernel32, "GetCurrentConsoleFontEx"); + SetCurrentConsoleFontExFunc setConsoleFont = (SetCurrentConsoleFontExFunc)GetProcAddress(kernel32, "SetCurrentConsoleFontEx"); + if (getConsoleFont(hOut, FALSE, &consoleFont)) { + if (consoleFont.FontFamily != TestFontFamily) { + consoleFont.FontFamily = TestFontFamily; + wcscpy(consoleFont.FaceName, TestFaceName); + if (!setConsoleFont(hOut, FALSE, &consoleFont)) { + std::cerr << "SetCurrentConsoleFontEx failed!" << std::endl << std::flush; + } + } + } else { + std::cerr << "GetCurrentConsoleFontEx failed!" << std::endl << std::flush; + } + } else { +#endif + if (restoreConsole && RegOpenKeyExW(HKEY_CURRENT_USER, L"Console", 0, + KEY_WRITE, &hConsoleKey) == ERROR_SUCCESS) { + RegSetValueExW(hConsoleKey, L"FontFamily", 0, REG_DWORD, + (BYTE *)&FontFamily, sizeof(FontFamily)); + RegSetValueExW(hConsoleKey, L"FaceName", 0, REG_SZ, + (BYTE *)FaceName, FaceNameSize); + RegSetValueExW(hConsoleKey, L"FontSize", 0, REG_DWORD, + (BYTE *)&FontSize, sizeof(FontSize)); + RegCloseKey(hConsoleKey); + } +#if _WIN32_WINNT >= _WIN32_WINNT_VISTA + } +#endif + + if (createProcess(NULL, NULL, NULL)) { + try { + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + INPUT_RECORD inputBuffer[(sizeof(UnicodeInputTestString) / + sizeof(UnicodeInputTestString[0])) * 2]; + memset(&inputBuffer, 0, sizeof(inputBuffer)); + unsigned int i = 0; + for (i = 0; i < (sizeof(UnicodeInputTestString) / + sizeof(UnicodeInputTestString[0]) - 1); i++) { + writeInputKeyEvent(&inputBuffer[i*2], UnicodeInputTestString[i]); + } + writeInputKeyEvent(&inputBuffer[i*2], VK_RETURN); + DWORD eventsWritten = 0; + if (!WriteConsoleInputW(hIn, inputBuffer, sizeof(inputBuffer) / + sizeof(inputBuffer[0]), + &eventsWritten) || eventsWritten == 0) { + throw std::runtime_error("WriteConsoleInput failed!"); + } + if (WaitForSingleObject(syncEvent, waitTimeout) != WAIT_OBJECT_0) { + throw std::runtime_error("WaitForSingleObject failed!"); + } + CONSOLE_SCREEN_BUFFER_INFO screenBufferInfo; + if (!GetConsoleScreenBufferInfo(hOut, &screenBufferInfo)) { + throw std::runtime_error("GetConsoleScreenBufferInfo failed!"); + } + + COORD coord; + DWORD charsRead = 0; + coord.X = 0; + coord.Y = screenBufferInfo.dwCursorPosition.Y - 4; + WCHAR *outputBuffer = new WCHAR[screenBufferInfo.dwSize.X * 4]; + if (!ReadConsoleOutputCharacterW(hOut, outputBuffer, + screenBufferInfo.dwSize.X * 4, coord, &charsRead) + || charsRead == 0) { + delete[] outputBuffer; + throw std::runtime_error("ReadConsoleOutputCharacter failed!"); + } + std::wstring wideTestString = kwsys::Encoding::ToWide(encodedTestString); + std::wstring wideInputTestString = kwsys::Encoding::ToWide(encodedInputTestString); + if (memcmp(outputBuffer, wideTestString.c_str(), wideTestString.size()) == 0 && + memcmp(outputBuffer + screenBufferInfo.dwSize.X * 1, + wideTestString.c_str(), wideTestString.size()) == 0 && + memcmp(outputBuffer + screenBufferInfo.dwSize.X * 2, + UnicodeInputTestString, sizeof(UnicodeInputTestString) - + sizeof(WCHAR)) == 0 && + memcmp(outputBuffer + screenBufferInfo.dwSize.X * 3, + wideInputTestString.c_str(), wideInputTestString.size() - 1) == 0 + ) { + didFail = 0; + } else { + std::cerr << "Console's output didn't match expected output!" << std::endl << std::flush; + } + delete[] outputBuffer; + } catch (const std::runtime_error &ex) { + std::cerr << ex.what() << std::endl << std::flush; + } + finishProcess(didFail == 0); + } + if (newConsole) { + SetStdHandle(STD_INPUT_HANDLE, parentIn); + SetStdHandle(STD_OUTPUT_HANDLE, parentOut); + SetStdHandle(STD_ERROR_HANDLE, parentErr); + CloseHandle(hIn); + CloseHandle(hOut); + FreeConsole(); + } + return didFail; +} + +#endif + +//---------------------------------------------------------------------------- +int testConsoleBuf(int, char*[]) +{ + int ret = 0; + +#if defined(_WIN32) + syncEvent = CreateEventW(NULL, + FALSE, // auto-reset event + FALSE, // initial state is nonsignaled + SyncEventName); // object name + if (!syncEvent) { + std::cerr << "CreateEvent failed " << GetLastError() << std::endl; + return 1; + } + + encodedTestString = kwsys::Encoding::ToNarrow(UnicodeTestString); + encodedInputTestString = kwsys::Encoding::ToNarrow(UnicodeInputTestString); + encodedInputTestString += "\n"; + + ret |= testPipe(); + ret |= testFile(); + ret |= testConsole(); + + CloseHandle(syncEvent); +#endif + + return ret; +} diff --git a/testConsoleBuf.hxx b/testConsoleBuf.hxx new file mode 100644 index 0000000..855028b --- /dev/null +++ b/testConsoleBuf.hxx @@ -0,0 +1,24 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef testConsoleBuf_hxx +#define testConsoleBuf_hxx + +static const wchar_t cmdConsoleBufChild[] = L"testConsoleBufChild"; + +static const wchar_t SyncEventName[] = L"SyncEvent"; + +// ??????? ????? ???????! +static const wchar_t UnicodeTestString[] = L"\u092F\u0942\u0928\u093F\u0915\u094B\u0921 " + L"\u03B5\u03AF\u03BD\u03B1\u03B9 " + L"\u0437\u0434\u043E\u0440\u043E\u0432\u043E!"; + +#endif diff --git a/testConsoleBufChild.cxx b/testConsoleBufChild.cxx new file mode 100644 index 0000000..3b9ab71 --- /dev/null +++ b/testConsoleBufChild.cxx @@ -0,0 +1,61 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2016 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "kwsysPrivate.h" + +#include KWSYS_HEADER(ConsoleBuf.hxx) +#include KWSYS_HEADER(Encoding.hxx) + +// Work-around CMake dependency scanning limitation. This must +// duplicate the above list of headers. +#if 0 +# include "ConsoleBuf.hxx.in" +# include "Encoding.hxx.in" +#endif + +#include +#include "testConsoleBuf.hxx" + +//---------------------------------------------------------------------------- +int main(int argc, const char* argv[]) +{ +#if defined(_WIN32) + kwsys::ConsoleBuf::Manager out(std::cout); + kwsys::ConsoleBuf::Manager err(std::cerr, true); + kwsys::ConsoleBuf::Manager in(std::cin); + + if (argc > 1) { + std::cout << argv[1] << std::endl; + std::cerr << argv[1] << std::endl; + } else { + std::string str = kwsys::Encoding::ToNarrow(UnicodeTestString); + std::cout << str << std::endl; + std::cerr << str << std::endl; + } + + std::string input; + HANDLE syncEvent = OpenEventW(EVENT_MODIFY_STATE, FALSE, SyncEventName); + if (syncEvent) { + SetEvent(syncEvent); + } + + std::cin >> input; + std::cout << input << std::endl; + if (syncEvent) { + SetEvent(syncEvent); + CloseHandle(syncEvent); + } +#else + static_cast(argc); + static_cast(argv); +#endif + return 0; +} ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 09:50:02 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 09:50:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2029-gd0cd09f Message-ID: <20160914135002.A83D4F36F2@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, next has been updated via d0cd09fd67005deb08f59b7ecc5276ea373afca8 (commit) via 04d94fbe92535f57177777bc8715fb41a2d7dcc0 (commit) via d28e4467aae44db2b15a785e6f061917798cfcd4 (commit) from 4ce64ff92d4a22e935fe3048bc7446c667c210f6 (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=d0cd09fd67005deb08f59b7ecc5276ea373afca8 commit d0cd09fd67005deb08f59b7ecc5276ea373afca8 Merge: 4ce64ff 04d94fb Author: Brad King AuthorDate: Wed Sep 14 09:50:01 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 09:50:01 2016 -0400 Merge topic 'update-kwsys' into next 04d94fbe Merge branch 'upstream-KWSys' into update-kwsys d28e4467 KWSys 2016-09-14 (c4049689) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=04d94fbe92535f57177777bc8715fb41a2d7dcc0 commit 04d94fbe92535f57177777bc8715fb41a2d7dcc0 Merge: e4fc770 d28e446 Author: Brad King AuthorDate: Wed Sep 14 09:43:32 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:49:37 2016 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2016-09-14 (c4049689) Issue: #16295 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d28e4467aae44db2b15a785e6f061917798cfcd4 commit d28e4467aae44db2b15a785e6f061917798cfcd4 Author: KWSys Upstream AuthorDate: Wed Sep 14 09:38:50 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 09:43:31 2016 -0400 KWSys 2016-09-14 (c4049689) Code extracted from: http://public.kitware.com/KWSys.git at commit c4049689d1ff6e3b9f59358023aebb1a7e0fd149 (master). Upstream Shortlog ----------------- Brad King (2): 0504dcaf SystemTools: Fix path comparison in test case c4049689 SystemTools: Teach GetActualCaseForPath to convert as much as possible diff --git a/SystemTools.cxx b/SystemTools.cxx index 1a73b16..4281c38 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -3982,16 +3982,16 @@ std::string SystemTools::RelativePath(const std::string& local, const std::strin } #ifdef _WIN32 -static int GetCasePathName(const std::string & pathIn, - std::string & casePath) +static std::string GetCasePathName(std::string const& pathIn) { + std::string casePath; std::vector path_components; SystemTools::SplitPath(pathIn, path_components); if(path_components[0].empty()) // First component always exists. { // Relative paths cannot be converted. - casePath = ""; - return 0; + casePath = pathIn; + return casePath; } // Start with root component. @@ -4015,38 +4015,45 @@ static int GetCasePathName(const std::string & pathIn, sep = "/"; } + // Convert case of all components that exist. + bool converting = true; for(; idx < path_components.size(); idx++) { casePath += sep; sep = "/"; - std::string test_str = casePath; - test_str += path_components[idx]; - - // If path component contains wildcards, we skip matching - // because these filenames are not allowed on windows, - // and we do not want to match a different file. - if(path_components[idx].find('*') != std::string::npos || - path_components[idx].find('?') != std::string::npos) - { - casePath = ""; - return 0; - } - WIN32_FIND_DATAW findData; - HANDLE hFind = ::FindFirstFileW(Encoding::ToWide(test_str).c_str(), - &findData); - if (INVALID_HANDLE_VALUE != hFind) - { - casePath += Encoding::ToNarrow(findData.cFileName); - ::FindClose(hFind); - } - else + if (converting) { - casePath = ""; - return 0; + // If path component contains wildcards, we skip matching + // because these filenames are not allowed on windows, + // and we do not want to match a different file. + if(path_components[idx].find('*') != std::string::npos || + path_components[idx].find('?') != std::string::npos) + { + converting = false; + } + else + { + std::string test_str = casePath; + test_str += path_components[idx]; + WIN32_FIND_DATAW findData; + HANDLE hFind = ::FindFirstFileW(Encoding::ToWide(test_str).c_str(), + &findData); + if (INVALID_HANDLE_VALUE != hFind) + { + path_components[idx] = Encoding::ToNarrow(findData.cFileName); + ::FindClose(hFind); + } + else + { + converting = false; + } + } } + + casePath += path_components[idx]; } - return (int)casePath.size(); + return casePath; } #endif @@ -4065,11 +4072,10 @@ std::string SystemTools::GetActualCaseForPath(const std::string& p) { return i->second; } - std::string casePath; - int len = GetCasePathName(p, casePath); - if(len == 0 || len > MAX_PATH+1) + std::string casePath = GetCasePathName(p); + if (casePath.size() > MAX_PATH) { - return p; + return casePath; } (*SystemTools::PathCaseMap)[p] = casePath; return casePath; diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 28ff0b3..5849145 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -374,10 +374,11 @@ public: static const char* GetExecutableExtension(); /** - * Given a path that exists on a windows machine, return the - * actuall case of the path as it was created. If the file - * does not exist path is returned unchanged. This does nothing - * on unix but return path. + * Given a path on a Windows machine, return the actual case of + * the path as it exists on disk. Path components that do not + * exist on disk are returned unchanged. Relative paths are always + * returned unchanged. Drive letters are always made upper case. + * This does nothing on non-Windows systems but return the path. */ static std::string GetActualCaseForPath(const std::string& path); diff --git a/testSystemTools.cxx b/testSystemTools.cxx index 9252ea6..880b46e 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -940,7 +940,7 @@ static bool CheckRelativePath( const std::string& expected) { std::string result = kwsys::SystemTools::RelativePath(local, remote); - if(expected != result) + if (!kwsys::SystemTools::ComparePath(expected, result)) { std::cerr << "RelativePath(" << local << ", " << remote << ") yielded " << result << " instead of " << expected << std::endl; @@ -965,7 +965,7 @@ static bool CheckCollapsePath( const std::string& expected) { std::string result = kwsys::SystemTools::CollapseFullPath(path); - if(expected != result) + if (!kwsys::SystemTools::ComparePath(expected, result)) { std::cerr << "CollapseFullPath(" << path << ") yielded " << result << " instead of " << expected << std::endl; ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SystemTools.cxx | 70 +++++++++++++++++++++----------------- Source/kwsys/SystemTools.hxx.in | 9 ++--- Source/kwsys/testSystemTools.cxx | 4 +-- 3 files changed, 45 insertions(+), 38 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 10:51:54 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 10:51:54 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2031-g722a08d Message-ID: <20160914145154.AAAFBF47D4@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, next has been updated via 722a08d1e829205e8ee91f7c5c9983eac047d0d5 (commit) via d4d0c9422695e3ba67d933566c69034ed814d9ea (commit) from d0cd09fd67005deb08f59b7ecc5276ea373afca8 (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=722a08d1e829205e8ee91f7c5c9983eac047d0d5 commit 722a08d1e829205e8ee91f7c5c9983eac047d0d5 Merge: d0cd09f d4d0c94 Author: Brad King AuthorDate: Wed Sep 14 10:51:53 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 10:51:53 2016 -0400 Merge topic 'fix-ccmake-sun-gcc' into next d4d0c942 ccmake: Fix recent compilation regression with GCC on Solaris https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4d0c9422695e3ba67d933566c69034ed814d9ea commit d4d0c9422695e3ba67d933566c69034ed814d9ea Author: Brad King AuthorDate: Wed Sep 14 10:48:51 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 10:51:27 2016 -0400 ccmake: Fix recent compilation regression with GCC on Solaris The change in commit 32f756c8 (CursesDialog: include what you use, 2016-09-01) revealed that an ancient workaround for compiling with GCC on Solaris has not had an effect in a long time and is now incorrect. Drop it. diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h index 4929958..1d8d7c6 100644 --- a/Source/CursesDialog/cmCursesStandardIncludes.h +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -14,10 +14,6 @@ #include -#if defined(__sun__) && defined(__GNUC__) -#define _MSE_INT_H -#endif - #if defined(__hpux) #define _BOOL_DEFINED #include diff --git a/Source/CursesDialog/form/form.h b/Source/CursesDialog/form/form.h index 1219cb5..b65a3ca 100644 --- a/Source/CursesDialog/form/form.h +++ b/Source/CursesDialog/form/form.h @@ -33,10 +33,6 @@ #ifndef FORM_H #define FORM_H -#if defined(__sun__) && defined(__GNUC__) - #define _MSE_INT_H -#endif - #include /* figure out which curses.h to include */ ----------------------------------------------------------------------- Summary of changes: Source/CursesDialog/cmCursesStandardIncludes.h | 4 ---- Source/CursesDialog/form/form.h | 4 ---- 2 files changed, 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 10:52:19 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 10:52:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2034-g8bc030b Message-ID: <20160914145219.BD317F4B7E@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, next has been updated via 8bc030bb2542e02675bacf4dcb219a7f42bb7025 (commit) via 152bbe5068fc125351f728f04a14113e08f87671 (commit) via a6d3f5418c4f2c1bd99272a9fac1cf4e33b1df09 (commit) from 722a08d1e829205e8ee91f7c5c9983eac047d0d5 (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=8bc030bb2542e02675bacf4dcb219a7f42bb7025 commit 8bc030bb2542e02675bacf4dcb219a7f42bb7025 Merge: 722a08d 152bbe5 Author: Brad King AuthorDate: Wed Sep 14 10:52:18 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 10:52:18 2016 -0400 Merge topic 'fix-CMAKE_COMPILER_IS_GNU-confusion' into next 152bbe50 Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variable a6d3f541 Help: Clarify documentation of CMAKE_COMPILER_IS_GNU{CC,CXX,G77} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=152bbe5068fc125351f728f04a14113e08f87671 commit 152bbe5068fc125351f728f04a14113e08f87671 Author: Brad King AuthorDate: Wed Sep 14 10:11:43 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 10:12:30 2016 -0400 Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variable It is not called `CMAKE_COMPILER_IS_GNUC` (without last `C`). Closes: #16297 diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 3c053fa..535f68b 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -64,7 +64,7 @@ endif() # Workaround for short jump tables on PA-RISC if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc") - if(CMAKE_COMPILER_IS_GNUC) + if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-calls") endif() if(CMAKE_COMPILER_IS_GNUCXX) diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index e33b927..bacf137 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -208,7 +208,7 @@ macro(_test_compiler_hidden_visibility) if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2") set(GCC_TOO_OLD TRUE) - elseif(CMAKE_COMPILER_IS_GNUC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.2") + elseif(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.2") set(GCC_TOO_OLD TRUE) elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0") set(_INTEL_TOO_OLD TRUE) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6d3f5418c4f2c1bd99272a9fac1cf4e33b1df09 commit a6d3f5418c4f2c1bd99272a9fac1cf4e33b1df09 Author: Brad King AuthorDate: Wed Sep 14 10:09:39 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 10:09:39 2016 -0400 Help: Clarify documentation of CMAKE_COMPILER_IS_GNU{CC,CXX,G77} Closes: #16308 diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index b14f667..74c9265 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -332,7 +332,9 @@ Variables for Languages .. toctree:: :maxdepth: 1 - /variable/CMAKE_COMPILER_IS_GNULANG + /variable/CMAKE_COMPILER_IS_GNUCC + /variable/CMAKE_COMPILER_IS_GNUCXX + /variable/CMAKE_COMPILER_IS_GNUG77 /variable/CMAKE_C_COMPILE_FEATURES /variable/CMAKE_C_EXTENSIONS /variable/CMAKE_C_STANDARD diff --git a/Help/variable/CMAKE_COMPILER_IS_GNUCC.rst b/Help/variable/CMAKE_COMPILER_IS_GNUCC.rst new file mode 100644 index 0000000..a40667e --- /dev/null +++ b/Help/variable/CMAKE_COMPILER_IS_GNUCC.rst @@ -0,0 +1,5 @@ +CMAKE_COMPILER_IS_GNUCC +----------------------- + +True if the ``C`` compiler is GNU. +Use :variable:`CMAKE_C_COMPILER_ID _COMPILER_ID>` instead. diff --git a/Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst b/Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst new file mode 100644 index 0000000..f1f5cf7 --- /dev/null +++ b/Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst @@ -0,0 +1,5 @@ +CMAKE_COMPILER_IS_GNUCXX +------------------------ + +True if the C++ (``CXX``) compiler is GNU. +Use :variable:`CMAKE_CXX_COMPILER_ID _COMPILER_ID>` instead. diff --git a/Help/variable/CMAKE_COMPILER_IS_GNUG77.rst b/Help/variable/CMAKE_COMPILER_IS_GNUG77.rst new file mode 100644 index 0000000..3d6dab4 --- /dev/null +++ b/Help/variable/CMAKE_COMPILER_IS_GNUG77.rst @@ -0,0 +1,5 @@ +CMAKE_COMPILER_IS_GNUG77 +------------------------ + +True if the ``Fortran`` compiler is GNU. +Use :variable:`CMAKE_Fortran_COMPILER_ID _COMPILER_ID>` instead. diff --git a/Help/variable/CMAKE_COMPILER_IS_GNULANG.rst b/Help/variable/CMAKE_COMPILER_IS_GNULANG.rst deleted file mode 100644 index 4b652c0..0000000 --- a/Help/variable/CMAKE_COMPILER_IS_GNULANG.rst +++ /dev/null @@ -1,15 +0,0 @@ -CMAKE_COMPILER_IS_GNU ---------------------------- - -True if the compiler is GNU. - -If the selected ```` compiler is the GNU compiler then this is ``TRUE``, -if not it is ``FALSE``. Unlike the other per-language variables, this -uses the GNU syntax for identifying languages instead of the CMake -syntax. Recognized values of the ```` suffix are: - -:: - - CC = C compiler - CXX = C++ compiler - G77 = Fortran compiler ----------------------------------------------------------------------- Summary of changes: CompileFlags.cmake | 2 +- Help/manual/cmake-variables.7.rst | 4 +++- Help/variable/CMAKE_COMPILER_IS_GNUCC.rst | 5 +++++ Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst | 5 +++++ Help/variable/CMAKE_COMPILER_IS_GNUG77.rst | 5 +++++ Help/variable/CMAKE_COMPILER_IS_GNULANG.rst | 15 --------------- Modules/GenerateExportHeader.cmake | 2 +- 7 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUCC.rst create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUG77.rst delete mode 100644 Help/variable/CMAKE_COMPILER_IS_GNULANG.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 11:09:08 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 11:09:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2036-g12995ae Message-ID: <20160914150908.43429B0287@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, next has been updated via 12995aec6a806bc74591548e14a73ad2c71855cc (commit) via 89d16bc6dad6d4dc3776571b4f90796e12f73607 (commit) from 8bc030bb2542e02675bacf4dcb219a7f42bb7025 (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=12995aec6a806bc74591548e14a73ad2c71855cc commit 12995aec6a806bc74591548e14a73ad2c71855cc Merge: 8bc030b 89d16bc Author: Brad King AuthorDate: Wed Sep 14 11:09:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 11:09:07 2016 -0400 Merge topic 'extend_matlab_unit_test' into next 89d16bc6 FindMatlab: Extend matlab_add_unit_test to run arbitrary test code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89d16bc6dad6d4dc3776571b4f90796e12f73607 commit 89d16bc6dad6d4dc3776571b4f90796e12f73607 Author: Bill Hoffman AuthorDate: Tue Aug 30 15:02:35 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 11:07:58 2016 -0400 FindMatlab: Extend matlab_add_unit_test to run arbitrary test code Allow a custom matlab set of commands to be run as the test instead of just `runtests('matlab_file_name')`. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index b501599..c813f8f 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -635,7 +635,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve set(devnull INPUT_FILE NUL) endif() - # timeout set to 30 seconds, in case it does not start + # timeout set to 120 seconds, in case it does not start # note as said before OUTPUT_VARIABLE cannot be used in a platform # independent manner however, not setting it would flush the output of Matlab # in the current console (unix variant) @@ -644,11 +644,18 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve OUTPUT_VARIABLE _matlab_version_from_cmd_dummy RESULT_VARIABLE _matlab_result_version_call ERROR_VARIABLE _matlab_result_version_call_error - TIMEOUT 30 + TIMEOUT 120 WORKING_DIRECTORY "${_matlab_temporary_folder}" ${devnull} ) + if("${_matlab_result_version_call}" MATCHES "timeout") + if(MATLAB_FIND_DEBUG) + message(WARNING "[MATLAB] Unable to determine the version of Matlab." + " Matlab call timed out after 120 seconds.") + endif() + return() + endif() if(${_matlab_result_version_call}) if(MATLAB_FIND_DEBUG) @@ -698,7 +705,6 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve endfunction() - #.rst: # .. command:: matlab_add_unit_test # @@ -720,6 +726,7 @@ endfunction() # matlab_add_unit_test( # NAME # UNITTEST_FILE matlab_file_containing_unittest.m +# [CUSTOM_MATLAB_COMMAND matlab_command_to_run_as_test] # [UNITTEST_PRECOMMAND matlab_command_to_run] # [TIMEOUT timeout] # [ADDITIONAL_PATH path1 [path2 ...]] @@ -735,6 +742,11 @@ endfunction() # ``UNITTEST_FILE`` # the matlab unittest file. Its path will be automatically # added to the Matlab path. +# ``CUSTOM_MATLAB_COMMAND`` +# Matlab script command to run as the test. +# IIf this is not set, then the following is run: +# "runtests('matlab_file_name'), exit(max([ans(1,:).Failed])) +# matlab_file_name comes from UNITTEST_FILE without the .m. # ``UNITTEST_PRECOMMAND`` # Matlab script command to be ran before the file # containing the test (eg. GPU device initialisation based on CMake @@ -748,12 +760,18 @@ endfunction() # ``MATLAB_ADDITIONAL_STARTUP_OPTIONS`` # a list of additional option in order # to run Matlab from the command line. +# -nosplash -nodesktop -nodisplay are always added. # ``TEST_ARGS`` # Additional options provided to the add_test command. These # options are added to the default options (eg. "CONFIGURATIONS Release") # ``NO_UNITTEST_FRAMEWORK`` # when set, indicates that the test should not # use the unittest framework of Matlab (available for versions >= R2013a). +# ``WORKING_DIRECTORY`` +# This will be the working directory for the test. If specified it will +# also be the output directory used for the log file of the test run. +# If not specifed the temporary directory ${CMAKE_BINARY_DIR}/Matlab will +# be used as the working directory and the log location. # function(matlab_add_unit_test) @@ -762,11 +780,12 @@ function(matlab_add_unit_test) endif() set(options NO_UNITTEST_FRAMEWORK) - set(oneValueArgs NAME UNITTEST_PRECOMMAND UNITTEST_FILE TIMEOUT) + set(oneValueArgs NAME UNITTEST_FILE TIMEOUT WORKING_DIRECTORY + UNITTEST_PRECOMMAND CUSTOM_TEST_COMMAND) set(multiValueArgs ADDITIONAL_PATH MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS) set(prefix _matlab_unittest_prefix) - cmake_parse_arguments(${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + cmake_parse_arguments(PARSE_ARGV 0 ${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ) if(NOT ${prefix}_NAME) message(FATAL_ERROR "[MATLAB] The Matlab test name cannot be empty") @@ -774,15 +793,17 @@ function(matlab_add_unit_test) add_test(NAME ${${prefix}_NAME} COMMAND ${CMAKE_COMMAND} - -Dtest_name=${${prefix}_NAME} - -Dadditional_paths=${${prefix}_ADDITIONAL_PATH} - -Dtest_timeout=${${prefix}_TIMEOUT} - -Doutput_directory=${_matlab_temporary_folder} - -DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM} - -Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK} - -DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS} - -Dunittest_file_to_run=${${prefix}_UNITTEST_FILE} - -Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND} + "-Dtest_name=${${prefix}_NAME}" + "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}" + "-Dtest_timeout=${${prefix}_TIMEOUT}" + "-Doutput_directory=${_matlab_temporary_folder}" + "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" + "-DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM}" + "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" + "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" + "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" + "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}" + "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} ${${prefix}_UNPARSED_ARGUMENTS} @@ -1034,7 +1055,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_known_version matlab_f if(${list_of_all_versions_length} GREATER 0) list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) else() - set(_matlab_version_tmp "") + set(_matlab_version_tmp "unknown") endif() # set the version into the cache diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index 0ef4c3e..0bd16c8 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -23,11 +23,12 @@ # -DMatlab_PROGRAM=matlab_exe_location # -DMatlab_ADDITIONNAL_STARTUP_OPTIONS="" # -Dtest_name=name_of_the_test +# -Dcustom_Matlab_test_command="" # -Dcmd_to_run_before_test="" # -Dunittest_file_to_run # -P FindMatlab_TestsRedirect.cmake -set(Matlab_UNIT_TESTS_CMD -nosplash -nojvm -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) +set(Matlab_UNIT_TESTS_CMD -nosplash -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) if(WIN32) set(Matlab_UNIT_TESTS_CMD ${Matlab_UNIT_TESTS_CMD} -wait) endif() @@ -36,6 +37,13 @@ if(NOT test_timeout) set(test_timeout 180) endif() +# If timeout is -1, then do not put a timeout on the execute_process +if(test_timeout EQUAL -1) + set(test_timeout "") +else() + set(test_timeout TIMEOUT ${test_timeout}) +endif() + if(NOT cmd_to_run_before_test) set(cmd_to_run_before_test) endif() @@ -50,16 +58,30 @@ foreach(s IN LISTS additional_paths) endif() endforeach() -set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") +if(custom_Matlab_test_command) + set(unittest_to_run "${custom_Matlab_test_command}") +else() + set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") +endif() + + if(no_unittest_framework) set(unittest_to_run "try, ${unittest_file_to_run_name}, catch err, disp('An exception has been thrown during the execution'), disp(err), disp(err.stack), exit(1), end, exit(0)") endif() set(Matlab_SCRIPT_TO_RUN - "addpath(${concat_string}), path, ${cmd_to_run_before_test}, ${unittest_to_run}" + "addpath(${concat_string}); ${cmd_to_run_before_test}; ${unittest_to_run}" ) +# if the working directory is not specified then default +# to the output_directory because the log file will go there +# if the working_directory is specified it will override the +# output_directory +if(NOT working_directory) + set(working_directory "${output_directory}") +endif() -set(Matlab_LOG_FILE "${output_directory}/${test_name}.log") +string(REPLACE "/" "_" log_file_name "${test_name}") +set(Matlab_LOG_FILE "${working_directory}/${log_file_name}.log") set(devnull) if(UNIX) @@ -69,11 +91,14 @@ elseif(WIN32) endif() execute_process( - COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${test_name}.log" -r "${Matlab_SCRIPT_TO_RUN}" + # Do not use a full path to log file. Depend on the fact that the log file + # is always going to go in the working_directory. This is because matlab + # on unix is a shell script that does not handle spaces in the logfile path. + COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${log_file_name}" -r "${Matlab_SCRIPT_TO_RUN}" RESULT_VARIABLE res - TIMEOUT ${test_timeout} + ${test_timeout} OUTPUT_QUIET # we do not want the output twice - WORKING_DIRECTORY "${output_directory}" + WORKING_DIRECTORY "${working_directory}" ${devnull} ) @@ -87,5 +112,5 @@ message("Matlab test ${name_of_the_test} output:\n${matlab_log_content}") # if w if(NOT (res EQUAL 0)) - message( FATAL_ERROR "[MATLAB] TEST FAILED" ) + message( FATAL_ERROR "[MATLAB] TEST FAILED Matlab returned ${res}" ) endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 51 ++++++++++++++++++++++++++----------- Modules/MatlabTestsRedirect.cmake | 41 +++++++++++++++++++++++------ 2 files changed, 69 insertions(+), 23 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 11:50:53 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 11:50:53 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2038-ga37c027 Message-ID: <20160914155053.D2D08F3674@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, next has been updated via a37c0273b4c13741b5ab7277f1c672b2d20d2934 (commit) via cc770e7670800819231ac428b75d8fc87a229116 (commit) from 12995aec6a806bc74591548e14a73ad2c71855cc (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=a37c0273b4c13741b5ab7277f1c672b2d20d2934 commit a37c0273b4c13741b5ab7277f1c672b2d20d2934 Merge: 12995ae cc770e7 Author: Brad King AuthorDate: Wed Sep 14 11:50:52 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 11:50:52 2016 -0400 Merge topic 'cmake-static-FindCacheFile' into next cc770e76 cmake: Make FindCacheFile a static method https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc770e7670800819231ac428b75d8fc87a229116 commit cc770e7670800819231ac428b75d8fc87a229116 Author: Brad King AuthorDate: Wed Sep 14 11:49:24 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 11:49:24 2016 -0400 cmake: Make FindCacheFile a static method It does not need access to member data. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 0d61a3d..18a7894 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1046,7 +1046,7 @@ const char* cmake::GetHomeOutputDirectory() const return this->State->GetBinaryDirectory(); } -std::string cmake::FindCacheFile(const std::string& binaryDir) const +std::string cmake::FindCacheFile(const std::string& binaryDir) { std::string cachePath = binaryDir; cmSystemTools::ConvertToUnixSlashes(cachePath); diff --git a/Source/cmake.h b/Source/cmake.h index 30661d9..6095a59 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -194,7 +194,7 @@ public: } ///! Return the full path to where the CMakeCache.txt file should be. - std::string FindCacheFile(const std::string& binaryDir) const; + static std::string FindCacheFile(const std::string& binaryDir); ///! Return the global generator assigned to this instance of cmake void SetGlobalGenerator(cmGlobalGenerator*); ----------------------------------------------------------------------- Summary of changes: Source/cmake.cxx | 2 +- Source/cmake.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 13:08:09 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 13:08:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2040-gc968768 Message-ID: <20160914170809.CA488F5AE1@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, next has been updated via c968768c5d6658f55550ab95df6e100bebacac32 (commit) via 86aa6780f536bf360c73562f5b758cc7774b4e39 (commit) from a37c0273b4c13741b5ab7277f1c672b2d20d2934 (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=c968768c5d6658f55550ab95df6e100bebacac32 commit c968768c5d6658f55550ab95df6e100bebacac32 Merge: a37c027 86aa678 Author: Brad King AuthorDate: Wed Sep 14 13:08:08 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 13:08:08 2016 -0400 Merge topic 'extend_matlab_unit_test' into next 86aa6780 fixup! FindMatlab: Extend matlab_add_unit_test to run arbitrary test code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86aa6780f536bf360c73562f5b758cc7774b4e39 commit 86aa6780f536bf360c73562f5b758cc7774b4e39 Author: Brad King AuthorDate: Wed Sep 14 13:07:13 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 13:07:13 2016 -0400 fixup! FindMatlab: Extend matlab_add_unit_test to run arbitrary test code diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index 0bd16c8..76f9a53 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -80,8 +80,8 @@ if(NOT working_directory) set(working_directory "${output_directory}") endif() -string(REPLACE "/" "_" log_file_name "${test_name}") -set(Matlab_LOG_FILE "${working_directory}/${log_file_name}.log") +string(REPLACE "/" "_" log_file_name "${test_name}.log") +set(Matlab_LOG_FILE "${working_directory}/${log_file_name}") set(devnull) if(UNIX) ----------------------------------------------------------------------- Summary of changes: Modules/MatlabTestsRedirect.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 13:08:32 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 13:08:32 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2042-g960d255 Message-ID: <20160914170832.9874CF5AEC@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, next has been updated via 960d2557773ea70b5f9d9316a440634afeb114e0 (commit) via 4ebb4ae6cfab256631dea866f787003e419fb911 (commit) from c968768c5d6658f55550ab95df6e100bebacac32 (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=960d2557773ea70b5f9d9316a440634afeb114e0 commit 960d2557773ea70b5f9d9316a440634afeb114e0 Merge: c968768 4ebb4ae Author: Brad King AuthorDate: Wed Sep 14 13:08:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 13:08:31 2016 -0400 Merge topic 'extend_matlab_unit_test' into next 4ebb4ae6 FindMatlab: Extend matlab_add_unit_test to run arbitrary test code https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ebb4ae6cfab256631dea866f787003e419fb911 commit 4ebb4ae6cfab256631dea866f787003e419fb911 Author: Bill Hoffman AuthorDate: Tue Aug 30 15:02:35 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 13:08:19 2016 -0400 FindMatlab: Extend matlab_add_unit_test to run arbitrary test code Allow a custom matlab set of commands to be run as the test instead of just `runtests('matlab_file_name')`. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index b501599..c813f8f 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -635,7 +635,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve set(devnull INPUT_FILE NUL) endif() - # timeout set to 30 seconds, in case it does not start + # timeout set to 120 seconds, in case it does not start # note as said before OUTPUT_VARIABLE cannot be used in a platform # independent manner however, not setting it would flush the output of Matlab # in the current console (unix variant) @@ -644,11 +644,18 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve OUTPUT_VARIABLE _matlab_version_from_cmd_dummy RESULT_VARIABLE _matlab_result_version_call ERROR_VARIABLE _matlab_result_version_call_error - TIMEOUT 30 + TIMEOUT 120 WORKING_DIRECTORY "${_matlab_temporary_folder}" ${devnull} ) + if("${_matlab_result_version_call}" MATCHES "timeout") + if(MATLAB_FIND_DEBUG) + message(WARNING "[MATLAB] Unable to determine the version of Matlab." + " Matlab call timed out after 120 seconds.") + endif() + return() + endif() if(${_matlab_result_version_call}) if(MATLAB_FIND_DEBUG) @@ -698,7 +705,6 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve endfunction() - #.rst: # .. command:: matlab_add_unit_test # @@ -720,6 +726,7 @@ endfunction() # matlab_add_unit_test( # NAME # UNITTEST_FILE matlab_file_containing_unittest.m +# [CUSTOM_MATLAB_COMMAND matlab_command_to_run_as_test] # [UNITTEST_PRECOMMAND matlab_command_to_run] # [TIMEOUT timeout] # [ADDITIONAL_PATH path1 [path2 ...]] @@ -735,6 +742,11 @@ endfunction() # ``UNITTEST_FILE`` # the matlab unittest file. Its path will be automatically # added to the Matlab path. +# ``CUSTOM_MATLAB_COMMAND`` +# Matlab script command to run as the test. +# IIf this is not set, then the following is run: +# "runtests('matlab_file_name'), exit(max([ans(1,:).Failed])) +# matlab_file_name comes from UNITTEST_FILE without the .m. # ``UNITTEST_PRECOMMAND`` # Matlab script command to be ran before the file # containing the test (eg. GPU device initialisation based on CMake @@ -748,12 +760,18 @@ endfunction() # ``MATLAB_ADDITIONAL_STARTUP_OPTIONS`` # a list of additional option in order # to run Matlab from the command line. +# -nosplash -nodesktop -nodisplay are always added. # ``TEST_ARGS`` # Additional options provided to the add_test command. These # options are added to the default options (eg. "CONFIGURATIONS Release") # ``NO_UNITTEST_FRAMEWORK`` # when set, indicates that the test should not # use the unittest framework of Matlab (available for versions >= R2013a). +# ``WORKING_DIRECTORY`` +# This will be the working directory for the test. If specified it will +# also be the output directory used for the log file of the test run. +# If not specifed the temporary directory ${CMAKE_BINARY_DIR}/Matlab will +# be used as the working directory and the log location. # function(matlab_add_unit_test) @@ -762,11 +780,12 @@ function(matlab_add_unit_test) endif() set(options NO_UNITTEST_FRAMEWORK) - set(oneValueArgs NAME UNITTEST_PRECOMMAND UNITTEST_FILE TIMEOUT) + set(oneValueArgs NAME UNITTEST_FILE TIMEOUT WORKING_DIRECTORY + UNITTEST_PRECOMMAND CUSTOM_TEST_COMMAND) set(multiValueArgs ADDITIONAL_PATH MATLAB_ADDITIONAL_STARTUP_OPTIONS TEST_ARGS) set(prefix _matlab_unittest_prefix) - cmake_parse_arguments(${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + cmake_parse_arguments(PARSE_ARGV 0 ${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ) if(NOT ${prefix}_NAME) message(FATAL_ERROR "[MATLAB] The Matlab test name cannot be empty") @@ -774,15 +793,17 @@ function(matlab_add_unit_test) add_test(NAME ${${prefix}_NAME} COMMAND ${CMAKE_COMMAND} - -Dtest_name=${${prefix}_NAME} - -Dadditional_paths=${${prefix}_ADDITIONAL_PATH} - -Dtest_timeout=${${prefix}_TIMEOUT} - -Doutput_directory=${_matlab_temporary_folder} - -DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM} - -Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK} - -DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS} - -Dunittest_file_to_run=${${prefix}_UNITTEST_FILE} - -Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND} + "-Dtest_name=${${prefix}_NAME}" + "-Dadditional_paths=${${prefix}_ADDITIONAL_PATH}" + "-Dtest_timeout=${${prefix}_TIMEOUT}" + "-Doutput_directory=${_matlab_temporary_folder}" + "-Dworking_directory=${${prefix}_WORKING_DIRECTORY}" + "-DMatlab_PROGRAM=${Matlab_MAIN_PROGRAM}" + "-Dno_unittest_framework=${${prefix}_NO_UNITTEST_FRAMEWORK}" + "-DMatlab_ADDITIONNAL_STARTUP_OPTIONS=${${prefix}_MATLAB_ADDITIONAL_STARTUP_OPTIONS}" + "-Dunittest_file_to_run=${${prefix}_UNITTEST_FILE}" + "-Dcustom_Matlab_test_command=${${prefix}_CUSTOM_TEST_COMMAND}" + "-Dcmd_to_run_before_test=${${prefix}_UNITTEST_PRECOMMAND}" -P ${_FindMatlab_SELF_DIR}/MatlabTestsRedirect.cmake ${${prefix}_TEST_ARGS} ${${prefix}_UNPARSED_ARGUMENTS} @@ -1034,7 +1055,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_known_version matlab_f if(${list_of_all_versions_length} GREATER 0) list(GET matlab_list_of_all_versions 0 _matlab_version_tmp) else() - set(_matlab_version_tmp "") + set(_matlab_version_tmp "unknown") endif() # set the version into the cache diff --git a/Modules/MatlabTestsRedirect.cmake b/Modules/MatlabTestsRedirect.cmake index 0ef4c3e..76f9a53 100644 --- a/Modules/MatlabTestsRedirect.cmake +++ b/Modules/MatlabTestsRedirect.cmake @@ -23,11 +23,12 @@ # -DMatlab_PROGRAM=matlab_exe_location # -DMatlab_ADDITIONNAL_STARTUP_OPTIONS="" # -Dtest_name=name_of_the_test +# -Dcustom_Matlab_test_command="" # -Dcmd_to_run_before_test="" # -Dunittest_file_to_run # -P FindMatlab_TestsRedirect.cmake -set(Matlab_UNIT_TESTS_CMD -nosplash -nojvm -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) +set(Matlab_UNIT_TESTS_CMD -nosplash -nodesktop -nodisplay ${Matlab_ADDITIONNAL_STARTUP_OPTIONS}) if(WIN32) set(Matlab_UNIT_TESTS_CMD ${Matlab_UNIT_TESTS_CMD} -wait) endif() @@ -36,6 +37,13 @@ if(NOT test_timeout) set(test_timeout 180) endif() +# If timeout is -1, then do not put a timeout on the execute_process +if(test_timeout EQUAL -1) + set(test_timeout "") +else() + set(test_timeout TIMEOUT ${test_timeout}) +endif() + if(NOT cmd_to_run_before_test) set(cmd_to_run_before_test) endif() @@ -50,16 +58,30 @@ foreach(s IN LISTS additional_paths) endif() endforeach() -set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") +if(custom_Matlab_test_command) + set(unittest_to_run "${custom_Matlab_test_command}") +else() + set(unittest_to_run "runtests('${unittest_file_to_run_name}'), exit(max([ans(1,:).Failed]))") +endif() + + if(no_unittest_framework) set(unittest_to_run "try, ${unittest_file_to_run_name}, catch err, disp('An exception has been thrown during the execution'), disp(err), disp(err.stack), exit(1), end, exit(0)") endif() set(Matlab_SCRIPT_TO_RUN - "addpath(${concat_string}), path, ${cmd_to_run_before_test}, ${unittest_to_run}" + "addpath(${concat_string}); ${cmd_to_run_before_test}; ${unittest_to_run}" ) +# if the working directory is not specified then default +# to the output_directory because the log file will go there +# if the working_directory is specified it will override the +# output_directory +if(NOT working_directory) + set(working_directory "${output_directory}") +endif() -set(Matlab_LOG_FILE "${output_directory}/${test_name}.log") +string(REPLACE "/" "_" log_file_name "${test_name}.log") +set(Matlab_LOG_FILE "${working_directory}/${log_file_name}") set(devnull) if(UNIX) @@ -69,11 +91,14 @@ elseif(WIN32) endif() execute_process( - COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${test_name}.log" -r "${Matlab_SCRIPT_TO_RUN}" + # Do not use a full path to log file. Depend on the fact that the log file + # is always going to go in the working_directory. This is because matlab + # on unix is a shell script that does not handle spaces in the logfile path. + COMMAND "${Matlab_PROGRAM}" ${Matlab_UNIT_TESTS_CMD} -logfile "${log_file_name}" -r "${Matlab_SCRIPT_TO_RUN}" RESULT_VARIABLE res - TIMEOUT ${test_timeout} + ${test_timeout} OUTPUT_QUIET # we do not want the output twice - WORKING_DIRECTORY "${output_directory}" + WORKING_DIRECTORY "${working_directory}" ${devnull} ) @@ -87,5 +112,5 @@ message("Matlab test ${name_of_the_test} output:\n${matlab_log_content}") # if w if(NOT (res EQUAL 0)) - message( FATAL_ERROR "[MATLAB] TEST FAILED" ) + message( FATAL_ERROR "[MATLAB] TEST FAILED Matlab returned ${res}" ) endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 14:01:24 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 14:01:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2045-gec58cf7 Message-ID: <20160914180124.C5FADF5427@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, next has been updated via ec58cf7272fe24baf829b3cd3b0ff0d5eb6d4109 (commit) via 3edc6014f0e16757501288912d6e1baf6c4d9e6f (commit) via 2e5cea71bcf7a9a08569b0f2ba1eed36289e0402 (commit) from 960d2557773ea70b5f9d9316a440634afeb114e0 (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=ec58cf7272fe24baf829b3cd3b0ff0d5eb6d4109 commit ec58cf7272fe24baf829b3cd3b0ff0d5eb6d4109 Merge: 960d255 3edc601 Author: Brad King AuthorDate: Wed Sep 14 14:01:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 14:01:23 2016 -0400 Merge topic 'avoid-target-indexing' into next 3edc6014 Avoid requiring default cmTarget constructor for map indexing 2e5cea71 cmTarget: Add method to get a copy adapted for a directory https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3edc6014f0e16757501288912d6e1baf6c4d9e6f commit 3edc6014f0e16757501288912d6e1baf6c4d9e6f Author: Brad King AuthorDate: Wed Sep 14 13:42:27 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 13:48:50 2016 -0400 Avoid requiring default cmTarget constructor for map indexing The `std::map<>` index operator requires a default constructor on the value type. Avoid requiring a default constructor on `cmTarget` just for this purpose. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ef8266f..961d89d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1068,8 +1068,8 @@ void cmGlobalGenerator::Configure() cmTargets* targets = &(mf->GetTargets()); cmTargets::iterator tit; for (tit = globalTargets.begin(); tit != globalTargets.end(); ++tit) { - (*targets)[tit->first] = tit->second; - (*targets)[tit->first].SetMakefile(mf); + targets->insert( + cmTargets::value_type(tit->first, tit->second.CopyForDirectory(mf))); } } @@ -2101,9 +2101,12 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) } } if (cmSystemTools::FileExists(configFile.c_str())) { - (*targets)[this->GetPackageTargetName()] = this->CreateGlobalTarget( - this->GetPackageTargetName(), "Run CPack packaging tool...", - &cpackCommandLines, depends, workingDir.c_str(), /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + this->GetPackageTargetName(), + this->CreateGlobalTarget(this->GetPackageTargetName(), + "Run CPack packaging tool...", + &cpackCommandLines, depends, workingDir.c_str(), + /*uses_terminal*/ true))); } // CPack source const char* packageSourceTargetName = this->GetPackageSourceTargetName(); @@ -2122,10 +2125,12 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) if (cmSystemTools::FileExists(configFile.c_str())) { singleLine.push_back(configFile); cpackCommandLines.push_back(singleLine); - (*targets)[packageSourceTargetName] = this->CreateGlobalTarget( - packageSourceTargetName, "Run CPack packaging tool for source...", - &cpackCommandLines, depends, workingDir.c_str(), - /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + packageSourceTargetName, + this->CreateGlobalTarget( + packageSourceTargetName, "Run CPack packaging tool for source...", + &cpackCommandLines, depends, workingDir.c_str(), + /*uses_terminal*/ true))); } } @@ -2146,10 +2151,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("$(ARGS)"); } cpackCommandLines.push_back(singleLine); - (*targets)[this->GetTestTargetName()] = + targets->insert(cmTargets::value_type( + this->GetTestTargetName(), this->CreateGlobalTarget(this->GetTestTargetName(), "Running tests...", &cpackCommandLines, depends, CM_NULLPTR, - /*uses_terminal*/ true); + /*uses_terminal*/ true))); } // Edit Cache @@ -2167,18 +2173,22 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); cpackCommandLines.push_back(singleLine); - (*targets)[editCacheTargetName] = this->CreateGlobalTarget( - editCacheTargetName, "Running CMake cache editor...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + editCacheTargetName, + this->CreateGlobalTarget( + editCacheTargetName, "Running CMake cache editor...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } else { singleLine.push_back(cmSystemTools::GetCMakeCommand()); singleLine.push_back("-E"); singleLine.push_back("echo"); singleLine.push_back("No interactive CMake dialog available."); cpackCommandLines.push_back(singleLine); - (*targets)[editCacheTargetName] = this->CreateGlobalTarget( - editCacheTargetName, "No interactive CMake dialog available...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ false); + targets->insert(cmTargets::value_type( + editCacheTargetName, + this->CreateGlobalTarget( + editCacheTargetName, "No interactive CMake dialog available...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ false))); } } @@ -2193,9 +2203,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); cpackCommandLines.push_back(singleLine); - (*targets)[rebuildCacheTargetName] = this->CreateGlobalTarget( - rebuildCacheTargetName, "Running CMake to regenerate build system...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + rebuildCacheTargetName, + this->CreateGlobalTarget( + rebuildCacheTargetName, "Running CMake to regenerate build system...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } // Install @@ -2219,9 +2231,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) ostr << "Only default component available"; } singleLine.push_back(ostr.str()); - (*targets)["list_install_components"] = this->CreateGlobalTarget( - "list_install_components", ostr.str().c_str(), &cpackCommandLines, - depends, CM_NULLPTR, /*uses_terminal*/ false); + targets->insert(cmTargets::value_type( + "list_install_components", + this->CreateGlobalTarget("list_install_components", ostr.str().c_str(), + &cpackCommandLines, depends, CM_NULLPTR, + /*uses_terminal*/ false))); } std::string cmd = cmSystemTools::GetCMakeCommand(); cpackCommandLines.erase(cpackCommandLines.begin(), @@ -2260,9 +2274,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("-P"); singleLine.push_back("cmake_install.cmake"); cpackCommandLines.push_back(singleLine); - (*targets)[this->GetInstallTargetName()] = this->CreateGlobalTarget( - this->GetInstallTargetName(), "Install the project...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + this->GetInstallTargetName(), + this->CreateGlobalTarget(this->GetInstallTargetName(), + "Install the project...", &cpackCommandLines, + depends, CM_NULLPTR, /*uses_terminal*/ true))); // install_local if (const char* install_local = this->GetInstallLocalTargetName()) { @@ -2274,9 +2290,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.end()); cpackCommandLines.push_back(localCmdLine); - (*targets)[install_local] = this->CreateGlobalTarget( - install_local, "Installing only the local directory...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + install_local, + this->CreateGlobalTarget( + install_local, "Installing only the local directory...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } // install_strip @@ -2290,9 +2308,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.end()); cpackCommandLines.push_back(stripCmdLine); - (*targets)[install_strip] = this->CreateGlobalTarget( - install_strip, "Installing the project stripped...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + install_strip, + this->CreateGlobalTarget( + install_strip, "Installing the project stripped...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } } } diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index 056ea24..6b594b6 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -37,14 +37,17 @@ bool cmInstallTargetsCommand::InitialPass(std::vector const& args, } runtime_dir = *s; - } else if (tgts.find(*s) != tgts.end()) { - tgts[*s].SetInstallPath(args[0].c_str()); - tgts[*s].SetRuntimeInstallPath(runtime_dir.c_str()); - tgts[*s].SetHaveInstallRule(true); } else { - std::string str = "Cannot find target: \"" + *s + "\" to install."; - this->SetError(str); - return false; + cmTargets::iterator ti = tgts.find(*s); + if (ti != tgts.end()) { + ti->second.SetInstallPath(args[0].c_str()); + ti->second.SetRuntimeInstallPath(runtime_dir.c_str()); + ti->second.SetHaveInstallRule(true); + } else { + std::string str = "Cannot find target: \"" + *s + "\" to install."; + this->SetError(str); + return false; + } } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e5a5e6e..eb39afa 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -979,8 +979,9 @@ void cmMakefile::AddCustomCommandOldStyle( // then add the source to the target to make sure the rule is // included. if (sf && !sf->GetPropertyAsBool("__CMAKE_RULE")) { - if (this->Targets.find(target) != this->Targets.end()) { - this->Targets[target].AddSource(sf->GetFullPath()); + cmTargets::iterator ti = this->Targets.find(target); + if (ti != this->Targets.end()) { + ti->second.AddSource(sf->GetFullPath()); } else { cmSystemTools::Error("Attempt to add a custom rule to a target " "that does not exist yet for target ", https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e5cea71bcf7a9a08569b0f2ba1eed36289e0402 commit 2e5cea71bcf7a9a08569b0f2ba1eed36289e0402 Author: Brad King AuthorDate: Wed Sep 14 13:38:00 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 13:48:50 2016 -0400 cmTarget: Add method to get a copy adapted for a directory The "global" targets are built once for the top directory and then copied into all directories. Add a helper method to make the copy. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d5274cd..77055af 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -83,6 +83,13 @@ void cmTarget::SetType(cmState::TargetType type, const std::string& name) } } +cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const +{ + cmTarget result(*this); + result.SetMakefile(mf); + return result; +} + void cmTarget::SetMakefile(cmMakefile* mf) { // Set our makefile. diff --git a/Source/cmTarget.h b/Source/cmTarget.h index fc30166..b0bfc72 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -86,6 +86,9 @@ public: ///! Set/Get the name of the target const std::string& GetName() const { return this->Name; } + /** Get a copy of this target adapted for the given directory. */ + cmTarget CopyForDirectory(cmMakefile* mf) const; + ///! Set the cmMakefile that owns this target void SetMakefile(cmMakefile* mf); cmMakefile* GetMakefile() const { return this->Makefile; } ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 84 ++++++++++++++++++++++-------------- Source/cmInstallTargetsCommand.cxx | 17 +++++--- Source/cmMakefile.cxx | 5 ++- Source/cmTarget.cxx | 7 +++ Source/cmTarget.h | 3 ++ 5 files changed, 75 insertions(+), 41 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 14:50:08 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 14:50:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2049-g202b5bc Message-ID: <20160914185008.92FF1E631F@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, next has been updated via 202b5bc9b658502f0ca0b05b8d125011605ac449 (commit) via 7dc47338642ae77b09dd10b8b34f766043167904 (commit) via 0e742b994f51085188cdd0311b4de3c40b25c373 (commit) via 7e2004bb40b7887bb5ba7fa0a4477f22ad6fd97a (commit) from ec58cf7272fe24baf829b3cd3b0ff0d5eb6d4109 (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=202b5bc9b658502f0ca0b05b8d125011605ac449 commit 202b5bc9b658502f0ca0b05b8d125011605ac449 Merge: ec58cf7 7dc4733 Author: Brad King AuthorDate: Wed Sep 14 14:50:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 14:50:07 2016 -0400 Merge topic 'refactor-target-construction' into next 7dc47338 cmTarget: Inline SetType method at only remaining call site 0e742b99 cmTarget: Construct with basic information up front 7e2004bb fixup! cmTarget: Add method to get a copy adapted for a directory https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dc47338642ae77b09dd10b8b34f766043167904 commit 7dc47338642ae77b09dd10b8b34f766043167904 Author: Brad King AuthorDate: Wed Sep 14 14:34:36 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 14:35:39 2016 -0400 cmTarget: Inline SetType method at only remaining call site diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 15610e5..d964f00 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -63,6 +63,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, Visibility vis, cmMakefile* mf) { assert(mf || type == cmState::GLOBAL_TARGET); + this->Name = name; + this->TargetTypeValue = type; this->Makefile = CM_NULLPTR; this->HaveInstallRule = false; this->DLLPlatform = false; @@ -71,23 +73,18 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, (vis == VisibilityImported || vis == VisibilityImportedGlobally); this->ImportedGloballyVisible = vis == VisibilityImportedGlobally; this->BuildInterfaceIncludesAppended = false; - this->SetType(type, name); - if (mf) { - this->SetMakefile(mf); - } -} -void cmTarget::SetType(cmState::TargetType type, const std::string& name) -{ - this->Name = name; // only add dependency information for library targets - this->TargetTypeValue = type; if (this->TargetTypeValue >= cmState::STATIC_LIBRARY && this->TargetTypeValue <= cmState::MODULE_LIBRARY) { this->RecordDependencies = true; } else { this->RecordDependencies = false; } + + if (mf) { + this->SetMakefile(mf); + } } cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8a1d27e..ebc92f3 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -283,7 +283,6 @@ public: }; private: - void SetType(cmState::TargetType f, const std::string& name); void SetMakefile(cmMakefile* mf); bool HandleLocationPropertyPolicy(cmMakefile* context) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e742b994f51085188cdd0311b4de3c40b25c373 commit 0e742b994f51085188cdd0311b4de3c40b25c373 Author: Brad King AuthorDate: Wed Sep 14 14:28:07 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 14:31:06 2016 -0400 cmTarget: Construct with basic information up front Avoid having partially constructed cmTarget instances around, except for the special case of GLOBAL_TARGET construction. diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index a0aefb8..6c31481 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -77,9 +77,8 @@ std::string cmExportTryCompileFileGenerator::FindTargets( CM_AUTO_PTR cge = ge.Parse(prop); - cmTarget dummyHead; - dummyHead.SetType(cmState::EXECUTABLE, "try_compile_dummy_exe"); - dummyHead.SetMakefile(tgt->Target->GetMakefile()); + cmTarget dummyHead("try_compile_dummy_exe", cmState::EXECUTABLE, + cmTarget::VisibilityNormal, tgt->Target->GetMakefile()); cmGeneratorTarget gDummyHead(&dummyHead, tgt->GetLocalGenerator()); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 961d89d..e85d80e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2352,8 +2352,8 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget( const char* workingDirectory, bool uses_terminal) { // Package - cmTarget target; - target.SetType(cmState::GLOBAL_TARGET, name); + cmTarget target(name, cmState::GLOBAL_TARGET, cmTarget::VisibilityNormal, + CM_NULLPTR); target.SetProperty("EXCLUDE_FROM_ALL", "TRUE"); std::vector no_outputs; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index eb39afa..508c670 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1925,10 +1925,10 @@ cmTarget* cmMakefile::AddNewTarget(cmState::TargetType type, const std::string& name) { cmTargets::iterator it = - this->Targets.insert(cmTargets::value_type(name, cmTarget())).first; - cmTarget& target = it->second; - target.SetType(type, name); - target.SetMakefile(this); + this->Targets + .insert(cmTargets::value_type( + name, cmTarget(name, type, cmTarget::VisibilityNormal, this))) + .first; this->GetGlobalGenerator()->IndexTarget(&it->second); return &it->second; } @@ -3710,10 +3710,10 @@ cmTarget* cmMakefile::AddImportedTarget(const std::string& name, cmState::TargetType type, bool global) { // Create the target. - CM_AUTO_PTR target(new cmTarget); - target->SetType(type, name); - target->MarkAsImported(global); - target->SetMakefile(this); + CM_AUTO_PTR target( + new cmTarget(name, type, global ? cmTarget::VisibilityImportedGlobally + : cmTarget::VisibilityImported, + this)); // Add to the set of available imported targets. this->ImportedTargets[name] = target.get(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index dc3944c..15610e5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -59,15 +59,22 @@ public: std::vector LinkImplementationPropertyBacktraces; }; -cmTarget::cmTarget() +cmTarget::cmTarget(std::string const& name, cmState::TargetType type, + Visibility vis, cmMakefile* mf) { + assert(mf || type == cmState::GLOBAL_TARGET); this->Makefile = CM_NULLPTR; this->HaveInstallRule = false; this->DLLPlatform = false; this->IsAndroid = false; - this->IsImportedTarget = false; - this->ImportedGloballyVisible = false; + this->IsImportedTarget = + (vis == VisibilityImported || vis == VisibilityImportedGlobally); + this->ImportedGloballyVisible = vis == VisibilityImportedGlobally; this->BuildInterfaceIncludesAppended = false; + this->SetType(type, name); + if (mf) { + this->SetMakefile(mf); + } } void cmTarget::SetType(cmState::TargetType type, const std::string& name) @@ -1071,12 +1078,6 @@ void cmTarget::CheckProperty(const std::string& prop, } } -void cmTarget::MarkAsImported(bool global) -{ - this->IsImportedTarget = true; - this->ImportedGloballyVisible = global; -} - bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const { if (this->IsImported()) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index b0bfc72..8a1d27e 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -63,7 +63,16 @@ private: class cmTarget { public: - cmTarget(); + enum Visibility + { + VisibilityNormal, + VisibilityImported, + VisibilityImportedGlobally + }; + + cmTarget(std::string const& name, cmState::TargetType type, Visibility vis, + cmMakefile* mf); + enum CustomCommandType { PRE_BUILD, @@ -76,21 +85,13 @@ public: */ cmState::TargetType GetType() const { return this->TargetTypeValue; } - /** - * Set the target type - */ - void SetType(cmState::TargetType f, const std::string& name); - - void MarkAsImported(bool global = false); - ///! Set/Get the name of the target const std::string& GetName() const { return this->Name; } /** Get a copy of this target adapted for the given directory. */ cmTarget CopyForDirectory(cmMakefile* mf) const; - ///! Set the cmMakefile that owns this target - void SetMakefile(cmMakefile* mf); + /** Get the cmMakefile that owns this target. */ cmMakefile* GetMakefile() const { return this->Makefile; } #define DECLARE_TARGET_POLICY(POLICY) \ @@ -282,6 +283,9 @@ public: }; private: + void SetType(cmState::TargetType f, const std::string& name); + void SetMakefile(cmMakefile* mf); + bool HandleLocationPropertyPolicy(cmMakefile* context) const; const char* GetSuffixVariableInternal(bool implib) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e2004bb40b7887bb5ba7fa0a4477f22ad6fd97a commit 7e2004bb40b7887bb5ba7fa0a4477f22ad6fd97a Author: Brad King AuthorDate: Wed Sep 14 14:28:40 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 14:28:40 2016 -0400 fixup! cmTarget: Add method to get a copy adapted for a directory diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 77055af..dc3944c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -85,6 +85,8 @@ void cmTarget::SetType(cmState::TargetType type, const std::string& name) cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const { + assert(this->GetType() == cmState::GLOBAL_TARGET); + assert(this->GetMakefile() == CM_NULLPTR); cmTarget result(*this); result.SetMakefile(mf); return result; ----------------------------------------------------------------------- Summary of changes: Source/cmExportTryCompileFileGenerator.cxx | 5 ++--- Source/cmGlobalGenerator.cxx | 4 ++-- Source/cmMakefile.cxx | 16 ++++++++-------- Source/cmTarget.cxx | 28 ++++++++++++++-------------- Source/cmTarget.h | 23 +++++++++++++---------- 5 files changed, 39 insertions(+), 37 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Sep 14 14:51:33 2016 From: brad.king at kitware.com (Brad King) Date: Wed, 14 Sep 2016 14:51:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2054-g2e27da5 Message-ID: <20160914185133.C153EF1A20@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, next has been updated via 2e27da53ac949ff3944933adb4e55b368e708b17 (commit) via 7a2e114dd8ab55bc9ef9e1106ae352d2fea558d3 (commit) via 00e78c19903c24bb7cc969f3b825b2502661f3c0 (commit) via 9d11bd50661a1fb0a079c7c17120273f21ea9a8c (commit) via d97513d842c51e4fb996d42e1f04a9c291e3d5bf (commit) from 202b5bc9b658502f0ca0b05b8d125011605ac449 (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=2e27da53ac949ff3944933adb4e55b368e708b17 commit 2e27da53ac949ff3944933adb4e55b368e708b17 Merge: 202b5bc 7a2e114 Author: Brad King AuthorDate: Wed Sep 14 14:51:32 2016 -0400 Commit: CMake Topic Stage CommitDate: Wed Sep 14 14:51:32 2016 -0400 Merge topic 'refactor-target-construction' into next 7a2e114d cmTarget: Inline SetType method at only remaining call site 00e78c19 cmTarget: Construct with basic information up front 9d11bd50 Avoid requiring default cmTarget constructor for map indexing d97513d8 cmTarget: Add method to get a copy adapted for a directory https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a2e114dd8ab55bc9ef9e1106ae352d2fea558d3 commit 7a2e114dd8ab55bc9ef9e1106ae352d2fea558d3 Author: Brad King AuthorDate: Wed Sep 14 14:34:36 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 14:50:40 2016 -0400 cmTarget: Inline SetType method at only remaining call site diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 15610e5..d964f00 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -63,6 +63,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, Visibility vis, cmMakefile* mf) { assert(mf || type == cmState::GLOBAL_TARGET); + this->Name = name; + this->TargetTypeValue = type; this->Makefile = CM_NULLPTR; this->HaveInstallRule = false; this->DLLPlatform = false; @@ -71,23 +73,18 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, (vis == VisibilityImported || vis == VisibilityImportedGlobally); this->ImportedGloballyVisible = vis == VisibilityImportedGlobally; this->BuildInterfaceIncludesAppended = false; - this->SetType(type, name); - if (mf) { - this->SetMakefile(mf); - } -} -void cmTarget::SetType(cmState::TargetType type, const std::string& name) -{ - this->Name = name; // only add dependency information for library targets - this->TargetTypeValue = type; if (this->TargetTypeValue >= cmState::STATIC_LIBRARY && this->TargetTypeValue <= cmState::MODULE_LIBRARY) { this->RecordDependencies = true; } else { this->RecordDependencies = false; } + + if (mf) { + this->SetMakefile(mf); + } } cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8a1d27e..ebc92f3 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -283,7 +283,6 @@ public: }; private: - void SetType(cmState::TargetType f, const std::string& name); void SetMakefile(cmMakefile* mf); bool HandleLocationPropertyPolicy(cmMakefile* context) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00e78c19903c24bb7cc969f3b825b2502661f3c0 commit 00e78c19903c24bb7cc969f3b825b2502661f3c0 Author: Brad King AuthorDate: Wed Sep 14 14:28:07 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 14:50:39 2016 -0400 cmTarget: Construct with basic information up front Avoid having partially constructed cmTarget instances around, except for the special case of GLOBAL_TARGET construction. diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index a0aefb8..6c31481 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -77,9 +77,8 @@ std::string cmExportTryCompileFileGenerator::FindTargets( CM_AUTO_PTR cge = ge.Parse(prop); - cmTarget dummyHead; - dummyHead.SetType(cmState::EXECUTABLE, "try_compile_dummy_exe"); - dummyHead.SetMakefile(tgt->Target->GetMakefile()); + cmTarget dummyHead("try_compile_dummy_exe", cmState::EXECUTABLE, + cmTarget::VisibilityNormal, tgt->Target->GetMakefile()); cmGeneratorTarget gDummyHead(&dummyHead, tgt->GetLocalGenerator()); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 961d89d..e85d80e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2352,8 +2352,8 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget( const char* workingDirectory, bool uses_terminal) { // Package - cmTarget target; - target.SetType(cmState::GLOBAL_TARGET, name); + cmTarget target(name, cmState::GLOBAL_TARGET, cmTarget::VisibilityNormal, + CM_NULLPTR); target.SetProperty("EXCLUDE_FROM_ALL", "TRUE"); std::vector no_outputs; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index eb39afa..508c670 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1925,10 +1925,10 @@ cmTarget* cmMakefile::AddNewTarget(cmState::TargetType type, const std::string& name) { cmTargets::iterator it = - this->Targets.insert(cmTargets::value_type(name, cmTarget())).first; - cmTarget& target = it->second; - target.SetType(type, name); - target.SetMakefile(this); + this->Targets + .insert(cmTargets::value_type( + name, cmTarget(name, type, cmTarget::VisibilityNormal, this))) + .first; this->GetGlobalGenerator()->IndexTarget(&it->second); return &it->second; } @@ -3710,10 +3710,10 @@ cmTarget* cmMakefile::AddImportedTarget(const std::string& name, cmState::TargetType type, bool global) { // Create the target. - CM_AUTO_PTR target(new cmTarget); - target->SetType(type, name); - target->MarkAsImported(global); - target->SetMakefile(this); + CM_AUTO_PTR target( + new cmTarget(name, type, global ? cmTarget::VisibilityImportedGlobally + : cmTarget::VisibilityImported, + this)); // Add to the set of available imported targets. this->ImportedTargets[name] = target.get(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index dc3944c..15610e5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -59,15 +59,22 @@ public: std::vector LinkImplementationPropertyBacktraces; }; -cmTarget::cmTarget() +cmTarget::cmTarget(std::string const& name, cmState::TargetType type, + Visibility vis, cmMakefile* mf) { + assert(mf || type == cmState::GLOBAL_TARGET); this->Makefile = CM_NULLPTR; this->HaveInstallRule = false; this->DLLPlatform = false; this->IsAndroid = false; - this->IsImportedTarget = false; - this->ImportedGloballyVisible = false; + this->IsImportedTarget = + (vis == VisibilityImported || vis == VisibilityImportedGlobally); + this->ImportedGloballyVisible = vis == VisibilityImportedGlobally; this->BuildInterfaceIncludesAppended = false; + this->SetType(type, name); + if (mf) { + this->SetMakefile(mf); + } } void cmTarget::SetType(cmState::TargetType type, const std::string& name) @@ -1071,12 +1078,6 @@ void cmTarget::CheckProperty(const std::string& prop, } } -void cmTarget::MarkAsImported(bool global) -{ - this->IsImportedTarget = true; - this->ImportedGloballyVisible = global; -} - bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const { if (this->IsImported()) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index b0bfc72..8a1d27e 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -63,7 +63,16 @@ private: class cmTarget { public: - cmTarget(); + enum Visibility + { + VisibilityNormal, + VisibilityImported, + VisibilityImportedGlobally + }; + + cmTarget(std::string const& name, cmState::TargetType type, Visibility vis, + cmMakefile* mf); + enum CustomCommandType { PRE_BUILD, @@ -76,21 +85,13 @@ public: */ cmState::TargetType GetType() const { return this->TargetTypeValue; } - /** - * Set the target type - */ - void SetType(cmState::TargetType f, const std::string& name); - - void MarkAsImported(bool global = false); - ///! Set/Get the name of the target const std::string& GetName() const { return this->Name; } /** Get a copy of this target adapted for the given directory. */ cmTarget CopyForDirectory(cmMakefile* mf) const; - ///! Set the cmMakefile that owns this target - void SetMakefile(cmMakefile* mf); + /** Get the cmMakefile that owns this target. */ cmMakefile* GetMakefile() const { return this->Makefile; } #define DECLARE_TARGET_POLICY(POLICY) \ @@ -282,6 +283,9 @@ public: }; private: + void SetType(cmState::TargetType f, const std::string& name); + void SetMakefile(cmMakefile* mf); + bool HandleLocationPropertyPolicy(cmMakefile* context) const; const char* GetSuffixVariableInternal(bool implib) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d11bd50661a1fb0a079c7c17120273f21ea9a8c commit 9d11bd50661a1fb0a079c7c17120273f21ea9a8c Author: Brad King AuthorDate: Wed Sep 14 13:42:27 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 14:50:39 2016 -0400 Avoid requiring default cmTarget constructor for map indexing The `std::map<>` index operator requires a default constructor on the value type. Avoid requiring a default constructor on `cmTarget` just for this purpose. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index ef8266f..961d89d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1068,8 +1068,8 @@ void cmGlobalGenerator::Configure() cmTargets* targets = &(mf->GetTargets()); cmTargets::iterator tit; for (tit = globalTargets.begin(); tit != globalTargets.end(); ++tit) { - (*targets)[tit->first] = tit->second; - (*targets)[tit->first].SetMakefile(mf); + targets->insert( + cmTargets::value_type(tit->first, tit->second.CopyForDirectory(mf))); } } @@ -2101,9 +2101,12 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) } } if (cmSystemTools::FileExists(configFile.c_str())) { - (*targets)[this->GetPackageTargetName()] = this->CreateGlobalTarget( - this->GetPackageTargetName(), "Run CPack packaging tool...", - &cpackCommandLines, depends, workingDir.c_str(), /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + this->GetPackageTargetName(), + this->CreateGlobalTarget(this->GetPackageTargetName(), + "Run CPack packaging tool...", + &cpackCommandLines, depends, workingDir.c_str(), + /*uses_terminal*/ true))); } // CPack source const char* packageSourceTargetName = this->GetPackageSourceTargetName(); @@ -2122,10 +2125,12 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) if (cmSystemTools::FileExists(configFile.c_str())) { singleLine.push_back(configFile); cpackCommandLines.push_back(singleLine); - (*targets)[packageSourceTargetName] = this->CreateGlobalTarget( - packageSourceTargetName, "Run CPack packaging tool for source...", - &cpackCommandLines, depends, workingDir.c_str(), - /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + packageSourceTargetName, + this->CreateGlobalTarget( + packageSourceTargetName, "Run CPack packaging tool for source...", + &cpackCommandLines, depends, workingDir.c_str(), + /*uses_terminal*/ true))); } } @@ -2146,10 +2151,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("$(ARGS)"); } cpackCommandLines.push_back(singleLine); - (*targets)[this->GetTestTargetName()] = + targets->insert(cmTargets::value_type( + this->GetTestTargetName(), this->CreateGlobalTarget(this->GetTestTargetName(), "Running tests...", &cpackCommandLines, depends, CM_NULLPTR, - /*uses_terminal*/ true); + /*uses_terminal*/ true))); } // Edit Cache @@ -2167,18 +2173,22 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); cpackCommandLines.push_back(singleLine); - (*targets)[editCacheTargetName] = this->CreateGlobalTarget( - editCacheTargetName, "Running CMake cache editor...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + editCacheTargetName, + this->CreateGlobalTarget( + editCacheTargetName, "Running CMake cache editor...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } else { singleLine.push_back(cmSystemTools::GetCMakeCommand()); singleLine.push_back("-E"); singleLine.push_back("echo"); singleLine.push_back("No interactive CMake dialog available."); cpackCommandLines.push_back(singleLine); - (*targets)[editCacheTargetName] = this->CreateGlobalTarget( - editCacheTargetName, "No interactive CMake dialog available...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ false); + targets->insert(cmTargets::value_type( + editCacheTargetName, + this->CreateGlobalTarget( + editCacheTargetName, "No interactive CMake dialog available...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ false))); } } @@ -2193,9 +2203,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); cpackCommandLines.push_back(singleLine); - (*targets)[rebuildCacheTargetName] = this->CreateGlobalTarget( - rebuildCacheTargetName, "Running CMake to regenerate build system...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + rebuildCacheTargetName, + this->CreateGlobalTarget( + rebuildCacheTargetName, "Running CMake to regenerate build system...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } // Install @@ -2219,9 +2231,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) ostr << "Only default component available"; } singleLine.push_back(ostr.str()); - (*targets)["list_install_components"] = this->CreateGlobalTarget( - "list_install_components", ostr.str().c_str(), &cpackCommandLines, - depends, CM_NULLPTR, /*uses_terminal*/ false); + targets->insert(cmTargets::value_type( + "list_install_components", + this->CreateGlobalTarget("list_install_components", ostr.str().c_str(), + &cpackCommandLines, depends, CM_NULLPTR, + /*uses_terminal*/ false))); } std::string cmd = cmSystemTools::GetCMakeCommand(); cpackCommandLines.erase(cpackCommandLines.begin(), @@ -2260,9 +2274,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) singleLine.push_back("-P"); singleLine.push_back("cmake_install.cmake"); cpackCommandLines.push_back(singleLine); - (*targets)[this->GetInstallTargetName()] = this->CreateGlobalTarget( - this->GetInstallTargetName(), "Install the project...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + this->GetInstallTargetName(), + this->CreateGlobalTarget(this->GetInstallTargetName(), + "Install the project...", &cpackCommandLines, + depends, CM_NULLPTR, /*uses_terminal*/ true))); // install_local if (const char* install_local = this->GetInstallLocalTargetName()) { @@ -2274,9 +2290,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.end()); cpackCommandLines.push_back(localCmdLine); - (*targets)[install_local] = this->CreateGlobalTarget( - install_local, "Installing only the local directory...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + install_local, + this->CreateGlobalTarget( + install_local, "Installing only the local directory...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } // install_strip @@ -2290,9 +2308,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.end()); cpackCommandLines.push_back(stripCmdLine); - (*targets)[install_strip] = this->CreateGlobalTarget( - install_strip, "Installing the project stripped...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true); + targets->insert(cmTargets::value_type( + install_strip, + this->CreateGlobalTarget( + install_strip, "Installing the project stripped...", + &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } } } diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index 056ea24..6b594b6 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -37,14 +37,17 @@ bool cmInstallTargetsCommand::InitialPass(std::vector const& args, } runtime_dir = *s; - } else if (tgts.find(*s) != tgts.end()) { - tgts[*s].SetInstallPath(args[0].c_str()); - tgts[*s].SetRuntimeInstallPath(runtime_dir.c_str()); - tgts[*s].SetHaveInstallRule(true); } else { - std::string str = "Cannot find target: \"" + *s + "\" to install."; - this->SetError(str); - return false; + cmTargets::iterator ti = tgts.find(*s); + if (ti != tgts.end()) { + ti->second.SetInstallPath(args[0].c_str()); + ti->second.SetRuntimeInstallPath(runtime_dir.c_str()); + ti->second.SetHaveInstallRule(true); + } else { + std::string str = "Cannot find target: \"" + *s + "\" to install."; + this->SetError(str); + return false; + } } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e5a5e6e..eb39afa 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -979,8 +979,9 @@ void cmMakefile::AddCustomCommandOldStyle( // then add the source to the target to make sure the rule is // included. if (sf && !sf->GetPropertyAsBool("__CMAKE_RULE")) { - if (this->Targets.find(target) != this->Targets.end()) { - this->Targets[target].AddSource(sf->GetFullPath()); + cmTargets::iterator ti = this->Targets.find(target); + if (ti != this->Targets.end()) { + ti->second.AddSource(sf->GetFullPath()); } else { cmSystemTools::Error("Attempt to add a custom rule to a target " "that does not exist yet for target ", https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d97513d842c51e4fb996d42e1f04a9c291e3d5bf commit d97513d842c51e4fb996d42e1f04a9c291e3d5bf Author: Brad King AuthorDate: Wed Sep 14 13:38:00 2016 -0400 Commit: Brad King CommitDate: Wed Sep 14 14:50:39 2016 -0400 cmTarget: Add method to get a copy adapted for a directory The "global" targets are built once for the top directory and then copied into all directories. Add a helper method to make the copy. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d5274cd..dc3944c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -83,6 +83,15 @@ void cmTarget::SetType(cmState::TargetType type, const std::string& name) } } +cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const +{ + assert(this->GetType() == cmState::GLOBAL_TARGET); + assert(this->GetMakefile() == CM_NULLPTR); + cmTarget result(*this); + result.SetMakefile(mf); + return result; +} + void cmTarget::SetMakefile(cmMakefile* mf) { // Set our makefile. diff --git a/Source/cmTarget.h b/Source/cmTarget.h index fc30166..b0bfc72 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -86,6 +86,9 @@ public: ///! Set/Get the name of the target const std::string& GetName() const { return this->Name; } + /** Get a copy of this target adapted for the given directory. */ + cmTarget CopyForDirectory(cmMakefile* mf) const; + ///! Set the cmMakefile that owns this target void SetMakefile(cmMakefile* mf); cmMakefile* GetMakefile() const { return this->Makefile; } ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Thu Sep 15 00:01:10 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 15 Sep 2016 00:01:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-959-g100817d Message-ID: <20160915040110.4321FF5D38@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 100817dc5d190ec7b8b4fe3ef822b6df9e5e7c67 (commit) from ea69e03afaeff76d2141ab4a330f3489297a3a41 (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=100817dc5d190ec7b8b4fe3ef822b6df9e5e7c67 commit 100817dc5d190ec7b8b4fe3ef822b6df9e5e7c67 Author: Kitware Robot AuthorDate: Thu Sep 15 00:01:07 2016 -0400 Commit: Kitware Robot CommitDate: Thu Sep 15 00:01:07 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c61ef42..0569e8e 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 6) -set(CMake_VERSION_PATCH 20160914) +set(CMake_VERSION_PATCH 20160915) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:41:34 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:41:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2056-g036182d Message-ID: <20160915124134.DF269DF619@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, next has been updated via 036182dd9c03db921115d8baf6adafff7b2c1233 (commit) via de1493176b936e960165d9110944636bcb9fd798 (commit) from 2e27da53ac949ff3944933adb4e55b368e708b17 (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=036182dd9c03db921115d8baf6adafff7b2c1233 commit 036182dd9c03db921115d8baf6adafff7b2c1233 Merge: 2e27da5 de14931 Author: Brad King AuthorDate: Thu Sep 15 08:41:33 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:41:33 2016 -0400 Merge topic 'update-kwsys' into next de149317 Tests: Use upper-case drive letters in RunCMake.get_filename_component https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de1493176b936e960165d9110944636bcb9fd798 commit de1493176b936e960165d9110944636bcb9fd798 Author: Brad King AuthorDate: Thu Sep 15 08:32:43 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 08:39:18 2016 -0400 Tests: Use upper-case drive letters in RunCMake.get_filename_component With the most recent KWSys update, the "actual case" operation on Windows always upper-cases the drive letter now even for absolute paths that do not exist. Use an upper-case drive letter in the test so that it can tolerate this operation on Windows and the lack of this operation elsewhere. diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.cmake b/Tests/RunCMake/get_filename_component/KnownComponents.cmake index d822258..7dfb55d 100644 --- a/Tests/RunCMake/get_filename_component/KnownComponents.cmake +++ b/Tests/RunCMake/get_filename_component/KnownComponents.cmake @@ -19,12 +19,12 @@ foreach(c DIRECTORY NAME EXT NAME_WE PATH) endforeach() # Test Windows paths with DIRECTORY component and an absolute Windows path. -get_filename_component(test_slashes "c:\\path\\to\\filename.ext.in" DIRECTORY) -check("DIRECTORY from backslashes" "${test_slashes}" "c:/path/to") +get_filename_component(test_slashes "C:\\path\\to\\filename.ext.in" DIRECTORY) +check("DIRECTORY from backslashes" "${test_slashes}" "C:/path/to") list(APPEND non_cache_vars test_slashes) -get_filename_component(test_winroot "c:\\filename.ext.in" DIRECTORY) -check("DIRECTORY in windows root" "${test_winroot}" "c:/") +get_filename_component(test_winroot "C:\\filename.ext.in" DIRECTORY) +check("DIRECTORY in windows root" "${test_winroot}" "C:/") list(APPEND non_cache_vars test_winroot) # Test finding absolute paths. @@ -33,8 +33,8 @@ check("ABSOLUTE" "${test_absolute}" "/path/to/filename.ext.in") get_filename_component(test_absolute "/../path/to/filename.ext.in" ABSOLUTE) check("ABSOLUTE .. in root" "${test_absolute}" "/path/to/filename.ext.in") -get_filename_component(test_absolute "c:/../path/to/filename.ext.in" ABSOLUTE) -check("ABSOLUTE .. in windows root" "${test_absolute}" "c:/path/to/filename.ext.in") +get_filename_component(test_absolute "C:/../path/to/filename.ext.in" ABSOLUTE) +check("ABSOLUTE .. in windows root" "${test_absolute}" "C:/path/to/filename.ext.in") list(APPEND non_cache_vars test_absolute) ----------------------------------------------------------------------- Summary of changes: .../RunCMake/get_filename_component/KnownComponents.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:29 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-961-gf129dc7 Message-ID: <20160915124629.D5A85E6520@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 f129dc752b09fbfea70b6cfc69acdfb752d3b659 (commit) via c31573b9641e0f1bc7a34149506db51f3494323b (commit) from 100817dc5d190ec7b8b4fe3ef822b6df9e5e7c67 (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=f129dc752b09fbfea70b6cfc69acdfb752d3b659 commit f129dc752b09fbfea70b6cfc69acdfb752d3b659 Merge: 100817d c31573b Author: Brad King AuthorDate: Thu Sep 15 08:46:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:27 2016 -0400 Merge topic 'python-3.7' c31573b9 FindPython{Interp,Libs}: Add version 3.7 ----------------------------------------------------------------------- Summary of changes: Modules/FindPythonInterp.cmake | 2 +- Modules/FindPythonLibs.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:33 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:33 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-964-g0b28233 Message-ID: <20160915124633.5DF0BE7BBC@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 0b282335ab2dd9788d7203cc2f94d4f695d686a4 (commit) via 152bbe5068fc125351f728f04a14113e08f87671 (commit) via a6d3f5418c4f2c1bd99272a9fac1cf4e33b1df09 (commit) from f129dc752b09fbfea70b6cfc69acdfb752d3b659 (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=0b282335ab2dd9788d7203cc2f94d4f695d686a4 commit 0b282335ab2dd9788d7203cc2f94d4f695d686a4 Merge: f129dc7 152bbe5 Author: Brad King AuthorDate: Thu Sep 15 08:46:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:30 2016 -0400 Merge topic 'fix-CMAKE_COMPILER_IS_GNU-confusion' 152bbe50 Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variable a6d3f541 Help: Clarify documentation of CMAKE_COMPILER_IS_GNU{CC,CXX,G77} ----------------------------------------------------------------------- Summary of changes: CompileFlags.cmake | 2 +- Help/manual/cmake-variables.7.rst | 4 +++- Help/variable/CMAKE_COMPILER_IS_GNUCC.rst | 5 +++++ Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst | 5 +++++ Help/variable/CMAKE_COMPILER_IS_GNUG77.rst | 5 +++++ Help/variable/CMAKE_COMPILER_IS_GNULANG.rst | 15 --------------- Modules/GenerateExportHeader.cmake | 2 +- 7 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUCC.rst create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst create mode 100644 Help/variable/CMAKE_COMPILER_IS_GNUG77.rst delete mode 100644 Help/variable/CMAKE_COMPILER_IS_GNULANG.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:36 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:36 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-966-g0063b6b Message-ID: <20160915124636.56CC2EDDE4@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 0063b6b43c77741944fc2d55fbab05a0750e321b (commit) via d4d0c9422695e3ba67d933566c69034ed814d9ea (commit) from 0b282335ab2dd9788d7203cc2f94d4f695d686a4 (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=0063b6b43c77741944fc2d55fbab05a0750e321b commit 0063b6b43c77741944fc2d55fbab05a0750e321b Merge: 0b28233 d4d0c94 Author: Brad King AuthorDate: Thu Sep 15 08:46:34 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:34 2016 -0400 Merge topic 'fix-ccmake-sun-gcc' d4d0c942 ccmake: Fix recent compilation regression with GCC on Solaris ----------------------------------------------------------------------- Summary of changes: Source/CursesDialog/cmCursesStandardIncludes.h | 4 ---- Source/CursesDialog/form/form.h | 4 ---- 2 files changed, 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:39 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:39 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-968-g62a79dc Message-ID: <20160915124639.4BF3EEE5B0@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 62a79dccc5f30e0e80904e83dada288b78d80182 (commit) via cc770e7670800819231ac428b75d8fc87a229116 (commit) from 0063b6b43c77741944fc2d55fbab05a0750e321b (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=62a79dccc5f30e0e80904e83dada288b78d80182 commit 62a79dccc5f30e0e80904e83dada288b78d80182 Merge: 0063b6b cc770e7 Author: Brad King AuthorDate: Thu Sep 15 08:46:37 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:37 2016 -0400 Merge topic 'cmake-static-FindCacheFile' cc770e76 cmake: Make FindCacheFile a static method ----------------------------------------------------------------------- Summary of changes: Source/cmake.cxx | 2 +- Source/cmake.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:42 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:42 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-973-ge0e047f Message-ID: <20160915124642.3426EEE5B0@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 e0e047fe4b15addb053b56195f584ecb568a973d (commit) via 7a2e114dd8ab55bc9ef9e1106ae352d2fea558d3 (commit) via 00e78c19903c24bb7cc969f3b825b2502661f3c0 (commit) via 9d11bd50661a1fb0a079c7c17120273f21ea9a8c (commit) via d97513d842c51e4fb996d42e1f04a9c291e3d5bf (commit) from 62a79dccc5f30e0e80904e83dada288b78d80182 (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=e0e047fe4b15addb053b56195f584ecb568a973d commit e0e047fe4b15addb053b56195f584ecb568a973d Merge: 62a79dc 7a2e114 Author: Brad King AuthorDate: Thu Sep 15 08:46:40 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:40 2016 -0400 Merge topic 'refactor-target-construction' 7a2e114d cmTarget: Inline SetType method at only remaining call site 00e78c19 cmTarget: Construct with basic information up front 9d11bd50 Avoid requiring default cmTarget constructor for map indexing d97513d8 cmTarget: Add method to get a copy adapted for a directory ----------------------------------------------------------------------- Summary of changes: Source/cmExportTryCompileFileGenerator.cxx | 5 +- Source/cmGlobalGenerator.cxx | 88 +++++++++++++++++----------- Source/cmInstallTargetsCommand.cxx | 17 +++--- Source/cmMakefile.cxx | 21 +++---- Source/cmTarget.cxx | 35 ++++++----- Source/cmTarget.h | 26 ++++---- 6 files changed, 114 insertions(+), 78 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:45 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-975-g6f31436 Message-ID: <20160915124645.10ECCEDC9E@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 6f31436c9116b6c41928d4eab3225f0428b5d466 (commit) via 4ebb4ae6cfab256631dea866f787003e419fb911 (commit) from e0e047fe4b15addb053b56195f584ecb568a973d (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=6f31436c9116b6c41928d4eab3225f0428b5d466 commit 6f31436c9116b6c41928d4eab3225f0428b5d466 Merge: e0e047f 4ebb4ae Author: Brad King AuthorDate: Thu Sep 15 08:46:42 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:42 2016 -0400 Merge topic 'extend_matlab_unit_test' 4ebb4ae6 FindMatlab: Extend matlab_add_unit_test to run arbitrary test code ----------------------------------------------------------------------- Summary of changes: Modules/FindMatlab.cmake | 51 ++++++++++++++++++++++++++----------- Modules/MatlabTestsRedirect.cmake | 41 +++++++++++++++++++++++------ 2 files changed, 69 insertions(+), 23 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:48 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:48 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-978-gb7dcada Message-ID: <20160915124648.0C947EDDE4@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 b7dcadac44b26c50ba9e765e97c59035dd03c33f (commit) via 884943251b16d3e34901a6533944e6b78ef8eb03 (commit) via 07f69bd5cc9b6b4bc040327f315620c736ec15ba (commit) from 6f31436c9116b6c41928d4eab3225f0428b5d466 (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=b7dcadac44b26c50ba9e765e97c59035dd03c33f commit b7dcadac44b26c50ba9e765e97c59035dd03c33f Merge: 6f31436 8849432 Author: Brad King AuthorDate: Thu Sep 15 08:46:45 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:45 2016 -0400 Merge topic 'add-strverscmp' 88494325 Tests: Add test for our strverscmp implementation 07f69bd5 cmSystemTools: Add strverscmp ----------------------------------------------------------------------- Summary of changes: Source/cmSystemTools.cxx | 77 ++++++++++++++++++++++++++++++++++++ Source/cmSystemTools.h | 10 +++++ Tests/CMakeLib/testSystemTools.cxx | 72 +++++++++++++++++++++++++++++++-- 3 files changed, 155 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:46:51 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:46:51 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-984-g0101403 Message-ID: <20160915124651.A97F9EE356@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 010140311a0aa9336b7e2a2d22c177d445ee1c32 (commit) via de1493176b936e960165d9110944636bcb9fd798 (commit) via 04d94fbe92535f57177777bc8715fb41a2d7dcc0 (commit) via d28e4467aae44db2b15a785e6f061917798cfcd4 (commit) via e4fc770fa39f8433147cae4849923286e5b3511a (commit) via b80d6136321fb6c2be019dec4af4b1e486389e2c (commit) from b7dcadac44b26c50ba9e765e97c59035dd03c33f (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=010140311a0aa9336b7e2a2d22c177d445ee1c32 commit 010140311a0aa9336b7e2a2d22c177d445ee1c32 Merge: b7dcada de14931 Author: Brad King AuthorDate: Thu Sep 15 08:46:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 08:46:48 2016 -0400 Merge topic 'update-kwsys' de149317 Tests: Use upper-case drive letters in RunCMake.get_filename_component 04d94fbe Merge branch 'upstream-KWSys' into update-kwsys d28e4467 KWSys 2016-09-14 (c4049689) e4fc770f Merge branch 'upstream-KWSys' into update-kwsys b80d6136 KWSys 2016-09-14 (e736efa1) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CMakeLists.txt | 20 +- Source/kwsys/ConsoleBuf.hxx.in | 348 +++++++++++ Source/kwsys/SystemTools.cxx | 70 ++- Source/kwsys/SystemTools.hxx.in | 9 +- Source/kwsys/testConsoleBuf.cxx | 609 ++++++++++++++++++++ Source/{cmUtils.hxx => kwsys/testConsoleBuf.hxx} | 22 +- Source/kwsys/testConsoleBufChild.cxx | 61 ++ Source/kwsys/testSystemTools.cxx | 4 +- .../get_filename_component/KnownComponents.cmake | 12 +- 9 files changed, 1098 insertions(+), 57 deletions(-) create mode 100644 Source/kwsys/ConsoleBuf.hxx.in create mode 100644 Source/kwsys/testConsoleBuf.cxx copy Source/{cmUtils.hxx => kwsys/testConsoleBuf.hxx} (50%) create mode 100644 Source/kwsys/testConsoleBufChild.cxx hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 08:47:12 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 08:47:12 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2066-g838b4ee Message-ID: <20160915124712.AD9DFF2917@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, next has been updated via 838b4ee5b96789d03aa4621c4cb9077a0c8e83ad (commit) via 010140311a0aa9336b7e2a2d22c177d445ee1c32 (commit) via b7dcadac44b26c50ba9e765e97c59035dd03c33f (commit) via 6f31436c9116b6c41928d4eab3225f0428b5d466 (commit) via e0e047fe4b15addb053b56195f584ecb568a973d (commit) via 62a79dccc5f30e0e80904e83dada288b78d80182 (commit) via 0063b6b43c77741944fc2d55fbab05a0750e321b (commit) via 0b282335ab2dd9788d7203cc2f94d4f695d686a4 (commit) via f129dc752b09fbfea70b6cfc69acdfb752d3b659 (commit) via 100817dc5d190ec7b8b4fe3ef822b6df9e5e7c67 (commit) from 036182dd9c03db921115d8baf6adafff7b2c1233 (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=838b4ee5b96789d03aa4621c4cb9077a0c8e83ad commit 838b4ee5b96789d03aa4621c4cb9077a0c8e83ad Merge: 036182d 0101403 Author: Brad King AuthorDate: Thu Sep 15 08:47:00 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 08:47:00 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 09:25:20 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 09:25:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2068-g75b3842 Message-ID: <20160915132520.59AD5F55DD@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, next has been updated via 75b3842f0a5c1daf5b2e37a1ed0ae50639d605fc (commit) via ae783c9ba92f42ec252085e407c0b7e5d00aa59a (commit) from 838b4ee5b96789d03aa4621c4cb9077a0c8e83ad (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=75b3842f0a5c1daf5b2e37a1ed0ae50639d605fc commit 75b3842f0a5c1daf5b2e37a1ed0ae50639d605fc Merge: 838b4ee ae783c9 Author: Brad King AuthorDate: Thu Sep 15 09:25:19 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 09:25:19 2016 -0400 Merge topic 'require-cmake-2.8.12.2' into next ae783c9b Require CMake 2.8.12.2 to build CMake itself https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae783c9ba92f42ec252085e407c0b7e5d00aa59a commit ae783c9ba92f42ec252085e407c0b7e5d00aa59a Author: Brad King AuthorDate: Thu Sep 15 09:23:39 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 09:24:25 2016 -0400 Require CMake 2.8.12.2 to build CMake itself This will enable use of features such as ALIAS targets within CMake's own build. diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ef2ca2..c8bd063 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= -cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR) if(POLICY CMP0025) cmake_policy(SET CMP0025 NEW) endif() diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 6ebf2b4..add5326 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -12,7 +12,7 @@ if(NOT CMake_SOURCE_DIR) set(CMakeDeveloperReference_STANDALONE 1) - cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) + cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake) diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index 45f79dd..be4850e 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -11,7 +11,7 @@ #============================================================================= if(NOT CMake_SOURCE_DIR) set(CMakeHelp_STANDALONE 1) - cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) + cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 2 +- Utilities/Doxygen/CMakeLists.txt | 2 +- Utilities/Sphinx/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 11:36:31 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 11:36:31 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2073-ga1f57bd Message-ID: <20160915153631.294CDF5DAA@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, next has been updated via a1f57bd4f9a0dd918ca46279dfb3ea03cf0437ee (commit) via 7aa97b948f854cf4797db8707969173efb786249 (commit) via 46ded385c00c71a932c624efdecda7283492d41d (commit) via 5d17e995801dd916446c232eb36f1b330106578f (commit) via 7c92c84302827b33ea47f7fb6ca5b2ff98451d44 (commit) from 75b3842f0a5c1daf5b2e37a1ed0ae50639d605fc (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=a1f57bd4f9a0dd918ca46279dfb3ea03cf0437ee commit a1f57bd4f9a0dd918ca46279dfb3ea03cf0437ee Merge: 75b3842 7aa97b9 Author: Brad King AuthorDate: Thu Sep 15 11:36:30 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 11:36:30 2016 -0400 Merge topic 'doc-FeatureSummary' into next 7aa97b94 FeatureSummary: Add include() to examples 46ded385 FeatureSummary: Format documentation 5d17e995 FeatureSummary: Convert docs to a bracket comment 7c92c843 FeatureSummary: Order function implementations the same as the documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7aa97b948f854cf4797db8707969173efb786249 commit 7aa97b948f854cf4797db8707969173efb786249 Author: Brad King AuthorDate: Thu Sep 15 11:34:34 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 11:34:34 2016 -0400 FeatureSummary: Add include() to examples Since this module's documentation already includes complete usage examples, make them more complete by showing the include() explicitly. Issue: #16309 diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 9a60587..548d12a 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -196,6 +196,7 @@ endfunction() .. code-block:: cmake + include(FeatureSummary) feature_summary(WHAT ALL FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND) @@ -204,6 +205,7 @@ endfunction() .. code-block:: cmake + include(FeatureSummary) feature_summary(WHAT ENABLED_FEATURES INCLUDE_QUIET_PACKAGES DESCRIPTION "Enabled Features:" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46ded385c00c71a932c624efdecda7283492d41d commit 46ded385c00c71a932c624efdecda7283492d41d Author: Brad King AuthorDate: Thu Sep 15 11:33:24 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 11:33:24 2016 -0400 FeatureSummary: Format documentation Revise the documentation using reStructuredText inline markup and explicit blocks so that it formats well. diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 9afdcd9..9a60587 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -2,19 +2,10 @@ FeatureSummary -------------- -Macros for generating a summary of enabled/disabled features +Functions for generating a summary of enabled/disabled features. - - -This module provides the macros feature_summary(), -set_package_properties() and add_feature_info(). For compatibility it -also still provides set_package_info(), set_feature_info(), -print_enabled_features() and print_disabled_features(). - -These macros can be used to generate a summary of enabled and disabled -packages and/or feature for a build tree: - -:: +These functions can be used to generate a summary of enabled and disabled +packages and/or feature for a build tree such as:: -- The following OPTIONAL packages have been found: LibXml2 (required version >= 2.4), XML processing lib, @@ -27,242 +18,9 @@ packages and/or feature for a build tree: * Enables macros in MyWordProcessor Foo , Foo provides cool stuff. +Functions +^^^^^^^^^ - - - -:: - - FEATURE_SUMMARY( [FILENAME ] - [APPEND] - [VAR ] - [INCLUDE_QUIET_PACKAGES] - [FATAL_ON_MISSING_REQUIRED_PACKAGES] - [DESCRIPTION "Found packages:"] - WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND - | ENABLED_FEATURES | DISABLED_FEATURES) - ) - - - -The FEATURE_SUMMARY() macro can be used to print information about -enabled or disabled packages or features of a project. By default, -only the names of the features/packages will be printed and their -required version when one was specified. Use SET_PACKAGE_PROPERTIES() -to add more useful information, like e.g. a download URL for the -respective package or their purpose in the project. - -The WHAT option is the only mandatory option. Here you specify what -information will be printed: - -``ALL`` - print everything -``ENABLED_FEATURES`` - the list of all features which are enabled -``DISABLED_FEATURES`` - the list of all features which are disabled -``PACKAGES_FOUND`` - the list of all packages which have been found -``PACKAGES_NOT_FOUND`` - the list of all packages which have not been found -``OPTIONAL_PACKAGES_FOUND`` - only those packages which have been found which have the type OPTIONAL -``OPTIONAL_PACKAGES_NOT_FOUND`` - only those packages which have not been found which have the type OPTIONAL -``RECOMMENDED_PACKAGES_FOUND`` - only those packages which have been found which have the type RECOMMENDED -``RECOMMENDED_PACKAGES_NOT_FOUND`` - only those packages which have not been found which have the type RECOMMENDED -``REQUIRED_PACKAGES_FOUND`` - only those packages which have been found which have the type REQUIRED -``REQUIRED_PACKAGES_NOT_FOUND`` - only those packages which have not been found which have the type REQUIRED -``RUNTIME_PACKAGES_FOUND`` - only those packages which have been found which have the type RUNTIME -``RUNTIME_PACKAGES_NOT_FOUND`` - only those packages which have not been found which have the type RUNTIME - -With the exception of the ``ALL`` value, these values can be combined -in order to customize the output. For example: - -:: - - feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) - - - -If a FILENAME is given, the information is printed into this file. If -APPEND is used, it is appended to this file, otherwise the file is -overwritten if it already existed. If the VAR option is used, the -information is "printed" into the specified variable. If FILENAME is -not used, the information is printed to the terminal. Using the -DESCRIPTION option a description or headline can be set which will be -printed above the actual content. If INCLUDE_QUIET_PACKAGES is given, -packages which have been searched with find_package(... QUIET) will -also be listed. By default they are skipped. If -FATAL_ON_MISSING_REQUIRED_PACKAGES is given, CMake will abort if a -package which is marked as REQUIRED has not been found. - -Example 1, append everything to a file: - -:: - - feature_summary(WHAT ALL - FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND) - - - -Example 2, print the enabled features into the variable -enabledFeaturesText, including QUIET packages: - -:: - - feature_summary(WHAT ENABLED_FEATURES - INCLUDE_QUIET_PACKAGES - DESCRIPTION "Enabled Features:" - VAR enabledFeaturesText) - message(STATUS "${enabledFeaturesText}") - - - - - -:: - - SET_PACKAGE_PROPERTIES( PROPERTIES - [ URL ] - [ DESCRIPTION ] - [ TYPE (RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED) ] - [ PURPOSE ] - ) - - - -Use this macro to set up information about the named package, which -can then be displayed via FEATURE_SUMMARY(). This can be done either -directly in the Find-module or in the project which uses the module -after the find_package() call. The features for which information can -be set are added automatically by the find_package() command. - -URL: this should be the homepage of the package, or something similar. -Ideally this is set already directly in the Find-module. - -DESCRIPTION: A short description what that package is, at most one -sentence. Ideally this is set already directly in the Find-module. - -TYPE: What type of dependency has the using project on that package. -Default is OPTIONAL. In this case it is a package which can be used -by the project when available at buildtime, but it also work without. -RECOMMENDED is similar to OPTIONAL, i.e. the project will build if -the package is not present, but the functionality of the resulting -binaries will be severly limited. If a REQUIRED package is not -available at buildtime, the project may not even build. This can be -combined with the FATAL_ON_MISSING_REQUIRED_PACKAGES argument for -feature_summary(). Last, a RUNTIME package is a package which is -actually not used at all during the build, but which is required for -actually running the resulting binaries. So if such a package is -missing, the project can still be built, but it may not work later on. -If set_package_properties() is called multiple times for the same -package with different TYPEs, the TYPE is only changed to higher TYPEs -( RUNTIME < OPTIONAL < RECOMMENDED < REQUIRED ), lower TYPEs are -ignored. The TYPE property is project-specific, so it cannot be set -by the Find-module, but must be set in the project. - -PURPOSE: This describes which features this package enables in the -project, i.e. it tells the user what functionality he gets in the -resulting binaries. If set_package_properties() is called multiple -times for a package, all PURPOSE properties are appended to a list of -purposes of the package in the project. As the TYPE property, also -the PURPOSE property is project-specific, so it cannot be set by the -Find-module, but must be set in the project. - - - -Example for setting the info for a package: - -:: - - find_package(LibXml2) - set_package_properties(LibXml2 PROPERTIES - DESCRIPTION "A XML processing library." - URL "http://xmlsoft.org/") - - - -:: - - set_package_properties(LibXml2 PROPERTIES - TYPE RECOMMENDED - PURPOSE "Enables HTML-import in MyWordProcessor") - ... - set_package_properties(LibXml2 PROPERTIES - TYPE OPTIONAL - PURPOSE "Enables odt-export in MyWordProcessor") - - - -:: - - find_package(DBUS) - set_package_properties(DBUS PROPERTIES - TYPE RUNTIME - PURPOSE "Necessary to disable the screensaver during a presentation" ) - - - -:: - - ADD_FEATURE_INFO( ) - -Use this macro to add information about a feature with the given -. contains whether this feature is enabled or not, - is a text describing the feature. The information can -be displayed using feature_summary() for ENABLED_FEATURES and -DISABLED_FEATURES respectively. - -Example for setting the info for a feature: - -:: - - option(WITH_FOO "Help for foo" ON) - add_feature_info(Foo WITH_FOO "The Foo feature provides very cool stuff.") - - - - - -The following macros are provided for compatibility with previous -CMake versions: - -:: - - SET_PACKAGE_INFO( [ [] ] ) - -Use this macro to set up information about the named package, which -can then be displayed via FEATURE_SUMMARY(). This can be done either -directly in the Find-module or in the project which uses the module -after the find_package() call. The features for which information can -be set are added automatically by the find_package() command. - -:: - - PRINT_ENABLED_FEATURES() - -Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION -"Enabled features:") - -:: - - PRINT_DISABLED_FEATURES() - -Does the same as FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION -"Disabled features:") - -:: - - SET_FEATURE_INFO( [] ) - -Does the same as SET_PACKAGE_INFO( ) #]=======================================================================] #============================================================================= @@ -363,6 +121,95 @@ function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet) endfunction() +#[=======================================================================[.rst: +.. command:: feature_summary + + :: + + feature_summary( [FILENAME ] + [APPEND] + [VAR ] + [INCLUDE_QUIET_PACKAGES] + [FATAL_ON_MISSING_REQUIRED_PACKAGES] + [DESCRIPTION "Found packages:"] + WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND + | ENABLED_FEATURES | DISABLED_FEATURES) + ) + + The ``feature_summary()`` macro can be used to print information about + enabled or disabled packages or features of a project. By default, + only the names of the features/packages will be printed and their + required version when one was specified. Use ``set_package_properties()`` + to add more useful information, like e.g. a download URL for the + respective package or their purpose in the project. + + The ``WHAT`` option is the only mandatory option. Here you specify what + information will be printed: + + ``ALL`` + print everything + ``ENABLED_FEATURES`` + the list of all features which are enabled + ``DISABLED_FEATURES`` + the list of all features which are disabled + ``PACKAGES_FOUND`` + the list of all packages which have been found + ``PACKAGES_NOT_FOUND`` + the list of all packages which have not been found + ``OPTIONAL_PACKAGES_FOUND`` + only those packages which have been found which have the type OPTIONAL + ``OPTIONAL_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type OPTIONAL + ``RECOMMENDED_PACKAGES_FOUND`` + only those packages which have been found which have the type RECOMMENDED + ``RECOMMENDED_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type RECOMMENDED + ``REQUIRED_PACKAGES_FOUND`` + only those packages which have been found which have the type REQUIRED + ``REQUIRED_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type REQUIRED + ``RUNTIME_PACKAGES_FOUND`` + only those packages which have been found which have the type RUNTIME + ``RUNTIME_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type RUNTIME + + With the exception of the ``ALL`` value, these values can be combined + in order to customize the output. For example: + + .. code-block:: cmake + + feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) + + If a ``FILENAME`` is given, the information is printed into this file. If + ``APPEND`` is used, it is appended to this file, otherwise the file is + overwritten if it already existed. If the VAR option is used, the + information is "printed" into the specified variable. If ``FILENAME`` is + not used, the information is printed to the terminal. Using the + ``DESCRIPTION`` option a description or headline can be set which will be + printed above the actual content. If ``INCLUDE_QUIET_PACKAGES`` is given, + packages which have been searched with ``find_package(... QUIET)`` will + also be listed. By default they are skipped. If + ``FATAL_ON_MISSING_REQUIRED_PACKAGES`` is given, CMake will abort if a + package which is marked as ``REQUIRED`` has not been found. + + Example 1, append everything to a file: + + .. code-block:: cmake + + feature_summary(WHAT ALL + FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND) + + Example 2, print the enabled features into the variable + enabledFeaturesText, including QUIET packages: + + .. code-block:: cmake + + feature_summary(WHAT ENABLED_FEATURES + INCLUDE_QUIET_PACKAGES + DESCRIPTION "Enabled Features:" + VAR enabledFeaturesText) + message(STATUS "${enabledFeaturesText}") +#]=======================================================================] function(FEATURE_SUMMARY) # CMAKE_PARSE_ARGUMENTS( args...) @@ -482,6 +329,83 @@ function(FEATURE_SUMMARY) endfunction() +#[=======================================================================[.rst: +.. command:: set_package_properties + + :: + + set_package_properties( PROPERTIES + [ URL ] + [ DESCRIPTION ] + [ TYPE (RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED) ] + [ PURPOSE ] + ) + + Use this macro to set up information about the named package, which + can then be displayed via FEATURE_SUMMARY(). This can be done either + directly in the Find-module or in the project which uses the module + after the find_package() call. The features for which information can + be set are added automatically by the find_package() command. + + ``URL `` + This should be the homepage of the package, or something similar. + Ideally this is set already directly in the Find-module. + + ``DESCRIPTION `` + A short description what that package is, at most one sentence. + Ideally this is set already directly in the Find-module. + + ``TYPE `` + What type of dependency has the using project on that package. + Default is ``OPTIONAL``. In this case it is a package which can be used + by the project when available at buildtime, but it also work without. + ``RECOMMENDED`` is similar to ``OPTIONAL``, i.e. the project will build if + the package is not present, but the functionality of the resulting + binaries will be severly limited. If a ``REQUIRED`` package is not + available at buildtime, the project may not even build. This can be + combined with the ``FATAL_ON_MISSING_REQUIRED_PACKAGES`` argument for + ``feature_summary()``. Last, a ``RUNTIME`` package is a package which is + actually not used at all during the build, but which is required for + actually running the resulting binaries. So if such a package is + missing, the project can still be built, but it may not work later on. + If ``set_package_properties()`` is called multiple times for the same + package with different TYPEs, the ``TYPE`` is only changed to higher + TYPEs (``RUNTIME < OPTIONAL < RECOMMENDED < REQUIRED``), lower TYPEs are + ignored. The ``TYPE`` property is project-specific, so it cannot be set + by the Find-module, but must be set in the project. + + + ``PURPOSE `` + This describes which features this package enables in the + project, i.e. it tells the user what functionality he gets in the + resulting binaries. If set_package_properties() is called multiple + times for a package, all PURPOSE properties are appended to a list of + purposes of the package in the project. As the TYPE property, also + the PURPOSE property is project-specific, so it cannot be set by the + Find-module, but must be set in the project. + + Example for setting the info for a package: + + .. code-block:: cmake + + find_package(LibXml2) + set_package_properties(LibXml2 PROPERTIES + DESCRIPTION "A XML processing library." + URL "http://xmlsoft.org/") + # or + set_package_properties(LibXml2 PROPERTIES + TYPE RECOMMENDED + PURPOSE "Enables HTML-import in MyWordProcessor") + # or + set_package_properties(LibXml2 PROPERTIES + TYPE OPTIONAL + PURPOSE "Enables odt-export in MyWordProcessor") + + find_package(DBUS) + set_package_properties(DBUS PROPERTIES + TYPE RUNTIME + PURPOSE "Necessary to disable the screensaver during a presentation") +#]=======================================================================] function(SET_PACKAGE_PROPERTIES _name _props) if(NOT "${_props}" STREQUAL "PROPERTIES") message(FATAL_ERROR "PROPERTIES keyword is missing in SET_PACKAGE_PROPERTIES() call.") @@ -545,6 +469,26 @@ function(SET_PACKAGE_PROPERTIES _name _props) endfunction() +#[=======================================================================[.rst: +.. command:: add_feature_info + + :: + + add_feature_info( ) + + Use this macro to add information about a feature with the given ````. + ```` contains whether this feature is enabled or not. + ```` is a text describing the feature. The information can + be displayed using ``feature_summary()`` for ``ENABLED_FEATURES`` and + ``DISABLED_FEATURES`` respectively. + + Example for setting the info for a feature: + + .. code-block:: cmake + + option(WITH_FOO "Help for foo" ON) + add_feature_info(Foo WITH_FOO "The Foo feature provides very cool stuff.") +#]=======================================================================] function(ADD_FEATURE_INFO _name _enabled _desc) if (${_enabled}) set_property(GLOBAL APPEND PROPERTY ENABLED_FEATURES "${_name}") @@ -558,6 +502,25 @@ endfunction() # The stuff below is only kept for compatibility +#[=======================================================================[.rst: +Legacy Macros +^^^^^^^^^^^^^ + +The following macros are provided for compatibility with previous +CMake versions: + +.. command:: set_package_info + + :: + + set_package_info( [ [] ]) + + Use this macro to set up information about the named package, which + can then be displayed via ``feature_summary()``. This can be done either + directly in the Find-module or in the project which uses the module + after the :command:`find_package` call. The features for which information + can be set are added automatically by the ``find_package()`` command. +#]=======================================================================] function(SET_PACKAGE_INFO _name _desc) unset(_url) unset(_purpose) @@ -576,20 +539,51 @@ function(SET_PACKAGE_INFO _name _desc) endif() endfunction() +#[=======================================================================[.rst: +.. command:: set_feature_info + + :: + + set_feature_info( []) + Does the same as:: + set_package_info( ) +#]=======================================================================] function(SET_FEATURE_INFO) SET_PACKAGE_INFO(${ARGN}) endfunction() +#[=======================================================================[.rst: +.. command:: print_enabled_features + :: + print_enabled_features() + + Does the same as + + .. code-block:: cmake + + feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:") +#]=======================================================================] function(PRINT_ENABLED_FEATURES) FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:") endfunction() +#[=======================================================================[.rst: +.. command:: print_disabled_features + :: + print_disabled_features() + + Does the same as + + .. code-block:: cmake + + feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:") +#]=======================================================================] function(PRINT_DISABLED_FEATURES) FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:") endfunction() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d17e995801dd916446c232eb36f1b330106578f commit 5d17e995801dd916446c232eb36f1b330106578f Author: Brad King AuthorDate: Thu Sep 15 09:50:32 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 09:50:32 2016 -0400 FeatureSummary: Convert docs to a bracket comment Use a bracket comment to hold the documentation instead of a block of line comments. This will make further updates easier. diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 3e7ecfd..9afdcd9 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -1,268 +1,269 @@ -#.rst: -# FeatureSummary -# -------------- -# -# Macros for generating a summary of enabled/disabled features -# -# -# -# This module provides the macros feature_summary(), -# set_package_properties() and add_feature_info(). For compatibility it -# also still provides set_package_info(), set_feature_info(), -# print_enabled_features() and print_disabled_features(). -# -# These macros can be used to generate a summary of enabled and disabled -# packages and/or feature for a build tree: -# -# :: -# -# -- The following OPTIONAL packages have been found: -# LibXml2 (required version >= 2.4), XML processing lib, -# * Enables HTML-import in MyWordProcessor -# * Enables odt-export in MyWordProcessor -# PNG , A PNG image library. , -# * Enables saving screenshots -# -- The following OPTIONAL packages have not been found: -# Lua51 , The Lua scripting language. , -# * Enables macros in MyWordProcessor -# Foo , Foo provides cool stuff. -# -# -# -# -# -# :: -# -# FEATURE_SUMMARY( [FILENAME ] -# [APPEND] -# [VAR ] -# [INCLUDE_QUIET_PACKAGES] -# [FATAL_ON_MISSING_REQUIRED_PACKAGES] -# [DESCRIPTION "Found packages:"] -# WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND -# | ENABLED_FEATURES | DISABLED_FEATURES) -# ) -# -# -# -# The FEATURE_SUMMARY() macro can be used to print information about -# enabled or disabled packages or features of a project. By default, -# only the names of the features/packages will be printed and their -# required version when one was specified. Use SET_PACKAGE_PROPERTIES() -# to add more useful information, like e.g. a download URL for the -# respective package or their purpose in the project. -# -# The WHAT option is the only mandatory option. Here you specify what -# information will be printed: -# -# ``ALL`` -# print everything -# ``ENABLED_FEATURES`` -# the list of all features which are enabled -# ``DISABLED_FEATURES`` -# the list of all features which are disabled -# ``PACKAGES_FOUND`` -# the list of all packages which have been found -# ``PACKAGES_NOT_FOUND`` -# the list of all packages which have not been found -# ``OPTIONAL_PACKAGES_FOUND`` -# only those packages which have been found which have the type OPTIONAL -# ``OPTIONAL_PACKAGES_NOT_FOUND`` -# only those packages which have not been found which have the type OPTIONAL -# ``RECOMMENDED_PACKAGES_FOUND`` -# only those packages which have been found which have the type RECOMMENDED -# ``RECOMMENDED_PACKAGES_NOT_FOUND`` -# only those packages which have not been found which have the type RECOMMENDED -# ``REQUIRED_PACKAGES_FOUND`` -# only those packages which have been found which have the type REQUIRED -# ``REQUIRED_PACKAGES_NOT_FOUND`` -# only those packages which have not been found which have the type REQUIRED -# ``RUNTIME_PACKAGES_FOUND`` -# only those packages which have been found which have the type RUNTIME -# ``RUNTIME_PACKAGES_NOT_FOUND`` -# only those packages which have not been found which have the type RUNTIME -# -# With the exception of the ``ALL`` value, these values can be combined -# in order to customize the output. For example: -# -# :: -# -# feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) -# -# -# -# If a FILENAME is given, the information is printed into this file. If -# APPEND is used, it is appended to this file, otherwise the file is -# overwritten if it already existed. If the VAR option is used, the -# information is "printed" into the specified variable. If FILENAME is -# not used, the information is printed to the terminal. Using the -# DESCRIPTION option a description or headline can be set which will be -# printed above the actual content. If INCLUDE_QUIET_PACKAGES is given, -# packages which have been searched with find_package(... QUIET) will -# also be listed. By default they are skipped. If -# FATAL_ON_MISSING_REQUIRED_PACKAGES is given, CMake will abort if a -# package which is marked as REQUIRED has not been found. -# -# Example 1, append everything to a file: -# -# :: -# -# feature_summary(WHAT ALL -# FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND) -# -# -# -# Example 2, print the enabled features into the variable -# enabledFeaturesText, including QUIET packages: -# -# :: -# -# feature_summary(WHAT ENABLED_FEATURES -# INCLUDE_QUIET_PACKAGES -# DESCRIPTION "Enabled Features:" -# VAR enabledFeaturesText) -# message(STATUS "${enabledFeaturesText}") -# -# -# -# -# -# :: -# -# SET_PACKAGE_PROPERTIES( PROPERTIES -# [ URL ] -# [ DESCRIPTION ] -# [ TYPE (RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED) ] -# [ PURPOSE ] -# ) -# -# -# -# Use this macro to set up information about the named package, which -# can then be displayed via FEATURE_SUMMARY(). This can be done either -# directly in the Find-module or in the project which uses the module -# after the find_package() call. The features for which information can -# be set are added automatically by the find_package() command. -# -# URL: this should be the homepage of the package, or something similar. -# Ideally this is set already directly in the Find-module. -# -# DESCRIPTION: A short description what that package is, at most one -# sentence. Ideally this is set already directly in the Find-module. -# -# TYPE: What type of dependency has the using project on that package. -# Default is OPTIONAL. In this case it is a package which can be used -# by the project when available at buildtime, but it also work without. -# RECOMMENDED is similar to OPTIONAL, i.e. the project will build if -# the package is not present, but the functionality of the resulting -# binaries will be severly limited. If a REQUIRED package is not -# available at buildtime, the project may not even build. This can be -# combined with the FATAL_ON_MISSING_REQUIRED_PACKAGES argument for -# feature_summary(). Last, a RUNTIME package is a package which is -# actually not used at all during the build, but which is required for -# actually running the resulting binaries. So if such a package is -# missing, the project can still be built, but it may not work later on. -# If set_package_properties() is called multiple times for the same -# package with different TYPEs, the TYPE is only changed to higher TYPEs -# ( RUNTIME < OPTIONAL < RECOMMENDED < REQUIRED ), lower TYPEs are -# ignored. The TYPE property is project-specific, so it cannot be set -# by the Find-module, but must be set in the project. -# -# PURPOSE: This describes which features this package enables in the -# project, i.e. it tells the user what functionality he gets in the -# resulting binaries. If set_package_properties() is called multiple -# times for a package, all PURPOSE properties are appended to a list of -# purposes of the package in the project. As the TYPE property, also -# the PURPOSE property is project-specific, so it cannot be set by the -# Find-module, but must be set in the project. -# -# -# -# Example for setting the info for a package: -# -# :: -# -# find_package(LibXml2) -# set_package_properties(LibXml2 PROPERTIES -# DESCRIPTION "A XML processing library." -# URL "http://xmlsoft.org/") -# -# -# -# :: -# -# set_package_properties(LibXml2 PROPERTIES -# TYPE RECOMMENDED -# PURPOSE "Enables HTML-import in MyWordProcessor") -# ... -# set_package_properties(LibXml2 PROPERTIES -# TYPE OPTIONAL -# PURPOSE "Enables odt-export in MyWordProcessor") -# -# -# -# :: -# -# find_package(DBUS) -# set_package_properties(DBUS PROPERTIES -# TYPE RUNTIME -# PURPOSE "Necessary to disable the screensaver during a presentation" ) -# -# -# -# :: -# -# ADD_FEATURE_INFO( ) -# -# Use this macro to add information about a feature with the given -# . contains whether this feature is enabled or not, -# is a text describing the feature. The information can -# be displayed using feature_summary() for ENABLED_FEATURES and -# DISABLED_FEATURES respectively. -# -# Example for setting the info for a feature: -# -# :: -# -# option(WITH_FOO "Help for foo" ON) -# add_feature_info(Foo WITH_FOO "The Foo feature provides very cool stuff.") -# -# -# -# -# -# The following macros are provided for compatibility with previous -# CMake versions: -# -# :: -# -# SET_PACKAGE_INFO( [ [] ] ) -# -# Use this macro to set up information about the named package, which -# can then be displayed via FEATURE_SUMMARY(). This can be done either -# directly in the Find-module or in the project which uses the module -# after the find_package() call. The features for which information can -# be set are added automatically by the find_package() command. -# -# :: -# -# PRINT_ENABLED_FEATURES() -# -# Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION -# "Enabled features:") -# -# :: -# -# PRINT_DISABLED_FEATURES() -# -# Does the same as FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION -# "Disabled features:") -# -# :: -# -# SET_FEATURE_INFO( [] ) -# -# Does the same as SET_PACKAGE_INFO( ) +#[=======================================================================[.rst: +FeatureSummary +-------------- + +Macros for generating a summary of enabled/disabled features + + + +This module provides the macros feature_summary(), +set_package_properties() and add_feature_info(). For compatibility it +also still provides set_package_info(), set_feature_info(), +print_enabled_features() and print_disabled_features(). + +These macros can be used to generate a summary of enabled and disabled +packages and/or feature for a build tree: + +:: + + -- The following OPTIONAL packages have been found: + LibXml2 (required version >= 2.4), XML processing lib, + * Enables HTML-import in MyWordProcessor + * Enables odt-export in MyWordProcessor + PNG , A PNG image library. , + * Enables saving screenshots + -- The following OPTIONAL packages have not been found: + Lua51 , The Lua scripting language. , + * Enables macros in MyWordProcessor + Foo , Foo provides cool stuff. + + + + + +:: + + FEATURE_SUMMARY( [FILENAME ] + [APPEND] + [VAR ] + [INCLUDE_QUIET_PACKAGES] + [FATAL_ON_MISSING_REQUIRED_PACKAGES] + [DESCRIPTION "Found packages:"] + WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND + | ENABLED_FEATURES | DISABLED_FEATURES) + ) + + + +The FEATURE_SUMMARY() macro can be used to print information about +enabled or disabled packages or features of a project. By default, +only the names of the features/packages will be printed and their +required version when one was specified. Use SET_PACKAGE_PROPERTIES() +to add more useful information, like e.g. a download URL for the +respective package or their purpose in the project. + +The WHAT option is the only mandatory option. Here you specify what +information will be printed: + +``ALL`` + print everything +``ENABLED_FEATURES`` + the list of all features which are enabled +``DISABLED_FEATURES`` + the list of all features which are disabled +``PACKAGES_FOUND`` + the list of all packages which have been found +``PACKAGES_NOT_FOUND`` + the list of all packages which have not been found +``OPTIONAL_PACKAGES_FOUND`` + only those packages which have been found which have the type OPTIONAL +``OPTIONAL_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type OPTIONAL +``RECOMMENDED_PACKAGES_FOUND`` + only those packages which have been found which have the type RECOMMENDED +``RECOMMENDED_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type RECOMMENDED +``REQUIRED_PACKAGES_FOUND`` + only those packages which have been found which have the type REQUIRED +``REQUIRED_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type REQUIRED +``RUNTIME_PACKAGES_FOUND`` + only those packages which have been found which have the type RUNTIME +``RUNTIME_PACKAGES_NOT_FOUND`` + only those packages which have not been found which have the type RUNTIME + +With the exception of the ``ALL`` value, these values can be combined +in order to customize the output. For example: + +:: + + feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) + + + +If a FILENAME is given, the information is printed into this file. If +APPEND is used, it is appended to this file, otherwise the file is +overwritten if it already existed. If the VAR option is used, the +information is "printed" into the specified variable. If FILENAME is +not used, the information is printed to the terminal. Using the +DESCRIPTION option a description or headline can be set which will be +printed above the actual content. If INCLUDE_QUIET_PACKAGES is given, +packages which have been searched with find_package(... QUIET) will +also be listed. By default they are skipped. If +FATAL_ON_MISSING_REQUIRED_PACKAGES is given, CMake will abort if a +package which is marked as REQUIRED has not been found. + +Example 1, append everything to a file: + +:: + + feature_summary(WHAT ALL + FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND) + + + +Example 2, print the enabled features into the variable +enabledFeaturesText, including QUIET packages: + +:: + + feature_summary(WHAT ENABLED_FEATURES + INCLUDE_QUIET_PACKAGES + DESCRIPTION "Enabled Features:" + VAR enabledFeaturesText) + message(STATUS "${enabledFeaturesText}") + + + + + +:: + + SET_PACKAGE_PROPERTIES( PROPERTIES + [ URL ] + [ DESCRIPTION ] + [ TYPE (RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED) ] + [ PURPOSE ] + ) + + + +Use this macro to set up information about the named package, which +can then be displayed via FEATURE_SUMMARY(). This can be done either +directly in the Find-module or in the project which uses the module +after the find_package() call. The features for which information can +be set are added automatically by the find_package() command. + +URL: this should be the homepage of the package, or something similar. +Ideally this is set already directly in the Find-module. + +DESCRIPTION: A short description what that package is, at most one +sentence. Ideally this is set already directly in the Find-module. + +TYPE: What type of dependency has the using project on that package. +Default is OPTIONAL. In this case it is a package which can be used +by the project when available at buildtime, but it also work without. +RECOMMENDED is similar to OPTIONAL, i.e. the project will build if +the package is not present, but the functionality of the resulting +binaries will be severly limited. If a REQUIRED package is not +available at buildtime, the project may not even build. This can be +combined with the FATAL_ON_MISSING_REQUIRED_PACKAGES argument for +feature_summary(). Last, a RUNTIME package is a package which is +actually not used at all during the build, but which is required for +actually running the resulting binaries. So if such a package is +missing, the project can still be built, but it may not work later on. +If set_package_properties() is called multiple times for the same +package with different TYPEs, the TYPE is only changed to higher TYPEs +( RUNTIME < OPTIONAL < RECOMMENDED < REQUIRED ), lower TYPEs are +ignored. The TYPE property is project-specific, so it cannot be set +by the Find-module, but must be set in the project. + +PURPOSE: This describes which features this package enables in the +project, i.e. it tells the user what functionality he gets in the +resulting binaries. If set_package_properties() is called multiple +times for a package, all PURPOSE properties are appended to a list of +purposes of the package in the project. As the TYPE property, also +the PURPOSE property is project-specific, so it cannot be set by the +Find-module, but must be set in the project. + + + +Example for setting the info for a package: + +:: + + find_package(LibXml2) + set_package_properties(LibXml2 PROPERTIES + DESCRIPTION "A XML processing library." + URL "http://xmlsoft.org/") + + + +:: + + set_package_properties(LibXml2 PROPERTIES + TYPE RECOMMENDED + PURPOSE "Enables HTML-import in MyWordProcessor") + ... + set_package_properties(LibXml2 PROPERTIES + TYPE OPTIONAL + PURPOSE "Enables odt-export in MyWordProcessor") + + + +:: + + find_package(DBUS) + set_package_properties(DBUS PROPERTIES + TYPE RUNTIME + PURPOSE "Necessary to disable the screensaver during a presentation" ) + + + +:: + + ADD_FEATURE_INFO( ) + +Use this macro to add information about a feature with the given +. contains whether this feature is enabled or not, + is a text describing the feature. The information can +be displayed using feature_summary() for ENABLED_FEATURES and +DISABLED_FEATURES respectively. + +Example for setting the info for a feature: + +:: + + option(WITH_FOO "Help for foo" ON) + add_feature_info(Foo WITH_FOO "The Foo feature provides very cool stuff.") + + + + + +The following macros are provided for compatibility with previous +CMake versions: + +:: + + SET_PACKAGE_INFO( [ [] ] ) + +Use this macro to set up information about the named package, which +can then be displayed via FEATURE_SUMMARY(). This can be done either +directly in the Find-module or in the project which uses the module +after the find_package() call. The features for which information can +be set are added automatically by the find_package() command. + +:: + + PRINT_ENABLED_FEATURES() + +Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION +"Enabled features:") + +:: + + PRINT_DISABLED_FEATURES() + +Does the same as FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION +"Disabled features:") + +:: + + SET_FEATURE_INFO( [] ) + +Does the same as SET_PACKAGE_INFO( ) +#]=======================================================================] #============================================================================= # Copyright 2007-2015 Kitware, Inc. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c92c84302827b33ea47f7fb6ca5b2ff98451d44 commit 7c92c84302827b33ea47f7fb6ca5b2ff98451d44 Author: Brad King AuthorDate: Thu Sep 15 09:48:31 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 09:49:03 2016 -0400 FeatureSummary: Order function implementations the same as the documentation diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 764a5f7..3e7ecfd 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -280,83 +280,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake") -function(ADD_FEATURE_INFO _name _enabled _desc) - if (${_enabled}) - set_property(GLOBAL APPEND PROPERTY ENABLED_FEATURES "${_name}") - else () - set_property(GLOBAL APPEND PROPERTY DISABLED_FEATURES "${_name}") - endif () - - set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" ) -endfunction() - - - -function(SET_PACKAGE_PROPERTIES _name _props) - if(NOT "${_props}" STREQUAL "PROPERTIES") - message(FATAL_ERROR "PROPERTIES keyword is missing in SET_PACKAGE_PROPERTIES() call.") - endif() - - set(options ) # none - set(oneValueArgs DESCRIPTION URL TYPE PURPOSE ) - set(multiValueArgs ) # none - - CMAKE_PARSE_ARGUMENTS(_SPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(_SPP_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown keywords given to SET_PACKAGE_PROPERTIES(): \"${_SPP_UNPARSED_ARGUMENTS}\"") - endif() - - if(_SPP_DESCRIPTION) - get_property(_info GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION) - if(_info AND NOT "${_info}" STREQUAL "${_SPP_DESCRIPTION}") - message(STATUS "Warning: Property DESCRIPTION for package ${_name} already set to \"${_info}\", overriding it with \"${_SPP_DESCRIPTION}\"") - endif() - - set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_SPP_DESCRIPTION}" ) - endif() - - - if(_SPP_URL) - get_property(_info GLOBAL PROPERTY _CMAKE_${_name}_URL) - if(_info AND NOT "${_info}" STREQUAL "${_SPP_URL}") - message(STATUS "Warning: Property URL already set to \"${_info}\", overriding it with \"${_SPP_URL}\"") - endif() - - set_property(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_SPP_URL}" ) - endif() - - - # handle the PURPOSE: use APPEND, since there can be multiple purposes for one package inside a project - if(_SPP_PURPOSE) - set_property(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_SPP_PURPOSE}" ) - endif() - - # handle the TYPE - if(NOT _SPP_TYPE) - set(_SPP_TYPE OPTIONAL) - endif() - - # List the supported types, according to their priority - set(validTypes "RUNTIME" "OPTIONAL" "RECOMMENDED" "REQUIRED" ) - list(FIND validTypes ${_SPP_TYPE} _typeIndexInList) - if("${_typeIndexInList}" STREQUAL "-1" ) - message(FATAL_ERROR "Bad package property type ${_SPP_TYPE} used in SET_PACKAGE_PROPERTIES(). " - "Valid types are OPTIONAL, RECOMMENDED, REQUIRED and RUNTIME." ) - endif() - - get_property(_previousType GLOBAL PROPERTY _CMAKE_${_name}_TYPE) - list(FIND validTypes "${_previousType}" _prevTypeIndexInList) - - # make sure a previously set TYPE is not overridden with a lower new TYPE: - if("${_typeIndexInList}" GREATER "${_prevTypeIndexInList}") - set_property(GLOBAL PROPERTY _CMAKE_${_name}_TYPE "${_SPP_TYPE}" ) - endif() - -endfunction() - - - function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet) set(_type "ANY") @@ -558,6 +481,79 @@ function(FEATURE_SUMMARY) endfunction() +function(SET_PACKAGE_PROPERTIES _name _props) + if(NOT "${_props}" STREQUAL "PROPERTIES") + message(FATAL_ERROR "PROPERTIES keyword is missing in SET_PACKAGE_PROPERTIES() call.") + endif() + + set(options ) # none + set(oneValueArgs DESCRIPTION URL TYPE PURPOSE ) + set(multiValueArgs ) # none + + CMAKE_PARSE_ARGUMENTS(_SPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(_SPP_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to SET_PACKAGE_PROPERTIES(): \"${_SPP_UNPARSED_ARGUMENTS}\"") + endif() + + if(_SPP_DESCRIPTION) + get_property(_info GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION) + if(_info AND NOT "${_info}" STREQUAL "${_SPP_DESCRIPTION}") + message(STATUS "Warning: Property DESCRIPTION for package ${_name} already set to \"${_info}\", overriding it with \"${_SPP_DESCRIPTION}\"") + endif() + + set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_SPP_DESCRIPTION}" ) + endif() + + + if(_SPP_URL) + get_property(_info GLOBAL PROPERTY _CMAKE_${_name}_URL) + if(_info AND NOT "${_info}" STREQUAL "${_SPP_URL}") + message(STATUS "Warning: Property URL already set to \"${_info}\", overriding it with \"${_SPP_URL}\"") + endif() + + set_property(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_SPP_URL}" ) + endif() + + + # handle the PURPOSE: use APPEND, since there can be multiple purposes for one package inside a project + if(_SPP_PURPOSE) + set_property(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_SPP_PURPOSE}" ) + endif() + + # handle the TYPE + if(NOT _SPP_TYPE) + set(_SPP_TYPE OPTIONAL) + endif() + + # List the supported types, according to their priority + set(validTypes "RUNTIME" "OPTIONAL" "RECOMMENDED" "REQUIRED" ) + list(FIND validTypes ${_SPP_TYPE} _typeIndexInList) + if("${_typeIndexInList}" STREQUAL "-1" ) + message(FATAL_ERROR "Bad package property type ${_SPP_TYPE} used in SET_PACKAGE_PROPERTIES(). " + "Valid types are OPTIONAL, RECOMMENDED, REQUIRED and RUNTIME." ) + endif() + + get_property(_previousType GLOBAL PROPERTY _CMAKE_${_name}_TYPE) + list(FIND validTypes "${_previousType}" _prevTypeIndexInList) + + # make sure a previously set TYPE is not overridden with a lower new TYPE: + if("${_typeIndexInList}" GREATER "${_prevTypeIndexInList}") + set_property(GLOBAL PROPERTY _CMAKE_${_name}_TYPE "${_SPP_TYPE}" ) + endif() + +endfunction() + +function(ADD_FEATURE_INFO _name _enabled _desc) + if (${_enabled}) + set_property(GLOBAL APPEND PROPERTY ENABLED_FEATURES "${_name}") + else () + set_property(GLOBAL APPEND PROPERTY DISABLED_FEATURES "${_name}") + endif () + + set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" ) +endfunction() + # The stuff below is only kept for compatibility ----------------------------------------------------------------------- Summary of changes: Modules/FeatureSummary.cmake | 677 +++++++++++++++++++++--------------------- 1 file changed, 335 insertions(+), 342 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 11:46:52 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 11:46:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2075-g81ff6a8 Message-ID: <20160915154652.ABB2FF3B74@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, next has been updated via 81ff6a86c9eead0a376b71947f9d7323d886fc26 (commit) via a788cf309257ee0a9cd8cdd1ed5d4665d34a9580 (commit) from a1f57bd4f9a0dd918ca46279dfb3ea03cf0437ee (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=81ff6a86c9eead0a376b71947f9d7323d886fc26 commit 81ff6a86c9eead0a376b71947f9d7323d886fc26 Merge: a1f57bd a788cf3 Author: Brad King AuthorDate: Thu Sep 15 11:46:51 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 11:46:51 2016 -0400 Merge topic 'file-LOCK-lowercase-test' into next a788cf30 Tests: Add case for file(LOCK) with lower-cased path https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a788cf309257ee0a9cd8cdd1ed5d4665d34a9580 commit a788cf309257ee0a9cd8cdd1ed5d4665d34a9580 Author: Ruslan Baratov AuthorDate: Thu Sep 15 16:42:20 2016 +0300 Commit: Brad King CommitDate: Thu Sep 15 11:44:28 2016 -0400 Tests: Add case for file(LOCK) with lower-cased path The KWSys update in commit d28e4467 (KWSys 2016-09-14 (c4049689)) fixed this case, so add it to the test suite. Closes: #16295 diff --git a/Tests/RunCMake/file/LOCK-lowercase.cmake b/Tests/RunCMake/file/LOCK-lowercase.cmake new file mode 100644 index 0000000..373afda --- /dev/null +++ b/Tests/RunCMake/file/LOCK-lowercase.cmake @@ -0,0 +1,11 @@ +set(lock "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock") + +if(WIN32) + string(TOLOWER ${lock} lock) +endif() + +file(LOCK ${lock} TIMEOUT 0) +file(LOCK ${lock} RELEASE) + +file(LOCK ${lock} TIMEOUT 0) +file(LOCK ${lock} RELEASE) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index d8e9ce0..799a27c 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -22,6 +22,7 @@ run_cmake(LOCK-error-no-result-variable) run_cmake(LOCK-error-no-timeout) run_cmake(LOCK-error-timeout) run_cmake(LOCK-error-unknown-option) +run_cmake(LOCK-lowercase) run_cmake(GLOB) run_cmake(GLOB_RECURSE) # test is valid both for GLOB and GLOB_RECURSE ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/file/LOCK-lowercase.cmake | 11 +++++++++++ Tests/RunCMake/file/RunCMakeTest.cmake | 1 + 2 files changed, 12 insertions(+) create mode 100644 Tests/RunCMake/file/LOCK-lowercase.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 11:51:28 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 11:51:28 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2077-ge2c31db Message-ID: <20160915155128.9596AF5951@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, next has been updated via e2c31db68b79b9e2f4724f4fa776a872eed21f42 (commit) via e1ca117332fbf6adf3a467a420804e9cb1891582 (commit) from 81ff6a86c9eead0a376b71947f9d7323d886fc26 (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=e2c31db68b79b9e2f4724f4fa776a872eed21f42 commit e2c31db68b79b9e2f4724f4fa776a872eed21f42 Merge: 81ff6a8 e1ca117 Author: Brad King AuthorDate: Thu Sep 15 11:51:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 11:51:27 2016 -0400 Merge topic 'ExternalProject-http-credentials' into next e1ca1173 ExternalProject: Add HTTP_{USERNAME,PASSWORD} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1ca117332fbf6adf3a467a420804e9cb1891582 commit e1ca117332fbf6adf3a467a420804e9cb1891582 Author: Ruslan Baratov AuthorDate: Thu Sep 15 07:52:54 2016 +0300 Commit: Ruslan Baratov CommitDate: Thu Sep 15 07:52:54 2016 +0300 ExternalProject: Add HTTP_{USERNAME,PASSWORD} diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index 715676d..53681a9 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -44,7 +44,7 @@ syn keyword cmakeModule \ contained syn keyword cmakeKWExternalProject - \ ALGO ALWAYS BINARY_DIR BUILD_ALWAYS BUILD_BYPRODUCTS BUILD_COMMAND BUILD_IN_SOURCE BYPRODUCTS CMAKE_ARGS CMAKE_CACHE_ARGS CMAKE_CACHE_DEFAULT_ARGS COMMAND COMMENT CONFIGURE_COMMAND CVS CVSROOT CVS_ CVS_MODULE CVS_REPOSITORY CVS_TAG DEPENDEES DEPENDERS DEPENDS DIRECTORY DOWNLOAD_COMMAND DOWNLOAD_DIR DOWNLOAD_NAME DOWNLOAD_NO_PROGRESS EP_BASE EP_INDEPENDENT_STEP_TARGETS EP_PREFIX EP_STEP_TARGETS EP_UPDATE_DISCONNECTED EXCLUDE_FROM_ALL EXCLUDE_FROM_MAIN FORCE GIT_REMOTE_NAME GIT_REPOSITORY GIT_SUBMODULES GIT_TAG HG_REPOSITORY HG_TAG INDEPENDENT INDEPENDENT_STEP_TARGETS INSTALL_COMMAND INSTALL_DIR JOB_POOLS LIST_SEPARATOR LOG LOG_BUILD LOG_CONFIGURE LOG_DOWNLOAD LOG_INSTALL LOG_TEST LOG_UPDATE NO_DEPENDS PATCH_COMMAND PREFIX PROPERTY SOURCE_DIR STAMP_DIR STEP_TARGETS SVN_ SVN_PASSWORD SVN_REPOSITORY SVN_REVISION SVN_TRUST_CERT SVN_USERNAME TEST_AFTER_INSTALL TEST_BEFORE_INSTALL TEST_COMMAND TEST_EXCLUDE_FROM_MAIN TIMEOUT TLS_CAINFO TLS_VERIFY TMP_DIR UPDATE_COMMAND UPDATE_DISCONNECTED URL URL_HASH USES_TERMINAL USES_TERMINAL_BUILD USES_TERMINAL_CONFIGURE USES_TERMINAL_DOWNLOAD USES_TERMINAL_INSTALL USES_TERMINAL_TEST USES_TERMINAL_UPDATE WORKING_DIRECTORY _COMMAND _DIR + \ ALGO ALWAYS BINARY_DIR BUILD_ALWAYS BUILD_BYPRODUCTS BUILD_COMMAND BUILD_IN_SOURCE BYPRODUCTS CMAKE_ARGS CMAKE_CACHE_ARGS CMAKE_CACHE_DEFAULT_ARGS COMMAND COMMENT CONFIGURE_COMMAND CVS CVSROOT CVS_ CVS_MODULE CVS_REPOSITORY CVS_TAG DEPENDEES DEPENDERS DEPENDS DIRECTORY DOWNLOAD_COMMAND DOWNLOAD_DIR DOWNLOAD_NAME DOWNLOAD_NO_PROGRESS EP_BASE EP_INDEPENDENT_STEP_TARGETS EP_PREFIX EP_STEP_TARGETS EP_UPDATE_DISCONNECTED EXCLUDE_FROM_ALL EXCLUDE_FROM_MAIN FORCE GIT_REMOTE_NAME GIT_REPOSITORY GIT_SUBMODULES GIT_TAG HG_REPOSITORY HG_TAG INDEPENDENT INDEPENDENT_STEP_TARGETS INSTALL_COMMAND INSTALL_DIR JOB_POOLS LIST_SEPARATOR LOG LOG_BUILD LOG_CONFIGURE LOG_DOWNLOAD LOG_INSTALL LOG_TEST LOG_UPDATE NO_DEPENDS PATCH_COMMAND PREFIX PROPERTY SOURCE_DIR STAMP_DIR STEP_TARGETS SVN_ SVN_PASSWORD SVN_REPOSITORY SVN_REVISION SVN_TRUST_CERT SVN_USERNAME TEST_AFTER_INSTALL TEST_BEFORE_INSTALL TEST_COMMAND TEST_EXCLUDE_FROM_MAIN TIMEOUT TLS_CAINFO TLS_VERIFY TMP_DIR UPDATE_COMMAND UPDATE_DISCONNECTED URL URL_HASH HTTP_USERNAME HTTP_PASSWORD USES_TERMINAL USES_TERMINAL_BUILD USES_TERMINAL_CONFIGURE USES_TERMINAL_DOWNLOAD USES_TERMINAL_INSTALL USES_TERMINAL_TEST USES_TERMINAL_UPDATE WORKING_DIRECTORY _COMMAND _DIR \ contained syn keyword cmakeKWadd_compile_options diff --git a/Modules/ExternalProject-download.cmake.in b/Modules/ExternalProject-download.cmake.in index 91d74e0..0e82adb 100644 --- a/Modules/ExternalProject-download.cmake.in +++ b/Modules/ExternalProject-download.cmake.in @@ -135,6 +135,7 @@ foreach(i RANGE ${retry_number}) @TIMEOUT_ARGS@ STATUS status LOG log + @USERPWD_ARGS@ ) list(GET status 0 status_code) diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 5ea309f..31fa459 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -75,6 +75,10 @@ Create custom targets to build projects in external trees Hash of file at URL ``URL_MD5 md5`` Equivalent to URL_HASH MD5=md5 + ``HTTP_USERNAME `` + Username for download operation + ``HTTP_PASSWORD `` + Password for download operation ``TLS_VERIFY `` Should certificate for https be checked ``TLS_CAINFO `` @@ -858,7 +862,7 @@ endif() endfunction(_ep_write_gitupdate_script) -function(_ep_write_downloadfile_script script_filename REMOTE LOCAL timeout no_progress hash tls_verify tls_cainfo) +function(_ep_write_downloadfile_script script_filename REMOTE LOCAL timeout no_progress hash tls_verify tls_cainfo userpwd) if(timeout) set(TIMEOUT_ARGS TIMEOUT ${timeout}) set(TIMEOUT_MSG "${timeout} seconds") @@ -906,6 +910,12 @@ function(_ep_write_downloadfile_script script_filename REMOTE LOCAL timeout no_p set(TLS_CAINFO_CODE "set(CMAKE_TLS_CAINFO \"${tls_cainfo}\")") endif() + if(userpwd STREQUAL ":") + set(USERPWD_ARGS) + else() + set(USERPWD_ARGS USERPWD "${userpwd}") + endif() + # Used variables: # * TLS_VERIFY_CODE # * TLS_CAINFO_CODE @@ -916,6 +926,7 @@ function(_ep_write_downloadfile_script script_filename REMOTE LOCAL timeout no_p # * SHOW_PROGRESS # * TIMEOUT_ARGS # * TIMEOUT_MSG + # * USERPWD_ARGS configure_file( "${_ExternalProject_SELF_DIR}/ExternalProject-download.cmake.in" "${script_filename}" @@ -1919,8 +1930,10 @@ function(_ep_add_download_command name) get_property(no_progress TARGET ${name} PROPERTY _EP_DOWNLOAD_NO_PROGRESS) get_property(tls_verify TARGET ${name} PROPERTY _EP_TLS_VERIFY) get_property(tls_cainfo TARGET ${name} PROPERTY _EP_TLS_CAINFO) + get_property(http_username TARGET ${name} PROPERTY _EP_HTTP_USERNAME) + get_property(http_password TARGET ${name} PROPERTY _EP_HTTP_PASSWORD) set(download_script "${stamp_dir}/download-${name}.cmake") - _ep_write_downloadfile_script("${download_script}" "${url}" "${file}" "${timeout}" "${no_progress}" "${hash}" "${tls_verify}" "${tls_cainfo}") + _ep_write_downloadfile_script("${download_script}" "${url}" "${file}" "${timeout}" "${no_progress}" "${hash}" "${tls_verify}" "${tls_cainfo}" "${http_username}:${http_password}") set(cmd ${CMAKE_COMMAND} -P "${download_script}" COMMAND) if (no_extract) ----------------------------------------------------------------------- Summary of changes: Auxiliary/vim/syntax/cmake.vim | 2 +- Modules/ExternalProject-download.cmake.in | 1 + Modules/ExternalProject.cmake | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 11:54:06 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 11:54:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2079-gd1f74eb Message-ID: <20160915155406.6911AF5A54@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, next has been updated via d1f74eb70b945fcba223b7251dc9ff028bc4e5cb (commit) via 9cbd04be5fa86c2363c7c7f65b6a00969bc87d1d (commit) from e2c31db68b79b9e2f4724f4fa776a872eed21f42 (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=d1f74eb70b945fcba223b7251dc9ff028bc4e5cb commit d1f74eb70b945fcba223b7251dc9ff028bc4e5cb Merge: e2c31db 9cbd04b Author: Brad King AuthorDate: Thu Sep 15 11:54:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 11:54:05 2016 -0400 Merge topic 'ExternalProject-http-credentials' into next 9cbd04be Help: Add notes for topic 'ExternalProject-http-credentials' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cbd04be5fa86c2363c7c7f65b6a00969bc87d1d commit 9cbd04be5fa86c2363c7c7f65b6a00969bc87d1d Author: Brad King AuthorDate: Thu Sep 15 11:52:27 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 11:52:27 2016 -0400 Help: Add notes for topic 'ExternalProject-http-credentials' diff --git a/Help/release/dev/ExternalProject-http-credentials.rst b/Help/release/dev/ExternalProject-http-credentials.rst new file mode 100644 index 0000000..e3a362a --- /dev/null +++ b/Help/release/dev/ExternalProject-http-credentials.rst @@ -0,0 +1,5 @@ +ExternalProject-http-credentials +-------------------------------- + +* The :module:`ExternalProject` module gained ``HTTP_USERNAME`` and + ``HTTP_PASSWORD`` options to set http download credentials. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/ExternalProject-http-credentials.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Help/release/dev/ExternalProject-http-credentials.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 13:40:29 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 13:40:29 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2081-g726c80b Message-ID: <20160915174030.77008C20CA@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, next has been updated via 726c80b6cbfdc4652f23c8f335def15c70686d81 (commit) via 31be918b0b2dd445bdf85d72a8eaa29841137bc8 (commit) from d1f74eb70b945fcba223b7251dc9ff028bc4e5cb (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=726c80b6cbfdc4652f23c8f335def15c70686d81 commit 726c80b6cbfdc4652f23c8f335def15c70686d81 Merge: d1f74eb 31be918 Author: Brad King AuthorDate: Thu Sep 15 13:40:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 13:40:27 2016 -0400 Merge topic 'find_package-dir-sort' into next 31be918b find_package: Optionally sort globbed directories in a meaningful order https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31be918b0b2dd445bdf85d72a8eaa29841137bc8 commit 31be918b0b2dd445bdf85d72a8eaa29841137bc8 Author: Pierluigi Taddei AuthorDate: Thu Sep 8 20:26:59 2016 +0200 Commit: Brad King CommitDate: Thu Sep 15 13:35:25 2016 -0400 find_package: Optionally sort globbed directories in a meaningful order Add `CMAKE_FIND_PACKAGE_SORT_{ORDER,DIRECTION}` variables to specify sort order and direction. When multiple package with the same name have been found in the same location sorting option can be used to force a specific version to be loaded (e.g. libA_1.12.0 instead of libA_1.1.0). Currently sorting by NAME and by NATURAL order have been implemented. Natural ordering makes use of the `strverscmp(3)` ordering. diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst index c44fe86..2cb1e5f 100644 --- a/Help/command/find_package.rst +++ b/Help/command/find_package.rst @@ -170,11 +170,21 @@ is acceptable the following variables are set: ``_VERSION_COUNT`` number of version components, 0 to 4 -and the corresponding package configuration file is loaded. When -multiple package configuration files are available whose version files +and the corresponding package configuration file is loaded. +When multiple package configuration files are available whose version files claim compatibility with the version requested it is unspecified which -one is chosen. No attempt is made to choose a highest or closest -version number. +one is chosen: unless the variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` +is set no attempt is made to choose a highest or closest version number. + +To control the order in which ``find_package`` checks for compatibiliy use +the two variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` and +:variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`. +For instance in order to select the highest version one can set:: + + SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL) + SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC) + +before calling ``find_package``. Config mode provides an elaborate interface and search procedure. Much of the interface is provided for completeness and for use diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 74c9265..9e0efe9 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -38,6 +38,8 @@ Variables that Provide Information /variable/CMAKE_EXTRA_GENERATOR /variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES /variable/CMAKE_FIND_PACKAGE_NAME + /variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION + /variable/CMAKE_FIND_PACKAGE_SORT_ORDER /variable/CMAKE_GENERATOR /variable/CMAKE_GENERATOR_PLATFORM /variable/CMAKE_GENERATOR_TOOLSET diff --git a/Help/release/dev/find_package-dir-sort.rst b/Help/release/dev/find_package-dir-sort.rst new file mode 100644 index 0000000..67b93eb --- /dev/null +++ b/Help/release/dev/find_package-dir-sort.rst @@ -0,0 +1,13 @@ +find_package-dir-sort +--------------------- + +* The :command:`find_package` command gained the possibility of + sorting compatible libraries by ``NAME`` or by ``NATURAL`` sorting by + setting the two new variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` + and :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`. + +* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` was added to control + the sorting mode of the :command:`find_package` command. + +* Variable :variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION` was added to control + the sorting direction the :command:`find_package` command. diff --git a/Help/variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst b/Help/variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst new file mode 100644 index 0000000..99e4ec1 --- /dev/null +++ b/Help/variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst @@ -0,0 +1,16 @@ +CMAKE_FIND_PACKAGE_SORT_DIRECTION +--------------------------------- + +The sorting direction used by :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER`. +It can assume one of the following values: + +``DEC`` + Default. Ordering is done in descending mode. + The highest folder found will be tested first. + +``ASC`` + Ordering is done in ascending mode. + The lowest folder found will be tested first. + +If :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` is not set or is set to ``NONE`` +this variable has no effect. diff --git a/Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst b/Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst new file mode 100644 index 0000000..ba5f3a8 --- /dev/null +++ b/Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst @@ -0,0 +1,36 @@ +CMAKE_FIND_PACKAGE_SORT_ORDER +----------------------------- + +The default order for sorting packages found using :command:`find_package`. +It can assume one of the following values: + +``NONE`` + Default. No attempt is done to sort packages. + The first valid package found will be selected. + +``NAME`` + Sort packages lexicographically before selecting one. + +``NATURAL`` + Sort packages using natural order (see ``strverscmp(3)`` manual), + i.e. such that contiguous digits are compared as whole numbers. + +Natural sorting can be employed to return the highest version when multiple +versions of the same library are found by :command:`find_package`. For +example suppose that the following libraries have been found: + +* libX-1.1.0 +* libX-1.2.9 +* libX-1.2.10 + +By setting ``NATURAL`` order we can select the one with the highest +version number ``libX-1.2.10``. + +.. code-block:: cmake + + set(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL) + find_package(libX CONFIG) + +The sort direction can be controlled using the +:variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION` variable +(by default decrescent, e.g. lib-B will be tested before lib-A). diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 8338c2a..72b5320 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -12,6 +12,7 @@ #include "cmFindPackageCommand.h" #include "cmAlgorithms.h" +#include #include #include #include @@ -33,6 +34,45 @@ cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::Builds( cmFindPackageCommand::PathLabel cmFindPackageCommand::PathLabel::SystemRegistry("SYSTEM_PACKAGE_REGISTRY"); +struct StrverscmpGreater +{ + bool operator()(const std::string& lhs, const std::string& rhs) const + { + return cmSystemTools::strverscmp(lhs, rhs) > 0; + } +}; + +struct StrverscmpLesser +{ + bool operator()(const std::string& lhs, const std::string& rhs) const + { + return cmSystemTools::strverscmp(lhs, rhs) < 0; + } +}; + +void cmFindPackageCommand::Sort(std::vector::iterator begin, + std::vector::iterator end, + SortOrderType order, SortDirectionType dir) +{ + if (order == Name_order) { + if (dir == Dec) { + std::sort(begin, end, std::greater()); + } else { + std::sort(begin, end); + } + } else if (order == Natural) + // natural order uses letters and numbers (contiguous numbers digit are + // compared such that e.g. 000 00 < 01 < 010 < 09 < 0 < 1 < 9 < 10 + { + if (dir == Dec) { + std::sort(begin, end, StrverscmpGreater()); + } else { + std::sort(begin, end, StrverscmpLesser()); + } + } + // else do not sort +} + cmFindPackageCommand::cmFindPackageCommand() { this->CMakePathName = "PACKAGE"; @@ -58,7 +98,8 @@ cmFindPackageCommand::cmFindPackageCommand() this->VersionFoundTweak = 0; this->VersionFoundCount = 0; this->RequiredCMakeVersion = 0; - + this->SortOrder = None; + this->SortDirection = Asc; this->AppendSearchPathGroups(); } @@ -135,6 +176,23 @@ bool cmFindPackageCommand::InitialPass(std::vector const& args, this->NoSystemRegistry = true; } + // Check if Sorting should be enabled + if (const char* so = + this->Makefile->GetDefinition("CMAKE_FIND_PACKAGE_SORT_ORDER")) { + + if (strcmp(so, "NAME") == 0) { + this->SortOrder = Name_order; + } else if (strcmp(so, "NATURAL") == 0) { + this->SortOrder = Natural; + } else { + this->SortOrder = None; + } + } + if (const char* sd = + this->Makefile->GetDefinition("CMAKE_FIND_PACKAGE_SORT_DIRECTION")) { + this->SortDirection = strcmp(sd, "ASC") == 0 ? Asc : Dec; + } + // Find the current root path mode. this->SelectDefaultRootPathMode(); @@ -1666,17 +1724,33 @@ private: class cmFileListGeneratorProject : public cmFileListGeneratorBase { public: - cmFileListGeneratorProject(std::vector const& names) + cmFileListGeneratorProject(std::vector const& names, + cmFindPackageCommand::SortOrderType so, + cmFindPackageCommand::SortDirectionType sd) : cmFileListGeneratorBase() , Names(names) { + this->SetSort(so, sd); } cmFileListGeneratorProject(cmFileListGeneratorProject const& r) : cmFileListGeneratorBase() , Names(r.Names) { + this->SetSort(r.SortOrder, r.SortDirection); + } + + void SetSort(cmFindPackageCommand::SortOrderType o, + cmFindPackageCommand::SortDirectionType d) + { + SortOrder = o; + SortDirection = d; } +protected: + // sort parameters + cmFindPackageCommand::SortOrderType SortOrder; + cmFindPackageCommand::SortDirectionType SortDirection; + private: std::vector const& Names; bool Search(std::string const& parent, cmFileList& lister) CM_OVERRIDE @@ -1698,6 +1772,13 @@ private: } } + // before testing the matches check if there is a specific sorting order to + // perform + if (this->SortOrder != cmFindPackageCommand::None) { + cmFindPackageCommand::Sort(matches.begin(), matches.end(), SortOrder, + SortDirection); + } + for (std::vector::const_iterator i = matches.begin(); i != matches.end(); ++i) { if (this->Consider(parent + *i, lister)) { @@ -1895,7 +1976,8 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) { cmFindPackageFileList lister(this); lister / cmFileListGeneratorFixed(prefix) / - cmFileListGeneratorProject(this->Names); + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection); if (lister.Search()) { return true; } @@ -1905,7 +1987,8 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) { cmFindPackageFileList lister(this); lister / cmFileListGeneratorFixed(prefix) / - cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection) / cmFileListGeneratorCaseInsensitive("cmake"); if (lister.Search()) { return true; @@ -1932,7 +2015,8 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) lister / cmFileListGeneratorFixed(prefix) / cmFileListGeneratorEnumerate(common) / cmFileListGeneratorFixed("cmake") / - cmFileListGeneratorProject(this->Names); + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection); if (lister.Search()) { return true; } @@ -1943,7 +2027,8 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) cmFindPackageFileList lister(this); lister / cmFileListGeneratorFixed(prefix) / cmFileListGeneratorEnumerate(common) / - cmFileListGeneratorProject(this->Names); + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection); if (lister.Search()) { return true; } @@ -1954,7 +2039,8 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) cmFindPackageFileList lister(this); lister / cmFileListGeneratorFixed(prefix) / cmFileListGeneratorEnumerate(common) / - cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection) / cmFileListGeneratorCaseInsensitive("cmake"); if (lister.Search()) { return true; @@ -1965,10 +2051,12 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) { cmFindPackageFileList lister(this); lister / cmFileListGeneratorFixed(prefix) / - cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection) / cmFileListGeneratorEnumerate(common) / cmFileListGeneratorFixed("cmake") / - cmFileListGeneratorProject(this->Names); + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection); if (lister.Search()) { return true; } @@ -1978,9 +2066,11 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) { cmFindPackageFileList lister(this); lister / cmFileListGeneratorFixed(prefix) / - cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection) / cmFileListGeneratorEnumerate(common) / - cmFileListGeneratorProject(this->Names); + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection); if (lister.Search()) { return true; } @@ -1990,9 +2080,11 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) { cmFindPackageFileList lister(this); lister / cmFileListGeneratorFixed(prefix) / - cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection) / cmFileListGeneratorEnumerate(common) / - cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorProject(this->Names, this->SortOrder, + this->SortDirection) / cmFileListGeneratorCaseInsensitive("cmake"); if (lister.Search()) { return true; diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 087107e..babdd5a 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -24,6 +24,27 @@ class cmFindPackageFileList; class cmFindPackageCommand : public cmFindCommon { public: + /*! A sorting order strategy to be applied to recovered package folders (see + * FIND_PACKAGE_SORT_ORDER)*/ + enum /*class*/ SortOrderType + { + None, + Name_order, + Natural + }; + /*! A sorting direction to be applied to recovered package folders (see + * FIND_PACKAGE_SORT_DIRECTION)*/ + enum /*class*/ SortDirectionType + { + Asc, + Dec + }; + + /*! sorts a given list of string based on the input sort parameters */ + static void Sort(std::vector::iterator begin, + std::vector::iterator end, SortOrderType order, + SortDirectionType dir); + cmFindPackageCommand(); /** @@ -156,6 +177,11 @@ private: std::vector Configs; std::set IgnoredPaths; + /*! the selected sortOrder (None by default)*/ + SortOrderType SortOrder; + /*! the selected sortDirection (Asc by default)*/ + SortDirectionType SortDirection; + struct ConfigFileInfo { std::string filename; diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 7ef3c03..405917a 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -11,6 +11,7 @@ set(CMakeLib_TESTS testUTF8 testXMLParser testXMLSafe + testFindPackageCommand ) set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/CMakeLib/testFindPackageCommand.cxx b/Tests/CMakeLib/testFindPackageCommand.cxx new file mode 100644 index 0000000..1cddb0e --- /dev/null +++ b/Tests/CMakeLib/testFindPackageCommand.cxx @@ -0,0 +1,76 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2011 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "cmFindPackageCommand.h" + +#include +#include + +#define cmPassed(m) std::cout << "Passed: " << (m) << "\n" +#define cmFailed(m) \ + std::cout << "FAILED: " << (m) << "\n"; \ + failed = 1 + +int testFindPackageCommand(int /*unused*/, char* /*unused*/ []) +{ + int failed = 0; + + // ---------------------------------------------------------------------- + // Test cmFindPackage::Sort + std::vector testString; + testString.push_back("lib-0.0"); + testString.push_back("lib-1.2"); + testString.push_back("lib-2.0"); + testString.push_back("lib-19.0.1"); + testString.push_back("lib-20.01.1"); + testString.push_back("lib-20.2.2a"); + + cmFindPackageCommand::Sort(testString.begin(), testString.end(), + cmFindPackageCommand::Natural, + cmFindPackageCommand::Asc); + if (!(testString[0] == "lib-0.0" && testString[1] == "lib-1.2" && + testString[2] == "lib-2.0" && testString[3] == "lib-19.0.1" && + testString[4] == "lib-20.01.1" && testString[5] == "lib-20.2.2a")) { + cmFailed("cmSystemTools::Sort fail with Natural ASC"); + } + + cmFindPackageCommand::Sort(testString.begin(), testString.end(), + cmFindPackageCommand::Natural, + cmFindPackageCommand::Dec); + if (!(testString[5] == "lib-0.0" && testString[4] == "lib-1.2" && + testString[3] == "lib-2.0" && testString[2] == "lib-19.0.1" && + testString[1] == "lib-20.01.1" && testString[0] == "lib-20.2.2a")) { + cmFailed("cmSystemTools::Sort fail with Natural ASC"); + } + + cmFindPackageCommand::Sort(testString.begin(), testString.end(), + cmFindPackageCommand::Name_order, + cmFindPackageCommand::Dec); + if (!(testString[5] == "lib-0.0" && testString[4] == "lib-1.2" && + testString[3] == "lib-19.0.1" && testString[2] == "lib-2.0" && + testString[1] == "lib-20.01.1" && testString[0] == "lib-20.2.2a")) { + cmFailed("cmSystemTools::Sort fail with Name DEC"); + } + + cmFindPackageCommand::Sort(testString.begin(), testString.end(), + cmFindPackageCommand::Name_order, + cmFindPackageCommand::Asc); + if (!(testString[0] == "lib-0.0" && testString[1] == "lib-1.2" && + testString[2] == "lib-19.0.1" && testString[3] == "lib-2.0" && + testString[4] == "lib-20.01.1" && testString[5] == "lib-20.2.2a")) { + cmFailed("cmSystemTools::Sort fail with Natural ASC"); + } + + if (!failed) { + cmPassed("cmSystemTools::Sort working"); + } + return failed; +} diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index 04bbbc6..1a6f204 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -633,3 +633,33 @@ endif() if(PACKAGE_VERSION_UNSUITABLE) message(SEND_ERROR "PACKAGE_VERSION_UNSUITABLE set, but must not be !") endif() + + +############################################################################ +##Test FIND_PACKAGE using sorting +set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +SET(CMAKE_FIND_PACKAGE_SORT_ORDER NAME) +SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION ASC) + +set(SortLib_DIR "" CACHE FILEPATH "Wipe out find results for testing." FORCE) +FIND_PACKAGE(SortLib CONFIG) +IF (NOT "${SortLib_VERSION}" STREQUAL "3.1.1") + message(SEND_ERROR "FIND_PACKAGE_SORT_ORDER Name Asc! ${SortLib_VERSION}") +endif() +unset(SortLib_VERSION) + + +set(SortLib_DIR "" CACHE FILEPATH "Wipe out find results for testing." FORCE) +SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL) +SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC) +FIND_PACKAGE(SortLib CONFIG) +IF (NOT "${SortLib_VERSION}" STREQUAL "3.10.1") + message(SEND_ERROR "FIND_PACKAGE_SORT_ORDER Natural! Dec ${SortLib_VERSION}") +endif() +set(SortLib_DIR "" CACHE FILEPATH "Wipe out find results for testing." FORCE) +unset(SortLib_VERSION) + + +unset(CMAKE_FIND_PACKAGE_SORT_ORDER) +unset(CMAKE_FIND_PACKAGE_SORT_DIRECTION) +set(CMAKE_PREFIX_PATH ) diff --git a/Tests/FindPackageTest/SortLib-3.1.1/SortLibConfig.cmake b/Tests/FindPackageTest/SortLib-3.1.1/SortLibConfig.cmake new file mode 100644 index 0000000..c1f2088 --- /dev/null +++ b/Tests/FindPackageTest/SortLib-3.1.1/SortLibConfig.cmake @@ -0,0 +1,2 @@ +set(SORT_LIB_VERSION 3.1.1) +message("SortLib 3.1.1 config reached") diff --git a/Tests/FindPackageTest/SortLib-3.1.1/SortLibConfigVersion.cmake b/Tests/FindPackageTest/SortLib-3.1.1/SortLibConfigVersion.cmake new file mode 100644 index 0000000..fa927c7 --- /dev/null +++ b/Tests/FindPackageTest/SortLib-3.1.1/SortLibConfigVersion.cmake @@ -0,0 +1,9 @@ +set(PACKAGE_VERSION 3.1.1) +if(PACKAGE_FIND_VERSION_MAJOR EQUAL 3) + if(PACKAGE_FIND_VERSION_MINOR EQUAL 1) + set(PACKAGE_VERSION_COMPATIBLE 1) + if(PACKAGE_FIND_VERSION_PATCH EQUAL 1) + set(PACKAGE_VERSION_EXACT 1) + endif() + endif() +endif() diff --git a/Tests/FindPackageTest/SortLib-3.10.1/SortLibConfig.cmake b/Tests/FindPackageTest/SortLib-3.10.1/SortLibConfig.cmake new file mode 100644 index 0000000..3f3f659 --- /dev/null +++ b/Tests/FindPackageTest/SortLib-3.10.1/SortLibConfig.cmake @@ -0,0 +1,2 @@ +set(SORT_LIB_VERSION 3.10.1) +message("SortLib 3.10.1 config reached") diff --git a/Tests/FindPackageTest/SortLib-3.10.1/SortLibConfigVersion.cmake b/Tests/FindPackageTest/SortLib-3.10.1/SortLibConfigVersion.cmake new file mode 100644 index 0000000..6f44c2d --- /dev/null +++ b/Tests/FindPackageTest/SortLib-3.10.1/SortLibConfigVersion.cmake @@ -0,0 +1,9 @@ +set(PACKAGE_VERSION 3.10.1) +if(PACKAGE_FIND_VERSION_MAJOR EQUAL 3) + if(PACKAGE_FIND_VERSION_MINOR EQUAL 10) + set(PACKAGE_VERSION_COMPATIBLE 1) + if(PACKAGE_FIND_VERSION_PATCH EQUAL 1) + set(PACKAGE_VERSION_EXACT 1) + endif() + endif() +endif() ----------------------------------------------------------------------- Summary of changes: Help/command/find_package.rst | 18 ++- Help/manual/cmake-variables.7.rst | 2 + Help/release/dev/find_package-dir-sort.rst | 13 +++ .../variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst | 16 +++ Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst | 36 ++++++ Source/cmFindPackageCommand.cxx | 118 +++++++++++++++++--- Source/cmFindPackageCommand.h | 26 +++++ Tests/CMakeLib/CMakeLists.txt | 1 + Tests/CMakeLib/testFindPackageCommand.cxx | 76 +++++++++++++ Tests/FindPackageTest/CMakeLists.txt | 30 +++++ .../SortLib-3.1.1/SortLibConfig.cmake | 2 + .../SortLib-3.1.1/SortLibConfigVersion.cmake | 9 ++ .../SortLib-3.10.1/SortLibConfig.cmake | 2 + .../SortLib-3.10.1/SortLibConfigVersion.cmake | 9 ++ 14 files changed, 341 insertions(+), 17 deletions(-) create mode 100644 Help/release/dev/find_package-dir-sort.rst create mode 100644 Help/variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst create mode 100644 Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst create mode 100644 Tests/CMakeLib/testFindPackageCommand.cxx create mode 100644 Tests/FindPackageTest/SortLib-3.1.1/SortLibConfig.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.1.1/SortLibConfigVersion.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.10.1/SortLibConfig.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.10.1/SortLibConfigVersion.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 13:47:50 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 13:47:50 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2083-geb8d2dc Message-ID: <20160915174750.2E7A4F5204@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, next has been updated via eb8d2dca610df895a5e069b8377f425caa0a4e81 (commit) via 72dfca30b94ba1e85533c61a7b5a330dfbc04da5 (commit) from 726c80b6cbfdc4652f23c8f335def15c70686d81 (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=eb8d2dca610df895a5e069b8377f425caa0a4e81 commit eb8d2dca610df895a5e069b8377f425caa0a4e81 Merge: 726c80b 72dfca3 Author: Brad King AuthorDate: Thu Sep 15 13:47:49 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 13:47:49 2016 -0400 Merge topic 'detect-relink-incompat' into next 72dfca30 ninja: error out on relink requirements https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72dfca30b94ba1e85533c61a7b5a330dfbc04da5 commit 72dfca30b94ba1e85533c61a7b5a330dfbc04da5 Author: Ben Boeckel AuthorDate: Tue Sep 13 11:23:19 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 13:44:58 2016 -0400 ninja: error out on relink requirements Ninja does not support PRE_INSTALL_SCRIPT properties and does not perform the relink required by installation without help from some other mechanism, so error out if it would be required. Issue: #13934, #16304 diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 4f8c036..1e21ac4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1162,7 +1162,28 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall( // If either a build or install tree rpath is set then the rpath // will likely change between the build tree and install tree and // this target must be relinked. - return this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); + bool have_rpath = + this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); + bool is_ninja = + this->LocalGenerator->GetGlobalGenerator()->GetName() == "Ninja"; + + if (have_rpath && is_ninja) { + std::ostringstream w; + /* clang-format off */ + w << + "The install of the " << this->GetName() << " target requires " + "changing an RPATH from the build tree, but this is not supported " + "with the Ninja generator unless on an ELF-based platform. The " + "CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this " + "relinking step." + ; + /* clang-format on */ + + cmake* cm = this->LocalGenerator->GetCMakeInstance(); + cm->IssueMessage(cmake::FATAL_ERROR, w.str(), this->GetBacktrace()); + } + + return have_rpath; } bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 14:03:11 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 14:03:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2085-g2471d0e Message-ID: <20160915180311.B0496F5CF9@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, next has been updated via 2471d0eceab00020e76b20ed7cc06d4df0929726 (commit) via c3507b54968cf5c1594b44f758da2c06c68b0717 (commit) from eb8d2dca610df895a5e069b8377f425caa0a4e81 (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=2471d0eceab00020e76b20ed7cc06d4df0929726 commit 2471d0eceab00020e76b20ed7cc06d4df0929726 Merge: eb8d2dc c3507b5 Author: Brad King AuthorDate: Thu Sep 15 14:03:10 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 14:03:10 2016 -0400 Merge topic 'doc-CMP0017' into next c3507b54 Help: Clarify wording of include() for builtin module directories https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3507b54968cf5c1594b44f758da2c06c68b0717 commit c3507b54968cf5c1594b44f758da2c06c68b0717 Author: Brad King AuthorDate: Thu Sep 15 14:01:13 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 14:02:25 2016 -0400 Help: Clarify wording of include() for builtin module directories Issue: #16312 diff --git a/Help/command/include.rst b/Help/command/include.rst index c391561..eeca4c6 100644 --- a/Help/command/include.rst +++ b/Help/command/include.rst @@ -15,10 +15,10 @@ is present, then no error is raised if the file does not exist. If which has been included or NOTFOUND if it failed. If a module is specified instead of a file, the file with name -.cmake is searched first in :variable:`CMAKE_MODULE_PATH`, +``.cmake`` is searched first in :variable:`CMAKE_MODULE_PATH`, then in the CMake module directory. There is one exception to this: if -the file which calls ``include()`` is located itself in the CMake module -directory, then first the CMake module directory is searched and +the file which calls ``include()`` is located itself in the CMake builtin +module directory, then first the CMake builtin module directory is searched and :variable:`CMAKE_MODULE_PATH` afterwards. See also policy :policy:`CMP0017`. See the :command:`cmake_policy` command documentation for discussion of the ----------------------------------------------------------------------- Summary of changes: Help/command/include.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 14:16:06 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 14:16:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-989-g6a18967 Message-ID: <20160915181606.8E36EEE5BB@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 6a189675809aa3f43534fde47e5a094464892ead (commit) via 7aa97b948f854cf4797db8707969173efb786249 (commit) via 46ded385c00c71a932c624efdecda7283492d41d (commit) via 5d17e995801dd916446c232eb36f1b330106578f (commit) via 7c92c84302827b33ea47f7fb6ca5b2ff98451d44 (commit) from 010140311a0aa9336b7e2a2d22c177d445ee1c32 (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=6a189675809aa3f43534fde47e5a094464892ead commit 6a189675809aa3f43534fde47e5a094464892ead Merge: 0101403 7aa97b9 Author: Brad King AuthorDate: Thu Sep 15 14:16:04 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 14:16:04 2016 -0400 Merge topic 'doc-FeatureSummary' 7aa97b94 FeatureSummary: Add include() to examples 46ded385 FeatureSummary: Format documentation 5d17e995 FeatureSummary: Convert docs to a bracket comment 7c92c843 FeatureSummary: Order function implementations the same as the documentation ----------------------------------------------------------------------- Summary of changes: Modules/FeatureSummary.cmake | 677 +++++++++++++++++++++--------------------- 1 file changed, 335 insertions(+), 342 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 14:16:09 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 14:16:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-991-g6e06a53 Message-ID: <20160915181609.4C6C8F0104@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 6e06a53ebf58f41cd570d1bbaed7a1c62eac7ed0 (commit) via c3507b54968cf5c1594b44f758da2c06c68b0717 (commit) from 6a189675809aa3f43534fde47e5a094464892ead (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=6e06a53ebf58f41cd570d1bbaed7a1c62eac7ed0 commit 6e06a53ebf58f41cd570d1bbaed7a1c62eac7ed0 Merge: 6a18967 c3507b5 Author: Brad King AuthorDate: Thu Sep 15 14:16:07 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 14:16:07 2016 -0400 Merge topic 'doc-CMP0017' c3507b54 Help: Clarify wording of include() for builtin module directories ----------------------------------------------------------------------- Summary of changes: Help/command/include.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 14:16:24 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 14:16:24 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2088-g9db24a8 Message-ID: <20160915181624.AABA4F259B@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, next has been updated via 9db24a8ccd641c94574302d78b9e5b4fdaa84ee5 (commit) via 6e06a53ebf58f41cd570d1bbaed7a1c62eac7ed0 (commit) via 6a189675809aa3f43534fde47e5a094464892ead (commit) from 2471d0eceab00020e76b20ed7cc06d4df0929726 (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=9db24a8ccd641c94574302d78b9e5b4fdaa84ee5 commit 9db24a8ccd641c94574302d78b9e5b4fdaa84ee5 Merge: 2471d0e 6e06a53 Author: Brad King AuthorDate: Thu Sep 15 14:16:15 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 14:16:15 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 14:46:40 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 14:46:40 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2090-ge53d142 Message-ID: <20160915184640.44142E63ED@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, next has been updated via e53d142f05e8d4659638ffa513addeecdb4f154b (commit) via 8f6cb36695df3ded9e242c35c4b0e79850d24a31 (commit) from 9db24a8ccd641c94574302d78b9e5b4fdaa84ee5 (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=e53d142f05e8d4659638ffa513addeecdb4f154b commit e53d142f05e8d4659638ffa513addeecdb4f154b Merge: 9db24a8 8f6cb36 Author: Brad King AuthorDate: Thu Sep 15 14:46:38 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 14:46:38 2016 -0400 Merge topic 'file-curl-httpheader' into next 8f6cb366 file(DOWNLOAD|UPLOAD): Add HTTPHEADER suboption https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f6cb36695df3ded9e242c35c4b0e79850d24a31 commit 8f6cb36695df3ded9e242c35c4b0e79850d24a31 Author: Ruslan Baratov AuthorDate: Thu Sep 15 08:38:12 2016 +0300 Commit: Ruslan Baratov CommitDate: Thu Sep 15 21:41:39 2016 +0300 file(DOWNLOAD|UPLOAD): Add HTTPHEADER suboption diff --git a/Help/command/file.rst b/Help/command/file.rst index f8727f0..77e9f62 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -225,6 +225,9 @@ Options to both ``DOWNLOAD`` and ``UPLOAD`` are: ``USERPWD :`` Set username and password for operation. +``HTTPHEADER `` + HTTP header for operation. Suboption can be repeated several times. + Additional options to ``DOWNLOAD`` are: ``EXPECTED_HASH ALGO=`` diff --git a/Help/release/dev/file-curl-httpheader.rst b/Help/release/dev/file-curl-httpheader.rst new file mode 100644 index 0000000..2147d40 --- /dev/null +++ b/Help/release/dev/file-curl-httpheader.rst @@ -0,0 +1,5 @@ +file-curl-httpheader +-------------------- + +* The :command:`file(DOWNLOAD)` and :command:`file(UPLOAD)` commands + gained a ``HTTPHEADER `` option. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 2c226cd..c10f426 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2483,6 +2483,8 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) bool showProgress = false; std::string userpwd; + std::list curl_headers; + while (i != args.end()) { if (*i == "TIMEOUT") { ++i; @@ -2572,6 +2574,13 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) return false; } userpwd = *i; + } else if (*i == "HTTPHEADER") { + ++i; + if (i == args.end()) { + this->SetError("DOWNLOAD missing string for HTTPHEADER."); + return false; + } + curl_headers.push_back(*i); } else { // Do not return error for compatibility reason. std::string err = "Unexpected argument: "; @@ -2716,8 +2725,17 @@ bool cmFileCommand::HandleDownloadCommand(std::vector const& args) check_curl_result(res, "DOWNLOAD cannot set user password: "); } + struct curl_slist* headers = CM_NULLPTR; + for (std::list::const_iterator h = curl_headers.begin(); + h != curl_headers.end(); ++h) { + headers = ::curl_slist_append(headers, h->c_str()); + } + ::curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + res = ::curl_easy_perform(curl); + ::curl_slist_free_all(headers); + /* always cleanup */ g_curl.release(); ::curl_easy_cleanup(curl); @@ -2798,6 +2816,8 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) bool showProgress = false; std::string userpwd; + std::list curl_headers; + while (i != args.end()) { if (*i == "TIMEOUT") { ++i; @@ -2838,6 +2858,13 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) return false; } userpwd = *i; + } else if (*i == "HTTPHEADER") { + ++i; + if (i == args.end()) { + this->SetError("UPLOAD missing string for HTTPHEADER."); + return false; + } + curl_headers.push_back(*i); } else { // Do not return error for compatibility reason. std::string err = "Unexpected argument: "; @@ -2956,8 +2983,17 @@ bool cmFileCommand::HandleUploadCommand(std::vector const& args) check_curl_result(res, "UPLOAD cannot set user password: "); } + struct curl_slist* headers = CM_NULLPTR; + for (std::list::const_iterator h = curl_headers.begin(); + h != curl_headers.end(); ++h) { + headers = ::curl_slist_append(headers, h->c_str()); + } + ::curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + res = ::curl_easy_perform(curl); + ::curl_slist_free_all(headers); + /* always cleanup */ g_curl.release(); ::curl_easy_cleanup(curl); diff --git a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt new file mode 100644 index 0000000..247923b --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at DOWNLOAD-httpheader-not-set.cmake:[0-9]+ \(file\): + file DOWNLOAD missing string for HTTPHEADER. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake new file mode 100644 index 0000000..6efc958 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake @@ -0,0 +1 @@ +file(DOWNLOAD "" "" HTTPHEADER "Content-Type: application/x-compressed-tar" HTTPHEADER) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index d8e9ce0..5d560c0 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -2,8 +2,10 @@ include(RunCMake) run_cmake(DOWNLOAD-hash-mismatch) run_cmake(DOWNLOAD-unused-argument) +run_cmake(DOWNLOAD-httpheader-not-set) run_cmake(DOWNLOAD-pass-not-set) run_cmake(UPLOAD-unused-argument) +run_cmake(UPLOAD-httpheader-not-set) run_cmake(UPLOAD-pass-not-set) run_cmake(INSTALL-DIRECTORY) run_cmake(INSTALL-MESSAGE-bad) diff --git a/Tests/RunCMake/file/UPLOAD-httpheader-not-set-result.txt b/Tests/RunCMake/file/UPLOAD-httpheader-not-set-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-httpheader-not-set-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/UPLOAD-httpheader-not-set-stderr.txt b/Tests/RunCMake/file/UPLOAD-httpheader-not-set-stderr.txt new file mode 100644 index 0000000..341baf5 --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-httpheader-not-set-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at UPLOAD-httpheader-not-set.cmake:[0-9]+ \(file\): + file UPLOAD missing string for HTTPHEADER. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/UPLOAD-httpheader-not-set.cmake b/Tests/RunCMake/file/UPLOAD-httpheader-not-set.cmake new file mode 100644 index 0000000..18d43cc --- /dev/null +++ b/Tests/RunCMake/file/UPLOAD-httpheader-not-set.cmake @@ -0,0 +1 @@ +file(UPLOAD "" "" HTTPHEADER "Content-Type: application/x-compressed-tar" HTTPHEADER) ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 3 ++ Help/release/dev/file-curl-httpheader.rst | 5 +++ Source/cmFileCommand.cxx | 36 ++++++++++++++++++++ .../DOWNLOAD-httpheader-not-set-result.txt} | 0 .../file/DOWNLOAD-httpheader-not-set-stderr.txt | 4 +++ .../file/DOWNLOAD-httpheader-not-set.cmake | 1 + Tests/RunCMake/file/RunCMakeTest.cmake | 2 ++ .../UPLOAD-httpheader-not-set-result.txt} | 0 .../file/UPLOAD-httpheader-not-set-stderr.txt | 4 +++ .../RunCMake/file/UPLOAD-httpheader-not-set.cmake | 1 + 10 files changed, 56 insertions(+) create mode 100644 Help/release/dev/file-curl-httpheader.rst copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/DOWNLOAD-httpheader-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/UPLOAD-httpheader-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-httpheader-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-httpheader-not-set.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Sep 15 16:09:13 2016 From: brad.king at kitware.com (Brad King) Date: Thu, 15 Sep 2016 16:09:13 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2094-g0c73aea Message-ID: <20160915200914.55F6DC0FAD@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, next has been updated via 0c73aea46ad9b453e69e0b9de331e1d28742a888 (commit) via 9353d991a4a9df1c7bdededaf0b11fc96227f805 (commit) via fa3897b24eb9a5cbc4926659b11f8cb6087789a1 (commit) via 916d84450d2caa7cadc82662039602849cdb118d (commit) from e53d142f05e8d4659638ffa513addeecdb4f154b (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=0c73aea46ad9b453e69e0b9de331e1d28742a888 commit 0c73aea46ad9b453e69e0b9de331e1d28742a888 Merge: e53d142 9353d99 Author: Brad King AuthorDate: Thu Sep 15 16:09:12 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 16:09:12 2016 -0400 Merge topic 'refactor-target-construction' into next 9353d991 cmTarget: Remove unused support for partial construction fa3897b2 cmGlobalGenerator: Refactor global target construction 916d8445 cmGlobalGenerator: Split CreateDefaultGlobalTargets implementation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9353d991a4a9df1c7bdededaf0b11fc96227f805 commit 9353d991a4a9df1c7bdededaf0b11fc96227f805 Author: Brad King AuthorDate: Thu Sep 15 16:00:24 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 16:02:27 2016 -0400 cmTarget: Remove unused support for partial construction We no longer need to support partial construction for cmTarget instances of type GLOBAL_TARGET. Require all constructor arguments up front. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d964f00..1b6c93e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -62,10 +62,10 @@ public: cmTarget::cmTarget(std::string const& name, cmState::TargetType type, Visibility vis, cmMakefile* mf) { - assert(mf || type == cmState::GLOBAL_TARGET); + assert(mf); this->Name = name; this->TargetTypeValue = type; - this->Makefile = CM_NULLPTR; + this->Makefile = mf; this->HaveInstallRule = false; this->DLLPlatform = false; this->IsAndroid = false; @@ -82,25 +82,6 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type, this->RecordDependencies = false; } - if (mf) { - this->SetMakefile(mf); - } -} - -cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const -{ - assert(this->GetType() == cmState::GLOBAL_TARGET); - assert(this->GetMakefile() == CM_NULLPTR); - cmTarget result(*this); - result.SetMakefile(mf); - return result; -} - -void cmTarget::SetMakefile(cmMakefile* mf) -{ - // Set our makefile. - this->Makefile = mf; - // Check whether this is a DLL platform. this->DLLPlatform = (this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") || diff --git a/Source/cmTarget.h b/Source/cmTarget.h index ebc92f3..4b182bb 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -88,9 +88,6 @@ public: ///! Set/Get the name of the target const std::string& GetName() const { return this->Name; } - /** Get a copy of this target adapted for the given directory. */ - cmTarget CopyForDirectory(cmMakefile* mf) const; - /** Get the cmMakefile that owns this target. */ cmMakefile* GetMakefile() const { return this->Makefile; } @@ -283,8 +280,6 @@ public: }; private: - void SetMakefile(cmMakefile* mf); - bool HandleLocationPropertyPolicy(cmMakefile* context) const; const char* GetSuffixVariableInternal(bool implib) const; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa3897b24eb9a5cbc4926659b11f8cb6087789a1 commit fa3897b24eb9a5cbc4926659b11f8cb6087789a1 Author: Brad King AuthorDate: Thu Sep 15 15:56:49 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 15:56:49 2016 -0400 cmGlobalGenerator: Refactor global target construction Avoid using partially-constructed cmTarget instances. Collect the information about how to construct each target in a separate structure and then actually create each cmTarget with full construction. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index bea9dfd..64c9870 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1060,16 +1060,16 @@ void cmGlobalGenerator::Configure() this->ConfigureDoneCMP0026AndCMP0024 = true; // Put a copy of each global target in every directory. - cmTargets globalTargets; - this->CreateDefaultGlobalTargets(&globalTargets); + std::vector globalTargets; + this->CreateDefaultGlobalTargets(globalTargets); for (unsigned int i = 0; i < this->Makefiles.size(); ++i) { cmMakefile* mf = this->Makefiles[i]; cmTargets* targets = &(mf->GetTargets()); - cmTargets::iterator tit; - for (tit = globalTargets.begin(); tit != globalTargets.end(); ++tit) { + for (std::vector::iterator gti = globalTargets.begin(); + gti != globalTargets.end(); ++gti) { targets->insert( - cmTargets::value_type(tit->first, tit->second.CopyForDirectory(mf))); + cmTargets::value_type(gti->Name, this->CreateGlobalTarget(*gti, mf))); } } @@ -2069,7 +2069,8 @@ inline std::string removeQuotes(const std::string& s) return s; } -void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) +void cmGlobalGenerator::CreateDefaultGlobalTargets( + std::vector& targets) { this->AddGlobalTarget_Package(targets); this->AddGlobalTarget_PackageSource(targets); @@ -2079,13 +2080,16 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) this->AddGlobalTarget_Install(targets); } -void cmGlobalGenerator::AddGlobalTarget_Package(cmTargets* targets) +void cmGlobalGenerator::AddGlobalTarget_Package( + std::vector& targets) { cmMakefile* mf = this->Makefiles[0]; const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); - std::string workingDir = mf->GetCurrentBinaryDirectory(); - cmCustomCommandLines cpackCommandLines; - std::vector depends; + GlobalTargetInfo gti; + gti.Name = this->GetPackageTargetName(); + gti.Message = "Run CPack packaging tool..."; + gti.UsesTerminal = true; + gti.WorkingDir = mf->GetCurrentBinaryDirectory(); cmCustomCommandLine singleLine; singleLine.push_back(cmSystemTools::GetCPackCommand()); if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') { @@ -2097,34 +2101,32 @@ void cmGlobalGenerator::AddGlobalTarget_Package(cmTargets* targets) configFile += "/CPackConfig.cmake"; std::string relConfigFile = "./CPackConfig.cmake"; singleLine.push_back(relConfigFile); - cpackCommandLines.push_back(singleLine); + gti.CommandLines.push_back(singleLine); if (this->GetPreinstallTargetName()) { - depends.push_back(this->GetPreinstallTargetName()); + gti.Depends.push_back(this->GetPreinstallTargetName()); } else { const char* noPackageAll = mf->GetDefinition("CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY"); if (!noPackageAll || cmSystemTools::IsOff(noPackageAll)) { - depends.push_back(this->GetAllTargetName()); + gti.Depends.push_back(this->GetAllTargetName()); } } if (cmSystemTools::FileExists(configFile.c_str())) { - targets->insert(cmTargets::value_type( - this->GetPackageTargetName(), - this->CreateGlobalTarget(this->GetPackageTargetName(), - "Run CPack packaging tool...", - &cpackCommandLines, depends, workingDir.c_str(), - /*uses_terminal*/ true))); + targets.push_back(gti); } } -void cmGlobalGenerator::AddGlobalTarget_PackageSource(cmTargets* targets) +void cmGlobalGenerator::AddGlobalTarget_PackageSource( + std::vector& targets) { cmMakefile* mf = this->Makefiles[0]; const char* packageSourceTargetName = this->GetPackageSourceTargetName(); if (packageSourceTargetName) { - std::string workingDir = mf->GetCurrentBinaryDirectory(); - cmCustomCommandLines cpackCommandLines; - std::vector depends; + GlobalTargetInfo gti; + gti.Name = packageSourceTargetName; + gti.Message = "Run CPack packaging tool for source..."; + gti.WorkingDir = mf->GetCurrentBinaryDirectory(); + gti.UsesTerminal = true; cmCustomCommandLine singleLine; singleLine.push_back(cmSystemTools::GetCPackCommand()); singleLine.push_back("--config"); @@ -2134,24 +2136,22 @@ void cmGlobalGenerator::AddGlobalTarget_PackageSource(cmTargets* targets) singleLine.push_back(relConfigFile); if (cmSystemTools::FileExists(configFile.c_str())) { singleLine.push_back(configFile); - cpackCommandLines.push_back(singleLine); - targets->insert(cmTargets::value_type( - packageSourceTargetName, - this->CreateGlobalTarget( - packageSourceTargetName, "Run CPack packaging tool for source...", - &cpackCommandLines, depends, workingDir.c_str(), - /*uses_terminal*/ true))); + gti.CommandLines.push_back(singleLine); + targets.push_back(gti); } } } -void cmGlobalGenerator::AddGlobalTarget_Test(cmTargets* targets) +void cmGlobalGenerator::AddGlobalTarget_Test( + std::vector& targets) { cmMakefile* mf = this->Makefiles[0]; const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); if (mf->IsOn("CMAKE_TESTING_ENABLED")) { - cmCustomCommandLines cpackCommandLines; - std::vector depends; + GlobalTargetInfo gti; + gti.Name = this->GetTestTargetName(); + gti.Message = "Running tests..."; + gti.UsesTerminal = true; cmCustomCommandLine singleLine; singleLine.push_back(cmSystemTools::GetCTestCommand()); singleLine.push_back("--force-new-ctest-process"); @@ -2163,21 +2163,18 @@ void cmGlobalGenerator::AddGlobalTarget_Test(cmTargets* targets) { singleLine.push_back("$(ARGS)"); } - cpackCommandLines.push_back(singleLine); - targets->insert(cmTargets::value_type( - this->GetTestTargetName(), - this->CreateGlobalTarget(this->GetTestTargetName(), "Running tests...", - &cpackCommandLines, depends, CM_NULLPTR, - /*uses_terminal*/ true))); + gti.CommandLines.push_back(singleLine); + targets.push_back(gti); } } -void cmGlobalGenerator::AddGlobalTarget_EditCache(cmTargets* targets) +void cmGlobalGenerator::AddGlobalTarget_EditCache( + std::vector& targets) { const char* editCacheTargetName = this->GetEditCacheTargetName(); if (editCacheTargetName) { - cmCustomCommandLines cpackCommandLines; - std::vector depends; + GlobalTargetInfo gti; + gti.Name = editCacheTargetName; cmCustomCommandLine singleLine; // Use generator preference for the edit_cache rule if it is defined. @@ -2186,47 +2183,43 @@ void cmGlobalGenerator::AddGlobalTarget_EditCache(cmTargets* targets) singleLine.push_back(edit_cmd); singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); - cpackCommandLines.push_back(singleLine); - targets->insert(cmTargets::value_type( - editCacheTargetName, - this->CreateGlobalTarget( - editCacheTargetName, "Running CMake cache editor...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); + gti.Message = "Running CMake cache editor..."; + gti.UsesTerminal = true; + gti.CommandLines.push_back(singleLine); } else { singleLine.push_back(cmSystemTools::GetCMakeCommand()); singleLine.push_back("-E"); singleLine.push_back("echo"); singleLine.push_back("No interactive CMake dialog available."); - cpackCommandLines.push_back(singleLine); - targets->insert(cmTargets::value_type( - editCacheTargetName, - this->CreateGlobalTarget( - editCacheTargetName, "No interactive CMake dialog available...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ false))); + gti.Message = "No interactive CMake dialog available..."; + gti.UsesTerminal = false; + gti.CommandLines.push_back(singleLine); } + + targets.push_back(gti); } } -void cmGlobalGenerator::AddGlobalTarget_RebuildCache(cmTargets* targets) +void cmGlobalGenerator::AddGlobalTarget_RebuildCache( + std::vector& targets) { const char* rebuildCacheTargetName = this->GetRebuildCacheTargetName(); if (rebuildCacheTargetName) { - cmCustomCommandLines cpackCommandLines; - std::vector depends; + GlobalTargetInfo gti; + gti.Name = rebuildCacheTargetName; + gti.Message = "Running CMake to regenerate build system..."; + gti.UsesTerminal = true; cmCustomCommandLine singleLine; singleLine.push_back(cmSystemTools::GetCMakeCommand()); singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); - cpackCommandLines.push_back(singleLine); - targets->insert(cmTargets::value_type( - rebuildCacheTargetName, - this->CreateGlobalTarget( - rebuildCacheTargetName, "Running CMake to regenerate build system...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); + gti.CommandLines.push_back(singleLine); + targets.push_back(gti); } } -void cmGlobalGenerator::AddGlobalTarget_Install(cmTargets* targets) +void cmGlobalGenerator::AddGlobalTarget_Install( + std::vector& targets) { cmMakefile* mf = this->Makefiles[0]; const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); @@ -2239,8 +2232,6 @@ void cmGlobalGenerator::AddGlobalTarget_Install(cmTargets* targets) } else if (this->InstallTargetEnabled && !skipInstallRules) { if (!cmakeCfgIntDir || !*cmakeCfgIntDir || cmakeCfgIntDir[0] == '.') { std::set* componentsSet = &this->InstallComponents; - cmCustomCommandLines cpackCommandLines; - std::vector depends; std::ostringstream ostr; if (!componentsSet->empty()) { ostr << "Available install components are: "; @@ -2248,23 +2239,25 @@ void cmGlobalGenerator::AddGlobalTarget_Install(cmTargets* targets) } else { ostr << "Only default component available"; } - targets->insert(cmTargets::value_type( - "list_install_components", - this->CreateGlobalTarget("list_install_components", ostr.str().c_str(), - &cpackCommandLines, depends, CM_NULLPTR, - /*uses_terminal*/ false))); + GlobalTargetInfo gti; + gti.Name = "list_install_components"; + gti.Message = ostr.str(); + gti.UsesTerminal = false; + targets.push_back(gti); } std::string cmd = cmSystemTools::GetCMakeCommand(); - cmCustomCommandLines cpackCommandLines; - std::vector depends; + GlobalTargetInfo gti; + gti.Name = this->GetInstallTargetName(); + gti.Message = "Install the project..."; + gti.UsesTerminal = true; cmCustomCommandLine singleLine; if (this->GetPreinstallTargetName()) { - depends.push_back(this->GetPreinstallTargetName()); + gti.Depends.push_back(this->GetPreinstallTargetName()); } else { const char* noall = mf->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY"); if (!noall || cmSystemTools::IsOff(noall)) { - depends.push_back(this->GetAllTargetName()); + gti.Depends.push_back(this->GetAllTargetName()); } } if (mf->GetDefinition("CMake_BINARY_DIR") && @@ -2289,46 +2282,39 @@ void cmGlobalGenerator::AddGlobalTarget_Install(cmTargets* targets) } singleLine.push_back("-P"); singleLine.push_back("cmake_install.cmake"); - cpackCommandLines.push_back(singleLine); - targets->insert(cmTargets::value_type( - this->GetInstallTargetName(), - this->CreateGlobalTarget(this->GetInstallTargetName(), - "Install the project...", &cpackCommandLines, - depends, CM_NULLPTR, /*uses_terminal*/ true))); + gti.CommandLines.push_back(singleLine); + targets.push_back(gti); // install_local if (const char* install_local = this->GetInstallLocalTargetName()) { + gti.Name = install_local; + gti.Message = "Installing only the local directory..."; + gti.UsesTerminal = true; + gti.CommandLines.clear(); + cmCustomCommandLine localCmdLine = singleLine; localCmdLine.insert(localCmdLine.begin() + 1, "-DCMAKE_INSTALL_LOCAL_ONLY=1"); - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - cpackCommandLines.push_back(localCmdLine); - targets->insert(cmTargets::value_type( - install_local, - this->CreateGlobalTarget( - install_local, "Installing only the local directory...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); + gti.CommandLines.push_back(localCmdLine); + targets.push_back(gti); } // install_strip const char* install_strip = this->GetInstallStripTargetName(); if ((install_strip != CM_NULLPTR) && (mf->IsSet("CMAKE_STRIP"))) { + gti.Name = install_strip; + gti.Message = "Installing the project stripped..."; + gti.UsesTerminal = true; + gti.CommandLines.clear(); + cmCustomCommandLine stripCmdLine = singleLine; stripCmdLine.insert(stripCmdLine.begin() + 1, "-DCMAKE_INSTALL_DO_STRIP=1"); - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - cpackCommandLines.push_back(stripCmdLine); - - targets->insert(cmTargets::value_type( - install_strip, - this->CreateGlobalTarget( - install_strip, "Installing the project stripped...", - &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); + gti.CommandLines.push_back(stripCmdLine); + targets.push_back(gti); } } } @@ -2362,14 +2348,12 @@ bool cmGlobalGenerator::UseFolderProperty() return false; } -cmTarget cmGlobalGenerator::CreateGlobalTarget( - const std::string& name, const char* message, - const cmCustomCommandLines* commandLines, std::vector depends, - const char* workingDirectory, bool uses_terminal) +cmTarget cmGlobalGenerator::CreateGlobalTarget(GlobalTargetInfo const& gti, + cmMakefile* mf) { // Package - cmTarget target(name, cmState::GLOBAL_TARGET, cmTarget::VisibilityNormal, - CM_NULLPTR); + cmTarget target(gti.Name, cmState::GLOBAL_TARGET, cmTarget::VisibilityNormal, + mf); target.SetProperty("EXCLUDE_FROM_ALL", "TRUE"); std::vector no_outputs; @@ -2377,12 +2361,14 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget( std::vector no_depends; // Store the custom command in the target. cmCustomCommand cc(CM_NULLPTR, no_outputs, no_byproducts, no_depends, - *commandLines, CM_NULLPTR, workingDirectory); - cc.SetUsesTerminal(uses_terminal); + gti.CommandLines, CM_NULLPTR, gti.WorkingDir.c_str()); + cc.SetUsesTerminal(gti.UsesTerminal); target.AddPostBuildCommand(cc); - target.SetProperty("EchoString", message); - std::vector::iterator dit; - for (dit = depends.begin(); dit != depends.end(); ++dit) { + if (!gti.Message.empty()) { + target.SetProperty("EchoString", gti.Message.c_str()); + } + for (std::vector::const_iterator dit = gti.Depends.begin(); + dit != gti.Depends.end(); ++dit) { target.AddUtility(*dit); } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 8254809..f7b2e59 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -402,17 +402,30 @@ protected: bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const; bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const; virtual void InitializeProgressMarks() {} - void CreateDefaultGlobalTargets(cmTargets* targets); - void AddGlobalTarget_Package(cmTargets* targets); - void AddGlobalTarget_PackageSource(cmTargets* targets); - void AddGlobalTarget_Test(cmTargets* targets); - void AddGlobalTarget_EditCache(cmTargets* targets); - void AddGlobalTarget_RebuildCache(cmTargets* targets); - void AddGlobalTarget_Install(cmTargets* targets); - cmTarget CreateGlobalTarget(const std::string& name, const char* message, - const cmCustomCommandLines* commandLines, - std::vector depends, - const char* workingDir, bool uses_terminal); + + struct GlobalTargetInfo + { + std::string Name; + std::string Message; + cmCustomCommandLines CommandLines; + std::vector Depends; + std::string WorkingDir; + bool UsesTerminal; + GlobalTargetInfo() + : UsesTerminal(false) + { + } + }; + + void CreateDefaultGlobalTargets(std::vector& targets); + + void AddGlobalTarget_Package(std::vector& targets); + void AddGlobalTarget_PackageSource(std::vector& targets); + void AddGlobalTarget_Test(std::vector& targets); + void AddGlobalTarget_EditCache(std::vector& targets); + void AddGlobalTarget_RebuildCache(std::vector& targets); + void AddGlobalTarget_Install(std::vector& targets); + cmTarget CreateGlobalTarget(GlobalTargetInfo const& gti, cmMakefile* mf); std::string FindMakeProgramFile; std::string ConfiguredFilesPath; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=916d84450d2caa7cadc82662039602849cdb118d commit 916d84450d2caa7cadc82662039602849cdb118d Author: Brad King AuthorDate: Thu Sep 15 15:11:02 2016 -0400 Commit: Brad King CommitDate: Thu Sep 15 15:37:25 2016 -0400 cmGlobalGenerator: Split CreateDefaultGlobalTargets implementation Divide this long method into multiple helpers each dedicated to one of the targets. This also avoids having to clear/re-use local structures. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index e85d80e..bea9dfd 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2071,10 +2071,18 @@ inline std::string removeQuotes(const std::string& s) void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) { + this->AddGlobalTarget_Package(targets); + this->AddGlobalTarget_PackageSource(targets); + this->AddGlobalTarget_Test(targets); + this->AddGlobalTarget_EditCache(targets); + this->AddGlobalTarget_RebuildCache(targets); + this->AddGlobalTarget_Install(targets); +} + +void cmGlobalGenerator::AddGlobalTarget_Package(cmTargets* targets) +{ cmMakefile* mf = this->Makefiles[0]; const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); - - // CPack std::string workingDir = mf->GetCurrentBinaryDirectory(); cmCustomCommandLines cpackCommandLines; std::vector depends; @@ -2086,7 +2094,6 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) } singleLine.push_back("--config"); std::string configFile = mf->GetCurrentBinaryDirectory(); - ; configFile += "/CPackConfig.cmake"; std::string relConfigFile = "./CPackConfig.cmake"; singleLine.push_back(relConfigFile); @@ -2108,19 +2115,22 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) &cpackCommandLines, depends, workingDir.c_str(), /*uses_terminal*/ true))); } - // CPack source +} + +void cmGlobalGenerator::AddGlobalTarget_PackageSource(cmTargets* targets) +{ + cmMakefile* mf = this->Makefiles[0]; const char* packageSourceTargetName = this->GetPackageSourceTargetName(); if (packageSourceTargetName) { - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - singleLine.erase(singleLine.begin(), singleLine.end()); - depends.erase(depends.begin(), depends.end()); + std::string workingDir = mf->GetCurrentBinaryDirectory(); + cmCustomCommandLines cpackCommandLines; + std::vector depends; + cmCustomCommandLine singleLine; singleLine.push_back(cmSystemTools::GetCPackCommand()); singleLine.push_back("--config"); - configFile = mf->GetCurrentBinaryDirectory(); - ; + std::string configFile = mf->GetCurrentBinaryDirectory(); configFile += "/CPackSourceConfig.cmake"; - relConfigFile = "./CPackSourceConfig.cmake"; + std::string relConfigFile = "./CPackSourceConfig.cmake"; singleLine.push_back(relConfigFile); if (cmSystemTools::FileExists(configFile.c_str())) { singleLine.push_back(configFile); @@ -2133,13 +2143,16 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) /*uses_terminal*/ true))); } } +} - // Test +void cmGlobalGenerator::AddGlobalTarget_Test(cmTargets* targets) +{ + cmMakefile* mf = this->Makefiles[0]; + const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); if (mf->IsOn("CMAKE_TESTING_ENABLED")) { - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - singleLine.erase(singleLine.begin(), singleLine.end()); - depends.erase(depends.begin(), depends.end()); + cmCustomCommandLines cpackCommandLines; + std::vector depends; + cmCustomCommandLine singleLine; singleLine.push_back(cmSystemTools::GetCTestCommand()); singleLine.push_back("--force-new-ctest-process"); if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') { @@ -2157,14 +2170,15 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } +} - // Edit Cache +void cmGlobalGenerator::AddGlobalTarget_EditCache(cmTargets* targets) +{ const char* editCacheTargetName = this->GetEditCacheTargetName(); if (editCacheTargetName) { - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - singleLine.erase(singleLine.begin(), singleLine.end()); - depends.erase(depends.begin(), depends.end()); + cmCustomCommandLines cpackCommandLines; + std::vector depends; + cmCustomCommandLine singleLine; // Use generator preference for the edit_cache rule if it is defined. std::string edit_cmd = this->GetEditCacheCommand(); @@ -2191,14 +2205,15 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ false))); } } +} - // Rebuild Cache +void cmGlobalGenerator::AddGlobalTarget_RebuildCache(cmTargets* targets) +{ const char* rebuildCacheTargetName = this->GetRebuildCacheTargetName(); if (rebuildCacheTargetName) { - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - singleLine.erase(singleLine.begin(), singleLine.end()); - depends.erase(depends.begin(), depends.end()); + cmCustomCommandLines cpackCommandLines; + std::vector depends; + cmCustomCommandLine singleLine; singleLine.push_back(cmSystemTools::GetCMakeCommand()); singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); @@ -2209,8 +2224,12 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) rebuildCacheTargetName, "Running CMake to regenerate build system...", &cpackCommandLines, depends, CM_NULLPTR, /*uses_terminal*/ true))); } +} - // Install +void cmGlobalGenerator::AddGlobalTarget_Install(cmTargets* targets) +{ + cmMakefile* mf = this->Makefiles[0]; + const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); bool skipInstallRules = mf->IsOn("CMAKE_SKIP_INSTALL_RULES"); if (this->InstallTargetEnabled && skipInstallRules) { this->CMakeInstance->IssueMessage( @@ -2220,9 +2239,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) } else if (this->InstallTargetEnabled && !skipInstallRules) { if (!cmakeCfgIntDir || !*cmakeCfgIntDir || cmakeCfgIntDir[0] == '.') { std::set* componentsSet = &this->InstallComponents; - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - depends.erase(depends.begin(), depends.end()); + cmCustomCommandLines cpackCommandLines; + std::vector depends; std::ostringstream ostr; if (!componentsSet->empty()) { ostr << "Available install components are: "; @@ -2230,7 +2248,6 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) } else { ostr << "Only default component available"; } - singleLine.push_back(ostr.str()); targets->insert(cmTargets::value_type( "list_install_components", this->CreateGlobalTarget("list_install_components", ostr.str().c_str(), @@ -2238,10 +2255,9 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) /*uses_terminal*/ false))); } std::string cmd = cmSystemTools::GetCMakeCommand(); - cpackCommandLines.erase(cpackCommandLines.begin(), - cpackCommandLines.end()); - singleLine.erase(singleLine.begin(), singleLine.end()); - depends.erase(depends.begin(), depends.end()); + cmCustomCommandLines cpackCommandLines; + std::vector depends; + cmCustomCommandLine singleLine; if (this->GetPreinstallTargetName()) { depends.push_back(this->GetPreinstallTargetName()); } else { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 1e1479a..8254809 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -403,6 +403,12 @@ protected: bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const; virtual void InitializeProgressMarks() {} void CreateDefaultGlobalTargets(cmTargets* targets); + void AddGlobalTarget_Package(cmTargets* targets); + void AddGlobalTarget_PackageSource(cmTargets* targets); + void AddGlobalTarget_Test(cmTargets* targets); + void AddGlobalTarget_EditCache(cmTargets* targets); + void AddGlobalTarget_RebuildCache(cmTargets* targets); + void AddGlobalTarget_Install(cmTargets* targets); cmTarget CreateGlobalTarget(const std::string& name, const char* message, const cmCustomCommandLines* commandLines, std::vector depends, ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 254 +++++++++++++++++++++--------------------- Source/cmGlobalGenerator.h | 29 ++++- Source/cmTarget.cxx | 23 +--- Source/cmTarget.h | 5 - 4 files changed, 154 insertions(+), 157 deletions(-) hooks/post-receive -- CMake From daniel at pfeifer-mail.de Thu Sep 15 17:59:59 2016 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Thu, 15 Sep 2016 17:59:59 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2096-gcafd74b Message-ID: <20160915215959.281ACF5BE6@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, next has been updated via cafd74b307f291f13ac950a3cb671c758676f0ad (commit) via 73f648f167e9b11739c4dbbdbd5c024baf1e39ad (commit) from 0c73aea46ad9b453e69e0b9de331e1d28742a888 (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=cafd74b307f291f13ac950a3cb671c758676f0ad commit cafd74b307f291f13ac950a3cb671c758676f0ad Merge: 0c73aea 73f648f Author: Daniel Pfeifer AuthorDate: Thu Sep 15 17:59:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Thu Sep 15 17:59:57 2016 -0400 Merge topic 'size-empty' into next 73f648f1 use empty method to check for emptyness https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73f648f167e9b11739c4dbbdbd5c024baf1e39ad commit 73f648f167e9b11739c4dbbdbd5c024baf1e39ad Author: Daniel Pfeifer AuthorDate: Thu Sep 15 23:59:29 2016 +0200 Commit: Daniel Pfeifer CommitDate: Thu Sep 15 23:59:29 2016 +0200 use empty method to check for emptyness diff --git a/Source/cmAddCompileOptionsCommand.cxx b/Source/cmAddCompileOptionsCommand.cxx index 2223cf4..cbba831 100644 --- a/Source/cmAddCompileOptionsCommand.cxx +++ b/Source/cmAddCompileOptionsCommand.cxx @@ -14,7 +14,7 @@ bool cmAddCompileOptionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 9dc7c59..8e14966 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -18,7 +18,7 @@ bool cmAddCustomTargetCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx index 2d0d026..5f2b32f 100644 --- a/Source/cmAddDefinitionsCommand.cxx +++ b/Source/cmAddDefinitionsCommand.cxx @@ -16,7 +16,7 @@ bool cmAddDefinitionsCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { // it is OK to have no arguments - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 4516ed2..5a40050 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -18,7 +18,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx index 63a9051..1a781cc 100644 --- a/Source/cmAddSubDirectoryCommand.cxx +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -15,7 +15,7 @@ bool cmAddSubDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx index 9830867..6146053 100644 --- a/Source/cmBuildCommand.cxx +++ b/Source/cmBuildCommand.cxx @@ -27,7 +27,7 @@ bool cmBuildCommand::InitialPass(std::vector const& args, bool cmBuildCommand::MainSignature(std::vector const& args) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("requires at least one argument naming a CMake variable"); return false; } diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx index 27234d7..3d02034 100644 --- a/Source/cmBuildNameCommand.cxx +++ b/Source/cmBuildNameCommand.cxx @@ -22,7 +22,7 @@ bool cmBuildNameCommand::InitialPass(std::vector const& args, "The build_name command should not be called; see CMP0036.")) { return true; } - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index 07e0885..03c4a37 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -17,7 +17,7 @@ bool cmCMakePolicyCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("requires at least one argument."); return false; } diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 94f03e8..e670dc6 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -85,7 +85,7 @@ bool cmConditionEvaluator::IsTrue( errorString = ""; // handle empty invocation - if (args.size() < 1) { + if (args.empty()) { return false; } diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx index 484a970..3589529 100644 --- a/Source/cmDefinePropertyCommand.cxx +++ b/Source/cmDefinePropertyCommand.cxx @@ -17,7 +17,7 @@ bool cmDefinePropertyCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx index 0ebe778..9b7dd03 100644 --- a/Source/cmEnableLanguageCommand.cxx +++ b/Source/cmEnableLanguageCommand.cxx @@ -17,7 +17,7 @@ bool cmEnableLanguageCommand::InitialPass(std::vector const& args, { bool optional = false; std::vector languages; - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx index 58bbc31..284f486 100644 --- a/Source/cmExecProgramCommand.cxx +++ b/Source/cmExecProgramCommand.cxx @@ -19,7 +19,7 @@ bool cmExecProgramCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index d97b25f..81d8a1f 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -31,7 +31,7 @@ void cmExecuteProcessCommandAppend(std::vector& output, const char* data, bool cmExecuteProcessCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index 3247cc8..96080a9 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -69,7 +69,7 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( const ImportPropertyMap& properties) { std::string config = ""; - if (this->Configurations.size()) { + if (!this->Configurations.empty()) { config = this->Configurations[0]; } cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( diff --git a/Source/cmExportInstallAndroidMKGenerator.cxx b/Source/cmExportInstallAndroidMKGenerator.cxx index 8f815b7..10ba6ee 100644 --- a/Source/cmExportInstallAndroidMKGenerator.cxx +++ b/Source/cmExportInstallAndroidMKGenerator.cxx @@ -76,7 +76,7 @@ void cmExportInstallAndroidMKGenerator::GenerateImportTargetCode( os << "LOCAL_SRC_FILES := $(_IMPORT_PREFIX)/"; os << target->Target->GetProperty("__dest") << "/"; std::string config = ""; - if (this->Configurations.size()) { + if (!this->Configurations.empty()) { config = this->Configurations[0]; } os << target->GetFullName(config) << "\n"; @@ -103,7 +103,7 @@ void cmExportInstallAndroidMKGenerator::GenerateInterfaceProperties( const ImportPropertyMap& properties) { std::string config = ""; - if (this->Configurations.size()) { + if (!this->Configurations.empty()) { config = this->Configurations[0]; } cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index b422a2c..d9c30e7 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -27,7 +27,7 @@ bool cmExportLibraryDependenciesCommand::InitialPass( "see CMP0033.")) { return true; } - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 8338c2a..7761759 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -89,7 +89,7 @@ void cmFindPackageCommand::AppendSearchPathGroups() bool cmFindPackageCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index c6e5f06..dadd080 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -113,7 +113,7 @@ bool cmForEachFunctionBlocker::ShouldRemove(const cmListFileFunction& lff, bool cmForEachCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 40c54db..bda96aa 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -202,7 +202,7 @@ bool cmFunctionFunctionBlocker::ShouldRemove(const cmListFileFunction& lff, bool cmFunctionCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index 360ebeb..c90314e 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -15,7 +15,7 @@ bool cmIncludeCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1 || args.size() > 4) { + if (args.empty() || args.size() > 4) { this->SetError("called with wrong number of arguments. " "include() only takes one file."); return false; diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index cafdba7..904fcca 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -15,7 +15,7 @@ bool cmIncludeDirectoryCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmIncludeRegularExpressionCommand.cxx b/Source/cmIncludeRegularExpressionCommand.cxx index 2473dff..bd26d93 100644 --- a/Source/cmIncludeRegularExpressionCommand.cxx +++ b/Source/cmIncludeRegularExpressionCommand.cxx @@ -15,7 +15,7 @@ bool cmIncludeRegularExpressionCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if ((args.size() < 1) || (args.size() > 2)) { + if ((args.empty()) || (args.size() > 2)) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx index a33b429..9b5d54a 100644 --- a/Source/cmLinkDirectoriesCommand.cxx +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -15,7 +15,7 @@ bool cmLinkDirectoriesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 5d23d6a..bef234e 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -15,7 +15,7 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { return true; } // add libraries, nothe that there is an optional prefix diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h index 466aaa7..025c0a3 100644 --- a/Source/cmLinkedTree.h +++ b/Source/cmLinkedTree.h @@ -167,10 +167,10 @@ public: iterator Truncate() { - assert(this->UpPositions.size() > 0); + assert(!this->UpPositions.empty()); this->UpPositions.erase(this->UpPositions.begin() + 1, this->UpPositions.end()); - assert(this->Data.size() > 0); + assert(!this->Data.empty()); this->Data.erase(this->Data.begin() + 1, this->Data.end()); return iterator(this, 1); } diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 85188d1..6d9cf8e 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -18,7 +18,7 @@ bool cmLoadCacheCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with wrong number of arguments."); } diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index ddf6ce6..4d8a4e3 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -183,7 +183,7 @@ bool cmLoadCommandCommand::InitialPass(std::vector const& args, "The load_command command should not be called; see CMP0031.")) { return true; } - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index ee9dc8a..5231062 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -236,7 +236,7 @@ bool cmMacroFunctionBlocker::ShouldRemove(const cmListFileFunction& lff, bool cmMacroCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 2fb6a75..6c979f6 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -15,7 +15,7 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx index ca8b926..b812349 100644 --- a/Source/cmMathCommand.cxx +++ b/Source/cmMathCommand.cxx @@ -16,7 +16,7 @@ bool cmMathCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("must be called with at least one argument."); return false; } diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index c48910e..e884531 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -17,7 +17,7 @@ bool cmMessageCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 139303b..6f98d94 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -15,7 +15,7 @@ bool cmProjectCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("PROJECT called with incorrect number of arguments"); return false; } diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index 955f712..c695374 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -15,7 +15,7 @@ bool cmRemoveCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmRemoveDefinitionsCommand.cxx b/Source/cmRemoveDefinitionsCommand.cxx index 638eda6..77de846 100644 --- a/Source/cmRemoveDefinitionsCommand.cxx +++ b/Source/cmRemoveDefinitionsCommand.cxx @@ -16,7 +16,7 @@ bool cmRemoveDefinitionsCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { // it is OK to have no arguments - if (args.size() < 1) { + if (args.empty()) { return true; } diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 8fb6aa0..6bdb28b 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -15,7 +15,7 @@ bool cmSetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmSetDirectoryPropertiesCommand.cxx b/Source/cmSetDirectoryPropertiesCommand.cxx index ca758da..8584118 100644 --- a/Source/cmSetDirectoryPropertiesCommand.cxx +++ b/Source/cmSetDirectoryPropertiesCommand.cxx @@ -17,7 +17,7 @@ bool cmSetDirectoryPropertiesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx index 2fb137f..59d569d 100644 --- a/Source/cmSetTestsPropertiesCommand.cxx +++ b/Source/cmSetTestsPropertiesCommand.cxx @@ -18,7 +18,7 @@ bool cmSetTestsPropertiesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index 6db14c0..6f7ef6c 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -15,7 +15,7 @@ bool cmSourceGroupCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 3c913ee..addfed4 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -26,7 +26,7 @@ bool cmStringCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("must be called with at least one argument."); return false; } diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx index 401f588..4893978 100644 --- a/Source/cmSubdirCommand.cxx +++ b/Source/cmSubdirCommand.cxx @@ -15,7 +15,7 @@ bool cmSubdirCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 1c4a9ce..b62e225 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -22,7 +22,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass( std::vector const& args, cmExecutionStatus&) { // must have one argument - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmUnsetCommand.cxx b/Source/cmUnsetCommand.cxx index 05ba65a..5bf137c 100644 --- a/Source/cmUnsetCommand.cxx +++ b/Source/cmUnsetCommand.cxx @@ -15,7 +15,7 @@ bool cmUnsetCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1 || args.size() > 2) { + if (args.empty() || args.size() > 2) { this->SetError("called with incorrect number of arguments"); return false; } diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index f30ffe8..cf740db 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -104,7 +104,7 @@ cmVariableWatchCommand::~cmVariableWatchCommand() bool cmVariableWatchCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("must be called with at least one argument."); return false; } diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index 93a6271..ad558fe 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -133,7 +133,7 @@ bool cmWhileFunctionBlocker::ShouldRemove(const cmListFileFunction& lff, bool cmWhileCommand::InvokeInitialPass( const std::vector& args, cmExecutionStatus&) { - if (args.size() < 1) { + if (args.empty()) { this->SetError("called with incorrect number of arguments"); return false; } ----------------------------------------------------------------------- Summary of changes: Source/cmAddCompileOptionsCommand.cxx | 2 +- Source/cmAddCustomTargetCommand.cxx | 2 +- Source/cmAddDefinitionsCommand.cxx | 2 +- Source/cmAddLibraryCommand.cxx | 2 +- Source/cmAddSubDirectoryCommand.cxx | 2 +- Source/cmBuildCommand.cxx | 2 +- Source/cmBuildNameCommand.cxx | 2 +- Source/cmCMakePolicyCommand.cxx | 2 +- Source/cmConditionEvaluator.cxx | 2 +- Source/cmDefinePropertyCommand.cxx | 2 +- Source/cmEnableLanguageCommand.cxx | 2 +- Source/cmExecProgramCommand.cxx | 2 +- Source/cmExecuteProcessCommand.cxx | 2 +- Source/cmExportBuildAndroidMKGenerator.cxx | 2 +- Source/cmExportInstallAndroidMKGenerator.cxx | 4 ++-- Source/cmExportLibraryDependenciesCommand.cxx | 2 +- Source/cmFindPackageCommand.cxx | 2 +- Source/cmForEachCommand.cxx | 2 +- Source/cmFunctionCommand.cxx | 2 +- Source/cmIncludeCommand.cxx | 2 +- Source/cmIncludeDirectoryCommand.cxx | 2 +- Source/cmIncludeRegularExpressionCommand.cxx | 2 +- Source/cmLinkDirectoriesCommand.cxx | 2 +- Source/cmLinkLibrariesCommand.cxx | 2 +- Source/cmLinkedTree.h | 4 ++-- Source/cmLoadCacheCommand.cxx | 2 +- Source/cmLoadCommandCommand.cxx | 2 +- Source/cmMacroCommand.cxx | 2 +- Source/cmMarkAsAdvancedCommand.cxx | 2 +- Source/cmMathCommand.cxx | 2 +- Source/cmMessageCommand.cxx | 2 +- Source/cmProjectCommand.cxx | 2 +- Source/cmRemoveCommand.cxx | 2 +- Source/cmRemoveDefinitionsCommand.cxx | 2 +- Source/cmSetCommand.cxx | 2 +- Source/cmSetDirectoryPropertiesCommand.cxx | 2 +- Source/cmSetTestsPropertiesCommand.cxx | 2 +- Source/cmSourceGroupCommand.cxx | 2 +- Source/cmStringCommand.cxx | 2 +- Source/cmSubdirCommand.cxx | 2 +- Source/cmTargetLinkLibrariesCommand.cxx | 2 +- Source/cmUnsetCommand.cxx | 2 +- Source/cmVariableWatchCommand.cxx | 2 +- Source/cmWhileCommand.cxx | 2 +- 44 files changed, 46 insertions(+), 46 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Sep 16 00:01:11 2016 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 16 Sep 2016 00:01:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-992-g3bb18e7 Message-ID: <20160916040111.A5974F59CA@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 3bb18e708da186927f59bbc94875e27b57278fcf (commit) from 6e06a53ebf58f41cd570d1bbaed7a1c62eac7ed0 (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=3bb18e708da186927f59bbc94875e27b57278fcf commit 3bb18e708da186927f59bbc94875e27b57278fcf Author: Kitware Robot AuthorDate: Fri Sep 16 00:01:07 2016 -0400 Commit: Kitware Robot CommitDate: Fri Sep 16 00:01:07 2016 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0569e8e..09f55fa 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 6) -set(CMake_VERSION_PATCH 20160915) +set(CMake_VERSION_PATCH 20160916) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:06:30 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:06:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2100-g48c68b9 Message-ID: <20160916140631.1D2B7F5D4B@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, next has been updated via 48c68b9b5e6a1be92dcaaab66a53d11643ecb7b2 (commit) via a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7 (commit) via d9c600c504408c79393b9f5b4e334cecca30e67a (commit) via 3bb18e708da186927f59bbc94875e27b57278fcf (commit) from cafd74b307f291f13ac950a3cb671c758676f0ad (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=48c68b9b5e6a1be92dcaaab66a53d11643ecb7b2 commit 48c68b9b5e6a1be92dcaaab66a53d11643ecb7b2 Merge: cafd74b a098ca0 Author: Brad King AuthorDate: Fri Sep 16 10:06:27 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:06:27 2016 -0400 Merge topic 'find-package-mode-fixes' into next a098ca0d cmake: Fix --find-package mode link line output d9c600c5 cmGlobalGenerator: Fix use of uninitialized value in --find-package mode 3bb18e70 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7 commit a098ca0d7ac25455a9a1304ecedb8fd8790c6ca7 Author: Brad King AuthorDate: Fri Sep 16 09:49:25 2016 -0400 Commit: Brad King CommitDate: Fri Sep 16 10:03:15 2016 -0400 cmake: Fix --find-package mode link line output Refactoring in commit v2.8.10~58^2~2 (Ninja: move -LIBPATH behind -link option, 2012-09-26) added arguments to cmLocalGenerator::GetTargetFlags and updated the call sites. However, in the cmake::FindPackage and cmLocalGenerator::AddBuildTargetRule call sites it added the new arguments in the wrong order. The latter was never used and has been removed. The former remains buggy and prints out compiler flags instead of the link framework/library search paths. Fix its argument order. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 18a7894..112a5f7 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -595,8 +595,8 @@ bool cmake::FindPackage(const std::vector& args) gg->CreateGenerationObjects(); cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName()); cmLocalGenerator* lg = gtgt->GetLocalGenerator(); - lg->GetTargetFlags(buildType, linkLibs, frameworkPath, linkPath, flags, - linkFlags, gtgt, false); + lg->GetTargetFlags(buildType, linkLibs, flags, linkFlags, frameworkPath, + linkPath, gtgt, false); linkLibs = frameworkPath + linkPath + linkLibs; printf("%s\n", linkLibs.c_str()); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9c600c504408c79393b9f5b4e334cecca30e67a commit d9c600c504408c79393b9f5b4e334cecca30e67a Author: Brad King AuthorDate: Fri Sep 16 09:25:41 2016 -0400 Commit: Brad King CommitDate: Fri Sep 16 09:25:41 2016 -0400 cmGlobalGenerator: Fix use of uninitialized value in --find-package mode diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index e85d80e..3d2b60e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -94,6 +94,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm) this->TryCompileOuterMakefile = CM_NULLPTR; this->ConfigureDoneCMP0026AndCMP0024 = false; + this->FirstTimeProgress = 0.0f; cm->GetState()->SetMinGWMake(false); cm->GetState()->SetMSYSShell(false); ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/cmGlobalGenerator.cxx | 1 + Source/cmake.cxx | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:20:52 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:20:52 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-994-g554655b Message-ID: <20160916142052.D6656F481F@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 554655bfd91450e7e4e7feb9bd3a383d769a5528 (commit) via ae783c9ba92f42ec252085e407c0b7e5d00aa59a (commit) from 3bb18e708da186927f59bbc94875e27b57278fcf (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=554655bfd91450e7e4e7feb9bd3a383d769a5528 commit 554655bfd91450e7e4e7feb9bd3a383d769a5528 Merge: 3bb18e7 ae783c9 Author: Brad King AuthorDate: Fri Sep 16 10:20:48 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:20:48 2016 -0400 Merge topic 'require-cmake-2.8.12.2' ae783c9b Require CMake 2.8.12.2 to build CMake itself ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 2 +- Utilities/Doxygen/CMakeLists.txt | 2 +- Utilities/Sphinx/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:21:04 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:21:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-996-g6f1b80b Message-ID: <20160916142109.5F46BF4B70@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 6f1b80bec03fbe19e3d8f56fdee84a8ca6e4fe93 (commit) via a788cf309257ee0a9cd8cdd1ed5d4665d34a9580 (commit) from 554655bfd91450e7e4e7feb9bd3a383d769a5528 (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=6f1b80bec03fbe19e3d8f56fdee84a8ca6e4fe93 commit 6f1b80bec03fbe19e3d8f56fdee84a8ca6e4fe93 Merge: 554655b a788cf3 Author: Brad King AuthorDate: Fri Sep 16 10:20:57 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:20:57 2016 -0400 Merge topic 'file-LOCK-lowercase-test' a788cf30 Tests: Add case for file(LOCK) with lower-cased path ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/file/LOCK-lowercase.cmake | 11 +++++++++++ Tests/RunCMake/file/RunCMakeTest.cmake | 1 + 2 files changed, 12 insertions(+) create mode 100644 Tests/RunCMake/file/LOCK-lowercase.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:21:14 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:21:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-999-g3efb3c0 Message-ID: <20160916142115.435EFF4D83@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 3efb3c0012a05ce1f19c99fb27b835c3ec057270 (commit) via 9cbd04be5fa86c2363c7c7f65b6a00969bc87d1d (commit) via e1ca117332fbf6adf3a467a420804e9cb1891582 (commit) from 6f1b80bec03fbe19e3d8f56fdee84a8ca6e4fe93 (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=3efb3c0012a05ce1f19c99fb27b835c3ec057270 commit 3efb3c0012a05ce1f19c99fb27b835c3ec057270 Merge: 6f1b80b 9cbd04b Author: Brad King AuthorDate: Fri Sep 16 10:21:11 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:21:11 2016 -0400 Merge topic 'ExternalProject-http-credentials' 9cbd04be Help: Add notes for topic 'ExternalProject-http-credentials' e1ca1173 ExternalProject: Add HTTP_{USERNAME,PASSWORD} ----------------------------------------------------------------------- Summary of changes: Auxiliary/vim/syntax/cmake.vim | 2 +- Help/release/dev/ExternalProject-http-credentials.rst | 5 +++++ Modules/ExternalProject-download.cmake.in | 1 + Modules/ExternalProject.cmake | 17 +++++++++++++++-- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 Help/release/dev/ExternalProject-http-credentials.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:21:20 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:21:20 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1001-g38a378e Message-ID: <20160916142121.3D70DF4CAB@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 38a378e10d93740c11ac713c6035e26d6838ad96 (commit) via 31be918b0b2dd445bdf85d72a8eaa29841137bc8 (commit) from 3efb3c0012a05ce1f19c99fb27b835c3ec057270 (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=38a378e10d93740c11ac713c6035e26d6838ad96 commit 38a378e10d93740c11ac713c6035e26d6838ad96 Merge: 3efb3c0 31be918 Author: Brad King AuthorDate: Fri Sep 16 10:21:17 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:21:17 2016 -0400 Merge topic 'find_package-dir-sort' 31be918b find_package: Optionally sort globbed directories in a meaningful order ----------------------------------------------------------------------- Summary of changes: Help/command/find_package.rst | 18 ++- Help/manual/cmake-variables.7.rst | 2 + Help/release/dev/find_package-dir-sort.rst | 13 +++ .../variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst | 16 +++ Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst | 36 ++++++ Source/cmFindPackageCommand.cxx | 118 +++++++++++++++++--- Source/cmFindPackageCommand.h | 26 +++++ Tests/CMakeLib/CMakeLists.txt | 1 + Tests/CMakeLib/testFindPackageCommand.cxx | 76 +++++++++++++ Tests/FindPackageTest/CMakeLists.txt | 30 +++++ .../SortLib-3.1.1/SortLibConfig.cmake | 2 + .../SortLib-3.1.1/SortLibConfigVersion.cmake | 9 ++ .../SortLib-3.10.1/SortLibConfig.cmake | 2 + .../SortLib-3.10.1/SortLibConfigVersion.cmake | 9 ++ 14 files changed, 341 insertions(+), 17 deletions(-) create mode 100644 Help/release/dev/find_package-dir-sort.rst create mode 100644 Help/variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION.rst create mode 100644 Help/variable/CMAKE_FIND_PACKAGE_SORT_ORDER.rst create mode 100644 Tests/CMakeLib/testFindPackageCommand.cxx create mode 100644 Tests/FindPackageTest/SortLib-3.1.1/SortLibConfig.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.1.1/SortLibConfigVersion.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.10.1/SortLibConfig.cmake create mode 100644 Tests/FindPackageTest/SortLib-3.10.1/SortLibConfigVersion.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:21:30 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:21:30 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1003-g4356bd7 Message-ID: <20160916142130.9A3E8F4D2A@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 4356bd7fe382585e59033287dcc43386689e5dc2 (commit) via 8f6cb36695df3ded9e242c35c4b0e79850d24a31 (commit) from 38a378e10d93740c11ac713c6035e26d6838ad96 (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=4356bd7fe382585e59033287dcc43386689e5dc2 commit 4356bd7fe382585e59033287dcc43386689e5dc2 Merge: 38a378e 8f6cb36 Author: Brad King AuthorDate: Fri Sep 16 10:21:23 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:21:23 2016 -0400 Merge topic 'file-curl-httpheader' 8f6cb366 file(DOWNLOAD|UPLOAD): Add HTTPHEADER suboption ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 3 ++ Help/release/dev/file-curl-httpheader.rst | 5 +++ Source/cmFileCommand.cxx | 36 ++++++++++++++++++++ .../DOWNLOAD-httpheader-not-set-result.txt} | 0 .../file/DOWNLOAD-httpheader-not-set-stderr.txt | 4 +++ .../file/DOWNLOAD-httpheader-not-set.cmake | 1 + Tests/RunCMake/file/RunCMakeTest.cmake | 2 ++ .../UPLOAD-httpheader-not-set-result.txt} | 0 .../file/UPLOAD-httpheader-not-set-stderr.txt | 4 +++ .../RunCMake/file/UPLOAD-httpheader-not-set.cmake | 1 + 10 files changed, 56 insertions(+) create mode 100644 Help/release/dev/file-curl-httpheader.rst copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/DOWNLOAD-httpheader-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/DOWNLOAD-httpheader-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/DOWNLOAD-httpheader-not-set.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/UPLOAD-httpheader-not-set-result.txt} (100%) create mode 100644 Tests/RunCMake/file/UPLOAD-httpheader-not-set-stderr.txt create mode 100644 Tests/RunCMake/file/UPLOAD-httpheader-not-set.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:21:34 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:21:34 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1005-gcf0e005 Message-ID: <20160916142136.B709BF4EF2@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 cf0e005202b3d17ad1f3c17536065c5589b97f93 (commit) via 72dfca30b94ba1e85533c61a7b5a330dfbc04da5 (commit) from 4356bd7fe382585e59033287dcc43386689e5dc2 (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=cf0e005202b3d17ad1f3c17536065c5589b97f93 commit cf0e005202b3d17ad1f3c17536065c5589b97f93 Merge: 4356bd7 72dfca3 Author: Brad King AuthorDate: Fri Sep 16 10:21:31 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:21:31 2016 -0400 Merge topic 'detect-relink-incompat' 72dfca30 ninja: error out on relink requirements ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:21:41 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:21:41 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1007-g60ebd0a Message-ID: <20160916142141.E56D8F4B70@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 60ebd0acf843bbe87f94b39d6807a072532cdb07 (commit) via 73f648f167e9b11739c4dbbdbd5c024baf1e39ad (commit) from cf0e005202b3d17ad1f3c17536065c5589b97f93 (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=60ebd0acf843bbe87f94b39d6807a072532cdb07 commit 60ebd0acf843bbe87f94b39d6807a072532cdb07 Merge: cf0e005 73f648f Author: Brad King AuthorDate: Fri Sep 16 10:21:39 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:21:39 2016 -0400 Merge topic 'size-empty' 73f648f1 use empty method to check for emptyness ----------------------------------------------------------------------- Summary of changes: Source/cmAddCompileOptionsCommand.cxx | 2 +- Source/cmAddCustomTargetCommand.cxx | 2 +- Source/cmAddDefinitionsCommand.cxx | 2 +- Source/cmAddLibraryCommand.cxx | 2 +- Source/cmAddSubDirectoryCommand.cxx | 2 +- Source/cmBuildCommand.cxx | 2 +- Source/cmBuildNameCommand.cxx | 2 +- Source/cmCMakePolicyCommand.cxx | 2 +- Source/cmConditionEvaluator.cxx | 2 +- Source/cmDefinePropertyCommand.cxx | 2 +- Source/cmEnableLanguageCommand.cxx | 2 +- Source/cmExecProgramCommand.cxx | 2 +- Source/cmExecuteProcessCommand.cxx | 2 +- Source/cmExportBuildAndroidMKGenerator.cxx | 2 +- Source/cmExportInstallAndroidMKGenerator.cxx | 4 ++-- Source/cmExportLibraryDependenciesCommand.cxx | 2 +- Source/cmFindPackageCommand.cxx | 2 +- Source/cmForEachCommand.cxx | 2 +- Source/cmFunctionCommand.cxx | 2 +- Source/cmIncludeCommand.cxx | 2 +- Source/cmIncludeDirectoryCommand.cxx | 2 +- Source/cmIncludeRegularExpressionCommand.cxx | 2 +- Source/cmLinkDirectoriesCommand.cxx | 2 +- Source/cmLinkLibrariesCommand.cxx | 2 +- Source/cmLinkedTree.h | 4 ++-- Source/cmLoadCacheCommand.cxx | 2 +- Source/cmLoadCommandCommand.cxx | 2 +- Source/cmMacroCommand.cxx | 2 +- Source/cmMarkAsAdvancedCommand.cxx | 2 +- Source/cmMathCommand.cxx | 2 +- Source/cmMessageCommand.cxx | 2 +- Source/cmProjectCommand.cxx | 2 +- Source/cmRemoveCommand.cxx | 2 +- Source/cmRemoveDefinitionsCommand.cxx | 2 +- Source/cmSetCommand.cxx | 2 +- Source/cmSetDirectoryPropertiesCommand.cxx | 2 +- Source/cmSetTestsPropertiesCommand.cxx | 2 +- Source/cmSourceGroupCommand.cxx | 2 +- Source/cmStringCommand.cxx | 2 +- Source/cmSubdirCommand.cxx | 2 +- Source/cmTargetLinkLibrariesCommand.cxx | 2 +- Source/cmUnsetCommand.cxx | 2 +- Source/cmVariableWatchCommand.cxx | 2 +- Source/cmWhileCommand.cxx | 2 +- 44 files changed, 46 insertions(+), 46 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:21:45 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:21:45 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.6.2-1011-g00fd64d Message-ID: <20160916142148.D25E4F4D59@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 00fd64d1263901f96935e15c8d90ee8a338cee1a (commit) via 9353d991a4a9df1c7bdededaf0b11fc96227f805 (commit) via fa3897b24eb9a5cbc4926659b11f8cb6087789a1 (commit) via 916d84450d2caa7cadc82662039602849cdb118d (commit) from 60ebd0acf843bbe87f94b39d6807a072532cdb07 (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=00fd64d1263901f96935e15c8d90ee8a338cee1a commit 00fd64d1263901f96935e15c8d90ee8a338cee1a Merge: 60ebd0a 9353d99 Author: Brad King AuthorDate: Fri Sep 16 10:21:43 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:21:43 2016 -0400 Merge topic 'refactor-target-construction' 9353d991 cmTarget: Remove unused support for partial construction fa3897b2 cmGlobalGenerator: Refactor global target construction 916d8445 cmGlobalGenerator: Split CreateDefaultGlobalTargets implementation ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 254 +++++++++++++++++++++--------------------- Source/cmGlobalGenerator.h | 29 ++++- Source/cmTarget.cxx | 23 +--- Source/cmTarget.h | 5 - 4 files changed, 154 insertions(+), 157 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:22:14 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:22:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2109-g56f7811 Message-ID: <20160916142215.56625F52CC@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, next has been updated via 56f7811ded77e0bed029b0232655ed4d4f4971d5 (commit) via 00fd64d1263901f96935e15c8d90ee8a338cee1a (commit) via 60ebd0acf843bbe87f94b39d6807a072532cdb07 (commit) via cf0e005202b3d17ad1f3c17536065c5589b97f93 (commit) via 4356bd7fe382585e59033287dcc43386689e5dc2 (commit) via 38a378e10d93740c11ac713c6035e26d6838ad96 (commit) via 3efb3c0012a05ce1f19c99fb27b835c3ec057270 (commit) via 6f1b80bec03fbe19e3d8f56fdee84a8ca6e4fe93 (commit) via 554655bfd91450e7e4e7feb9bd3a383d769a5528 (commit) from 48c68b9b5e6a1be92dcaaab66a53d11643ecb7b2 (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=56f7811ded77e0bed029b0232655ed4d4f4971d5 commit 56f7811ded77e0bed029b0232655ed4d4f4971d5 Merge: 48c68b9 00fd64d Author: Brad King AuthorDate: Fri Sep 16 10:21:57 2016 -0400 Commit: Brad King CommitDate: Fri Sep 16 10:21:57 2016 -0400 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Sep 16 10:41:07 2016 From: brad.king at kitware.com (Brad King) Date: Fri, 16 Sep 2016 10:41:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, next, updated. v3.6.2-2111-g01ee277 Message-ID: <20160916144108.167EDD78CA@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, next has been updated via 01ee277892e7846f2998f8101d4ea40596dcdc26 (commit) via c2f0f41f6372a6a810f43cab3ebba70261231c70 (commit) from 56f7811ded77e0bed029b0232655ed4d4f4971d5 (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=01ee277892e7846f2998f8101d4ea40596dcdc26 commit 01ee277892e7846f2998f8101d4ea40596dcdc26 Merge: 56f7811 c2f0f41 Author: Brad King AuthorDate: Fri Sep 16 10:41:05 2016 -0400 Commit: CMake Topic Stage CommitDate: Fri Sep 16 10:41:05 2016 -0400 Merge topic 'ifw-user-interfaces' into next c2f0f41f CPackIFW: Add USER_INTERFACES option https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2f0f41f6372a6a810f43cab3ebba70261231c70 commit c2f0f41f6372a6a810f43cab3ebba70261231c70 Author: Pierluigi Taddei AuthorDate: Thu Sep 15 21:26:52 2016 +0200 Commit: Brad King CommitDate: Fri Sep 16 10:29:00 2016 -0400 CPackIFW: Add USER_INTERFACES option Add to CPackIFW the capability of accepting a list of USER_INTERFACES that are copied to the meta folder and added to the component description. diff --git a/Help/release/dev/ifw-user-interfaces.rst b/Help/release/dev/ifw-user-interfaces.rst new file mode 100644 index 0000000..26e241a --- /dev/null +++ b/Help/release/dev/ifw-user-interfaces.rst @@ -0,0 +1,7 @@ +ifw-user-interfaces +------------------- + +* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and + :command:`cpack_ifw_configure_component_group` commands gained a new + ``USER_INTERFACES`` option to add a list of additonal pages to the IFW + installer. diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index ebc5c90..c502099 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -195,7 +195,8 @@ # [SCRIPT