This is an automated email from 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 e15314420c8ccf08e7855a0400a3ce76bddff95e (commit) via c30939a7130b154c384cc9becb3386b67c7f3ad2 (commit) via 6e4e79e1b054fd7f9f697e67136dc2c4ef405dc8 (commit) via 01a8b89f292c031e7a35bedf92b7cda98bef7f6d (commit) via 71fbebd1dc3a24e2478bb5704d9ac20f36cbf704 (commit) via bf2244681b2cbbd2684187e628e00c0600ae4122 (commit) via cafaa5883a0ef4371a1435de5e56a7825679bb2b (commit) via 09c1991895baf0eeca028672a6730f2101d3b2b7 (commit) via adcbdb143cfd302c6b3ae6da9b53f469e01a900b (commit) from 24722b7860ebab15baaf124b84378d323494813e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e15314420c8ccf08e7855a0400a3ce76bddff95e commit e15314420c8ccf08e7855a0400a3ce76bddff95e Merge: c30939a 71fbebd Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 11 12:52:28 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Jul 11 08:52:36 2019 -0400 Merge topic 'iwyu-memory' 71fbebd1dc IWYU: Fix handling of <memory> standard header Acked-by: Kitware Robot <kwro...@kitware.com> Acked-by: Marc Chevrier <marc.chevr...@gmail.com> Merge-request: !3536 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c30939a7130b154c384cc9becb3386b67c7f3ad2 commit c30939a7130b154c384cc9becb3386b67c7f3ad2 Merge: 6e4e79e bf22446 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 11 12:50:49 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Jul 11 08:51:22 2019 -0400 Merge topic 'CheckSymbolExists-doc' bf2244681b CheckSymbolExists: Add examples for check_symbol_exists cafaa5883a CheckCXXSymbolExists: Clarify documented role Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3522 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e4e79e1b054fd7f9f697e67136dc2c4ef405dc8 commit 6e4e79e1b054fd7f9f697e67136dc2c4ef405dc8 Merge: 01a8b89 adcbdb1 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 11 12:50:26 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Jul 11 08:50:36 2019 -0400 Merge topic 'fix_ctest_output' adcbdb143c CTest: Clean up stdout and logfile output for Pass/Fail regex Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3509 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01a8b89f292c031e7a35bedf92b7cda98bef7f6d commit 01a8b89f292c031e7a35bedf92b7cda98bef7f6d Merge: 24722b7 09c1991 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jul 11 12:49:25 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Jul 11 08:49:34 2019 -0400 Merge topic 'eclipse-resource-encoding' 09c1991895 Eclipse: Add option to set the resource encoding Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3525 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71fbebd1dc3a24e2478bb5704d9ac20f36cbf704 commit 71fbebd1dc3a24e2478bb5704d9ac20f36cbf704 Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Jul 10 11:38:48 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Jul 10 11:48:56 2019 -0400 IWYU: Fix handling of <memory> standard header An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints. diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 7e07ff4..4a91698 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -7,7 +7,7 @@ #include "cmsys/RegularExpression.hxx" #include <algorithm> #include <cstring> -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> #include "cmCPackComponentGroup.h" diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 58b9e70..67b7ea6 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -5,7 +5,6 @@ #include "cmsys/Encoding.hxx" #include <iostream> #include <map> -#include <memory> // IWYU pragma: keep #include <sstream> #include <stddef.h> #include <string> diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index a96513e..237ca82 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -6,7 +6,6 @@ #include "cmsys/Process.h" #include "cmsys/RegularExpression.hxx" #include <iostream> -#include <memory> // IWYU pragma: keep #include <stdlib.h> #include <string.h> diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index ef63073..37a8abf 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -29,11 +29,13 @@ #include <iostream> #include <list> #include <math.h> +#include <memory> #include <sstream> #include <stack> #include <stdlib.h> #include <unordered_map> #include <utility> +#include <vector> namespace cmsys { class RegularExpression; diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index 38cc417..43dfe8e 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include <memory> #include <set> #include <stddef.h> #include <string> @@ -12,7 +13,7 @@ #include "cmCTestTestHandler.h" #include "cmDuration.h" -#include "cmProcess.h" // IWYU pragma: keep (for unique_ptr) +#include "cmProcess.h" class cmCTest; class cmCTestMultiProcessHandler; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 0ed56c8..46ef809 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -11,7 +11,7 @@ #include <functional> #include <iomanip> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stdio.h> diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index 5cfc4a7..fb97e9b 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -18,7 +18,7 @@ #include "cmXMLWriter.h" #include <chrono> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> static const char* cmCTestUpdateHandlerUpdateStrings[] = { diff --git a/Source/cmBinUtilsLinuxELFLinker.h b/Source/cmBinUtilsLinuxELFLinker.h index 348edc4..e209637 100644 --- a/Source/cmBinUtilsLinuxELFLinker.h +++ b/Source/cmBinUtilsLinuxELFLinker.h @@ -9,7 +9,7 @@ #include "cmLDConfigTool.h" #include "cmStateTypes.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmBinUtilsMacOSMachOLinker.h b/Source/cmBinUtilsMacOSMachOLinker.h index 0350d1e..f4f309d 100644 --- a/Source/cmBinUtilsMacOSMachOLinker.h +++ b/Source/cmBinUtilsMacOSMachOLinker.h @@ -8,7 +8,7 @@ #include "cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h" #include "cmStateTypes.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmBinUtilsWindowsPELinker.h b/Source/cmBinUtilsWindowsPELinker.h index d742195..8d2bf4b 100644 --- a/Source/cmBinUtilsWindowsPELinker.h +++ b/Source/cmBinUtilsWindowsPELinker.h @@ -8,7 +8,7 @@ #include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h" #include "cmStateTypes.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> class cmRuntimeDependencyArchive; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d1226c3..536ca35 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -15,7 +15,7 @@ #include <ctype.h> #include <iostream> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmCTest.h b/Source/cmCTest.h index d300c33..7f66378 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -10,7 +10,7 @@ #include <chrono> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <string> #include <time.h> diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 0b1f00c..839c27a 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -10,6 +10,7 @@ #include "cmTargetLinkLibraryType.h" #include <map> +#include <memory> #include <queue> #include <set> #include <string> diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index d914eb1..4310eed 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -8,7 +8,7 @@ #include "cmsys/FStream.hxx" #include <string.h> -#include <memory> // IWYU pragma: keep +#include <memory> static unsigned int const cmCryptoHashAlgoToId[] = { /* clang-format needs this comment to break after the opening brace */ diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index b712f09..c7d3377 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <stddef.h> #include <string> #include <vector> diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 89aaad0..5e8731a 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -12,7 +12,7 @@ #include "cmStateTypes.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <stddef.h> #include <utility> diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 2226463..51eb814 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -6,7 +6,7 @@ #include "cm_kwiml.h" #include "cmsys/FStream.hxx" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stddef.h> #include <utility> diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 494afbb..121f33f 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -4,10 +4,13 @@ #include "cm_static_string_view.hxx" #include "cmsys/Process.h" + #include <algorithm> #include <ctype.h> /* isspace */ #include <iostream> +#include <memory> #include <stdio.h> +#include <vector> #include "cmAlgorithms.h" #include "cmArgumentParser.h" diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index ced27c9..e693155 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -3,7 +3,6 @@ #include "cmExportBuildAndroidMKGenerator.h" #include <algorithm> -#include <memory> // IWYU pragma: keep #include <sstream> #include <utility> diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index c366183..e1c098d 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -20,7 +20,7 @@ #include "cmsys/FStream.hxx" #include <assert.h> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <string.h> #include <utility> diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index b60a053..2e86533 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -4,7 +4,7 @@ #include "cmsys/FStream.hxx" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> #include "cmAlgorithms.h" diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index c169032..a3c9802 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -13,7 +13,7 @@ #include "cmTarget.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator( diff --git a/Source/cmFileAPI.h b/Source/cmFileAPI.h index 602efa8..aa5a42f 100644 --- a/Source/cmFileAPI.h +++ b/Source/cmFileAPI.h @@ -10,7 +10,7 @@ #include "cm_jsoncpp_writer.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <unordered_set> #include <vector> diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 0fb166a..73b4123 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -31,6 +31,7 @@ #include <algorithm> #include <cassert> #include <map> +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 980ad21..dfba910 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -13,7 +13,7 @@ #include <cmath> #include <ctype.h> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stdio.h> diff --git a/Source/cmFileTimes.h b/Source/cmFileTimes.h index cbf0fe2..191d89e 100644 --- a/Source/cmFileTimes.h +++ b/Source/cmFileTimes.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> /** \class cmFileTimes diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 50ae6a9..783b5f6 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -13,7 +13,7 @@ #include <deque> #include <functional> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <string.h> diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 08003eb..7f189d6 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 175a26d..4d3a005 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -3,7 +3,7 @@ #include "cmGeneratorExpression.h" #include "cmsys/RegularExpression.hxx" -#include <memory> // IWYU pragma: keep +#include <memory> #include <utility> #include "assert.h" diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index fd36c4b..ef76651 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -8,7 +8,7 @@ #include "cmListFileCache.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <utility> diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index 326cb0e..11c2dcc 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -3,7 +3,7 @@ #include "cmGeneratorExpressionEvaluationFile.h" #include "cmsys/FStream.hxx" -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <utility> diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 89a2390..06ebeac 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index a60c75c..d828dac 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -33,7 +33,7 @@ #include <errno.h> #include <iterator> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stdlib.h> diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 85a8dbb..845937a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -7,7 +7,7 @@ #include <assert.h> #include <errno.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <queue> #include <sstream> #include <stdio.h> diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index b80da72..997595b 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -22,9 +22,11 @@ #include "cmTarget.h" #include <algorithm> +#include <memory> #include <ostream> #include <set> #include <utility> +#include <vector> cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget* target) : GeneratorTarget(target) diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 7fd5433..e36825c 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -7,6 +7,7 @@ #include <iosfwd> #include <map> +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 2d52356..98e8339 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -9,7 +9,7 @@ #include <algorithm> #include <ctype.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 15dd404..99afc1d 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -7,7 +7,7 @@ #include <iosfwd> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index aa584ad..93f5482 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -4,6 +4,7 @@ #include <algorithm> #include <functional> +#include <memory> #include <sstream> #include <utility> diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 7c2bcd3..78e8f30 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -5,7 +5,7 @@ #include "cmsys/RegularExpression.hxx" #include <assert.h> #include <iomanip> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <string.h> diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index a75d8a9..9befb78 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -4,7 +4,7 @@ #include <cstddef> #include <iostream> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <utility> diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index d1f8f58..6f32861 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -11,7 +11,7 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <memory> // IWYU pragma: keep +#include <memory> static std::string cmIfCommandError( std::vector<cmExpandedCommandArgument> const& args) diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 14288f6..c8ebc8c 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -8,7 +8,7 @@ #include "cmMakefile.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> cmInstallDirectoryGenerator::cmInstallDirectoryGenerator( std::vector<std::string> const& dirs, const char* dest, diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index 2ed9f73..e8e82cc 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -6,7 +6,7 @@ #include "cmInstallType.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> class cmLocalGenerator; diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index 5832d27..b7b7817 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallScriptGenerator.h" +#include <memory> #include <ostream> #include <vector> diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 0774436..d891ad8 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -4,6 +4,7 @@ #include <assert.h> #include <map> +#include <memory> #include <set> #include <sstream> #include <utility> diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index b7d602e..eb827be 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -8,7 +8,7 @@ #include "cmGeneratorExpression.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx index 8d065e1..505188f 100644 --- a/Source/cmJsonObjects.cxx +++ b/Source/cmJsonObjects.cxx @@ -31,6 +31,7 @@ #include <functional> #include <limits> #include <map> +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 1b01ea2..e9a4a6f 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -7,12 +7,14 @@ #include <assert.h> #include <functional> #include <iterator> +#include <memory> #include <set> #include <sstream> #include <stdexcept> #include <stdio.h> #include <stdlib.h> // required for atoi #include <utility> +#include <vector> #include "cmAlgorithms.h" #include "cmGeneratorExpression.h" diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 9457415..5de1a74 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> -#include <memory> // IWYU pragma: keep +#include <memory> #include <stddef.h> #include <string> #include <utility> diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 801f0e8..0f730c9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -26,22 +26,24 @@ #include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" +#include "cmsys/RegularExpression.hxx" #if defined(CMAKE_BUILD_WITH_CMAKE) # define CM_LG_ENCODE_OBJECT_NAMES # include "cmCryptoHash.h" #endif -#include "cmsys/RegularExpression.hxx" #include <algorithm> #include <assert.h> #include <initializer_list> #include <iterator> +#include <memory> #include <sstream> #include <stdio.h> #include <string.h> #include <unordered_set> #include <utility> +#include <vector> #if defined(__HAIKU__) # include <FindDirectory.h> diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 81cafa3..248f4a6 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -5,7 +5,7 @@ #include <algorithm> #include <assert.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <utility> diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index c392e97..1b4f428 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -5,7 +5,7 @@ #include "cmsys/FStream.hxx" #include "cmsys/Terminal.h" #include <algorithm> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <utility> diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 3fdafd2..585eb3c 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include "cmGlobalVisualStudioGenerator.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index bd98f08..5f22a07 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -9,7 +9,7 @@ #include <cstring> #include <ctype.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d223347..d0b70d9 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -8,7 +8,7 @@ #include "cmsys/RegularExpression.hxx" #include <deque> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <stack> #include <stddef.h> diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 6b9b9c7..2001c1f 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileExecutableTargetGenerator.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <string> diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b9f7c6d..e5aed01 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileLibraryTargetGenerator.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <stddef.h> diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index b3bab4b..b5a6246 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileTargetGenerator.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <utility> diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index c570a7c..9eeeed0 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -7,6 +7,7 @@ #include <iosfwd> #include <map> +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 4236995..70d9fca 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileUtilityTargetGenerator.h" +#include <memory> #include <ostream> #include <string> #include <utility> diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index f65abc8..d1af9e6 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -6,7 +6,7 @@ #include <assert.h> #include <iterator> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <sstream> #include <utility> diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 2139a45..57e500e 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -8,7 +8,7 @@ #include <assert.h> #include <iterator> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <ostream> #include <utility> diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index 3055e18..a99d8e7 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -13,7 +13,7 @@ #include "cmOSXBundleGenerator.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 585db42..2d055ff 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -13,6 +13,7 @@ #include <assert.h> #include <functional> #include <sstream> +#include <vector> /* Directory ordering computation. diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h index 9c52129..619fff1 100644 --- a/Source/cmQtAutoGen.h +++ b/Source/cmQtAutoGen.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h index d56153a..d7f4cc6 100644 --- a/Source/cmQtAutoGenGlobalInitializer.h +++ b/Source/cmQtAutoGenGlobalInitializer.h @@ -8,7 +8,7 @@ #include "cmQtAutoGen.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <unordered_map> #include <vector> diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h index aa073d1..eb0d35e 100644 --- a/Source/cmQtAutoGenInitializer.h +++ b/Source/cmQtAutoGenInitializer.h @@ -8,7 +8,7 @@ #include "cmQtAutoGen.h" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <ostream> #include <set> #include <string> diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index e1c435b..3a3162d 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -14,6 +14,8 @@ #include "cmSystemTools.h" #include "cmake.h" +#include <memory> + cmQtAutoGenerator::Logger::Logger() { // Initialize logger diff --git a/Source/cmQtAutoMocUic.h b/Source/cmQtAutoMocUic.h index 8061c13..dc18328 100644 --- a/Source/cmQtAutoMocUic.h +++ b/Source/cmQtAutoMocUic.h @@ -14,7 +14,7 @@ #include <atomic> #include <cstddef> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <unordered_map> diff --git a/Source/cmRuntimeDependencyArchive.h b/Source/cmRuntimeDependencyArchive.h index ec3ecd4..67efec7 100644 --- a/Source/cmRuntimeDependencyArchive.h +++ b/Source/cmRuntimeDependencyArchive.h @@ -9,7 +9,7 @@ #include "cmsys/RegularExpression.hxx" #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmServer.h b/Source/cmServer.h index aba4924..ab2ad23 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -10,7 +10,7 @@ #include "cmUVHandlePtr.h" -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmState.h b/Source/cmState.h index accd838..0649ace 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -6,6 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> +#include <memory> #include <set> #include <string> #include <vector> diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index 6ca1c9f..3f70ed3 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -6,6 +6,7 @@ #include <algorithm> #include <assert.h> #include <iterator> +#include <vector> #include "cmAlgorithms.h" #include "cmProperty.h" diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 998f904..10ccac0 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -8,7 +8,7 @@ #include <algorithm> #include <ctype.h> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmTarget.h b/Source/cmTarget.h index fdcca47..f47cc14 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <utility> diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 498953e..916784c 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTestGenerator.h" +#include <memory> #include <ostream> #include <utility> +#include <vector> #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" diff --git a/Source/cmUVProcessChain.h b/Source/cmUVProcessChain.h index 2b33520..75f8f66 100644 --- a/Source/cmUVProcessChain.h +++ b/Source/cmUVProcessChain.h @@ -7,7 +7,7 @@ #include <array> #include <iosfwd> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index 1230101..acac2c1 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <string> #include <vector> diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0420881..d17a6d8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -19,7 +19,7 @@ #include "windows.h" #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> static void ConvertToWindowsSlash(std::string& s); diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index a01fa6f..0d3bdf8 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -9,7 +9,7 @@ #include "cmMessageType.h" #include "cmSystemTools.h" -#include <memory> // IWYU pragma: keep +#include <memory> cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/Source/cmWorkerPool.h b/Source/cmWorkerPool.h index f08bb4f..5cc308b 100644 --- a/Source/cmWorkerPool.h +++ b/Source/cmWorkerPool.h @@ -7,7 +7,7 @@ #include "cmAlgorithms.h" // IWYU pragma: keep -#include <memory> // IWYU pragma: keep +#include <memory> #include <stdint.h> #include <string> #include <utility> diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ca3b405..b8238a2 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -104,7 +104,7 @@ #include <cstring> #include <initializer_list> #include <iostream> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Source/cmake.h b/Source/cmake.h index c03872b..6aa00e1 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -7,7 +7,7 @@ #include <functional> #include <map> -#include <memory> // IWYU pragma: keep +#include <memory> #include <set> #include <string> #include <unordered_set> diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 86082e5..effc094 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -41,7 +41,7 @@ #include <array> #include <iostream> #include <iterator> -#include <memory> // IWYU pragma: keep +#include <memory> #include <sstream> #include <stdio.h> #include <stdlib.h> diff --git a/Tests/CMakeLib/testUVProcessChain.cxx b/Tests/CMakeLib/testUVProcessChain.cxx index 72ae602..e926350 100644 --- a/Tests/CMakeLib/testUVProcessChain.cxx +++ b/Tests/CMakeLib/testUVProcessChain.cxx @@ -10,6 +10,7 @@ #include <algorithm> #include <functional> #include <iostream> +#include <memory> #include <sstream> #include <string> #include <vector> diff --git a/Tests/CMakeServerLib/testServerBuffering.cpp b/Tests/CMakeServerLib/testServerBuffering.cpp index 7330ead..8b0b89b 100644 --- a/Tests/CMakeServerLib/testServerBuffering.cpp +++ b/Tests/CMakeServerLib/testServerBuffering.cpp @@ -1,6 +1,8 @@ #include "cmConnection.h" #include "cmServerConnection.h" + #include <iostream> +#include <memory> #include <string> #include <vector> diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 0393ff1..4e00214 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -42,10 +42,17 @@ { symbol: [ "std::istringstream", private, "<sstream>", public ] }, { symbol: [ "std::ostringstream", private, "<sstream>", public ] }, - # HACK: iwyu suggests those two files each time vector[] is used. + # HACK: iwyu suggests <ext/alloc_traits.h> and <memory> each time vector[] is used. # https://github.com/include-what-you-use/include-what-you-use/issues/166 { include: [ "<ext/alloc_traits.h>", private, "<vector>", public ] }, - { include: [ "<memory>", public, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmComputeComponentGraph::TarjanEntry> >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmFortranFile> >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmGraphEdgeList> >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmOrderDirectories::ConflictList> >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<cmStateSnapshot> >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<std::basic_string<char> > >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > > >::value_type", private, "<vector>", public ] }, + { symbol: [ "std::allocator_traits<std::allocator<uv_stdio_container_s> >::value_type", private, "<vector>", public ] }, # TODO: enable this block and remove some <utility> includes? #{ symbol: [ "std::pair", private, "<utility>", public ] }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf2244681b2cbbd2684187e628e00c0600ae4122 commit bf2244681b2cbbd2684187e628e00c0600ae4122 Author: Hong Xu <h...@topbug.net> AuthorDate: Sun Jul 7 15:59:47 2019 -0700 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Jul 10 09:51:38 2019 -0400 CheckSymbolExists: Add examples for check_symbol_exists Add examples in `CheckCXXSymbolExists` too. Co-Author: Brad King <brad.k...@kitware.com> diff --git a/Modules/CheckCXXSymbolExists.cmake b/Modules/CheckCXXSymbolExists.cmake index 3364e2f..b112094 100644 --- a/Modules/CheckCXXSymbolExists.cmake +++ b/Modules/CheckCXXSymbolExists.cmake @@ -44,6 +44,17 @@ the way the check is run: command. See policy :policy:`CMP0075`. ``CMAKE_REQUIRED_QUIET`` execute quietly without messages. + +For example: + +.. code-block:: cmake + + include(CheckCXXSymbolExists) + + # Check for macro SEEK_SET + check_cxx_symbol_exists(SEEK_SET "cstdio" HAVE_SEEK_SET) + # Check for function std::fopen + check_cxx_symbol_exists(std::fopen "cstdio" HAVE_STD_FOPEN) #]=======================================================================] include_guard(GLOBAL) diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index b9ef808..c2f488a 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -45,6 +45,17 @@ the way the check is run: command. See policy :policy:`CMP0075`. ``CMAKE_REQUIRED_QUIET`` execute quietly without messages. + +For example: + +.. code-block:: cmake + + include(CheckSymbolExists) + + # Check for macro SEEK_SET + check_symbol_exists(SEEK_SET "stdio.h" HAVE_SEEK_SET) + # Check for function fopen + check_symbol_exists(fopen "stdio.h" HAVE_FOPEN) #]=======================================================================] include_guard(GLOBAL) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cafaa5883a0ef4371a1435de5e56a7825679bb2b commit cafaa5883a0ef4371a1435de5e56a7825679bb2b Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Jul 10 09:50:04 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Jul 10 09:51:38 2019 -0400 CheckCXXSymbolExists: Clarify documented role diff --git a/Modules/CheckCXXSymbolExists.cmake b/Modules/CheckCXXSymbolExists.cmake index 2cccd09..3364e2f 100644 --- a/Modules/CheckCXXSymbolExists.cmake +++ b/Modules/CheckCXXSymbolExists.cmake @@ -5,26 +5,27 @@ CheckCXXSymbolExists -------------------- -Check if a symbol exists as a function, variable, or macro in C++ +Check if a symbol exists as a function, variable, or macro in ``C++``. -.. command:: CHECK_CXX_SYMBOL_EXISTS +.. command:: check_cxx_symbol_exists .. code-block:: cmake - CHECK_CXX_SYMBOL_EXISTS(<symbol> <files> <variable>) + check_cxx_symbol_exists(<symbol> <files> <variable>) Check that the ``<symbol>`` is available after including given header ``<files>`` and store the result in a ``<variable>``. Specify the list of files in one argument as a semicolon-separated list. - ``CHECK_CXX_SYMBOL_EXISTS()`` can be used to check in C++ files, as - opposed to ``CHECK_SYMBOL_EXISTS()``, which works only for ``C``. + ``check_cxx_symbol_exists()`` can be used to check for symbols as seen by + the C++ compiler, as opposed to :command:`check_symbol_exists`, which always + uses the ``C`` compiler. If the header files define the symbol as a macro it is considered available and assumed to work. If the header files declare the symbol as a function or variable then the symbol must also be available for - linking. If the symbol is a type or enum value it will not be - recognized (consider using :module:`CheckTypeSize` - or :module:`CheckCXXSourceCompiles`). + linking. If the symbol is a type, enum value, or C++ template it will + not be recognized: consider using the :module:`CheckTypeSize` + or :module:`CheckCXXSourceCompiles` module instead. The following variables may be set before calling this macro to modify the way the check is run: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09c1991895baf0eeca028672a6730f2101d3b2b7 commit 09c1991895baf0eeca028672a6730f2101d3b2b7 Author: Martin Gerhardy <martin.gerha...@gmail.com> AuthorDate: Mon Jul 8 10:57:34 2019 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Jul 9 13:34:29 2019 -0400 Eclipse: Add option to set the resource encoding diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index cd8385b..69e199f 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -915,6 +915,7 @@ syn keyword cmakeVariable contained \ CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES \ CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT \ CMAKE_ECLIPSE_MAKE_ARGUMENTS + \ CMAKE_ECLIPSE_RESOURCE_ENCODING \ CMAKE_ECLIPSE_VERSION \ CMAKE_EDIT_COMMAND \ CMAKE_ENABLE_EXPORTS diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index cc6a7d2..b9f17d0 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -157,6 +157,7 @@ Variables that Change Behavior /variable/CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES /variable/CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT /variable/CMAKE_ECLIPSE_MAKE_ARGUMENTS + /variable/CMAKE_ECLIPSE_RESOURCE_ENCODING /variable/CMAKE_ECLIPSE_VERSION /variable/CMAKE_ERROR_DEPRECATED /variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION diff --git a/Help/release/dev/eclipse-resource-encoding.rst b/Help/release/dev/eclipse-resource-encoding.rst new file mode 100644 index 0000000..6ceca0c --- /dev/null +++ b/Help/release/dev/eclipse-resource-encoding.rst @@ -0,0 +1,6 @@ +eclipse-resource-encoding +------------------------- + +* The :generator:`Eclipse CDT4` extra generator gained a new + :variable:`CMAKE_ECLIPSE_RESOURCE_ENCODING` option to specify + the resource encoding. diff --git a/Help/variable/CMAKE_ECLIPSE_RESOURCE_ENCODING.rst b/Help/variable/CMAKE_ECLIPSE_RESOURCE_ENCODING.rst new file mode 100644 index 0000000..314efe5 --- /dev/null +++ b/Help/variable/CMAKE_ECLIPSE_RESOURCE_ENCODING.rst @@ -0,0 +1,6 @@ +CMAKE_ECLIPSE_RESOURCE_ENCODING +------------------------------- + +This cache variable tells the :generator:`Eclipse CDT4` project generator +to set the resource encoding to the given value in generated project files. +If no value is given, no encoding will be set. diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index aece3bc..73984a8 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -164,6 +164,29 @@ void cmExtraEclipseCDT4Generator::Generate() // create a .cproject file this->CreateCProjectFile(); + + // create resource settings + this->CreateSettingsResourcePrefsFile(); +} + +void cmExtraEclipseCDT4Generator::CreateSettingsResourcePrefsFile() +{ + cmLocalGenerator* lg = this->GlobalGenerator->GetLocalGenerators()[0]; + cmMakefile* mf = lg->GetMakefile(); + + const std::string filename = + this->HomeOutputDirectory + "/.settings/org.eclipse.core.resources.prefs"; + + cmGeneratedFileStream fout(filename); + if (!fout) { + return; + } + + fout << "eclipse.preferences.version=1" << std::endl; + const char* encoding = mf->GetDefinition("CMAKE_ECLIPSE_RESOURCE_ENCODING"); + if (encoding) { + fout << "encoding/<project>=" << encoding << std::endl; + } } void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index 5136660..ef038d9 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -43,6 +43,9 @@ private: // create .project file in the source tree void CreateSourceProjectFile(); + // create .settings/org.eclipse.core.resources.prefs + void CreateSettingsResourcePrefsFile(); + // create .project file void CreateProjectFile(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adcbdb143cfd302c6b3ae6da9b53f469e01a900b commit adcbdb143cfd302c6b3ae6da9b53f469e01a900b Author: Stephen Manz <6985-srm...@users.noreply.gitlab.kitware.com> AuthorDate: Wed Jun 26 09:01:45 2019 -0700 Commit: Stephen Manz <6985-srm...@users.noreply.gitlab.kitware.com> CommitDate: Tue Jul 9 09:01:04 2019 -0700 CTest: Clean up stdout and logfile output for Pass/Fail regex For pass regex, display only the element that was found, rather than all elements Rename loop variable for fail regex, from pass to fail For consistency, add space in output for pass Add tests that find and don't find PASS_REGULAR_EXPRESSION, and a test that finds FAIL_REGULAR_EXPRESSION, whose LastTest.log files are checked using *-check.cmake. diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 31976b9..b865cab 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -85,27 +85,30 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) if (pass.first.find(this->ProcessOutput)) { found = true; reason = "Required regular expression found."; + reason += " Regex=["; + reason += pass.second; + reason += "]"; break; } } if (!found) { reason = "Required regular expression not found."; + reason += " Regex=["; + for (auto& pass : this->TestProperties->RequiredRegularExpressions) { + reason += pass.second; + reason += "\n"; + } + reason += "]"; forceFail = true; } - reason += "Regex=["; - for (auto& pass : this->TestProperties->RequiredRegularExpressions) { - reason += pass.second; - reason += "\n"; - } - reason += "]"; } if (!this->TestProperties->ErrorRegularExpressions.empty() && this->FailedDependencies.empty()) { - for (auto& pass : this->TestProperties->ErrorRegularExpressions) { - if (pass.first.find(this->ProcessOutput)) { + for (auto& fail : this->TestProperties->ErrorRegularExpressions) { + if (fail.first.find(this->ProcessOutput)) { reason = "Error regular expression found in output."; reason += " Regex=["; - reason += pass.second; + reason += fail.second; reason += "]"; forceFail = true; break; diff --git a/Tests/RunCMake/CTestCommandLine/FailRegexFound-check.cmake b/Tests/RunCMake/CTestCommandLine/FailRegexFound-check.cmake new file mode 100644 index 0000000..1097788 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/FailRegexFound-check.cmake @@ -0,0 +1,13 @@ +set(last_test_log "${RunCMake_TEST_BINARY_DIR}/Testing/Temporary/LastTest.log") +if(EXISTS "${last_test_log}") + file(READ "${last_test_log}" last_test_log_content) + string(REGEX REPLACE "\n+$" "" last_test_log_content "${last_test_log_content}") + if(NOT last_test_log_content MATCHES " +Test Pass Reason: +Error regular expression found in output. Regex=[[]test1]") + string(REPLACE "\n" "\n " last_test_log_content " ${last_test_log_content}") + set(RunCMake_TEST_FAILED "LastTest.log does not have expected content:\n${last_test_log_content}") + endif() +else() + set(RunCMake_TEST_FAILED "LastTest.log missing:\n ${last_test_log}") +endif() diff --git a/Tests/RunCMake/CTestCommandLine/RequiredRegexFound-check.cmake b/Tests/RunCMake/CTestCommandLine/RequiredRegexFound-check.cmake new file mode 100644 index 0000000..bde60d1 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/RequiredRegexFound-check.cmake @@ -0,0 +1,13 @@ +set(last_test_log "${RunCMake_TEST_BINARY_DIR}/Testing/Temporary/LastTest.log") +if(EXISTS "${last_test_log}") + file(READ "${last_test_log}" last_test_log_content) + string(REGEX REPLACE "\n+$" "" last_test_log_content "${last_test_log_content}") + if(NOT last_test_log_content MATCHES " +Test Pass Reason: +Required regular expression found. Regex=[[]test1]") + string(REPLACE "\n" "\n " last_test_log_content " ${last_test_log_content}") + set(RunCMake_TEST_FAILED "LastTest.log does not have expected content:\n${last_test_log_content}") + endif() +else() + set(RunCMake_TEST_FAILED "LastTest.log missing:\n ${last_test_log}") +endif() diff --git a/Tests/RunCMake/CTestCommandLine/RequiredRegexNotFound-check.cmake b/Tests/RunCMake/CTestCommandLine/RequiredRegexNotFound-check.cmake new file mode 100644 index 0000000..6d420f3 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/RequiredRegexNotFound-check.cmake @@ -0,0 +1,16 @@ +set(last_test_log "${RunCMake_TEST_BINARY_DIR}/Testing/Temporary/LastTest.log") +if(EXISTS "${last_test_log}") + file(READ "${last_test_log}" last_test_log_content) + string(REGEX REPLACE "\n+$" "" last_test_log_content "${last_test_log_content}") + if(NOT last_test_log_content MATCHES " +Test Pass Reason: +Required regular expression not found. Regex=[[]foo +toast1 +bar +]") + string(REPLACE "\n" "\n " last_test_log_content " ${last_test_log_content}") + set(RunCMake_TEST_FAILED "LastTest.log does not have expected content:\n${last_test_log_content}") + endif() +else() + set(RunCMake_TEST_FAILED "LastTest.log missing:\n ${last_test_log}") +endif() diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index d524f41..f417db0 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -78,6 +78,48 @@ endfunction() run_LabelCount() +function(run_RequiredRegexFoundTest) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RequiredRegexFound) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" " +add_test(test1 \"${CMAKE_COMMAND}\" -E echo \"test1\") +set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION \"foo;test1;bar\") +") + + run_cmake_command(RequiredRegexFound ${CMAKE_CTEST_COMMAND} -V) +endfunction() +run_RequiredRegexFoundTest() + +function(run_RequiredRegexNotFoundTest) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RequiredRegexNotFound) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" " +add_test(test1 \"${CMAKE_COMMAND}\" -E echo \"test1\") +set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION \"foo;toast1;bar\" WILL_FAIL True) +") + + run_cmake_command(RequiredRegexNotFound ${CMAKE_CTEST_COMMAND} -V) +endfunction() +run_RequiredRegexNotFoundTest() + +function(run_FailRegexFoundTest) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/FailRegexFound) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" " +add_test(test1 \"${CMAKE_COMMAND}\" -E echo \"test1\") +set_tests_properties(test1 PROPERTIES FAIL_REGULAR_EXPRESSION \"foo;test1;bar\" WILL_FAIL True) +") + + run_cmake_command(FailRegexFound ${CMAKE_CTEST_COMMAND} -V) +endfunction() +run_FailRegexFoundTest() + function(run_SerialFailed) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SerialFailed) set(RunCMake_TEST_NO_CLEAN 1) ----------------------------------------------------------------------- Summary of changes: Auxiliary/vim/syntax/cmake.vim | 1 + Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/eclipse-resource-encoding.rst | 6 ++++ Help/variable/CMAKE_ECLIPSE_RESOURCE_ENCODING.rst | 6 ++++ Modules/CheckCXXSymbolExists.cmake | 28 ++++++++++----- Modules/CheckSymbolExists.cmake | 11 ++++++ Source/CPack/cmCPackGenerator.cxx | 2 +- Source/CPack/cpack.cxx | 1 - Source/CTest/cmCTestLaunch.cxx | 1 - Source/CTest/cmCTestMultiProcessHandler.cxx | 2 ++ Source/CTest/cmCTestRunTest.cxx | 21 ++++++----- Source/CTest/cmCTestRunTest.h | 3 +- Source/CTest/cmCTestTestHandler.cxx | 2 +- Source/CTest/cmCTestUpdateHandler.cxx | 2 +- Source/cmBinUtilsLinuxELFLinker.h | 2 +- Source/cmBinUtilsMacOSMachOLinker.h | 2 +- Source/cmBinUtilsWindowsPELinker.h | 2 +- Source/cmCTest.cxx | 2 +- Source/cmCTest.h | 2 +- Source/cmComputeLinkDepends.h | 1 + Source/cmCryptoHash.cxx | 2 +- Source/cmCryptoHash.h | 2 +- Source/cmCustomCommandGenerator.cxx | 2 +- Source/cmELF.cxx | 2 +- Source/cmExecuteProcessCommand.cxx | 3 ++ Source/cmExportBuildAndroidMKGenerator.cxx | 1 - Source/cmExportFileGenerator.cxx | 2 +- Source/cmExportLibraryDependenciesCommand.cxx | 2 +- Source/cmExportTryCompileFileGenerator.cxx | 2 +- Source/cmExtraEclipseCDT4Generator.cxx | 23 ++++++++++++ Source/cmExtraEclipseCDT4Generator.h | 3 ++ Source/cmFileAPI.h | 2 +- Source/cmFileAPICodemodel.cxx | 1 + Source/cmFileCommand.cxx | 2 +- Source/cmFileTimes.h | 2 +- Source/cmFindPackageCommand.cxx | 2 +- Source/cmForEachCommand.cxx | 2 +- Source/cmGeneratorExpression.cxx | 2 +- Source/cmGeneratorExpression.h | 2 +- Source/cmGeneratorExpressionEvaluationFile.cxx | 2 +- Source/cmGeneratorExpressionEvaluationFile.h | 2 +- Source/cmGeneratorExpressionNode.cxx | 2 +- Source/cmGeneratorTarget.cxx | 2 +- Source/cmGhsMultiTargetGenerator.cxx | 2 ++ Source/cmGlobalGenerator.h | 1 + Source/cmGlobalNinjaGenerator.cxx | 2 +- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 1 + Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmGraphVizWriter.cxx | 2 +- Source/cmIfCommand.cxx | 2 +- Source/cmInstallDirectoryGenerator.cxx | 2 +- Source/cmInstallFilesGenerator.cxx | 2 +- Source/cmInstallScriptGenerator.cxx | 1 + Source/cmInstallTargetGenerator.cxx | 1 + Source/cmInstalledFile.h | 2 +- Source/cmJsonObjects.cxx | 1 + Source/cmListCommand.cxx | 2 ++ Source/cmListFileCache.h | 2 +- Source/cmLocalGenerator.cxx | 4 ++- Source/cmLocalNinjaGenerator.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.cxx | 2 +- Source/cmLocalVisualStudioGenerator.h | 2 +- Source/cmMakefile.cxx | 2 +- Source/cmMakefile.h | 2 +- Source/cmMakefileExecutableTargetGenerator.cxx | 2 +- Source/cmMakefileLibraryTargetGenerator.cxx | 2 +- Source/cmMakefileTargetGenerator.cxx | 2 +- Source/cmMakefileTargetGenerator.h | 1 + Source/cmMakefileUtilityTargetGenerator.cxx | 1 + Source/cmNinjaNormalTargetGenerator.cxx | 2 +- Source/cmNinjaTargetGenerator.cxx | 2 +- Source/cmNinjaTargetGenerator.h | 2 +- Source/cmOrderDirectories.cxx | 1 + Source/cmQtAutoGen.h | 2 +- Source/cmQtAutoGenGlobalInitializer.h | 2 +- Source/cmQtAutoGenInitializer.h | 2 +- Source/cmQtAutoGenerator.cxx | 2 ++ Source/cmQtAutoMocUic.h | 2 +- Source/cmRuntimeDependencyArchive.h | 2 +- Source/cmServer.h | 2 +- Source/cmState.h | 1 + Source/cmStateDirectory.cxx | 1 + Source/cmStringCommand.cxx | 2 +- Source/cmTarget.h | 2 +- Source/cmTestGenerator.cxx | 2 ++ Source/cmUVProcessChain.h | 2 +- Source/cmVariableWatch.h | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- Source/cmWhileCommand.cxx | 2 +- Source/cmWorkerPool.h | 2 +- Source/cmake.cxx | 2 +- Source/cmake.h | 2 +- Source/cmcmd.cxx | 2 +- Tests/CMakeLib/testUVProcessChain.cxx | 1 + Tests/CMakeServerLib/testServerBuffering.cpp | 2 ++ .../CTestCommandLine/FailRegexFound-check.cmake | 13 +++++++ .../RequiredRegexFound-check.cmake | 13 +++++++ .../RequiredRegexNotFound-check.cmake | 16 +++++++++ Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 42 ++++++++++++++++++++++ Utilities/IWYU/mapping.imp | 11 ++++-- 101 files changed, 271 insertions(+), 86 deletions(-) create mode 100644 Help/release/dev/eclipse-resource-encoding.rst create mode 100644 Help/variable/CMAKE_ECLIPSE_RESOURCE_ENCODING.rst create mode 100644 Tests/RunCMake/CTestCommandLine/FailRegexFound-check.cmake create mode 100644 Tests/RunCMake/CTestCommandLine/RequiredRegexFound-check.cmake create mode 100644 Tests/RunCMake/CTestCommandLine/RequiredRegexNotFound-check.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits