From kwrobot at kitware.com Mon Dec 1 00:01:09 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 1 Dec 2014 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-395-gb9d437a Message-ID: <20141201050109.BDE80A7F34@public.kitware.com> This is an automated email from 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 b9d437a2921cd808cff27ccdd4d39cabcd87bf5a (commit) from 9e4e0a2307325047d9334081915aa5fc0de2090e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9d437a2921cd808cff27ccdd4d39cabcd87bf5a commit b9d437a2921cd808cff27ccdd4d39cabcd87bf5a Author: Kitware Robot AuthorDate: Mon Dec 1 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Mon Dec 1 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 81e54dc..c8c6a5b 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 1) -set(CMake_VERSION_PATCH 20141130) +set(CMake_VERSION_PATCH 20141201) #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 Dec 1 08:34:00 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:34:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-923-gc24ed85 Message-ID: <20141201133400.93EEBA838B@public.kitware.com> This is an automated email from 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 c24ed856f76be6d3c6f41ec220da5a6325e02637 (commit) via 191d2b209bbd875bc0885a8a413dc340ab5e01b4 (commit) from c20f95c88000a5f99c1d3e84bc52d5f5de82cece (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c24ed856f76be6d3c6f41ec220da5a6325e02637 commit c24ed856f76be6d3c6f41ec220da5a6325e02637 Merge: c20f95c 191d2b2 Author: Brad King AuthorDate: Mon Dec 1 08:33:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:33:59 2014 -0500 Merge topic 'doc-CMP0053-dedup-char' into next 191d2b20 Help: Remove duplicate '#' in CMP0053 valid character list http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=191d2b209bbd875bc0885a8a413dc340ab5e01b4 commit 191d2b209bbd875bc0885a8a413dc340ab5e01b4 Author: Christoph Gr?ninger AuthorDate: Sat Nov 29 19:30:05 2014 +0100 Commit: Brad King CommitDate: Mon Dec 1 08:32:51 2014 -0500 Help: Remove duplicate '#' in CMP0053 valid character list diff --git a/Help/policy/CMP0053.rst b/Help/policy/CMP0053.rst index fac430e..bb0ff8b 100644 --- a/Help/policy/CMP0053.rst +++ b/Help/policy/CMP0053.rst @@ -28,7 +28,7 @@ cleaned up to simplify the behavior. Specifically: so improper variable reference syntax is always an error. * More characters are allowed to be escaped in variable names. - Previously, only ``()#" \#@^`` were valid characters to + Previously, only ``()#" \@^`` were valid characters to escape. Now any non-alphanumeric, non-semicolon, non-NUL character may be escaped following the ``escape_identity`` production in the :ref:`Escape Sequences` section of the ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0053.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:45:35 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:45:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-929-g2277af9 Message-ID: <20141201134535.AD304A7304@public.kitware.com> This is an automated email from 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 2277af9de5a7cdb3d700746716f88390cadb4fb2 (commit) via b9d437a2921cd808cff27ccdd4d39cabcd87bf5a (commit) via 9e4e0a2307325047d9334081915aa5fc0de2090e (commit) via 584d625a04a65c89b867f15ceef5fbfdaddd633d (commit) via 0963fb64c62a7cd336c68e95c6935d084cfa114f (commit) via 3fae1f9265163d5570078ce01141de06ec55e611 (commit) from c24ed856f76be6d3c6f41ec220da5a6325e02637 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2277af9de5a7cdb3d700746716f88390cadb4fb2 commit 2277af9de5a7cdb3d700746716f88390cadb4fb2 Merge: c24ed85 b9d437a Author: Brad King AuthorDate: Mon Dec 1 08:45:31 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 08:45:31 2014 -0500 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 Dec 1 08:48:52 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:48:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-933-gb8b3214 Message-ID: <20141201134852.9B1B5A76AC@public.kitware.com> This is an automated email from 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 b8b3214f0a3cb78e84c3b3c00547ab0533987fd3 (commit) via 89bb34d3499efd0ae78324d53ca0bdead2c3e660 (commit) via 07254a8166f7f45d284b0982c59b185037d21bc1 (commit) via a1aceb2585cb4b1e4e58ac32d9435ed43ad2d1d2 (commit) from 2277af9de5a7cdb3d700746716f88390cadb4fb2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8b3214f0a3cb78e84c3b3c00547ab0533987fd3 commit b8b3214f0a3cb78e84c3b3c00547ab0533987fd3 Merge: 2277af9 89bb34d Author: Brad King AuthorDate: Mon Dec 1 08:48:51 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:48:51 2014 -0500 Merge topic 'doc-installed-file-property' into next 89bb34d3 Help: Add 3.1 release notes for INSTALL property scope 07254a81 Help: Document installed file property API a1aceb25 Help: Format set_property and get_property command docs http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89bb34d3499efd0ae78324d53ca0bdead2c3e660 commit 89bb34d3499efd0ae78324d53ca0bdead2c3e660 Author: Brad King AuthorDate: Wed Nov 26 17:33:53 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 08:48:22 2014 -0500 Help: Add 3.1 release notes for INSTALL property scope diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index 65aae00..c6a9717 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -69,9 +69,15 @@ Commands :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` variables to skip searching the package registries. +* The :command:`get_property` command learned a new ``INSTALL`` scope + for properties. + * The :command:`install` command learned a ``MESSAGE_NEVER`` option to avoid output during installation. +* The :command:`set_property` command learned a new ``INSTALL`` scope + for properties. + * The :command:`string` command learned a new ``GENEX_STRIP`` subcommand which removes :manual:`generator expression `. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07254a8166f7f45d284b0982c59b185037d21bc1 commit 07254a8166f7f45d284b0982c59b185037d21bc1 Author: Nils Gladitz AuthorDate: Wed Nov 26 17:22:24 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 08:48:19 2014 -0500 Help: Document installed file property API Since commit v3.1.0-rc1~479^2~1 (Add an "installed file" property scope, 2014-05-15) the get_property and set_property commands support an 'INSTALL' scope. Add documentation for this scope. diff --git a/Help/command/get_property.rst b/Help/command/get_property.rst index abec8f9..632ece6 100644 --- a/Help/command/get_property.rst +++ b/Help/command/get_property.rst @@ -10,6 +10,7 @@ Get a property. DIRECTORY [dir] | TARGET | SOURCE | + INSTALL | TEST | CACHE | VARIABLE> @@ -35,6 +36,9 @@ be one of the following: ``SOURCE`` Scope must name one source file. +``INSTALL`` + Scope must name one installed file path. + ``TEST`` Scope must name one existing test. diff --git a/Help/command/set_property.rst b/Help/command/set_property.rst index 8c4f610..6200230 100644 --- a/Help/command/set_property.rst +++ b/Help/command/set_property.rst @@ -9,6 +9,7 @@ Set a named property in a given scope. DIRECTORY [dir] | TARGET [target1 [target2 ...]] | SOURCE [src1 [src2 ...]] | + INSTALL [file1 [file2 ...]] | TEST [test1 [test2 ...]] | CACHE [entry1 [entry2 ...]]> [APPEND] [APPEND_STRING] @@ -34,6 +35,22 @@ be one of the following: file properties are visible only to targets added in the same directory (CMakeLists.txt). +``INSTALL`` + Scope may name zero or more installed file paths. + These are made available to CPack to influence deployment. + + Both the property key and value may use generator expressions. + Specific properties may apply to installed files and/or directories. + + Path components have to be separated by forward slashes, + must be normalized and are case sensitive. + + To reference the installation prefix itself with a relative path use ".". + + Currently installed file properties are only defined for + the WIX generator where the given paths are relative + to the installation prefix. + ``TEST`` Scope may name zero or more existing tests. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1aceb2585cb4b1e4e58ac32d9435ed43ad2d1d2 commit a1aceb2585cb4b1e4e58ac32d9435ed43ad2d1d2 Author: Brad King AuthorDate: Wed Nov 26 17:27:31 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 08:47:58 2014 -0500 Help: Format set_property and get_property command docs diff --git a/Help/command/get_property.rst b/Help/command/get_property.rst index c2937be..abec8f9 100644 --- a/Help/command/get_property.rst +++ b/Help/command/get_property.rst @@ -21,29 +21,37 @@ specifies the variable in which to store the result. The second argument determines the scope from which to get the property. It must be one of the following: -GLOBAL scope is unique and does not accept a name. +``GLOBAL`` + Scope is unique and does not accept a name. -DIRECTORY scope defaults to the current directory but another -directory (already processed by CMake) may be named by full or -relative path. +``DIRECTORY`` + Scope defaults to the current directory but another + directory (already processed by CMake) may be named by full or + relative path. -TARGET scope must name one existing target. +``TARGET`` + Scope must name one existing target. -SOURCE scope must name one source file. +``SOURCE`` + Scope must name one source file. -TEST scope must name one existing test. +``TEST`` + Scope must name one existing test. -CACHE scope must name one cache entry. +``CACHE`` + Scope must name one cache entry. -VARIABLE scope is unique and does not accept a name. +``VARIABLE`` + Scope is unique and does not accept a name. -The required PROPERTY option is immediately followed by the name of +The required ``PROPERTY`` option is immediately followed by the name of the property to get. If the property is not set an empty value is -returned. If the SET option is given the variable is set to a boolean -value indicating whether the property has been set. If the DEFINED +returned. If the ``SET`` option is given the variable is set to a boolean +value indicating whether the property has been set. If the ``DEFINED`` option is given the variable is set to a boolean value indicating -whether the property has been defined such as with define_property. -If BRIEF_DOCS or FULL_DOCS is given then the variable is set to a +whether the property has been defined such as with the +:command:`define_property` command. +If ``BRIEF_DOCS`` or ``FULL_DOCS`` is given then the variable is set to a string containing documentation for the requested property. If documentation is requested for a property that has not been defined -NOTFOUND is returned. +``NOTFOUND`` is returned. diff --git a/Help/command/set_property.rst b/Help/command/set_property.rst index 8cb963e..8c4f610 100644 --- a/Help/command/set_property.rst +++ b/Help/command/set_property.rst @@ -18,26 +18,32 @@ Set one property on zero or more objects of a scope. The first argument determines the scope in which the property is set. It must be one of the following: -GLOBAL scope is unique and does not accept a name. +``GLOBAL`` + Scope is unique and does not accept a name. -DIRECTORY scope defaults to the current directory but another -directory (already processed by CMake) may be named by full or -relative path. +``DIRECTORY`` + Scope defaults to the current directory but another + directory (already processed by CMake) may be named by full or + relative path. -TARGET scope may name zero or more existing targets. +``TARGET`` + Scope may name zero or more existing targets. -SOURCE scope may name zero or more source files. Note that source -file properties are visible only to targets added in the same -directory (CMakeLists.txt). +``SOURCE`` + Scope may name zero or more source files. Note that source + file properties are visible only to targets added in the same + directory (CMakeLists.txt). -TEST scope may name zero or more existing tests. +``TEST`` + Scope may name zero or more existing tests. -CACHE scope must name zero or more cache existing entries. +``CACHE`` + Scope must name zero or more cache existing entries. -The required PROPERTY option is immediately followed by the name of +The required ``PROPERTY`` option is immediately followed by the name of the property to set. Remaining arguments are used to compose the property value in the form of a semicolon-separated list. If the -APPEND option is given the list is appended to any existing property -value.If the APPEND_STRING option is given the string is append to any +``APPEND`` option is given the list is appended to any existing property +value. If the ``APPEND_STRING`` option is given the string is append to any existing property value as string, i.e. it results in a longer string and not a list of strings. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:18 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-397-g4d9fec4 Message-ID: <20141201135718.8DE45A7E7F@public.kitware.com> This is an automated email from 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 4d9fec4fb327b886c66a12a657864cb3fac69250 (commit) via d49f1c5e9400c6b5d6dc205b4dadad2fa21f6eb0 (commit) from b9d437a2921cd808cff27ccdd4d39cabcd87bf5a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d9fec4fb327b886c66a12a657864cb3fac69250 commit 4d9fec4fb327b886c66a12a657864cb3fac69250 Merge: b9d437a d49f1c5 Author: Brad King AuthorDate: Mon Dec 1 08:57:16 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:16 2014 -0500 Merge topic 'use-latest-language-dialects' d49f1c5e Build CMake with most-recent available language dialect. ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:20 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-399-g75a9f2f Message-ID: <20141201135720.B837DA7E85@public.kitware.com> This is an automated email from 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 75a9f2fb6bb263a717be7c30b0c512d2387aa514 (commit) via 75dee2f2c285030bbd02aabd7292cf5af9f5aec0 (commit) from 4d9fec4fb327b886c66a12a657864cb3fac69250 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75a9f2fb6bb263a717be7c30b0c512d2387aa514 commit 75a9f2fb6bb263a717be7c30b0c512d2387aa514 Merge: 4d9fec4 75dee2f Author: Brad King AuthorDate: Mon Dec 1 08:57:19 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:19 2014 -0500 Merge topic 'FindwxWidgets-new-versions' 75dee2f2 FindwxWidgets: Add versions 3.0.1 and 3.0.2 ----------------------------------------------------------------------- Summary of changes: Modules/FindwxWidgets.cmake | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-402-gd724640 Message-ID: <20141201135724.E2FBAA7EAD@public.kitware.com> This is an automated email from 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 d724640fa22e315b28f994fbcda43ad006b4f57f (commit) via 808c77e2319a4a81a86b2df3bf8fbba6bdbac7ac (commit) via 7d674b5f0b28a610333644d417c2e8cb796cc9e4 (commit) from 75a9f2fb6bb263a717be7c30b0c512d2387aa514 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d724640fa22e315b28f994fbcda43ad006b4f57f commit d724640fa22e315b28f994fbcda43ad006b4f57f Merge: 75a9f2f 808c77e Author: Brad King AuthorDate: Mon Dec 1 08:57:23 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:23 2014 -0500 Merge topic 'revert-cached-regex-clear-for-master' 808c77e2 Merge branch 'revert-cached-regex-clear' into revert-cached-regex-clear-for-master 7d674b5f Revert "ClearMatches: Only clear matches which were actually set" (#15261) ----------------------------------------------------------------------- Summary of changes: Source/cmConditionEvaluator.cxx | 5 +++-- Source/cmMakefile.cxx | 47 --------------------------------------- Source/cmMakefile.h | 5 ----- Source/cmStringCommand.cxx | 44 +++++++++++++++++++++++++++++++----- Source/cmStringCommand.h | 2 ++ 5 files changed, 43 insertions(+), 60 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:27 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-404-g9f59caa Message-ID: <20141201135727.48D5DA7E85@public.kitware.com> This is an automated email from 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 9f59caa9bd1aba3de27aa2fbab89b56c6b99d9b9 (commit) via 84d124e8f02d5bba60d3491d4c5d7cb68aa91192 (commit) from d724640fa22e315b28f994fbcda43ad006b4f57f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f59caa9bd1aba3de27aa2fbab89b56c6b99d9b9 commit 9f59caa9bd1aba3de27aa2fbab89b56c6b99d9b9 Merge: d724640 84d124e Author: Brad King AuthorDate: Mon Dec 1 08:57:25 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:25 2014 -0500 Merge topic 'fix-source-case-matching' 84d124e8 Fix lookup of source names after conversion to their actual case (#15259) ----------------------------------------------------------------------- Summary of changes: Source/cmSourceFileLocation.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:29 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-406-g22b72b1 Message-ID: <20141201135729.69211A7E99@public.kitware.com> This is an automated email from 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 22b72b189400c1a50030b59c378ebb68460ac7db (commit) via 672f1001c015bf5f531d8731dba30a5fb856edea (commit) from 9f59caa9bd1aba3de27aa2fbab89b56c6b99d9b9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22b72b189400c1a50030b59c378ebb68460ac7db commit 22b72b189400c1a50030b59c378ebb68460ac7db Merge: 9f59caa 672f100 Author: Brad King AuthorDate: Mon Dec 1 08:57:28 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:28 2014 -0500 Merge topic 'fix-transitive-OBJECT_SOURCES-context' 672f1001 Genex: Fix evaluation context propagation for TARGET_OBJECTS. ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpressionEvaluator.cxx | 74 ++++++++++++++++------------- Tests/InterfaceLibrary/CMakeLists.txt | 5 +- 2 files changed, 44 insertions(+), 35 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:31 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-408-g8b5591f Message-ID: <20141201135731.593E5A7E7F@public.kitware.com> This is an automated email from 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 8b5591f93ed85c6f84f2b4c076be98c57b871d1c (commit) via 191d2b209bbd875bc0885a8a413dc340ab5e01b4 (commit) from 22b72b189400c1a50030b59c378ebb68460ac7db (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b5591f93ed85c6f84f2b4c076be98c57b871d1c commit 8b5591f93ed85c6f84f2b4c076be98c57b871d1c Merge: 22b72b1 191d2b2 Author: Brad King AuthorDate: Mon Dec 1 08:57:30 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:30 2014 -0500 Merge topic 'doc-CMP0053-dedup-char' 191d2b20 Help: Remove duplicate '#' in CMP0053 valid character list ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0053.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:33 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-412-g2a92231 Message-ID: <20141201135733.5EF06A7ED4@public.kitware.com> This is an automated email from 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 2a92231630b6aee671c7f4e8b64f69cfd172b9e3 (commit) via 89bb34d3499efd0ae78324d53ca0bdead2c3e660 (commit) via 07254a8166f7f45d284b0982c59b185037d21bc1 (commit) via a1aceb2585cb4b1e4e58ac32d9435ed43ad2d1d2 (commit) from 8b5591f93ed85c6f84f2b4c076be98c57b871d1c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a92231630b6aee671c7f4e8b64f69cfd172b9e3 commit 2a92231630b6aee671c7f4e8b64f69cfd172b9e3 Merge: 8b5591f 89bb34d Author: Brad King AuthorDate: Mon Dec 1 08:57:32 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:32 2014 -0500 Merge topic 'doc-installed-file-property' 89bb34d3 Help: Add 3.1 release notes for INSTALL property scope 07254a81 Help: Document installed file property API a1aceb25 Help: Format set_property and get_property command docs ----------------------------------------------------------------------- Summary of changes: Help/command/get_property.rst | 42 ++++++++++++++++++++++------------- Help/command/set_property.rst | 49 ++++++++++++++++++++++++++++++----------- Help/release/3.1.0.rst | 6 +++++ 3 files changed, 69 insertions(+), 28 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:35 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-416-g8e75f1d Message-ID: <20141201135735.C23EAA7EFA@public.kitware.com> This is an automated email from 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 8e75f1d2fa3049ac31f4ebdbc255fca3e6414802 (commit) via 8a75c7ef32af391cb45af889d266e2a77daa61d6 (commit) via e1348056662b9ae0d399374b6726173d7bf0e9bb (commit) via bb5905bb1342229c06cecee735322a8a28916b76 (commit) from 2a92231630b6aee671c7f4e8b64f69cfd172b9e3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e75f1d2fa3049ac31f4ebdbc255fca3e6414802 commit 8e75f1d2fa3049ac31f4ebdbc255fca3e6414802 Merge: 2a92231 8a75c7e Author: Brad King AuthorDate: Mon Dec 1 08:57:34 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 08:57:34 2014 -0500 Merge topic 'target-sources-error-conditions' 8a75c7ef Help: Document the export limitation of INTERFACE_SOURCES. e1348056 Export: Disallow export of targets with INTERFACE_SOURCES bb5905bb cmTarget: Don't allow relative paths in INTERFACE_SOURCES diff --cc Help/prop_tgt/INTERFACE_SOURCES.rst index a224b68,c8ca2e8..696ee95 --- a/Help/prop_tgt/INTERFACE_SOURCES.rst +++ b/Help/prop_tgt/INTERFACE_SOURCES.rst @@@ -1,17 -1,18 +1,21 @@@ INTERFACE_SOURCES ----------------- -List of interface sources to pass to the compiler. +List of interface sources to compile into consuming targets. Targets may populate this property to publish the sources -for consuming targets to compile. Consuming -targets can add entries to their own :prop_tgt:`SOURCES` property -such as ``$`` to use the -sources specified in the interface of ``foo``. +for consuming targets to compile. The :command:`target_sources` command +populates this property with values given to the ``PUBLIC`` and +``INTERFACE`` keywords. Projects may also get and set the property directly. + +When target dependencies are specified using :command:`target_link_libraries`, +CMake will read this property from all target dependencies to determine the +sources of the consumer. + Targets with ``INTERFACE_SOURCES`` may not be exported with the + :command:`export` or :command:`install(EXPORT)` commands. This limitation may be + lifted in a future version of CMake. + Contents of ``INTERFACE_SOURCES`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for available expressions. See the :manual:`cmake-buildsystem(7)` ----------------------------------------------------------------------- Summary of changes: Help/command/target_sources.rst | 4 +++ Help/prop_tgt/INTERFACE_SOURCES.rst | 4 +++ Source/cmExportBuildFileGenerator.cxx | 10 ++++++++ Source/cmExportInstallFileGenerator.cxx | 11 +++++++++ Source/cmTarget.cxx | 26 +++++++++++++++++--- Tests/ConfigSources/CMakeLists.txt | 6 ++--- .../ExportBuild-result.txt} | 0 .../RunCMake/TargetSources/ExportBuild-stderr.txt | 1 + Tests/RunCMake/TargetSources/ExportBuild.cmake | 5 ++++ .../ExportInstall-result.txt} | 0 .../TargetSources/ExportInstall-stderr.txt | 1 + Tests/RunCMake/TargetSources/ExportInstall.cmake | 6 +++++ Tests/RunCMake/TargetSources/OriginDebug.cmake | 2 +- .../RelativePathInInterface-result.txt} | 0 .../RelativePathInInterface-stderr.txt | 4 +++ .../TargetSources/RelativePathInInterface.cmake | 6 +++++ Tests/RunCMake/TargetSources/RunCMakeTest.cmake | 3 +++ .../simple.cxx => RunCMake/TargetSources/main.cpp} | 0 Tests/SourcesProperty/CMakeLists.txt | 4 ++- 19 files changed, 85 insertions(+), 8 deletions(-) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => TargetSources/ExportBuild-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetSources/ExportBuild-stderr.txt create mode 100644 Tests/RunCMake/TargetSources/ExportBuild.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => TargetSources/ExportInstall-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetSources/ExportInstall-stderr.txt create mode 100644 Tests/RunCMake/TargetSources/ExportInstall.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => TargetSources/RelativePathInInterface-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetSources/RelativePathInInterface-stderr.txt create mode 100644 Tests/RunCMake/TargetSources/RelativePathInInterface.cmake copy Tests/{CTestTestCycle/simple.cxx => RunCMake/TargetSources/main.cpp} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 08:57:54 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 08:57:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-942-g322cbd4 Message-ID: <20141201135754.70845A7F31@public.kitware.com> This is an automated email from 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 322cbd4becf47836e96bb205a00b49886e97d64e (commit) via 8e75f1d2fa3049ac31f4ebdbc255fca3e6414802 (commit) via 2a92231630b6aee671c7f4e8b64f69cfd172b9e3 (commit) via 8b5591f93ed85c6f84f2b4c076be98c57b871d1c (commit) via 22b72b189400c1a50030b59c378ebb68460ac7db (commit) via 9f59caa9bd1aba3de27aa2fbab89b56c6b99d9b9 (commit) via d724640fa22e315b28f994fbcda43ad006b4f57f (commit) via 75a9f2fb6bb263a717be7c30b0c512d2387aa514 (commit) via 4d9fec4fb327b886c66a12a657864cb3fac69250 (commit) from b8b3214f0a3cb78e84c3b3c00547ab0533987fd3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=322cbd4becf47836e96bb205a00b49886e97d64e commit 322cbd4becf47836e96bb205a00b49886e97d64e Merge: b8b3214 8e75f1d Author: Brad King AuthorDate: Mon Dec 1 08:57:42 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 08:57:42 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 09:00:02 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 09:00:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-943-gd6f7c3e Message-ID: <20141201140002.E7E90A80E3@public.kitware.com> This is an automated email from 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 d6f7c3e1bb3fdb0eddf0afd1b9ec3d64a173c000 (commit) from 322cbd4becf47836e96bb205a00b49886e97d64e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6f7c3e1bb3fdb0eddf0afd1b9ec3d64a173c000 commit d6f7c3e1bb3fdb0eddf0afd1b9ec3d64a173c000 Merge: 322cbd4 8e75f1d Author: Brad King AuthorDate: Mon Dec 1 08:59:40 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 08:59:40 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/INTERFACE_SOURCES.rst | 4 ---- 1 file changed, 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 09:27:47 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 09:27:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-945-ge7921fa Message-ID: <20141201142747.424B3A8206@public.kitware.com> This is an automated email from 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 e7921fa876e4de60d7e2201d07132cb6e8a61579 (commit) via df53aafdac59a9a6c559c40c4147205f09f45e88 (commit) from d6f7c3e1bb3fdb0eddf0afd1b9ec3d64a173c000 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7921fa876e4de60d7e2201d07132cb6e8a61579 commit e7921fa876e4de60d7e2201d07132cb6e8a61579 Merge: d6f7c3e df53aaf Author: Brad King AuthorDate: Mon Dec 1 09:27:46 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 09:27:46 2014 -0500 Merge topic 'doc-ctest-j-typo' into next df53aafd Help: Add missing space to ctest -j option description http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df53aafdac59a9a6c559c40c4147205f09f45e88 commit df53aafdac59a9a6c559c40c4147205f09f45e88 Author: Christopher Dembia AuthorDate: Wed Nov 26 20:28:39 2014 -0800 Commit: Brad King CommitDate: Mon Dec 1 09:26:48 2014 -0500 Help: Add missing space to ctest -j option description diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 03e86af..cc132c2 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -58,7 +58,7 @@ Options will have no effect. ``-j , --parallel `` - Run the tests in parallel using thegiven number of jobs. + Run the tests in parallel using the given number of jobs. This option tells ctest to run the tests in parallel using given number of jobs. This option can also be set by setting the ----------------------------------------------------------------------- Summary of changes: Help/manual/ctest.1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 09:44:17 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 09:44:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-947-g28a1114 Message-ID: <20141201144417.69678A6993@public.kitware.com> This is an automated email from 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 28a11146379a6bad5729291def6b80ac678f0f87 (commit) via be9bec5df2660661984e080dad9ae7561aa1fe83 (commit) from e7921fa876e4de60d7e2201d07132cb6e8a61579 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=28a11146379a6bad5729291def6b80ac678f0f87 commit 28a11146379a6bad5729291def6b80ac678f0f87 Merge: e7921fa be9bec5 Author: Brad King AuthorDate: Mon Dec 1 09:44:16 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 09:44:16 2014 -0500 Merge topic 'FindOpenSSL-separate-libs' into next be9bec5d FindOpenSSL: Report crypto and ssl libraries separately http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be9bec5df2660661984e080dad9ae7561aa1fe83 commit be9bec5df2660661984e080dad9ae7561aa1fe83 Author: Hannes Mezger AuthorDate: Fri Nov 28 15:21:53 2014 +0100 Commit: Brad King CommitDate: Mon Dec 1 09:41:46 2014 -0500 FindOpenSSL: Report crypto and ssl libraries separately Some applications only need the OpenSSL crypto library and want to avoid linking against the SSL library. Set OPENSSL_CRYPTO_LIBRARY and OPENSSL_SSL_LIBRARY in the code paths that do not need to find them separately, and document them publicly. This allows applications to be more specific when linking against OpenSSL. diff --git a/Help/release/dev/FindOpenSSL-separate-libs.rst b/Help/release/dev/FindOpenSSL-separate-libs.rst new file mode 100644 index 0000000..96e3961 --- /dev/null +++ b/Help/release/dev/FindOpenSSL-separate-libs.rst @@ -0,0 +1,7 @@ +FindOpenSSL-separate-libs +------------------------- + +* The :module:`FindOpenSSL` module now reports ``crypto`` and ``ssl`` + libraries separately in ``OPENSSL_CRYPTO_LIBRARY`` and + ``OPENSSL_SSL_LIBRARY``, respectively, to allow applications to + link to one without the other. diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 340b417..b2722a6 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -16,10 +16,12 @@ # # :: # -# OPENSSL_FOUND - system has the OpenSSL library -# OPENSSL_INCLUDE_DIR - the OpenSSL include directory -# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -# OPENSSL_VERSION - This is set to $major.$minor.$revision$path (eg. 0.9.8s) +# OPENSSL_FOUND - System has the OpenSSL library +# OPENSSL_INCLUDE_DIR - The OpenSSL include directory +# OPENSSL_CRYPTO_LIBRARY - The OpenSSL crypto library +# OPENSSL_SSL_LIBRARY - The OpenSSL SSL library +# OPENSSL_LIBRARIES - All OpenSSL libraries +# OPENSSL_VERSION - This is set to $major.$minor.$revision$patch (eg. 0.9.8s) #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -153,6 +155,8 @@ if(WIN32 AND NOT CYGWIN) mark_as_advanced(LIB_EAY_LIBRARY_DEBUG LIB_EAY_LIBRARY_RELEASE SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE) + set( OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} ) + set( OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} ) set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) elseif(MINGW) # same player, for MinGW @@ -181,6 +185,8 @@ if(WIN32 AND NOT CYGWIN) ) mark_as_advanced(SSL_EAY LIB_EAY) + set( OPENSSL_SSL_LIBRARY ${SSL_EAY} ) + set( OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) unset(LIB_EAY_NAMES) unset(SSL_EAY_NAMES) @@ -207,6 +213,8 @@ if(WIN32 AND NOT CYGWIN) ) mark_as_advanced(SSL_EAY LIB_EAY) + set( OPENSSL_SSL_LIBRARY ${SSL_EAY} ) + set( OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) endif() else() ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindOpenSSL-separate-libs.rst | 7 +++++++ Modules/FindOpenSSL.cmake | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/FindOpenSSL-separate-libs.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 09:59:49 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 09:59:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-949-g9394143 Message-ID: <20141201145949.A8B06A7E85@public.kitware.com> This is an automated email from 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 93941434b756449fb7711d4aa06f44e11a90be86 (commit) via 0de867dde282670461e56ce61e9c33fc6044d9a4 (commit) from 28a11146379a6bad5729291def6b80ac678f0f87 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93941434b756449fb7711d4aa06f44e11a90be86 commit 93941434b756449fb7711d4aa06f44e11a90be86 Merge: 28a1114 0de867d Author: Brad King AuthorDate: Mon Dec 1 09:59:48 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 09:59:48 2014 -0500 Merge topic 'add-continue-command' into next 0de867dd continue: Add a new CMake language command for loop continuation (#14013) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0de867dde282670461e56ce61e9c33fc6044d9a4 commit 0de867dde282670461e56ce61e9c33fc6044d9a4 Author: Gregor Jasny AuthorDate: Sat Nov 29 17:56:18 2014 +0100 Commit: Brad King CommitDate: Mon Dec 1 09:50:49 2014 -0500 continue: Add a new CMake language command for loop continuation (#14013) Inspired-by: Doug Barbieri Signed-off-by: Gregor Jasny diff --git a/Help/command/break.rst b/Help/command/break.rst index 8f1067b..fc2cd3c 100644 --- a/Help/command/break.rst +++ b/Help/command/break.rst @@ -8,3 +8,5 @@ Break from an enclosing foreach or while loop. break() Breaks from an enclosing foreach loop or while loop + +See also the :command:`continue` command. diff --git a/Help/command/continue.rst b/Help/command/continue.rst new file mode 100644 index 0000000..1c7d673 --- /dev/null +++ b/Help/command/continue.rst @@ -0,0 +1,12 @@ +continue +-------- + +Continue to the top of enclosing foreach or while loop. + +:: + + continue() + +The ``continue`` command allows a cmake script to abort the rest of a block +in a :command:`foreach` or :command:`while` loop, and start at the top of +the next iteration. See also the :command:`break` command. diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst index 9c1d3b9..4616dd1 100644 --- a/Help/manual/cmake-commands.7.rst +++ b/Help/manual/cmake-commands.7.rst @@ -31,6 +31,7 @@ These commands may be used freely in CMake projects. /command/cmake_minimum_required /command/cmake_policy /command/configure_file + /command/continue /command/create_test_sourcelist /command/define_property /command/elseif diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst index 9c511ca..15c101f 100644 --- a/Help/manual/cmake-language.7.rst +++ b/Help/manual/cmake-language.7.rst @@ -469,8 +469,10 @@ Loops The :command:`foreach`/:command:`endforeach` and :command:`while`/:command:`endwhile` commands delimit code -blocks to be executed in a loop. The :command:`break` command -may be used inside such blocks to terminate the loop early. +blocks to be executed in a loop. Inside such blocks the +:command:`break` command may be used to terminate the loop +early whereas the :command:`continue` command may be used +to start with the next iteration immediately. Command Definitions ------------------- diff --git a/Help/release/dev/add-continue-command.rst b/Help/release/dev/add-continue-command.rst new file mode 100644 index 0000000..4995a8e --- /dev/null +++ b/Help/release/dev/add-continue-command.rst @@ -0,0 +1,6 @@ +add-continue-command +-------------------- + +* A new :command:`continue` command was added that can be called inside loop + contexts to end the current iteration and start the next one at the top of + the loop block. diff --git a/Source/cmBootstrapCommands1.cxx b/Source/cmBootstrapCommands1.cxx index 5502609..4274d85 100644 --- a/Source/cmBootstrapCommands1.cxx +++ b/Source/cmBootstrapCommands1.cxx @@ -28,6 +28,7 @@ #include "cmCMakePolicyCommand.cxx" #include "cmCommandArgumentsHelper.cxx" #include "cmConfigureFileCommand.cxx" +#include "cmContinueCommand.cxx" #include "cmCoreTryCompile.cxx" #include "cmCreateTestSourceList.cxx" #include "cmDefinePropertyCommand.cxx" @@ -70,6 +71,7 @@ void GetBootstrapCommands1(std::list& commands) commands.push_back(new cmCMakeMinimumRequired); commands.push_back(new cmCMakePolicyCommand); commands.push_back(new cmConfigureFileCommand); + commands.push_back(new cmContinueCommand); commands.push_back(new cmCreateTestSourceList); commands.push_back(new cmDefinePropertyCommand); commands.push_back(new cmElseCommand); diff --git a/Source/cmContinueCommand.cxx b/Source/cmContinueCommand.cxx new file mode 100644 index 0000000..4a03caa --- /dev/null +++ b/Source/cmContinueCommand.cxx @@ -0,0 +1,39 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2014 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 "cmContinueCommand.h" + +// cmContinueCommand +bool cmContinueCommand::InitialPass(std::vector const &args, + cmExecutionStatus &status) +{ + if(!this->Makefile->IsLoopBlock()) + { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, + "A CONTINUE command was found outside of a " + "proper FOREACH or WHILE loop scope."); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + + status.SetContinueInvoked(true); + + if(!args.empty()) + { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, + "The CONTINUE command does not accept any " + "arguments."); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + + return true; +} diff --git a/Source/cmContinueCommand.h b/Source/cmContinueCommand.h new file mode 100644 index 0000000..093b14f --- /dev/null +++ b/Source/cmContinueCommand.h @@ -0,0 +1,55 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2014 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 cmContinueCommand_h +#define cmContinueCommand_h + +#include "cmCommand.h" + +/** \class cmContinueCommand + * \brief Continue from an enclosing foreach or while loop + * + * cmContinueCommand returns from an enclosing foreach or while loop + */ +class cmContinueCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmContinueCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() const { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual std::string GetName() const { return "continue"; } + + cmTypeMacro(cmContinueCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h index 5c94a97..d4da5a4 100644 --- a/Source/cmExecutionStatus.h +++ b/Source/cmExecutionStatus.h @@ -36,10 +36,16 @@ public: virtual bool GetBreakInvoked() { return this->BreakInvoked; } + virtual void SetContinueInvoked(bool val) + { this->ContinueInvoked = val; } + virtual bool GetContinueInvoked() + { return this->ContinueInvoked; } + virtual void Clear() { this->ReturnInvoked = false; this->BreakInvoked = false; + this->ContinueInvoked = false; this->NestedError = false; } virtual void SetNestedError(bool val) { this->NestedError = val; } @@ -49,6 +55,7 @@ public: protected: bool ReturnInvoked; bool BreakInvoked; + bool ContinueInvoked; bool NestedError; }; diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index dec5157..03d6590 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -69,6 +69,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, mf.AddDefinition(this->Args[0],oldDef.c_str()); return true; } + if (status.GetContinueInvoked()) + { + break; + } if(cmSystemTools::GetFatalErrorOccured() ) { return true; diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index f728c15..b8e30b7 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -151,6 +151,11 @@ IsFunctionBlocked(const cmListFileFunction& lff, inStatus.SetBreakInvoked(true); return true; } + if (status.GetContinueInvoked()) + { + inStatus.SetContinueInvoked(true); + return true; + } } } return true; diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index d36095e..47edb03 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -83,6 +83,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, { return true; } + if (status.GetContinueInvoked()) + { + break; + } if(cmSystemTools::GetFatalErrorOccured() ) { return true; diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 9832a95..54fe2d9 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -102,6 +102,7 @@ add_RunCMake_test(add_dependencies) add_RunCMake_test(build_command) add_RunCMake_test(export) add_RunCMake_test(cmake_minimum_required) +add_RunCMake_test(continue) add_RunCMake_test(file) add_RunCMake_test(find_package) add_RunCMake_test(get_filename_component) diff --git a/Tests/RunCMake/continue/CMakeLists.txt b/Tests/RunCMake/continue/CMakeLists.txt new file mode 100644 index 0000000..ef2163c --- /dev/null +++ b/Tests/RunCMake/continue/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.1) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/continue/ContinueForEachInLists.cmake b/Tests/RunCMake/continue/ContinueForEachInLists.cmake new file mode 100644 index 0000000..fbd7359 --- /dev/null +++ b/Tests/RunCMake/continue/ContinueForEachInLists.cmake @@ -0,0 +1,10 @@ +list(APPEND foo 1 2 3 4 5) + +message(STATUS "start") +foreach(iter IN LISTS foo) + if("${iter}" EQUAL 1 OR "${iter}" EQUAL 3 OR "${iter}" EQUAL 5) + continue() + endif() + message(STATUS "${iter}") +endforeach() +message(STATUS "end") diff --git a/Tests/RunCMake/continue/ContinueForeach-stdout.txt b/Tests/RunCMake/continue/ContinueForeach-stdout.txt new file mode 100644 index 0000000..955b859 --- /dev/null +++ b/Tests/RunCMake/continue/ContinueForeach-stdout.txt @@ -0,0 +1,4 @@ +-- start +-- 2 +-- 4 +-- end diff --git a/Tests/RunCMake/continue/ContinueForeach.cmake b/Tests/RunCMake/continue/ContinueForeach.cmake new file mode 100644 index 0000000..9b3e17f --- /dev/null +++ b/Tests/RunCMake/continue/ContinueForeach.cmake @@ -0,0 +1,8 @@ +message(STATUS "start") +foreach(iter RANGE 1 5) + if("${iter}" EQUAL 1 OR "${iter}" EQUAL 3 OR "${iter}" EQUAL 5) + continue() + endif() + message(STATUS "${iter}") +endforeach() +message(STATUS "end") diff --git a/Tests/RunCMake/continue/ContinueNestedForeach-stdout.txt b/Tests/RunCMake/continue/ContinueNestedForeach-stdout.txt new file mode 100644 index 0000000..adb02bc --- /dev/null +++ b/Tests/RunCMake/continue/ContinueNestedForeach-stdout.txt @@ -0,0 +1,6 @@ +-- start +-- 7 2 +-- 7 4 +-- 9 2 +-- 9 4 +-- end diff --git a/Tests/RunCMake/continue/ContinueNestedForeach.cmake b/Tests/RunCMake/continue/ContinueNestedForeach.cmake new file mode 100644 index 0000000..de7c51b --- /dev/null +++ b/Tests/RunCMake/continue/ContinueNestedForeach.cmake @@ -0,0 +1,13 @@ +message(STATUS "start") +foreach(outer RANGE 7 9) + if("${outer}" EQUAL 8) + continue() + endif() + foreach(inner RANGE 1 5) + if("${inner}" EQUAL 1 OR "${inner}" EQUAL 3 OR "${inner}" EQUAL 5) + continue() + endif() + message(STATUS "${outer} ${inner}") + endforeach() +endforeach() +message(STATUS "end") diff --git a/Tests/RunCMake/continue/ContinueWhile-stdout.txt b/Tests/RunCMake/continue/ContinueWhile-stdout.txt new file mode 100644 index 0000000..f99b2a1 --- /dev/null +++ b/Tests/RunCMake/continue/ContinueWhile-stdout.txt @@ -0,0 +1,6 @@ +-- start +-- a +-- aa +-- aaaa +-- aaaaa +-- end diff --git a/Tests/RunCMake/continue/ContinueWhile.cmake b/Tests/RunCMake/continue/ContinueWhile.cmake new file mode 100644 index 0000000..c1fa87a --- /dev/null +++ b/Tests/RunCMake/continue/ContinueWhile.cmake @@ -0,0 +1,10 @@ +message(STATUS "start") +unset(iter) +while(NOT "${iter}" STREQUAL "aaaaa") + set(iter "${iter}a") + if("${iter}" STREQUAL "aaa") + continue() + endif() + message(STATUS "${iter}") +endwhile() +message(STATUS "end") diff --git a/Tests/RunCMake/continue/NoArgumentsToContinue-result.txt b/Tests/RunCMake/continue/NoArgumentsToContinue-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/continue/NoArgumentsToContinue-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/continue/NoArgumentsToContinue-stderr.txt b/Tests/RunCMake/continue/NoArgumentsToContinue-stderr.txt new file mode 100644 index 0000000..66be462 --- /dev/null +++ b/Tests/RunCMake/continue/NoArgumentsToContinue-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at NoArgumentsToContinue.cmake:2 \(continue\): + The CONTINUE command does not accept any arguments. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/continue/NoArgumentsToContinue.cmake b/Tests/RunCMake/continue/NoArgumentsToContinue.cmake new file mode 100644 index 0000000..609804d --- /dev/null +++ b/Tests/RunCMake/continue/NoArgumentsToContinue.cmake @@ -0,0 +1,3 @@ +foreach(i RANGE 1 2) + continue(1) +endforeach() diff --git a/Tests/RunCMake/continue/NoEnclosingBlock-result.txt b/Tests/RunCMake/continue/NoEnclosingBlock-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/continue/NoEnclosingBlock-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/continue/NoEnclosingBlock-stderr.txt b/Tests/RunCMake/continue/NoEnclosingBlock-stderr.txt new file mode 100644 index 0000000..24caf57 --- /dev/null +++ b/Tests/RunCMake/continue/NoEnclosingBlock-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at NoEnclosingBlock.cmake:1 \(continue\): + A CONTINUE command was found outside of a proper FOREACH or WHILE loop + scope. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/continue/NoEnclosingBlock.cmake b/Tests/RunCMake/continue/NoEnclosingBlock.cmake new file mode 100644 index 0000000..9661e0d --- /dev/null +++ b/Tests/RunCMake/continue/NoEnclosingBlock.cmake @@ -0,0 +1 @@ +continue() diff --git a/Tests/RunCMake/continue/NoEnclosingBlockInFunction-result.txt b/Tests/RunCMake/continue/NoEnclosingBlockInFunction-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/continue/NoEnclosingBlockInFunction-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/continue/NoEnclosingBlockInFunction-stderr.txt b/Tests/RunCMake/continue/NoEnclosingBlockInFunction-stderr.txt new file mode 100644 index 0000000..af4f3b6 --- /dev/null +++ b/Tests/RunCMake/continue/NoEnclosingBlockInFunction-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at NoEnclosingBlockInFunction.cmake:2 \(continue\): + A CONTINUE command was found outside of a proper FOREACH or WHILE loop + scope. +Call Stack \(most recent call first\): + NoEnclosingBlockInFunction.cmake:6 \(foo\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/continue/NoEnclosingBlockInFunction.cmake b/Tests/RunCMake/continue/NoEnclosingBlockInFunction.cmake new file mode 100644 index 0000000..eb2a098 --- /dev/null +++ b/Tests/RunCMake/continue/NoEnclosingBlockInFunction.cmake @@ -0,0 +1,8 @@ +function(foo) + continue() +endfunction(foo) + +foreach(i RANGE 1 2) + foo() + message(STATUS "Hello World") +endforeach() diff --git a/Tests/RunCMake/continue/RunCMakeTest.cmake b/Tests/RunCMake/continue/RunCMakeTest.cmake new file mode 100644 index 0000000..37caf9c --- /dev/null +++ b/Tests/RunCMake/continue/RunCMakeTest.cmake @@ -0,0 +1,9 @@ +include(RunCMake) + +run_cmake(ContinueForeach) +run_cmake(ContinueForEachInLists) +run_cmake(ContinueNestedForeach) +run_cmake(ContinueWhile) +run_cmake(NoArgumentsToContinue) +run_cmake(NoEnclosingBlock) +run_cmake(NoEnclosingBlockInFunction) ----------------------------------------------------------------------- Summary of changes: Help/command/break.rst | 2 + Help/command/continue.rst | 12 ++++++ Help/manual/cmake-commands.7.rst | 1 + Help/manual/cmake-language.7.rst | 6 ++- Help/release/dev/add-continue-command.rst | 6 +++ Source/cmBootstrapCommands1.cxx | 2 + Source/cmContinueCommand.cxx | 39 ++++++++++++++++++++ Source/{cmReturnCommand.h => cmContinueCommand.h} | 20 +++++----- Source/cmExecutionStatus.h | 7 ++++ Source/cmForEachCommand.cxx | 4 ++ Source/cmIfCommand.cxx | 5 +++ Source/cmWhileCommand.cxx | 4 ++ Tests/RunCMake/CMakeLists.txt | 1 + .../RunCMake/{CMP0055 => continue}/CMakeLists.txt | 0 .../RunCMake/continue/ContinueForEachInLists.cmake | 10 +++++ Tests/RunCMake/continue/ContinueForeach-stdout.txt | 4 ++ Tests/RunCMake/continue/ContinueForeach.cmake | 8 ++++ .../continue/ContinueNestedForeach-stdout.txt | 6 +++ .../RunCMake/continue/ContinueNestedForeach.cmake | 13 +++++++ Tests/RunCMake/continue/ContinueWhile-stdout.txt | 6 +++ Tests/RunCMake/continue/ContinueWhile.cmake | 10 +++++ .../NoArgumentsToContinue-result.txt} | 0 .../continue/NoArgumentsToContinue-stderr.txt | 4 ++ .../NoArgumentsToContinue.cmake} | 3 +- .../NoEnclosingBlock-result.txt} | 0 .../RunCMake/continue/NoEnclosingBlock-stderr.txt | 5 +++ Tests/RunCMake/continue/NoEnclosingBlock.cmake | 1 + .../NoEnclosingBlockInFunction-result.txt} | 0 .../continue/NoEnclosingBlockInFunction-stderr.txt | 6 +++ .../continue/NoEnclosingBlockInFunction.cmake | 8 ++++ Tests/RunCMake/continue/RunCMakeTest.cmake | 9 +++++ 31 files changed, 188 insertions(+), 14 deletions(-) create mode 100644 Help/command/continue.rst create mode 100644 Help/release/dev/add-continue-command.rst create mode 100644 Source/cmContinueCommand.cxx copy Source/{cmReturnCommand.h => cmContinueCommand.h} (70%) copy Tests/RunCMake/{CMP0055 => continue}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/continue/ContinueForEachInLists.cmake create mode 100644 Tests/RunCMake/continue/ContinueForeach-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueForeach.cmake create mode 100644 Tests/RunCMake/continue/ContinueNestedForeach-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueNestedForeach.cmake create mode 100644 Tests/RunCMake/continue/ContinueWhile-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueWhile.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => continue/NoArgumentsToContinue-result.txt} (100%) create mode 100644 Tests/RunCMake/continue/NoArgumentsToContinue-stderr.txt copy Tests/RunCMake/{CMP0055/CMP0055-WARN-Reject-Arguments.cmake => continue/NoArgumentsToContinue.cmake} (70%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => continue/NoEnclosingBlock-result.txt} (100%) create mode 100644 Tests/RunCMake/continue/NoEnclosingBlock-stderr.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlock.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => continue/NoEnclosingBlockInFunction-result.txt} (100%) create mode 100644 Tests/RunCMake/continue/NoEnclosingBlockInFunction-stderr.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlockInFunction.cmake create mode 100644 Tests/RunCMake/continue/RunCMakeTest.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 10:01:29 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 10:01:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-418-g067b49a Message-ID: <20141201150129.AB124A8080@public.kitware.com> This is an automated email from 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 067b49a6569422c4687209c5bc57043630705523 (commit) via df53aafdac59a9a6c559c40c4147205f09f45e88 (commit) from 8e75f1d2fa3049ac31f4ebdbc255fca3e6414802 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=067b49a6569422c4687209c5bc57043630705523 commit 067b49a6569422c4687209c5bc57043630705523 Merge: 8e75f1d df53aaf Author: Brad King AuthorDate: Mon Dec 1 10:01:28 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 10:01:28 2014 -0500 Merge topic 'doc-ctest-j-typo' df53aafd Help: Add missing space to ctest -j option description ----------------------------------------------------------------------- Summary of changes: Help/manual/ctest.1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 10:01:45 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 10:01:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-951-g433911d Message-ID: <20141201150145.C04ECA8095@public.kitware.com> This is an automated email from 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 433911d990eb0dcfe259c208ec0ba3ceb6d93dd9 (commit) via 067b49a6569422c4687209c5bc57043630705523 (commit) from 93941434b756449fb7711d4aa06f44e11a90be86 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=433911d990eb0dcfe259c208ec0ba3ceb6d93dd9 commit 433911d990eb0dcfe259c208ec0ba3ceb6d93dd9 Merge: 9394143 067b49a Author: Brad King AuthorDate: Mon Dec 1 10:01:36 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 10:01:36 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 10:03:09 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 10:03:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-427-g3350e4d Message-ID: <20141201150310.04230A815E@public.kitware.com> This is an automated email from 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 3350e4d209b6a7ff758ca371af4d62844a66ab36 (commit) via 5062bf748822b276b9766215b07670754ee1c76c (commit) via 58d3898083e1bf66f4ecf2e82a556e81f67ce5bc (commit) via baa283f9226a8c599523e9265cb85b809740ab31 (commit) via 5445a99d1af24200325721bbc98a6d65079faef8 (commit) via bde103afe05cfc270c1d81d8cdccf74023088e3e (commit) via d7e4bd34e0de0bbb2d61f2183ec3b6b31c016f12 (commit) via f70f6acd4fcb6bea4947f8a6353e61ca4a02d455 (commit) via b3d9702cb86aa3fd8563b1250d2bcf5dfd79cc9c (commit) from 067b49a6569422c4687209c5bc57043630705523 (commit) Those revisions listed 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 Mon Dec 1 10:03:10 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 10:03:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-961-g8a9e910 Message-ID: <20141201150310.891ECA815F@public.kitware.com> This is an automated email from 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 8a9e9100d40cb42a3c508407afedd2e3ba8534fb (commit) via 3350e4d209b6a7ff758ca371af4d62844a66ab36 (commit) via 5062bf748822b276b9766215b07670754ee1c76c (commit) via 58d3898083e1bf66f4ecf2e82a556e81f67ce5bc (commit) via baa283f9226a8c599523e9265cb85b809740ab31 (commit) via 5445a99d1af24200325721bbc98a6d65079faef8 (commit) via bde103afe05cfc270c1d81d8cdccf74023088e3e (commit) via d7e4bd34e0de0bbb2d61f2183ec3b6b31c016f12 (commit) via f70f6acd4fcb6bea4947f8a6353e61ca4a02d455 (commit) via b3d9702cb86aa3fd8563b1250d2bcf5dfd79cc9c (commit) from 433911d990eb0dcfe259c208ec0ba3ceb6d93dd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a9e9100d40cb42a3c508407afedd2e3ba8534fb commit 8a9e9100d40cb42a3c508407afedd2e3ba8534fb Merge: 433911d 3350e4d Author: Brad King AuthorDate: Mon Dec 1 10:02:42 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 10:02:42 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 10:03:10 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 10:03:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc2-56-g5062bf7 Message-ID: <20141201150310.E2B6CA80F0@public.kitware.com> This is an automated email from 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 5062bf748822b276b9766215b07670754ee1c76c (commit) via df53aafdac59a9a6c559c40c4147205f09f45e88 (commit) via 58d3898083e1bf66f4ecf2e82a556e81f67ce5bc (commit) via baa283f9226a8c599523e9265cb85b809740ab31 (commit) via 5445a99d1af24200325721bbc98a6d65079faef8 (commit) via bde103afe05cfc270c1d81d8cdccf74023088e3e (commit) via 89bb34d3499efd0ae78324d53ca0bdead2c3e660 (commit) via 07254a8166f7f45d284b0982c59b185037d21bc1 (commit) via a1aceb2585cb4b1e4e58ac32d9435ed43ad2d1d2 (commit) via 191d2b209bbd875bc0885a8a413dc340ab5e01b4 (commit) via 8a75c7ef32af391cb45af889d266e2a77daa61d6 (commit) via e1348056662b9ae0d399374b6726173d7bf0e9bb (commit) via bb5905bb1342229c06cecee735322a8a28916b76 (commit) via d7e4bd34e0de0bbb2d61f2183ec3b6b31c016f12 (commit) via 84d124e8f02d5bba60d3491d4c5d7cb68aa91192 (commit) via 672f1001c015bf5f531d8731dba30a5fb856edea (commit) via f70f6acd4fcb6bea4947f8a6353e61ca4a02d455 (commit) via 7d674b5f0b28a610333644d417c2e8cb796cc9e4 (commit) via b3d9702cb86aa3fd8563b1250d2bcf5dfd79cc9c (commit) via 75dee2f2c285030bbd02aabd7292cf5af9f5aec0 (commit) from d2f2a2e226a8717d6fdb6df0ed4858d1629f557c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/command/get_property.rst | 42 +++++++---- Help/command/set_property.rst | 49 +++++++++---- Help/command/target_sources.rst | 4 ++ Help/manual/ctest.1.rst | 2 +- Help/policy/CMP0053.rst | 2 +- Help/prop_tgt/INTERFACE_SOURCES.rst | 4 ++ Help/release/3.1.0.rst | 6 ++ Modules/FindwxWidgets.cmake | 2 + Source/cmConditionEvaluator.cxx | 5 +- Source/cmExportBuildFileGenerator.cxx | 10 +++ Source/cmExportInstallFileGenerator.cxx | 11 +++ Source/cmGeneratorExpressionEvaluator.cxx | 74 +++++++++++--------- Source/cmMakefile.cxx | 47 ------------- Source/cmMakefile.h | 5 -- Source/cmSourceFileLocation.cxx | 3 +- Source/cmStringCommand.cxx | 44 ++++++++++-- Source/cmStringCommand.h | 2 + Source/cmTarget.cxx | 26 ++++++- Tests/ConfigSources/CMakeLists.txt | 6 +- Tests/InterfaceLibrary/CMakeLists.txt | 5 +- .../ExportBuild-result.txt} | 0 .../RunCMake/TargetSources/ExportBuild-stderr.txt | 1 + Tests/RunCMake/TargetSources/ExportBuild.cmake | 5 ++ .../ExportInstall-result.txt} | 0 .../TargetSources/ExportInstall-stderr.txt | 1 + Tests/RunCMake/TargetSources/ExportInstall.cmake | 6 ++ Tests/RunCMake/TargetSources/OriginDebug.cmake | 2 +- .../RelativePathInInterface-result.txt} | 0 .../RelativePathInInterface-stderr.txt | 4 ++ .../TargetSources/RelativePathInInterface.cmake | 6 ++ Tests/RunCMake/TargetSources/RunCMakeTest.cmake | 3 + .../simple.cxx => RunCMake/TargetSources/main.cpp} | 0 Tests/SourcesProperty/CMakeLists.txt | 4 +- 33 files changed, 247 insertions(+), 134 deletions(-) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => TargetSources/ExportBuild-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetSources/ExportBuild-stderr.txt create mode 100644 Tests/RunCMake/TargetSources/ExportBuild.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => TargetSources/ExportInstall-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetSources/ExportInstall-stderr.txt create mode 100644 Tests/RunCMake/TargetSources/ExportInstall.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => TargetSources/RelativePathInInterface-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetSources/RelativePathInInterface-stderr.txt create mode 100644 Tests/RunCMake/TargetSources/RelativePathInInterface.cmake copy Tests/{CTestTestCycle/simple.cxx => RunCMake/TargetSources/main.cpp} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 10:51:54 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 10:51:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-965-g21e224e Message-ID: <20141201155154.A3943A7C12@public.kitware.com> This is an automated email from 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 21e224e818871f074ba134faed05409c36ad613b (commit) via ed00a808a96fc7a8af43f84b5308e3efbb30026d (commit) via fca624ca534f8a86c120106b2f3fa65327817a53 (commit) via 5121f1186304dc2cbf1b2212415c680d66dff6c8 (commit) from 8a9e9100d40cb42a3c508407afedd2e3ba8534fb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21e224e818871f074ba134faed05409c36ad613b commit 21e224e818871f074ba134faed05409c36ad613b Merge: 8a9e910 ed00a80 Author: Brad King AuthorDate: Mon Dec 1 10:51:52 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 10:51:52 2014 -0500 Merge topic 'file-LOCK-command' into next ed00a808 Help: Add notes for topic 'file-LOCK-command' fca624ca file: Add LOCK subcommand to do file and directory locking 5121f118 cmSystemTools: Add StringToInt helper http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed00a808a96fc7a8af43f84b5308e3efbb30026d commit ed00a808a96fc7a8af43f84b5308e3efbb30026d Author: Brad King AuthorDate: Mon Dec 1 10:18:03 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 10:51:18 2014 -0500 Help: Add notes for topic 'file-LOCK-command' diff --git a/Help/release/dev/file-LOCK-command.rst b/Help/release/dev/file-LOCK-command.rst new file mode 100644 index 0000000..4b11e9e --- /dev/null +++ b/Help/release/dev/file-LOCK-command.rst @@ -0,0 +1,5 @@ +file-LOCK-command +----------------- + +* The :command:`file(LOCK)` subcommand was created to allow CMake + processes to synchronize through file and directory locks. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fca624ca534f8a86c120106b2f3fa65327817a53 commit fca624ca534f8a86c120106b2f3fa65327817a53 Author: Ruslan Baratov AuthorDate: Wed Nov 26 01:49:25 2014 +0300 Commit: Brad King CommitDate: Mon Dec 1 10:51:18 2014 -0500 file: Add LOCK subcommand to do file and directory locking Provide options to fail without blocking or to block up to a timeout. Provide options to specify the scope containing the lock so it can be released automatically at the end of a function, file, or process. Extend the RunCMake.file test with cases covering the file(LOCK) command usage and error cases. diff --git a/Help/command/file.rst b/Help/command/file.rst index dbc4149..600464e 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -305,3 +305,33 @@ status messages (subject to the :variable:`CMAKE_INSTALL_MESSAGE` variable), and ``NO_SOURCE_PERMISSIONS`` is default. Installation scripts generated by the :command:`install` command use this signature (with some undocumented options for internal use). + +------------------------------------------------------------------------------ + +:: + + file(LOCK [DIRECTORY] [RELEASE] + [GUARD ] + [RESULT_VARIABLE ] + [TIMEOUT ]) + +Lock a file specified by ```` if no ``DIRECTORY`` option present and file +``/cmake.lock`` otherwise. File will be locked for scope defined by +``GUARD`` option (default value is ``PROCESS``). ``RELEASE`` option can be used +to unlock file explicitly. If option ``TIMEOUT`` is not specified CMake will +wait until lock succeed or until fatal error occurs. If ``TIMEOUT`` is set to +``0`` lock will be tried once and result will be reported immediately. If +``TIMEOUT`` is not ``0`` CMake will try to lock file for the period specified +by ```` value. Any errors will be interpreted as fatal if there is no +``RESULT_VARIABLE`` option. Otherwise result will be stored in ```` +and will be ``0`` on success or error message on failure. + +Note that lock is advisory - there is no guarantee that other processes will +respect this lock, i.e. lock synchronize two or more CMake instances sharing +some modifiable resources. Similar logic applied to ``DIRECTORY`` option - +locking parent directory doesn't prevent other ``LOCK`` commands to lock any +child directory or file. + +Trying to lock file twice is not allowed. Any intermediate directories and +file itself will be created if they not exist. ``GUARD`` and ``TIMEOUT`` +options ignored on ``RELEASE`` operation. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7705683..a4c982f 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -219,6 +219,12 @@ set(SRCS cmExtraKateGenerator.h cmExtraSublimeTextGenerator.cxx cmExtraSublimeTextGenerator.h + cmFileLock.cxx + cmFileLock.h + cmFileLockPool.cxx + cmFileLockPool.h + cmFileLockResult.cxx + cmFileLockResult.h cmFileTimeComparison.cxx cmFileTimeComparison.h cmGeneratedFileStream.cxx diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index aa4c95b..a6eb8c4 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -21,6 +21,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cm_curl.h" +#include "cmFileLockResult.h" #endif #undef GetCurrentDirectory @@ -202,6 +203,10 @@ bool cmFileCommand { return this->HandleGenerateCommand(args); } + else if ( subCommand == "LOCK" ) + { + return this->HandleLockCommand(args); + } std::string e = "does not recognize sub-command "+subCommand; this->SetError(e); @@ -3502,6 +3507,204 @@ bool cmFileCommand::HandleGenerateCommand( } //---------------------------------------------------------------------------- +bool cmFileCommand::HandleLockCommand( + std::vector const& args) +{ +#if defined(CMAKE_BUILD_WITH_CMAKE) + // Default values + bool directory = false; + bool release = false; + enum Guard { + GUARD_FUNCTION, + GUARD_FILE, + GUARD_PROCESS + }; + Guard guard = GUARD_PROCESS; + std::string resultVariable; + unsigned timeout = static_cast(-1); + + // Parse arguments + if(args.size() < 2) + { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + "sub-command LOCK requires at least two arguments."); + return false; + } + + std::string path = args[1]; + for (unsigned i = 2; i < args.size(); ++i) + { + if (args[i] == "DIRECTORY") + { + directory = true; + } + else if (args[i] == "RELEASE") + { + release = true; + } + else if (args[i] == "GUARD") + { + ++i; + const char* merr = "expected FUNCTION, FILE or PROCESS after GUARD"; + if (i >= args.size()) + { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, merr); + return false; + } + else + { + if (args[i] == "FUNCTION") + { + guard = GUARD_FUNCTION; + } + else if (args[i] == "FILE") + { + guard = GUARD_FILE; + } + else if (args[i] == "PROCESS") + { + guard = GUARD_PROCESS; + } + else + { + cmOStringStream e; + e << merr << ", but got:\n \"" << args[i] << "\"."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + } + } + else if (args[i] == "RESULT_VARIABLE") + { + ++i; + if (i >= args.size()) + { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + "expected variable name after RESULT_VARIABLE"); + return false; + } + resultVariable = args[i]; + } + else if (args[i] == "TIMEOUT") + { + ++i; + if (i >= args.size()) + { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + "expected timeout value after TIMEOUT"); + return false; + } + int scanned; + if(!cmSystemTools::StringToInt(args[i].c_str(), &scanned) || scanned < 0) + { + cmOStringStream e; + e << "TIMEOUT value \"" << args[i] << "\" is not an unsigned integer."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + timeout = static_cast(scanned); + } + else + { + cmOStringStream e; + e << "expected DIRECTORY, RELEASE, GUARD, RESULT_VARIABLE or TIMEOUT\n"; + e << "but got: \"" << args[i] << "\"."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + } + + if (directory) + { + path += "/cmake.lock"; + } + + if (!cmsys::SystemTools::FileIsFullPath(path)) + { + path = this->Makefile->GetCurrentDirectory() + ("/" + path); + } + + // Unify path (remove '//', '/../', ...) + path = cmSystemTools::CollapseFullPath(path); + + // Create file and directories if needed + std::string parentDir = cmSystemTools::GetParentDirectory(path); + if (!cmSystemTools::MakeDirectory(parentDir)) + { + cmOStringStream e; + e << "directory\n \"" << parentDir << "\"\ncreation failed "; + e << "(check permissions)."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + FILE *file = cmsys::SystemTools::Fopen(path, "w"); + if (!file) + { + cmOStringStream e; + e << "file\n \"" << path << "\"\ncreation failed (check permissions)."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + fclose(file); + + // Actual lock/unlock + cmFileLockPool& lockPool = this->Makefile->GetLocalGenerator()-> + GetGlobalGenerator()->GetFileLockPool(); + + cmFileLockResult fileLockResult(cmFileLockResult::MakeOk()); + if (release) + { + fileLockResult = lockPool.Release(path); + } + else + { + switch (guard) + { + case GUARD_FUNCTION: + fileLockResult = lockPool.LockFunctionScope(path, timeout); + break; + case GUARD_FILE: + fileLockResult = lockPool.LockFileScope(path, timeout); + break; + case GUARD_PROCESS: + fileLockResult = lockPool.LockProcessScope(path, timeout); + break; + default: + cmSystemTools::SetFatalErrorOccured(); + return false; + } + } + + const std::string result = fileLockResult.GetOutputMessage(); + + if (resultVariable.empty() && !fileLockResult.IsOk()) + { + cmOStringStream e; + e << "error locking file\n \"" << path << "\"\n" << result << "."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + + if (!resultVariable.empty()) + { + this->Makefile->AddDefinition(resultVariable, result.c_str()); + } + + return true; +#else + static_cast(args); + this->SetError("sub-command LOCK not implemented in bootstrap cmake"); + return false; +#endif +} + +//---------------------------------------------------------------------------- bool cmFileCommand::HandleTimestampCommand( std::vector const& args) { diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index 8d66fdf..a4d341f 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -75,6 +75,7 @@ protected: bool HandleTimestampCommand(std::vector const& args); bool HandleGenerateCommand(std::vector const& args); + bool HandleLockCommand(std::vector const& args); private: void AddEvaluationFile(const std::string &inputName, diff --git a/Source/cmFileLock.cxx b/Source/cmFileLock.cxx new file mode 100644 index 0000000..f69c36a --- /dev/null +++ b/Source/cmFileLock.cxx @@ -0,0 +1,77 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLock.h" + +#include +#include "cmFileLockResult.h" + +// Common implementation + +cmFileLock::~cmFileLock() +{ + if (!this->Filename.empty()) + { + const cmFileLockResult result = this->Release(); + assert(result.IsOk()); + } +} + +cmFileLockResult cmFileLock::Lock( + const std::string& filename, unsigned timeout) +{ + if (filename.empty()) + { + // Error is internal since all the directories and file must be created + // before actual lock called. + return cmFileLockResult::MakeInternal(); + } + + if (!this->Filename.empty()) + { + // Error is internal since double-lock must be checked in class + // cmFileLockPool by the cmFileLock::IsLocked method. + return cmFileLockResult::MakeInternal(); + } + + this->Filename = filename; + cmFileLockResult result = this->OpenFile(); + if (result.IsOk()) + { + if (timeout == static_cast(-1)) + { + result = this->LockWithoutTimeout(); + } + else + { + result = this->LockWithTimeout(timeout); + } + } + + if (!result.IsOk()) + { + this->Filename = ""; + } + + return result; +} + +bool cmFileLock::IsLocked(const std::string& filename) const +{ + return filename == this->Filename; +} + +#if defined(_WIN32) +# include "cmFileLockWin32.cxx" +#else +# include "cmFileLockUnix.cxx" +#endif diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h new file mode 100644 index 0000000..7c2803b --- /dev/null +++ b/Source/cmFileLock.h @@ -0,0 +1,74 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 cmFileLock_h +#define cmFileLock_h + +#include "cmStandardIncludes.h" + +#if defined(_WIN32) +# include // HANDLE +#endif + +class cmFileLockResult; + +/** + * @brief Cross-platform file locking. + * @detail Under the hood this class use 'fcntl' for Unix-like platforms and + * 'LockFileEx'/'UnlockFileEx' for Win32 platform. Locks are exclusive and + * advisory. + */ +class cmFileLock +{ + public: + cmFileLock(); + ~cmFileLock(); + + /** + * @brief Lock the file. + * @param timeoutSec Lock timeout. If -1 try until success or fatal error. + */ + cmFileLockResult Lock(const std::string& filename, unsigned timeoutSec); + + /** + * @brief Unlock the file. + */ + cmFileLockResult Release(); + + /** + * @brief Check file is locked by this class. + * @detail This function helps to find double locks (deadlocks) and to do + * explicit unlocks. + */ + bool IsLocked(const std::string& filename) const; + + private: + cmFileLock(const cmFileLock&); + cmFileLock& operator=(const cmFileLock&); + + cmFileLockResult OpenFile(); + cmFileLockResult LockWithoutTimeout(); + cmFileLockResult LockWithTimeout(unsigned timeoutSec); + +#if defined(_WIN32) + typedef HANDLE FileId; + BOOL LockFile(DWORD flags); +#else + typedef int FileId; + int LockFile(int cmd, int type); +#endif + + FileId File; + std::string Filename; +}; + +#endif // cmFileLock_h diff --git a/Source/cmFileLockPool.cxx b/Source/cmFileLockPool.cxx new file mode 100644 index 0000000..e84e71a --- /dev/null +++ b/Source/cmFileLockPool.cxx @@ -0,0 +1,198 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLockPool.h" + +#include + +#include "cmFileLock.h" +#include "cmFileLockResult.h" + +cmFileLockPool::cmFileLockPool() +{ +} + +cmFileLockPool::~cmFileLockPool() +{ + for (It i = this->FunctionScopes.begin(); + i != this->FunctionScopes.end(); ++i) + { + delete *i; + } + + for (It i = this->FileScopes.begin(); i != this->FileScopes.end(); ++i) + { + delete *i; + } +} + +void cmFileLockPool::PushFunctionScope() +{ + this->FunctionScopes.push_back(new ScopePool()); +} + +void cmFileLockPool::PopFunctionScope() +{ + assert(!this->FunctionScopes.empty()); + delete this->FunctionScopes.back(); + this->FunctionScopes.pop_back(); +} + +void cmFileLockPool::PushFileScope() +{ + this->FileScopes.push_back(new ScopePool()); +} + +void cmFileLockPool::PopFileScope() +{ + assert(!this->FileScopes.empty()); + delete this->FileScopes.back(); + this->FileScopes.pop_back(); +} + +cmFileLockResult cmFileLockPool::LockFunctionScope( + const std::string& filename, unsigned timeoutSec) +{ + if (this->IsAlreadyLocked(filename)) + { + return cmFileLockResult::MakeAlreadyLocked(); + } + if (this->FunctionScopes.empty()) + { + return cmFileLockResult::MakeNoFunction(); + } + return this->FunctionScopes.back()->Lock(filename, timeoutSec); +} + +cmFileLockResult cmFileLockPool::LockFileScope( + const std::string& filename, unsigned timeoutSec) +{ + if (this->IsAlreadyLocked(filename)) + { + return cmFileLockResult::MakeAlreadyLocked(); + } + assert(!this->FileScopes.empty()); + return this->FileScopes.back()->Lock(filename, timeoutSec); +} + +cmFileLockResult cmFileLockPool::LockProcessScope( + const std::string& filename, unsigned timeoutSec) +{ + if (this->IsAlreadyLocked(filename)) + { + return cmFileLockResult::MakeAlreadyLocked(); + } + return this->ProcessScope.Lock(filename, timeoutSec); +} + +cmFileLockResult cmFileLockPool::Release(const std::string& filename) +{ + for (It i = this->FunctionScopes.begin(); + i != this->FunctionScopes.end(); ++i) + { + const cmFileLockResult result = (*i)->Release(filename); + if (!result.IsOk()) + { + return result; + } + } + + for (It i = this->FileScopes.begin(); i != this->FileScopes.end(); ++i) + { + const cmFileLockResult result = (*i)->Release(filename); + if (!result.IsOk()) + { + return result; + } + } + + return this->ProcessScope.Release(filename); +} + +bool cmFileLockPool::IsAlreadyLocked(const std::string& filename) const +{ + for (CIt i = this->FunctionScopes.begin(); + i != this->FunctionScopes.end(); ++i) + { + const bool result = (*i)->IsAlreadyLocked(filename); + if (result) + { + return true; + } + } + + for (CIt i = this->FileScopes.begin(); i != this->FileScopes.end(); ++i) + { + const bool result = (*i)->IsAlreadyLocked(filename); + if (result) + { + return true; + } + } + + return this->ProcessScope.IsAlreadyLocked(filename); +} + +cmFileLockPool::ScopePool::ScopePool() +{ +} + +cmFileLockPool::ScopePool::~ScopePool() +{ + for (It i = this->Locks.begin(); i != this->Locks.end(); ++i) + { + delete *i; + } +} + +cmFileLockResult cmFileLockPool::ScopePool::Lock( + const std::string& filename, unsigned timeoutSec) +{ + cmFileLock *lock = new cmFileLock(); + const cmFileLockResult result = lock->Lock(filename, timeoutSec); + if (result.IsOk()) + { + this->Locks.push_back(lock); + return cmFileLockResult::MakeOk(); + } + else + { + delete lock; + return result; + } +} + +cmFileLockResult cmFileLockPool::ScopePool::Release( + const std::string& filename) +{ + for (It i = this->Locks.begin(); i != this->Locks.end(); ++i) + { + if ((*i)->IsLocked(filename)) + { + return (*i)->Release(); + } + } + return cmFileLockResult::MakeOk(); +} + +bool cmFileLockPool::ScopePool::IsAlreadyLocked( + const std::string& filename) const +{ + for (CIt i = this->Locks.begin(); i != this->Locks.end(); ++i) + { + if ((*i)->IsLocked(filename)) + { + return true; + } + } + return false; +} diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h new file mode 100644 index 0000000..a63540c --- /dev/null +++ b/Source/cmFileLockPool.h @@ -0,0 +1,100 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 cmFileLockPool_h +#define cmFileLockPool_h + +#include "cmStandardIncludes.h" + +class cmFileLockResult; +class cmFileLock; + +class cmFileLockPool +{ + public: + cmFileLockPool(); + ~cmFileLockPool(); + + //@{ + /** + * @brief Function scope control. + */ + void PushFunctionScope(); + void PopFunctionScope(); + //@} + + //@{ + /** + * @brief File scope control. + */ + void PushFileScope(); + void PopFileScope(); + //@} + + //@{ + /** + * @brief Lock the file in given scope. + * @param timeoutSec Lock timeout. If -1 try until success or fatal error. + */ + cmFileLockResult LockFunctionScope( + const std::string& filename, unsigned timeoutSec + ); + cmFileLockResult LockFileScope( + const std::string& filename, unsigned timeoutSec + ); + cmFileLockResult LockProcessScope( + const std::string& filename, unsigned timeoutSec + ); + //@} + + /** + * @brief Unlock the file explicitly. + */ + cmFileLockResult Release(const std::string& filename); + + private: + cmFileLockPool(const cmFileLockPool&); + cmFileLockPool& operator=(const cmFileLockPool&); + + bool IsAlreadyLocked(const std::string& filename) const; + + class ScopePool + { + public: + ScopePool(); + ~ScopePool(); + + cmFileLockResult Lock(const std::string& filename, unsigned timeoutSec); + cmFileLockResult Release(const std::string& filename); + bool IsAlreadyLocked(const std::string& filename) const; + + private: + ScopePool(const ScopePool&); + ScopePool& operator=(const ScopePool&); + + typedef std::list List; + typedef List::iterator It; + typedef List::const_iterator CIt; + + List Locks; + }; + + typedef std::list List; + + typedef List::iterator It; + typedef List::const_iterator CIt; + + List FunctionScopes; + List FileScopes; + ScopePool ProcessScope; +}; + +#endif // cmFileLockPool_h diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx new file mode 100644 index 0000000..045e7ee --- /dev/null +++ b/Source/cmFileLockResult.cxx @@ -0,0 +1,111 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLockResult.h" + +#include + +cmFileLockResult cmFileLockResult::MakeOk() +{ + return cmFileLockResult(OK, 0); +} + +cmFileLockResult cmFileLockResult::MakeSystem() +{ +#if defined(_WIN32) + const Error lastError = GetLastError(); +#else + const Error lastError = errno; +#endif + return cmFileLockResult(SYSTEM, lastError); +} + +cmFileLockResult cmFileLockResult::MakeTimeout() +{ + return cmFileLockResult(TIMEOUT, 0); +} + +cmFileLockResult cmFileLockResult::MakeAlreadyLocked() +{ + return cmFileLockResult(ALREADY_LOCKED, 0); +} + +cmFileLockResult cmFileLockResult::MakeInternal() +{ + return cmFileLockResult(INTERNAL, 0); +} + +cmFileLockResult cmFileLockResult::MakeNoFunction() +{ + return cmFileLockResult(NO_FUNCTION, 0); +} + +bool cmFileLockResult::IsOk() const +{ + return this->Type == OK; +} + +std::string cmFileLockResult::GetOutputMessage() const +{ + switch (this->Type) + { + case OK: + return "0"; + case SYSTEM: +#if defined(_WIN32) + { + char* errorText = NULL; + + // http://stackoverflow.com/a/455533/2288008 + DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_IGNORE_INSERTS; + ::FormatMessageA( + flags, + NULL, + this->ErrorValue, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&errorText, + 0, + NULL + ); + + if (errorText != NULL) + { + const std::string message = errorText; + ::LocalFree(errorText); + return message; + } + else + { + return "Internal error (FormatMessageA failed)"; + } + } +#else + return strerror(this->ErrorValue); +#endif + case TIMEOUT: + return "Timeout reached"; + case ALREADY_LOCKED: + return "File already locked"; + case NO_FUNCTION: + return "'GUARD FUNCTION' not used in function definition"; + case INTERNAL: + default: + return "Internal error"; + } +} + +cmFileLockResult::cmFileLockResult(ErrorType typeValue, Error errorValue): + Type(typeValue), ErrorValue(errorValue) +{ +} diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h new file mode 100644 index 0000000..531fb49 --- /dev/null +++ b/Source/cmFileLockResult.h @@ -0,0 +1,85 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 cmFileLockResult_h +#define cmFileLockResult_h + +#include "cmStandardIncludes.h" + +#if defined(_WIN32) +# include // DWORD +#endif + +/** + * @brief Result of the locking/unlocking file. + * @note See @c cmFileLock + */ +class cmFileLockResult +{ + public: +#if defined(_WIN32) + typedef DWORD Error; +#else + typedef int Error; +#endif + + /** + * @brief Successful lock/unlock. + */ + static cmFileLockResult MakeOk(); + + /** + * @brief Lock/Unlock failed. Read error/GetLastError. + */ + static cmFileLockResult MakeSystem(); + + /** + * @brief Lock/Unlock failed. Timeout reached. + */ + static cmFileLockResult MakeTimeout(); + + /** + * @brief File already locked. + */ + static cmFileLockResult MakeAlreadyLocked(); + + /** + * @brief Internal error. + */ + static cmFileLockResult MakeInternal(); + + /** + * @brief Try to lock with function guard outside of the function + */ + static cmFileLockResult MakeNoFunction(); + + bool IsOk() const; + std::string GetOutputMessage() const; + + private: + enum ErrorType + { + OK, + SYSTEM, + TIMEOUT, + ALREADY_LOCKED, + INTERNAL, + NO_FUNCTION + }; + + cmFileLockResult(ErrorType type, Error errorValue); + + ErrorType Type; + Error ErrorValue; +}; + +#endif // cmFileLockResult_h diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx new file mode 100644 index 0000000..3c01da8 --- /dev/null +++ b/Source/cmFileLockUnix.cxx @@ -0,0 +1,102 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLock.h" + +#include // errno +#include // SEEK_SET +#include +#include "cmSystemTools.h" + +cmFileLock::cmFileLock(): File(-1) +{ +} + +cmFileLockResult cmFileLock::Release() +{ + if (this->Filename.empty()) + { + return cmFileLockResult::MakeOk(); + } + const int lockResult = this->LockFile(F_SETLK, F_UNLCK); + + this->Filename = ""; + + if (lockResult == 0) + { + return cmFileLockResult::MakeOk(); + } + else + { + return cmFileLockResult::MakeSystem(); + } +} + +cmFileLockResult cmFileLock::OpenFile() +{ + this->File = ::open(this->Filename.c_str(), O_RDWR); + if (this->File == -1) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithoutTimeout() +{ + if (this->LockFile(F_SETLKW, F_WRLCK) == -1) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) +{ + while (true) + { + if (this->LockFile(F_SETLK, F_WRLCK) == -1) + { + if (errno != EAGAIN) + { + return cmFileLockResult::MakeSystem(); + } + } + else + { + return cmFileLockResult::MakeOk(); + } + if (seconds == 0) + { + return cmFileLockResult::MakeTimeout(); + } + --seconds; + cmSystemTools::Delay(1000); + } +} + +int cmFileLock::LockFile(int cmd, int type) +{ + struct ::flock lock; + lock.l_start = 0; + lock.l_len = 0; // lock all bytes + lock.l_pid = 0; // unused (for F_GETLK only) + lock.l_type = type; // exclusive lock + lock.l_whence = SEEK_SET; + return ::fcntl(this->File, cmd, &lock); +} diff --git a/Source/cmFileLockWin32.cxx b/Source/cmFileLockWin32.cxx new file mode 100644 index 0000000..17231ea --- /dev/null +++ b/Source/cmFileLockWin32.cxx @@ -0,0 +1,126 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLock.h" + +#include // CreateFileW +#include "cmSystemTools.h" + +cmFileLock::cmFileLock(): File(INVALID_HANDLE_VALUE) +{ +} + +cmFileLockResult cmFileLock::Release() +{ + if (this->Filename.empty()) + { + return cmFileLockResult::MakeOk(); + } + const unsigned long len = static_cast(-1); + static OVERLAPPED overlapped; + const DWORD reserved = 0; + const BOOL unlockResult = UnlockFileEx( + File, + reserved, + len, + len, + &overlapped + ); + + this->Filename = ""; + + if (unlockResult) + { + return cmFileLockResult::MakeOk(); + } + else + { + return cmFileLockResult::MakeSystem(); + } +} + +cmFileLockResult cmFileLock::OpenFile() +{ + const DWORD access = GENERIC_READ | GENERIC_WRITE; + const DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + const PSECURITY_ATTRIBUTES security = NULL; + const DWORD attr = 0; + const HANDLE templ = NULL; + this->File = CreateFileW( + cmSystemTools::ConvertToWindowsExtendedPath(this->Filename).c_str(), + access, + shareMode, + security, + OPEN_EXISTING, + attr, + templ + ); + if (this->File == INVALID_HANDLE_VALUE) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithoutTimeout() +{ + if (!this->LockFile(LOCKFILE_EXCLUSIVE_LOCK)) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) +{ + const DWORD flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY; + while (true) + { + const BOOL result = this->LockFile(flags); + if (result) + { + return cmFileLockResult::MakeOk(); + } + const DWORD error = GetLastError(); + if (error != ERROR_LOCK_VIOLATION) + { + return cmFileLockResult::MakeSystem(); + } + if (seconds == 0) + { + return cmFileLockResult::MakeTimeout(); + } + --seconds; + cmSystemTools::Delay(1000); + } +} + +BOOL cmFileLock::LockFile(DWORD flags) +{ + const DWORD reserved = 0; + const unsigned long len = static_cast(-1); + static OVERLAPPED overlapped; + return LockFileEx( + this->File, + flags, + reserved, + len, + len, + &overlapped + ); +} diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 926efe7..6b75298 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -23,6 +23,7 @@ #include "cmGeneratorExpression.h" #if defined(CMAKE_BUILD_WITH_CMAKE) +# include "cmFileLockPool.h" # include #endif @@ -348,6 +349,10 @@ public: std::set const& GetFilenameTargetDepends(cmSourceFile* sf) const; +#if defined(CMAKE_BUILD_WITH_CMAKE) + cmFileLockPool& GetFileLockPool() { return FileLockPool; } +#endif + protected: virtual void Generate(); @@ -499,6 +504,11 @@ private: mutable std::map > FilenameTargetDepends; + +#if defined(CMAKE_BUILD_WITH_CMAKE) + // Pool of file locks + cmFileLockPool FileLockPool; +#endif }; #endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3fb1e1e..2de6c93 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -79,9 +79,15 @@ public: this->GG = lg->GetGlobalGenerator(); this->LG = this->GG->GetCurrentLocalGenerator(); this->GG->SetCurrentLocalGenerator(lg); +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GG->GetFileLockPool().PushFileScope(); +#endif } ~cmLocalGeneratorCurrent() { +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GG->GetFileLockPool().PopFileScope(); +#endif this->GG->SetCurrentLocalGenerator(this->LG); } }; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 53fd56f..2506eaa 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4522,10 +4522,20 @@ void cmMakefile::PushScope() this->Internal->VarUsageStack.push(usage); this->PushLoopBlockBarrier(); + +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GetLocalGenerator()->GetGlobalGenerator()-> + GetFileLockPool().PushFunctionScope(); +#endif } void cmMakefile::PopScope() { +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GetLocalGenerator()->GetGlobalGenerator()-> + GetFileLockPool().PopFunctionScope(); +#endif + this->PopLoopBlockBarrier(); cmDefinitions* current = &this->Internal->VarStack.top(); diff --git a/Tests/RunCMake/file/LOCK-error-file-create-fail-result.txt b/Tests/RunCMake/file/LOCK-error-file-create-fail-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-file-create-fail-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt b/Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt new file mode 100644 index 0000000..72b7fe0 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at LOCK-error-file-create-fail\.cmake:[0-9]+ \(file\): + file + + ".*" + + creation failed \(check permissions\)\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-file-create-fail.cmake b/Tests/RunCMake/file/LOCK-error-file-create-fail.cmake new file mode 100644 index 0000000..4868cfe --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-file-create-fail.cmake @@ -0,0 +1,3 @@ +set(tmp "${CMAKE_CURRENT_BINARY_DIR}/temp-directory") +file(MAKE_DIRECTORY "${tmp}") +file(LOCK "${tmp}") diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect-result.txt b/Tests/RunCMake/file/LOCK-error-guard-incorrect-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt b/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt new file mode 100644 index 0000000..85136b4 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at LOCK-error-guard-incorrect\.cmake:[0-9]+ \(file\): + expected FUNCTION, FILE or PROCESS after GUARD, but got: + + "FUNCTIO"\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake b/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake new file mode 100644 index 0000000..51daa7c --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD FUNCTIO) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt new file mode 100644 index 0000000..c6ae1e0 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-incorrect-timeout\.cmake:[0-9]+ \(file\): + TIMEOUT value "qwerty" is not an unsigned integer\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-result.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt new file mode 100644 index 0000000..6ea2507 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-incorrect-timeout-trail\.cmake:[0-9]+ \(file\): + TIMEOUT value "123xyz" is not an unsigned integer\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake new file mode 100644 index 0000000..c4f1b75 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT 123xyz) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake b/Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake new file mode 100644 index 0000000..d882467 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT qwerty) diff --git a/Tests/RunCMake/file/LOCK-error-lock-fail-result.txt b/Tests/RunCMake/file/LOCK-error-lock-fail-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-lock-fail-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt b/Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt new file mode 100644 index 0000000..a7b0447 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at LOCK-error-lock-fail.cmake:[0-9]+ \(file\): + directory + + ".*" + + creation failed \(check permissions\)\. diff --git a/Tests/RunCMake/file/LOCK-error-lock-fail.cmake b/Tests/RunCMake/file/LOCK-error-lock-fail.cmake new file mode 100644 index 0000000..aa7f663 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-lock-fail.cmake @@ -0,0 +1,6 @@ +set(lfile "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock") +FILE(WRITE "${lfile}" "") + +# Try to lock file '${lfile}/cmake.lock'. Since `lfile` is not a directory +# expected that operation will fail. +file(LOCK "${lfile}" DIRECTORY) diff --git a/Tests/RunCMake/file/LOCK-error-negative-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-negative-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-negative-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt new file mode 100644 index 0000000..0d159c1 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-negative-timeout\.cmake:[0-9]+ \(file\): + TIMEOUT value "-2" is not an unsigned integer\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-negative-timeout.cmake b/Tests/RunCMake/file/LOCK-error-negative-timeout.cmake new file mode 100644 index 0000000..6a0f190 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-negative-timeout.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT -2) diff --git a/Tests/RunCMake/file/LOCK-error-no-function-result.txt b/Tests/RunCMake/file/LOCK-error-no-function-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-function-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-function-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-function-stderr.txt new file mode 100644 index 0000000..51ed12d --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-function-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at LOCK-error-no-function\.cmake:[0-9]+ \(file\): + error locking file + + ".*" + + 'GUARD FUNCTION' not used in function definition\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-function.cmake b/Tests/RunCMake/file/LOCK-error-no-function.cmake new file mode 100644 index 0000000..1b8b06a --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-function.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD FUNCTION) diff --git a/Tests/RunCMake/file/LOCK-error-no-guard-result.txt b/Tests/RunCMake/file/LOCK-error-no-guard-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-guard-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt new file mode 100644 index 0000000..41177ce --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-guard\.cmake:[0-9]+ \(file\): + expected FUNCTION, FILE or PROCESS after GUARD +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-guard.cmake b/Tests/RunCMake/file/LOCK-error-no-guard.cmake new file mode 100644 index 0000000..48ffc5e --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-guard.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD) diff --git a/Tests/RunCMake/file/LOCK-error-no-path-result.txt b/Tests/RunCMake/file/LOCK-error-no-path-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-path-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt new file mode 100644 index 0000000..2247aa6 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-path.cmake:[0-9]+ \(file\): + file must be called with at least two arguments. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-path.cmake b/Tests/RunCMake/file/LOCK-error-no-path.cmake new file mode 100644 index 0000000..12d79b7 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-path.cmake @@ -0,0 +1 @@ +file(LOCK) diff --git a/Tests/RunCMake/file/LOCK-error-no-result-variable-result.txt b/Tests/RunCMake/file/LOCK-error-no-result-variable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-result-variable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt new file mode 100644 index 0000000..b38e23c --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-result-variable\.cmake:[0-9]+ \(file\): + expected variable name after RESULT_VARIABLE +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-result-variable.cmake b/Tests/RunCMake/file/LOCK-error-no-result-variable.cmake new file mode 100644 index 0000000..e6ac18d --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-result-variable.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" RESULT_VARIABLE) diff --git a/Tests/RunCMake/file/LOCK-error-no-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-no-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt new file mode 100644 index 0000000..f34d46f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-timeout\.cmake:[0-9]+ \(file\): + expected timeout value after TIMEOUT +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-timeout.cmake b/Tests/RunCMake/file/LOCK-error-no-timeout.cmake new file mode 100644 index 0000000..1618192 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-timeout.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT) diff --git a/Tests/RunCMake/file/LOCK-error-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-timeout-stderr.txt new file mode 100644 index 0000000..4ad1f04 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout-stderr.txt @@ -0,0 +1,12 @@ +Output:[ ]* +Error: CMake Error at .*.timeout-script\.cmake:[0-9]+ \(file\): + error locking file + + ".*" + + Timeout reached\. ++ +CMake Error at LOCK-error-timeout\.cmake:[0-9]+ \(message\): + Result: 1 +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-timeout-stdout.txt b/Tests/RunCMake/file/LOCK-error-timeout-stdout.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout-stdout.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/file/LOCK-error-timeout.cmake b/Tests/RunCMake/file/LOCK-error-timeout.cmake new file mode 100644 index 0000000..b6b9476 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout.cmake @@ -0,0 +1,17 @@ +set(script "${CMAKE_CURRENT_LIST_DIR}/timeout-script.cmake") +set(file_to_lock "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock") + +file(LOCK "${file_to_lock}") +execute_process( + COMMAND "${CMAKE_COMMAND}" "-Dfile_to_lock=${file_to_lock}" -P "${script}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error +) + +message("Output: ${output}") +message("Error: ${error}") + +if(NOT result EQUAL 0) + message(FATAL_ERROR "Result: ${result}") +endif() diff --git a/Tests/RunCMake/file/LOCK-error-unknown-option-result.txt b/Tests/RunCMake/file/LOCK-error-unknown-option-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-unknown-option-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt b/Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt new file mode 100644 index 0000000..ad596af --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at LOCK-error-unknown-option\.cmake:[0-9]+ \(file\): + expected DIRECTORY, RELEASE, GUARD, RESULT_VARIABLE or TIMEOUT + + but got: "UNKNOWN"\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]* \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-unknown-option.cmake b/Tests/RunCMake/file/LOCK-error-unknown-option.cmake new file mode 100644 index 0000000..88ef002 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-unknown-option.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/temp-file" UNKNOWN) diff --git a/Tests/RunCMake/file/LOCK-stdout.txt b/Tests/RunCMake/file/LOCK-stdout.txt new file mode 100644 index 0000000..416126a --- /dev/null +++ b/Tests/RunCMake/file/LOCK-stdout.txt @@ -0,0 +1,11 @@ +-- Simple lock +-- Directory lock +-- Release +-- Lock function scope +-- Lock file scope +-- Lock in subdirectory +-- Lock process scope +-- Error double lock +-- Ok +-- Timeout 0 +-- Timeout not 0 diff --git a/Tests/RunCMake/file/LOCK.cmake b/Tests/RunCMake/file/LOCK.cmake new file mode 100644 index 0000000..8eff084 --- /dev/null +++ b/Tests/RunCMake/file/LOCK.cmake @@ -0,0 +1,40 @@ +set(lfile "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock") +set(ldir "${CMAKE_CURRENT_BINARY_DIR}/dir-to-lock") + +message(STATUS "Simple lock") +file(LOCK ${lfile}) + +message(STATUS "Directory lock") +file(LOCK ${ldir} DIRECTORY) + +message(STATUS "Release") +file(LOCK ${lfile} RELEASE) + +function(foo) + file(LOCK "${lfile}" GUARD FUNCTION) +endfunction() + +message(STATUS "Lock function scope") +foo() + +message(STATUS "Lock file scope") +add_subdirectory(subdir_test_unlock) + +message(STATUS "Lock process scope") +file(LOCK "${lfile}" GUARD PROCESS) + +message(STATUS "Error double lock") +file(LOCK "${lfile}" RESULT_VARIABLE lock_result) +if(lock_result STREQUAL "File already locked") + message(STATUS "Ok") +else() + message(STATUS FATAL_ERROR "Expected error message") +endif() + +message(STATUS "Timeout 0") +file(LOCK "${lfile}" RELEASE) +file(LOCK "${lfile}" TIMEOUT 0) + +message(STATUS "Timeout not 0") +file(LOCK "${lfile}" RELEASE) +file(LOCK "${lfile}" TIMEOUT 3) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index bf14263..14819e7 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -3,3 +3,17 @@ include(RunCMake) run_cmake(INSTALL-DIRECTORY) run_cmake(INSTALL-MESSAGE-bad) run_cmake(FileOpenFailRead) +run_cmake(LOCK) +run_cmake(LOCK-error-file-create-fail) +run_cmake(LOCK-error-guard-incorrect) +run_cmake(LOCK-error-incorrect-timeout) +run_cmake(LOCK-error-incorrect-timeout-trail) +run_cmake(LOCK-error-lock-fail) +run_cmake(LOCK-error-negative-timeout) +run_cmake(LOCK-error-no-function) +run_cmake(LOCK-error-no-guard) +run_cmake(LOCK-error-no-path) +run_cmake(LOCK-error-no-result-variable) +run_cmake(LOCK-error-no-timeout) +run_cmake(LOCK-error-timeout) +run_cmake(LOCK-error-unknown-option) diff --git a/Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt b/Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt new file mode 100644 index 0000000..c167cd7 --- /dev/null +++ b/Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt @@ -0,0 +1,2 @@ +message(STATUS "Lock in subdirectory") +file(LOCK "${lfile}" GUARD FILE) diff --git a/Tests/RunCMake/file/timeout-script.cmake b/Tests/RunCMake/file/timeout-script.cmake new file mode 100644 index 0000000..e07dbf0 --- /dev/null +++ b/Tests/RunCMake/file/timeout-script.cmake @@ -0,0 +1,5 @@ +if(NOT file_to_lock) + message(FATAL_ERROR "file_to_lock is empty") +endif() + +file(LOCK "${file_to_lock}" TIMEOUT 1) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5121f1186304dc2cbf1b2212415c680d66dff6c8 commit 5121f1186304dc2cbf1b2212415c680d66dff6c8 Author: Ruslan Baratov AuthorDate: Wed Nov 26 01:45:26 2014 +0300 Commit: Brad King CommitDate: Mon Dec 1 10:28:45 2014 -0500 cmSystemTools: Add StringToInt helper Convert a string to a signed integer and reject any extra input. diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index baac7b8..4c08e07 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2923,3 +2923,11 @@ std::vector cmSystemTools::tokenize(const std::string& str, } return tokens; } + +//---------------------------------------------------------------------------- +bool cmSystemTools::StringToInt(const char* str, int* value) +{ + char unused; + const int result = sscanf(str, "%d%c", value, &unused); + return (result == 1); +} diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 4455dd1..763389b 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -458,6 +458,9 @@ public: static std::vector tokenize(const std::string& str, const std::string& sep); + /** Convert string to int. Expected that the whole string is an integer */ + static bool StringToInt(const char* str, int* value); + #ifdef _WIN32 struct WindowsFileRetry { ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 30 +++ Help/release/dev/file-LOCK-command.rst | 5 + Source/CMakeLists.txt | 6 + Source/cmFileCommand.cxx | 203 ++++++++++++++++++++ Source/cmFileCommand.h | 1 + Source/cmFileLock.cxx | 77 ++++++++ Source/cmFileLock.h | 74 +++++++ Source/cmFileLockPool.cxx | 198 +++++++++++++++++++ Source/cmFileLockPool.h | 100 ++++++++++ Source/cmFileLockResult.cxx | 111 +++++++++++ Source/cmFileLockResult.h | 85 ++++++++ Source/cmFileLockUnix.cxx | 102 ++++++++++ Source/cmFileLockWin32.cxx | 126 ++++++++++++ Source/cmGlobalGenerator.h | 10 + Source/cmLocalGenerator.cxx | 6 + Source/cmMakefile.cxx | 10 + Source/cmSystemTools.cxx | 8 + Source/cmSystemTools.h | 3 + .../LOCK-error-file-create-fail-result.txt} | 0 .../file/LOCK-error-file-create-fail-stderr.txt | 8 + .../file/LOCK-error-file-create-fail.cmake | 3 + .../LOCK-error-guard-incorrect-result.txt} | 0 .../file/LOCK-error-guard-incorrect-stderr.txt | 6 + .../RunCMake/file/LOCK-error-guard-incorrect.cmake | 1 + .../LOCK-error-incorrect-timeout-result.txt} | 0 .../file/LOCK-error-incorrect-timeout-stderr.txt | 4 + .../LOCK-error-incorrect-timeout-trail-result.txt} | 0 .../LOCK-error-incorrect-timeout-trail-stderr.txt | 4 + .../file/LOCK-error-incorrect-timeout-trail.cmake | 1 + .../file/LOCK-error-incorrect-timeout.cmake | 1 + .../LOCK-error-lock-fail-result.txt} | 0 .../RunCMake/file/LOCK-error-lock-fail-stderr.txt | 6 + Tests/RunCMake/file/LOCK-error-lock-fail.cmake | 6 + .../LOCK-error-negative-timeout-result.txt} | 0 .../file/LOCK-error-negative-timeout-stderr.txt | 4 + .../file/LOCK-error-negative-timeout.cmake | 1 + .../LOCK-error-no-function-result.txt} | 0 .../file/LOCK-error-no-function-stderr.txt | 8 + Tests/RunCMake/file/LOCK-error-no-function.cmake | 1 + .../LOCK-error-no-guard-result.txt} | 0 Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt | 4 + Tests/RunCMake/file/LOCK-error-no-guard.cmake | 1 + .../LOCK-error-no-path-result.txt} | 0 Tests/RunCMake/file/LOCK-error-no-path-stderr.txt | 4 + Tests/RunCMake/file/LOCK-error-no-path.cmake | 1 + .../LOCK-error-no-result-variable-result.txt} | 0 .../file/LOCK-error-no-result-variable-stderr.txt | 4 + .../file/LOCK-error-no-result-variable.cmake | 1 + .../LOCK-error-no-timeout-result.txt} | 0 .../RunCMake/file/LOCK-error-no-timeout-stderr.txt | 4 + Tests/RunCMake/file/LOCK-error-no-timeout.cmake | 1 + .../LOCK-error-timeout-result.txt} | 0 Tests/RunCMake/file/LOCK-error-timeout-stderr.txt | 12 ++ Tests/RunCMake/file/LOCK-error-timeout-stdout.txt | 1 + Tests/RunCMake/file/LOCK-error-timeout.cmake | 17 ++ .../LOCK-error-unknown-option-result.txt} | 0 .../file/LOCK-error-unknown-option-stderr.txt | 6 + .../RunCMake/file/LOCK-error-unknown-option.cmake | 1 + Tests/RunCMake/file/LOCK-stdout.txt | 11 ++ Tests/RunCMake/file/LOCK.cmake | 40 ++++ Tests/RunCMake/file/RunCMakeTest.cmake | 14 ++ .../file/subdir_test_unlock/CMakeLists.txt | 2 + Tests/RunCMake/file/timeout-script.cmake | 5 + 63 files changed, 1338 insertions(+) create mode 100644 Help/release/dev/file-LOCK-command.rst create mode 100644 Source/cmFileLock.cxx create mode 100644 Source/cmFileLock.h create mode 100644 Source/cmFileLockPool.cxx create mode 100644 Source/cmFileLockPool.h create mode 100644 Source/cmFileLockResult.cxx create mode 100644 Source/cmFileLockResult.h create mode 100644 Source/cmFileLockUnix.cxx create mode 100644 Source/cmFileLockWin32.cxx copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-file-create-fail-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-file-create-fail.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-guard-incorrect-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-incorrect-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-incorrect-timeout-trail-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-lock-fail-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-lock-fail.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-negative-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-negative-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-function-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-function-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-function.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-guard-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-guard.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-path-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-path-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-path.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-result-variable-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-result-variable.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-timeout-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-timeout-stdout.txt create mode 100644 Tests/RunCMake/file/LOCK-error-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-unknown-option-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-unknown-option.cmake create mode 100644 Tests/RunCMake/file/LOCK-stdout.txt create mode 100644 Tests/RunCMake/file/LOCK.cmake create mode 100644 Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt create mode 100644 Tests/RunCMake/file/timeout-script.cmake hooks/post-receive -- CMake From ben.boeckel at kitware.com Mon Dec 1 10:55:30 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 1 Dec 2014 10:55:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-968-g120e11f Message-ID: <20141201155534.10AF7A7F28@public.kitware.com> This is an automated email from 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 120e11fe8cde02a574eb972c8f98cfb6d7a67648 (commit) via ae676e46af6dab626a76c61a7be8ddd158535fa2 (commit) via 789d893af26dd8ef5e3a7de01b3a66767bb3b811 (commit) from 21e224e818871f074ba134faed05409c36ad613b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=120e11fe8cde02a574eb972c8f98cfb6d7a67648 commit 120e11fe8cde02a574eb972c8f98cfb6d7a67648 Merge: 21e224e ae676e4 Author: Ben Boeckel AuthorDate: Mon Dec 1 10:55:28 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 10:55:28 2014 -0500 Merge topic 'cached-regex-clear-fixed' into next ae676e46 cmMakefile: store the number of last matches in a CMake var 789d893a test: add a test for clearing regex results http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae676e46af6dab626a76c61a7be8ddd158535fa2 commit ae676e46af6dab626a76c61a7be8ddd158535fa2 Author: Ben Boeckel AuthorDate: Mon Dec 1 10:51:49 2014 -0500 Commit: Ben Boeckel CommitDate: Mon Dec 1 10:55:15 2014 -0500 cmMakefile: store the number of last matches in a CMake var With PushScope and PopScope, keeping track of another bit of data for each scope isn't easy. Instead, store it as another CMake variable so it gets implicitly tracked along with everything else. This works in a revert of commit 7d674b5f0b28a610333644d417c2e8cb796cc9e4. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 99088e0..2de4103 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -47,6 +47,7 @@ Variables that Provide Information /variable/CMAKE_LINK_LIBRARY_SUFFIX /variable/CMAKE_MAJOR_VERSION /variable/CMAKE_MAKE_PROGRAM + /variable/CMAKE_MATCH_COUNT /variable/CMAKE_MINIMUM_REQUIRED_VERSION /variable/CMAKE_MINOR_VERSION /variable/CMAKE_PARENT_LIST_FILE diff --git a/Help/variable/CMAKE_MATCH_COUNT.rst b/Help/variable/CMAKE_MATCH_COUNT.rst new file mode 100644 index 0000000..4f7b9ab --- /dev/null +++ b/Help/variable/CMAKE_MATCH_COUNT.rst @@ -0,0 +1,8 @@ +CMAKE_MATCH_COUNT +----------------- + +The number of matches with the last regular expression. + +When a regular expression match is used, CMake fills in `CMAKE_MATCH_` +variables with the match contents. The `CMAKE_MATCH_COUNT` variable holds the +number of match expressions when these are filled. diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 6065b8a..aba26de 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -11,7 +11,6 @@ ============================================================================*/ #include "cmConditionEvaluator.h" -#include "cmStringCommand.h" cmConditionEvaluator::cmConditionEvaluator(cmMakefile& makefile): Makefile(makefile), @@ -556,7 +555,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs, { def = this->GetVariableOrString(*arg); const char* rex = argP2->c_str(); - cmStringCommand::ClearMatches(&this->Makefile); + this->Makefile.ClearMatches(); cmsys::RegularExpression regEntry; if ( !regEntry.compile(rex) ) { @@ -568,7 +567,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs, } if (regEntry.find(def)) { - cmStringCommand::StoreMatches(&this->Makefile, regEntry); + this->Makefile.StoreMatches(regEntry); *arg = cmExpandedCommandArgument("1", true); } else diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 53fd56f..2a8bbd4 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4841,6 +4841,64 @@ std::vector cmMakefile::GetQtUiFilesWithOptions() const return this->QtUiFilesWithOptions; } +static std::string matchVariables[] = { + "CMAKE_MATCH_0", + "CMAKE_MATCH_1", + "CMAKE_MATCH_2", + "CMAKE_MATCH_3", + "CMAKE_MATCH_4", + "CMAKE_MATCH_5", + "CMAKE_MATCH_6", + "CMAKE_MATCH_7", + "CMAKE_MATCH_8", + "CMAKE_MATCH_9" +}; + +static std::string nMatchesVariable = "CMAKE_MATCH_COUNT"; + +//---------------------------------------------------------------------------- +void cmMakefile::ClearMatches() +{ + const char* nMatchesStr = this->GetDefinition(nMatchesVariable); + if (!nMatchesStr) + { + return; + } + int nMatches = atoi(nMatchesStr); + for (int i=0; iGetSafeDefinition(var); + if(!s.empty()) + { + this->AddDefinition(var, ""); + this->MarkVariableAsUsed(var); + } + } + this->AddDefinition(nMatchesVariable, "0"); + this->MarkVariableAsUsed(nMatchesVariable); +} + +//---------------------------------------------------------------------------- +void cmMakefile::StoreMatches(cmsys::RegularExpression& re) +{ + char highest = 0; + for (unsigned int i=0; i<10; i++) + { + std::string const& m = re.match(i); + if(!m.empty()) + { + std::string const& var = matchVariables[i]; + this->AddDefinition(var, m.c_str()); + this->MarkVariableAsUsed(var); + highest = '0' + i + 1; + } + } + char nMatches[] = {highest, '\0'}; + this->AddDefinition(nMatchesVariable, nMatches); + this->MarkVariableAsUsed(nMatchesVariable); +} + //---------------------------------------------------------------------------- cmPolicies::PolicyStatus cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 05b7a37..fcfec8d 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -976,6 +976,9 @@ public: void PopLoopBlock(); bool IsLoopBlock() const; + void ClearMatches(); + void StoreMatches(cmsys::RegularExpression& re); + protected: // add link libraries and directories to the target void AddGlobalLinkInformation(const std::string& name, cmTarget& target); diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 9827c62..8341027 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -310,7 +310,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -325,7 +325,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) std::string output; if(re.find(input.c_str())) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l = re.start(); std::string::size_type r = re.end(); if(r-l == 0) @@ -359,7 +359,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -376,7 +376,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) const char* p = input.c_str(); while(re.find(p)) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l = re.start(); std::string::size_type r = re.end(); if(r-l == 0) @@ -463,7 +463,7 @@ bool cmStringCommand::RegexReplace(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -480,7 +480,7 @@ bool cmStringCommand::RegexReplace(std::vector const& args) std::string::size_type base = 0; while(re.find(input.c_str()+base)) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l2 = re.start(); std::string::size_type r = re.end(); @@ -541,38 +541,6 @@ bool cmStringCommand::RegexReplace(std::vector const& args) } //---------------------------------------------------------------------------- -void cmStringCommand::ClearMatches(cmMakefile* mf) -{ - for (unsigned int i=0; i<10; i++) - { - char name[128]; - sprintf(name, "CMAKE_MATCH_%d", i); - const char* s = mf->GetDefinition(name); - if(s && *s != 0) - { - mf->AddDefinition(name, ""); - mf->MarkVariableAsUsed(name); - } - } -} - -//---------------------------------------------------------------------------- -void cmStringCommand::StoreMatches(cmMakefile* mf,cmsys::RegularExpression& re) -{ - for (unsigned int i=0; i<10; i++) - { - std::string m = re.match(i); - if(m.size() > 0) - { - char name[128]; - sprintf(name, "CMAKE_MATCH_%d", i); - mf->AddDefinition(name, re.match(i).c_str()); - mf->MarkVariableAsUsed(name); - } - } -} - -//---------------------------------------------------------------------------- bool cmStringCommand::HandleFindCommand(std::vector const& args) { diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index a5fe893..9c75095 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -53,8 +53,6 @@ public: virtual std::string GetName() const { return "string";} cmTypeMacro(cmStringCommand, cmCommand); - static void ClearMatches(cmMakefile* mf); - static void StoreMatches(cmMakefile* mf, cmsys::RegularExpression& re); protected: bool HandleConfigureCommand(std::vector const& args); bool HandleAsciiCommand(std::vector const& args); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=789d893af26dd8ef5e3a7de01b3a66767bb3b811 commit 789d893af26dd8ef5e3a7de01b3a66767bb3b811 Author: Ben Boeckel AuthorDate: Wed Nov 26 12:46:55 2014 -0500 Commit: Ben Boeckel CommitDate: Mon Dec 1 10:51:12 2014 -0500 test: add a test for clearing regex results diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c9d9568..6ed3f0a 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -271,6 +271,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(MacroTest miniMacroTest) ADD_TEST_MACRO(FunctionTest miniFunctionTest) ADD_TEST_MACRO(ReturnTest ReturnTest) + ADD_TEST_MACRO(RegexClear RegexClear) ADD_TEST_MACRO(Properties Properties) ADD_TEST_MACRO(Assembler HelloAsm) ADD_TEST_MACRO(SourceGroups SourceGroups) diff --git a/Tests/RegexClear/CMakeLists.txt b/Tests/RegexClear/CMakeLists.txt new file mode 100644 index 0000000..5911b42 --- /dev/null +++ b/Tests/RegexClear/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required (VERSION 3.0) +project (RegexClear C) + +function (check_for_success) + if (CMAKE_MATCH_1 STREQUAL "0" AND + CMAKE_MATCH_2 STREQUAL "1") + message("Matched string properly") + else () + message(FATAL_ERROR "Failed to match properly") + endif () +endfunction () + +function (check_for_failure) + if (CMAKE_MATCH_1 STREQUAL "" AND + CMAKE_MATCH_2 STREQUAL "") + message("Matched nothing properly") + else () + message(FATAL_ERROR "Found a match where there should be none") + endif () +endfunction () + +macro (do_regex_success) + string(REGEX MATCH "(0)(1)" output "01") + check_for_success() +endmacro () + +macro (do_regex_failure) + string(REGEX MATCH "(0)(1)" output "12") + check_for_failure() +endmacro () + +do_regex_success() + +list(INSERT CMAKE_MODULE_PATH 0 + "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +find_package(dummy) # Ensure cmMakefile::PushScope/PopScope work. + +check_for_failure() +do_regex_failure() +do_regex_success() + +add_subdirectory(subdir) + +check_for_success() # Ensure that the subdir didn't mess with this scope. + +add_executable(RegexClear RegexClear.c) diff --git a/Tests/RegexClear/RegexClear.c b/Tests/RegexClear/RegexClear.c new file mode 100644 index 0000000..d123e09 --- /dev/null +++ b/Tests/RegexClear/RegexClear.c @@ -0,0 +1,4 @@ +int main(int argc, char** argv) +{ + return 0; +} diff --git a/Tests/RegexClear/cmake/Finddummy.cmake b/Tests/RegexClear/cmake/Finddummy.cmake new file mode 100644 index 0000000..635e362 --- /dev/null +++ b/Tests/RegexClear/cmake/Finddummy.cmake @@ -0,0 +1,4 @@ +check_for_success() +do_regex_failure() + +set(dummy_FOUND 1) diff --git a/Tests/RegexClear/subdir/CMakeLists.txt b/Tests/RegexClear/subdir/CMakeLists.txt new file mode 100644 index 0000000..2ed176a --- /dev/null +++ b/Tests/RegexClear/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ +check_for_success() +do_regex_failure() ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/variable/CMAKE_MATCH_COUNT.rst | 8 +++++ Source/cmConditionEvaluator.cxx | 5 ++- Source/cmMakefile.cxx | 58 ++++++++++++++++++++++++++++++++ Source/cmMakefile.h | 3 ++ Source/cmStringCommand.cxx | 44 ++++-------------------- Source/cmStringCommand.h | 2 -- Tests/CMakeLists.txt | 1 + Tests/RegexClear/CMakeLists.txt | 46 +++++++++++++++++++++++++ Tests/RegexClear/RegexClear.c | 4 +++ Tests/RegexClear/cmake/Finddummy.cmake | 4 +++ Tests/RegexClear/subdir/CMakeLists.txt | 2 ++ 12 files changed, 135 insertions(+), 43 deletions(-) create mode 100644 Help/variable/CMAKE_MATCH_COUNT.rst create mode 100644 Tests/RegexClear/CMakeLists.txt create mode 100644 Tests/RegexClear/RegexClear.c create mode 100644 Tests/RegexClear/cmake/Finddummy.cmake create mode 100644 Tests/RegexClear/subdir/CMakeLists.txt hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 11:09:07 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 11:09:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-970-g7bf6711 Message-ID: <20141201160907.6996F148DF@public.kitware.com> This is an automated email from 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 7bf67118463e1111560f0c8a62d5064455819365 (commit) via d051cbda5d9d4456619fac5d49f24c8827228aa9 (commit) from 120e11fe8cde02a574eb972c8f98cfb6d7a67648 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7bf67118463e1111560f0c8a62d5064455819365 commit 7bf67118463e1111560f0c8a62d5064455819365 Merge: 120e11f d051cbd Author: Brad King AuthorDate: Mon Dec 1 11:09:06 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 11:09:06 2014 -0500 Merge topic 'FindOpenGL-no-X11' into next d051cbda FindOpenGL: Drop explicit dependency on X11 (#15268) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d051cbda5d9d4456619fac5d49f24c8827228aa9 commit d051cbda5d9d4456619fac5d49f24c8827228aa9 Author: Brad King AuthorDate: Mon Dec 1 10:54:20 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 11:05:29 2014 -0500 FindOpenGL: Drop explicit dependency on X11 (#15268) In commit 079e8469ab (... OpenGL always needs X11 on Unix, 2002-09-05) the FindOpenGL module was taught to search for X11 as a dependency of the OpenGL library. This was done without a detailed explanation, and the dependency should not be explicitly needed because OpenGL headers should not expose applications to X11 APIs directly. Unfortunately the only way to know if anything legitimately depends on this behavior (perhaps in static library cases) is to simply remove it and wait for issues to be reported. If so, then we can add some kind of compatibility setting for this later. Add a release note to draw attention to this change. Reported-by: Dainius "GreatEmerald" Masili?nas diff --git a/Help/release/dev/FindOpenGL-no-X11.rst b/Help/release/dev/FindOpenGL-no-X11.rst new file mode 100644 index 0000000..dacf165 --- /dev/null +++ b/Help/release/dev/FindOpenGL-no-X11.rst @@ -0,0 +1,8 @@ +FindOpenGL-no-X11 +----------------- + +* The :module:`FindOpenGL` module no longer explicitly searches + for any dependency on X11 libraries with the :module:`FindX11` + module. Such dependencies should not need to be explicit. + Applications using X11 APIs themselves should find and link + to X11 libraries explicitly. diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 2b3bd14..373c58f 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -138,19 +138,6 @@ else() unset(_OPENGL_INCLUDE_PATH) unset(_OPENGL_LIB_PATH) - # On Unix OpenGL most certainly always requires X11. - # Feel free to tighten up these conditions if you don't - # think this is always true. - - if (OPENGL_gl_LIBRARY) - if(NOT X11_FOUND) - include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake) - endif() - if (X11_FOUND) - set (OPENGL_LIBRARIES ${X11_LIBRARIES}) - endif () - endif () - find_library(OPENGL_glu_LIBRARY NAMES GLU MesaGLU PATHS ${OPENGL_gl_LIBRARY} ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindOpenGL-no-X11.rst | 8 ++++++++ Modules/FindOpenGL.cmake | 13 ------------- 2 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 Help/release/dev/FindOpenGL-no-X11.rst hooks/post-receive -- CMake From eike at sf-mail.de Mon Dec 1 11:19:54 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Mon, 1 Dec 2014 11:19:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-972-g1b1987b Message-ID: <20141201161954.BDD55A80EA@public.kitware.com> This is an automated email from 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 1b1987b8d8d572da275cd0d028bfd19e66a7a6f7 (commit) via 0f1aa6e639751f787096e66ea266958ca57a864f (commit) from 7bf67118463e1111560f0c8a62d5064455819365 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b1987b8d8d572da275cd0d028bfd19e66a7a6f7 commit 1b1987b8d8d572da275cd0d028bfd19e66a7a6f7 Merge: 7bf6711 0f1aa6e Author: Rolf Eike Beer AuthorDate: Mon Dec 1 11:19:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 11:19:54 2014 -0500 Merge topic 'file-LOCK-command' into next 0f1aa6e6 cmSystemTools::StringToInt(): reimplement without sscanf() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f1aa6e639751f787096e66ea266958ca57a864f commit 0f1aa6e639751f787096e66ea266958ca57a864f Author: Rolf Eike Beer AuthorDate: Mon Dec 1 17:18:59 2014 +0100 Commit: Rolf Eike Beer CommitDate: Mon Dec 1 17:18:59 2014 +0100 cmSystemTools::StringToInt(): reimplement without sscanf() diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 4c08e07..9852dd6 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2927,7 +2927,7 @@ std::vector cmSystemTools::tokenize(const std::string& str, //---------------------------------------------------------------------------- bool cmSystemTools::StringToInt(const char* str, int* value) { - char unused; - const int result = sscanf(str, "%d%c", value, &unused); - return (result == 1); + char *endp; + *value = static_cast(strtol(str, &endp, 10)); + return (*endp == '\0') && (endp != str); } ----------------------------------------------------------------------- Summary of changes: Source/cmSystemTools.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Mon Dec 1 12:57:26 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 1 Dec 2014 12:57:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-974-g14d771d Message-ID: <20141201175726.2FFE3A8269@public.kitware.com> This is an automated email from 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 14d771da2db3edad9b47c7565de805fab0c50ccc (commit) via 20bff46023c05ee2949aebdd8221c4a4c1289451 (commit) from 1b1987b8d8d572da275cd0d028bfd19e66a7a6f7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14d771da2db3edad9b47c7565de805fab0c50ccc commit 14d771da2db3edad9b47c7565de805fab0c50ccc Merge: 1b1987b 20bff46 Author: Ben Boeckel AuthorDate: Mon Dec 1 12:57:25 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 12:57:25 2014 -0500 Merge topic 'xcode-target-search-perf' into next 20bff460 xcode: use a map to look up target pointers http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20bff46023c05ee2949aebdd8221c4a4c1289451 commit 20bff46023c05ee2949aebdd8221c4a4c1289451 Author: Ben Boeckel AuthorDate: Mon Dec 1 12:56:46 2014 -0500 Commit: Ben Boeckel CommitDate: Mon Dec 1 12:56:46 2014 -0500 xcode: use a map to look up target pointers Rather than iterating over a vector, use a map to associate targets with XCode objects. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b9f64e2..2dbc48c 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2458,6 +2458,7 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget) target->AddAttribute("name", this->CreateString(cmtarget.GetName())); target->AddAttribute("productName",this->CreateString(cmtarget.GetName())); target->SetTarget(&cmtarget); + this->XCodeObjectMap[&cmtarget] = target; // Add source files without build rules for editing convenience. if(cmtarget.GetType() == cmTarget::UTILITY) @@ -2661,6 +2662,7 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget, target->AddAttribute("productType", this->CreateString(productType)); } target->SetTarget(&cmtarget); + this->XCodeObjectMap[&cmtarget] = target; target->SetId(this->GetOrCreateId( cmtarget.GetName(), target->GetId()).c_str()); return target; @@ -2673,16 +2675,14 @@ cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget(cmTarget const* t) { return 0; } - for(std::vector::iterator i = this->XCodeObjects.begin(); - i != this->XCodeObjects.end(); ++i) + + std::map::const_iterator const i = + this->XCodeObjectMap.find(t); + if (i == this->XCodeObjectMap.end()) { - cmXCodeObject* o = *i; - if(o->GetTarget() == t) - { - return o; - } + return 0; } - return 0; + return i->second; } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 9d7b784..d2bc9d1 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -241,6 +241,7 @@ private: std::map GroupNameMap; std::map TargetGroup; std::map FileRefs; + std::map XCodeObjectMap; std::vector Architectures; std::string GeneratorToolset; }; ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 16 ++++++++-------- Source/cmGlobalXCodeGenerator.h | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Mon Dec 1 12:57:52 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 1 Dec 2014 12:57:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-976-g16ea4be Message-ID: <20141201175752.8B7B1A8275@public.kitware.com> This is an automated email from 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 16ea4be99cf2460abbe432e82971ba14816867a2 (commit) via 6c9d33562560333c123899c8ff3d2cd47fe386a1 (commit) from 14d771da2db3edad9b47c7565de805fab0c50ccc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16ea4be99cf2460abbe432e82971ba14816867a2 commit 16ea4be99cf2460abbe432e82971ba14816867a2 Merge: 14d771d 6c9d335 Author: Ben Boeckel AuthorDate: Mon Dec 1 12:57:51 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 12:57:51 2014 -0500 Merge topic 'icase-source-file-prop' into next 6c9d3356 test: test source file properties with case-insensitivity http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c9d33562560333c123899c8ff3d2cd47fe386a1 commit 6c9d33562560333c123899c8ff3d2cd47fe386a1 Author: Ben Boeckel AuthorDate: Fri Nov 21 13:21:55 2014 -0500 Commit: Ben Boeckel CommitDate: Mon Dec 1 12:57:41 2014 -0500 test: test source file properties with case-insensitivity Some filesystems are case insensitive, so when setting properties on the files, this should be respected (modulo a policy decision). diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c9d9568..fda9359 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -291,6 +291,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(ConfigSources ConfigSources) endif() ADD_TEST_MACRO(SourcesProperty SourcesProperty) + ADD_TEST_MACRO(SourceFileProperty SourceFileProperty) if(CMAKE_CXX_COMPILER_ID STREQUAL GNU AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) set(runCxxDialectTest 1) diff --git a/Tests/SourceFileProperty/CMakeLists.txt b/Tests/SourceFileProperty/CMakeLists.txt new file mode 100644 index 0000000..6a9b744 --- /dev/null +++ b/Tests/SourceFileProperty/CMakeLists.txt @@ -0,0 +1,21 @@ + +cmake_minimum_required(VERSION 3.0) + +project(SourceFileProperty) + +set(sources) + +if (EXISTS icasetest.c) + # If a file exists by this name, use it. + set_source_files_properties(icasetest.c + PROPERTIES + COMPILE_FLAGS -DNEEDED_TO_WORK) +else () + # Work on case-sensitive file systems as well. + set_source_files_properties(main.c + PROPERTIES + COMPILE_FLAGS -DNO_NEED_TO_CALL) +endif () +list(APPEND sources ICaseTest.c) + +add_executable(SourceFileProperty main.c ${sources}) diff --git a/Tests/SourceFileProperty/ICaseTest.c b/Tests/SourceFileProperty/ICaseTest.c new file mode 100644 index 0000000..454c721 --- /dev/null +++ b/Tests/SourceFileProperty/ICaseTest.c @@ -0,0 +1,7 @@ + +#ifdef NEEDED_TO_WORK +int icasetest() +{ + return 0; +} +#endif diff --git a/Tests/SourceFileProperty/main.c b/Tests/SourceFileProperty/main.c new file mode 100644 index 0000000..b853408 --- /dev/null +++ b/Tests/SourceFileProperty/main.c @@ -0,0 +1,13 @@ + +#ifndef NO_NEED_TO_CALL +extern int icasetest(); +#endif + +int main(int argc, char** argv) +{ +#ifdef NO_NEED_TO_CALL + return 0; +#else + return icasetest(); +#endif +} ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 1 + Tests/SourceFileProperty/CMakeLists.txt | 21 +++++++++++++++++++++ Tests/SourceFileProperty/ICaseTest.c | 7 +++++++ Tests/SourceFileProperty/main.c | 13 +++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Tests/SourceFileProperty/CMakeLists.txt create mode 100644 Tests/SourceFileProperty/ICaseTest.c create mode 100644 Tests/SourceFileProperty/main.c hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 13:01:53 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 13:01:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-978-gdd92144 Message-ID: <20141201180153.31EECA836B@public.kitware.com> This is an automated email from 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 dd92144a268d54a790e4c5fb609d85a2e21c1f4d (commit) via 20bf6971f54756a282bda97a9a304f758ad01df2 (commit) from 16ea4be99cf2460abbe432e82971ba14816867a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd92144a268d54a790e4c5fb609d85a2e21c1f4d commit dd92144a268d54a790e4c5fb609d85a2e21c1f4d Merge: 16ea4be 20bf697 Author: Brad King AuthorDate: Mon Dec 1 13:01:52 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 13:01:52 2014 -0500 Merge topic 'fix-implicit-lib-logging' into next 20bf6971 CMakeParseImplicitLinkInfo: Fix implicit library logging http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20bf6971f54756a282bda97a9a304f758ad01df2 commit 20bf6971f54756a282bda97a9a304f758ad01df2 Author: Brad King AuthorDate: Mon Dec 1 12:57:57 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 12:58:33 2014 -0500 CMakeParseImplicitLinkInfo: Fix implicit library logging In commit v3.1.0-rc1~640^2~5 (Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex), 2014-04-06) we accidentally broke logging of the implicit library detection. Restore use of the intermediate 'lib' variable so that the log message is constructed properly. Reported-by: Bill Somerville diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index bfcf455..fcc13da 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -66,7 +66,8 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj set(log "${log} arg [${arg}] ==> dir [${dir}]\n") elseif("${arg}" MATCHES "^-l([^:].*)$") # Unix library. - list(APPEND implicit_libs_tmp ${CMAKE_MATCH_1}) + set(lib "${CMAKE_MATCH_1}") + list(APPEND implicit_libs_tmp ${lib}) set(log "${log} arg [${arg}] ==> lib [${lib}]\n") elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.a$") # Unix library full path. ----------------------------------------------------------------------- Summary of changes: Modules/CMakeParseImplicitLinkInfo.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 13:50:33 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 13:50:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-980-g1b48834 Message-ID: <20141201185033.C75C1A7C46@public.kitware.com> This is an automated email from 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 1b4883412b9a507fc969b9ea3f8f01c54a6eafeb (commit) via 1c5be1f367abcc97ed4fe4f0a0235c147e6868a4 (commit) from dd92144a268d54a790e4c5fb609d85a2e21c1f4d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b4883412b9a507fc969b9ea3f8f01c54a6eafeb commit 1b4883412b9a507fc969b9ea3f8f01c54a6eafeb Merge: dd92144 1c5be1f Author: Brad King AuthorDate: Mon Dec 1 13:50:33 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 13:50:33 2014 -0500 Merge topic 'link-no-empty-response-files' into next 1c5be1f3 Makefile: Do not create an empty linker response file http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c5be1f367abcc97ed4fe4f0a0235c147e6868a4 commit 1c5be1f367abcc97ed4fe4f0a0235c147e6868a4 Author: Brad King AuthorDate: Mon Dec 1 13:43:01 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 13:49:26 2014 -0500 Makefile: Do not create an empty linker response file Since commit v3.1.0-rc1~821^2 (Windows: Use response files to specify link libraries for GNU tools, 2014-03-04) we use a response file to pass possibly long linker flag lists to the GNU linker on Windows. On MinGW, this may cause gfortran to use a response file to pass some flags to its own internal invocation. This is okay except when we are parsing implicit link flags from the compiler ABI detection build. If gfortran uses a response file in that case then we may miss extracting some of the implicit link flags, such as -lgfortran. Fortunately, in the compiler ABI detection case we do not actually link to anything so the response file is empty. Work around this problem by simply not using a response file when the list of flags it is used to pass is empty (or just whitespace). Reported-by: Bill Somerville diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 1f8f686..85e371d 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1846,7 +1846,7 @@ cmMakefileTargetGenerator useWatcomQuote); linkLibs = frameworkPath + linkPath + linkLibs; - if(useResponseFile) + if(useResponseFile && linkLibs.find_first_not_of(" ") != linkLibs.npos) { // Lookup the response file reference flag. std::string responseFlagVar = "CMAKE_"; ----------------------------------------------------------------------- Summary of changes: Source/cmMakefileTargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 1 16:07:46 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 1 Dec 2014 16:07:46 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-982-gf904dd1 Message-ID: <20141201210746.CA1A3A83A0@public.kitware.com> This is an automated email from 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 f904dd1e6af8208ab6f931f6580eb9eb094b82fc (commit) via 02e34de2b6c27ee5d367be4fa280ffd3ad1965ba (commit) from 1b4883412b9a507fc969b9ea3f8f01c54a6eafeb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f904dd1e6af8208ab6f931f6580eb9eb094b82fc commit f904dd1e6af8208ab6f931f6580eb9eb094b82fc Merge: 1b48834 02e34de Author: Brad King AuthorDate: Mon Dec 1 16:07:45 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 1 16:07:45 2014 -0500 Merge topic 'FindOpenGL-revert-imported-targets' into next 02e34de2 FindOpenGL: Revert support for imported targets (#15267) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02e34de2b6c27ee5d367be4fa280ffd3ad1965ba commit 02e34de2b6c27ee5d367be4fa280ffd3ad1965ba Author: Brad King AuthorDate: Mon Dec 1 16:01:09 2014 -0500 Commit: Brad King CommitDate: Mon Dec 1 16:01:09 2014 -0500 FindOpenGL: Revert support for imported targets (#15267) Revert the feature added by commit v3.1.0-rc1~420^2~2 (FindOpenGL: Provide imported targets for GL and GLU, 2014-05-31). Unfortunately it does not work on Windows because the full path to each library file is not actually known. The IMPORTED_LOCATION of an imported target must be a full path, but OPENGL_gl_LIBRARY is just 'opengl32' on Windows because the actual library file is in some implicit link directory that we may know know. More infrastructure will be needed in CMake to allow a name-only imported library. Until that exists, we will not be able to provide imported targets in FindOpenGL. diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index 65aae00..1272d91 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -230,9 +230,6 @@ Modules * The :module:`FindOpenCL` module was introduced. -* The :module:`FindOpenGL` module now provides imported targets - ``OpenGL::GL`` and ``OpenGL::GLU`` when the libraries are found. - * The :module:`FindOpenMP` module learned to support Fortran. * The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG`` diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 2b3bd14..a83a6c3 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -4,16 +4,6 @@ # # FindModule for OpenGL and GLU. # -# IMPORTED Targets -# ^^^^^^^^^^^^^^^^ -# -# This module defines the :prop_tgt:`IMPORTED` targets: -# -# ``OpenGL::GL`` -# Defined if the system has OpenGL. -# ``OpenGL::GLU`` -# Defined if the system has GLU. -# # Result Variables # ^^^^^^^^^^^^^^^^ # @@ -191,36 +181,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS}) unset(_OpenGL_REQUIRED_VARS) -# OpenGL:: targets -if(OPENGL_FOUND) - if(NOT TARGET OpenGL::GL) - add_library(OpenGL::GL UNKNOWN IMPORTED) - set_target_properties(OpenGL::GL PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}") - if(OPENGL_gl_LIBRARY MATCHES "/([^/]+)\\.framework$") - set_target_properties(OpenGL::GL PROPERTIES - IMPORTED_LOCATION "${OPENGL_gl_LIBRARY}/${CMAKE_MATCH_1}") - else() - set_target_properties(OpenGL::GL PROPERTIES - IMPORTED_LOCATION "${OPENGL_gl_LIBRARY}") - endif() - endif() - - if(OPENGL_GLU_FOUND AND NOT TARGET OpenGL::GLU) - add_library(OpenGL::GLU UNKNOWN IMPORTED) - set_target_properties(OpenGL::GLU PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES OpenGL::GL) - if(OPENGL_glu_LIBRARY MATCHES "/([^/]+)\\.framework$") - set_target_properties(OpenGL::GLU PROPERTIES - IMPORTED_LOCATION "${OPENGL_glu_LIBRARY}/${CMAKE_MATCH_1}") - else() - set_target_properties(OpenGL::GLU PROPERTIES - IMPORTED_LOCATION "${OPENGL_glu_LIBRARY}") - endif() - endif() -endif() - mark_as_advanced( OPENGL_INCLUDE_DIR OPENGL_xmesa_INCLUDE_DIR ----------------------------------------------------------------------- Summary of changes: Help/release/3.1.0.rst | 3 --- Modules/FindOpenGL.cmake | 40 ---------------------------------------- 2 files changed, 43 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 2 00:01:11 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 2 Dec 2014 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-428-g0d75716 Message-ID: <20141202050111.36AC5A81F5@public.kitware.com> This is an automated email from 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 0d757166fef0f258d1e69f1d63c64612d9f7ecc7 (commit) from 3350e4d209b6a7ff758ca371af4d62844a66ab36 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d757166fef0f258d1e69f1d63c64612d9f7ecc7 commit 0d757166fef0f258d1e69f1d63c64612d9f7ecc7 Author: Kitware Robot AuthorDate: Tue Dec 2 00:01:09 2014 -0500 Commit: Kitware Robot CommitDate: Tue Dec 2 00:01:09 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c8c6a5b..8819c23 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 1) -set(CMake_VERSION_PATCH 20141201) +set(CMake_VERSION_PATCH 20141202) #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 Dec 2 09:21:21 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 09:21:21 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-984-g46b503d Message-ID: <20141202142121.F3DA5A8089@public.kitware.com> This is an automated email from 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 46b503d3f72e3ea69609f79f84a94b5dfc868b07 (commit) via 64f8c5336b9a3d1ca5d0b7109ee92b40901c03cd (commit) from f904dd1e6af8208ab6f931f6580eb9eb094b82fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46b503d3f72e3ea69609f79f84a94b5dfc868b07 commit 46b503d3f72e3ea69609f79f84a94b5dfc868b07 Merge: f904dd1 64f8c53 Author: Brad King AuthorDate: Tue Dec 2 09:21:20 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 09:21:20 2014 -0500 Merge topic 'doc-compile-features-typo' into next 64f8c533 Help: Fix typo in cmake-compile-features(7) manual http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64f8c5336b9a3d1ca5d0b7109ee92b40901c03cd commit 64f8c5336b9a3d1ca5d0b7109ee92b40901c03cd Author: David Demelier AuthorDate: Tue Dec 2 11:04:23 2014 +0100 Commit: Brad King CommitDate: Tue Dec 2 09:20:22 2014 -0500 Help: Fix typo in cmake-compile-features(7) manual Fix spelling 'execptions' => 'exceptions'. diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index 4259224..7a6c249 100644 --- a/Help/manual/cmake-compile-features.7.rst +++ b/Help/manual/cmake-compile-features.7.rst @@ -28,7 +28,7 @@ CMake knows are known to the compiler, regardless of language standard or compile flags needed to use them. Features known to CMake are named mostly following the same convention -as the Clang feature test macros. The are some execptions, such as +as the Clang feature test macros. The are some exceptions, such as CMake using ``cxx_final`` and ``cxx_override`` instead of the single ``cxx_override_control`` used by Clang. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 09:33:54 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 09:33:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-986-gd39df85 Message-ID: <20141202143354.08AC7A83F0@public.kitware.com> This is an automated email from 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 d39df852faa5424913e350b13a53232aafbce1fb (commit) via a4962595835d0496d7a8fe5ba5f4290a41e07099 (commit) from 46b503d3f72e3ea69609f79f84a94b5dfc868b07 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d39df852faa5424913e350b13a53232aafbce1fb commit d39df852faa5424913e350b13a53232aafbce1fb Merge: 46b503d a496259 Author: Brad King AuthorDate: Tue Dec 2 09:33:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 09:33:53 2014 -0500 Merge topic 'fix-wince-unicode-entry-point' into next a4962595 VS, WINCE: Fix entry point for Unicode builds http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4962595835d0496d7a8fe5ba5f4290a41e07099 commit a4962595835d0496d7a8fe5ba5f4290a41e07099 Author: Pascal Bach AuthorDate: Tue Dec 2 13:33:42 2014 +0100 Commit: Brad King CommitDate: Tue Dec 2 09:32:16 2014 -0500 VS, WINCE: Fix entry point for Unicode builds When _UNICODE is defined VS uses wmain instead of main as the entry function. To make this correctly work on WindowsCE EntryPointSymbol needs to be set to mainWCRTStartup instead of mainWCRTStartup for console applications and to wWinMainCRTStartup instead of WinMainCRTStartup for GUI applications. Signed-off-by: Pascal Bach diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 26fc317..2ef27e2 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2267,7 +2267,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "wWinMainCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + } } } else @@ -2282,7 +2289,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "mainWCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + } } } else ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From eike at sf-mail.de Tue Dec 2 09:39:08 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Tue, 2 Dec 2014 09:39:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-988-g81bd110 Message-ID: <20141202143908.DE0A72A9C@public.kitware.com> This is an automated email from 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 81bd110de4e4e6a503ff348bb16af1700ea9c12c (commit) via 4c8c3ba912fcca9d9154365d0757ce14b3be0670 (commit) from d39df852faa5424913e350b13a53232aafbce1fb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81bd110de4e4e6a503ff348bb16af1700ea9c12c commit 81bd110de4e4e6a503ff348bb16af1700ea9c12c Merge: d39df85 4c8c3ba Author: Rolf Eike Beer AuthorDate: Tue Dec 2 09:39:08 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 09:39:08 2014 -0500 Merge topic 'FindPythonInterp-Fix-1.4' into next 4c8c3ba9 FindPythonInterp: fix version component variables for Python 1.4 (#15275) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c8c3ba912fcca9d9154365d0757ce14b3be0670 commit 4c8c3ba912fcca9d9154365d0757ce14b3be0670 Author: Rolf Eike Beer AuthorDate: Tue Dec 2 15:36:59 2014 +0100 Commit: Rolf Eike Beer CommitDate: Tue Dec 2 15:36:59 2014 +0100 FindPythonInterp: fix version component variables for Python 1.4 (#15275) This bug was introduced in "FindPythonInterp: rework the version detection" 7d6db93de9ffc6e6092fa722aaf9c057dadcd634. diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index 5e5c7b9..8784e18 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -148,8 +148,8 @@ if(PYTHON_EXECUTABLE) # this is older. set(PYTHON_VERSION_STRING "1.4") set(PYTHON_VERSION_MAJOR "1") - set(PYTHON_VERSION_MAJOR "4") - set(PYTHON_VERSION_MAJOR "0") + set(PYTHON_VERSION_MINOR "4") + set(PYTHON_VERSION_PATCH "0") endif() endif() unset(_PYTHON_VERSION_RESULT) ----------------------------------------------------------------------- Summary of changes: Modules/FindPythonInterp.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:16:35 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:16:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-990-g4f4eda6 Message-ID: <20141202151635.DBDA6A7DC0@public.kitware.com> This is an automated email from 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 4f4eda6f14a3753c392c0addc99b3d12e89e3b51 (commit) via cf79de9b35c306ee2317c71d14ae8e2a9f7c374e (commit) from 81bd110de4e4e6a503ff348bb16af1700ea9c12c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f4eda6f14a3753c392c0addc99b3d12e89e3b51 commit 4f4eda6f14a3753c392c0addc99b3d12e89e3b51 Merge: 81bd110 cf79de9 Author: Brad King AuthorDate: Tue Dec 2 10:16:33 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:16:33 2014 -0500 Merge topic 'file-LOCK-command' into next cf79de9b cmFileLock: Fix warnings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf79de9b35c306ee2317c71d14ae8e2a9f7c374e commit cf79de9b35c306ee2317c71d14ae8e2a9f7c374e Author: Brad King AuthorDate: Tue Dec 2 10:11:00 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 10:11:10 2014 -0500 cmFileLock: Fix warnings diff --git a/Source/cmFileLock.cxx b/Source/cmFileLock.cxx index f69c36a..5f75637 100644 --- a/Source/cmFileLock.cxx +++ b/Source/cmFileLock.cxx @@ -22,6 +22,7 @@ cmFileLock::~cmFileLock() if (!this->Filename.empty()) { const cmFileLockResult result = this->Release(); + static_cast(result); assert(result.IsOk()); } } diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 7c2803b..4d922a0 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -23,7 +23,7 @@ class cmFileLockResult; /** * @brief Cross-platform file locking. - * @detail Under the hood this class use 'fcntl' for Unix-like platforms and + * @details Under the hood this class use 'fcntl' for Unix-like platforms and * 'LockFileEx'/'UnlockFileEx' for Win32 platform. Locks are exclusive and * advisory. */ @@ -46,7 +46,7 @@ class cmFileLock /** * @brief Check file is locked by this class. - * @detail This function helps to find double locks (deadlocks) and to do + * @details This function helps to find double locks (deadlocks) and to do * explicit unlocks. */ bool IsLocked(const std::string& filename) const; diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx index 3c01da8..5b0db69 100644 --- a/Source/cmFileLockUnix.cxx +++ b/Source/cmFileLockUnix.cxx @@ -96,7 +96,7 @@ int cmFileLock::LockFile(int cmd, int type) lock.l_start = 0; lock.l_len = 0; // lock all bytes lock.l_pid = 0; // unused (for F_GETLK only) - lock.l_type = type; // exclusive lock + lock.l_type = static_cast(type); // exclusive lock lock.l_whence = SEEK_SET; return ::fcntl(this->File, cmd, &lock); } ----------------------------------------------------------------------- Summary of changes: Source/cmFileLock.cxx | 1 + Source/cmFileLock.h | 4 ++-- Source/cmFileLockUnix.cxx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:21:15 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:21:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-430-gf39d713 Message-ID: <20141202152115.BB5DAA8147@public.kitware.com> This is an automated email from 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 f39d713af62b4087f059ac0cd861c363d3f45bd3 (commit) via be9bec5df2660661984e080dad9ae7561aa1fe83 (commit) from 0d757166fef0f258d1e69f1d63c64612d9f7ecc7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f39d713af62b4087f059ac0cd861c363d3f45bd3 commit f39d713af62b4087f059ac0cd861c363d3f45bd3 Merge: 0d75716 be9bec5 Author: Brad King AuthorDate: Tue Dec 2 10:21:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:21:14 2014 -0500 Merge topic 'FindOpenSSL-separate-libs' be9bec5d FindOpenSSL: Report crypto and ssl libraries separately ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindOpenSSL-separate-libs.rst | 7 +++++++ Modules/FindOpenSSL.cmake | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/FindOpenSSL-separate-libs.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:21:17 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:21:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-432-g983e434 Message-ID: <20141202152117.DFDF0A815C@public.kitware.com> This is an automated email from 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 983e434b006bd46206a6d04ef0f04e37b652668e (commit) via 1c5be1f367abcc97ed4fe4f0a0235c147e6868a4 (commit) from f39d713af62b4087f059ac0cd861c363d3f45bd3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=983e434b006bd46206a6d04ef0f04e37b652668e commit 983e434b006bd46206a6d04ef0f04e37b652668e Merge: f39d713 1c5be1f Author: Brad King AuthorDate: Tue Dec 2 10:21:16 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:21:16 2014 -0500 Merge topic 'link-no-empty-response-files' 1c5be1f3 Makefile: Do not create an empty linker response file ----------------------------------------------------------------------- Summary of changes: Source/cmMakefileTargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:21:20 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:21:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-434-g3e33fea Message-ID: <20141202152120.034E1A815F@public.kitware.com> This is an automated email from 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 3e33feaae23991557aa39f53804739e7e1a36726 (commit) via 20bf6971f54756a282bda97a9a304f758ad01df2 (commit) from 983e434b006bd46206a6d04ef0f04e37b652668e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e33feaae23991557aa39f53804739e7e1a36726 commit 3e33feaae23991557aa39f53804739e7e1a36726 Merge: 983e434 20bf697 Author: Brad King AuthorDate: Tue Dec 2 10:21:19 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:21:19 2014 -0500 Merge topic 'fix-implicit-lib-logging' 20bf6971 CMakeParseImplicitLinkInfo: Fix implicit library logging ----------------------------------------------------------------------- Summary of changes: Modules/CMakeParseImplicitLinkInfo.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:21:22 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:21:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-436-g5bc8282 Message-ID: <20141202152122.26744A8163@public.kitware.com> This is an automated email from 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 5bc82828987e8b59dca6d348294282356eeb1a66 (commit) via 64f8c5336b9a3d1ca5d0b7109ee92b40901c03cd (commit) from 3e33feaae23991557aa39f53804739e7e1a36726 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bc82828987e8b59dca6d348294282356eeb1a66 commit 5bc82828987e8b59dca6d348294282356eeb1a66 Merge: 3e33fea 64f8c53 Author: Brad King AuthorDate: Tue Dec 2 10:21:21 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:21:21 2014 -0500 Merge topic 'doc-compile-features-typo' 64f8c533 Help: Fix typo in cmake-compile-features(7) manual ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:21:24 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:21:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-438-gc3c251c Message-ID: <20141202152124.430DDA8165@public.kitware.com> This is an automated email from 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 c3c251ce0ae9ed6432bf1abc887309f01d498d38 (commit) via d051cbda5d9d4456619fac5d49f24c8827228aa9 (commit) from 5bc82828987e8b59dca6d348294282356eeb1a66 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3c251ce0ae9ed6432bf1abc887309f01d498d38 commit c3c251ce0ae9ed6432bf1abc887309f01d498d38 Merge: 5bc8282 d051cbd Author: Brad King AuthorDate: Tue Dec 2 10:21:22 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:21:22 2014 -0500 Merge topic 'FindOpenGL-no-X11' d051cbda FindOpenGL: Drop explicit dependency on X11 (#15268) ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindOpenGL-no-X11.rst | 8 ++++++++ Modules/FindOpenGL.cmake | 13 ------------- 2 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 Help/release/dev/FindOpenGL-no-X11.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:21:43 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:21:43 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-997-ge159347 Message-ID: <20141202152143.21A47A8162@public.kitware.com> This is an automated email from 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 e159347b18e9b20adbe59723d8e7340c7154b982 (commit) via c3c251ce0ae9ed6432bf1abc887309f01d498d38 (commit) via 5bc82828987e8b59dca6d348294282356eeb1a66 (commit) via 3e33feaae23991557aa39f53804739e7e1a36726 (commit) via 983e434b006bd46206a6d04ef0f04e37b652668e (commit) via f39d713af62b4087f059ac0cd861c363d3f45bd3 (commit) via 0d757166fef0f258d1e69f1d63c64612d9f7ecc7 (commit) from 4f4eda6f14a3753c392c0addc99b3d12e89e3b51 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e159347b18e9b20adbe59723d8e7340c7154b982 commit e159347b18e9b20adbe59723d8e7340c7154b982 Merge: 4f4eda6 c3c251c Author: Brad King AuthorDate: Tue Dec 2 10:21:34 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 10:21:34 2014 -0500 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 Dec 2 10:24:07 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:24:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-442-g722178f Message-ID: <20141202152407.2BF44A826B@public.kitware.com> This is an automated email from 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 722178fc7ef47020323af4a97dc5600e43652a2b (commit) via b85cd1bd69fcd4320ea05457e8f2254906b102be (commit) via 95b89e3fd3846b7ca1e6ab429a526d36e92fd1da (commit) via 9ea39ee04b12097f752fe1c9f4d181b0715c1d3c (commit) from c3c251ce0ae9ed6432bf1abc887309f01d498d38 (commit) Those revisions listed 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 Tue Dec 2 10:24:07 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:24:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1002-g95a7129 Message-ID: <20141202152407.4E4D8A826C@public.kitware.com> This is an automated email from 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 95a7129893fdf3b70c012969406abfe7455eece0 (commit) via 722178fc7ef47020323af4a97dc5600e43652a2b (commit) via b85cd1bd69fcd4320ea05457e8f2254906b102be (commit) via 95b89e3fd3846b7ca1e6ab429a526d36e92fd1da (commit) via 9ea39ee04b12097f752fe1c9f4d181b0715c1d3c (commit) from e159347b18e9b20adbe59723d8e7340c7154b982 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95a7129893fdf3b70c012969406abfe7455eece0 commit 95a7129893fdf3b70c012969406abfe7455eece0 Merge: e159347 722178f Author: Brad King AuthorDate: Tue Dec 2 10:23:57 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 10:23:57 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:24:07 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:24:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc2-62-gb85cd1b Message-ID: <20141202152407.68A39A826D@public.kitware.com> This is an automated email from 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 b85cd1bd69fcd4320ea05457e8f2254906b102be (commit) via 64f8c5336b9a3d1ca5d0b7109ee92b40901c03cd (commit) via 95b89e3fd3846b7ca1e6ab429a526d36e92fd1da (commit) via 9ea39ee04b12097f752fe1c9f4d181b0715c1d3c (commit) via 1c5be1f367abcc97ed4fe4f0a0235c147e6868a4 (commit) via 20bf6971f54756a282bda97a9a304f758ad01df2 (commit) from 5062bf748822b276b9766215b07670754ee1c76c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 2 +- Modules/CMakeParseImplicitLinkInfo.cmake | 3 ++- Source/cmMakefileTargetGenerator.cxx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:26:10 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:26:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1004-g7706df9 Message-ID: <20141202152610.20D63A832F@public.kitware.com> This is an automated email from 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 7706df9c17961a41b2318d171b09dae3eafcd93b (commit) via 5ab06dcdbddae0b3357fddcbb7682b5af7a3b60e (commit) from 95a7129893fdf3b70c012969406abfe7455eece0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7706df9c17961a41b2318d171b09dae3eafcd93b commit 7706df9c17961a41b2318d171b09dae3eafcd93b Merge: 95a7129 5ab06dc Author: Brad King AuthorDate: Tue Dec 2 10:26:08 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:26:08 2014 -0500 Merge topic 'vs-hlsl-settings' into next 5ab06dcd VS: Add source file properties to set the hlsl shader entry point and model http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ab06dcdbddae0b3357fddcbb7682b5af7a3b60e commit 5ab06dcdbddae0b3357fddcbb7682b5af7a3b60e Author: Cedric Perthuis AuthorDate: Tue Dec 2 01:41:10 2014 -0800 Commit: Brad King CommitDate: Tue Dec 2 10:05:49 2014 -0500 VS: Add source file properties to set the hlsl shader entry point and model Create properties VS_SHADER_ENTRYPOINT and VS_SHADER_MODEL. Without these many .hlsl source files may not be possible to use. Extend the VSWinStorePhone test project to cover them. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index bf456f5..5bbb89e 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -291,6 +291,8 @@ Properties on Source Files /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC /prop_sf/VS_DEPLOYMENT_CONTENT + /prop_sf/VS_SHADER_MODEL + /prop_sf/VS_SHADER_ENTRYPOINT /prop_sf/VS_SHADER_TYPE /prop_sf/WRAP_EXCLUDE /prop_sf/XCODE_EXPLICIT_FILE_TYPE diff --git a/Help/prop_sf/VS_SHADER_ENTRYPOINT.rst b/Help/prop_sf/VS_SHADER_ENTRYPOINT.rst new file mode 100644 index 0000000..fe3471f --- /dev/null +++ b/Help/prop_sf/VS_SHADER_ENTRYPOINT.rst @@ -0,0 +1,5 @@ +VS_SHADER_ENTRYPOINT +-------------------- + +Specifies the name of the entry point for the shader of a ``.hlsl`` source +file. diff --git a/Help/prop_sf/VS_SHADER_MODEL.rst b/Help/prop_sf/VS_SHADER_MODEL.rst new file mode 100644 index 0000000..b1cf0df --- /dev/null +++ b/Help/prop_sf/VS_SHADER_MODEL.rst @@ -0,0 +1,5 @@ +VS_SHADER_MODEL +--------------- + +Specifies the shader model of a ``.hlsl`` source file. Some shader types can +only be used with recent shader models diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index 65aae00..ba729a3 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -310,8 +310,10 @@ Other * The Visual Studio generators learned to treat ``.hlsl`` source files as High Level Shading Language sources (using ``FXCompile`` - in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file - property was added to specify the Shader Type. + in ``.vcxproj`` files). Source file properties + :prop_sf:`VS_SHADER_TYPE`, :prop_sf:`VS_SHADER_MODEL`, and + :prop_sf:`VS_SHADER_ENTRYPOINT` were added added to specify the + shader type, model, and entry point name. New Diagnostics =============== diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 26fc317..4fbd8fd 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1203,6 +1203,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) bool toolHasSettings = false; std::string tool = "None"; std::string shaderType; + std::string shaderEntryPoint; + std::string shaderModel; std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); if(ext == "hlsl") { @@ -1213,6 +1215,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) shaderType = st; toolHasSettings = true; } + // Figure out which entry point to use if any + if (const char* se = sf->GetProperty("VS_SHADER_ENTRYPOINT")) + { + shaderEntryPoint = se; + toolHasSettings = true; + } + // Figure out which entry point to use if any + if (const char* sm = sf->GetProperty("VS_SHADER_MODEL")) + { + shaderModel = sm; + toolHasSettings = true; + } } else if(ext == "jpg" || ext == "png") @@ -1295,7 +1309,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) (*this->BuildFileStream) << cmVS10EscapeXML(shaderType) << "\n"; } - + if(!shaderEntryPoint.empty()) + { + this->WriteString("", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderEntryPoint) + << "\n"; + } + if(!shaderModel.empty()) + { + this->WriteString("", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderModel) + << "\n"; + } this->WriteString("BuildFileStream) << tool << ">\n"; } diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt index 0041c75..badb7da 100644 --- a/Tests/VSWinStorePhone/CMakeLists.txt +++ b/Tests/VSWinStorePhone/CMakeLists.txt @@ -103,7 +103,13 @@ set_property(SOURCE ${RELEASE_CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT $,$,$>) set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_TYPE Pixel) +set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_ENTRYPOINT mainPS) +set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_MODEL 4.0_level_9_3) + set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_TYPE Vertex) +set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_ENTRYPOINT mainVS) +set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_MODEL 4.0_level_9_3) + source_group("Source Files" FILES ${SOURCE_FILES}) source_group("Header Files" FILES ${HEADER_FILES}) diff --git a/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl b/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl index d61e2c8..6796da1 100644 --- a/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl +++ b/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl @@ -4,7 +4,7 @@ struct PixelShaderInput float3 color : COLOR0; }; -float4 main(PixelShaderInput input) : SV_TARGET +float4 mainPS(PixelShaderInput input) : SV_TARGET { return float4(input.color,1.0f); } diff --git a/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl b/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl index 65d60e5..0963060 100644 --- a/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl +++ b/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl @@ -17,7 +17,7 @@ struct VertexShaderOutput float3 color : COLOR0; }; -VertexShaderOutput main(VertexShaderInput input) +VertexShaderOutput mainVS(VertexShaderInput input) { VertexShaderOutput output; float4 pos = float4(input.pos, 1.0f); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 2 ++ Help/prop_sf/VS_SHADER_ENTRYPOINT.rst | 5 ++++ Help/prop_sf/VS_SHADER_MODEL.rst | 5 ++++ Help/release/3.1.0.rst | 6 +++-- Source/cmVisualStudio10TargetGenerator.cxx | 27 +++++++++++++++++++- Tests/VSWinStorePhone/CMakeLists.txt | 6 +++++ .../Direct3DApp1/SimplePixelShader.hlsl | 2 +- .../Direct3DApp1/SimpleVertexShader.hlsl | 2 +- 8 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 Help/prop_sf/VS_SHADER_ENTRYPOINT.rst create mode 100644 Help/prop_sf/VS_SHADER_MODEL.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:49:54 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:49:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1006-g9a73e75 Message-ID: <20141202154954.EBDBCA7AB6@public.kitware.com> This is an automated email from 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 9a73e75b6941f1a2c7c11afb7f2b1ed0445786cd (commit) via 32aad371350c80207c55f72bcc146613f3841020 (commit) from 7706df9c17961a41b2318d171b09dae3eafcd93b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a73e75b6941f1a2c7c11afb7f2b1ed0445786cd commit 9a73e75b6941f1a2c7c11afb7f2b1ed0445786cd Merge: 7706df9 32aad37 Author: Brad King AuthorDate: Tue Dec 2 10:49:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:49:54 2014 -0500 Merge topic 'xcode-target-search-perf' into next 32aad371 xcode: Add missing cleanup of new data structure http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32aad371350c80207c55f72bcc146613f3841020 commit 32aad371350c80207c55f72bcc146613f3841020 Author: Brad King AuthorDate: Tue Dec 2 10:48:27 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 10:48:27 2014 -0500 xcode: Add missing cleanup of new data structure diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 2dbc48c..d222288 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -557,6 +557,7 @@ void cmGlobalXCodeGenerator::ClearXCodeObjects() } this->XCodeObjects.clear(); this->XCodeObjectIDs.clear(); + this->XCodeObjectMap.clear(); this->GroupMap.clear(); this->GroupNameMap.clear(); this->TargetGroup.clear(); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:56:31 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:56:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1008-g6ea42d6 Message-ID: <20141202155631.6E993A81E2@public.kitware.com> This is an automated email from 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 6ea42d6a63567671bca372b1abfa02d6eb907066 (commit) via 995835be03b141a2c760d0f66ce1121c80793863 (commit) from 9a73e75b6941f1a2c7c11afb7f2b1ed0445786cd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ea42d6a63567671bca372b1abfa02d6eb907066 commit 6ea42d6a63567671bca372b1abfa02d6eb907066 Merge: 9a73e75 995835b Author: Brad King AuthorDate: Tue Dec 2 10:56:30 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:56:30 2014 -0500 Merge topic 'icase-source-file-prop' into next 995835be Tests/SourceFileProperty: Enable only C http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=995835be03b141a2c760d0f66ce1121c80793863 commit 995835be03b141a2c760d0f66ce1121c80793863 Author: Brad King AuthorDate: Tue Dec 2 10:41:51 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 10:41:51 2014 -0500 Tests/SourceFileProperty: Enable only C We do not need CXX to be enabled for this test. diff --git a/Tests/SourceFileProperty/CMakeLists.txt b/Tests/SourceFileProperty/CMakeLists.txt index 6a9b744..1b6506d 100644 --- a/Tests/SourceFileProperty/CMakeLists.txt +++ b/Tests/SourceFileProperty/CMakeLists.txt @@ -1,7 +1,5 @@ - cmake_minimum_required(VERSION 3.0) - -project(SourceFileProperty) +project(SourceFileProperty C) set(sources) ----------------------------------------------------------------------- Summary of changes: Tests/SourceFileProperty/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 10:56:56 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 10:56:56 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1010-gafed2be Message-ID: <20141202155656.4D729A81FA@public.kitware.com> This is an automated email from 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 afed2be65cc751881b1bd24ef998c0d9df35fe75 (commit) via b7d760aea20f70b221fcba7ecb2c7edf7751ffc2 (commit) from 6ea42d6a63567671bca372b1abfa02d6eb907066 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afed2be65cc751881b1bd24ef998c0d9df35fe75 commit afed2be65cc751881b1bd24ef998c0d9df35fe75 Merge: 6ea42d6 b7d760a Author: Brad King AuthorDate: Tue Dec 2 10:56:55 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 10:56:55 2014 -0500 Merge topic 'icase-source-file-prop' into next b7d760ae test: test source file properties with case-insensitivity http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7d760aea20f70b221fcba7ecb2c7edf7751ffc2 commit b7d760aea20f70b221fcba7ecb2c7edf7751ffc2 Author: Ben Boeckel AuthorDate: Fri Nov 21 13:21:55 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 10:56:36 2014 -0500 test: test source file properties with case-insensitivity Some filesystems are case insensitive, so when setting properties on the files, this should be respected (modulo a policy decision). diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c9d9568..fda9359 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -291,6 +291,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(ConfigSources ConfigSources) endif() ADD_TEST_MACRO(SourcesProperty SourcesProperty) + ADD_TEST_MACRO(SourceFileProperty SourceFileProperty) if(CMAKE_CXX_COMPILER_ID STREQUAL GNU AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) set(runCxxDialectTest 1) diff --git a/Tests/SourceFileProperty/CMakeLists.txt b/Tests/SourceFileProperty/CMakeLists.txt new file mode 100644 index 0000000..1b6506d --- /dev/null +++ b/Tests/SourceFileProperty/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.0) +project(SourceFileProperty C) + +set(sources) + +if (EXISTS icasetest.c) + # If a file exists by this name, use it. + set_source_files_properties(icasetest.c + PROPERTIES + COMPILE_FLAGS -DNEEDED_TO_WORK) +else () + # Work on case-sensitive file systems as well. + set_source_files_properties(main.c + PROPERTIES + COMPILE_FLAGS -DNO_NEED_TO_CALL) +endif () +list(APPEND sources ICaseTest.c) + +add_executable(SourceFileProperty main.c ${sources}) diff --git a/Tests/SourceFileProperty/ICaseTest.c b/Tests/SourceFileProperty/ICaseTest.c new file mode 100644 index 0000000..454c721 --- /dev/null +++ b/Tests/SourceFileProperty/ICaseTest.c @@ -0,0 +1,7 @@ + +#ifdef NEEDED_TO_WORK +int icasetest() +{ + return 0; +} +#endif diff --git a/Tests/SourceFileProperty/main.c b/Tests/SourceFileProperty/main.c new file mode 100644 index 0000000..b853408 --- /dev/null +++ b/Tests/SourceFileProperty/main.c @@ -0,0 +1,13 @@ + +#ifndef NO_NEED_TO_CALL +extern int icasetest(); +#endif + +int main(int argc, char** argv) +{ +#ifdef NO_NEED_TO_CALL + return 0; +#else + return icasetest(); +#endif +} ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 11:16:26 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 11:16:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1012-gf9a5119 Message-ID: <20141202161626.B6F75A7F67@public.kitware.com> This is an automated email from 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 f9a511901132f9adfec51c58097db0aaf26c2098 (commit) via 48f78f5f9ed3a7e0717359720ecc157418f55155 (commit) from afed2be65cc751881b1bd24ef998c0d9df35fe75 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9a511901132f9adfec51c58097db0aaf26c2098 commit f9a511901132f9adfec51c58097db0aaf26c2098 Merge: afed2be 48f78f5 Author: Brad King AuthorDate: Tue Dec 2 11:16:24 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 11:16:24 2014 -0500 Merge topic 'xcode-target-search-perf' into next 48f78f5f Xcode: use a map to look up target pointers (#15201) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=48f78f5f9ed3a7e0717359720ecc157418f55155 commit 48f78f5f9ed3a7e0717359720ecc157418f55155 Author: Ben Boeckel AuthorDate: Mon Dec 1 12:56:46 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 10:51:15 2014 -0500 Xcode: use a map to look up target pointers (#15201) Use an efficient internal lookup to associate cmTarget and cmXCodeObject instances. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b9f64e2..d222288 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -557,6 +557,7 @@ void cmGlobalXCodeGenerator::ClearXCodeObjects() } this->XCodeObjects.clear(); this->XCodeObjectIDs.clear(); + this->XCodeObjectMap.clear(); this->GroupMap.clear(); this->GroupNameMap.clear(); this->TargetGroup.clear(); @@ -2458,6 +2459,7 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget) target->AddAttribute("name", this->CreateString(cmtarget.GetName())); target->AddAttribute("productName",this->CreateString(cmtarget.GetName())); target->SetTarget(&cmtarget); + this->XCodeObjectMap[&cmtarget] = target; // Add source files without build rules for editing convenience. if(cmtarget.GetType() == cmTarget::UTILITY) @@ -2661,6 +2663,7 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget, target->AddAttribute("productType", this->CreateString(productType)); } target->SetTarget(&cmtarget); + this->XCodeObjectMap[&cmtarget] = target; target->SetId(this->GetOrCreateId( cmtarget.GetName(), target->GetId()).c_str()); return target; @@ -2673,16 +2676,14 @@ cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget(cmTarget const* t) { return 0; } - for(std::vector::iterator i = this->XCodeObjects.begin(); - i != this->XCodeObjects.end(); ++i) + + std::map::const_iterator const i = + this->XCodeObjectMap.find(t); + if (i == this->XCodeObjectMap.end()) { - cmXCodeObject* o = *i; - if(o->GetTarget() == t) - { - return o; - } + return 0; } - return 0; + return i->second; } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 9d7b784..d2bc9d1 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -241,6 +241,7 @@ private: std::map GroupNameMap; std::map TargetGroup; std::map FileRefs; + std::map XCodeObjectMap; std::vector Architectures; std::string GeneratorToolset; }; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 11:35:35 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 11:35:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1014-g6e7305e Message-ID: <20141202163536.044B8A8581@public.kitware.com> This is an automated email from 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 6e7305e92f0ddedfe6eedb475d2eafb3f208d26b (commit) via 35bcecc0482cb85d42296afed8f26118721fbbd9 (commit) from f9a511901132f9adfec51c58097db0aaf26c2098 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e7305e92f0ddedfe6eedb475d2eafb3f208d26b commit 6e7305e92f0ddedfe6eedb475d2eafb3f208d26b Merge: f9a5119 35bcecc Author: Brad King AuthorDate: Tue Dec 2 11:35:35 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 11:35:35 2014 -0500 Merge topic 'file-LOCK-command' into next 35bcecc0 cmFileLockUnix: Treat EACCES like EAGAIN http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35bcecc0482cb85d42296afed8f26118721fbbd9 commit 35bcecc0482cb85d42296afed8f26118721fbbd9 Author: Brad King AuthorDate: Tue Dec 2 11:33:32 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 11:33:32 2014 -0500 cmFileLockUnix: Treat EACCES like EAGAIN The fcntl call may set errno to either of these when failing to lock an already-locked file. diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx index 5b0db69..038011e 100644 --- a/Source/cmFileLockUnix.cxx +++ b/Source/cmFileLockUnix.cxx @@ -72,7 +72,7 @@ cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) { if (this->LockFile(F_SETLK, F_WRLCK) == -1) { - if (errno != EAGAIN) + if (errno != EACCES && errno != EAGAIN) { return cmFileLockResult::MakeSystem(); } ----------------------------------------------------------------------- Summary of changes: Source/cmFileLockUnix.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Tue Dec 2 11:45:30 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 2 Dec 2014 11:45:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1017-gd3e8937 Message-ID: <20141202164530.37BC8A75DD@public.kitware.com> This is an automated email from 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 d3e89373cca5afb50cdf04f4fba087daa8c70fa4 (commit) via a8a2fde198926b3bac40f34f510fdc821d51e8a4 (commit) via 65b164123edf4edaa74c7a0fdd6852f49d098f7c (commit) from 6e7305e92f0ddedfe6eedb475d2eafb3f208d26b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3e89373cca5afb50cdf04f4fba087daa8c70fa4 commit d3e89373cca5afb50cdf04f4fba087daa8c70fa4 Merge: 6e7305e a8a2fde Author: Ben Boeckel AuthorDate: Tue Dec 2 11:45:28 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 11:45:28 2014 -0500 Merge topic 'cached-regex-clear-fixed' into next a8a2fde1 fixup! cmMakefile: store the number of last matches in a CMake var 65b16412 fixup! test: add a test for clearing regex results http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8a2fde198926b3bac40f34f510fdc821d51e8a4 commit a8a2fde198926b3bac40f34f510fdc821d51e8a4 Author: Ben Boeckel AuthorDate: Tue Dec 2 11:34:08 2014 -0500 Commit: Ben Boeckel CommitDate: Tue Dec 2 11:45:14 2014 -0500 fixup! cmMakefile: store the number of last matches in a CMake var diff --git a/Help/release/dev/cached-regex-clear-fixed.rst b/Help/release/dev/cached-regex-clear-fixed.rst new file mode 100644 index 0000000..fbf08cc --- /dev/null +++ b/Help/release/dev/cached-regex-clear-fixed.rst @@ -0,0 +1,5 @@ +cached-regex-clear-fixed +------------------------ + +* Add :variable:`CMAKE_MATCH_COUNT` for the number of matches made in the last + regular expression. diff --git a/Help/variable/CMAKE_MATCH_COUNT.rst b/Help/variable/CMAKE_MATCH_COUNT.rst index 4f7b9ab..8b1c036 100644 --- a/Help/variable/CMAKE_MATCH_COUNT.rst +++ b/Help/variable/CMAKE_MATCH_COUNT.rst @@ -3,6 +3,6 @@ CMAKE_MATCH_COUNT The number of matches with the last regular expression. -When a regular expression match is used, CMake fills in `CMAKE_MATCH_` -variables with the match contents. The `CMAKE_MATCH_COUNT` variable holds the -number of match expressions when these are filled. +When a regular expression match is used, CMake fills in ``CMAKE_MATCH_`` +variables with the match contents. The ``CMAKE_MATCH_COUNT`` variable holds +the number of match expressions when these are filled. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 2a8bbd4..24e65d7 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4841,7 +4841,7 @@ std::vector cmMakefile::GetQtUiFilesWithOptions() const return this->QtUiFilesWithOptions; } -static std::string matchVariables[] = { +static std::string const matchVariables[] = { "CMAKE_MATCH_0", "CMAKE_MATCH_1", "CMAKE_MATCH_2", @@ -4854,7 +4854,7 @@ static std::string matchVariables[] = { "CMAKE_MATCH_9" }; -static std::string nMatchesVariable = "CMAKE_MATCH_COUNT"; +static std::string const nMatchesVariable = "CMAKE_MATCH_COUNT"; //---------------------------------------------------------------------------- void cmMakefile::ClearMatches() @@ -4865,7 +4865,7 @@ void cmMakefile::ClearMatches() return; } int nMatches = atoi(nMatchesStr); - for (int i=0; iGetSafeDefinition(var); @@ -4883,7 +4883,7 @@ void cmMakefile::ClearMatches() void cmMakefile::StoreMatches(cmsys::RegularExpression& re) { char highest = 0; - for (unsigned int i=0; i<10; i++) + for (int i=0; i<10; i++) { std::string const& m = re.match(i); if(!m.empty()) @@ -4891,7 +4891,7 @@ void cmMakefile::StoreMatches(cmsys::RegularExpression& re) std::string const& var = matchVariables[i]; this->AddDefinition(var, m.c_str()); this->MarkVariableAsUsed(var); - highest = '0' + i + 1; + highest = '0' + i; } } char nMatches[] = {highest, '\0'}; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65b164123edf4edaa74c7a0fdd6852f49d098f7c commit 65b164123edf4edaa74c7a0fdd6852f49d098f7c Author: Ben Boeckel AuthorDate: Tue Dec 2 11:32:11 2014 -0500 Commit: Ben Boeckel CommitDate: Tue Dec 2 11:44:14 2014 -0500 fixup! test: add a test for clearing regex results diff --git a/Tests/RegexClear/CMakeLists.txt b/Tests/RegexClear/CMakeLists.txt deleted file mode 100644 index 5911b42..0000000 --- a/Tests/RegexClear/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -cmake_minimum_required (VERSION 3.0) -project (RegexClear C) - -function (check_for_success) - if (CMAKE_MATCH_1 STREQUAL "0" AND - CMAKE_MATCH_2 STREQUAL "1") - message("Matched string properly") - else () - message(FATAL_ERROR "Failed to match properly") - endif () -endfunction () - -function (check_for_failure) - if (CMAKE_MATCH_1 STREQUAL "" AND - CMAKE_MATCH_2 STREQUAL "") - message("Matched nothing properly") - else () - message(FATAL_ERROR "Found a match where there should be none") - endif () -endfunction () - -macro (do_regex_success) - string(REGEX MATCH "(0)(1)" output "01") - check_for_success() -endmacro () - -macro (do_regex_failure) - string(REGEX MATCH "(0)(1)" output "12") - check_for_failure() -endmacro () - -do_regex_success() - -list(INSERT CMAKE_MODULE_PATH 0 - "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -find_package(dummy) # Ensure cmMakefile::PushScope/PopScope work. - -check_for_failure() -do_regex_failure() -do_regex_success() - -add_subdirectory(subdir) - -check_for_success() # Ensure that the subdir didn't mess with this scope. - -add_executable(RegexClear RegexClear.c) diff --git a/Tests/RegexClear/RegexClear.c b/Tests/RegexClear/RegexClear.c deleted file mode 100644 index d123e09..0000000 --- a/Tests/RegexClear/RegexClear.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(int argc, char** argv) -{ - return 0; -} diff --git a/Tests/RegexClear/cmake/Finddummy.cmake b/Tests/RegexClear/cmake/Finddummy.cmake deleted file mode 100644 index 635e362..0000000 --- a/Tests/RegexClear/cmake/Finddummy.cmake +++ /dev/null @@ -1,4 +0,0 @@ -check_for_success() -do_regex_failure() - -set(dummy_FOUND 1) diff --git a/Tests/RegexClear/subdir/CMakeLists.txt b/Tests/RegexClear/subdir/CMakeLists.txt deleted file mode 100644 index 2ed176a..0000000 --- a/Tests/RegexClear/subdir/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -check_for_success() -do_regex_failure() diff --git a/Tests/RunCMake/string/RegexClear.cmake b/Tests/RunCMake/string/RegexClear.cmake new file mode 100644 index 0000000..d5edaac --- /dev/null +++ b/Tests/RunCMake/string/RegexClear.cmake @@ -0,0 +1,54 @@ +cmake_minimum_required (VERSION 3.0) +project (RegexClear C) + +function (output_results msg) + message("results from: ${msg}") + message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--") + message("CMAKE_MATCH_1: -->${CMAKE_MATCH_1}<--") + message("CMAKE_MATCH_2: -->${CMAKE_MATCH_2}<--") + message("CMAKE_MATCH_COUNT: -->${CMAKE_MATCH_COUNT}<--") +endfunction () + +function (check_for_success msg) + if (CMAKE_MATCH_1 STREQUAL "0" AND + CMAKE_MATCH_2 STREQUAL "1") + message("Matched string properly") + else () + message("Failed to match properly") + endif () + output_results("${msg}") +endfunction () + +function (check_for_failure msg) + if (CMAKE_MATCH_1 STREQUAL "" AND + CMAKE_MATCH_2 STREQUAL "") + message("Matched nothing properly") + else () + message("Found a match where there should be none") + endif () + output_results("${msg}") +endfunction () + +macro (do_regex_success msg) + string(REGEX MATCH "(0)(1)" output "01") + check_for_success("${msg}") +endmacro () + +macro (do_regex_failure msg) + string(REGEX MATCH "(0)(1)" output "12") + check_for_failure("${msg}") +endmacro () + +do_regex_success("setting up initial state") + +list(INSERT CMAKE_MODULE_PATH 0 + "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +find_package(dummy) # Ensure cmMakefile::PushScope/PopScope work. + +check_for_failure("checking after find_package") +do_regex_failure("clearing out results with a failing match") +do_regex_success("making a successful match before add_subdirectory") + +add_subdirectory(subdir) + +check_for_success("ensuring the subdirectory did not interfere with the parent") # Ensure that the subdir didn't mess with this scope. diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake index e83db27..fc913c6 100644 --- a/Tests/RunCMake/string/RunCMakeTest.cmake +++ b/Tests/RunCMake/string/RunCMakeTest.cmake @@ -10,3 +10,5 @@ run_cmake(UuidBadNamespace) run_cmake(UuidMissingNameValue) run_cmake(UuidMissingTypeValue) run_cmake(UuidBadType) + +run_cmake(RegexClear) diff --git a/Tests/RunCMake/string/cmake/Finddummy.cmake b/Tests/RunCMake/string/cmake/Finddummy.cmake new file mode 100644 index 0000000..4cbc1fb --- /dev/null +++ b/Tests/RunCMake/string/cmake/Finddummy.cmake @@ -0,0 +1,4 @@ +check_for_success("making a match inside of find_package") +do_regex_failure("making a failure inside of find_package") + +set(dummy_FOUND 1) diff --git a/Tests/RunCMake/string/subdir/CMakeLists.txt b/Tests/RunCMake/string/subdir/CMakeLists.txt new file mode 100644 index 0000000..5573308 --- /dev/null +++ b/Tests/RunCMake/string/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ +check_for_success("check for success in add_subdirectory") +do_regex_failure("failing inside of add_subdirectory") ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cached-regex-clear-fixed.rst | 5 +++ Help/variable/CMAKE_MATCH_COUNT.rst | 6 +-- Source/cmMakefile.cxx | 10 ++--- Tests/RegexClear/CMakeLists.txt | 46 --------------------- Tests/RegexClear/RegexClear.c | 4 -- Tests/RegexClear/cmake/Finddummy.cmake | 4 -- Tests/RegexClear/subdir/CMakeLists.txt | 2 - Tests/RunCMake/string/RegexClear.cmake | 54 +++++++++++++++++++++++++ Tests/RunCMake/string/RunCMakeTest.cmake | 2 + Tests/RunCMake/string/cmake/Finddummy.cmake | 4 ++ Tests/RunCMake/string/subdir/CMakeLists.txt | 2 + 11 files changed, 75 insertions(+), 64 deletions(-) create mode 100644 Help/release/dev/cached-regex-clear-fixed.rst delete mode 100644 Tests/RegexClear/CMakeLists.txt delete mode 100644 Tests/RegexClear/RegexClear.c delete mode 100644 Tests/RegexClear/cmake/Finddummy.cmake delete mode 100644 Tests/RegexClear/subdir/CMakeLists.txt create mode 100644 Tests/RunCMake/string/RegexClear.cmake create mode 100644 Tests/RunCMake/string/cmake/Finddummy.cmake create mode 100644 Tests/RunCMake/string/subdir/CMakeLists.txt hooks/post-receive -- CMake From ben.boeckel at kitware.com Tue Dec 2 11:45:49 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 2 Dec 2014 11:45:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1020-gf877254 Message-ID: <20141202164549.68FB9A7652@public.kitware.com> This is an automated email from 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 f877254b91e3a02544999020cd64baa6db8e7e56 (commit) via 63e53d45191fe3ea196112fa7bd2dba6b24e188f (commit) via f9dbfe2687a96242d86073fbbda18012ceef9d79 (commit) from d3e89373cca5afb50cdf04f4fba087daa8c70fa4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f877254b91e3a02544999020cd64baa6db8e7e56 commit f877254b91e3a02544999020cd64baa6db8e7e56 Merge: d3e8937 63e53d4 Author: Ben Boeckel AuthorDate: Tue Dec 2 11:45:48 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 11:45:48 2014 -0500 Merge topic 'cached-regex-clear-fixed' into next 63e53d45 cmMakefile: store the number of last matches in a CMake var f9dbfe26 test: add a test for clearing regex results http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63e53d45191fe3ea196112fa7bd2dba6b24e188f commit 63e53d45191fe3ea196112fa7bd2dba6b24e188f Author: Ben Boeckel AuthorDate: Mon Dec 1 10:51:49 2014 -0500 Commit: Ben Boeckel CommitDate: Tue Dec 2 11:45:33 2014 -0500 cmMakefile: store the number of last matches in a CMake var With PushScope and PopScope, keeping track of another bit of data for each scope isn't easy. Instead, store it as another CMake variable so it gets implicitly tracked along with everything else. This works in a revert of commit 7d674b5f0b28a610333644d417c2e8cb796cc9e4. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 99088e0..2de4103 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -47,6 +47,7 @@ Variables that Provide Information /variable/CMAKE_LINK_LIBRARY_SUFFIX /variable/CMAKE_MAJOR_VERSION /variable/CMAKE_MAKE_PROGRAM + /variable/CMAKE_MATCH_COUNT /variable/CMAKE_MINIMUM_REQUIRED_VERSION /variable/CMAKE_MINOR_VERSION /variable/CMAKE_PARENT_LIST_FILE diff --git a/Help/release/dev/cached-regex-clear-fixed.rst b/Help/release/dev/cached-regex-clear-fixed.rst new file mode 100644 index 0000000..fbf08cc --- /dev/null +++ b/Help/release/dev/cached-regex-clear-fixed.rst @@ -0,0 +1,5 @@ +cached-regex-clear-fixed +------------------------ + +* Add :variable:`CMAKE_MATCH_COUNT` for the number of matches made in the last + regular expression. diff --git a/Help/variable/CMAKE_MATCH_COUNT.rst b/Help/variable/CMAKE_MATCH_COUNT.rst new file mode 100644 index 0000000..8b1c036 --- /dev/null +++ b/Help/variable/CMAKE_MATCH_COUNT.rst @@ -0,0 +1,8 @@ +CMAKE_MATCH_COUNT +----------------- + +The number of matches with the last regular expression. + +When a regular expression match is used, CMake fills in ``CMAKE_MATCH_`` +variables with the match contents. The ``CMAKE_MATCH_COUNT`` variable holds +the number of match expressions when these are filled. diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 6065b8a..aba26de 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -11,7 +11,6 @@ ============================================================================*/ #include "cmConditionEvaluator.h" -#include "cmStringCommand.h" cmConditionEvaluator::cmConditionEvaluator(cmMakefile& makefile): Makefile(makefile), @@ -556,7 +555,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs, { def = this->GetVariableOrString(*arg); const char* rex = argP2->c_str(); - cmStringCommand::ClearMatches(&this->Makefile); + this->Makefile.ClearMatches(); cmsys::RegularExpression regEntry; if ( !regEntry.compile(rex) ) { @@ -568,7 +567,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs, } if (regEntry.find(def)) { - cmStringCommand::StoreMatches(&this->Makefile, regEntry); + this->Makefile.StoreMatches(regEntry); *arg = cmExpandedCommandArgument("1", true); } else diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 53fd56f..24e65d7 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4841,6 +4841,64 @@ std::vector cmMakefile::GetQtUiFilesWithOptions() const return this->QtUiFilesWithOptions; } +static std::string const matchVariables[] = { + "CMAKE_MATCH_0", + "CMAKE_MATCH_1", + "CMAKE_MATCH_2", + "CMAKE_MATCH_3", + "CMAKE_MATCH_4", + "CMAKE_MATCH_5", + "CMAKE_MATCH_6", + "CMAKE_MATCH_7", + "CMAKE_MATCH_8", + "CMAKE_MATCH_9" +}; + +static std::string const nMatchesVariable = "CMAKE_MATCH_COUNT"; + +//---------------------------------------------------------------------------- +void cmMakefile::ClearMatches() +{ + const char* nMatchesStr = this->GetDefinition(nMatchesVariable); + if (!nMatchesStr) + { + return; + } + int nMatches = atoi(nMatchesStr); + for (int i=0; i<=nMatches; i++) + { + std::string const& var = matchVariables[i]; + std::string const& s = this->GetSafeDefinition(var); + if(!s.empty()) + { + this->AddDefinition(var, ""); + this->MarkVariableAsUsed(var); + } + } + this->AddDefinition(nMatchesVariable, "0"); + this->MarkVariableAsUsed(nMatchesVariable); +} + +//---------------------------------------------------------------------------- +void cmMakefile::StoreMatches(cmsys::RegularExpression& re) +{ + char highest = 0; + for (int i=0; i<10; i++) + { + std::string const& m = re.match(i); + if(!m.empty()) + { + std::string const& var = matchVariables[i]; + this->AddDefinition(var, m.c_str()); + this->MarkVariableAsUsed(var); + highest = '0' + i; + } + } + char nMatches[] = {highest, '\0'}; + this->AddDefinition(nMatchesVariable, nMatches); + this->MarkVariableAsUsed(nMatchesVariable); +} + //---------------------------------------------------------------------------- cmPolicies::PolicyStatus cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 05b7a37..fcfec8d 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -976,6 +976,9 @@ public: void PopLoopBlock(); bool IsLoopBlock() const; + void ClearMatches(); + void StoreMatches(cmsys::RegularExpression& re); + protected: // add link libraries and directories to the target void AddGlobalLinkInformation(const std::string& name, cmTarget& target); diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 9827c62..8341027 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -310,7 +310,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -325,7 +325,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) std::string output; if(re.find(input.c_str())) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l = re.start(); std::string::size_type r = re.end(); if(r-l == 0) @@ -359,7 +359,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -376,7 +376,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) const char* p = input.c_str(); while(re.find(p)) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l = re.start(); std::string::size_type r = re.end(); if(r-l == 0) @@ -463,7 +463,7 @@ bool cmStringCommand::RegexReplace(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -480,7 +480,7 @@ bool cmStringCommand::RegexReplace(std::vector const& args) std::string::size_type base = 0; while(re.find(input.c_str()+base)) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l2 = re.start(); std::string::size_type r = re.end(); @@ -541,38 +541,6 @@ bool cmStringCommand::RegexReplace(std::vector const& args) } //---------------------------------------------------------------------------- -void cmStringCommand::ClearMatches(cmMakefile* mf) -{ - for (unsigned int i=0; i<10; i++) - { - char name[128]; - sprintf(name, "CMAKE_MATCH_%d", i); - const char* s = mf->GetDefinition(name); - if(s && *s != 0) - { - mf->AddDefinition(name, ""); - mf->MarkVariableAsUsed(name); - } - } -} - -//---------------------------------------------------------------------------- -void cmStringCommand::StoreMatches(cmMakefile* mf,cmsys::RegularExpression& re) -{ - for (unsigned int i=0; i<10; i++) - { - std::string m = re.match(i); - if(m.size() > 0) - { - char name[128]; - sprintf(name, "CMAKE_MATCH_%d", i); - mf->AddDefinition(name, re.match(i).c_str()); - mf->MarkVariableAsUsed(name); - } - } -} - -//---------------------------------------------------------------------------- bool cmStringCommand::HandleFindCommand(std::vector const& args) { diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index a5fe893..9c75095 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -53,8 +53,6 @@ public: virtual std::string GetName() const { return "string";} cmTypeMacro(cmStringCommand, cmCommand); - static void ClearMatches(cmMakefile* mf); - static void StoreMatches(cmMakefile* mf, cmsys::RegularExpression& re); protected: bool HandleConfigureCommand(std::vector const& args); bool HandleAsciiCommand(std::vector const& args); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9dbfe2687a96242d86073fbbda18012ceef9d79 commit f9dbfe2687a96242d86073fbbda18012ceef9d79 Author: Ben Boeckel AuthorDate: Wed Nov 26 12:46:55 2014 -0500 Commit: Ben Boeckel CommitDate: Tue Dec 2 11:45:32 2014 -0500 test: add a test for clearing regex results diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c9d9568..6ed3f0a 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -271,6 +271,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(MacroTest miniMacroTest) ADD_TEST_MACRO(FunctionTest miniFunctionTest) ADD_TEST_MACRO(ReturnTest ReturnTest) + ADD_TEST_MACRO(RegexClear RegexClear) ADD_TEST_MACRO(Properties Properties) ADD_TEST_MACRO(Assembler HelloAsm) ADD_TEST_MACRO(SourceGroups SourceGroups) diff --git a/Tests/RunCMake/string/RegexClear.cmake b/Tests/RunCMake/string/RegexClear.cmake new file mode 100644 index 0000000..d5edaac --- /dev/null +++ b/Tests/RunCMake/string/RegexClear.cmake @@ -0,0 +1,54 @@ +cmake_minimum_required (VERSION 3.0) +project (RegexClear C) + +function (output_results msg) + message("results from: ${msg}") + message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--") + message("CMAKE_MATCH_1: -->${CMAKE_MATCH_1}<--") + message("CMAKE_MATCH_2: -->${CMAKE_MATCH_2}<--") + message("CMAKE_MATCH_COUNT: -->${CMAKE_MATCH_COUNT}<--") +endfunction () + +function (check_for_success msg) + if (CMAKE_MATCH_1 STREQUAL "0" AND + CMAKE_MATCH_2 STREQUAL "1") + message("Matched string properly") + else () + message("Failed to match properly") + endif () + output_results("${msg}") +endfunction () + +function (check_for_failure msg) + if (CMAKE_MATCH_1 STREQUAL "" AND + CMAKE_MATCH_2 STREQUAL "") + message("Matched nothing properly") + else () + message("Found a match where there should be none") + endif () + output_results("${msg}") +endfunction () + +macro (do_regex_success msg) + string(REGEX MATCH "(0)(1)" output "01") + check_for_success("${msg}") +endmacro () + +macro (do_regex_failure msg) + string(REGEX MATCH "(0)(1)" output "12") + check_for_failure("${msg}") +endmacro () + +do_regex_success("setting up initial state") + +list(INSERT CMAKE_MODULE_PATH 0 + "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +find_package(dummy) # Ensure cmMakefile::PushScope/PopScope work. + +check_for_failure("checking after find_package") +do_regex_failure("clearing out results with a failing match") +do_regex_success("making a successful match before add_subdirectory") + +add_subdirectory(subdir) + +check_for_success("ensuring the subdirectory did not interfere with the parent") # Ensure that the subdir didn't mess with this scope. diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake index e83db27..fc913c6 100644 --- a/Tests/RunCMake/string/RunCMakeTest.cmake +++ b/Tests/RunCMake/string/RunCMakeTest.cmake @@ -10,3 +10,5 @@ run_cmake(UuidBadNamespace) run_cmake(UuidMissingNameValue) run_cmake(UuidMissingTypeValue) run_cmake(UuidBadType) + +run_cmake(RegexClear) diff --git a/Tests/RunCMake/string/cmake/Finddummy.cmake b/Tests/RunCMake/string/cmake/Finddummy.cmake new file mode 100644 index 0000000..4cbc1fb --- /dev/null +++ b/Tests/RunCMake/string/cmake/Finddummy.cmake @@ -0,0 +1,4 @@ +check_for_success("making a match inside of find_package") +do_regex_failure("making a failure inside of find_package") + +set(dummy_FOUND 1) diff --git a/Tests/RunCMake/string/subdir/CMakeLists.txt b/Tests/RunCMake/string/subdir/CMakeLists.txt new file mode 100644 index 0000000..5573308 --- /dev/null +++ b/Tests/RunCMake/string/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ +check_for_success("check for success in add_subdirectory") +do_regex_failure("failing inside of add_subdirectory") ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From ben.boeckel at kitware.com Tue Dec 2 13:50:59 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 2 Dec 2014 13:50:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1022-g7b53ae4 Message-ID: <20141202185059.0BF68A7842@public.kitware.com> This is an automated email from 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 7b53ae4cda37d9df6f9653e8203da610be1ea4a7 (commit) via c9a46aa4a57580841525a231a37ef47c49374491 (commit) from f877254b91e3a02544999020cd64baa6db8e7e56 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b53ae4cda37d9df6f9653e8203da610be1ea4a7 commit 7b53ae4cda37d9df6f9653e8203da610be1ea4a7 Merge: f877254 c9a46aa Author: Ben Boeckel AuthorDate: Tue Dec 2 13:50:58 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 13:50:58 2014 -0500 Merge topic 'cached-regex-clear-fixed' into next c9a46aa4 fixup! test: add a test for clearing regex results http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9a46aa4a57580841525a231a37ef47c49374491 commit c9a46aa4a57580841525a231a37ef47c49374491 Author: Ben Boeckel AuthorDate: Tue Dec 2 13:50:49 2014 -0500 Commit: Ben Boeckel CommitDate: Tue Dec 2 13:50:49 2014 -0500 fixup! test: add a test for clearing regex results diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 6ed3f0a..c9d9568 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -271,7 +271,6 @@ if(BUILD_TESTING) ADD_TEST_MACRO(MacroTest miniMacroTest) ADD_TEST_MACRO(FunctionTest miniFunctionTest) ADD_TEST_MACRO(ReturnTest ReturnTest) - ADD_TEST_MACRO(RegexClear RegexClear) ADD_TEST_MACRO(Properties Properties) ADD_TEST_MACRO(Assembler HelloAsm) ADD_TEST_MACRO(SourceGroups SourceGroups) diff --git a/Tests/RunCMake/string/RegexClear-stderr.txt b/Tests/RunCMake/string/RegexClear-stderr.txt new file mode 100644 index 0000000..22b0159 --- /dev/null +++ b/Tests/RunCMake/string/RegexClear-stderr.txt @@ -0,0 +1,54 @@ +^Matched string properly +results from: setting up initial state +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched string properly +results from: making a match inside of find_package +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched nothing properly +results from: making a failure inside of find_package +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched nothing properly +results from: checking after find_package +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched nothing properly +results from: clearing out results with a failing match +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched string properly +results from: making a successful match before add_subdirectory +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched string properly +results from: check for success in add_subdirectory +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched nothing properly +results from: failing inside of add_subdirectory +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched string properly +results from: ensuring the subdirectory did not interfere with the parent +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<--$ ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 1 - Tests/RunCMake/string/RegexClear-stderr.txt | 54 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 Tests/RunCMake/string/RegexClear-stderr.txt hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 14:05:00 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 14:05:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1024-g8dc17dc Message-ID: <20141202190500.5C528A823D@public.kitware.com> This is an automated email from 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 8dc17dc8b327aff448a1e637177f5c6d51b572f9 (commit) via 7fe6bb0d62ac6a056bbf52cd87b44a49d7b6441d (commit) from 7b53ae4cda37d9df6f9653e8203da610be1ea4a7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8dc17dc8b327aff448a1e637177f5c6d51b572f9 commit 8dc17dc8b327aff448a1e637177f5c6d51b572f9 Merge: 7b53ae4 7fe6bb0 Author: Brad King AuthorDate: Tue Dec 2 14:04:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 14:04:59 2014 -0500 Merge topic 'binary-linux-64' into next 7fe6bb0d Utilities/Release: Add build of binary for Linux x86_64 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7fe6bb0d62ac6a056bbf52cd87b44a49d7b6441d commit 7fe6bb0d62ac6a056bbf52cd87b44a49d7b6441d Author: Brad King AuthorDate: Tue Dec 2 14:00:39 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 14:00:39 2014 -0500 Utilities/Release: Add build of binary for Linux x86_64 diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index a3f7032..19f4cb1 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -10,6 +10,7 @@ set(RELEASE_SCRIPTS_BATCH_1 dashmacmini2_release.cmake # Mac Darwin universal ppc;i386 dashmacmini5_release.cmake # Mac Darwin64 universal x86_64;i386 magrathea_release.cmake # Linux + linux64_release.cmake # Linux x86_64 ibm_aix_release.cmake # AIX ) diff --git a/Utilities/Release/linux64_release.cmake b/Utilities/Release/linux64_release.cmake new file mode 100644 index 0000000..513f42f --- /dev/null +++ b/Utilities/Release/linux64_release.cmake @@ -0,0 +1,23 @@ +set(PROCESSORS 4) +set(HOST linux64) +set(MAKE_PROGRAM "make") +set(CC /opt/gcc-4.9.2/bin/gcc) +set(CXX /opt/gcc-4.9.2/bin/g++) +set(CFLAGS "") +set(CXXFLAGS "") +set(INITIAL_CACHE " +CMAKE_BUILD_TYPE:STRING=Release +CURSES_LIBRARY:FILEPATH=/home/kitware/ncurses-5.9/lib/libncurses.a +CURSES_INCLUDE_PATH:PATH=/home/kitware/ncurses-5.9/include +FORM_LIBRARY:FILEPATH=/home/kitware/ncurses-5.9/lib/libform.a +CMAKE_USE_OPENSSL:BOOL=ON +OPENSSL_CRYPTO_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.1j/lib/libcrypto.a +OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.1j/include +OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.1j/lib/libssl.a +CPACK_SYSTEM_NAME:STRING=Linux-x86_64 +BUILD_QtDialog:BOOL:=TRUE +CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE +QT_QMAKE_EXECUTABLE:FILEPATH=/home/kitware/qt-4.8.6/bin/qmake +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) ----------------------------------------------------------------------- Summary of changes: Utilities/Release/create-cmake-release.cmake | 1 + Utilities/Release/linux64_release.cmake | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Utilities/Release/linux64_release.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 15:13:44 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 15:13:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1026-g4ba9e0c Message-ID: <20141202201344.80457A7713@public.kitware.com> This is an automated email from 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 4ba9e0cbf0e93f200535e6c20e71728390d2b8af (commit) via 23e2bd7e8cd69eeb6bc607a0b62c764567ac3c5f (commit) from 8dc17dc8b327aff448a1e637177f5c6d51b572f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ba9e0cbf0e93f200535e6c20e71728390d2b8af commit 4ba9e0cbf0e93f200535e6c20e71728390d2b8af Merge: 8dc17dc 23e2bd7 Author: Brad King AuthorDate: Tue Dec 2 15:13:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 15:13:43 2014 -0500 Merge topic 'doc-Nsight-Tegra-toolchain' into next 23e2bd7e Help: Document Nsight Tegra toolchain configuration (#15276) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23e2bd7e8cd69eeb6bc607a0b62c764567ac3c5f commit 23e2bd7e8cd69eeb6bc607a0b62c764567ac3c5f Author: Brad King AuthorDate: Tue Dec 2 14:40:25 2014 -0500 Commit: Brad King CommitDate: Tue Dec 2 14:40:25 2014 -0500 Help: Document Nsight Tegra toolchain configuration (#15276) diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst index afc8ba2..44ffb3b 100644 --- a/Help/manual/cmake-toolchains.7.rst +++ b/Help/manual/cmake-toolchains.7.rst @@ -241,3 +241,20 @@ Windows Store may look like this: set(CMAKE_SYSTEM_NAME WindowsStore) set(CMAKE_SYSTEM_VERSION 8.1) + +Cross Compiling using NVIDIA Nsight Tegra +----------------------------------------- + +A toolchain file to configure a Visual Studio generator to +build using NVIDIA Nsight Tegra targeting Android may look +like this: + +.. code-block:: cmake + + set(CMAKE_SYSTEM_NAME Android) + +The :variable:`CMAKE_GENERATOR_TOOLSET` may be set to select +the Nsight Tegra "Toolchain Version" value. + +See the :prop_tgt:`ANDROID_API` and :prop_tgt:`ANDROID_GUI` +target properties to configure targets within the project. diff --git a/Help/prop_tgt/ANDROID_GUI.rst b/Help/prop_tgt/ANDROID_GUI.rst index 90d2428..abdba7a 100644 --- a/Help/prop_tgt/ANDROID_GUI.rst +++ b/Help/prop_tgt/ANDROID_GUI.rst @@ -7,3 +7,7 @@ When this property is set to true the executable when built for Android will be created as an application package. This property is initialized by the value of the :variable:`CMAKE_ANDROID_GUI` variable if it is set when a target is created. + +Add the ``AndroidManifest.xml`` source file explicitly to the +target :command:`add_executable` command invocation to specify the +root directory of the application package source. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-toolchains.7.rst | 17 +++++++++++++++++ Help/prop_tgt/ANDROID_GUI.rst | 4 ++++ 2 files changed, 21 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 2 15:53:28 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 2 Dec 2014 15:53:28 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1028-g47485f0 Message-ID: <20141202205328.12935A7936@public.kitware.com> This is an automated email from 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 47485f0dfa70754c6ff54d297546ab4b9b79fa31 (commit) via 4c07a00f07ce42b6b02da4a9002d5c802637d3bc (commit) from 4ba9e0cbf0e93f200535e6c20e71728390d2b8af (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47485f0dfa70754c6ff54d297546ab4b9b79fa31 commit 47485f0dfa70754c6ff54d297546ab4b9b79fa31 Merge: 4ba9e0c 4c07a00 Author: Brad King AuthorDate: Tue Dec 2 15:53:27 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 2 15:53:27 2014 -0500 Merge topic 'CPackIFW-doc-typos' into next 4c07a00f CPackIFW: Correction of the module documentation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c07a00f07ce42b6b02da4a9002d5c802637d3bc commit 4c07a00f07ce42b6b02da4a9002d5c802637d3bc Author: Konstantin Podsvirov AuthorDate: Tue Dec 2 23:39:33 2014 +0300 Commit: Brad King CommitDate: Tue Dec 2 15:52:07 2014 -0500 CPackIFW: Correction of the module documentation diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 6f2eeb3..e5b7601 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -14,19 +14,19 @@ # Overview # ^^^^^^^^ # -# CPack ``IFW`` generator helps you create online and offline +# CPack ``IFW`` generator helps you to create online and offline # binary cross-platform installers with a graphical user interface. # -# CPack IFW generator prepare project installation and generate configuration +# CPack IFW generator prepares project installation and generates configuration # and meta information for QtIFW_ tools. # # The QtIFW_ provides a set of tools and utilities to create # installers for the supported desktop Qt platforms: Linux, Microsoft Windows, # and Mac OS X. # -# To use CPack ``IFW`` generator you must also install QtIFW_. -# If you are not using the default path for the installation, please set -# the path to the variable ``QTIFWDIR``. +# You should also install QtIFW_ to use CPack ``IFW`` generator. +# If you don't use a default path for the installation, please set +# the used path in the variable ``QTIFWDIR``. # # Variables # ^^^^^^^^^ @@ -61,7 +61,7 @@ # # .. variable:: CPACK_IFW_PACKAGE_LOGO # -# Filename for a logo used as QWizard::LogoPixmap. +# Filename for a logo is used as QWizard::LogoPixmap. # # .. variable:: CPACK_IFW_TARGET_DIRECTORY # @@ -149,12 +149,12 @@ # This command should be called after cpack_add_component command. # # ``COMMON`` if set, then the component will be packaged and installed as part -# of a group to which he belongs. +# of a group to which it belongs. # # ``VERSION`` is version of component. # By default used :variable:`CPACK_PACKAGE_VERSION`. # -# ``SCRIPT`` is relative or absolute path to operations script +# ``SCRIPT`` is a relative or absolute path to operations script # for this component. # # ``NAME`` is used to create domain-like identification for this component. @@ -190,7 +190,7 @@ # ``NAME`` is used to create domain-like identification for this component group. # By default used origin component group name. # -# ``SCRIPT`` is relative or absolute path to operations script +# ``SCRIPT`` is a relative or absolute path to operations script # for this component group. # # ``PRIORITY`` is priority of the component group in the tree. @@ -255,7 +255,7 @@ # Online installer # ^^^^^^^^^^^^^^^^ # -# By defaul CPack IFW generator make offline installer. This means that all +# By default CPack IFW generator makes offline installer. This means that all # components will be packaged into a binary file. # # To make a component downloaded, you must set the ``DOWNLOADED`` option in @@ -267,7 +267,7 @@ # You also can use command :command:`cpack_ifw_add_repository` and # variable :variable:`CPACK_IFW_DOWNLOAD_ALL` for more specific configuration. # -# CPack IFW generator create "repository" dir in current binary dir. You +# CPack IFW generator creates "repository" dir in current binary dir. You # would copy content of this dir to specified ``site`` (``url``). # # See Also ----------------------------------------------------------------------- Summary of changes: Modules/CPackIFW.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 3 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 3 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-443-g0e466f8 Message-ID: <20141203050110.831F2A81F4@public.kitware.com> This is an automated email from 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 0e466f89fdceec50cbc3c21a0d1e0773271b166b (commit) from 722178fc7ef47020323af4a97dc5600e43652a2b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e466f89fdceec50cbc3c21a0d1e0773271b166b commit 0e466f89fdceec50cbc3c21a0d1e0773271b166b Author: Kitware Robot AuthorDate: Wed Dec 3 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Wed Dec 3 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8819c23..d1a0f20 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 1) -set(CMake_VERSION_PATCH 20141202) +set(CMake_VERSION_PATCH 20141203) #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 Dec 3 09:06:04 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 09:06:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1030-g90db0ab Message-ID: <20141203140604.36D43A857C@public.kitware.com> This is an automated email from 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 90db0ab1f178901caab463d797b262f015407cca (commit) via bd360ee329e74487dba526d7847794bc66b55494 (commit) from 47485f0dfa70754c6ff54d297546ab4b9b79fa31 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90db0ab1f178901caab463d797b262f015407cca commit 90db0ab1f178901caab463d797b262f015407cca Merge: 47485f0 bd360ee Author: Brad King AuthorDate: Wed Dec 3 09:06:03 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 09:06:03 2014 -0500 Merge topic 'fix-add_library-check-for-shared' into next bd360ee3 add_library: Fix target type check for non-shared-lib platforms http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd360ee329e74487dba526d7847794bc66b55494 commit bd360ee329e74487dba526d7847794bc66b55494 Author: Brad King AuthorDate: Wed Dec 3 08:50:05 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 08:51:11 2014 -0500 add_library: Fix target type check for non-shared-lib platforms When checking target types for TARGET_SUPPORTS_SHARED_LIBS == false, enumerate exactly the library types not supported rather than trying to maintain a list of all the types that are supported. Otherwise add_library(SomeImportedLib UNKNOWN IMPORTED) warns on platforms that do not support shared libraries. Reported-by: Kelly Thompson diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index cdc9f2a..bba4d41 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -328,9 +328,8 @@ bool cmAddLibraryCommand CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to STATIC. But at this point we know only the name of the target, but not yet its linker language. */ - if ((type != cmTarget::STATIC_LIBRARY) && - (type != cmTarget::OBJECT_LIBRARY) && - (type != cmTarget::INTERFACE_LIBRARY) && + if ((type == cmTarget::SHARED_LIBRARY || + type == cmTarget::MODULE_LIBRARY) && (this->Makefile->GetCMakeInstance()->GetPropertyAsBool( "TARGET_SUPPORTS_SHARED_LIBS") == false)) { ----------------------------------------------------------------------- Summary of changes: Source/cmAddLibraryCommand.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 09:08:10 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 09:08:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1032-g8902885 Message-ID: <20141203140810.E99D5A85B6@public.kitware.com> This is an automated email from 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 890288592800ea037c0e176329a02492db4df226 (commit) via 681cda02bf656c1cc114632d60afc8bd0cac4b09 (commit) from 90db0ab1f178901caab463d797b262f015407cca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=890288592800ea037c0e176329a02492db4df226 commit 890288592800ea037c0e176329a02492db4df226 Merge: 90db0ab 681cda0 Author: Brad King AuthorDate: Wed Dec 3 09:08:10 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 09:08:10 2014 -0500 Merge topic 'fix-wince-unicode-entry-point' into next 681cda02 VS, WINCE: Fix entry point for Unicode builds http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=681cda02bf656c1cc114632d60afc8bd0cac4b09 commit 681cda02bf656c1cc114632d60afc8bd0cac4b09 Author: Pascal Bach AuthorDate: Tue Dec 2 13:33:42 2014 +0100 Commit: Brad King CommitDate: Wed Dec 3 09:07:11 2014 -0500 VS, WINCE: Fix entry point for Unicode builds When _UNICODE is defined VS uses wmain instead of main as the entry function. To make this correctly work on WindowsCE EntryPointSymbol needs to be set to mainWCRTStartup instead of mainACRTStartup for console applications and to wWinMainCRTStartup instead of WinMainCRTStartup for GUI applications. Signed-off-by: Pascal Bach diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 26fc317..2ef27e2 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2267,7 +2267,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "wWinMainCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + } } } else @@ -2282,7 +2289,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "mainWCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + } } } else ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 09:12:58 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 09:12:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1034-gf9daafc Message-ID: <20141203141259.576C8A6A24@public.kitware.com> This is an automated email from 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 f9daafc39eda5f9e48ec310e902e21f508b03e00 (commit) via 37d684bd672dcf4b38dfd46d1b90c7d5bb843065 (commit) from 890288592800ea037c0e176329a02492db4df226 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9daafc39eda5f9e48ec310e902e21f508b03e00 commit f9daafc39eda5f9e48ec310e902e21f508b03e00 Merge: 8902885 37d684b Author: Brad King AuthorDate: Wed Dec 3 09:12:57 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 09:12:57 2014 -0500 Merge topic 'doc-CMAKE_CXX_KNOWN_FEATURES-typo' into next 37d684bd Help: Fix typo in CMAKE_CXX_KNOWN_FEATURES docs http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37d684bd672dcf4b38dfd46d1b90c7d5bb843065 commit 37d684bd672dcf4b38dfd46d1b90c7d5bb843065 Author: David Demelier AuthorDate: Wed Dec 3 10:28:30 2014 +0100 Commit: Brad King CommitDate: Wed Dec 3 09:12:17 2014 -0500 Help: Fix typo in CMAKE_CXX_KNOWN_FEATURES docs Typo "ss defined" => "as defined". diff --git a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst index bdeabdb..e24822c 100644 --- a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst +++ b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst @@ -145,7 +145,7 @@ The features known to this version of CMake are: .. _N2672: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm ``cxx_generic_lambdas`` - Generic lambdas, ss defined in N3649_. + Generic lambdas, as defined in N3649_. .. _N3649: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3649.html ----------------------------------------------------------------------- Summary of changes: Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 09:30:51 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 09:30:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1036-g0b074f8 Message-ID: <20141203143051.B62DAA821F@public.kitware.com> This is an automated email from 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 0b074f88f5e152bf8de75eae96982e2ad9cc3b8a (commit) via 8ffd7b931d065c5214d07216c7d478a006a5128b (commit) from f9daafc39eda5f9e48ec310e902e21f508b03e00 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b074f88f5e152bf8de75eae96982e2ad9cc3b8a commit 0b074f88f5e152bf8de75eae96982e2ad9cc3b8a Merge: f9daafc 8ffd7b9 Author: Brad King AuthorDate: Wed Dec 3 09:30:50 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 09:30:50 2014 -0500 Merge topic 'vs-hlsl-settings' into next 8ffd7b93 Help: Sort property names correctly http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ffd7b931d065c5214d07216c7d478a006a5128b commit 8ffd7b931d065c5214d07216c7d478a006a5128b Author: Brad King AuthorDate: Wed Dec 3 09:30:25 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 09:30:25 2014 -0500 Help: Sort property names correctly diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 5bbb89e..9ed53fa 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -291,8 +291,8 @@ Properties on Source Files /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC /prop_sf/VS_DEPLOYMENT_CONTENT - /prop_sf/VS_SHADER_MODEL /prop_sf/VS_SHADER_ENTRYPOINT + /prop_sf/VS_SHADER_MODEL /prop_sf/VS_SHADER_TYPE /prop_sf/WRAP_EXCLUDE /prop_sf/XCODE_EXPLICIT_FILE_TYPE ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 09:31:18 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 09:31:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1038-g34a3df2 Message-ID: <20141203143118.DDDC0A8237@public.kitware.com> This is an automated email from 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 34a3df2f3d59f62be871db543f975c3a44b1cf30 (commit) via 2a224b4ce3fcc3c25bb3f56cf50806ae79262fc2 (commit) from 0b074f88f5e152bf8de75eae96982e2ad9cc3b8a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34a3df2f3d59f62be871db543f975c3a44b1cf30 commit 34a3df2f3d59f62be871db543f975c3a44b1cf30 Merge: 0b074f8 2a224b4 Author: Brad King AuthorDate: Wed Dec 3 09:31:18 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 09:31:18 2014 -0500 Merge topic 'vs-hlsl-settings' into next 2a224b4c VS: Add source file properties to set the hlsl shader entry point and model http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a224b4ce3fcc3c25bb3f56cf50806ae79262fc2 commit 2a224b4ce3fcc3c25bb3f56cf50806ae79262fc2 Author: Cedric Perthuis AuthorDate: Tue Dec 2 01:41:10 2014 -0800 Commit: Brad King CommitDate: Wed Dec 3 09:30:59 2014 -0500 VS: Add source file properties to set the hlsl shader entry point and model Create properties VS_SHADER_ENTRYPOINT and VS_SHADER_MODEL. Without these many .hlsl source files may not be possible to use. Extend the VSWinStorePhone test project to cover them. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index bf456f5..9ed53fa 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -291,6 +291,8 @@ Properties on Source Files /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC /prop_sf/VS_DEPLOYMENT_CONTENT + /prop_sf/VS_SHADER_ENTRYPOINT + /prop_sf/VS_SHADER_MODEL /prop_sf/VS_SHADER_TYPE /prop_sf/WRAP_EXCLUDE /prop_sf/XCODE_EXPLICIT_FILE_TYPE diff --git a/Help/prop_sf/VS_SHADER_ENTRYPOINT.rst b/Help/prop_sf/VS_SHADER_ENTRYPOINT.rst new file mode 100644 index 0000000..fe3471f --- /dev/null +++ b/Help/prop_sf/VS_SHADER_ENTRYPOINT.rst @@ -0,0 +1,5 @@ +VS_SHADER_ENTRYPOINT +-------------------- + +Specifies the name of the entry point for the shader of a ``.hlsl`` source +file. diff --git a/Help/prop_sf/VS_SHADER_MODEL.rst b/Help/prop_sf/VS_SHADER_MODEL.rst new file mode 100644 index 0000000..b1cf0df --- /dev/null +++ b/Help/prop_sf/VS_SHADER_MODEL.rst @@ -0,0 +1,5 @@ +VS_SHADER_MODEL +--------------- + +Specifies the shader model of a ``.hlsl`` source file. Some shader types can +only be used with recent shader models diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index 65aae00..ba729a3 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -310,8 +310,10 @@ Other * The Visual Studio generators learned to treat ``.hlsl`` source files as High Level Shading Language sources (using ``FXCompile`` - in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file - property was added to specify the Shader Type. + in ``.vcxproj`` files). Source file properties + :prop_sf:`VS_SHADER_TYPE`, :prop_sf:`VS_SHADER_MODEL`, and + :prop_sf:`VS_SHADER_ENTRYPOINT` were added added to specify the + shader type, model, and entry point name. New Diagnostics =============== diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 26fc317..4fbd8fd 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1203,6 +1203,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) bool toolHasSettings = false; std::string tool = "None"; std::string shaderType; + std::string shaderEntryPoint; + std::string shaderModel; std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); if(ext == "hlsl") { @@ -1213,6 +1215,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) shaderType = st; toolHasSettings = true; } + // Figure out which entry point to use if any + if (const char* se = sf->GetProperty("VS_SHADER_ENTRYPOINT")) + { + shaderEntryPoint = se; + toolHasSettings = true; + } + // Figure out which entry point to use if any + if (const char* sm = sf->GetProperty("VS_SHADER_MODEL")) + { + shaderModel = sm; + toolHasSettings = true; + } } else if(ext == "jpg" || ext == "png") @@ -1295,7 +1309,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) (*this->BuildFileStream) << cmVS10EscapeXML(shaderType) << "\n"; } - + if(!shaderEntryPoint.empty()) + { + this->WriteString("", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderEntryPoint) + << "\n"; + } + if(!shaderModel.empty()) + { + this->WriteString("", 3); + (*this->BuildFileStream) << cmVS10EscapeXML(shaderModel) + << "\n"; + } this->WriteString("BuildFileStream) << tool << ">\n"; } diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt index 0041c75..badb7da 100644 --- a/Tests/VSWinStorePhone/CMakeLists.txt +++ b/Tests/VSWinStorePhone/CMakeLists.txt @@ -103,7 +103,13 @@ set_property(SOURCE ${RELEASE_CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT $,$,$>) set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_TYPE Pixel) +set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_ENTRYPOINT mainPS) +set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_MODEL 4.0_level_9_3) + set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_TYPE Vertex) +set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_ENTRYPOINT mainVS) +set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_MODEL 4.0_level_9_3) + source_group("Source Files" FILES ${SOURCE_FILES}) source_group("Header Files" FILES ${HEADER_FILES}) diff --git a/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl b/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl index d61e2c8..6796da1 100644 --- a/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl +++ b/Tests/VSWinStorePhone/Direct3DApp1/SimplePixelShader.hlsl @@ -4,7 +4,7 @@ struct PixelShaderInput float3 color : COLOR0; }; -float4 main(PixelShaderInput input) : SV_TARGET +float4 mainPS(PixelShaderInput input) : SV_TARGET { return float4(input.color,1.0f); } diff --git a/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl b/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl index 65d60e5..0963060 100644 --- a/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl +++ b/Tests/VSWinStorePhone/Direct3DApp1/SimpleVertexShader.hlsl @@ -17,7 +17,7 @@ struct VertexShaderOutput float3 color : COLOR0; }; -VertexShaderOutput main(VertexShaderInput input) +VertexShaderOutput mainVS(VertexShaderInput input) { VertexShaderOutput output; float4 pos = float4(input.pos, 1.0f); ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 09:44:50 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 09:44:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1040-g719298b Message-ID: <20141203144450.9D025A73C8@public.kitware.com> This is an automated email from 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 719298b41f47721d3efe2a0bc33709db82118ee5 (commit) via 352f246f3ebfd8daf5fda9bad2db01b56fa4bf4d (commit) from 34a3df2f3d59f62be871db543f975c3a44b1cf30 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=719298b41f47721d3efe2a0bc33709db82118ee5 commit 719298b41f47721d3efe2a0bc33709db82118ee5 Merge: 34a3df2 352f246 Author: Brad King AuthorDate: Wed Dec 3 09:44:49 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 09:44:49 2014 -0500 Merge topic 'vs-phone-store-deployment-location' into next 352f246f VS: Add source file property to specify Windows App deployment location http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=352f246f3ebfd8daf5fda9bad2db01b56fa4bf4d commit 352f246f3ebfd8daf5fda9bad2db01b56fa4bf4d Author: Gilles Khouzam AuthorDate: Tue Dec 2 13:32:45 2014 -0800 Commit: Brad King CommitDate: Wed Dec 3 09:31:59 2014 -0500 VS: Add source file property to specify Windows App deployment location Add a VS_DEPLOYMENT_LOCATION source file property to specify where to put files that are part of the package. For example: set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "assets") Without this, sources marked with VS_DEPLOYMENT_CONTENT cannot be located properly. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 9ed53fa..cca6d28 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -291,6 +291,7 @@ Properties on Source Files /prop_sf/OBJECT_OUTPUTS /prop_sf/SYMBOLIC /prop_sf/VS_DEPLOYMENT_CONTENT + /prop_sf/VS_DEPLOYMENT_LOCATION /prop_sf/VS_SHADER_ENTRYPOINT /prop_sf/VS_SHADER_MODEL /prop_sf/VS_SHADER_TYPE diff --git a/Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst b/Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst new file mode 100644 index 0000000..303db95 --- /dev/null +++ b/Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst @@ -0,0 +1,8 @@ +VS_DEPLOYMENT_LOCATION +---------------------- + +Specifies the deployment location for a content source file with a Windows +Phone or Windows Store application when built with a Visual Studio generator. +This property is only applicable when using :prop_sf:`VS_DEPLOYMENT_CONTENT`. +The value represent the path relative to the app package and applies to all +configurations. diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index ba729a3..1ede02b 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -159,6 +159,10 @@ Properties to tell the Visual Studio generators to mark content for deployment in Windows Phone and Windows Store projects. +* A :prop_sf:`VS_DEPLOYMENT_LOCATION` source file property was added + to tell the Visual Studio generators the relative location of content + marked for deployment in Windows Phone and Windows Store projects. + * The :prop_tgt:`VS_WINRT_COMPONENT` target property was created to tell Visual Studio generators to compile a shared library as a Windows Runtime (WinRT) component. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 4fbd8fd..832b2f6 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1261,6 +1261,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) } std::string deployContent; + std::string deployLocation; if(this->GlobalGenerator->TargetsWindowsPhone() || this->GlobalGenerator->TargetsWindowsStore()) { @@ -1269,6 +1270,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { toolHasSettings = true; deployContent = content; + + const char* location = sf->GetProperty("VS_DEPLOYMENT_LOCATION"); + if(location && *location) + { + deployLocation = location; + } } } @@ -1283,6 +1290,14 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) cmGeneratorExpression ge; cmsys::auto_ptr cge = ge.Parse(deployContent); + // Deployment location cannot be set on a configuration basis + if(!deployLocation.empty()) + { + this->WriteString("", 3); + (*this->BuildFileStream) << deployLocation + << "\\%(FileName)%(Extension)"; + this->WriteString("\n", 0); + } for(size_t i = 0; i != configs->size(); ++i) { if(0 == strcmp(cge->Evaluate(this->Makefile, (*configs)[i]), "1")) diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt index badb7da..7227fcc 100644 --- a/Tests/VSWinStorePhone/CMakeLists.txt +++ b/Tests/VSWinStorePhone/CMakeLists.txt @@ -86,6 +86,9 @@ if (WINDOWS_PHONE8) elseif (NOT "${PLATFORM}" STREQUAL "DESKTOP") set(CONTENT_FILES ${CONTENT_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${APP_MANIFEST_NAME} + ) + + set(ASSET_FILES ${ASSET_FILES} Direct3DApp1/Assets/Logo.png Direct3DApp1/Assets/SmallLogo.png Direct3DApp1/Assets/SplashScreen.png @@ -94,10 +97,12 @@ elseif (NOT "${PLATFORM}" STREQUAL "DESKTOP") endif() set(RESOURCE_FILES - ${CONTENT_FILES} ${DEBUG_CONTENT_FILES} ${RELEASE_CONTENT_FILES} + ${CONTENT_FILES} ${DEBUG_CONTENT_FILES} ${RELEASE_CONTENT_FILES} ${ASSET_FILES} Direct3DApp1/Direct3DApp1_TemporaryKey.pfx) set_property(SOURCE ${CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1) +set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_CONTENT 1) +set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets") set_property(SOURCE ${DEBUG_CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT $) set_property(SOURCE ${RELEASE_CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT $,$,$>) diff --git a/Tests/VSWinStorePhone/cmake/Package_vc11.store.appxmanifest.in b/Tests/VSWinStorePhone/cmake/Package_vc11.store.appxmanifest.in index d3cb21f..68172fa 100644 --- a/Tests/VSWinStorePhone/cmake/Package_vc11.store.appxmanifest.in +++ b/Tests/VSWinStorePhone/cmake/Package_vc11.store.appxmanifest.in @@ -4,7 +4,7 @@ @SHORT_NAME@ mgong - StoreLogo.png + Assets/StoreLogo.png 6.2.1 @@ -15,9 +15,9 @@ - + - + diff --git a/Tests/VSWinStorePhone/cmake/Package_vc12.store.appxmanifest.in b/Tests/VSWinStorePhone/cmake/Package_vc12.store.appxmanifest.in index 495f18e..08205f5 100644 --- a/Tests/VSWinStorePhone/cmake/Package_vc12.store.appxmanifest.in +++ b/Tests/VSWinStorePhone/cmake/Package_vc12.store.appxmanifest.in @@ -4,7 +4,7 @@ @SHORT_NAME@ mgong - StoreLogo.png + Assets/StoreLogo.png 6.3 @@ -20,14 +20,14 @@ Description="@SHORT_NAME@" BackgroundColor="#336699" ForegroundText="light" - Square150x150Logo="Logo.png" - Square30x30Logo="SmallLogo.png"> + Square150x150Logo="Assets/Logo.png" + Square30x30Logo="Assets/SmallLogo.png"> - + diff --git a/Tests/VSWinStorePhone/cmake/Package_vc12.wp.appxmanifest.in b/Tests/VSWinStorePhone/cmake/Package_vc12.wp.appxmanifest.in index 2d4d389..d47d43c 100644 --- a/Tests/VSWinStorePhone/cmake/Package_vc12.wp.appxmanifest.in +++ b/Tests/VSWinStorePhone/cmake/Package_vc12.wp.appxmanifest.in @@ -6,7 +6,7 @@ @SHORT_NAME@ mgong - StoreLogo.png + Assets/StoreLogo.png 6.3.1 @@ -22,14 +22,14 @@ Description="@SHORT_NAME@" BackgroundColor="#336699" ForegroundText="light" - Square150x150Logo="Logo.png" - Square30x30Logo="SmallLogo.png"> + Square150x150Logo="Assets/Logo.png" + Square30x30Logo="Assets/SmallLogo.png"> - + ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst | 8 ++++++++ Help/release/3.1.0.rst | 4 ++++ Source/cmVisualStudio10TargetGenerator.cxx | 15 +++++++++++++++ Tests/VSWinStorePhone/CMakeLists.txt | 7 ++++++- .../cmake/Package_vc11.store.appxmanifest.in | 6 +++--- .../cmake/Package_vc12.store.appxmanifest.in | 8 ++++---- .../cmake/Package_vc12.wp.appxmanifest.in | 8 ++++---- 8 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 09:53:13 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 09:53:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1044-g3fd185d Message-ID: <20141203145313.28BFAA80F5@public.kitware.com> This is an automated email from 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 3fd185d4c3115ccd87d9117bc89a187a08859c36 (commit) via 930178283a749c4020265259ea3f828552affba2 (commit) via e6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7 (commit) via 05d6531c7a8ecfad513a0e76b44b273b70fa919b (commit) from 719298b41f47721d3efe2a0bc33709db82118ee5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fd185d4c3115ccd87d9117bc89a187a08859c36 commit 3fd185d4c3115ccd87d9117bc89a187a08859c36 Merge: 719298b 9301782 Author: Brad King AuthorDate: Wed Dec 3 09:53:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 09:53:11 2014 -0500 Merge topic 'file-LOCK-command' into next 93017828 Help: Add notes for topic 'file-LOCK-command' e6db4c5a file: Add LOCK subcommand to do file and directory locking 05d6531c cmSystemTools: Add StringToInt helper http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=930178283a749c4020265259ea3f828552affba2 commit 930178283a749c4020265259ea3f828552affba2 Author: Brad King AuthorDate: Mon Dec 1 10:18:03 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 09:47:44 2014 -0500 Help: Add notes for topic 'file-LOCK-command' diff --git a/Help/release/dev/file-LOCK-command.rst b/Help/release/dev/file-LOCK-command.rst new file mode 100644 index 0000000..4b11e9e --- /dev/null +++ b/Help/release/dev/file-LOCK-command.rst @@ -0,0 +1,5 @@ +file-LOCK-command +----------------- + +* The :command:`file(LOCK)` subcommand was created to allow CMake + processes to synchronize through file and directory locks. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7 commit e6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7 Author: Ruslan Baratov AuthorDate: Wed Nov 26 01:49:25 2014 +0300 Commit: Brad King CommitDate: Wed Dec 3 09:47:44 2014 -0500 file: Add LOCK subcommand to do file and directory locking Provide options to fail without blocking or to block up to a timeout. Provide options to specify the scope containing the lock so it can be released automatically at the end of a function, file, or process. Extend the RunCMake.file test with cases covering the file(LOCK) command usage and error cases. diff --git a/Help/command/file.rst b/Help/command/file.rst index dbc4149..600464e 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -305,3 +305,33 @@ status messages (subject to the :variable:`CMAKE_INSTALL_MESSAGE` variable), and ``NO_SOURCE_PERMISSIONS`` is default. Installation scripts generated by the :command:`install` command use this signature (with some undocumented options for internal use). + +------------------------------------------------------------------------------ + +:: + + file(LOCK [DIRECTORY] [RELEASE] + [GUARD ] + [RESULT_VARIABLE ] + [TIMEOUT ]) + +Lock a file specified by ```` if no ``DIRECTORY`` option present and file +``/cmake.lock`` otherwise. File will be locked for scope defined by +``GUARD`` option (default value is ``PROCESS``). ``RELEASE`` option can be used +to unlock file explicitly. If option ``TIMEOUT`` is not specified CMake will +wait until lock succeed or until fatal error occurs. If ``TIMEOUT`` is set to +``0`` lock will be tried once and result will be reported immediately. If +``TIMEOUT`` is not ``0`` CMake will try to lock file for the period specified +by ```` value. Any errors will be interpreted as fatal if there is no +``RESULT_VARIABLE`` option. Otherwise result will be stored in ```` +and will be ``0`` on success or error message on failure. + +Note that lock is advisory - there is no guarantee that other processes will +respect this lock, i.e. lock synchronize two or more CMake instances sharing +some modifiable resources. Similar logic applied to ``DIRECTORY`` option - +locking parent directory doesn't prevent other ``LOCK`` commands to lock any +child directory or file. + +Trying to lock file twice is not allowed. Any intermediate directories and +file itself will be created if they not exist. ``GUARD`` and ``TIMEOUT`` +options ignored on ``RELEASE`` operation. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 7705683..a4c982f 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -219,6 +219,12 @@ set(SRCS cmExtraKateGenerator.h cmExtraSublimeTextGenerator.cxx cmExtraSublimeTextGenerator.h + cmFileLock.cxx + cmFileLock.h + cmFileLockPool.cxx + cmFileLockPool.h + cmFileLockResult.cxx + cmFileLockResult.h cmFileTimeComparison.cxx cmFileTimeComparison.h cmGeneratedFileStream.cxx diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index aa4c95b..a6eb8c4 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -21,6 +21,7 @@ #if defined(CMAKE_BUILD_WITH_CMAKE) #include "cm_curl.h" +#include "cmFileLockResult.h" #endif #undef GetCurrentDirectory @@ -202,6 +203,10 @@ bool cmFileCommand { return this->HandleGenerateCommand(args); } + else if ( subCommand == "LOCK" ) + { + return this->HandleLockCommand(args); + } std::string e = "does not recognize sub-command "+subCommand; this->SetError(e); @@ -3502,6 +3507,204 @@ bool cmFileCommand::HandleGenerateCommand( } //---------------------------------------------------------------------------- +bool cmFileCommand::HandleLockCommand( + std::vector const& args) +{ +#if defined(CMAKE_BUILD_WITH_CMAKE) + // Default values + bool directory = false; + bool release = false; + enum Guard { + GUARD_FUNCTION, + GUARD_FILE, + GUARD_PROCESS + }; + Guard guard = GUARD_PROCESS; + std::string resultVariable; + unsigned timeout = static_cast(-1); + + // Parse arguments + if(args.size() < 2) + { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + "sub-command LOCK requires at least two arguments."); + return false; + } + + std::string path = args[1]; + for (unsigned i = 2; i < args.size(); ++i) + { + if (args[i] == "DIRECTORY") + { + directory = true; + } + else if (args[i] == "RELEASE") + { + release = true; + } + else if (args[i] == "GUARD") + { + ++i; + const char* merr = "expected FUNCTION, FILE or PROCESS after GUARD"; + if (i >= args.size()) + { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, merr); + return false; + } + else + { + if (args[i] == "FUNCTION") + { + guard = GUARD_FUNCTION; + } + else if (args[i] == "FILE") + { + guard = GUARD_FILE; + } + else if (args[i] == "PROCESS") + { + guard = GUARD_PROCESS; + } + else + { + cmOStringStream e; + e << merr << ", but got:\n \"" << args[i] << "\"."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + } + } + else if (args[i] == "RESULT_VARIABLE") + { + ++i; + if (i >= args.size()) + { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + "expected variable name after RESULT_VARIABLE"); + return false; + } + resultVariable = args[i]; + } + else if (args[i] == "TIMEOUT") + { + ++i; + if (i >= args.size()) + { + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + "expected timeout value after TIMEOUT"); + return false; + } + int scanned; + if(!cmSystemTools::StringToInt(args[i].c_str(), &scanned) || scanned < 0) + { + cmOStringStream e; + e << "TIMEOUT value \"" << args[i] << "\" is not an unsigned integer."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + timeout = static_cast(scanned); + } + else + { + cmOStringStream e; + e << "expected DIRECTORY, RELEASE, GUARD, RESULT_VARIABLE or TIMEOUT\n"; + e << "but got: \"" << args[i] << "\"."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + } + + if (directory) + { + path += "/cmake.lock"; + } + + if (!cmsys::SystemTools::FileIsFullPath(path)) + { + path = this->Makefile->GetCurrentDirectory() + ("/" + path); + } + + // Unify path (remove '//', '/../', ...) + path = cmSystemTools::CollapseFullPath(path); + + // Create file and directories if needed + std::string parentDir = cmSystemTools::GetParentDirectory(path); + if (!cmSystemTools::MakeDirectory(parentDir)) + { + cmOStringStream e; + e << "directory\n \"" << parentDir << "\"\ncreation failed "; + e << "(check permissions)."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + FILE *file = cmsys::SystemTools::Fopen(path, "w"); + if (!file) + { + cmOStringStream e; + e << "file\n \"" << path << "\"\ncreation failed (check permissions)."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + fclose(file); + + // Actual lock/unlock + cmFileLockPool& lockPool = this->Makefile->GetLocalGenerator()-> + GetGlobalGenerator()->GetFileLockPool(); + + cmFileLockResult fileLockResult(cmFileLockResult::MakeOk()); + if (release) + { + fileLockResult = lockPool.Release(path); + } + else + { + switch (guard) + { + case GUARD_FUNCTION: + fileLockResult = lockPool.LockFunctionScope(path, timeout); + break; + case GUARD_FILE: + fileLockResult = lockPool.LockFileScope(path, timeout); + break; + case GUARD_PROCESS: + fileLockResult = lockPool.LockProcessScope(path, timeout); + break; + default: + cmSystemTools::SetFatalErrorOccured(); + return false; + } + } + + const std::string result = fileLockResult.GetOutputMessage(); + + if (resultVariable.empty() && !fileLockResult.IsOk()) + { + cmOStringStream e; + e << "error locking file\n \"" << path << "\"\n" << result << "."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + + if (!resultVariable.empty()) + { + this->Makefile->AddDefinition(resultVariable, result.c_str()); + } + + return true; +#else + static_cast(args); + this->SetError("sub-command LOCK not implemented in bootstrap cmake"); + return false; +#endif +} + +//---------------------------------------------------------------------------- bool cmFileCommand::HandleTimestampCommand( std::vector const& args) { diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index 8d66fdf..a4d341f 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -75,6 +75,7 @@ protected: bool HandleTimestampCommand(std::vector const& args); bool HandleGenerateCommand(std::vector const& args); + bool HandleLockCommand(std::vector const& args); private: void AddEvaluationFile(const std::string &inputName, diff --git a/Source/cmFileLock.cxx b/Source/cmFileLock.cxx new file mode 100644 index 0000000..5f75637 --- /dev/null +++ b/Source/cmFileLock.cxx @@ -0,0 +1,78 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLock.h" + +#include +#include "cmFileLockResult.h" + +// Common implementation + +cmFileLock::~cmFileLock() +{ + if (!this->Filename.empty()) + { + const cmFileLockResult result = this->Release(); + static_cast(result); + assert(result.IsOk()); + } +} + +cmFileLockResult cmFileLock::Lock( + const std::string& filename, unsigned timeout) +{ + if (filename.empty()) + { + // Error is internal since all the directories and file must be created + // before actual lock called. + return cmFileLockResult::MakeInternal(); + } + + if (!this->Filename.empty()) + { + // Error is internal since double-lock must be checked in class + // cmFileLockPool by the cmFileLock::IsLocked method. + return cmFileLockResult::MakeInternal(); + } + + this->Filename = filename; + cmFileLockResult result = this->OpenFile(); + if (result.IsOk()) + { + if (timeout == static_cast(-1)) + { + result = this->LockWithoutTimeout(); + } + else + { + result = this->LockWithTimeout(timeout); + } + } + + if (!result.IsOk()) + { + this->Filename = ""; + } + + return result; +} + +bool cmFileLock::IsLocked(const std::string& filename) const +{ + return filename == this->Filename; +} + +#if defined(_WIN32) +# include "cmFileLockWin32.cxx" +#else +# include "cmFileLockUnix.cxx" +#endif diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h new file mode 100644 index 0000000..4d922a0 --- /dev/null +++ b/Source/cmFileLock.h @@ -0,0 +1,74 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 cmFileLock_h +#define cmFileLock_h + +#include "cmStandardIncludes.h" + +#if defined(_WIN32) +# include // HANDLE +#endif + +class cmFileLockResult; + +/** + * @brief Cross-platform file locking. + * @details Under the hood this class use 'fcntl' for Unix-like platforms and + * 'LockFileEx'/'UnlockFileEx' for Win32 platform. Locks are exclusive and + * advisory. + */ +class cmFileLock +{ + public: + cmFileLock(); + ~cmFileLock(); + + /** + * @brief Lock the file. + * @param timeoutSec Lock timeout. If -1 try until success or fatal error. + */ + cmFileLockResult Lock(const std::string& filename, unsigned timeoutSec); + + /** + * @brief Unlock the file. + */ + cmFileLockResult Release(); + + /** + * @brief Check file is locked by this class. + * @details This function helps to find double locks (deadlocks) and to do + * explicit unlocks. + */ + bool IsLocked(const std::string& filename) const; + + private: + cmFileLock(const cmFileLock&); + cmFileLock& operator=(const cmFileLock&); + + cmFileLockResult OpenFile(); + cmFileLockResult LockWithoutTimeout(); + cmFileLockResult LockWithTimeout(unsigned timeoutSec); + +#if defined(_WIN32) + typedef HANDLE FileId; + BOOL LockFile(DWORD flags); +#else + typedef int FileId; + int LockFile(int cmd, int type); +#endif + + FileId File; + std::string Filename; +}; + +#endif // cmFileLock_h diff --git a/Source/cmFileLockPool.cxx b/Source/cmFileLockPool.cxx new file mode 100644 index 0000000..e84e71a --- /dev/null +++ b/Source/cmFileLockPool.cxx @@ -0,0 +1,198 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLockPool.h" + +#include + +#include "cmFileLock.h" +#include "cmFileLockResult.h" + +cmFileLockPool::cmFileLockPool() +{ +} + +cmFileLockPool::~cmFileLockPool() +{ + for (It i = this->FunctionScopes.begin(); + i != this->FunctionScopes.end(); ++i) + { + delete *i; + } + + for (It i = this->FileScopes.begin(); i != this->FileScopes.end(); ++i) + { + delete *i; + } +} + +void cmFileLockPool::PushFunctionScope() +{ + this->FunctionScopes.push_back(new ScopePool()); +} + +void cmFileLockPool::PopFunctionScope() +{ + assert(!this->FunctionScopes.empty()); + delete this->FunctionScopes.back(); + this->FunctionScopes.pop_back(); +} + +void cmFileLockPool::PushFileScope() +{ + this->FileScopes.push_back(new ScopePool()); +} + +void cmFileLockPool::PopFileScope() +{ + assert(!this->FileScopes.empty()); + delete this->FileScopes.back(); + this->FileScopes.pop_back(); +} + +cmFileLockResult cmFileLockPool::LockFunctionScope( + const std::string& filename, unsigned timeoutSec) +{ + if (this->IsAlreadyLocked(filename)) + { + return cmFileLockResult::MakeAlreadyLocked(); + } + if (this->FunctionScopes.empty()) + { + return cmFileLockResult::MakeNoFunction(); + } + return this->FunctionScopes.back()->Lock(filename, timeoutSec); +} + +cmFileLockResult cmFileLockPool::LockFileScope( + const std::string& filename, unsigned timeoutSec) +{ + if (this->IsAlreadyLocked(filename)) + { + return cmFileLockResult::MakeAlreadyLocked(); + } + assert(!this->FileScopes.empty()); + return this->FileScopes.back()->Lock(filename, timeoutSec); +} + +cmFileLockResult cmFileLockPool::LockProcessScope( + const std::string& filename, unsigned timeoutSec) +{ + if (this->IsAlreadyLocked(filename)) + { + return cmFileLockResult::MakeAlreadyLocked(); + } + return this->ProcessScope.Lock(filename, timeoutSec); +} + +cmFileLockResult cmFileLockPool::Release(const std::string& filename) +{ + for (It i = this->FunctionScopes.begin(); + i != this->FunctionScopes.end(); ++i) + { + const cmFileLockResult result = (*i)->Release(filename); + if (!result.IsOk()) + { + return result; + } + } + + for (It i = this->FileScopes.begin(); i != this->FileScopes.end(); ++i) + { + const cmFileLockResult result = (*i)->Release(filename); + if (!result.IsOk()) + { + return result; + } + } + + return this->ProcessScope.Release(filename); +} + +bool cmFileLockPool::IsAlreadyLocked(const std::string& filename) const +{ + for (CIt i = this->FunctionScopes.begin(); + i != this->FunctionScopes.end(); ++i) + { + const bool result = (*i)->IsAlreadyLocked(filename); + if (result) + { + return true; + } + } + + for (CIt i = this->FileScopes.begin(); i != this->FileScopes.end(); ++i) + { + const bool result = (*i)->IsAlreadyLocked(filename); + if (result) + { + return true; + } + } + + return this->ProcessScope.IsAlreadyLocked(filename); +} + +cmFileLockPool::ScopePool::ScopePool() +{ +} + +cmFileLockPool::ScopePool::~ScopePool() +{ + for (It i = this->Locks.begin(); i != this->Locks.end(); ++i) + { + delete *i; + } +} + +cmFileLockResult cmFileLockPool::ScopePool::Lock( + const std::string& filename, unsigned timeoutSec) +{ + cmFileLock *lock = new cmFileLock(); + const cmFileLockResult result = lock->Lock(filename, timeoutSec); + if (result.IsOk()) + { + this->Locks.push_back(lock); + return cmFileLockResult::MakeOk(); + } + else + { + delete lock; + return result; + } +} + +cmFileLockResult cmFileLockPool::ScopePool::Release( + const std::string& filename) +{ + for (It i = this->Locks.begin(); i != this->Locks.end(); ++i) + { + if ((*i)->IsLocked(filename)) + { + return (*i)->Release(); + } + } + return cmFileLockResult::MakeOk(); +} + +bool cmFileLockPool::ScopePool::IsAlreadyLocked( + const std::string& filename) const +{ + for (CIt i = this->Locks.begin(); i != this->Locks.end(); ++i) + { + if ((*i)->IsLocked(filename)) + { + return true; + } + } + return false; +} diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h new file mode 100644 index 0000000..a63540c --- /dev/null +++ b/Source/cmFileLockPool.h @@ -0,0 +1,100 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 cmFileLockPool_h +#define cmFileLockPool_h + +#include "cmStandardIncludes.h" + +class cmFileLockResult; +class cmFileLock; + +class cmFileLockPool +{ + public: + cmFileLockPool(); + ~cmFileLockPool(); + + //@{ + /** + * @brief Function scope control. + */ + void PushFunctionScope(); + void PopFunctionScope(); + //@} + + //@{ + /** + * @brief File scope control. + */ + void PushFileScope(); + void PopFileScope(); + //@} + + //@{ + /** + * @brief Lock the file in given scope. + * @param timeoutSec Lock timeout. If -1 try until success or fatal error. + */ + cmFileLockResult LockFunctionScope( + const std::string& filename, unsigned timeoutSec + ); + cmFileLockResult LockFileScope( + const std::string& filename, unsigned timeoutSec + ); + cmFileLockResult LockProcessScope( + const std::string& filename, unsigned timeoutSec + ); + //@} + + /** + * @brief Unlock the file explicitly. + */ + cmFileLockResult Release(const std::string& filename); + + private: + cmFileLockPool(const cmFileLockPool&); + cmFileLockPool& operator=(const cmFileLockPool&); + + bool IsAlreadyLocked(const std::string& filename) const; + + class ScopePool + { + public: + ScopePool(); + ~ScopePool(); + + cmFileLockResult Lock(const std::string& filename, unsigned timeoutSec); + cmFileLockResult Release(const std::string& filename); + bool IsAlreadyLocked(const std::string& filename) const; + + private: + ScopePool(const ScopePool&); + ScopePool& operator=(const ScopePool&); + + typedef std::list List; + typedef List::iterator It; + typedef List::const_iterator CIt; + + List Locks; + }; + + typedef std::list List; + + typedef List::iterator It; + typedef List::const_iterator CIt; + + List FunctionScopes; + List FileScopes; + ScopePool ProcessScope; +}; + +#endif // cmFileLockPool_h diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx new file mode 100644 index 0000000..045e7ee --- /dev/null +++ b/Source/cmFileLockResult.cxx @@ -0,0 +1,111 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLockResult.h" + +#include + +cmFileLockResult cmFileLockResult::MakeOk() +{ + return cmFileLockResult(OK, 0); +} + +cmFileLockResult cmFileLockResult::MakeSystem() +{ +#if defined(_WIN32) + const Error lastError = GetLastError(); +#else + const Error lastError = errno; +#endif + return cmFileLockResult(SYSTEM, lastError); +} + +cmFileLockResult cmFileLockResult::MakeTimeout() +{ + return cmFileLockResult(TIMEOUT, 0); +} + +cmFileLockResult cmFileLockResult::MakeAlreadyLocked() +{ + return cmFileLockResult(ALREADY_LOCKED, 0); +} + +cmFileLockResult cmFileLockResult::MakeInternal() +{ + return cmFileLockResult(INTERNAL, 0); +} + +cmFileLockResult cmFileLockResult::MakeNoFunction() +{ + return cmFileLockResult(NO_FUNCTION, 0); +} + +bool cmFileLockResult::IsOk() const +{ + return this->Type == OK; +} + +std::string cmFileLockResult::GetOutputMessage() const +{ + switch (this->Type) + { + case OK: + return "0"; + case SYSTEM: +#if defined(_WIN32) + { + char* errorText = NULL; + + // http://stackoverflow.com/a/455533/2288008 + DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_IGNORE_INSERTS; + ::FormatMessageA( + flags, + NULL, + this->ErrorValue, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&errorText, + 0, + NULL + ); + + if (errorText != NULL) + { + const std::string message = errorText; + ::LocalFree(errorText); + return message; + } + else + { + return "Internal error (FormatMessageA failed)"; + } + } +#else + return strerror(this->ErrorValue); +#endif + case TIMEOUT: + return "Timeout reached"; + case ALREADY_LOCKED: + return "File already locked"; + case NO_FUNCTION: + return "'GUARD FUNCTION' not used in function definition"; + case INTERNAL: + default: + return "Internal error"; + } +} + +cmFileLockResult::cmFileLockResult(ErrorType typeValue, Error errorValue): + Type(typeValue), ErrorValue(errorValue) +{ +} diff --git a/Source/cmFileLockResult.h b/Source/cmFileLockResult.h new file mode 100644 index 0000000..531fb49 --- /dev/null +++ b/Source/cmFileLockResult.h @@ -0,0 +1,85 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 cmFileLockResult_h +#define cmFileLockResult_h + +#include "cmStandardIncludes.h" + +#if defined(_WIN32) +# include // DWORD +#endif + +/** + * @brief Result of the locking/unlocking file. + * @note See @c cmFileLock + */ +class cmFileLockResult +{ + public: +#if defined(_WIN32) + typedef DWORD Error; +#else + typedef int Error; +#endif + + /** + * @brief Successful lock/unlock. + */ + static cmFileLockResult MakeOk(); + + /** + * @brief Lock/Unlock failed. Read error/GetLastError. + */ + static cmFileLockResult MakeSystem(); + + /** + * @brief Lock/Unlock failed. Timeout reached. + */ + static cmFileLockResult MakeTimeout(); + + /** + * @brief File already locked. + */ + static cmFileLockResult MakeAlreadyLocked(); + + /** + * @brief Internal error. + */ + static cmFileLockResult MakeInternal(); + + /** + * @brief Try to lock with function guard outside of the function + */ + static cmFileLockResult MakeNoFunction(); + + bool IsOk() const; + std::string GetOutputMessage() const; + + private: + enum ErrorType + { + OK, + SYSTEM, + TIMEOUT, + ALREADY_LOCKED, + INTERNAL, + NO_FUNCTION + }; + + cmFileLockResult(ErrorType type, Error errorValue); + + ErrorType Type; + Error ErrorValue; +}; + +#endif // cmFileLockResult_h diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx new file mode 100644 index 0000000..038011e --- /dev/null +++ b/Source/cmFileLockUnix.cxx @@ -0,0 +1,102 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLock.h" + +#include // errno +#include // SEEK_SET +#include +#include "cmSystemTools.h" + +cmFileLock::cmFileLock(): File(-1) +{ +} + +cmFileLockResult cmFileLock::Release() +{ + if (this->Filename.empty()) + { + return cmFileLockResult::MakeOk(); + } + const int lockResult = this->LockFile(F_SETLK, F_UNLCK); + + this->Filename = ""; + + if (lockResult == 0) + { + return cmFileLockResult::MakeOk(); + } + else + { + return cmFileLockResult::MakeSystem(); + } +} + +cmFileLockResult cmFileLock::OpenFile() +{ + this->File = ::open(this->Filename.c_str(), O_RDWR); + if (this->File == -1) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithoutTimeout() +{ + if (this->LockFile(F_SETLKW, F_WRLCK) == -1) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) +{ + while (true) + { + if (this->LockFile(F_SETLK, F_WRLCK) == -1) + { + if (errno != EACCES && errno != EAGAIN) + { + return cmFileLockResult::MakeSystem(); + } + } + else + { + return cmFileLockResult::MakeOk(); + } + if (seconds == 0) + { + return cmFileLockResult::MakeTimeout(); + } + --seconds; + cmSystemTools::Delay(1000); + } +} + +int cmFileLock::LockFile(int cmd, int type) +{ + struct ::flock lock; + lock.l_start = 0; + lock.l_len = 0; // lock all bytes + lock.l_pid = 0; // unused (for F_GETLK only) + lock.l_type = static_cast(type); // exclusive lock + lock.l_whence = SEEK_SET; + return ::fcntl(this->File, cmd, &lock); +} diff --git a/Source/cmFileLockWin32.cxx b/Source/cmFileLockWin32.cxx new file mode 100644 index 0000000..17231ea --- /dev/null +++ b/Source/cmFileLockWin32.cxx @@ -0,0 +1,126 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2014 Ruslan Baratov + + 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 "cmFileLock.h" + +#include // CreateFileW +#include "cmSystemTools.h" + +cmFileLock::cmFileLock(): File(INVALID_HANDLE_VALUE) +{ +} + +cmFileLockResult cmFileLock::Release() +{ + if (this->Filename.empty()) + { + return cmFileLockResult::MakeOk(); + } + const unsigned long len = static_cast(-1); + static OVERLAPPED overlapped; + const DWORD reserved = 0; + const BOOL unlockResult = UnlockFileEx( + File, + reserved, + len, + len, + &overlapped + ); + + this->Filename = ""; + + if (unlockResult) + { + return cmFileLockResult::MakeOk(); + } + else + { + return cmFileLockResult::MakeSystem(); + } +} + +cmFileLockResult cmFileLock::OpenFile() +{ + const DWORD access = GENERIC_READ | GENERIC_WRITE; + const DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + const PSECURITY_ATTRIBUTES security = NULL; + const DWORD attr = 0; + const HANDLE templ = NULL; + this->File = CreateFileW( + cmSystemTools::ConvertToWindowsExtendedPath(this->Filename).c_str(), + access, + shareMode, + security, + OPEN_EXISTING, + attr, + templ + ); + if (this->File == INVALID_HANDLE_VALUE) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithoutTimeout() +{ + if (!this->LockFile(LOCKFILE_EXCLUSIVE_LOCK)) + { + return cmFileLockResult::MakeSystem(); + } + else + { + return cmFileLockResult::MakeOk(); + } +} + +cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) +{ + const DWORD flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY; + while (true) + { + const BOOL result = this->LockFile(flags); + if (result) + { + return cmFileLockResult::MakeOk(); + } + const DWORD error = GetLastError(); + if (error != ERROR_LOCK_VIOLATION) + { + return cmFileLockResult::MakeSystem(); + } + if (seconds == 0) + { + return cmFileLockResult::MakeTimeout(); + } + --seconds; + cmSystemTools::Delay(1000); + } +} + +BOOL cmFileLock::LockFile(DWORD flags) +{ + const DWORD reserved = 0; + const unsigned long len = static_cast(-1); + static OVERLAPPED overlapped; + return LockFileEx( + this->File, + flags, + reserved, + len, + len, + &overlapped + ); +} diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 926efe7..6b75298 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -23,6 +23,7 @@ #include "cmGeneratorExpression.h" #if defined(CMAKE_BUILD_WITH_CMAKE) +# include "cmFileLockPool.h" # include #endif @@ -348,6 +349,10 @@ public: std::set const& GetFilenameTargetDepends(cmSourceFile* sf) const; +#if defined(CMAKE_BUILD_WITH_CMAKE) + cmFileLockPool& GetFileLockPool() { return FileLockPool; } +#endif + protected: virtual void Generate(); @@ -499,6 +504,11 @@ private: mutable std::map > FilenameTargetDepends; + +#if defined(CMAKE_BUILD_WITH_CMAKE) + // Pool of file locks + cmFileLockPool FileLockPool; +#endif }; #endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3fb1e1e..2de6c93 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -79,9 +79,15 @@ public: this->GG = lg->GetGlobalGenerator(); this->LG = this->GG->GetCurrentLocalGenerator(); this->GG->SetCurrentLocalGenerator(lg); +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GG->GetFileLockPool().PushFileScope(); +#endif } ~cmLocalGeneratorCurrent() { +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GG->GetFileLockPool().PopFileScope(); +#endif this->GG->SetCurrentLocalGenerator(this->LG); } }; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 53fd56f..2506eaa 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4522,10 +4522,20 @@ void cmMakefile::PushScope() this->Internal->VarUsageStack.push(usage); this->PushLoopBlockBarrier(); + +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GetLocalGenerator()->GetGlobalGenerator()-> + GetFileLockPool().PushFunctionScope(); +#endif } void cmMakefile::PopScope() { +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->GetLocalGenerator()->GetGlobalGenerator()-> + GetFileLockPool().PopFunctionScope(); +#endif + this->PopLoopBlockBarrier(); cmDefinitions* current = &this->Internal->VarStack.top(); diff --git a/Tests/RunCMake/file/LOCK-error-file-create-fail-result.txt b/Tests/RunCMake/file/LOCK-error-file-create-fail-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-file-create-fail-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt b/Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt new file mode 100644 index 0000000..72b7fe0 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at LOCK-error-file-create-fail\.cmake:[0-9]+ \(file\): + file + + ".*" + + creation failed \(check permissions\)\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-file-create-fail.cmake b/Tests/RunCMake/file/LOCK-error-file-create-fail.cmake new file mode 100644 index 0000000..4868cfe --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-file-create-fail.cmake @@ -0,0 +1,3 @@ +set(tmp "${CMAKE_CURRENT_BINARY_DIR}/temp-directory") +file(MAKE_DIRECTORY "${tmp}") +file(LOCK "${tmp}") diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect-result.txt b/Tests/RunCMake/file/LOCK-error-guard-incorrect-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt b/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt new file mode 100644 index 0000000..85136b4 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at LOCK-error-guard-incorrect\.cmake:[0-9]+ \(file\): + expected FUNCTION, FILE or PROCESS after GUARD, but got: + + "FUNCTIO"\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake b/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake new file mode 100644 index 0000000..51daa7c --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD FUNCTIO) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt new file mode 100644 index 0000000..c6ae1e0 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-incorrect-timeout\.cmake:[0-9]+ \(file\): + TIMEOUT value "qwerty" is not an unsigned integer\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-result.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt new file mode 100644 index 0000000..6ea2507 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-incorrect-timeout-trail\.cmake:[0-9]+ \(file\): + TIMEOUT value "123xyz" is not an unsigned integer\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake new file mode 100644 index 0000000..c4f1b75 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT 123xyz) diff --git a/Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake b/Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake new file mode 100644 index 0000000..d882467 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT qwerty) diff --git a/Tests/RunCMake/file/LOCK-error-lock-fail-result.txt b/Tests/RunCMake/file/LOCK-error-lock-fail-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-lock-fail-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt b/Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt new file mode 100644 index 0000000..a7b0447 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at LOCK-error-lock-fail.cmake:[0-9]+ \(file\): + directory + + ".*" + + creation failed \(check permissions\)\. diff --git a/Tests/RunCMake/file/LOCK-error-lock-fail.cmake b/Tests/RunCMake/file/LOCK-error-lock-fail.cmake new file mode 100644 index 0000000..aa7f663 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-lock-fail.cmake @@ -0,0 +1,6 @@ +set(lfile "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock") +FILE(WRITE "${lfile}" "") + +# Try to lock file '${lfile}/cmake.lock'. Since `lfile` is not a directory +# expected that operation will fail. +file(LOCK "${lfile}" DIRECTORY) diff --git a/Tests/RunCMake/file/LOCK-error-negative-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-negative-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-negative-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt new file mode 100644 index 0000000..0d159c1 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-negative-timeout\.cmake:[0-9]+ \(file\): + TIMEOUT value "-2" is not an unsigned integer\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-negative-timeout.cmake b/Tests/RunCMake/file/LOCK-error-negative-timeout.cmake new file mode 100644 index 0000000..6a0f190 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-negative-timeout.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT -2) diff --git a/Tests/RunCMake/file/LOCK-error-no-function-result.txt b/Tests/RunCMake/file/LOCK-error-no-function-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-function-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-function-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-function-stderr.txt new file mode 100644 index 0000000..51ed12d --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-function-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at LOCK-error-no-function\.cmake:[0-9]+ \(file\): + error locking file + + ".*" + + 'GUARD FUNCTION' not used in function definition\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-function.cmake b/Tests/RunCMake/file/LOCK-error-no-function.cmake new file mode 100644 index 0000000..1b8b06a --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-function.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD FUNCTION) diff --git a/Tests/RunCMake/file/LOCK-error-no-guard-result.txt b/Tests/RunCMake/file/LOCK-error-no-guard-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-guard-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt new file mode 100644 index 0000000..41177ce --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-guard\.cmake:[0-9]+ \(file\): + expected FUNCTION, FILE or PROCESS after GUARD +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-guard.cmake b/Tests/RunCMake/file/LOCK-error-no-guard.cmake new file mode 100644 index 0000000..48ffc5e --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-guard.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD) diff --git a/Tests/RunCMake/file/LOCK-error-no-path-result.txt b/Tests/RunCMake/file/LOCK-error-no-path-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-path-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt new file mode 100644 index 0000000..2247aa6 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-path-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-path.cmake:[0-9]+ \(file\): + file must be called with at least two arguments. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-path.cmake b/Tests/RunCMake/file/LOCK-error-no-path.cmake new file mode 100644 index 0000000..12d79b7 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-path.cmake @@ -0,0 +1 @@ +file(LOCK) diff --git a/Tests/RunCMake/file/LOCK-error-no-result-variable-result.txt b/Tests/RunCMake/file/LOCK-error-no-result-variable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-result-variable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt new file mode 100644 index 0000000..b38e23c --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-result-variable\.cmake:[0-9]+ \(file\): + expected variable name after RESULT_VARIABLE +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-result-variable.cmake b/Tests/RunCMake/file/LOCK-error-no-result-variable.cmake new file mode 100644 index 0000000..e6ac18d --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-result-variable.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" RESULT_VARIABLE) diff --git a/Tests/RunCMake/file/LOCK-error-no-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-no-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt new file mode 100644 index 0000000..f34d46f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at LOCK-error-no-timeout\.cmake:[0-9]+ \(file\): + expected timeout value after TIMEOUT +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-no-timeout.cmake b/Tests/RunCMake/file/LOCK-error-no-timeout.cmake new file mode 100644 index 0000000..1618192 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-no-timeout.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" TIMEOUT) diff --git a/Tests/RunCMake/file/LOCK-error-timeout-result.txt b/Tests/RunCMake/file/LOCK-error-timeout-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-timeout-stderr.txt b/Tests/RunCMake/file/LOCK-error-timeout-stderr.txt new file mode 100644 index 0000000..4ad1f04 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout-stderr.txt @@ -0,0 +1,12 @@ +Output:[ ]* +Error: CMake Error at .*.timeout-script\.cmake:[0-9]+ \(file\): + error locking file + + ".*" + + Timeout reached\. ++ +CMake Error at LOCK-error-timeout\.cmake:[0-9]+ \(message\): + Result: 1 +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-timeout-stdout.txt b/Tests/RunCMake/file/LOCK-error-timeout-stdout.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout-stdout.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/file/LOCK-error-timeout.cmake b/Tests/RunCMake/file/LOCK-error-timeout.cmake new file mode 100644 index 0000000..b6b9476 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-timeout.cmake @@ -0,0 +1,17 @@ +set(script "${CMAKE_CURRENT_LIST_DIR}/timeout-script.cmake") +set(file_to_lock "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock") + +file(LOCK "${file_to_lock}") +execute_process( + COMMAND "${CMAKE_COMMAND}" "-Dfile_to_lock=${file_to_lock}" -P "${script}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error +) + +message("Output: ${output}") +message("Error: ${error}") + +if(NOT result EQUAL 0) + message(FATAL_ERROR "Result: ${result}") +endif() diff --git a/Tests/RunCMake/file/LOCK-error-unknown-option-result.txt b/Tests/RunCMake/file/LOCK-error-unknown-option-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-unknown-option-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt b/Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt new file mode 100644 index 0000000..ad596af --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at LOCK-error-unknown-option\.cmake:[0-9]+ \(file\): + expected DIRECTORY, RELEASE, GUARD, RESULT_VARIABLE or TIMEOUT + + but got: "UNKNOWN"\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]* \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-unknown-option.cmake b/Tests/RunCMake/file/LOCK-error-unknown-option.cmake new file mode 100644 index 0000000..88ef002 --- /dev/null +++ b/Tests/RunCMake/file/LOCK-error-unknown-option.cmake @@ -0,0 +1 @@ +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/temp-file" UNKNOWN) diff --git a/Tests/RunCMake/file/LOCK-stdout.txt b/Tests/RunCMake/file/LOCK-stdout.txt new file mode 100644 index 0000000..416126a --- /dev/null +++ b/Tests/RunCMake/file/LOCK-stdout.txt @@ -0,0 +1,11 @@ +-- Simple lock +-- Directory lock +-- Release +-- Lock function scope +-- Lock file scope +-- Lock in subdirectory +-- Lock process scope +-- Error double lock +-- Ok +-- Timeout 0 +-- Timeout not 0 diff --git a/Tests/RunCMake/file/LOCK.cmake b/Tests/RunCMake/file/LOCK.cmake new file mode 100644 index 0000000..8eff084 --- /dev/null +++ b/Tests/RunCMake/file/LOCK.cmake @@ -0,0 +1,40 @@ +set(lfile "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock") +set(ldir "${CMAKE_CURRENT_BINARY_DIR}/dir-to-lock") + +message(STATUS "Simple lock") +file(LOCK ${lfile}) + +message(STATUS "Directory lock") +file(LOCK ${ldir} DIRECTORY) + +message(STATUS "Release") +file(LOCK ${lfile} RELEASE) + +function(foo) + file(LOCK "${lfile}" GUARD FUNCTION) +endfunction() + +message(STATUS "Lock function scope") +foo() + +message(STATUS "Lock file scope") +add_subdirectory(subdir_test_unlock) + +message(STATUS "Lock process scope") +file(LOCK "${lfile}" GUARD PROCESS) + +message(STATUS "Error double lock") +file(LOCK "${lfile}" RESULT_VARIABLE lock_result) +if(lock_result STREQUAL "File already locked") + message(STATUS "Ok") +else() + message(STATUS FATAL_ERROR "Expected error message") +endif() + +message(STATUS "Timeout 0") +file(LOCK "${lfile}" RELEASE) +file(LOCK "${lfile}" TIMEOUT 0) + +message(STATUS "Timeout not 0") +file(LOCK "${lfile}" RELEASE) +file(LOCK "${lfile}" TIMEOUT 3) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index bf14263..14819e7 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -3,3 +3,17 @@ include(RunCMake) run_cmake(INSTALL-DIRECTORY) run_cmake(INSTALL-MESSAGE-bad) run_cmake(FileOpenFailRead) +run_cmake(LOCK) +run_cmake(LOCK-error-file-create-fail) +run_cmake(LOCK-error-guard-incorrect) +run_cmake(LOCK-error-incorrect-timeout) +run_cmake(LOCK-error-incorrect-timeout-trail) +run_cmake(LOCK-error-lock-fail) +run_cmake(LOCK-error-negative-timeout) +run_cmake(LOCK-error-no-function) +run_cmake(LOCK-error-no-guard) +run_cmake(LOCK-error-no-path) +run_cmake(LOCK-error-no-result-variable) +run_cmake(LOCK-error-no-timeout) +run_cmake(LOCK-error-timeout) +run_cmake(LOCK-error-unknown-option) diff --git a/Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt b/Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt new file mode 100644 index 0000000..c167cd7 --- /dev/null +++ b/Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt @@ -0,0 +1,2 @@ +message(STATUS "Lock in subdirectory") +file(LOCK "${lfile}" GUARD FILE) diff --git a/Tests/RunCMake/file/timeout-script.cmake b/Tests/RunCMake/file/timeout-script.cmake new file mode 100644 index 0000000..e07dbf0 --- /dev/null +++ b/Tests/RunCMake/file/timeout-script.cmake @@ -0,0 +1,5 @@ +if(NOT file_to_lock) + message(FATAL_ERROR "file_to_lock is empty") +endif() + +file(LOCK "${file_to_lock}" TIMEOUT 1) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05d6531c7a8ecfad513a0e76b44b273b70fa919b commit 05d6531c7a8ecfad513a0e76b44b273b70fa919b Author: Ruslan Baratov AuthorDate: Wed Nov 26 01:45:26 2014 +0300 Commit: Brad King CommitDate: Wed Dec 3 09:47:26 2014 -0500 cmSystemTools: Add StringToInt helper Convert a string to a signed integer and reject any extra input. Co-Author: Rolf Eike Beer diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index baac7b8..9852dd6 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2923,3 +2923,11 @@ std::vector cmSystemTools::tokenize(const std::string& str, } return tokens; } + +//---------------------------------------------------------------------------- +bool cmSystemTools::StringToInt(const char* str, int* value) +{ + char *endp; + *value = static_cast(strtol(str, &endp, 10)); + return (*endp == '\0') && (endp != str); +} diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 4455dd1..763389b 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -458,6 +458,9 @@ public: static std::vector tokenize(const std::string& str, const std::string& sep); + /** Convert string to int. Expected that the whole string is an integer */ + static bool StringToInt(const char* str, int* value); + #ifdef _WIN32 struct WindowsFileRetry { ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:43 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:43 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-445-gcf63779 Message-ID: <20141203150143.75154A8389@public.kitware.com> This is an automated email from 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 cf63779f353ce95434f8dc6926b3047217b78f72 (commit) via 02e34de2b6c27ee5d367be4fa280ffd3ad1965ba (commit) from 0e466f89fdceec50cbc3c21a0d1e0773271b166b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf63779f353ce95434f8dc6926b3047217b78f72 commit cf63779f353ce95434f8dc6926b3047217b78f72 Merge: 0e466f8 02e34de Author: Brad King AuthorDate: Wed Dec 3 10:01:42 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:42 2014 -0500 Merge topic 'FindOpenGL-revert-imported-targets' 02e34de2 FindOpenGL: Revert support for imported targets (#15267) ----------------------------------------------------------------------- Summary of changes: Help/release/3.1.0.rst | 3 --- Modules/FindOpenGL.cmake | 40 ---------------------------------------- 2 files changed, 43 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:45 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-447-g53fa072 Message-ID: <20141203150145.DF56DA838C@public.kitware.com> This is an automated email from 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 53fa072e6a63477916f38028c5f5d818c47f6980 (commit) via 0de867dde282670461e56ce61e9c33fc6044d9a4 (commit) from cf63779f353ce95434f8dc6926b3047217b78f72 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53fa072e6a63477916f38028c5f5d818c47f6980 commit 53fa072e6a63477916f38028c5f5d818c47f6980 Merge: cf63779 0de867d Author: Brad King AuthorDate: Wed Dec 3 10:01:44 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:44 2014 -0500 Merge topic 'add-continue-command' 0de867dd continue: Add a new CMake language command for loop continuation (#14013) ----------------------------------------------------------------------- Summary of changes: Help/command/break.rst | 2 + Help/command/continue.rst | 12 ++++++ Help/manual/cmake-commands.7.rst | 1 + Help/manual/cmake-language.7.rst | 6 ++- Help/release/dev/add-continue-command.rst | 6 +++ Source/cmBootstrapCommands1.cxx | 2 + Source/cmContinueCommand.cxx | 39 ++++++++++++++++++++ Source/{cmReturnCommand.h => cmContinueCommand.h} | 20 +++++----- Source/cmExecutionStatus.h | 7 ++++ Source/cmForEachCommand.cxx | 4 ++ Source/cmIfCommand.cxx | 5 +++ Source/cmWhileCommand.cxx | 4 ++ Tests/RunCMake/CMakeLists.txt | 1 + .../RunCMake/{CMP0055 => continue}/CMakeLists.txt | 0 .../RunCMake/continue/ContinueForEachInLists.cmake | 10 +++++ Tests/RunCMake/continue/ContinueForeach-stdout.txt | 4 ++ Tests/RunCMake/continue/ContinueForeach.cmake | 8 ++++ .../continue/ContinueNestedForeach-stdout.txt | 6 +++ .../RunCMake/continue/ContinueNestedForeach.cmake | 13 +++++++ Tests/RunCMake/continue/ContinueWhile-stdout.txt | 6 +++ Tests/RunCMake/continue/ContinueWhile.cmake | 10 +++++ .../NoArgumentsToContinue-result.txt} | 0 .../continue/NoArgumentsToContinue-stderr.txt | 4 ++ .../NoArgumentsToContinue.cmake} | 3 +- .../NoEnclosingBlock-result.txt} | 0 .../RunCMake/continue/NoEnclosingBlock-stderr.txt | 5 +++ Tests/RunCMake/continue/NoEnclosingBlock.cmake | 1 + .../NoEnclosingBlockInFunction-result.txt} | 0 .../continue/NoEnclosingBlockInFunction-stderr.txt | 6 +++ .../continue/NoEnclosingBlockInFunction.cmake | 8 ++++ Tests/RunCMake/continue/RunCMakeTest.cmake | 9 +++++ 31 files changed, 188 insertions(+), 14 deletions(-) create mode 100644 Help/command/continue.rst create mode 100644 Help/release/dev/add-continue-command.rst create mode 100644 Source/cmContinueCommand.cxx copy Source/{cmReturnCommand.h => cmContinueCommand.h} (70%) copy Tests/RunCMake/{CMP0055 => continue}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/continue/ContinueForEachInLists.cmake create mode 100644 Tests/RunCMake/continue/ContinueForeach-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueForeach.cmake create mode 100644 Tests/RunCMake/continue/ContinueNestedForeach-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueNestedForeach.cmake create mode 100644 Tests/RunCMake/continue/ContinueWhile-stdout.txt create mode 100644 Tests/RunCMake/continue/ContinueWhile.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => continue/NoArgumentsToContinue-result.txt} (100%) create mode 100644 Tests/RunCMake/continue/NoArgumentsToContinue-stderr.txt copy Tests/RunCMake/{CMP0055/CMP0055-WARN-Reject-Arguments.cmake => continue/NoArgumentsToContinue.cmake} (70%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => continue/NoEnclosingBlock-result.txt} (100%) create mode 100644 Tests/RunCMake/continue/NoEnclosingBlock-stderr.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlock.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => continue/NoEnclosingBlockInFunction-result.txt} (100%) create mode 100644 Tests/RunCMake/continue/NoEnclosingBlockInFunction-stderr.txt create mode 100644 Tests/RunCMake/continue/NoEnclosingBlockInFunction.cmake create mode 100644 Tests/RunCMake/continue/RunCMakeTest.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:48 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-449-gf773e28 Message-ID: <20141203150148.38DB8A838E@public.kitware.com> This is an automated email from 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 f773e28a8e6033ca128e1dd223fc2345a97efba5 (commit) via 23e2bd7e8cd69eeb6bc607a0b62c764567ac3c5f (commit) from 53fa072e6a63477916f38028c5f5d818c47f6980 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f773e28a8e6033ca128e1dd223fc2345a97efba5 commit f773e28a8e6033ca128e1dd223fc2345a97efba5 Merge: 53fa072 23e2bd7 Author: Brad King AuthorDate: Wed Dec 3 10:01:47 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:47 2014 -0500 Merge topic 'doc-Nsight-Tegra-toolchain' 23e2bd7e Help: Document Nsight Tegra toolchain configuration (#15276) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-toolchains.7.rst | 17 +++++++++++++++++ Help/prop_tgt/ANDROID_GUI.rst | 4 ++++ 2 files changed, 21 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:50 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-451-gb9eac05 Message-ID: <20141203150150.CCBCEA8393@public.kitware.com> This is an automated email from 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 b9eac05fb65198f1522ecec756f3fb4ae253e34b (commit) via 2a224b4ce3fcc3c25bb3f56cf50806ae79262fc2 (commit) from f773e28a8e6033ca128e1dd223fc2345a97efba5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9eac05fb65198f1522ecec756f3fb4ae253e34b commit b9eac05fb65198f1522ecec756f3fb4ae253e34b Merge: f773e28 2a224b4 Author: Brad King AuthorDate: Wed Dec 3 10:01:49 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:49 2014 -0500 Merge topic 'vs-hlsl-settings' 2a224b4c VS: Add source file properties to set the hlsl shader entry point and model ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 2 ++ Help/prop_sf/VS_SHADER_ENTRYPOINT.rst | 5 ++++ Help/prop_sf/VS_SHADER_MODEL.rst | 5 ++++ Help/release/3.1.0.rst | 6 +++-- Source/cmVisualStudio10TargetGenerator.cxx | 27 +++++++++++++++++++- Tests/VSWinStorePhone/CMakeLists.txt | 6 +++++ .../Direct3DApp1/SimplePixelShader.hlsl | 2 +- .../Direct3DApp1/SimpleVertexShader.hlsl | 2 +- 8 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 Help/prop_sf/VS_SHADER_ENTRYPOINT.rst create mode 100644 Help/prop_sf/VS_SHADER_MODEL.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:52 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-453-g72c4128 Message-ID: <20141203150153.04E3DA8102@public.kitware.com> This is an automated email from 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 72c4128176e11fbbf05a0d93bd5bda6a4f90e1b5 (commit) via 37d684bd672dcf4b38dfd46d1b90c7d5bb843065 (commit) from b9eac05fb65198f1522ecec756f3fb4ae253e34b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72c4128176e11fbbf05a0d93bd5bda6a4f90e1b5 commit 72c4128176e11fbbf05a0d93bd5bda6a4f90e1b5 Merge: b9eac05 37d684b Author: Brad King AuthorDate: Wed Dec 3 10:01:52 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:52 2014 -0500 Merge topic 'doc-CMAKE_CXX_KNOWN_FEATURES-typo' 37d684bd Help: Fix typo in CMAKE_CXX_KNOWN_FEATURES docs ----------------------------------------------------------------------- Summary of changes: Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:54 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-455-g03b3ee7 Message-ID: <20141203150154.DC6C3A8396@public.kitware.com> This is an automated email from 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 03b3ee7de25acac71fa37c2add32f6d431e82a41 (commit) via 48f78f5f9ed3a7e0717359720ecc157418f55155 (commit) from 72c4128176e11fbbf05a0d93bd5bda6a4f90e1b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=03b3ee7de25acac71fa37c2add32f6d431e82a41 commit 03b3ee7de25acac71fa37c2add32f6d431e82a41 Merge: 72c4128 48f78f5 Author: Brad King AuthorDate: Wed Dec 3 10:01:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:53 2014 -0500 Merge topic 'xcode-target-search-perf' 48f78f5f Xcode: use a map to look up target pointers (#15201) ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 17 +++++++++-------- Source/cmGlobalXCodeGenerator.h | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:57 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-457-geccc5e3 Message-ID: <20141203150157.1445AA8393@public.kitware.com> This is an automated email from 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 eccc5e34cda8f4c784cffe4a255db82f5b20f832 (commit) via 4c07a00f07ce42b6b02da4a9002d5c802637d3bc (commit) from 03b3ee7de25acac71fa37c2add32f6d431e82a41 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eccc5e34cda8f4c784cffe4a255db82f5b20f832 commit eccc5e34cda8f4c784cffe4a255db82f5b20f832 Merge: 03b3ee7 4c07a00 Author: Brad King AuthorDate: Wed Dec 3 10:01:56 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:56 2014 -0500 Merge topic 'CPackIFW-doc-typos' 4c07a00f CPackIFW: Correction of the module documentation ----------------------------------------------------------------------- Summary of changes: Modules/CPackIFW.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:01:59 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:01:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-459-gbeb75b3 Message-ID: <20141203150159.EE4F5A8399@public.kitware.com> This is an automated email from 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 beb75b378f156eed1caa882245278c4aadea6f63 (commit) via 4c8c3ba912fcca9d9154365d0757ce14b3be0670 (commit) from eccc5e34cda8f4c784cffe4a255db82f5b20f832 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=beb75b378f156eed1caa882245278c4aadea6f63 commit beb75b378f156eed1caa882245278c4aadea6f63 Merge: eccc5e3 4c8c3ba Author: Brad King AuthorDate: Wed Dec 3 10:01:58 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:01:58 2014 -0500 Merge topic 'FindPythonInterp-Fix-1.4' 4c8c3ba9 FindPythonInterp: fix version component variables for Python 1.4 (#15275) ----------------------------------------------------------------------- Summary of changes: Modules/FindPythonInterp.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:02:02 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:02:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-461-gcebce13 Message-ID: <20141203150202.3338DA82B2@public.kitware.com> This is an automated email from 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 cebce135c083807ac354e95278a5992f7feee3a2 (commit) via 681cda02bf656c1cc114632d60afc8bd0cac4b09 (commit) from beb75b378f156eed1caa882245278c4aadea6f63 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cebce135c083807ac354e95278a5992f7feee3a2 commit cebce135c083807ac354e95278a5992f7feee3a2 Merge: beb75b3 681cda0 Author: Brad King AuthorDate: Wed Dec 3 10:02:01 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:02:01 2014 -0500 Merge topic 'fix-wince-unicode-entry-point' 681cda02 VS, WINCE: Fix entry point for Unicode builds ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:02:04 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:02:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-463-g9843dfa Message-ID: <20141203150204.4189EA8394@public.kitware.com> This is an automated email from 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 9843dfab4486f76cab567862e504a71d1ecc58a5 (commit) via 7fe6bb0d62ac6a056bbf52cd87b44a49d7b6441d (commit) from cebce135c083807ac354e95278a5992f7feee3a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9843dfab4486f76cab567862e504a71d1ecc58a5 commit 9843dfab4486f76cab567862e504a71d1ecc58a5 Merge: cebce13 7fe6bb0 Author: Brad King AuthorDate: Wed Dec 3 10:02:03 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:02:03 2014 -0500 Merge topic 'binary-linux-64' 7fe6bb0d Utilities/Release: Add build of binary for Linux x86_64 ----------------------------------------------------------------------- Summary of changes: Utilities/Release/create-cmake-release.cmake | 1 + Utilities/Release/linux64_release.cmake | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Utilities/Release/linux64_release.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:02:06 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:02:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-465-gd91feda Message-ID: <20141203150206.6FA41A839C@public.kitware.com> This is an automated email from 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 d91feda4136b8fb9bc3002b38ba8c08fca9cd62c (commit) via b7d760aea20f70b221fcba7ecb2c7edf7751ffc2 (commit) from 9843dfab4486f76cab567862e504a71d1ecc58a5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d91feda4136b8fb9bc3002b38ba8c08fca9cd62c commit d91feda4136b8fb9bc3002b38ba8c08fca9cd62c Merge: 9843dfa b7d760a Author: Brad King AuthorDate: Wed Dec 3 10:02:05 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:02:05 2014 -0500 Merge topic 'icase-source-file-prop' b7d760ae test: test source file properties with case-insensitivity ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 1 + Tests/SourceFileProperty/CMakeLists.txt | 19 +++++++++++++++++++ Tests/SourceFileProperty/ICaseTest.c | 7 +++++++ Tests/SourceFileProperty/main.c | 13 +++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 Tests/SourceFileProperty/CMakeLists.txt create mode 100644 Tests/SourceFileProperty/ICaseTest.c create mode 100644 Tests/SourceFileProperty/main.c hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:02:08 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:02:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-469-gd90e288 Message-ID: <20141203150208.4F986A839F@public.kitware.com> This is an automated email from 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 d90e288b7babf6cd493383e425c9e4d21905fa25 (commit) via 930178283a749c4020265259ea3f828552affba2 (commit) via e6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7 (commit) via 05d6531c7a8ecfad513a0e76b44b273b70fa919b (commit) from d91feda4136b8fb9bc3002b38ba8c08fca9cd62c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d90e288b7babf6cd493383e425c9e4d21905fa25 commit d90e288b7babf6cd493383e425c9e4d21905fa25 Merge: d91feda 9301782 Author: Brad King AuthorDate: Wed Dec 3 10:02:07 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:02:07 2014 -0500 Merge topic 'file-LOCK-command' 93017828 Help: Add notes for topic 'file-LOCK-command' e6db4c5a file: Add LOCK subcommand to do file and directory locking 05d6531c cmSystemTools: Add StringToInt helper ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 30 +++ Help/release/dev/file-LOCK-command.rst | 5 + Source/CMakeLists.txt | 6 + Source/cmFileCommand.cxx | 203 ++++++++++++++++++++ Source/cmFileCommand.h | 1 + Source/cmFileLock.cxx | 78 ++++++++ Source/cmFileLock.h | 74 +++++++ Source/cmFileLockPool.cxx | 198 +++++++++++++++++++ Source/cmFileLockPool.h | 100 ++++++++++ Source/cmFileLockResult.cxx | 111 +++++++++++ Source/cmFileLockResult.h | 85 ++++++++ Source/cmFileLockUnix.cxx | 102 ++++++++++ Source/cmFileLockWin32.cxx | 126 ++++++++++++ Source/cmGlobalGenerator.h | 10 + Source/cmLocalGenerator.cxx | 6 + Source/cmMakefile.cxx | 10 + Source/cmSystemTools.cxx | 8 + Source/cmSystemTools.h | 3 + .../LOCK-error-file-create-fail-result.txt} | 0 .../file/LOCK-error-file-create-fail-stderr.txt | 8 + .../file/LOCK-error-file-create-fail.cmake | 3 + .../LOCK-error-guard-incorrect-result.txt} | 0 .../file/LOCK-error-guard-incorrect-stderr.txt | 6 + .../RunCMake/file/LOCK-error-guard-incorrect.cmake | 1 + .../LOCK-error-incorrect-timeout-result.txt} | 0 .../file/LOCK-error-incorrect-timeout-stderr.txt | 4 + .../LOCK-error-incorrect-timeout-trail-result.txt} | 0 .../LOCK-error-incorrect-timeout-trail-stderr.txt | 4 + .../file/LOCK-error-incorrect-timeout-trail.cmake | 1 + .../file/LOCK-error-incorrect-timeout.cmake | 1 + .../LOCK-error-lock-fail-result.txt} | 0 .../RunCMake/file/LOCK-error-lock-fail-stderr.txt | 6 + Tests/RunCMake/file/LOCK-error-lock-fail.cmake | 6 + .../LOCK-error-negative-timeout-result.txt} | 0 .../file/LOCK-error-negative-timeout-stderr.txt | 4 + .../file/LOCK-error-negative-timeout.cmake | 1 + .../LOCK-error-no-function-result.txt} | 0 .../file/LOCK-error-no-function-stderr.txt | 8 + Tests/RunCMake/file/LOCK-error-no-function.cmake | 1 + .../LOCK-error-no-guard-result.txt} | 0 Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt | 4 + Tests/RunCMake/file/LOCK-error-no-guard.cmake | 1 + .../LOCK-error-no-path-result.txt} | 0 Tests/RunCMake/file/LOCK-error-no-path-stderr.txt | 4 + Tests/RunCMake/file/LOCK-error-no-path.cmake | 1 + .../LOCK-error-no-result-variable-result.txt} | 0 .../file/LOCK-error-no-result-variable-stderr.txt | 4 + .../file/LOCK-error-no-result-variable.cmake | 1 + .../LOCK-error-no-timeout-result.txt} | 0 .../RunCMake/file/LOCK-error-no-timeout-stderr.txt | 4 + Tests/RunCMake/file/LOCK-error-no-timeout.cmake | 1 + .../LOCK-error-timeout-result.txt} | 0 Tests/RunCMake/file/LOCK-error-timeout-stderr.txt | 12 ++ Tests/RunCMake/file/LOCK-error-timeout-stdout.txt | 1 + Tests/RunCMake/file/LOCK-error-timeout.cmake | 17 ++ .../LOCK-error-unknown-option-result.txt} | 0 .../file/LOCK-error-unknown-option-stderr.txt | 6 + .../RunCMake/file/LOCK-error-unknown-option.cmake | 1 + Tests/RunCMake/file/LOCK-stdout.txt | 11 ++ Tests/RunCMake/file/LOCK.cmake | 40 ++++ Tests/RunCMake/file/RunCMakeTest.cmake | 14 ++ .../file/subdir_test_unlock/CMakeLists.txt | 2 + Tests/RunCMake/file/timeout-script.cmake | 5 + 63 files changed, 1339 insertions(+) create mode 100644 Help/release/dev/file-LOCK-command.rst create mode 100644 Source/cmFileLock.cxx create mode 100644 Source/cmFileLock.h create mode 100644 Source/cmFileLockPool.cxx create mode 100644 Source/cmFileLockPool.h create mode 100644 Source/cmFileLockResult.cxx create mode 100644 Source/cmFileLockResult.h create mode 100644 Source/cmFileLockUnix.cxx create mode 100644 Source/cmFileLockWin32.cxx copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-file-create-fail-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-file-create-fail-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-file-create-fail.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-guard-incorrect-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-incorrect-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout-stderr.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-incorrect-timeout-trail-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout-trail.cmake create mode 100644 Tests/RunCMake/file/LOCK-error-incorrect-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-lock-fail-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-lock-fail-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-lock-fail.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-negative-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-negative-timeout-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-negative-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-function-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-function-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-function.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-guard-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-guard-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-guard.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-path-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-path-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-path.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-result-variable-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-result-variable-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-result-variable.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-no-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-no-timeout-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-no-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-timeout-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-timeout-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-timeout-stdout.txt create mode 100644 Tests/RunCMake/file/LOCK-error-timeout.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => file/LOCK-error-unknown-option-result.txt} (100%) create mode 100644 Tests/RunCMake/file/LOCK-error-unknown-option-stderr.txt create mode 100644 Tests/RunCMake/file/LOCK-error-unknown-option.cmake create mode 100644 Tests/RunCMake/file/LOCK-stdout.txt create mode 100644 Tests/RunCMake/file/LOCK.cmake create mode 100644 Tests/RunCMake/file/subdir_test_unlock/CMakeLists.txt create mode 100644 Tests/RunCMake/file/timeout-script.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:02:31 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:02:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1058-gcd6ee04 Message-ID: <20141203150231.EB5C0A839A@public.kitware.com> This is an automated email from 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 cd6ee040e9e2aa4de05b7ce7d12be9f51f204e85 (commit) via d90e288b7babf6cd493383e425c9e4d21905fa25 (commit) via d91feda4136b8fb9bc3002b38ba8c08fca9cd62c (commit) via 9843dfab4486f76cab567862e504a71d1ecc58a5 (commit) via cebce135c083807ac354e95278a5992f7feee3a2 (commit) via beb75b378f156eed1caa882245278c4aadea6f63 (commit) via eccc5e34cda8f4c784cffe4a255db82f5b20f832 (commit) via 03b3ee7de25acac71fa37c2add32f6d431e82a41 (commit) via 72c4128176e11fbbf05a0d93bd5bda6a4f90e1b5 (commit) via b9eac05fb65198f1522ecec756f3fb4ae253e34b (commit) via f773e28a8e6033ca128e1dd223fc2345a97efba5 (commit) via 53fa072e6a63477916f38028c5f5d818c47f6980 (commit) via cf63779f353ce95434f8dc6926b3047217b78f72 (commit) via 0e466f89fdceec50cbc3c21a0d1e0773271b166b (commit) from 3fd185d4c3115ccd87d9117bc89a187a08859c36 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd6ee040e9e2aa4de05b7ce7d12be9f51f204e85 commit cd6ee040e9e2aa4de05b7ce7d12be9f51f204e85 Merge: 3fd185d d90e288 Author: Brad King AuthorDate: Wed Dec 3 10:02:18 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 10:02:18 2014 -0500 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 Dec 3 10:04:13 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:04:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-477-gdc3b222 Message-ID: <20141203150413.0F414A83C8@public.kitware.com> This is an automated email from 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 dc3b222143d16ef0af6e6450f7869ec418b911d7 (commit) via 7c28e7c17205983ef16d72d4ad6f65649355e805 (commit) via 0e7c7bd3df17610795f8fc968370e883b87e50cf (commit) via 6c8d573b2818fe2a1b72708b01fd38b6dbe0aa5e (commit) via 206117af1723a565df4c39feb999b48e8f91f3b3 (commit) via 17e1ead25eeed3fd8f9c2dbeea25698210180a8e (commit) via f3ae286cc09898127aa1d56262678f3e89c30171 (commit) via 8c9ff4f1a6fb801aee0943c3843e52857f2d2eba (commit) from d90e288b7babf6cd493383e425c9e4d21905fa25 (commit) Those revisions listed 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 Dec 3 10:04:13 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:04:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1067-g2ddda7b Message-ID: <20141203150413.30EBDA83CA@public.kitware.com> This is an automated email from 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 2ddda7bae332030814b8f17cef9f4ff41209c8e6 (commit) via dc3b222143d16ef0af6e6450f7869ec418b911d7 (commit) via 7c28e7c17205983ef16d72d4ad6f65649355e805 (commit) via 0e7c7bd3df17610795f8fc968370e883b87e50cf (commit) via 6c8d573b2818fe2a1b72708b01fd38b6dbe0aa5e (commit) via 206117af1723a565df4c39feb999b48e8f91f3b3 (commit) via 17e1ead25eeed3fd8f9c2dbeea25698210180a8e (commit) via f3ae286cc09898127aa1d56262678f3e89c30171 (commit) via 8c9ff4f1a6fb801aee0943c3843e52857f2d2eba (commit) from cd6ee040e9e2aa4de05b7ce7d12be9f51f204e85 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ddda7bae332030814b8f17cef9f4ff41209c8e6 commit 2ddda7bae332030814b8f17cef9f4ff41209c8e6 Merge: cd6ee04 dc3b222 Author: Brad King AuthorDate: Wed Dec 3 10:03:59 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 10:03:59 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:04:13 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:04:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc2-76-g7c28e7c Message-ID: <20141203150413.A04C5A83A3@public.kitware.com> This is an automated email from 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 7c28e7c17205983ef16d72d4ad6f65649355e805 (commit) via 0e7c7bd3df17610795f8fc968370e883b87e50cf (commit) via 6c8d573b2818fe2a1b72708b01fd38b6dbe0aa5e (commit) via 206117af1723a565df4c39feb999b48e8f91f3b3 (commit) via 2a224b4ce3fcc3c25bb3f56cf50806ae79262fc2 (commit) via 37d684bd672dcf4b38dfd46d1b90c7d5bb843065 (commit) via 17e1ead25eeed3fd8f9c2dbeea25698210180a8e (commit) via 681cda02bf656c1cc114632d60afc8bd0cac4b09 (commit) via 4c07a00f07ce42b6b02da4a9002d5c802637d3bc (commit) via 23e2bd7e8cd69eeb6bc607a0b62c764567ac3c5f (commit) via f3ae286cc09898127aa1d56262678f3e89c30171 (commit) via 8c9ff4f1a6fb801aee0943c3843e52857f2d2eba (commit) via 4c8c3ba912fcca9d9154365d0757ce14b3be0670 (commit) via 02e34de2b6c27ee5d367be4fa280ffd3ad1965ba (commit) from b85cd1bd69fcd4320ea05457e8f2254906b102be (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 2 + Help/manual/cmake-toolchains.7.rst | 17 ++++++++ Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst | 2 +- Help/prop_sf/VS_SHADER_ENTRYPOINT.rst | 5 +++ Help/prop_sf/VS_SHADER_MODEL.rst | 5 +++ Help/prop_tgt/ANDROID_GUI.rst | 4 ++ Help/release/3.1.0.rst | 9 ++-- Modules/CPackIFW.cmake | 22 +++++----- Modules/FindOpenGL.cmake | 40 ----------------- Modules/FindPythonInterp.cmake | 4 +- Source/cmVisualStudio10TargetGenerator.cxx | 45 ++++++++++++++++++-- Tests/VSWinStorePhone/CMakeLists.txt | 6 +++ .../Direct3DApp1/SimplePixelShader.hlsl | 2 +- .../Direct3DApp1/SimpleVertexShader.hlsl | 2 +- 14 files changed, 101 insertions(+), 64 deletions(-) create mode 100644 Help/prop_sf/VS_SHADER_ENTRYPOINT.rst create mode 100644 Help/prop_sf/VS_SHADER_MODEL.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 10:08:47 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 10:08:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1069-ga9d6a09 Message-ID: <20141203150847.69136A8492@public.kitware.com> This is an automated email from 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 a9d6a0926705062ac183f8fab1cfa14b900a70b4 (commit) via ff50046b78e23f8d8f23ea8b44dc1012edb0d792 (commit) from 2ddda7bae332030814b8f17cef9f4ff41209c8e6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9d6a0926705062ac183f8fab1cfa14b900a70b4 commit a9d6a0926705062ac183f8fab1cfa14b900a70b4 Merge: 2ddda7b ff50046 Author: Brad King AuthorDate: Wed Dec 3 10:08:46 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 10:08:46 2014 -0500 Merge topic 'FindUnixCommands-use-FPHSA' into next ff50046b FindUnixCommand: Use FPHSA to report status in standard way http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff50046b78e23f8d8f23ea8b44dc1012edb0d792 commit ff50046b78e23f8d8f23ea8b44dc1012edb0d792 Author: Christoph Gr?ninger AuthorDate: Wed Dec 3 14:35:37 2014 +0100 Commit: Brad King CommitDate: Wed Dec 3 10:04:59 2014 -0500 FindUnixCommand: Use FPHSA to report status in standard way Otherwise the UnixCommands were marked as not found in the summary. Also revise the documentation. diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake index d4e5dcd..869ba38 100644 --- a/Modules/FindUnixCommands.cmake +++ b/Modules/FindUnixCommands.cmake @@ -2,12 +2,13 @@ # FindUnixCommands # ---------------- # -# Find unix commands from cygwin +# Find Unix commands, including the ones from Cygwin # -# This module looks for some usual Unix commands. +# This module looks for the Unix commands bash, cp, gzip, mv, rm, and tar +# and stores the result in the variables BASH, CP, GZIP, MV, RM, and TAR. #============================================================================= -# Copyright 2001-2009 Kitware, Inc. +# Copyright 2001-2014 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -95,3 +96,8 @@ find_program(TAR mark_as_advanced( TAR ) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package_handle_standard_args(UnixCommands + REQUIRED_VARS BASH CP GZIP MV RM TAR +) ----------------------------------------------------------------------- Summary of changes: Modules/FindUnixCommands.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Wed Dec 3 11:06:41 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 3 Dec 2014 11:06:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1071-gacbb292 Message-ID: <20141203160641.1CA78A8481@public.kitware.com> This is an automated email from 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 acbb29284941bd549fa9fd713dac9e50ceb6e58c (commit) via 82d7acb3cf014a9760341363a8e652e7a1440d21 (commit) from a9d6a0926705062ac183f8fab1cfa14b900a70b4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acbb29284941bd549fa9fd713dac9e50ceb6e58c commit acbb29284941bd549fa9fd713dac9e50ceb6e58c Merge: a9d6a09 82d7acb Author: Ben Boeckel AuthorDate: Wed Dec 3 11:06:40 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 11:06:40 2014 -0500 Merge topic 'cached-regex-clear-fixed' into next 82d7acb3 fixup! cmMakefile: store the number of last matches in a CMake var http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82d7acb3cf014a9760341363a8e652e7a1440d21 commit 82d7acb3cf014a9760341363a8e652e7a1440d21 Author: Ben Boeckel AuthorDate: Wed Dec 3 11:06:25 2014 -0500 Commit: Ben Boeckel CommitDate: Wed Dec 3 11:06:25 2014 -0500 fixup! cmMakefile: store the number of last matches in a CMake var diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 24e65d7..a7acc27 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4891,7 +4891,7 @@ void cmMakefile::StoreMatches(cmsys::RegularExpression& re) std::string const& var = matchVariables[i]; this->AddDefinition(var, m.c_str()); this->MarkVariableAsUsed(var); - highest = '0' + i; + highest = static_cast('0' + i); } } char nMatches[] = {highest, '\0'}; ----------------------------------------------------------------------- Summary of changes: Source/cmMakefile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Wed Dec 3 11:06:54 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 3 Dec 2014 11:06:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1074-g3b0e433 Message-ID: <20141203160654.2973DA848C@public.kitware.com> This is an automated email from 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 3b0e433bd1f4da2e5c4241e6dc6b8a890f27c092 (commit) via ceecd7902fe80baabfad0235c54719e19a3df06b (commit) via 7878d06189e6ee11646fcad9851d5bc4d19a16e6 (commit) from acbb29284941bd549fa9fd713dac9e50ceb6e58c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b0e433bd1f4da2e5c4241e6dc6b8a890f27c092 commit 3b0e433bd1f4da2e5c4241e6dc6b8a890f27c092 Merge: acbb292 ceecd79 Author: Ben Boeckel AuthorDate: Wed Dec 3 11:06:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 11:06:53 2014 -0500 Merge topic 'cached-regex-clear-fixed' into next ceecd790 cmMakefile: store the number of last matches in a CMake var 7878d061 test: add a test for clearing regex results http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ceecd7902fe80baabfad0235c54719e19a3df06b commit ceecd7902fe80baabfad0235c54719e19a3df06b Author: Ben Boeckel AuthorDate: Mon Dec 1 10:51:49 2014 -0500 Commit: Ben Boeckel CommitDate: Wed Dec 3 11:06:44 2014 -0500 cmMakefile: store the number of last matches in a CMake var With PushScope and PopScope, keeping track of another bit of data for each scope isn't easy. Instead, store it as another CMake variable so it gets implicitly tracked along with everything else. This works in a revert of commit 7d674b5f0b28a610333644d417c2e8cb796cc9e4. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 99088e0..2de4103 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -47,6 +47,7 @@ Variables that Provide Information /variable/CMAKE_LINK_LIBRARY_SUFFIX /variable/CMAKE_MAJOR_VERSION /variable/CMAKE_MAKE_PROGRAM + /variable/CMAKE_MATCH_COUNT /variable/CMAKE_MINIMUM_REQUIRED_VERSION /variable/CMAKE_MINOR_VERSION /variable/CMAKE_PARENT_LIST_FILE diff --git a/Help/release/dev/cached-regex-clear-fixed.rst b/Help/release/dev/cached-regex-clear-fixed.rst new file mode 100644 index 0000000..fbf08cc --- /dev/null +++ b/Help/release/dev/cached-regex-clear-fixed.rst @@ -0,0 +1,5 @@ +cached-regex-clear-fixed +------------------------ + +* Add :variable:`CMAKE_MATCH_COUNT` for the number of matches made in the last + regular expression. diff --git a/Help/variable/CMAKE_MATCH_COUNT.rst b/Help/variable/CMAKE_MATCH_COUNT.rst new file mode 100644 index 0000000..8b1c036 --- /dev/null +++ b/Help/variable/CMAKE_MATCH_COUNT.rst @@ -0,0 +1,8 @@ +CMAKE_MATCH_COUNT +----------------- + +The number of matches with the last regular expression. + +When a regular expression match is used, CMake fills in ``CMAKE_MATCH_`` +variables with the match contents. The ``CMAKE_MATCH_COUNT`` variable holds +the number of match expressions when these are filled. diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 6065b8a..aba26de 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -11,7 +11,6 @@ ============================================================================*/ #include "cmConditionEvaluator.h" -#include "cmStringCommand.h" cmConditionEvaluator::cmConditionEvaluator(cmMakefile& makefile): Makefile(makefile), @@ -556,7 +555,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs, { def = this->GetVariableOrString(*arg); const char* rex = argP2->c_str(); - cmStringCommand::ClearMatches(&this->Makefile); + this->Makefile.ClearMatches(); cmsys::RegularExpression regEntry; if ( !regEntry.compile(rex) ) { @@ -568,7 +567,7 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList &newArgs, } if (regEntry.find(def)) { - cmStringCommand::StoreMatches(&this->Makefile, regEntry); + this->Makefile.StoreMatches(regEntry); *arg = cmExpandedCommandArgument("1", true); } else diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 53fd56f..a7acc27 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4841,6 +4841,64 @@ std::vector cmMakefile::GetQtUiFilesWithOptions() const return this->QtUiFilesWithOptions; } +static std::string const matchVariables[] = { + "CMAKE_MATCH_0", + "CMAKE_MATCH_1", + "CMAKE_MATCH_2", + "CMAKE_MATCH_3", + "CMAKE_MATCH_4", + "CMAKE_MATCH_5", + "CMAKE_MATCH_6", + "CMAKE_MATCH_7", + "CMAKE_MATCH_8", + "CMAKE_MATCH_9" +}; + +static std::string const nMatchesVariable = "CMAKE_MATCH_COUNT"; + +//---------------------------------------------------------------------------- +void cmMakefile::ClearMatches() +{ + const char* nMatchesStr = this->GetDefinition(nMatchesVariable); + if (!nMatchesStr) + { + return; + } + int nMatches = atoi(nMatchesStr); + for (int i=0; i<=nMatches; i++) + { + std::string const& var = matchVariables[i]; + std::string const& s = this->GetSafeDefinition(var); + if(!s.empty()) + { + this->AddDefinition(var, ""); + this->MarkVariableAsUsed(var); + } + } + this->AddDefinition(nMatchesVariable, "0"); + this->MarkVariableAsUsed(nMatchesVariable); +} + +//---------------------------------------------------------------------------- +void cmMakefile::StoreMatches(cmsys::RegularExpression& re) +{ + char highest = 0; + for (int i=0; i<10; i++) + { + std::string const& m = re.match(i); + if(!m.empty()) + { + std::string const& var = matchVariables[i]; + this->AddDefinition(var, m.c_str()); + this->MarkVariableAsUsed(var); + highest = static_cast('0' + i); + } + } + char nMatches[] = {highest, '\0'}; + this->AddDefinition(nMatchesVariable, nMatches); + this->MarkVariableAsUsed(nMatchesVariable); +} + //---------------------------------------------------------------------------- cmPolicies::PolicyStatus cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 05b7a37..fcfec8d 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -976,6 +976,9 @@ public: void PopLoopBlock(); bool IsLoopBlock() const; + void ClearMatches(); + void StoreMatches(cmsys::RegularExpression& re); + protected: // add link libraries and directories to the target void AddGlobalLinkInformation(const std::string& name, cmTarget& target); diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 9827c62..8341027 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -310,7 +310,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -325,7 +325,7 @@ bool cmStringCommand::RegexMatch(std::vector const& args) std::string output; if(re.find(input.c_str())) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l = re.start(); std::string::size_type r = re.end(); if(r-l == 0) @@ -359,7 +359,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -376,7 +376,7 @@ bool cmStringCommand::RegexMatchAll(std::vector const& args) const char* p = input.c_str(); while(re.find(p)) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l = re.start(); std::string::size_type r = re.end(); if(r-l == 0) @@ -463,7 +463,7 @@ bool cmStringCommand::RegexReplace(std::vector const& args) input += args[i]; } - this->ClearMatches(this->Makefile); + this->Makefile->ClearMatches(); // Compile the regular expression. cmsys::RegularExpression re; if(!re.compile(regex.c_str())) @@ -480,7 +480,7 @@ bool cmStringCommand::RegexReplace(std::vector const& args) std::string::size_type base = 0; while(re.find(input.c_str()+base)) { - this->StoreMatches(this->Makefile, re); + this->Makefile->StoreMatches(re); std::string::size_type l2 = re.start(); std::string::size_type r = re.end(); @@ -541,38 +541,6 @@ bool cmStringCommand::RegexReplace(std::vector const& args) } //---------------------------------------------------------------------------- -void cmStringCommand::ClearMatches(cmMakefile* mf) -{ - for (unsigned int i=0; i<10; i++) - { - char name[128]; - sprintf(name, "CMAKE_MATCH_%d", i); - const char* s = mf->GetDefinition(name); - if(s && *s != 0) - { - mf->AddDefinition(name, ""); - mf->MarkVariableAsUsed(name); - } - } -} - -//---------------------------------------------------------------------------- -void cmStringCommand::StoreMatches(cmMakefile* mf,cmsys::RegularExpression& re) -{ - for (unsigned int i=0; i<10; i++) - { - std::string m = re.match(i); - if(m.size() > 0) - { - char name[128]; - sprintf(name, "CMAKE_MATCH_%d", i); - mf->AddDefinition(name, re.match(i).c_str()); - mf->MarkVariableAsUsed(name); - } - } -} - -//---------------------------------------------------------------------------- bool cmStringCommand::HandleFindCommand(std::vector const& args) { diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index a5fe893..9c75095 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -53,8 +53,6 @@ public: virtual std::string GetName() const { return "string";} cmTypeMacro(cmStringCommand, cmCommand); - static void ClearMatches(cmMakefile* mf); - static void StoreMatches(cmMakefile* mf, cmsys::RegularExpression& re); protected: bool HandleConfigureCommand(std::vector const& args); bool HandleAsciiCommand(std::vector const& args); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7878d06189e6ee11646fcad9851d5bc4d19a16e6 commit 7878d06189e6ee11646fcad9851d5bc4d19a16e6 Author: Ben Boeckel AuthorDate: Wed Nov 26 12:46:55 2014 -0500 Commit: Ben Boeckel CommitDate: Wed Dec 3 11:06:44 2014 -0500 test: add a test for clearing regex results diff --git a/Tests/RunCMake/string/RegexClear-stderr.txt b/Tests/RunCMake/string/RegexClear-stderr.txt new file mode 100644 index 0000000..22b0159 --- /dev/null +++ b/Tests/RunCMake/string/RegexClear-stderr.txt @@ -0,0 +1,54 @@ +^Matched string properly +results from: setting up initial state +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched string properly +results from: making a match inside of find_package +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched nothing properly +results from: making a failure inside of find_package +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched nothing properly +results from: checking after find_package +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched nothing properly +results from: clearing out results with a failing match +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched string properly +results from: making a successful match before add_subdirectory +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched string properly +results from: check for success in add_subdirectory +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<-- +Matched nothing properly +results from: failing inside of add_subdirectory +CMAKE_MATCH_0: --><-- +CMAKE_MATCH_1: --><-- +CMAKE_MATCH_2: --><-- +CMAKE_MATCH_COUNT: -->0<-- +Matched string properly +results from: ensuring the subdirectory did not interfere with the parent +CMAKE_MATCH_0: -->01<-- +CMAKE_MATCH_1: -->0<-- +CMAKE_MATCH_2: -->1<-- +CMAKE_MATCH_COUNT: -->2<--$ diff --git a/Tests/RunCMake/string/RegexClear.cmake b/Tests/RunCMake/string/RegexClear.cmake new file mode 100644 index 0000000..d5edaac --- /dev/null +++ b/Tests/RunCMake/string/RegexClear.cmake @@ -0,0 +1,54 @@ +cmake_minimum_required (VERSION 3.0) +project (RegexClear C) + +function (output_results msg) + message("results from: ${msg}") + message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--") + message("CMAKE_MATCH_1: -->${CMAKE_MATCH_1}<--") + message("CMAKE_MATCH_2: -->${CMAKE_MATCH_2}<--") + message("CMAKE_MATCH_COUNT: -->${CMAKE_MATCH_COUNT}<--") +endfunction () + +function (check_for_success msg) + if (CMAKE_MATCH_1 STREQUAL "0" AND + CMAKE_MATCH_2 STREQUAL "1") + message("Matched string properly") + else () + message("Failed to match properly") + endif () + output_results("${msg}") +endfunction () + +function (check_for_failure msg) + if (CMAKE_MATCH_1 STREQUAL "" AND + CMAKE_MATCH_2 STREQUAL "") + message("Matched nothing properly") + else () + message("Found a match where there should be none") + endif () + output_results("${msg}") +endfunction () + +macro (do_regex_success msg) + string(REGEX MATCH "(0)(1)" output "01") + check_for_success("${msg}") +endmacro () + +macro (do_regex_failure msg) + string(REGEX MATCH "(0)(1)" output "12") + check_for_failure("${msg}") +endmacro () + +do_regex_success("setting up initial state") + +list(INSERT CMAKE_MODULE_PATH 0 + "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +find_package(dummy) # Ensure cmMakefile::PushScope/PopScope work. + +check_for_failure("checking after find_package") +do_regex_failure("clearing out results with a failing match") +do_regex_success("making a successful match before add_subdirectory") + +add_subdirectory(subdir) + +check_for_success("ensuring the subdirectory did not interfere with the parent") # Ensure that the subdir didn't mess with this scope. diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake index e83db27..fc913c6 100644 --- a/Tests/RunCMake/string/RunCMakeTest.cmake +++ b/Tests/RunCMake/string/RunCMakeTest.cmake @@ -10,3 +10,5 @@ run_cmake(UuidBadNamespace) run_cmake(UuidMissingNameValue) run_cmake(UuidMissingTypeValue) run_cmake(UuidBadType) + +run_cmake(RegexClear) diff --git a/Tests/RunCMake/string/cmake/Finddummy.cmake b/Tests/RunCMake/string/cmake/Finddummy.cmake new file mode 100644 index 0000000..4cbc1fb --- /dev/null +++ b/Tests/RunCMake/string/cmake/Finddummy.cmake @@ -0,0 +1,4 @@ +check_for_success("making a match inside of find_package") +do_regex_failure("making a failure inside of find_package") + +set(dummy_FOUND 1) diff --git a/Tests/RunCMake/string/subdir/CMakeLists.txt b/Tests/RunCMake/string/subdir/CMakeLists.txt new file mode 100644 index 0000000..5573308 --- /dev/null +++ b/Tests/RunCMake/string/subdir/CMakeLists.txt @@ -0,0 +1,2 @@ +check_for_success("check for success in add_subdirectory") +do_regex_failure("failing inside of add_subdirectory") ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 14:13:32 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 14:13:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1076-gd6a34e7 Message-ID: <20141203191332.30D14A7108@public.kitware.com> This is an automated email from 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 d6a34e781a210d3c9794d62ed53bbd99d3559357 (commit) via 955fbf29c748209c696a59effc39d19099e52095 (commit) from 3b0e433bd1f4da2e5c4241e6dc6b8a890f27c092 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6a34e781a210d3c9794d62ed53bbd99d3559357 commit d6a34e781a210d3c9794d62ed53bbd99d3559357 Merge: 3b0e433 955fbf2 Author: Brad King AuthorDate: Wed Dec 3 14:13:31 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 14:13:31 2014 -0500 Merge topic 'vs-hlsl-typo' into next 955fbf29 VS: Fix typo in VS_SHADER_MODEL lookup comment http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=955fbf29c748209c696a59effc39d19099e52095 commit 955fbf29c748209c696a59effc39d19099e52095 Author: Brad King AuthorDate: Wed Dec 3 14:12:32 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 14:12:32 2014 -0500 VS: Fix typo in VS_SHADER_MODEL lookup comment diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 4fbd8fd..15a9d20 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1221,7 +1221,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) shaderEntryPoint = se; toolHasSettings = true; } - // Figure out which entry point to use if any + // Figure out which shader model to use if any if (const char* sm = sf->GetProperty("VS_SHADER_MODEL")) { shaderModel = sm; ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 3 15:40:45 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 3 Dec 2014 15:40:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1079-gb7f1ba1 Message-ID: <20141203204045.6C8F7A4F30@public.kitware.com> This is an automated email from 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 b7f1ba1691b6b49947eaba55bf506ffc63eafa70 (commit) via 88eb5824da12940e78d57fe254f17f64cdacd659 (commit) via a4f9b6f0ca9248530b9749b7fa9628053a3f8f98 (commit) from d6a34e781a210d3c9794d62ed53bbd99d3559357 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7f1ba1691b6b49947eaba55bf506ffc63eafa70 commit b7f1ba1691b6b49947eaba55bf506ffc63eafa70 Merge: d6a34e7 88eb582 Author: Brad King AuthorDate: Wed Dec 3 15:40:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 3 15:40:43 2014 -0500 Merge topic 'try_compile-link-flags' into next 88eb5824 try_compile: Pass linker flags into test project (#14066) a4f9b6f0 CMakeDetermineCompilerABI: Use normal linker flags in ABI project http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88eb5824da12940e78d57fe254f17f64cdacd659 commit 88eb5824da12940e78d57fe254f17f64cdacd659 Author: Brad King AuthorDate: Wed Dec 3 11:02:31 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 15:30:22 2014 -0500 try_compile: Pass linker flags into test project (#14066) Copy CMAKE_EXE_LINKER_FLAGS into the test project generated by try_compile, just like we already copy CMAKE__FLAGS. Add CMake Policy CMP0056 to activate this behavior in a compatible way, but do not warn by default when the policy is not set since it will affect all try_compile calls. Extend the RunCMake.try_compile test with a case covering this behavior for each policy setting. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 742fd63..96f39e6 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -113,3 +113,4 @@ All Policies /policy/CMP0053 /policy/CMP0054 /policy/CMP0055 + /policy/CMP0056 diff --git a/Help/policy/CMP0056.rst b/Help/policy/CMP0056.rst new file mode 100644 index 0000000..3c75ff4 --- /dev/null +++ b/Help/policy/CMP0056.rst @@ -0,0 +1,32 @@ +CMP0056 +------- + +Honor link flags in :command:`try_compile` source-file signature. + +The :command:`try_compile` command source-file signature generates a +``CMakeLists.txt`` file to build the source file into an executable. +In order to compile the source the same way as it might be compiled +by the calling project, the generated project sets the value of the +:variable:`CMAKE__FLAGS` variable to that in the calling project. +The value of the :variable:`CMAKE_EXE_LINKER_FLAGS` variable may be +needed in some cases too, but CMake 3.1 and lower did not set it in +the generated project. CMake 3.2 and above prefer to set it so that +linker flags are honored as well as compiler flags. This policy +provides compatibility with the pre-3.2 behavior. + +The OLD behavior for this policy is to not set the value of the +:variable:`CMAKE_EXE_LINKER_FLAGS` variable in the generated test +project. The NEW behavior for this policy is to set the value of +the :variable:`CMAKE_EXE_LINKER_FLAGS` variable in the test project +to the same as it is in the calling project. + +If the project code does not set the policy explicitly, users may +set it on the command line by defining the +:variable:`CMAKE_POLICY_DEFAULT_CMP0056 >` +variable in the cache. + +This policy was introduced in CMake version 3.2. Unlike most policies, +CMake version |release| does *not* warn by default when this policy +is not set and simply uses OLD behavior. See documentation of the +:variable:`CMAKE_POLICY_WARNING_CMP0056 >` +variable to control the warning. diff --git a/Help/release/dev/try_compile-link-flags.rst b/Help/release/dev/try_compile-link-flags.rst new file mode 100644 index 0000000..d995e0b --- /dev/null +++ b/Help/release/dev/try_compile-link-flags.rst @@ -0,0 +1,6 @@ +try_compile-link-flags +---------------------- + +* The :command:`try_compile` command source file signature now honors + link flags (e.g. :variable:`CMAKE_EXE_LINKER_FLAGS`) in the generated + test project. See policy :policy:`CMP0056`. diff --git a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst index b563aea..a83c807 100644 --- a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst +++ b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst @@ -9,6 +9,8 @@ warn by default: policy :policy:`CMP0025`. * ``CMAKE_POLICY_WARNING_CMP0047`` controls the warning for policy :policy:`CMP0047`. +* ``CMAKE_POLICY_WARNING_CMP0056`` controls the warning for + policy :policy:`CMP0056`. This variable should not be set by a project in CMake code. Project developers running CMake may set this variable in their cache to diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 3506323..0030b84 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -331,6 +331,40 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv) fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}" " ${COMPILE_DEFINITIONS}\")\n", li->c_str(), li->c_str()); } + switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0056)) + { + case cmPolicies::WARN: + if(this->Makefile->PolicyOptionalWarningEnabled( + "CMAKE_POLICY_WARNING_CMP0056")) + { + cmOStringStream w; + w << (this->Makefile->GetCMakeInstance()->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0056)) << "\n" + "For compatibility with older versions of CMake, try_compile " + "is not honoring caller link flags (e.g. CMAKE_EXE_LINKER_FLAGS) " + "in the test project." + ; + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + } + case cmPolicies::OLD: + // OLD behavior is to do nothing. + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + this->Makefile->GetCMakeInstance()->GetPolicies() + ->GetRequiredPolicyError(cmPolicies::CMP0056) + ); + case cmPolicies::NEW: + // NEW behavior is to pass linker flags. + { + const char* exeLinkFlags = + this->Makefile->GetDefinition("CMAKE_EXE_LINKER_FLAGS"); + fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS %s)\n", + lg->EscapeForCMake(exeLinkFlags?exeLinkFlags:"").c_str()); + } break; + } fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}" " ${EXE_LINKER_FLAGS}\")\n"); fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n"); diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 64b87b7..1a27a25 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -369,6 +369,11 @@ cmPolicies::cmPolicies() CMP0055, "CMP0055", "Strict checking for break() command.", 3,2,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0056, "CMP0056", + "Honor link flags in try_compile() source-file signature.", + 3,2,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 46ecc22..c393c2f 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -112,6 +112,7 @@ public: CMP0054, ///< Only interpret if() arguments as variables /// or keywords when unquoted. CMP0055, ///< Strict checking for break() command. + CMP0056, ///< Honor link flags in try_compile() source-file signature. /** \brief Always the last entry. * diff --git a/Tests/RunCMake/try_compile/CMP0056-stderr.txt b/Tests/RunCMake/try_compile/CMP0056-stderr.txt new file mode 100644 index 0000000..5c1f0e4 --- /dev/null +++ b/Tests/RunCMake/try_compile/CMP0056-stderr.txt @@ -0,0 +1,13 @@ +before try_compile with CMP0056 WARN-default +after try_compile with CMP0056 WARN-default +* +CMake Warning \(dev\) at CMP0056.cmake:[0-9]+ \(try_compile\): + Policy CMP0056 is not set: Honor link flags in try_compile\(\) source-file + signature. Run "cmake --help-policy CMP0056" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + For compatibility with older versions of CMake, try_compile is not honoring + caller link flags \(e.g. CMAKE_EXE_LINKER_FLAGS\) in the test project. +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/try_compile/CMP0056-stdout.txt b/Tests/RunCMake/try_compile/CMP0056-stdout.txt new file mode 100644 index 0000000..89e7c43 --- /dev/null +++ b/Tests/RunCMake/try_compile/CMP0056-stdout.txt @@ -0,0 +1,4 @@ +-- try_compile with CMP0056 WARN-default worked as expected +-- try_compile with CMP0056 WARN-enabled worked as expected +-- try_compile with CMP0056 OLD worked as expected +-- try_compile with CMP0056 NEW worked as expected diff --git a/Tests/RunCMake/try_compile/CMP0056.cmake b/Tests/RunCMake/try_compile/CMP0056.cmake new file mode 100644 index 0000000..e8d3d4a --- /dev/null +++ b/Tests/RunCMake/try_compile/CMP0056.cmake @@ -0,0 +1,67 @@ +enable_language(C) +set(obj "${CMAKE_C_OUTPUT_EXTENSION}") +if(BORLAND) + set(pre -) +endif() +set(CMAKE_EXE_LINKER_FLAGS ${pre}BADFLAG${obj}) + +#----------------------------------------------------------------------------- +message("before try_compile with CMP0056 WARN-default") +try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src.c + OUTPUT_VARIABLE out + ) +string(REPLACE "\n" "\n " out " ${out}") +if(NOT RESULT) + message(FATAL_ERROR "try_compile failed but should have passed:\n${out}") +elseif("x${out}" MATCHES "BADFLAG") + message(FATAL_ERROR "try_compile output mentions BADFLAG:\n${out}") +else() + message(STATUS "try_compile with CMP0056 WARN-default worked as expected") +endif() +message("after try_compile with CMP0056 WARN-default") + +#----------------------------------------------------------------------------- +set(CMAKE_POLICY_WARNING_CMP0056 ON) +try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src.c + OUTPUT_VARIABLE out + ) +string(REPLACE "\n" "\n " out " ${out}") +if(NOT RESULT) + message(FATAL_ERROR "try_compile failed but should have passed:\n${out}") +elseif("x${out}" MATCHES "BADFLAG") + message(FATAL_ERROR "try_compile output mentions BADFLAG:\n${out}") +else() + message(STATUS "try_compile with CMP0056 WARN-enabled worked as expected") +endif() + +#----------------------------------------------------------------------------- +cmake_policy(SET CMP0056 OLD) +try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src.c + OUTPUT_VARIABLE out + ) +string(REPLACE "\n" "\n " out " ${out}") +if(NOT RESULT) + message(FATAL_ERROR "try_compile failed but should have passed:\n${out}") +elseif("x${out}" MATCHES "BADFLAG") + message(FATAL_ERROR "try_compile output mentions BADFLAG:\n${out}") +else() + message(STATUS "try_compile with CMP0056 OLD worked as expected") +endif() + +#----------------------------------------------------------------------------- +cmake_policy(SET CMP0056 NEW) +try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src.c + OUTPUT_VARIABLE out + ) +string(REPLACE "\n" "\n " out " ${out}") +if(RESULT) + message(FATAL_ERROR "try_compile passed but should have failed:\n${out}") +elseif(NOT "x${out}" MATCHES "BADFLAG") + message(FATAL_ERROR "try_compile did not fail with BADFLAG:\n${out}") +else() + message(STATUS "try_compile with CMP0056 NEW worked as expected") +endif() diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index c934458..06096b2 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -15,3 +15,5 @@ run_cmake(BadSources1) run_cmake(BadSources2) run_cmake(NonSourceCopyFile) run_cmake(NonSourceCompileDefinitions) + +run_cmake(CMP0056) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4f9b6f0ca9248530b9749b7fa9628053a3f8f98 commit a4f9b6f0ca9248530b9749b7fa9628053a3f8f98 Author: Brad King AuthorDate: Wed Dec 3 14:52:05 2014 -0500 Commit: Brad King CommitDate: Wed Dec 3 14:53:14 2014 -0500 CMakeDetermineCompilerABI: Use normal linker flags in ABI project When compiling the ABI detection test project, do not override CMAKE_EXE_LINKER_FLAGS completely. The normally selected value of this variable may influence how the link is done and may be needed to be representative of how the calling project will be built. Instead pass a variable that try_compile will reference as additional flags. Leave this behavior of try_compile undocumented for now. diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index 4bc42dd..344ae47 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -26,7 +26,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) set(BIN "${CMAKE_PLATFORM_INFO_DIR}/CMakeDetermineCompilerABI_${lang}.bin") set(CMAKE_FLAGS ) if(DEFINED CMAKE_${lang}_VERBOSE_FLAG) - set(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}") + set(CMAKE_FLAGS "-DEXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}") endif() if(NOT "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xMSVC") # Avoid adding our own platform standard libraries for compilers diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 512f5cf..3506323 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -331,6 +331,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv) fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}" " ${COMPILE_DEFINITIONS}\")\n", li->c_str(), li->c_str()); } + fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}" + " ${EXE_LINKER_FLAGS}\")\n"); fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n"); fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n"); fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n"); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-policies.7.rst | 1 + Help/policy/CMP0056.rst | 32 +++++++++++ Help/release/dev/try_compile-link-flags.rst | 6 +++ Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst | 2 + Modules/CMakeDetermineCompilerABI.cmake | 2 +- Source/cmCoreTryCompile.cxx | 36 +++++++++++++ Source/cmPolicies.cxx | 5 ++ Source/cmPolicies.h | 1 + Tests/RunCMake/try_compile/CMP0056-stderr.txt | 13 +++++ Tests/RunCMake/try_compile/CMP0056-stdout.txt | 4 ++ Tests/RunCMake/try_compile/CMP0056.cmake | 67 ++++++++++++++++++++++++ Tests/RunCMake/try_compile/RunCMakeTest.cmake | 2 + 12 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 Help/policy/CMP0056.rst create mode 100644 Help/release/dev/try_compile-link-flags.rst create mode 100644 Tests/RunCMake/try_compile/CMP0056-stderr.txt create mode 100644 Tests/RunCMake/try_compile/CMP0056-stdout.txt create mode 100644 Tests/RunCMake/try_compile/CMP0056.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 4 00:01:12 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 4 Dec 2014 00:01:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-478-g0f381ad Message-ID: <20141204050112.A34E0A815B@public.kitware.com> This is an automated email from 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 0f381ad5218758aadf92bbd4e5d68347a06cc3ab (commit) from dc3b222143d16ef0af6e6450f7869ec418b911d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f381ad5218758aadf92bbd4e5d68347a06cc3ab commit 0f381ad5218758aadf92bbd4e5d68347a06cc3ab Author: Kitware Robot AuthorDate: Thu Dec 4 00:01:09 2014 -0500 Commit: Kitware Robot CommitDate: Thu Dec 4 00:01:09 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d1a0f20..70d92d2 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 1) -set(CMake_VERSION_PATCH 20141203) +set(CMake_VERSION_PATCH 20141204) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniele.domenichelli at gmail.com Thu Dec 4 05:28:54 2014 From: daniele.domenichelli at gmail.com (Daniele E. Domenichelli) Date: Thu, 4 Dec 2014 05:28:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1082-g72edefc Message-ID: <20141204102854.BE7C7A8122@public.kitware.com> This is an automated email from 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 72edefcf8a04d5ee9404cccd33090dd0d2025005 (commit) via 0bdf24548b2059d9e11520f2de492b4847aefb8f (commit) via 0f381ad5218758aadf92bbd4e5d68347a06cc3ab (commit) from b7f1ba1691b6b49947eaba55bf506ffc63eafa70 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72edefcf8a04d5ee9404cccd33090dd0d2025005 commit 72edefcf8a04d5ee9404cccd33090dd0d2025005 Merge: b7f1ba1 0bdf245 Author: Daniele E. Domenichelli AuthorDate: Thu Dec 4 05:28:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 05:28:53 2014 -0500 Merge topic 'ExternalProject_TEST_EXCLUDE_FROM_MAIN' into next 0bdf2454 ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option 0f381ad5 CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0bdf24548b2059d9e11520f2de492b4847aefb8f commit 0bdf24548b2059d9e11520f2de492b4847aefb8f Author: Daniele E. Domenichelli AuthorDate: Sun Nov 30 22:28:43 2014 +0100 Commit: Daniele E. Domenichelli CommitDate: Thu Dec 4 11:27:19 2014 +0100 ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option If this option is enabled, the test step is created with the EXCLUDE_FROM_MAIN option, and if TEST_BEFORE_INSTALL is enabled, the install step does not depend on the test step. This means that the test step is never executed, unless the test target is explicitly created by calling ExternalProject_Add_StepTarget, or by passing it with the STEP_TARGETS option, or with the EP_STEP_TARGETS directory property. diff --git a/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst b/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst new file mode 100644 index 0000000..dfbf108 --- /dev/null +++ b/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst @@ -0,0 +1,6 @@ +ExternalProject_TEST_EXCLUDE_FROM_MAIN +-------------------------------------- + +* The :module:`ExternalProject` module :command:`ExternalProject_Add` + command learned a ``TEST_EXCLUDE_FROM_MAIN`` option to exclude tests + from the main build. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index e5616b1..7e4cc37 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -149,6 +149,8 @@ Create custom targets to build projects in external trees Add test step executed before install step ``TEST_AFTER_INSTALL 1`` Add test step executed after install step + ``TEST_EXCLUDE_FROM_MAIN 1`` + Main target does not depend on the test step ``TEST_COMMAND ...`` Command to drive test @@ -2193,12 +2195,13 @@ function(_ep_add_test_command name) get_property(before TARGET ${name} PROPERTY _EP_TEST_BEFORE_INSTALL) get_property(after TARGET ${name} PROPERTY _EP_TEST_AFTER_INSTALL) + get_property(exclude TARGET ${name} PROPERTY _EP_TEST_EXCLUDE_FROM_MAIN) get_property(cmd_set TARGET ${name} PROPERTY _EP_TEST_COMMAND SET) # Only actually add the test step if one of the test related properties is # explicitly set. (i.e. the test step is omitted unless requested...) # - if(cmd_set OR before OR after) + if(cmd_set OR before OR after OR exclude) if(cmd_set) get_property(cmd TARGET ${name} PROPERTY _EP_TEST_COMMAND) else() @@ -2206,9 +2209,21 @@ function(_ep_add_test_command name) endif() if(before) - set(dep_args DEPENDEES build DEPENDERS install) + set(dependees_args DEPENDEES build) else() - set(dep_args DEPENDEES install) + set(dependees_args DEPENDEES install) + endif() + + if(exclude) + set(dependers_args "") + set(exclude_args EXCLUDE_FROM_MAIN 1) + else() + if(before) + set(dependers_args DEPENDERS install) + else() + set(dependers_args "") + endif() + set(exclude_args "") endif() get_property(log TARGET ${name} PROPERTY _EP_LOG_TEST) @@ -2221,7 +2236,9 @@ function(_ep_add_test_command name) ExternalProject_Add_Step(${name} test COMMAND ${cmd} WORKING_DIRECTORY ${binary_dir} - ${dep_args} + ${dependees_args} + ${dependers_args} + ${exclude_args} ${log} ) endif() diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt index cbbb555..a71c869 100644 --- a/Tests/ExternalProjectLocal/CMakeLists.txt +++ b/Tests/ExternalProjectLocal/CMakeLists.txt @@ -71,6 +71,31 @@ if(can_build_tutorial_step5) LOG_TEST 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "Local") + + set(proj TutorialStep5-Local-TestExcludeFromMainBefore) + ExternalProject_Add(${proj} + URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" + CMAKE_ARGS -G ${CMAKE_GENERATOR} + CMAKE_CACHE_DEFAULT_ARGS -DUSE_MYMATH:BOOL=OFF + TEST_BEFORE_INSTALL 1 + TEST_EXCLUDE_FROM_MAIN 1 + STEP_TARGETS test + LOG_TEST 1 + ) + set_property(TARGET ${proj} PROPERTY FOLDER "Local") + + set(proj TutorialStep5-Local-TestExcludeFromMainAfter) + ExternalProject_Add(${proj} + URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" + CMAKE_ARGS -G ${CMAKE_GENERATOR} + CMAKE_CACHE_DEFAULT_ARGS -DUSE_MYMATH:BOOL=OFF + TEST_AFTER_INSTALL 1 + TEST_EXCLUDE_FROM_MAIN 1 + STEP_TARGETS test + LOG_TEST 1 + ) + set_property(TARGET ${proj} PROPERTY FOLDER "Local") + endif() ----------------------------------------------------------------------- Summary of changes: .../dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst | 6 +++++ Modules/ExternalProject.cmake | 25 ++++++++++++++++---- Source/CMakeVersion.cmake | 2 +- Tests/ExternalProjectLocal/CMakeLists.txt | 25 ++++++++++++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 09:10:08 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 09:10:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-480-gba98442 Message-ID: <20141204141008.8DCFEA2915@public.kitware.com> This is an automated email from 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 ba98442610024cf50cb407a5cc09f25096a7c79a (commit) via 352f246f3ebfd8daf5fda9bad2db01b56fa4bf4d (commit) from 0f381ad5218758aadf92bbd4e5d68347a06cc3ab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba98442610024cf50cb407a5cc09f25096a7c79a commit ba98442610024cf50cb407a5cc09f25096a7c79a Merge: 0f381ad 352f246 Author: Brad King AuthorDate: Thu Dec 4 09:10:05 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 09:10:05 2014 -0500 Merge topic 'vs-phone-store-deployment-location' 352f246f VS: Add source file property to specify Windows App deployment location ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst | 8 ++++++++ Help/release/3.1.0.rst | 4 ++++ Source/cmVisualStudio10TargetGenerator.cxx | 15 +++++++++++++++ Tests/VSWinStorePhone/CMakeLists.txt | 7 ++++++- .../cmake/Package_vc11.store.appxmanifest.in | 6 +++--- .../cmake/Package_vc12.store.appxmanifest.in | 8 ++++---- .../cmake/Package_vc12.wp.appxmanifest.in | 8 ++++---- 8 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 09:10:32 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 09:10:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1084-g480349b Message-ID: <20141204141032.CF649A4B9F@public.kitware.com> This is an automated email from 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 480349b681ef2154ea3e4784dbabd47149a7bf95 (commit) via ba98442610024cf50cb407a5cc09f25096a7c79a (commit) from 72edefcf8a04d5ee9404cccd33090dd0d2025005 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=480349b681ef2154ea3e4784dbabd47149a7bf95 commit 480349b681ef2154ea3e4784dbabd47149a7bf95 Merge: 72edefc ba98442 Author: Brad King AuthorDate: Thu Dec 4 09:10:17 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 09:10:17 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 09:12:01 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 09:12:01 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-482-g44f9a69 Message-ID: <20141204141201.C3FBCA6646@public.kitware.com> This is an automated email from 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 44f9a69d3402c22526274d38837104b5cb9500c5 (commit) via 1c104c019a23392563befb3564dd5c679cc2c585 (commit) from ba98442610024cf50cb407a5cc09f25096a7c79a (commit) Those revisions listed 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 Thu Dec 4 09:12:01 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 09:12:01 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1087-g5484291 Message-ID: <20141204141201.E52B6A664A@public.kitware.com> This is an automated email from 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 5484291dfcc5cc17c97881711d71b5f1cadfde6a (commit) via 44f9a69d3402c22526274d38837104b5cb9500c5 (commit) via 1c104c019a23392563befb3564dd5c679cc2c585 (commit) from 480349b681ef2154ea3e4784dbabd47149a7bf95 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5484291dfcc5cc17c97881711d71b5f1cadfde6a commit 5484291dfcc5cc17c97881711d71b5f1cadfde6a Merge: 480349b 44f9a69 Author: Brad King AuthorDate: Thu Dec 4 09:11:48 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 09:11:48 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 09:12:02 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 09:12:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc2-78-g1c104c0 Message-ID: <20141204141202.4B634A6672@public.kitware.com> This is an automated email from 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 1c104c019a23392563befb3564dd5c679cc2c585 (commit) via 352f246f3ebfd8daf5fda9bad2db01b56fa4bf4d (commit) from 7c28e7c17205983ef16d72d4ad6f65649355e805 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst | 8 ++++++++ Help/release/3.1.0.rst | 4 ++++ Source/cmVisualStudio10TargetGenerator.cxx | 15 +++++++++++++++ Tests/VSWinStorePhone/CMakeLists.txt | 7 ++++++- .../cmake/Package_vc11.store.appxmanifest.in | 6 +++--- .../cmake/Package_vc12.store.appxmanifest.in | 8 ++++---- .../cmake/Package_vc12.wp.appxmanifest.in | 8 ++++---- 8 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:04:24 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:04:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1089-g466abce Message-ID: <20141204150424.4E45AA82A1@public.kitware.com> This is an automated email from 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 466abce5f276f99678137ea06f6a59fdf26d563c (commit) via 607b39dc1192a9e0f7eae66f9979c399e5126337 (commit) from 5484291dfcc5cc17c97881711d71b5f1cadfde6a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=466abce5f276f99678137ea06f6a59fdf26d563c commit 466abce5f276f99678137ea06f6a59fdf26d563c Merge: 5484291 607b39d Author: Brad King AuthorDate: Thu Dec 4 10:04:22 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:04:22 2014 -0500 Merge topic 'doc-mixed-case-commands' into next 607b39dc Utilities/Sphinx: Fix link targets for mixed-case command names http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=607b39dc1192a9e0f7eae66f9979c399e5126337 commit 607b39dc1192a9e0f7eae66f9979c399e5126337 Author: Brad King AuthorDate: Thu Dec 4 09:59:43 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 10:03:26 2014 -0500 Utilities/Sphinx: Fix link targets for mixed-case command names When a CMake domain 'command' object is defined by CMakeTransform or the 'cmake:command' directive, generate the link target with a lower-case name even if the command name is not all lower-case. This is needed to make cross-references to the command definition work since the 'cmake:command' role is marked with the 'lowercase' property. diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py index e20679a..5c0406d 100644 --- a/Utilities/Sphinx/cmake.py +++ b/Utilities/Sphinx/cmake.py @@ -201,7 +201,11 @@ class CMakeTransform(Transform): if make_index_entry: title = self.parse_title(env.docname) # Insert the object link target. - targetid = '%s:%s' % (objtype, title) + if objtype == 'command': + targetname = title.lower() + else: + targetname = title + targetid = '%s:%s' % (objtype, targetname) targetnode = nodes.target('', '', ids=[targetid]) self.document.note_explicit_target(targetnode) self.document.insert(0, targetnode) @@ -220,7 +224,11 @@ class CMakeObject(ObjectDescription): return sig def add_target_and_index(self, name, sig, signode): - targetid = '%s:%s' % (self.objtype, name) + if self.objtype == 'command': + targetname = name.lower() + else: + targetname = name + targetid = '%s:%s' % (self.objtype, targetname) if targetid not in self.state.document.ids: signode['names'].append(targetid) signode['ids'].append(targetid) ----------------------------------------------------------------------- Summary of changes: Utilities/Sphinx/cmake.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:15:01 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:15:01 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1091-gd08809a Message-ID: <20141204151501.A7F77A7A93@public.kitware.com> This is an automated email from 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 d08809ae30abab134b1eb375124eb08f1c5b1bde (commit) via bf94493bde831b47d9f6afed25d7a5b701607f23 (commit) from 466abce5f276f99678137ea06f6a59fdf26d563c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d08809ae30abab134b1eb375124eb08f1c5b1bde commit d08809ae30abab134b1eb375124eb08f1c5b1bde Merge: 466abce bf94493 Author: Brad King AuthorDate: Thu Dec 4 10:14:58 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:14:58 2014 -0500 Merge topic 'ExternalProject_TEST_EXCLUDE_FROM_MAIN' into next bf94493b Revert "ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option" http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf94493bde831b47d9f6afed25d7a5b701607f23 commit bf94493bde831b47d9f6afed25d7a5b701607f23 Author: Brad King AuthorDate: Thu Dec 4 10:14:36 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 10:14:36 2014 -0500 Revert "ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option" This reverts commit 0bdf24548b2059d9e11520f2de492b4847aefb8f. It will be revised and restored. diff --git a/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst b/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst deleted file mode 100644 index dfbf108..0000000 --- a/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst +++ /dev/null @@ -1,6 +0,0 @@ -ExternalProject_TEST_EXCLUDE_FROM_MAIN --------------------------------------- - -* The :module:`ExternalProject` module :command:`ExternalProject_Add` - command learned a ``TEST_EXCLUDE_FROM_MAIN`` option to exclude tests - from the main build. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 7e4cc37..e5616b1 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -149,8 +149,6 @@ Create custom targets to build projects in external trees Add test step executed before install step ``TEST_AFTER_INSTALL 1`` Add test step executed after install step - ``TEST_EXCLUDE_FROM_MAIN 1`` - Main target does not depend on the test step ``TEST_COMMAND ...`` Command to drive test @@ -2195,13 +2193,12 @@ function(_ep_add_test_command name) get_property(before TARGET ${name} PROPERTY _EP_TEST_BEFORE_INSTALL) get_property(after TARGET ${name} PROPERTY _EP_TEST_AFTER_INSTALL) - get_property(exclude TARGET ${name} PROPERTY _EP_TEST_EXCLUDE_FROM_MAIN) get_property(cmd_set TARGET ${name} PROPERTY _EP_TEST_COMMAND SET) # Only actually add the test step if one of the test related properties is # explicitly set. (i.e. the test step is omitted unless requested...) # - if(cmd_set OR before OR after OR exclude) + if(cmd_set OR before OR after) if(cmd_set) get_property(cmd TARGET ${name} PROPERTY _EP_TEST_COMMAND) else() @@ -2209,21 +2206,9 @@ function(_ep_add_test_command name) endif() if(before) - set(dependees_args DEPENDEES build) + set(dep_args DEPENDEES build DEPENDERS install) else() - set(dependees_args DEPENDEES install) - endif() - - if(exclude) - set(dependers_args "") - set(exclude_args EXCLUDE_FROM_MAIN 1) - else() - if(before) - set(dependers_args DEPENDERS install) - else() - set(dependers_args "") - endif() - set(exclude_args "") + set(dep_args DEPENDEES install) endif() get_property(log TARGET ${name} PROPERTY _EP_LOG_TEST) @@ -2236,9 +2221,7 @@ function(_ep_add_test_command name) ExternalProject_Add_Step(${name} test COMMAND ${cmd} WORKING_DIRECTORY ${binary_dir} - ${dependees_args} - ${dependers_args} - ${exclude_args} + ${dep_args} ${log} ) endif() diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt index a71c869..cbbb555 100644 --- a/Tests/ExternalProjectLocal/CMakeLists.txt +++ b/Tests/ExternalProjectLocal/CMakeLists.txt @@ -71,31 +71,6 @@ if(can_build_tutorial_step5) LOG_TEST 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "Local") - - set(proj TutorialStep5-Local-TestExcludeFromMainBefore) - ExternalProject_Add(${proj} - URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" - CMAKE_ARGS -G ${CMAKE_GENERATOR} - CMAKE_CACHE_DEFAULT_ARGS -DUSE_MYMATH:BOOL=OFF - TEST_BEFORE_INSTALL 1 - TEST_EXCLUDE_FROM_MAIN 1 - STEP_TARGETS test - LOG_TEST 1 - ) - set_property(TARGET ${proj} PROPERTY FOLDER "Local") - - set(proj TutorialStep5-Local-TestExcludeFromMainAfter) - ExternalProject_Add(${proj} - URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" - CMAKE_ARGS -G ${CMAKE_GENERATOR} - CMAKE_CACHE_DEFAULT_ARGS -DUSE_MYMATH:BOOL=OFF - TEST_AFTER_INSTALL 1 - TEST_EXCLUDE_FROM_MAIN 1 - STEP_TARGETS test - LOG_TEST 1 - ) - set_property(TARGET ${proj} PROPERTY FOLDER "Local") - endif() ----------------------------------------------------------------------- Summary of changes: .../dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst | 6 ----- Modules/ExternalProject.cmake | 25 ++++---------------- Tests/ExternalProjectLocal/CMakeLists.txt | 25 -------------------- 3 files changed, 4 insertions(+), 52 deletions(-) delete mode 100644 Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:15:11 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:15:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-484-g13fc2ed Message-ID: <20141204151511.C6843A7AB5@public.kitware.com> This is an automated email from 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 13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa (commit) via 607b39dc1192a9e0f7eae66f9979c399e5126337 (commit) from 44f9a69d3402c22526274d38837104b5cb9500c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa commit 13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa Merge: 44f9a69 607b39d Author: Brad King AuthorDate: Thu Dec 4 10:15:10 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:15:10 2014 -0500 Merge topic 'doc-mixed-case-commands' 607b39dc Utilities/Sphinx: Fix link targets for mixed-case command names ----------------------------------------------------------------------- Summary of changes: Utilities/Sphinx/cmake.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:15:33 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:15:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1093-g2928ab1 Message-ID: <20141204151533.A0969A7B87@public.kitware.com> This is an automated email from 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 2928ab107e096ade189d410433311bab7298740b (commit) via 13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa (commit) from d08809ae30abab134b1eb375124eb08f1c5b1bde (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2928ab107e096ade189d410433311bab7298740b commit 2928ab107e096ade189d410433311bab7298740b Merge: d08809a 13fc2ed Author: Brad King AuthorDate: Thu Dec 4 10:15:26 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 10:15:26 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:23:23 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:23:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-486-g09f797c Message-ID: <20141204152323.10779A81C6@public.kitware.com> This is an automated email from 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 09f797c19ccf8fb5e4241008e9845ba9ab7200bf (commit) via 955fbf29c748209c696a59effc39d19099e52095 (commit) from 13fc2ed4c47962734ef0bf4bfb093ab52d20d8fa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09f797c19ccf8fb5e4241008e9845ba9ab7200bf commit 09f797c19ccf8fb5e4241008e9845ba9ab7200bf Merge: 13fc2ed 955fbf2 Author: Brad King AuthorDate: Thu Dec 4 10:23:21 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:23:21 2014 -0500 Merge topic 'vs-hlsl-typo' 955fbf29 VS: Fix typo in VS_SHADER_MODEL lookup comment ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:23:25 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:23:25 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-488-ge466517 Message-ID: <20141204152325.2DD0FA7BD6@public.kitware.com> This is an automated email from 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 e4665171f45f6f06bb75f677a29d65015a4f5d0d (commit) via bd360ee329e74487dba526d7847794bc66b55494 (commit) from 09f797c19ccf8fb5e4241008e9845ba9ab7200bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4665171f45f6f06bb75f677a29d65015a4f5d0d commit e4665171f45f6f06bb75f677a29d65015a4f5d0d Merge: 09f797c bd360ee Author: Brad King AuthorDate: Thu Dec 4 10:23:24 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:23:24 2014 -0500 Merge topic 'fix-add_library-check-for-shared' bd360ee3 add_library: Fix target type check for non-shared-lib platforms ----------------------------------------------------------------------- Summary of changes: Source/cmAddLibraryCommand.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:23:27 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:23:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-491-gc7bd275 Message-ID: <20141204152327.DB2A3A823B@public.kitware.com> This is an automated email from 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 c7bd2753932d1f2bec0b66c042b999a95d5bb713 (commit) via ceecd7902fe80baabfad0235c54719e19a3df06b (commit) via 7878d06189e6ee11646fcad9851d5bc4d19a16e6 (commit) from e4665171f45f6f06bb75f677a29d65015a4f5d0d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7bd2753932d1f2bec0b66c042b999a95d5bb713 commit c7bd2753932d1f2bec0b66c042b999a95d5bb713 Merge: e466517 ceecd79 Author: Brad King AuthorDate: Thu Dec 4 10:23:26 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:23:26 2014 -0500 Merge topic 'cached-regex-clear-fixed' ceecd790 cmMakefile: store the number of last matches in a CMake var 7878d061 test: add a test for clearing regex results ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/cached-regex-clear-fixed.rst | 5 +++ Help/variable/CMAKE_MATCH_COUNT.rst | 8 ++++ Source/cmConditionEvaluator.cxx | 5 +-- Source/cmMakefile.cxx | 58 +++++++++++++++++++++++++ Source/cmMakefile.h | 3 ++ Source/cmStringCommand.cxx | 44 +++---------------- Source/cmStringCommand.h | 2 - Tests/RunCMake/string/RegexClear-stderr.txt | 54 +++++++++++++++++++++++ Tests/RunCMake/string/RegexClear.cmake | 54 +++++++++++++++++++++++ Tests/RunCMake/string/RunCMakeTest.cmake | 2 + Tests/RunCMake/string/cmake/Finddummy.cmake | 4 ++ Tests/RunCMake/string/subdir/CMakeLists.txt | 2 + 13 files changed, 199 insertions(+), 43 deletions(-) create mode 100644 Help/release/dev/cached-regex-clear-fixed.rst create mode 100644 Help/variable/CMAKE_MATCH_COUNT.rst create mode 100644 Tests/RunCMake/string/RegexClear-stderr.txt create mode 100644 Tests/RunCMake/string/RegexClear.cmake create mode 100644 Tests/RunCMake/string/cmake/Finddummy.cmake create mode 100644 Tests/RunCMake/string/subdir/CMakeLists.txt hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:23:30 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:23:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-493-g470c549 Message-ID: <20141204152330.3195BA825B@public.kitware.com> This is an automated email from 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 470c549c622ddddd0be3ae63945e40a1cad85923 (commit) via ff50046b78e23f8d8f23ea8b44dc1012edb0d792 (commit) from c7bd2753932d1f2bec0b66c042b999a95d5bb713 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=470c549c622ddddd0be3ae63945e40a1cad85923 commit 470c549c622ddddd0be3ae63945e40a1cad85923 Merge: c7bd275 ff50046 Author: Brad King AuthorDate: Thu Dec 4 10:23:28 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:23:28 2014 -0500 Merge topic 'FindUnixCommands-use-FPHSA' ff50046b FindUnixCommand: Use FPHSA to report status in standard way ----------------------------------------------------------------------- Summary of changes: Modules/FindUnixCommands.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:23:43 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:23:43 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1098-gd91dc12 Message-ID: <20141204152343.303A6A825B@public.kitware.com> This is an automated email from 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 d91dc129c690510c32b10bbcb8efe17ebed72455 (commit) via 470c549c622ddddd0be3ae63945e40a1cad85923 (commit) via c7bd2753932d1f2bec0b66c042b999a95d5bb713 (commit) via e4665171f45f6f06bb75f677a29d65015a4f5d0d (commit) via 09f797c19ccf8fb5e4241008e9845ba9ab7200bf (commit) from 2928ab107e096ade189d410433311bab7298740b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d91dc129c690510c32b10bbcb8efe17ebed72455 commit d91dc129c690510c32b10bbcb8efe17ebed72455 Merge: 2928ab1 470c549 Author: Brad King AuthorDate: Thu Dec 4 10:23:34 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 10:23:34 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 10:51:55 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 10:51:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1100-g264d655 Message-ID: <20141204155155.BBB22A7DAC@public.kitware.com> This is an automated email from 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 264d65529e0487d0af19fad578a92a28d18e770b (commit) via 27141eede739fb4376a6fe2cec1b1171841bf7fb (commit) from d91dc129c690510c32b10bbcb8efe17ebed72455 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=264d65529e0487d0af19fad578a92a28d18e770b commit 264d65529e0487d0af19fad578a92a28d18e770b Merge: d91dc12 27141ee Author: Brad King AuthorDate: Thu Dec 4 10:51:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 10:51:54 2014 -0500 Merge topic 'xerces-rename' into next 27141eed Modules: Rename FindXerces to FindXercesC http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27141eede739fb4376a6fe2cec1b1171841bf7fb commit 27141eede739fb4376a6fe2cec1b1171841bf7fb Author: Brad King AuthorDate: Thu Dec 4 10:36:21 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 10:41:26 2014 -0500 Modules: Rename FindXerces to FindXercesC The FindXerces module was added in commit v3.1.0-rc1~155^2 (FindXerces: New module to find Apache Xerces-C++, 2014-08-17). However, there are two implementations of Xerces, one in C++: http://xerces.apache.org/xerces-c/ and one in Java: http://xerces.apache.org/xerces-j/ Rename FindXerces to FindXercesC to clarify that it is about the C++ implementation. While at it, add the missing CMake 3.1 release note about this module. Suggested-by: Erik Sj?lund diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index f5a35b3..201c95f 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -208,7 +208,7 @@ All Modules /module/FindWish /module/FindwxWidgets /module/FindwxWindows - /module/FindXerces + /module/FindXercesC /module/FindX11 /module/FindXMLRPC /module/FindZLIB diff --git a/Help/module/FindXerces.rst b/Help/module/FindXerces.rst deleted file mode 100644 index 166d8dd..0000000 --- a/Help/module/FindXerces.rst +++ /dev/null @@ -1 +0,0 @@ -.. cmake-module:: ../../Modules/FindXerces.cmake diff --git a/Help/module/FindXercesC.rst b/Help/module/FindXercesC.rst new file mode 100644 index 0000000..4818071 --- /dev/null +++ b/Help/module/FindXercesC.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/FindXercesC.cmake diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index 65aae00..0cece37 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -238,6 +238,8 @@ Modules * The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG`` environment variable value as the ``pkg-config`` executable, if set. +* The :module:`FindXercesC` module was introduced. + * The :module:`FindZLIB` module now provides imported targets. * The :module:`GenerateExportHeader` module ``generate_export_header`` diff --git a/Modules/FindXerces.cmake b/Modules/FindXercesC.cmake similarity index 55% rename from Modules/FindXerces.cmake rename to Modules/FindXercesC.cmake index 6c6007a..5a8ea9d 100644 --- a/Modules/FindXerces.cmake +++ b/Modules/FindXercesC.cmake @@ -1,21 +1,21 @@ #.rst: -# FindXerces -# ---------- +# FindXercesC +# ----------- # # Find the Apache Xerces-C++ validating XML parser headers and libraries. # # This module reports information about the Xerces installation in # several variables. General variables:: # -# Xerces_FOUND - true if the Xerces headers and libraries were found -# Xerces_VERSION - Xerces release version -# Xerces_INCLUDE_DIRS - the directory containing the Xerces headers -# Xerces_LIBRARIES - Xerces libraries to be linked +# XercesC_FOUND - true if the Xerces headers and libraries were found +# XercesC_VERSION - Xerces release version +# XercesC_INCLUDE_DIRS - the directory containing the Xerces headers +# XercesC_LIBRARIES - Xerces libraries to be linked # # The following cache variables may also be set:: # -# Xerces_INCLUDE_DIR - the directory containing the Xerces headers -# Xerces_LIBRARY - the Xerces library +# XercesC_INCLUDE_DIR - the directory containing the Xerces headers +# XercesC_LIBRARY - the Xerces library # Written by Roger Leigh @@ -32,54 +32,54 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -function(_Xerces_GET_VERSION version_hdr) +function(_XercesC_GET_VERSION version_hdr) file(STRINGS ${version_hdr} _contents REGEX "^[ \t]*#define XERCES_VERSION_.*") if(_contents) - string(REGEX REPLACE ".*#define XERCES_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" Xerces_MAJOR "${_contents}") - string(REGEX REPLACE ".*#define XERCES_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" Xerces_MINOR "${_contents}") - string(REGEX REPLACE ".*#define XERCES_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" Xerces_PATCH "${_contents}") + string(REGEX REPLACE ".*#define XERCES_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" XercesC_MAJOR "${_contents}") + string(REGEX REPLACE ".*#define XERCES_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" XercesC_MINOR "${_contents}") + string(REGEX REPLACE ".*#define XERCES_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" XercesC_PATCH "${_contents}") - if(NOT Xerces_MAJOR MATCHES "^[0-9]+$") + if(NOT XercesC_MAJOR MATCHES "^[0-9]+$") message(FATAL_ERROR "Version parsing failed for XERCES_VERSION_MAJOR!") endif() - if(NOT Xerces_MINOR MATCHES "^[0-9]+$") + if(NOT XercesC_MINOR MATCHES "^[0-9]+$") message(FATAL_ERROR "Version parsing failed for XERCES_VERSION_MINOR!") endif() - if(NOT Xerces_PATCH MATCHES "^[0-9]+$") + if(NOT XercesC_PATCH MATCHES "^[0-9]+$") message(FATAL_ERROR "Version parsing failed for XERCES_VERSION_REVISION!") endif() - set(Xerces_VERSION "${Xerces_MAJOR}.${Xerces_MINOR}.${Xerces_PATCH}" PARENT_SCOPE) + set(XercesC_VERSION "${XercesC_MAJOR}.${XercesC_MINOR}.${XercesC_PATCH}" PARENT_SCOPE) else() message(FATAL_ERROR "Include file ${version_hdr} does not exist or does not contain expected version information") endif() endfunction() # Find include directory -find_path(Xerces_INCLUDE_DIR +find_path(XercesC_INCLUDE_DIR NAMES "xercesc/util/PlatformUtils.hpp" DOC "Xerces-C++ include directory") -mark_as_advanced(Xerces_INCLUDE_DIR) +mark_as_advanced(XercesC_INCLUDE_DIR) -# Find all Xerces libraries -find_library(Xerces_LIBRARY "xerces-c" +# Find all XercesC libraries +find_library(XercesC_LIBRARY "xerces-c" DOC "Xerces-C++ libraries") -mark_as_advanced(Xerces_LIBRARY) +mark_as_advanced(XercesC_LIBRARY) -if(Xerces_INCLUDE_DIR) - _Xerces_GET_VERSION("${Xerces_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") +if(XercesC_INCLUDE_DIR) + _XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xerces - FOUND_VAR Xerces_FOUND - REQUIRED_VARS Xerces_LIBRARY - Xerces_INCLUDE_DIR - Xerces_VERSION - VERSION_VAR Xerces_VERSION - FAIL_MESSAGE "Failed to find Xerces") +FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC + FOUND_VAR XercesC_FOUND + REQUIRED_VARS XercesC_LIBRARY + XercesC_INCLUDE_DIR + XercesC_VERSION + VERSION_VAR XercesC_VERSION + FAIL_MESSAGE "Failed to find XercesC") -if(Xerces_FOUND) - set(Xerces_INCLUDE_DIRS "${Xerces_INCLUDE_DIR}") - set(Xerces_LIBRARIES "${Xerces_LIBRARY}") +if(XercesC_FOUND) + set(XercesC_INCLUDE_DIRS "${XercesC_INCLUDE_DIR}") + set(XercesC_LIBRARIES "${XercesC_LIBRARY}") endif() ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 2 +- Help/module/FindXerces.rst | 1 - Help/module/FindXercesC.rst | 1 + Help/release/3.1.0.rst | 2 + Modules/{FindXerces.cmake => FindXercesC.cmake} | 66 +++++++++++------------ 5 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 Help/module/FindXerces.rst create mode 100644 Help/module/FindXercesC.rst rename Modules/{FindXerces.cmake => FindXercesC.cmake} (55%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 4 15:41:35 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 4 Dec 2014 15:41:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1102-gcdcb218 Message-ID: <20141204204135.8E5C2A255A@public.kitware.com> This is an automated email from 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 cdcb21844397efd56862fd4fad67f4b4d8045f6b (commit) via f545eb0b0b00cb02f540636549f63189f43b4870 (commit) from 264d65529e0487d0af19fad578a92a28d18e770b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cdcb21844397efd56862fd4fad67f4b4d8045f6b commit cdcb21844397efd56862fd4fad67f4b4d8045f6b Merge: 264d655 f545eb0 Author: Brad King AuthorDate: Thu Dec 4 15:41:33 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 15:41:33 2014 -0500 Merge topic 'vs-inherit-wd' into next f545eb0b VS: Inherit target-level "-wd" flags in source files (#15284) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f545eb0b0b00cb02f540636549f63189f43b4870 commit f545eb0b0b00cb02f540636549f63189f43b4870 Author: Brad King AuthorDate: Thu Dec 4 15:32:32 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 15:40:04 2014 -0500 VS: Inherit target-level "-wd" flags in source files (#15284) If a source file COMPILE_FLAGS option adds "-wd", the .vcxproj file will have a DisableSpecificWarnings setting for the source file. Add to the setting a reference to %(DisableSpecificWarnings) to inherit any such flags set for the whole target. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 68b6576..f903bdb 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1637,6 +1637,11 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( clOptions.AppendFlag("AdditionalIncludeDirectories", "%(AdditionalIncludeDirectories)"); } + if(clOptions.HasFlag("DisableSpecificWarnings")) + { + clOptions.AppendFlag("DisableSpecificWarnings", + "%(DisableSpecificWarnings)"); + } clOptions.AddDefines(configDefines.c_str()); clOptions.SetConfiguration((*config).c_str()); clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 5 +++++ 1 file changed, 5 insertions(+) hooks/post-receive -- CMake From steveire at gmail.com Thu Dec 4 17:58:16 2014 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 4 Dec 2014 17:58:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1109-gda1ba8e Message-ID: <20141204225816.0C248A7B58@public.kitware.com> This is an automated email from 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 da1ba8eb418d6f08b2d21892ee83a82626da4663 (commit) via e4d4289fad046ad1cab28f6abb144f609c112157 (commit) via 656167c3e0eb06ee69b2e6ffbba82bf0f385618e (commit) via f0d0d761b2150e41397af8cfce2b846107cf8921 (commit) via 31452416ba1be692b55ed09f8cf39fa2914ad349 (commit) via b96b025b2a337d7b09157f8b24cf9ca77a825863 (commit) via 169f116632321e99701986f48a19e836d2b9e710 (commit) from cdcb21844397efd56862fd4fad67f4b4d8045f6b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da1ba8eb418d6f08b2d21892ee83a82626da4663 commit da1ba8eb418d6f08b2d21892ee83a82626da4663 Merge: cdcb218 e4d4289 Author: Stephen Kelly AuthorDate: Thu Dec 4 17:58:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 17:58:14 2014 -0500 Merge topic 'Find-Modules-documentation' into next e4d4289f Help: Document that IMPORTED targets in Find modules may be UNKNOWN. 656167c3 Help: Document IMPORTED_CONFIGURATIONS target property for Find modules. f0d0d761 Help: Remove recommendation about checking minimum CMake version. 31452416 Help: Add useful links to IMPORTED targets and usage requirements. b96b025b Help: Remove disadvantage creating IMPORTED targets in Find modules. 169f1166 Help: Link to cmake-packages(7) from the Module creation documentation. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4d4289fad046ad1cab28f6abb144f609c112157 commit e4d4289fad046ad1cab28f6abb144f609c112157 Author: Stephen Kelly AuthorDate: Thu Dec 4 23:56:52 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 4 23:57:12 2014 +0100 Help: Document that IMPORTED targets in Find modules may be UNKNOWN. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 85a3c2d..8c61dfd 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -1052,6 +1052,11 @@ not any of its dependencies. Instead, those dependencies should also be targets, and CMake should be told that they are dependencies of this target. CMake will then combine all the necessary information automatically. +The type of the :prop_tgt:`IMPORTED` target created in the +:command:`add_library` command can always be specified as ``UNKNOWN`` +type. This simplifies the code in cases where static or shared variants may +be found, and CMake will determine the type by inspecting the files. + If the library is available with multiple configurations, the :prop_tgt:`IMPORTED_CONFIGURATIONS` target property should also be populated: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=656167c3e0eb06ee69b2e6ffbba82bf0f385618e commit 656167c3e0eb06ee69b2e6ffbba82bf0f385618e Author: Stephen Kelly AuthorDate: Thu Dec 4 23:56:21 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 4 23:56:40 2014 +0100 Help: Document IMPORTED_CONFIGURATIONS target property for Find modules. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 94fc019..85a3c2d 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -876,7 +876,10 @@ To prevent users being overwhelmed with settings to configure, try to keep as many options as possible out of the cache, leaving at least one option which can be used to disable use of the module, or locate a not-found library (e.g. ``Xxx_ROOT_DIR``). For the same reason, mark -most cache options as advanced. +most cache options as advanced. For packages which provide both debug +and release binaries, it is common to create cache variables with a +``_LIBRARY_`` suffix, such as ``Foo_LIBRARY_RELEASE`` and +``Foo_LIBRARY_DEBUG``. While these are the standard variable names, you should provide backwards compatibility for any old names that were actually in use. @@ -1049,6 +1052,42 @@ not any of its dependencies. Instead, those dependencies should also be targets, and CMake should be told that they are dependencies of this target. CMake will then combine all the necessary information automatically. +If the library is available with multiple configurations, the +:prop_tgt:`IMPORTED_CONFIGURATIONS` target property should also be +populated: + +.. code-block:: cmake + + if(Foo_FOUND) + if (NOT TARGET Foo::Foo) + add_library(Foo::Foo UNKNOWN IMPORTED) + endif() + if (Foo_LIBRARY_RELEASE) + set_property(TARGET Foo::Foo APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE + ) + set_target_properties(Foo::Foo PROPERTIES + IMPORTED_LOCATION "${Foo_LIBRARY_RELEASE}" + ) + endif() + if (Foo_LIBRARY_DEBUG) + set_property(TARGET Foo::Foo APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG + ) + set_target_properties(Foo::Foo PROPERTIES + IMPORTED_LOCATION "${Foo_LIBRARY_DEBUG}" + ) + endif() + set_target_properties(Foo::Foo PROPERTIES + INTERFACE_COMPILE_OPTIONS "${PC_Foo_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${Foo_INCLUDE_DIR}" + ) + endif() + +The ``RELEASE`` variant should be listed first in the property +so that that variant is chosen if the user uses a configuration which is +not an exact match for any listed ``IMPORTED_CONFIGURATIONS``. + We should also provide some information about the package, such as where to download it. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0d0d761b2150e41397af8cfce2b846107cf8921 commit f0d0d761b2150e41397af8cfce2b846107cf8921 Author: Stephen Kelly AuthorDate: Thu Dec 4 23:55:15 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 4 23:55:15 2014 +0100 Help: Remove recommendation about checking minimum CMake version. If this file is being executed, the user has the CMake version providing it. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index d928097..94fc019 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -943,16 +943,6 @@ licence notice block # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -If the module is new to CMake, you may want to provide a warning for -projects that do not require a high enough CMake version. - -.. code-block:: cmake - - if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.0.0) - message(AUTHOR_WARNING - "Your project should require at least CMake 3.0.0 to use FindFoo.cmake") - endif() - Now the actual libraries and so on have to be found. The code here will obviously vary from module to module (dealing with that, after all, is the point of find modules), but there tends to be a common pattern for libraries. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31452416ba1be692b55ed09f8cf39fa2914ad349 commit 31452416ba1be692b55ed09f8cf39fa2914ad349 Author: Stephen Kelly AuthorDate: Thu Dec 4 23:30:20 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 4 23:33:50 2014 +0100 Help: Add useful links to IMPORTED targets and usage requirements. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index f054d83..d928097 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -730,10 +730,9 @@ below. This is what most of the existing find modules provided by CMake do. The more modern approach is to behave as much like -``Config.cmake`` files as possible, by providing imported -targets. As well as matching how ``*Config.cmake`` files work, the -libraries, include directories and compile definitions are all set just -by using the target in a :command:`target_link_libraries` call. +:ref:`config file packages ` files as possible, by +providing :ref:`imported target `. This has the advantage +of propagating :ref:`Target Usage Requirements` to consumers. In either case (or even when providing both variables and imported targets), find modules should provide backwards compatibility with old http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b96b025b2a337d7b09157f8b24cf9ca77a825863 commit b96b025b2a337d7b09157f8b24cf9ca77a825863 Author: Stephen Kelly AuthorDate: Thu Dec 4 23:25:56 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 4 23:32:52 2014 +0100 Help: Remove disadvantage creating IMPORTED targets in Find modules. An IMPORTED target in either type of package can equally depend on an IMPORTED target in a Find module, which must be found as a dependency, which is presumably the problem being implied. This is not a distinction of creating an IMPORTED target in a Find module. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index c7bafc0..f054d83 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -733,10 +733,7 @@ The more modern approach is to behave as much like ``Config.cmake`` files as possible, by providing imported targets. As well as matching how ``*Config.cmake`` files work, the libraries, include directories and compile definitions are all set just -by using the target in a :command:`target_link_libraries` call. The -disadvantage is that ``*Config.cmake`` files of projects that use -imported targets from find modules may require more work to make sure -those imported targets that are in the link interface are available. +by using the target in a :command:`target_link_libraries` call. In either case (or even when providing both variables and imported targets), find modules should provide backwards compatibility with old http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=169f116632321e99701986f48a19e836d2b9e710 commit 169f116632321e99701986f48a19e836d2b9e710 Author: Stephen Kelly AuthorDate: Thu Dec 4 23:19:45 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 4 23:31:59 2014 +0100 Help: Link to cmake-packages(7) from the Module creation documentation. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 672c9b7..c7bafc0 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -720,7 +720,9 @@ by the :command:`find_package` command when invoked for ````. The primary task of a find module is to determine whether a package exists on the system, set the ``_FOUND`` variable to reflect this and provide any variables, macros and imported targets required to -use the package. +use the package. A find module is useful in cases where an upstream +library does not provide a +:ref:`config file package `. The traditional approach is to use variables for everything, including libraries and executables: see the `Standard Variable Names`_ section diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst index 0d18fd7..fba1d61 100644 --- a/Help/manual/cmake-packages.7.rst +++ b/Help/manual/cmake-packages.7.rst @@ -76,6 +76,8 @@ By setting the :variable:`CMAKE_DISABLE_FIND_PACKAGE_` variable to ``TRUE``, the ``PackageName`` package will not be searched, and will always be ``NOTFOUND``. +.. _`Config File Packages`: + Config-file Packages -------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-developer.7.rst | 70 +++++++++++++++++++++++++++---------- Help/manual/cmake-packages.7.rst | 2 ++ 2 files changed, 53 insertions(+), 19 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Dec 4 18:12:26 2014 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 4 Dec 2014 18:12:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1111-g3bce2ae Message-ID: <20141204231226.C73989FDB2@public.kitware.com> This is an automated email from 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 3bce2ae4240a701c7e05cd05514d0ae9443ce778 (commit) via 4d674587b102aa008d08ae8575fb42d2963b9ddb (commit) from da1ba8eb418d6f08b2d21892ee83a82626da4663 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3bce2ae4240a701c7e05cd05514d0ae9443ce778 commit 3bce2ae4240a701c7e05cd05514d0ae9443ce778 Merge: da1ba8e 4d67458 Author: Stephen Kelly AuthorDate: Thu Dec 4 18:12:26 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 18:12:26 2014 -0500 Merge topic 'Find-Modules-documentation' into next 4d674587 Fix LOCATIONS. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d674587b102aa008d08ae8575fb42d2963b9ddb commit 4d674587b102aa008d08ae8575fb42d2963b9ddb Author: Stephen Kelly AuthorDate: Fri Dec 5 00:11:53 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 5 00:11:53 2014 +0100 Fix LOCATIONS. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 8c61dfd..3b9b921 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -1072,7 +1072,7 @@ populated: IMPORTED_CONFIGURATIONS RELEASE ) set_target_properties(Foo::Foo PROPERTIES - IMPORTED_LOCATION "${Foo_LIBRARY_RELEASE}" + IMPORTED_LOCATION_RELEASE "${Foo_LIBRARY_RELEASE}" ) endif() if (Foo_LIBRARY_DEBUG) @@ -1080,7 +1080,7 @@ populated: IMPORTED_CONFIGURATIONS DEBUG ) set_target_properties(Foo::Foo PROPERTIES - IMPORTED_LOCATION "${Foo_LIBRARY_DEBUG}" + IMPORTED_LOCATION_DEBUG "${Foo_LIBRARY_DEBUG}" ) endif() set_target_properties(Foo::Foo PROPERTIES ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-developer.7.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Dec 4 18:12:41 2014 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 4 Dec 2014 18:12:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1114-g6fe2845 Message-ID: <20141204231246.5E1E8A2B71@public.kitware.com> This is an automated email from 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 6fe28452898c3fea0bf021cacfe0885686e517dd (commit) via 67cb50abd77dddc3cc74597efe38285f9bc9e4cf (commit) via e18e21aeb52923d470680aa171f722b4d3b5d01d (commit) from 3bce2ae4240a701c7e05cd05514d0ae9443ce778 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fe28452898c3fea0bf021cacfe0885686e517dd commit 6fe28452898c3fea0bf021cacfe0885686e517dd Merge: 3bce2ae 67cb50a Author: Stephen Kelly AuthorDate: Thu Dec 4 18:12:38 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 4 18:12:38 2014 -0500 Merge topic 'Find-Modules-documentation' into next 67cb50ab Help: Document that IMPORTED targets in Find modules may be UNKNOWN. e18e21ae Help: Document IMPORTED_CONFIGURATIONS target property for Find modules. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67cb50abd77dddc3cc74597efe38285f9bc9e4cf commit 67cb50abd77dddc3cc74597efe38285f9bc9e4cf Author: Stephen Kelly AuthorDate: Thu Dec 4 23:56:52 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 5 00:12:14 2014 +0100 Help: Document that IMPORTED targets in Find modules may be UNKNOWN. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 6f7bbdc..3b9b921 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -1052,6 +1052,11 @@ not any of its dependencies. Instead, those dependencies should also be targets, and CMake should be told that they are dependencies of this target. CMake will then combine all the necessary information automatically. +The type of the :prop_tgt:`IMPORTED` target created in the +:command:`add_library` command can always be specified as ``UNKNOWN`` +type. This simplifies the code in cases where static or shared variants may +be found, and CMake will determine the type by inspecting the files. + If the library is available with multiple configurations, the :prop_tgt:`IMPORTED_CONFIGURATIONS` target property should also be populated: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e18e21aeb52923d470680aa171f722b4d3b5d01d commit e18e21aeb52923d470680aa171f722b4d3b5d01d Author: Stephen Kelly AuthorDate: Thu Dec 4 23:56:21 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 5 00:12:14 2014 +0100 Help: Document IMPORTED_CONFIGURATIONS target property for Find modules. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 94fc019..6f7bbdc 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -876,7 +876,10 @@ To prevent users being overwhelmed with settings to configure, try to keep as many options as possible out of the cache, leaving at least one option which can be used to disable use of the module, or locate a not-found library (e.g. ``Xxx_ROOT_DIR``). For the same reason, mark -most cache options as advanced. +most cache options as advanced. For packages which provide both debug +and release binaries, it is common to create cache variables with a +``_LIBRARY_`` suffix, such as ``Foo_LIBRARY_RELEASE`` and +``Foo_LIBRARY_DEBUG``. While these are the standard variable names, you should provide backwards compatibility for any old names that were actually in use. @@ -1049,6 +1052,42 @@ not any of its dependencies. Instead, those dependencies should also be targets, and CMake should be told that they are dependencies of this target. CMake will then combine all the necessary information automatically. +If the library is available with multiple configurations, the +:prop_tgt:`IMPORTED_CONFIGURATIONS` target property should also be +populated: + +.. code-block:: cmake + + if(Foo_FOUND) + if (NOT TARGET Foo::Foo) + add_library(Foo::Foo UNKNOWN IMPORTED) + endif() + if (Foo_LIBRARY_RELEASE) + set_property(TARGET Foo::Foo APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE + ) + set_target_properties(Foo::Foo PROPERTIES + IMPORTED_LOCATION_RELEASE "${Foo_LIBRARY_RELEASE}" + ) + endif() + if (Foo_LIBRARY_DEBUG) + set_property(TARGET Foo::Foo APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG + ) + set_target_properties(Foo::Foo PROPERTIES + IMPORTED_LOCATION_DEBUG "${Foo_LIBRARY_DEBUG}" + ) + endif() + set_target_properties(Foo::Foo PROPERTIES + INTERFACE_COMPILE_OPTIONS "${PC_Foo_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${Foo_INCLUDE_DIR}" + ) + endif() + +The ``RELEASE`` variant should be listed first in the property +so that that variant is chosen if the user uses a configuration which is +not an exact match for any listed ``IMPORTED_CONFIGURATIONS``. + We should also provide some information about the package, such as where to download it. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 5 00:01:17 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 5 Dec 2014 00:01:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-494-gc90633d Message-ID: <20141205050117.9D5CFA80F8@public.kitware.com> This is an automated email from 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 c90633df9eacb3063669ac0aad9506cea1885582 (commit) from 470c549c622ddddd0be3ae63945e40a1cad85923 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c90633df9eacb3063669ac0aad9506cea1885582 commit c90633df9eacb3063669ac0aad9506cea1885582 Author: Kitware Robot AuthorDate: Fri Dec 5 00:01:15 2014 -0500 Commit: Kitware Robot CommitDate: Fri Dec 5 00:01:15 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 70d92d2..3048b88 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 1) -set(CMake_VERSION_PATCH 20141204) +set(CMake_VERSION_PATCH 20141205) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From daniele.domenichelli at gmail.com Fri Dec 5 04:29:05 2014 From: daniele.domenichelli at gmail.com (Daniele E. Domenichelli) Date: Fri, 5 Dec 2014 04:29:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1117-g677d66d Message-ID: <20141205092905.41281A8117@public.kitware.com> This is an automated email from 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 677d66d06472560a5c9dedfec73e093ee40db2c6 (commit) via 636f0c1d4fa3f003fff406b27306cd6883bcec75 (commit) via c90633df9eacb3063669ac0aad9506cea1885582 (commit) from 6fe28452898c3fea0bf021cacfe0885686e517dd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=677d66d06472560a5c9dedfec73e093ee40db2c6 commit 677d66d06472560a5c9dedfec73e093ee40db2c6 Merge: 6fe2845 636f0c1 Author: Daniele E. Domenichelli AuthorDate: Fri Dec 5 04:29:03 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 04:29:03 2014 -0500 Merge topic 'ExternalProject_TEST_EXCLUDE_FROM_MAIN' into next 636f0c1d ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option c90633df CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=636f0c1d4fa3f003fff406b27306cd6883bcec75 commit 636f0c1d4fa3f003fff406b27306cd6883bcec75 Author: Daniele E. Domenichelli AuthorDate: Sun Nov 30 22:28:43 2014 +0100 Commit: Daniele E. Domenichelli CommitDate: Fri Dec 5 10:24:16 2014 +0100 ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option If this option is enabled, the test step is created with the EXCLUDE_FROM_MAIN option, and if TEST_BEFORE_INSTALL is enabled, the install step does not depend on the test step. This means that the test step is never executed, unless the test target is explicitly created by calling ExternalProject_Add_StepTarget, or by passing it with the STEP_TARGETS option, or with the EP_STEP_TARGETS directory property. diff --git a/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst b/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst new file mode 100644 index 0000000..dfbf108 --- /dev/null +++ b/Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst @@ -0,0 +1,6 @@ +ExternalProject_TEST_EXCLUDE_FROM_MAIN +-------------------------------------- + +* The :module:`ExternalProject` module :command:`ExternalProject_Add` + command learned a ``TEST_EXCLUDE_FROM_MAIN`` option to exclude tests + from the main build. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index e5616b1..7e4cc37 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -149,6 +149,8 @@ Create custom targets to build projects in external trees Add test step executed before install step ``TEST_AFTER_INSTALL 1`` Add test step executed after install step + ``TEST_EXCLUDE_FROM_MAIN 1`` + Main target does not depend on the test step ``TEST_COMMAND ...`` Command to drive test @@ -2193,12 +2195,13 @@ function(_ep_add_test_command name) get_property(before TARGET ${name} PROPERTY _EP_TEST_BEFORE_INSTALL) get_property(after TARGET ${name} PROPERTY _EP_TEST_AFTER_INSTALL) + get_property(exclude TARGET ${name} PROPERTY _EP_TEST_EXCLUDE_FROM_MAIN) get_property(cmd_set TARGET ${name} PROPERTY _EP_TEST_COMMAND SET) # Only actually add the test step if one of the test related properties is # explicitly set. (i.e. the test step is omitted unless requested...) # - if(cmd_set OR before OR after) + if(cmd_set OR before OR after OR exclude) if(cmd_set) get_property(cmd TARGET ${name} PROPERTY _EP_TEST_COMMAND) else() @@ -2206,9 +2209,21 @@ function(_ep_add_test_command name) endif() if(before) - set(dep_args DEPENDEES build DEPENDERS install) + set(dependees_args DEPENDEES build) else() - set(dep_args DEPENDEES install) + set(dependees_args DEPENDEES install) + endif() + + if(exclude) + set(dependers_args "") + set(exclude_args EXCLUDE_FROM_MAIN 1) + else() + if(before) + set(dependers_args DEPENDERS install) + else() + set(dependers_args "") + endif() + set(exclude_args "") endif() get_property(log TARGET ${name} PROPERTY _EP_LOG_TEST) @@ -2221,7 +2236,9 @@ function(_ep_add_test_command name) ExternalProject_Add_Step(${name} test COMMAND ${cmd} WORKING_DIRECTORY ${binary_dir} - ${dep_args} + ${dependees_args} + ${dependers_args} + ${exclude_args} ${log} ) endif() diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt index cbbb555..9476ab4 100644 --- a/Tests/ExternalProjectLocal/CMakeLists.txt +++ b/Tests/ExternalProjectLocal/CMakeLists.txt @@ -71,6 +71,31 @@ if(can_build_tutorial_step5) LOG_TEST 1 ) set_property(TARGET ${proj} PROPERTY FOLDER "Local") + + set(proj TutorialStep5-Local-TestExcludeFromMainBefore) + ExternalProject_Add(${proj} + URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -G ${CMAKE_GENERATOR} + CMAKE_CACHE_DEFAULT_ARGS -DUSE_MYMATH:BOOL=OFF + TEST_BEFORE_INSTALL 1 + TEST_EXCLUDE_FROM_MAIN 1 + STEP_TARGETS test + LOG_TEST 1 + ) + set_property(TARGET ${proj} PROPERTY FOLDER "Local") + + set(proj TutorialStep5-Local-TestExcludeFromMainAfter) + ExternalProject_Add(${proj} + URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -G ${CMAKE_GENERATOR} + CMAKE_CACHE_DEFAULT_ARGS -DUSE_MYMATH:BOOL=OFF + TEST_AFTER_INSTALL 1 + TEST_EXCLUDE_FROM_MAIN 1 + STEP_TARGETS test + LOG_TEST 1 + ) + set_property(TARGET ${proj} PROPERTY FOLDER "Local") + endif() ----------------------------------------------------------------------- Summary of changes: .../dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst | 6 +++++ Modules/ExternalProject.cmake | 25 ++++++++++++++++---- Source/CMakeVersion.cmake | 2 +- Tests/ExternalProjectLocal/CMakeLists.txt | 25 ++++++++++++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 09:20:20 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 09:20:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1120-g5e9dfe5 Message-ID: <20141205142020.CED57A738C@public.kitware.com> This is an automated email from 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 5e9dfe5a8dfb20bea7f219edb7b740b6b9ee6864 (commit) via 7626c8dcf632a4589c2a9008f083f7777cee946a (commit) via f5ede30006f61ef5bb78d6602ebd9083cd7f9869 (commit) from 677d66d06472560a5c9dedfec73e093ee40db2c6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e9dfe5a8dfb20bea7f219edb7b740b6b9ee6864 commit 5e9dfe5a8dfb20bea7f219edb7b740b6b9ee6864 Merge: 677d66d 7626c8d Author: Brad King AuthorDate: Fri Dec 5 09:20:19 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 09:20:19 2014 -0500 Merge topic 'FindMPI-Intel-5.0.1' into next 7626c8dc FindMPI: Workaround Intel MPI 5.0.1 exit code problem (#15182) f5ede300 FindMPI: Factor out compiler wrapper execution into helper http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7626c8dcf632a4589c2a9008f083f7777cee946a commit 7626c8dcf632a4589c2a9008f083f7777cee946a Author: Alin Marin Elena AuthorDate: Thu Dec 4 13:54:00 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 14:15:46 2014 -0500 FindMPI: Workaround Intel MPI 5.0.1 exit code problem (#15182) This MPI compiler may return zero even in some error cases. Check the output to catch such cases. Suggested-by: Kelly Thompson diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index e135edb..6f6dcf3 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -194,6 +194,12 @@ function (_mpi_check_compiler compiler options cmdvar resvar) OUTPUT_VARIABLE cmdline OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE cmdline ERROR_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE success) + # Intel MPI 5.0.1 will return a zero return code even when the + # argument to the MPI compiler wrapper is unknown. Attempt to + # catch this case. + if("${cmdline}" MATCHES "undefined reference") + set(success 255 ) + endif() set(${cmdvar} "${cmdline}" PARENT_SCOPE) set(${resvar} "${success}" PARENT_SCOPE) endfunction() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5ede30006f61ef5bb78d6602ebd9083cd7f9869 commit f5ede30006f61ef5bb78d6602ebd9083cd7f9869 Author: Alin Marin Elena AuthorDate: Thu Dec 4 13:51:00 2014 -0500 Commit: Brad King CommitDate: Thu Dec 4 14:12:34 2014 -0500 FindMPI: Factor out compiler wrapper execution into helper diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index ba4ea5b..e135edb 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -188,6 +188,15 @@ foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH}) endforeach() endforeach() +function (_mpi_check_compiler compiler options cmdvar resvar) + execute_process( + COMMAND "${compiler}" ${options} + OUTPUT_VARIABLE cmdline OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE cmdline ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE success) + set(${cmdvar} "${cmdline}" PARENT_SCOPE) + set(${resvar} "${success}" PARENT_SCOPE) +endfunction() # # interrogate_mpi_compiler(lang try_libs) @@ -220,12 +229,7 @@ function (interrogate_mpi_compiler lang try_libs) if (MPI_${lang}_COMPILER) # Check whether the -showme:compile option works. This indicates that we have either OpenMPI # or a newer version of LAM-MPI, and implies that -showme:link will also work. - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -showme:compile - OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE MPI_COMPILER_RETURN) - + _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-showme:compile" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) if (MPI_COMPILER_RETURN EQUAL 0) # If we appear to have -showme:compile, then we should # also have -showme:link. Try it. @@ -257,20 +261,12 @@ function (interrogate_mpi_compiler lang try_libs) # Older versions of LAM-MPI have "-showme". Try to find that. if (NOT MPI_COMPILER_RETURN EQUAL 0) - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -showme - OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE MPI_COMPILER_RETURN) + _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-showme" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) endif() # MVAPICH uses -compile-info and -link-info. Try them. if (NOT MPI_COMPILER_RETURN EQUAL 0) - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -compile-info - OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE MPI_COMPILER_RETURN) + _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-compile-info" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) # If we have compile-info, also have link-info. if (MPI_COMPILER_RETURN EQUAL 0) @@ -290,11 +286,7 @@ function (interrogate_mpi_compiler lang try_libs) # MPICH just uses "-show". Try it. if (NOT MPI_COMPILER_RETURN EQUAL 0) - execute_process( - COMMAND ${MPI_${lang}_COMPILER} -show - OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE MPI_COMPILER_RETURN) + _mpi_check_compiler("${MPI_${lang}_COMPILER}" "-show" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) endif() if (MPI_COMPILER_RETURN EQUAL 0) ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 10:34:15 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 10:34:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1124-gd13e65b Message-ID: <20141205153415.BAE70A84BE@public.kitware.com> This is an automated email from 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 d13e65b3db32a6060b833e96024a1526998b63ea (commit) via 65ea5eb721d820551653bf6471e83ed5f4a5ba13 (commit) via 644b4688d71cc52f8499d6103495de0909319557 (commit) via 8a4c6d2d2e66d210e5c2d59c86b3f1bff2582867 (commit) from 5e9dfe5a8dfb20bea7f219edb7b740b6b9ee6864 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d13e65b3db32a6060b833e96024a1526998b63ea commit d13e65b3db32a6060b833e96024a1526998b63ea Merge: 5e9dfe5 65ea5eb Author: Brad King AuthorDate: Fri Dec 5 10:34:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 10:34:14 2014 -0500 Merge topic 'custom-command-multiple-outputs' into next 65ea5eb7 Tests: Cover rebuild with multiple custom command outputs (#15116) 644b4688 Makefile: Fix rebuild with multiple custom command outputs (#15116) 8a4c6d2d Xcode: Fix rebuild with multiple custom command outputs (#15116) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65ea5eb721d820551653bf6471e83ed5f4a5ba13 commit 65ea5eb721d820551653bf6471e83ed5f4a5ba13 Author: Brad King AuthorDate: Fri Dec 5 09:56:26 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 09:56:26 2014 -0500 Tests: Cover rebuild with multiple custom command outputs (#15116) Extend the BuildDepends test with a case covering multiple custom command outputs with the second one consumed by another rule. With the old "multiple output pair" infrastructure used in the Makefile and Xcode generators this did not work. Now that it is fixed, test the case explicitly. diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 6209bb8..78e9e17 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -65,6 +65,7 @@ file(WRITE ${BuildDepends_BINARY_DIR}/Project/link_depends_no_shared_exe.h set(link_depends_no_shared_check_txt ${BuildDepends_BINARY_DIR}/Project/link_depends_no_shared_check.txt) file(WRITE ${BuildDepends_BINARY_DIR}/Project/external.in "external original\n") +file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi1-in.txt "multi1-in original\n") help_xcode_depends() @@ -177,6 +178,19 @@ else() "external.out is missing") endif() +if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi1-out2-copy.txt) + file(STRINGS ${BuildDepends_BINARY_DIR}/Project/multi1-out2-copy.txt multi1_out) + if("${multi1_out}" STREQUAL "multi1-in original") + message(STATUS "multi1-out2-copy.txt contains '${multi1_out}'") + else() + message(SEND_ERROR "Project did not initially build properly: " + "multi1-out2-copy.txt contains '${multi1_out}'") + endif() +else() + message(SEND_ERROR "Project did not initially build properly: " + "multi1-out2-copy.txt is missing") +endif() + message("Waiting 3 seconds...") execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 3) @@ -202,6 +216,7 @@ if(TEST_LINK_DEPENDS) endif() file(WRITE ${BuildDepends_BINARY_DIR}/Project/external.in "external changed\n") +file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi1-in.txt "multi1-in changed\n") help_xcode_depends() @@ -319,3 +334,16 @@ else() message(SEND_ERROR "Project did not rebuild properly: " "external.out is missing") endif() + +if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi1-out2-copy.txt) + file(STRINGS ${BuildDepends_BINARY_DIR}/Project/multi1-out2-copy.txt multi1_out) + if("${multi1_out}" STREQUAL "multi1-in changed") + message(STATUS "multi1-out2-copy.txt contains '${multi1_out}'") + else() + message(SEND_ERROR "Project did not rebuild properly: " + "multi1-out2-copy.txt contains '${multi1_out}'") + endif() +else() + message(SEND_ERROR "Project did not rebuild properly: " + "multi1-out2-copy.txt is missing") +endif() diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt index 9ee4a43..cb9fbf8 100644 --- a/Tests/BuildDepends/Project/CMakeLists.txt +++ b/Tests/BuildDepends/Project/CMakeLists.txt @@ -151,3 +151,16 @@ ExternalProject_Add(ExternalBuild -Dexternal_out=${CMAKE_CURRENT_BINARY_DIR}/external.out INSTALL_COMMAND "" ) + +add_custom_command( + OUTPUT multi1-out1.txt multi1-out2.txt + COMMAND ${CMAKE_COMMAND} -E copy multi1-in.txt multi1-out1.txt + COMMAND ${CMAKE_COMMAND} -E copy multi1-in.txt multi1-out2.txt + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/multi1-in.txt + ) +add_custom_command( + OUTPUT multi1-out2-copy.txt + COMMAND ${CMAKE_COMMAND} -E copy multi1-out2.txt multi1-out2-copy.txt + DEPENDS multi1-out2.txt + ) +add_custom_target(multi1 ALL DEPENDS multi1-out2-copy.txt) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=644b4688d71cc52f8499d6103495de0909319557 commit 644b4688d71cc52f8499d6103495de0909319557 Author: Brad King AuthorDate: Fri Dec 5 09:55:49 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 09:55:49 2014 -0500 Makefile: Fix rebuild with multiple custom command outputs (#15116) Fix the generated makefiles for custom commands with multiple outputs to list all the outputs on the left hand side of the build rule. This is much simpler and more reliable than the old multiple-output-pair infrastructure. diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index ff8ba8b..56b2b97 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -618,6 +618,30 @@ cmLocalUnixMakefileGenerator3 comment); return; } + std::vector outputs(1, target); + this->WriteMakeRule(os, comment, + outputs, depends, commands, + symbolic, in_help); +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::WriteMakeRule(std::ostream& os, + const char* comment, + const std::vector& outputs, + const std::vector& depends, + const std::vector& commands, + bool symbolic, + bool in_help) +{ + // Make sure there is an output. + if(outputs.empty()) + { + cmSystemTools::Error("No outputs for WriteMakeRule! called with comment: ", + comment); + return; + } std::string replace; @@ -636,8 +660,18 @@ cmLocalUnixMakefileGenerator3 } // Construct the left hand side of the rule. - replace = target; - std::string tgt = this->Convert(replace,HOME_OUTPUT,MAKERULE); + std::string tgt; + { + const char* sep = ""; + for (std::vector::const_iterator i = outputs.begin(); + i != outputs.end(); ++i) + { + tgt += sep; + tgt += this->Convert(*i,HOME_OUTPUT,MAKERULE); + sep = " "; + } + } + const char* space = ""; if(tgt.size() == 1) { @@ -690,7 +724,11 @@ cmLocalUnixMakefileGenerator3 // Add the output to the local help if requested. if(in_help) { - this->LocalHelp.push_back(target); + for (std::vector::const_iterator i = outputs.begin(); + i != outputs.end(); ++i) + { + this->LocalHelp.push_back(*i); + } } } @@ -1709,6 +1747,8 @@ cmLocalUnixMakefileGenerator3 //---------------------------------------------------------------------------- void cmLocalUnixMakefileGenerator3::CheckMultipleOutputs(bool verbose) { + // Nothing populates multiple output pairs anymore, but we need to + // honor it when working in a build tree generated by an older CMake. cmMakefile* mf = this->Makefile; // Get the string listing the multiple output pairs. diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 4f2e4a0..65265ce 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -61,6 +61,13 @@ public: const std::vector& commands, bool symbolic, bool in_help = false); + void WriteMakeRule(std::ostream& os, + const char* comment, + const std::vector& outputs, + const std::vector& depends, + const std::vector& commands, + bool symbolic, + bool in_help = false); // write the main variables used by the makefiles void WriteMakeVariables(std::ostream& makefileStream); diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 80473f6..305d81d 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -752,26 +752,23 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules this->Target); } - // Write the build rule. - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, - targetFullPathReal, - depends, commands, false); - - // Some targets have more than one output file. Create rules to - // drive the build if any extra outputs are missing. - std::vector extraOutputs; + // Compute the list of outputs. + std::vector outputs(1, targetFullPathReal); if(targetNameSO != targetNameReal) { - this->GenerateExtraOutput(targetFullPathSO.c_str(), - targetFullPathReal.c_str()); + outputs.push_back(targetFullPathSO); } if(targetName != targetNameSO && targetName != targetNameReal) { - this->GenerateExtraOutput(targetFullPath.c_str(), - targetFullPathReal.c_str()); + outputs.push_back(targetFullPath); } + // Write the build rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + outputs, depends, commands, false); + + // Write the main driver rule to build everything in this target. this->WriteTargetDriverRule(targetFullPath, relink); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 8444dfb..067714e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -754,30 +754,24 @@ cmMakefileTargetGenerator compileCommands.begin(), compileCommands.end()); } - // Write the rule. - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, - relativeObj, - depends, commands, false); - // Check for extra outputs created by the compilation. + std::vector outputs(1, relativeObj); if(const char* extra_outputs_str = source.GetProperty("OBJECT_OUTPUTS")) { - std::vector extra_outputs; - cmSystemTools::ExpandListArgument(extra_outputs_str, extra_outputs); - for(std::vector::const_iterator eoi = extra_outputs.begin(); - eoi != extra_outputs.end(); ++eoi) + cmSystemTools::ExpandListArgument(extra_outputs_str, outputs); + for(std::vector::const_iterator eoi = outputs.begin()+1; + eoi != outputs.end(); ++eoi) { - // Register this as an extra output for the object file rule. - // This will cause the object file to be rebuilt if the extra - // output is missing. - this->GenerateExtraOutput(eoi->c_str(), relativeObj.c_str(), false); - // Register this as an extra file to clean. this->CleanFiles.push_back(*eoi); } } + // Write the rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + outputs, depends, commands, false); + bool do_preprocess_rules = lang_has_preprocessor && this->LocalGenerator->GetCreatePreprocessedSourceRules(); bool do_assembly_rules = lang_has_assembly && @@ -1017,25 +1011,6 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() this->LocalGenerator-> WriteDependLanguageInfo(*this->InfoFileStream,*this->Target); - // Store multiple output pairs in the depend info file. - if(!this->MultipleOutputPairs.empty()) - { - *this->InfoFileStream - << "\n" - << "# Pairs of files generated by the same build rule.\n" - << "set(CMAKE_MULTIPLE_OUTPUT_PAIRS\n"; - for(MultipleOutputPairsType::const_iterator pi = - this->MultipleOutputPairs.begin(); - pi != this->MultipleOutputPairs.end(); ++pi) - { - *this->InfoFileStream - << " " << this->LocalGenerator->EscapeForCMake(pi->first) - << " " << this->LocalGenerator->EscapeForCMake(pi->second) - << "\n"; - } - *this->InfoFileStream << " )\n\n"; - } - // Store list of targets linked directly or transitively. { *this->InfoFileStream @@ -1273,7 +1248,7 @@ void cmMakefileTargetGenerator } } this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, - *o, depends, commands, + outputs, depends, commands, symbolic); // If the rule has changed make sure the output is rebuilt. @@ -1283,21 +1258,6 @@ void cmMakefileTargetGenerator } } - // Write rules to drive building any outputs beyond the first. - const char* in = o->c_str(); - for(++o; o != outputs.end(); ++o) - { - bool symbolic = false; - if(need_symbolic) - { - if(cmSourceFile* sf = this->Makefile->GetSource(*o)) - { - symbolic = sf->GetPropertyAsBool("SYMBOLIC"); - } - } - this->GenerateExtraOutput(o->c_str(), in, symbolic); - } - // Setup implicit dependency scanning. for(cmCustomCommand::ImplicitDependsList::const_iterator idi = ccg.GetCC().GetImplicitDepends().begin(); @@ -1316,32 +1276,6 @@ void cmMakefileTargetGenerator //---------------------------------------------------------------------------- void -cmMakefileTargetGenerator -::GenerateExtraOutput(const char* out, const char* in, bool symbolic) -{ - // Add a rule to build the primary output if the extra output needs - // to be created. - std::vector commands; - std::vector depends; - std::string emptyCommand = this->GlobalGenerator->GetEmptyRuleHackCommand(); - if(!emptyCommand.empty()) - { - commands.push_back(emptyCommand); - } - depends.push_back(in); - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, - out, depends, commands, - symbolic); - - // Register the extra output as paired with the first output so that - // the check-build-system step will remove the primary output if any - // extra outputs are missing. This forces the rule to regenerate - // all outputs. - this->AddMultipleOutputPair(out, in); -} - -//---------------------------------------------------------------------------- -void cmMakefileTargetGenerator::AppendProgress(std::vector& commands) { this->NumberOfProgressActions++; @@ -1770,15 +1704,6 @@ void cmMakefileTargetGenerator::RemoveForbiddenFlags(const char* flagVar, //---------------------------------------------------------------------------- void cmMakefileTargetGenerator -::AddMultipleOutputPair(const char* depender, const char* dependee) -{ - MultipleOutputPairsType::value_type p(depender, dependee); - this->MultipleOutputPairs.insert(p); -} - -//---------------------------------------------------------------------------- -void -cmMakefileTargetGenerator ::CreateLinkScript(const char* name, std::vector const& link_commands, std::vector& makefile_commands, diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 9fac574..e31e086 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -142,15 +142,6 @@ protected: // Lookup the link rule for this target. std::string GetLinkRule(const std::string& linkRuleVar); - /** In order to support parallel builds for custom commands with - multiple outputs the outputs are given a serial order, and only - the first output actually has the build rule. Other outputs - just depend on the first one. The check-build-system step must - remove a dependee if the depender is missing to make sure both - are regenerated properly. This method is used by the local - makefile generators to register such pairs. */ - void AddMultipleOutputPair(const char* depender, const char* dependee); - /** Create a script to hold link rules and a command to invoke the script at build time. */ void CreateLinkScript(const char* name, @@ -231,9 +222,6 @@ protected: // Set of extra output files to be driven by the build. std::set ExtraFiles; - typedef std::map MultipleOutputPairsType; - MultipleOutputPairsType MultipleOutputPairs; - // Target name info. std::string TargetNameOut; std::string TargetNameSO; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a4c6d2d2e66d210e5c2d59c86b3f1bff2582867 commit 8a4c6d2d2e66d210e5c2d59c86b3f1bff2582867 Author: Brad King AuthorDate: Fri Dec 5 09:50:31 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 09:52:09 2014 -0500 Xcode: Fix rebuild with multiple custom command outputs (#15116) The Xcode generator uses Makefiles under a run-script build-phase to drive custom commands. Fix the generated makefiles for custom commands with multiple outputs to list all the outputs on the left hand side of the build rule. This is much simpler and more reliable than the old multiple-output-pair infrastructure. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d222288..de6e915 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1498,7 +1498,6 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, const & commands, const char* name) { - bool haveMultipleOutputPairs = false; std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory(); dir += "/CMakeScripts"; cmSystemTools::MakeDirectory(dir.c_str()); @@ -1517,8 +1516,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, this->CreateCustomRulesMakefile(makefile.c_str(), target, commands, - currentConfig->c_str(), - haveMultipleOutputPairs); + currentConfig->c_str()); } std::string cdir = this->CurrentMakefile->GetCurrentOutputDirectory(); @@ -1528,10 +1526,6 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, makecmd += " -f "; makecmd += this->ConvertToRelativeForMake( (makefile+"$CONFIGURATION").c_str()); - if(haveMultipleOutputPairs) - { - makecmd += " cmake_check_multiple_outputs"; - } makecmd += " all"; cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ "); buildphase->AddAttribute("shellScript", @@ -1546,8 +1540,7 @@ void cmGlobalXCodeGenerator cmTarget& target, std::vector const & commands, - const std::string& configName, - bool& haveMultipleOutputPairs) + const std::string& configName) { std::string makefileName=makefileBasename; if(this->XcodeVersion > 20) @@ -1570,7 +1563,6 @@ void cmGlobalXCodeGenerator makefileStream << "all: "; std::map tname; int count = 0; - std::map multipleOutputPairs; for(std::vector::const_iterator i = commands.begin(); i != commands.end(); ++i) { @@ -1586,16 +1578,6 @@ void cmGlobalXCodeGenerator makefileStream << "\\\n\t" << this->ConvertToRelativeForMake(o->c_str()); } - - // If there is more than one output treat the first as the - // primary output and make the rest depend on it. - std::vector::const_iterator o = outputs.begin(); - std::string primaryOutput = this->ConvertToRelativeForMake(o->c_str()); - for(++o; o != outputs.end(); ++o) - { - std::string currentOutput=this->ConvertToRelativeForMake(o->c_str()); - multipleOutputPairs[currentOutput] = primaryOutput; - } } else { @@ -1618,9 +1600,15 @@ void cmGlobalXCodeGenerator if(!outputs.empty()) { // There is at least one output, start the rule for it - std::string primary_output = - this->ConvertToRelativeForMake(outputs.begin()->c_str()); - makefileStream << primary_output << ": "; + const char* sep = ""; + for(std::vector::const_iterator oi = outputs.begin(); + oi != outputs.end(); ++oi) + { + makefileStream << sep << + this->ConvertToRelativeForMake(oi->c_str()); + sep = " "; + } + makefileStream << ": "; } else { @@ -1670,33 +1658,6 @@ void cmGlobalXCodeGenerator } } } - - // Add rules to deal with multiple outputs of custom commands. - if(!multipleOutputPairs.empty()) - { - makefileStream << - "\n# Dependencies of multiple outputs to their primary outputs \n"; - - for(std::map::const_iterator o = - multipleOutputPairs.begin(); o != multipleOutputPairs.end(); ++o) - { - makefileStream << o->first << ": " << o->second << "\n"; - } - - makefileStream << - "\n" - "cmake_check_multiple_outputs:\n"; - for(std::map::const_iterator o = - multipleOutputPairs.begin(); o != multipleOutputPairs.end(); ++o) - { - makefileStream << "\t at if [ ! -f " - << o->first << " ]; then rm -f " - << o->second << "; fi\n"; - } - } - - haveMultipleOutputPairs = - haveMultipleOutputPairs || !multipleOutputPairs.empty(); } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index d2bc9d1..f38435e 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -118,8 +118,7 @@ private: void CreateCustomRulesMakefile(const char* makefileBasename, cmTarget& target, std::vector const & commands, - const std::string& configName, - bool& haveMultipleOutputPairs); + const std::string& configName); cmXCodeObject* FindXCodeTarget(cmTarget const*); std::string GetOrCreateId(const std::string& name, const std::string& id); ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 61 ++++-------------- Source/cmGlobalXCodeGenerator.h | 3 +- Source/cmLocalUnixMakefileGenerator3.cxx | 46 ++++++++++++- Source/cmLocalUnixMakefileGenerator3.h | 7 ++ Source/cmMakefileLibraryTargetGenerator.cxx | 21 +++--- Source/cmMakefileTargetGenerator.cxx | 93 +++------------------------ Source/cmMakefileTargetGenerator.h | 12 ---- Tests/BuildDepends/CMakeLists.txt | 28 ++++++++ Tests/BuildDepends/Project/CMakeLists.txt | 13 ++++ 9 files changed, 121 insertions(+), 163 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 10:39:13 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 10:39:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-501-g356f7cf Message-ID: <20141205153913.4E74C99A91@public.kitware.com> This is an automated email from 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 356f7cf4457271ee85a71face453ea9579f05da3 (commit) via 67cb50abd77dddc3cc74597efe38285f9bc9e4cf (commit) via e18e21aeb52923d470680aa171f722b4d3b5d01d (commit) via f0d0d761b2150e41397af8cfce2b846107cf8921 (commit) via 31452416ba1be692b55ed09f8cf39fa2914ad349 (commit) via b96b025b2a337d7b09157f8b24cf9ca77a825863 (commit) via 169f116632321e99701986f48a19e836d2b9e710 (commit) from c90633df9eacb3063669ac0aad9506cea1885582 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=356f7cf4457271ee85a71face453ea9579f05da3 commit 356f7cf4457271ee85a71face453ea9579f05da3 Merge: c90633d 67cb50a Author: Brad King AuthorDate: Fri Dec 5 10:39:12 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 10:39:12 2014 -0500 Merge topic 'Find-Modules-documentation' 67cb50ab Help: Document that IMPORTED targets in Find modules may be UNKNOWN. e18e21ae Help: Document IMPORTED_CONFIGURATIONS target property for Find modules. f0d0d761 Help: Remove recommendation about checking minimum CMake version. 31452416 Help: Add useful links to IMPORTED targets and usage requirements. b96b025b Help: Remove disadvantage creating IMPORTED targets in Find modules. 169f1166 Help: Link to cmake-packages(7) from the Module creation documentation. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-developer.7.rst | 70 +++++++++++++++++++++++++++---------- Help/manual/cmake-packages.7.rst | 2 ++ 2 files changed, 53 insertions(+), 19 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 10:39:32 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 10:39:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1126-gf3f7acf Message-ID: <20141205153932.8BC3A9B7FC@public.kitware.com> This is an automated email from 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 f3f7acf67d013c432a610bea29d7d1b3b80a1150 (commit) via 356f7cf4457271ee85a71face453ea9579f05da3 (commit) from d13e65b3db32a6060b833e96024a1526998b63ea (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3f7acf67d013c432a610bea29d7d1b3b80a1150 commit f3f7acf67d013c432a610bea29d7d1b3b80a1150 Merge: d13e65b 356f7cf Author: Brad King AuthorDate: Fri Dec 5 10:39:25 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 10:39:25 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From ben.boeckel at kitware.com Fri Dec 5 12:48:40 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 5 Dec 2014 12:48:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1128-gfe1b22f Message-ID: <20141205174840.C93CAA7953@public.kitware.com> This is an automated email from 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 fe1b22fc00e60e37e88eacf31c369018f3eeabe9 (commit) via 29b0c8c3606f07f3baee245138552c3c0256ded6 (commit) from f3f7acf67d013c432a610bea29d7d1b3b80a1150 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe1b22fc00e60e37e88eacf31c369018f3eeabe9 commit fe1b22fc00e60e37e88eacf31c369018f3eeabe9 Merge: f3f7acf 29b0c8c Author: Ben Boeckel AuthorDate: Fri Dec 5 12:48:40 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 12:48:40 2014 -0500 Merge topic 'ctest-binary-pipe' into next 29b0c8c3 ctest --launch: write to cout and cerr in binary http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29b0c8c3606f07f3baee245138552c3c0256ded6 commit 29b0c8c3606f07f3baee245138552c3c0256ded6 Author: Ben Boeckel AuthorDate: Fri Dec 5 12:47:18 2014 -0500 Commit: Ben Boeckel CommitDate: Fri Dec 5 12:47:18 2014 -0500 ctest --launch: write to cout and cerr in binary Because ctest reads in binary but writes in text mode, Windows' newline transformation can be applied multiple times causing '\n' in the source application to be written out as '\r\r\n' instead. diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index b65d23b..77c5d57 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -21,6 +21,12 @@ #include #include +#ifdef _WIN32 +#include // for _setmode +#include // for _O_BINARY +#include // for std{out,err} and fileno +#endif + //---------------------------------------------------------------------------- cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv) { @@ -259,6 +265,13 @@ void cmCTestLaunch::RunChild() std::ios::out | std::ios::binary); } +#ifdef _WIN32 + // Do this so that newline transformation is not done when writing to cout + // and cerr below. + _setmode(fileno(stdout), _O_BINARY); + _setmode(fileno(stderr), _O_BINARY); +#endif + // Run the real command. cmsysProcess_Execute(cp); ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestLaunch.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 13:01:47 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 13:01:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1130-gb2dde04 Message-ID: <20141205180147.9DFF3A8270@public.kitware.com> This is an automated email from 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 b2dde0459e93b316d1c9700a466b9fb78c0f1c4f (commit) via 97841dad2ba5a79acb0b22db9a01ae45f7b2e80b (commit) from fe1b22fc00e60e37e88eacf31c369018f3eeabe9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2dde0459e93b316d1c9700a466b9fb78c0f1c4f commit b2dde0459e93b316d1c9700a466b9fb78c0f1c4f Merge: fe1b22f 97841da Author: Brad King AuthorDate: Fri Dec 5 13:01:46 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 13:01:46 2014 -0500 Merge topic 'file-LOCK-timeout-type' into next 97841dad file: Use 'long' to represent the parsed LOCK TIMEOUT value http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97841dad2ba5a79acb0b22db9a01ae45f7b2e80b commit 97841dad2ba5a79acb0b22db9a01ae45f7b2e80b Author: Ruslan Baratov AuthorDate: Fri Dec 5 17:18:11 2014 +0300 Commit: Brad King CommitDate: Fri Dec 5 12:59:37 2014 -0500 file: Use 'long' to represent the parsed LOCK TIMEOUT value Convert the StringToInt helper into a StringToLong helper with a 'long' result type. This will make the helper more useful to other callers that want to use strtol. While at it, also check errno after calling strtol in case the conversion fails with a range error. diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index a6eb8c4..3c2dfa5 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -3521,7 +3521,7 @@ bool cmFileCommand::HandleLockCommand( }; Guard guard = GUARD_PROCESS; std::string resultVariable; - unsigned timeout = static_cast(-1); + unsigned long timeout = static_cast(-1); // Parse arguments if(args.size() < 2) @@ -3597,15 +3597,16 @@ bool cmFileCommand::HandleLockCommand( "expected timeout value after TIMEOUT"); return false; } - int scanned; - if(!cmSystemTools::StringToInt(args[i].c_str(), &scanned) || scanned < 0) + long scanned; + if(!cmSystemTools::StringToLong(args[i].c_str(), &scanned) + || scanned < 0) { cmOStringStream e; e << "TIMEOUT value \"" << args[i] << "\" is not an unsigned integer."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return false; } - timeout = static_cast(scanned); + timeout = static_cast(scanned); } else { diff --git a/Source/cmFileLock.cxx b/Source/cmFileLock.cxx index 5f75637..e6aa5f4 100644 --- a/Source/cmFileLock.cxx +++ b/Source/cmFileLock.cxx @@ -28,7 +28,7 @@ cmFileLock::~cmFileLock() } cmFileLockResult cmFileLock::Lock( - const std::string& filename, unsigned timeout) + const std::string& filename, unsigned long timeout) { if (filename.empty()) { @@ -48,7 +48,7 @@ cmFileLockResult cmFileLock::Lock( cmFileLockResult result = this->OpenFile(); if (result.IsOk()) { - if (timeout == static_cast(-1)) + if (timeout == static_cast(-1)) { result = this->LockWithoutTimeout(); } diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h index 4d922a0..dd959a7 100644 --- a/Source/cmFileLock.h +++ b/Source/cmFileLock.h @@ -37,7 +37,7 @@ class cmFileLock * @brief Lock the file. * @param timeoutSec Lock timeout. If -1 try until success or fatal error. */ - cmFileLockResult Lock(const std::string& filename, unsigned timeoutSec); + cmFileLockResult Lock(const std::string& filename, unsigned long timeoutSec); /** * @brief Unlock the file. @@ -57,7 +57,7 @@ class cmFileLock cmFileLockResult OpenFile(); cmFileLockResult LockWithoutTimeout(); - cmFileLockResult LockWithTimeout(unsigned timeoutSec); + cmFileLockResult LockWithTimeout(unsigned long timeoutSec); #if defined(_WIN32) typedef HANDLE FileId; diff --git a/Source/cmFileLockPool.cxx b/Source/cmFileLockPool.cxx index e84e71a..551a75a 100644 --- a/Source/cmFileLockPool.cxx +++ b/Source/cmFileLockPool.cxx @@ -60,7 +60,7 @@ void cmFileLockPool::PopFileScope() } cmFileLockResult cmFileLockPool::LockFunctionScope( - const std::string& filename, unsigned timeoutSec) + const std::string& filename, unsigned long timeoutSec) { if (this->IsAlreadyLocked(filename)) { @@ -74,7 +74,7 @@ cmFileLockResult cmFileLockPool::LockFunctionScope( } cmFileLockResult cmFileLockPool::LockFileScope( - const std::string& filename, unsigned timeoutSec) + const std::string& filename, unsigned long timeoutSec) { if (this->IsAlreadyLocked(filename)) { @@ -85,7 +85,7 @@ cmFileLockResult cmFileLockPool::LockFileScope( } cmFileLockResult cmFileLockPool::LockProcessScope( - const std::string& filename, unsigned timeoutSec) + const std::string& filename, unsigned long timeoutSec) { if (this->IsAlreadyLocked(filename)) { @@ -155,7 +155,7 @@ cmFileLockPool::ScopePool::~ScopePool() } cmFileLockResult cmFileLockPool::ScopePool::Lock( - const std::string& filename, unsigned timeoutSec) + const std::string& filename, unsigned long timeoutSec) { cmFileLock *lock = new cmFileLock(); const cmFileLockResult result = lock->Lock(filename, timeoutSec); diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h index a63540c..baef310 100644 --- a/Source/cmFileLockPool.h +++ b/Source/cmFileLockPool.h @@ -45,13 +45,13 @@ class cmFileLockPool * @param timeoutSec Lock timeout. If -1 try until success or fatal error. */ cmFileLockResult LockFunctionScope( - const std::string& filename, unsigned timeoutSec + const std::string& filename, unsigned long timeoutSec ); cmFileLockResult LockFileScope( - const std::string& filename, unsigned timeoutSec + const std::string& filename, unsigned long timeoutSec ); cmFileLockResult LockProcessScope( - const std::string& filename, unsigned timeoutSec + const std::string& filename, unsigned long timeoutSec ); //@} @@ -72,7 +72,9 @@ class cmFileLockPool ScopePool(); ~ScopePool(); - cmFileLockResult Lock(const std::string& filename, unsigned timeoutSec); + cmFileLockResult Lock( + const std::string& filename, unsigned long timeoutSec + ); cmFileLockResult Release(const std::string& filename); bool IsAlreadyLocked(const std::string& filename) const; diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx index 038011e..fc18a64 100644 --- a/Source/cmFileLockUnix.cxx +++ b/Source/cmFileLockUnix.cxx @@ -66,7 +66,7 @@ cmFileLockResult cmFileLock::LockWithoutTimeout() } } -cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) +cmFileLockResult cmFileLock::LockWithTimeout(unsigned long seconds) { while (true) { diff --git a/Source/cmFileLockWin32.cxx b/Source/cmFileLockWin32.cxx index 17231ea..4691689 100644 --- a/Source/cmFileLockWin32.cxx +++ b/Source/cmFileLockWin32.cxx @@ -86,7 +86,7 @@ cmFileLockResult cmFileLock::LockWithoutTimeout() } } -cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds) +cmFileLockResult cmFileLock::LockWithTimeout(unsigned long seconds) { const DWORD flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY; while (true) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 9852dd6..c83dc2a 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2925,9 +2925,10 @@ std::vector cmSystemTools::tokenize(const std::string& str, } //---------------------------------------------------------------------------- -bool cmSystemTools::StringToInt(const char* str, int* value) +bool cmSystemTools::StringToLong(const char* str, long* value) { + errno = 0; char *endp; - *value = static_cast(strtol(str, &endp, 10)); - return (*endp == '\0') && (endp != str); + *value = strtol(str, &endp, 10); + return (*endp == '\0') && (endp != str) && (errno == 0); } diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 763389b..d49af74 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -458,8 +458,8 @@ public: static std::vector tokenize(const std::string& str, const std::string& sep); - /** Convert string to int. Expected that the whole string is an integer */ - static bool StringToInt(const char* str, int* value); + /** Convert string to long. Expected that the whole string is an integer */ + static bool StringToLong(const char* str, long* value); #ifdef _WIN32 struct WindowsFileRetry ----------------------------------------------------------------------- Summary of changes: Source/cmFileCommand.cxx | 9 +++++---- Source/cmFileLock.cxx | 4 ++-- Source/cmFileLock.h | 4 ++-- Source/cmFileLockPool.cxx | 8 ++++---- Source/cmFileLockPool.h | 10 ++++++---- Source/cmFileLockUnix.cxx | 2 +- Source/cmFileLockWin32.cxx | 2 +- Source/cmSystemTools.cxx | 7 ++++--- Source/cmSystemTools.h | 4 ++-- 9 files changed, 27 insertions(+), 23 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 13:31:15 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 13:31:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1132-gc00ead9 Message-ID: <20141205183115.41DCCA82DA@public.kitware.com> This is an automated email from 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 c00ead9f5516d9d84da5bf365bf9d8345e1d347b (commit) via fe21580b84d06c263bbcb6d90089b9e6bb91b25b (commit) from b2dde0459e93b316d1c9700a466b9fb78c0f1c4f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c00ead9f5516d9d84da5bf365bf9d8345e1d347b commit c00ead9f5516d9d84da5bf365bf9d8345e1d347b Merge: b2dde04 fe21580 Author: Brad King AuthorDate: Fri Dec 5 13:31:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 13:31:14 2014 -0500 Merge topic 'doc-file-GENERATE-order' into next fe21580b Help: Document file(GENERATE) signature option order http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe21580b84d06c263bbcb6d90089b9e6bb91b25b commit fe21580b84d06c263bbcb6d90089b9e6bb91b25b Author: Brad King AuthorDate: Fri Dec 5 13:28:24 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 13:28:24 2014 -0500 Help: Document file(GENERATE) signature option order In commit v3.1.0-rc1~484^2 (Help: Format and revise file() command documentation, 2014-05-23) the signature of file(GENERATE) was accidentally simplified too much and dropped specification of the required argument ordering. Restore the signature to make the order clear. diff --git a/Help/command/file.rst b/Help/command/file.rst index dbc4149..5d3c4a9 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -247,7 +247,9 @@ the ```` and ``UTC`` options. :: - file(GENERATE ...) + file(GENERATE OUTPUT output-file + + [CONDITION expression]) Generate an output file for each build configuration supported by the current :manual:`CMake Generator `. Evaluate ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 14:01:05 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:01:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-503-g03db9a0 Message-ID: <20141205190105.3A4DAA82B9@public.kitware.com> This is an automated email from 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 03db9a061aa62eb2b373010a6a38d5707749a6d7 (commit) via fe21580b84d06c263bbcb6d90089b9e6bb91b25b (commit) from 356f7cf4457271ee85a71face453ea9579f05da3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=03db9a061aa62eb2b373010a6a38d5707749a6d7 commit 03db9a061aa62eb2b373010a6a38d5707749a6d7 Merge: 356f7cf fe21580 Author: Brad King AuthorDate: Fri Dec 5 14:01:04 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 14:01:04 2014 -0500 Merge topic 'doc-file-GENERATE-order' fe21580b Help: Document file(GENERATE) signature option order ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 14:01:32 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:01:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1134-g3042e27 Message-ID: <20141205190132.8CCA3A82CB@public.kitware.com> This is an automated email from 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 3042e27a969b11b13a9e742e0b8d7ec662e0e350 (commit) via 03db9a061aa62eb2b373010a6a38d5707749a6d7 (commit) from c00ead9f5516d9d84da5bf365bf9d8345e1d347b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3042e27a969b11b13a9e742e0b8d7ec662e0e350 commit 3042e27a969b11b13a9e742e0b8d7ec662e0e350 Merge: c00ead9 03db9a0 Author: Brad King AuthorDate: Fri Dec 5 14:01:21 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 14:01:21 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 14:02:13 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:02:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-505-gfad59f2 Message-ID: <20141205190213.13185A82DD@public.kitware.com> This is an automated email from 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 fad59f2dd12b72ec1b23b08a8bff7f0b296bb4b1 (commit) via 27141eede739fb4376a6fe2cec1b1171841bf7fb (commit) from 03db9a061aa62eb2b373010a6a38d5707749a6d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fad59f2dd12b72ec1b23b08a8bff7f0b296bb4b1 commit fad59f2dd12b72ec1b23b08a8bff7f0b296bb4b1 Merge: 03db9a0 27141ee Author: Brad King AuthorDate: Fri Dec 5 14:02:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 14:02:11 2014 -0500 Merge topic 'xerces-rename' 27141eed Modules: Rename FindXerces to FindXercesC ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 2 +- Help/module/FindXerces.rst | 1 - Help/module/FindXercesC.rst | 1 + Help/release/3.1.0.rst | 2 + Modules/{FindXerces.cmake => FindXercesC.cmake} | 66 +++++++++++------------ 5 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 Help/module/FindXerces.rst create mode 100644 Help/module/FindXercesC.rst rename Modules/{FindXerces.cmake => FindXercesC.cmake} (55%) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 14:02:26 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:02:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1136-gf0fcb0b Message-ID: <20141205190226.C1C09A82DB@public.kitware.com> This is an automated email from 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 f0fcb0b3883272097f98c16d3ae33f13511b5864 (commit) via fad59f2dd12b72ec1b23b08a8bff7f0b296bb4b1 (commit) from 3042e27a969b11b13a9e742e0b8d7ec662e0e350 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0fcb0b3883272097f98c16d3ae33f13511b5864 commit f0fcb0b3883272097f98c16d3ae33f13511b5864 Merge: 3042e27 fad59f2 Author: Brad King AuthorDate: Fri Dec 5 14:02:20 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 14:02:20 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 14:03:48 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:03:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-508-gce28da6 Message-ID: <20141205190348.BD24CA8358@public.kitware.com> This is an automated email from 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 ce28da6c64aba359b4399bca56ec60707a3d6073 (commit) via eff4081bfbc7285ceeb5d6ec32a4f8682066cef6 (commit) via c2d371034e01ce7472cafb177f272030c1242513 (commit) from fad59f2dd12b72ec1b23b08a8bff7f0b296bb4b1 (commit) Those revisions listed 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 Dec 5 14:03:48 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:03:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1140-g8677735 Message-ID: <20141205190348.DEE6EA8361@public.kitware.com> This is an automated email from 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 86777356c5ebfc43fbbf5aabceaeea02d6b3f84e (commit) via ce28da6c64aba359b4399bca56ec60707a3d6073 (commit) via eff4081bfbc7285ceeb5d6ec32a4f8682066cef6 (commit) via c2d371034e01ce7472cafb177f272030c1242513 (commit) from f0fcb0b3883272097f98c16d3ae33f13511b5864 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86777356c5ebfc43fbbf5aabceaeea02d6b3f84e commit 86777356c5ebfc43fbbf5aabceaeea02d6b3f84e Merge: f0fcb0b ce28da6 Author: Brad King AuthorDate: Fri Dec 5 14:03:33 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 14:03:33 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 14:03:49 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:03:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc2-82-geff4081 Message-ID: <20141205190349.03086A839F@public.kitware.com> This is an automated email from 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 eff4081bfbc7285ceeb5d6ec32a4f8682066cef6 (commit) via fe21580b84d06c263bbcb6d90089b9e6bb91b25b (commit) via c2d371034e01ce7472cafb177f272030c1242513 (commit) via 607b39dc1192a9e0f7eae66f9979c399e5126337 (commit) from 1c104c019a23392563befb3564dd5c679cc2c585 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/command/file.rst | 4 +++- Utilities/Sphinx/cmake.py | 12 ++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 5 14:09:06 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 5 Dec 2014 14:09:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1142-gad137b5 Message-ID: <20141205190906.1D4B128ED@public.kitware.com> This is an automated email from 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 ad137b5af4f40f7c07df7da67684082c5e4a5012 (commit) via de022e8908cc5b3a6e0f179a81482fad4cfb6072 (commit) from 86777356c5ebfc43fbbf5aabceaeea02d6b3f84e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad137b5af4f40f7c07df7da67684082c5e4a5012 commit ad137b5af4f40f7c07df7da67684082c5e4a5012 Merge: 8677735 de022e8 Author: Brad King AuthorDate: Fri Dec 5 14:09:05 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 5 14:09:05 2014 -0500 Merge topic 'optional-latest-language-dialects' into next de022e89 Add options to build CMake without latest language dialects http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de022e8908cc5b3a6e0f179a81482fad4cfb6072 commit de022e8908cc5b3a6e0f179a81482fad4cfb6072 Author: Brad King AuthorDate: Fri Dec 5 14:06:43 2014 -0500 Commit: Brad King CommitDate: Fri Dec 5 14:07:59 2014 -0500 Add options to build CMake without latest language dialects Set CMAKE_C_STANDARD and CMAKE_CXX_STANDARD only if they are not already defined. This will allow users to add the settings with different values to their local cache (e.g. on the command line). diff --git a/CMakeLists.txt b/CMakeLists.txt index ad3bb97..1812b27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,12 @@ if("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") endif() # Use most-recent available language dialects with GNU and Clang -set(CMAKE_C_STANDARD 11) -set(CMAKE_CXX_STANDARD 14) +if(NOT DEFINED CMAKE_C_STANDARD) + set(CMAKE_C_STANDARD 11) +endif() +if(NOT DEFINED CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) +endif() # option to set the internal encoding of CMake to UTF-8 option(CMAKE_ENCODING_UTF8 "Use UTF-8 encoding internally (experimental)." OFF) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 6 00:01:17 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 6 Dec 2014 00:01:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-509-gbec5b3d Message-ID: <20141206050117.E5DE9A8146@public.kitware.com> This is an automated email from 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 bec5b3df0148bc8ae9c9c777367386fb1a38ad04 (commit) from ce28da6c64aba359b4399bca56ec60707a3d6073 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bec5b3df0148bc8ae9c9c777367386fb1a38ad04 commit bec5b3df0148bc8ae9c9c777367386fb1a38ad04 Author: Kitware Robot AuthorDate: Sat Dec 6 00:01:15 2014 -0500 Commit: Kitware Robot CommitDate: Sat Dec 6 00:01:15 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3048b88..abaa2d0 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 1) -set(CMake_VERSION_PATCH 20141205) +set(CMake_VERSION_PATCH 20141206) #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 Dec 6 07:43:20 2014 From: brad.king at kitware.com (Brad King) Date: Sat, 6 Dec 2014 07:43:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1144-g236f564 Message-ID: <20141206124320.25294A48F5@public.kitware.com> This is an automated email from 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 236f564453e360fdc379d067d5a9734aef84c39b (commit) via 6c67b8168cd44e5900982ca3e36049792934d83d (commit) from ad137b5af4f40f7c07df7da67684082c5e4a5012 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=236f564453e360fdc379d067d5a9734aef84c39b commit 236f564453e360fdc379d067d5a9734aef84c39b Merge: ad137b5 6c67b81 Author: Brad King AuthorDate: Sat Dec 6 07:43:19 2014 -0500 Commit: CMake Topic Stage CommitDate: Sat Dec 6 07:43:19 2014 -0500 Merge topic 'custom-command-multiple-outputs' into next 6c67b816 Makefile: Workaround Borland Make bug with multiple outputs http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c67b8168cd44e5900982ca3e36049792934d83d commit 6c67b8168cd44e5900982ca3e36049792934d83d Author: Brad King AuthorDate: Sat Dec 6 07:36:52 2014 -0500 Commit: Brad King CommitDate: Sat Dec 6 07:36:52 2014 -0500 Makefile: Workaround Borland Make bug with multiple outputs Given a rule of the form out1 out2: dep1 out1 out2: dep2 Borland Make complains that there are multiple rules for "out1" even though this works when there is only one output. Instead generate out1 out2: dep1 dep2 for Borland Make, but only when there are multiple outputs. diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index 6c20952..950d440 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -49,6 +49,7 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator() lg->SetUnixCD(false); lg->SetMakeCommandEscapeTargetTwice(true); lg->SetBorlandMakeCurlyHack(true); + lg->SetNoMultiOutputMultiDepRules(true); return lg; } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 56b2b97..812ded3 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -92,6 +92,7 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3() this->SkipAssemblySourceRules = false; this->MakeCommandEscapeTargetTwice = false; this->BorlandMakeCurlyHack = false; + this->NoMultiOutputMultiDepRules = false; } //---------------------------------------------------------------------------- @@ -696,6 +697,19 @@ cmLocalUnixMakefileGenerator3 // No dependencies. The commands will always run. os << cmMakeSafe(tgt) << space << ":\n"; } + else if(this->NoMultiOutputMultiDepRules && outputs.size() >= 2) + { + // Borland make does not understand multiple dependency rules when + // there are multiple outputs, so write them all on one line. + os << cmMakeSafe(tgt) << space << ":"; + for(std::vector::const_iterator dep = depends.begin(); + dep != depends.end(); ++dep) + { + replace = this->Convert(*dep, HOME_OUTPUT, MAKERULE); + os << " " << cmMakeSafe(replace); + } + os << "\n"; + } else { // Split dependencies into multiple rule lines. This allows for diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 65265ce..7c8e27f 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -161,6 +161,9 @@ public: void SetBorlandMakeCurlyHack(bool b) { this->BorlandMakeCurlyHack = b; } + void SetNoMultiOutputMultiDepRules(bool b) + { this->NoMultiOutputMultiDepRules = b; } + // used in writing out Cmake files such as WriteDirectoryInformation static void WriteCMakeArgument(std::ostream& os, const char* s); @@ -345,6 +348,7 @@ private: bool PassMakeflags; bool MakeCommandEscapeTargetTwice; bool BorlandMakeCurlyHack; + bool NoMultiOutputMultiDepRules; //========================================================================== std::string HomeRelativeOutputPath; ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalBorlandMakefileGenerator.cxx | 1 + Source/cmLocalUnixMakefileGenerator3.cxx | 14 ++++++++++++++ Source/cmLocalUnixMakefileGenerator3.h | 4 ++++ 3 files changed, 19 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 7 00:01:19 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 7 Dec 2014 00:01:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-510-g9e6e680 Message-ID: <20141207050119.54667A8095@public.kitware.com> This is an automated email from 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 9e6e6801d05450d7895fcab5bbb4dc15f0d11657 (commit) from bec5b3df0148bc8ae9c9c777367386fb1a38ad04 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e6e6801d05450d7895fcab5bbb4dc15f0d11657 commit 9e6e6801d05450d7895fcab5bbb4dc15f0d11657 Author: Kitware Robot AuthorDate: Sun Dec 7 00:01:16 2014 -0500 Commit: Kitware Robot CommitDate: Sun Dec 7 00:01:16 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index abaa2d0..1aca3d3 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 1) -set(CMake_VERSION_PATCH 20141206) +set(CMake_VERSION_PATCH 20141207) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 8 00:01:09 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 8 Dec 2014 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-511-gcfe666f Message-ID: <20141208050109.EDB67A81E3@public.kitware.com> This is an automated email from 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 cfe666f1a2c13e6d8093dff87b362b5e4ed64114 (commit) from 9e6e6801d05450d7895fcab5bbb4dc15f0d11657 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfe666f1a2c13e6d8093dff87b362b5e4ed64114 commit cfe666f1a2c13e6d8093dff87b362b5e4ed64114 Author: Kitware Robot AuthorDate: Mon Dec 8 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Mon Dec 8 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1aca3d3..9dd227c 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 1) -set(CMake_VERSION_PATCH 20141207) +set(CMake_VERSION_PATCH 20141208) #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 Dec 8 08:54:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 08:54:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1146-ge6ad59c Message-ID: <20141208135424.C2A9DA8084@public.kitware.com> This is an automated email from 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 e6ad59c82112b8e2c9d1e9cf21b2ed62efdcbc39 (commit) via e01040636d3c8028019f00c2f226dd2f6d552732 (commit) from 236f564453e360fdc379d067d5a9734aef84c39b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6ad59c82112b8e2c9d1e9cf21b2ed62efdcbc39 commit e6ad59c82112b8e2c9d1e9cf21b2ed62efdcbc39 Merge: 236f564 e010406 Author: Brad King AuthorDate: Mon Dec 8 08:54:23 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 08:54:23 2014 -0500 Merge topic 'FindLATEX-use-FPHSA' into next e0104063 FindLATEX: Use FPHSA to report status in standard way http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e01040636d3c8028019f00c2f226dd2f6d552732 commit e01040636d3c8028019f00c2f226dd2f6d552732 Author: Christoph Gr?ninger AuthorDate: Fri Dec 5 23:42:48 2014 +0100 Commit: Christoph Gr?ninger CommitDate: Fri Dec 5 23:42:48 2014 +0100 FindLATEX: Use FPHSA to report status in standard way Otherwise LaTeX was marked as not found in the summary. Also revise the documentation. diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake index e353d38..a935f00 100644 --- a/Modules/FindLATEX.cmake +++ b/Modules/FindLATEX.cmake @@ -4,8 +4,9 @@ # # Find Latex # -# This module finds if Latex is installed and determines where the -# executables are. This code sets the following variables: +# This module finds an installed Latex and determines the location +# of the compiler. Additionally the module looks for Latex-related +# software like BibTeX. This code sets the following variables: # # :: # @@ -18,7 +19,7 @@ # LATEX2HTML_CONVERTER: path to the LaTeX2Html converter #============================================================================= -# Copyright 2002-2009 Kitware, Inc. +# Copyright 2002-2014 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -131,3 +132,8 @@ mark_as_advanced( PS2PDF_CONVERTER LATEX2HTML_CONVERTER ) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package_handle_standard_args(Latex + REQUIRED_VARS LATEX_COMPILER +) ----------------------------------------------------------------------- Summary of changes: Modules/FindLATEX.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:05 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-514-g90070a6 Message-ID: <20141208140705.9B75AA834D@public.kitware.com> This is an automated email from 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 90070a65d217935b71da8b4ac361f78b608648b0 (commit) via 88eb5824da12940e78d57fe254f17f64cdacd659 (commit) via a4f9b6f0ca9248530b9749b7fa9628053a3f8f98 (commit) from cfe666f1a2c13e6d8093dff87b362b5e4ed64114 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90070a65d217935b71da8b4ac361f78b608648b0 commit 90070a65d217935b71da8b4ac361f78b608648b0 Merge: cfe666f 88eb582 Author: Brad King AuthorDate: Mon Dec 8 09:07:04 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:04 2014 -0500 Merge topic 'try_compile-link-flags' 88eb5824 try_compile: Pass linker flags into test project (#14066) a4f9b6f0 CMakeDetermineCompilerABI: Use normal linker flags in ABI project ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-policies.7.rst | 1 + Help/policy/CMP0056.rst | 32 +++++++++++ Help/release/dev/try_compile-link-flags.rst | 6 +++ Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst | 2 + Modules/CMakeDetermineCompilerABI.cmake | 2 +- Source/cmCoreTryCompile.cxx | 36 +++++++++++++ Source/cmPolicies.cxx | 5 ++ Source/cmPolicies.h | 1 + Tests/RunCMake/try_compile/CMP0056-stderr.txt | 13 +++++ Tests/RunCMake/try_compile/CMP0056-stdout.txt | 4 ++ Tests/RunCMake/try_compile/CMP0056.cmake | 67 ++++++++++++++++++++++++ Tests/RunCMake/try_compile/RunCMakeTest.cmake | 2 + 12 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 Help/policy/CMP0056.rst create mode 100644 Help/release/dev/try_compile-link-flags.rst create mode 100644 Tests/RunCMake/try_compile/CMP0056-stderr.txt create mode 100644 Tests/RunCMake/try_compile/CMP0056-stdout.txt create mode 100644 Tests/RunCMake/try_compile/CMP0056.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:07 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-517-gc2b8874 Message-ID: <20141208140707.8EB6BA8350@public.kitware.com> This is an automated email from 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 c2b88742891da193b74aa733bce1daafc24a1557 (commit) via 7626c8dcf632a4589c2a9008f083f7777cee946a (commit) via f5ede30006f61ef5bb78d6602ebd9083cd7f9869 (commit) from 90070a65d217935b71da8b4ac361f78b608648b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2b88742891da193b74aa733bce1daafc24a1557 commit c2b88742891da193b74aa733bce1daafc24a1557 Merge: 90070a6 7626c8d Author: Brad King AuthorDate: Mon Dec 8 09:07:06 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:06 2014 -0500 Merge topic 'FindMPI-Intel-5.0.1' 7626c8dc FindMPI: Workaround Intel MPI 5.0.1 exit code problem (#15182) f5ede300 FindMPI: Factor out compiler wrapper execution into helper ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:09 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-519-gb61994d Message-ID: <20141208140709.B6D62A83FC@public.kitware.com> This is an automated email from 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 b61994d0a73df7d89373f1c3cc72610c655f9e56 (commit) via f545eb0b0b00cb02f540636549f63189f43b4870 (commit) from c2b88742891da193b74aa733bce1daafc24a1557 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b61994d0a73df7d89373f1c3cc72610c655f9e56 commit b61994d0a73df7d89373f1c3cc72610c655f9e56 Merge: c2b8874 f545eb0 Author: Brad King AuthorDate: Mon Dec 8 09:07:08 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:08 2014 -0500 Merge topic 'vs-inherit-wd' f545eb0b VS: Inherit target-level "-wd" flags in source files (#15284) ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 5 +++++ 1 file changed, 5 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:11 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-521-g413ce02 Message-ID: <20141208140711.BADAAA83A1@public.kitware.com> This is an automated email from 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 413ce0289599741b06fe14f7f8552c83277fa5bf (commit) via 636f0c1d4fa3f003fff406b27306cd6883bcec75 (commit) from b61994d0a73df7d89373f1c3cc72610c655f9e56 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=413ce0289599741b06fe14f7f8552c83277fa5bf commit 413ce0289599741b06fe14f7f8552c83277fa5bf Merge: b61994d 636f0c1 Author: Brad King AuthorDate: Mon Dec 8 09:07:10 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:10 2014 -0500 Merge topic 'ExternalProject_TEST_EXCLUDE_FROM_MAIN' 636f0c1d ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option ----------------------------------------------------------------------- Summary of changes: .../dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst | 6 +++++ Modules/ExternalProject.cmake | 25 ++++++++++++++++---- Tests/ExternalProjectLocal/CMakeLists.txt | 25 ++++++++++++++++++++ 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/ExternalProject_TEST_EXCLUDE_FROM_MAIN.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:13 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-523-g79d1e13 Message-ID: <20141208140713.8D6D6A8354@public.kitware.com> This is an automated email from 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 79d1e1347a63aef89441b43ad61303109062a55c (commit) via 29b0c8c3606f07f3baee245138552c3c0256ded6 (commit) from 413ce0289599741b06fe14f7f8552c83277fa5bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79d1e1347a63aef89441b43ad61303109062a55c commit 79d1e1347a63aef89441b43ad61303109062a55c Merge: 413ce02 29b0c8c Author: Brad King AuthorDate: Mon Dec 8 09:07:12 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:12 2014 -0500 Merge topic 'ctest-binary-pipe' 29b0c8c3 ctest --launch: write to cout and cerr in binary ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestLaunch.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:15 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-525-g47c41d9 Message-ID: <20141208140715.8C3F9A834A@public.kitware.com> This is an automated email from 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 47c41d902c00acd39c0af668e15bdafb591c8c43 (commit) via 97841dad2ba5a79acb0b22db9a01ae45f7b2e80b (commit) from 79d1e1347a63aef89441b43ad61303109062a55c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47c41d902c00acd39c0af668e15bdafb591c8c43 commit 47c41d902c00acd39c0af668e15bdafb591c8c43 Merge: 79d1e13 97841da Author: Brad King AuthorDate: Mon Dec 8 09:07:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:14 2014 -0500 Merge topic 'file-LOCK-timeout-type' 97841dad file: Use 'long' to represent the parsed LOCK TIMEOUT value ----------------------------------------------------------------------- Summary of changes: Source/cmFileCommand.cxx | 9 +++++---- Source/cmFileLock.cxx | 4 ++-- Source/cmFileLock.h | 4 ++-- Source/cmFileLockPool.cxx | 8 ++++---- Source/cmFileLockPool.h | 10 ++++++---- Source/cmFileLockUnix.cxx | 2 +- Source/cmFileLockWin32.cxx | 2 +- Source/cmSystemTools.cxx | 7 ++++--- Source/cmSystemTools.h | 4 ++-- 9 files changed, 27 insertions(+), 23 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:17 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-527-gcf54d85 Message-ID: <20141208140717.79B2BA842A@public.kitware.com> This is an automated email from 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 cf54d8597d23141273f6e2a07f00ece959bb06e3 (commit) via de022e8908cc5b3a6e0f179a81482fad4cfb6072 (commit) from 47c41d902c00acd39c0af668e15bdafb591c8c43 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf54d8597d23141273f6e2a07f00ece959bb06e3 commit cf54d8597d23141273f6e2a07f00ece959bb06e3 Merge: 47c41d9 de022e8 Author: Brad King AuthorDate: Mon Dec 8 09:07:16 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:16 2014 -0500 Merge topic 'optional-latest-language-dialects' de022e89 Add options to build CMake without latest language dialects ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:19 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-532-ge72987d Message-ID: <20141208140719.5964AA8439@public.kitware.com> This is an automated email from 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 e72987dc11b17a9c0630ba053dc4d6488f751002 (commit) via 6c67b8168cd44e5900982ca3e36049792934d83d (commit) via 65ea5eb721d820551653bf6471e83ed5f4a5ba13 (commit) via 644b4688d71cc52f8499d6103495de0909319557 (commit) via 8a4c6d2d2e66d210e5c2d59c86b3f1bff2582867 (commit) from cf54d8597d23141273f6e2a07f00ece959bb06e3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e72987dc11b17a9c0630ba053dc4d6488f751002 commit e72987dc11b17a9c0630ba053dc4d6488f751002 Merge: cf54d85 6c67b81 Author: Brad King AuthorDate: Mon Dec 8 09:07:18 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:07:18 2014 -0500 Merge topic 'custom-command-multiple-outputs' 6c67b816 Makefile: Workaround Borland Make bug with multiple outputs 65ea5eb7 Tests: Cover rebuild with multiple custom command outputs (#15116) 644b4688 Makefile: Fix rebuild with multiple custom command outputs (#15116) 8a4c6d2d Xcode: Fix rebuild with multiple custom command outputs (#15116) ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalBorlandMakefileGenerator.cxx | 1 + Source/cmGlobalXCodeGenerator.cxx | 61 ++++-------------- Source/cmGlobalXCodeGenerator.h | 3 +- Source/cmLocalUnixMakefileGenerator3.cxx | 60 ++++++++++++++++- Source/cmLocalUnixMakefileGenerator3.h | 11 ++++ Source/cmMakefileLibraryTargetGenerator.cxx | 21 +++--- Source/cmMakefileTargetGenerator.cxx | 93 +++------------------------ Source/cmMakefileTargetGenerator.h | 12 ---- Tests/BuildDepends/CMakeLists.txt | 28 ++++++++ Tests/BuildDepends/Project/CMakeLists.txt | 13 ++++ 10 files changed, 140 insertions(+), 163 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:07:45 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:07:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1158-g891a6b3 Message-ID: <20141208140745.F2B02A8435@public.kitware.com> This is an automated email from 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 891a6b335167223820d60dfb9a7b117e6e1077da (commit) via e72987dc11b17a9c0630ba053dc4d6488f751002 (commit) via cf54d8597d23141273f6e2a07f00ece959bb06e3 (commit) via 47c41d902c00acd39c0af668e15bdafb591c8c43 (commit) via 79d1e1347a63aef89441b43ad61303109062a55c (commit) via 413ce0289599741b06fe14f7f8552c83277fa5bf (commit) via b61994d0a73df7d89373f1c3cc72610c655f9e56 (commit) via c2b88742891da193b74aa733bce1daafc24a1557 (commit) via 90070a65d217935b71da8b4ac361f78b608648b0 (commit) via cfe666f1a2c13e6d8093dff87b362b5e4ed64114 (commit) via 9e6e6801d05450d7895fcab5bbb4dc15f0d11657 (commit) via bec5b3df0148bc8ae9c9c777367386fb1a38ad04 (commit) from e6ad59c82112b8e2c9d1e9cf21b2ed62efdcbc39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=891a6b335167223820d60dfb9a7b117e6e1077da commit 891a6b335167223820d60dfb9a7b117e6e1077da Merge: e6ad59c e72987d Author: Brad King AuthorDate: Mon Dec 8 09:07:30 2014 -0500 Commit: Brad King CommitDate: Mon Dec 8 09:07:30 2014 -0500 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 Dec 8 09:08:26 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:08:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc2-534-g09498b2 Message-ID: <20141208140826.28996A8449@public.kitware.com> This is an automated email from 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 09498b2ead29a64816e5c301b7465164cec25c1c (commit) via e2c431dc642225aa163fc229a0a850844d6bcff2 (commit) from e72987dc11b17a9c0630ba053dc4d6488f751002 (commit) Those revisions listed 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 Mon Dec 8 09:08:26 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:08:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1161-gf414ed1 Message-ID: <20141208140826.480F7A844A@public.kitware.com> This is an automated email from 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 f414ed162d53df1310ee02a8a8519aaf3eb6243d (commit) via 09498b2ead29a64816e5c301b7465164cec25c1c (commit) via e2c431dc642225aa163fc229a0a850844d6bcff2 (commit) from 891a6b335167223820d60dfb9a7b117e6e1077da (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f414ed162d53df1310ee02a8a8519aaf3eb6243d commit f414ed162d53df1310ee02a8a8519aaf3eb6243d Merge: 891a6b3 09498b2 Author: Brad King AuthorDate: Mon Dec 8 09:08:16 2014 -0500 Commit: Brad King CommitDate: Mon Dec 8 09:08:16 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:08:26 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:08:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc2-84-ge2c431d Message-ID: <20141208140826.9C890A844B@public.kitware.com> This is an automated email from 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 e2c431dc642225aa163fc229a0a850844d6bcff2 (commit) via 27141eede739fb4376a6fe2cec1b1171841bf7fb (commit) from eff4081bfbc7285ceeb5d6ec32a4f8682066cef6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 2 +- Help/module/FindXerces.rst | 1 - Help/module/FindXercesC.rst | 1 + Help/release/3.1.0.rst | 2 + Modules/{FindXerces.cmake => FindXercesC.cmake} | 66 +++++++++++------------ 5 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 Help/module/FindXerces.rst create mode 100644 Help/module/FindXercesC.rst rename Modules/{FindXerces.cmake => FindXercesC.cmake} (55%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 09:13:38 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 09:13:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1164-g230e535 Message-ID: <20141208141338.3745EA51F0@public.kitware.com> This is an automated email from 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 230e5355966deb3920f4399010979207cda06a27 (commit) via 6b7cb583a2bf70aa142b3824330e920ecc47861d (commit) via 1f6f114a7a61043ec0b9d6147f3b297081d214d5 (commit) from f414ed162d53df1310ee02a8a8519aaf3eb6243d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=230e5355966deb3920f4399010979207cda06a27 commit 230e5355966deb3920f4399010979207cda06a27 Merge: f414ed1 6b7cb58 Author: Brad King AuthorDate: Mon Dec 8 09:13:37 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 09:13:37 2014 -0500 Merge topic 'test-release' into next 6b7cb583 Merge branch 'release' into test-release 1f6f114a CMake 3.1.0-rc3 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b7cb583a2bf70aa142b3824330e920ecc47861d commit 6b7cb583a2bf70aa142b3824330e920ecc47861d Merge: 09498b2 1f6f114 Author: Brad King AuthorDate: Mon Dec 8 09:13:18 2014 -0500 Commit: Brad King CommitDate: Mon Dec 8 09:13:18 2014 -0500 Merge branch 'release' into test-release http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f6f114a7a61043ec0b9d6147f3b297081d214d5 commit 1f6f114a7a61043ec0b9d6147f3b297081d214d5 Author: Brad King AuthorDate: Mon Dec 8 09:09:24 2014 -0500 Commit: Brad King CommitDate: Mon Dec 8 09:09:24 2014 -0500 CMake 3.1.0-rc3 diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e1b62e9..c7f60fe 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,4 +2,4 @@ set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 1) set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 2) +set(CMake_VERSION_RC 3) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From steveire at gmail.com Mon Dec 8 13:40:54 2014 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 8 Dec 2014 13:40:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1169-gb1b54ed Message-ID: <20141208184054.1A9629A791@public.kitware.com> This is an automated email from 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 b1b54ed34a6c129445f056bd3ab0ad590f45b774 (commit) via 76a5304936fb32fbafd4de00d74e1434c140b865 (commit) via aab516bd77dd9922541fa911961a60756f035bd0 (commit) via 4bf555b0f7635afde86a67cd3ef9eb2ab83d4064 (commit) via 67f9fc26bdabee44e94cbaed52f2302f47f9a2d5 (commit) from 230e5355966deb3920f4399010979207cda06a27 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1b54ed34a6c129445f056bd3ab0ad590f45b774 commit b1b54ed34a6c129445f056bd3ab0ad590f45b774 Merge: 230e535 76a5304 Author: Stephen Kelly AuthorDate: Mon Dec 8 13:40:52 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 13:40:52 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next 76a53049 Export: Issue error if generating unusable export file (#15258). aab516bd Export: Diagnose issues in INCLUDES DESTINATION while generating (#15258). 4bf555b0 cmPolicies: Remove superfluous newline. 67f9fc26 Export: Test error on export of target and export with mixed paths. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76a5304936fb32fbafd4de00d74e1434c140b865 commit 76a5304936fb32fbafd4de00d74e1434c140b865 Author: Stephen Kelly AuthorDate: Mon Dec 8 19:29:56 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 19:40:33 2014 +0100 Export: Issue error if generating unusable export file (#15258). Diagnose presence of $ in exported target properties, as can appear in user code, or generated for relative paths inside a $ generator expression. The case of use of install(TARGETS) with a relative path in INCLUDES DESTINATION would also be caught by this diagnostic, but that is handled separately because in that case the $ is generated by cmake internally, so a more-specific diagnostic is desired. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 1f39d7a..37956dc 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -171,7 +171,7 @@ void cmExportFileGenerator::PopulateInterfaceProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions(propName, prepro, target, missingTargets); properties[outputName] = prepro; } @@ -205,7 +205,8 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions("INTERFACE_LINK_LIBRARIES", + prepro, target, missingTargets, ReplaceFreeTargets); properties["INTERFACE_LINK_LIBRARIES"] = prepro; @@ -383,7 +384,8 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( tei->InterfaceIncludeDirectories, preprocessRule, true); - this->ReplaceInstallPrefix(dirs); + this->ReplaceInstallPrefix(tei->Target, "INTERFACE_INCLUDE_DIRECTORIES", + dirs); cmsys::auto_ptr cge = ge.Parse(dirs); std::string exportDirs = cge->Evaluate(target->GetMakefile(), "", false, target); @@ -421,8 +423,9 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( true); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets); + this->ResolveTargetsInGeneratorExpressions("INTERFACE_INCLUDE_DIRECTORIES", + prepro, target, + missingTargets); if (!checkInterfaceDirs(prepro, target)) { @@ -607,6 +610,7 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input, //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets, @@ -614,7 +618,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( { if (replace == NoReplaceFreeTargets) { - this->ResolveTargetsInGeneratorExpression(input, target, missingTargets); + this->ResolveTargetsInGeneratorExpression(propName, input, + target, missingTargets); return; } std::vector parts; @@ -631,7 +636,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( } else { - this->ResolveTargetsInGeneratorExpression( + this->ResolveTargetsInGeneratorExpression(propName, *li, target, missingTargets); @@ -644,6 +649,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets) @@ -709,7 +715,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( lastPos = endPos; } - this->ReplaceInstallPrefix(input); + this->ReplaceInstallPrefix(target, propName, input); if (!errorString.empty()) { @@ -719,7 +725,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( //---------------------------------------------------------------------------- void -cmExportFileGenerator::ReplaceInstallPrefix(std::string &) +cmExportFileGenerator::ReplaceInstallPrefix(cmTarget*, + std::string const&, std::string &) { // Do nothing } @@ -792,9 +799,11 @@ cmExportFileGenerator preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets, - ReplaceFreeTargets); + this->ResolveTargetsInGeneratorExpressions( + "LINK_INTERFACE_LIBRARIES" + suffix, + prepro, target, + missingTargets, + ReplaceFreeTargets); properties["IMPORTED_LINK_INTERFACE_LIBRARIES" + suffix] = prepro; } } diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 919924e..d3b9fee 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -151,7 +151,9 @@ protected: NoReplaceFreeTargets }; - void ResolveTargetsInGeneratorExpressions(std::string &input, + void ResolveTargetsInGeneratorExpressions( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets, FreeTargetsReplace replace = NoReplaceFreeTargets); @@ -187,11 +189,15 @@ private: bool AddTargetNamespace(std::string &input, cmTarget* target, std::vector &missingTargets); - void ResolveTargetsInGeneratorExpression(std::string &input, + void ResolveTargetsInGeneratorExpression( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); virtual std::string InstallNameDir(cmTarget* target, const std::string& config) = 0; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 5bc36a5..ebe5b85 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -299,14 +299,68 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) } //---------------------------------------------------------------------------- +static bool checkCMP0057(cmTarget* target, std::string const& propName, + std::string const& input, cmExportSet* exportSet) +{ + cmOStringStream e; + cmake::MessageType messageType = cmake::FATAL_ERROR; + cmMakefile* mf = target->GetMakefile(); + switch(target->GetPolicyStatusCMP0057()) + { + case cmPolicies::WARN: + e << (mf->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; + case cmPolicies::OLD: + messageType = cmake::AUTHOR_WARNING; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + break; + } + e << "Target \"" + << target->GetName() + << "\" is installed with a path relative to the installation " + "prefix\n \"" << input << "\"\nin its " << propName + << " property. The target is part of export set \"" + << exportSet->GetName() << "\" which is installed " + "with an absolute path as its DESTINATION. This mixing of " + "absolute and relative paths creates unusable target export files."; + mf->IssueMessage(messageType, e.str()); + if (messageType == cmake::FATAL_ERROR) + { + return false; + } + return true; +} + +//---------------------------------------------------------------------------- void -cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string &input) +cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input) { std::string::size_type pos = 0; std::string::size_type lastPos = pos; + if (input.find("${_IMPORT_PREFIX}") != std::string::npos + && this->ImportPrefix.empty()) + { + if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) + { + return; + } + } + while((pos = input.find("$", lastPos)) != input.npos) { + if (this->ImportPrefix.empty()) + { + if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) + { + return; + } + } std::string::size_type endPos = pos + sizeof("$") - 1; input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}"); lastPos = endPos; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 3d7b0c6..0723085 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -62,7 +62,9 @@ protected: cmTarget* depender, cmTarget* dependee); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); void ComplainAboutMissingTarget(cmTarget* depender, cmTarget* dependee, diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt new file mode 100644 index 0000000..2968b91 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake new file mode 100644 index 0000000..c7255db --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt new file mode 100644 index 0000000..860f62f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake new file mode 100644 index 0000000..1c27fd7 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt new file mode 100644 index 0000000..1426fff --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. + Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake new file mode 100644 index 0000000..06e793e --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt new file mode 100644 index 0000000..0084903 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\${_IMPORT_PREFIX}/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake new file mode 100644 index 0000000..912aaef --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt new file mode 100644 index 0000000..9cad673 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\${_IMPORT_PREFIX}/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake new file mode 100644 index 0000000..e6f5b96 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt new file mode 100644 index 0000000..e0b4627 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. + Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "\${_IMPORT_PREFIX}/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake new file mode 100644 index 0000000..6d112b2 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 296d440..2ebe8c0 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -8,3 +8,9 @@ run_cmake(RelativeLibDir) run_cmake(RelativeIncludeDestination-CMP0057-NEW) run_cmake(RelativeIncludeDestination-CMP0057-OLD) run_cmake(RelativeIncludeDestination-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aab516bd77dd9922541fa911961a60756f035bd0 commit aab516bd77dd9922541fa911961a60756f035bd0 Author: Stephen Kelly AuthorDate: Sun Dec 7 22:34:44 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 19:40:10 2014 +0100 Export: Diagnose issues in INCLUDES DESTINATION while generating (#15258). The _IMPORT_PREFIX variable is generated in export files only if the installation destination is relative. If packagers set the path to an absolute destination, the generated file must not have any references to the _IMPORT_PREFIX as it is undefined. A use of _IMPORT_PREFIX is generated for content passed to install(TARGETS) in the INCLUDES DESTINATION component, if the content is a relative path. Issue a message to notify the user that that the generated file is unusable, and introduce policy CMP0057 to control the severity of the message. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 96f39e6..76ca5d4 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -114,3 +114,4 @@ All Policies /policy/CMP0054 /policy/CMP0055 /policy/CMP0056 + /policy/CMP0057 diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst new file mode 100644 index 0000000..4b456bf --- /dev/null +++ b/Help/policy/CMP0057.rst @@ -0,0 +1,20 @@ +CMP0057 +------- + +Error on export with bad INCLUDES DESTINATION. + +CMake 3.1 and lower generated unusable files with the +:command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used +with it, and a relative path was passed to the ``INCLUDES DESTINATION`` of a +target in the specified export set. In such cases, a use of an internal +variable was generated, although the internal variable was unset. + +The ``OLD`` behavior for this policy is to issue a warning if a the +:command:`install(EXPORT)` command generates such an unusable file. The +``NEW`` behavior for this policy is to issue an error instead of generating +the file. + +This policy was introduced in CMake version 3.2. +CMake version |release| warns when the policy is not set and uses +``OLD`` behavior. Use the :command:`cmake_policy` command to set it to +``OLD`` or ``NEW`` explicitly. diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 23180f1..5bc36a5 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -37,15 +37,70 @@ std::string cmExportInstallFileGenerator::GetConfigImportFileGlob() } //---------------------------------------------------------------------------- +bool cmExportInstallFileGenerator +::CheckIncludesDestinationContent(cmTargetExport* tei, + cmExportSet* exportSet) +{ + std::vector parts; + cmGeneratorExpression::Split(tei->InterfaceIncludeDirectories, parts); + for (std::vector::const_iterator it = parts.begin(); + it != parts.end(); ++it) + { + if (!cmSystemTools::FileIsFullPath(*it)) + { + if (cmGeneratorExpression::Find(*it) != 0) + { + if (this->ImportPrefix.empty()) + { + cmOStringStream e; + cmake::MessageType messageType = cmake::FATAL_ERROR; + cmMakefile* mf = tei->Target->GetMakefile(); + switch(tei->Target->GetPolicyStatusCMP0057()) + { + case cmPolicies::WARN: + e << (mf->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; + case cmPolicies::OLD: + messageType = cmake::AUTHOR_WARNING; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + break; + } + e << "Target \"" + << tei->Target->GetName() + << "\" is installed as part of export set \"" + << exportSet->GetName() << "\" with an INCLUDES DESTINATION " + "containing relative path\n \"" << *it + << "\"\nThe export set \"" + << exportSet->GetName() + << "\" is installed with an absolute path as its DESTINATION. " + "This mixing of absolute and relative paths creates unusable " + "target export files."; + mf->IssueMessage(messageType, e.str()); + if (messageType == cmake::FATAL_ERROR) + { + return false; + } + } + } + } + } + return true; +} + +//---------------------------------------------------------------------------- bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { std::vector allTargets; + cmExportSet* exportSet = this->IEGen->GetExportSet(); { std::string expectedTargets; std::string sep; for(std::vector::const_iterator - tei = this->IEGen->GetExportSet()->GetTargetExports()->begin(); - tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) + tei = exportSet->GetTargetExports()->begin(); + tei != exportSet->GetTargetExports()->end(); ++tei) { expectedTargets += sep + this->Namespace + (*tei)->Target->GetExportName(); sep = " "; @@ -58,7 +113,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { cmOStringStream e; e << "install(EXPORT \"" - << this->IEGen->GetExportSet()->GetName() + << exportSet->GetName() << "\" ...) " << "includes target \"" << te->Target->GetName() << "\" more than once in the export set."; cmSystemTools::Error(e.str().c_str()); @@ -141,6 +196,11 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) ImportPropertyMap properties; + if (!this->CheckIncludesDestinationContent(*tei, exportSet)) + { + return false; + } + this->PopulateIncludeDirectoriesInterface(*tei, cmGeneratorExpression::InstallInterface, properties, missingTargets); diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index b851ad5..3d7b0c6 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -16,6 +16,7 @@ class cmInstallExportGenerator; class cmInstallTargetGenerator; +class cmExportSet; /** \class cmExportInstallFileGenerator * \brief Generate a file exporting targets from an install tree. @@ -87,6 +88,9 @@ protected: std::string InstallNameDir(cmTarget* target, const std::string& config); + bool CheckIncludesDestinationContent(cmTargetExport* tei, + cmExportSet* exportSet); + cmInstallExportGenerator* IEGen; std::string ImportPrefix; diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 1a27a25..8110f6e 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -374,6 +374,11 @@ cmPolicies::cmPolicies() CMP0056, "CMP0056", "Honor link flags in try_compile() source-file signature.", 3,2,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0057, "CMP0057", + "Error on export with bad INCLUDES DESTINATION.", + 3,2,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 2ad4890..26c351f 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -112,6 +112,7 @@ public: /// or keywords when unquoted. CMP0055, ///< Strict checking for break() command. CMP0056, ///< Honor link flags in try_compile() source-file signature. + CMP0057, ///< Error on export with bad INCLUDES DESTINATION. /** \brief Always the last entry. * diff --git a/Source/cmTarget.h b/Source/cmTarget.h index a3ecca0..dc4e6c6 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -34,7 +34,8 @@ F(CMP0041) \ F(CMP0042) \ F(CMP0046) \ - F(CMP0052) + F(CMP0052) \ + F(CMP0057) class cmake; class cmMakefile; diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index f4b744b..7a59902 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -17,6 +17,7 @@ \* CMP0042 \* CMP0046 \* CMP0052 + \* CMP0057 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt new file mode 100644 index 0000000..8cd27c2 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt @@ -0,0 +1,9 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed as part of export set "exp" with an INCLUDES + DESTINATION containing relative path + + "include" + + The export set "exp" is installed with an absolute path as its DESTINATION. + This mixing of absolute and relative paths creates unusable target export + files. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake new file mode 100644 index 0000000..cab9ac6 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + INCLUDES DESTINATION include +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt new file mode 100644 index 0000000..79c92a1 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt @@ -0,0 +1,10 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed as part of export set "exp" with an INCLUDES + DESTINATION containing relative path + + "include" + + The export set "exp" is installed with an absolute path as its DESTINATION. + This mixing of absolute and relative paths creates unusable target export + files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake new file mode 100644 index 0000000..58bcbb7 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + INCLUDES DESTINATION include +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt new file mode 100644 index 0000000..fd9a743 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt @@ -0,0 +1,14 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. + Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + Target "somelib" is installed as part of export set "exp" with an INCLUDES + DESTINATION containing relative path + + "include" + + The export set "exp" is installed with an absolute path as its DESTINATION. + This mixing of absolute and relative paths creates unusable target export + files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake new file mode 100644 index 0000000..82bde5d --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + INCLUDES DESTINATION include +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 32cf30c..296d440 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -5,3 +5,6 @@ run_cmake(AppendExport) run_cmake(OldIface) run_cmake(NoExportSet) run_cmake(RelativeLibDir) +run_cmake(RelativeIncludeDestination-CMP0057-NEW) +run_cmake(RelativeIncludeDestination-CMP0057-OLD) +run_cmake(RelativeIncludeDestination-CMP0057-WARN) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bf555b0f7635afde86a67cd3ef9eb2ab83d4064 commit 4bf555b0f7635afde86a67cd3ef9eb2ab83d4064 Author: Stephen Kelly AuthorDate: Thu May 15 19:15:02 2014 +0200 Commit: Stephen Kelly CommitDate: Mon Dec 8 19:08:43 2014 +0100 cmPolicies: Remove superfluous newline. diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index c393c2f..2ad4890 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -107,7 +107,6 @@ public: CMP0051, ///< List TARGET_OBJECTS in SOURCES target property CMP0052, ///< Reject source and build dirs in installed /// INTERFACE_INCLUDE_DIRECTORIES - CMP0053, ///< Simplify variable reference and escape sequence evaluation CMP0054, ///< Only interpret if() arguments as variables /// or keywords when unquoted. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67f9fc26bdabee44e94cbaed52f2302f47f9a2d5 commit 67f9fc26bdabee44e94cbaed52f2302f47f9a2d5 Author: Stephen Kelly AuthorDate: Sun Dec 7 22:19:08 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 19:08:43 2014 +0100 Export: Test error on export of target and export with mixed paths. If the export is installed to a DESTINATION path which is absolute, the LIBRARY DESTINATION must also be absolute. The LIBRARY DESTINATION is used as the IMPORTED_LOCATION of the generated IMPORTED target, and it may conditionally contain a reference to ${_IMPORT_PREFIX}, which is only generated if exported to a relative path. diff --git a/Tests/RunCMake/export/RelativeLibDir-result.txt b/Tests/RunCMake/export/RelativeLibDir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeLibDir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeLibDir-stderr.txt b/Tests/RunCMake/export/RelativeLibDir-stderr.txt new file mode 100644 index 0000000..98fd01f --- /dev/null +++ b/Tests/RunCMake/export/RelativeLibDir-stderr.txt @@ -0,0 +1 @@ +CMake Error: install\(EXPORT "exp"\) given absolute DESTINATION "[^"]*" but the export references an installation of target "somelib" which has relative DESTINATION "lib". diff --git a/Tests/RunCMake/export/RelativeLibDir.cmake b/Tests/RunCMake/export/RelativeLibDir.cmake new file mode 100644 index 0000000..a663451 --- /dev/null +++ b/Tests/RunCMake/export/RelativeLibDir.cmake @@ -0,0 +1,10 @@ + +add_library(somelib SHARED empty.cpp) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 4b04f18..32cf30c 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -4,3 +4,4 @@ run_cmake(TargetNotFound) run_cmake(AppendExport) run_cmake(OldIface) run_cmake(NoExportSet) +run_cmake(RelativeLibDir) diff --git a/Tests/RunCMake/export/empty.cpp b/Tests/RunCMake/export/empty.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/export/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-policies.7.rst | 1 + Help/policy/CMP0057.rst | 20 ++++ Source/cmExportFileGenerator.cxx | 33 ++++-- Source/cmExportFileGenerator.h | 12 +- Source/cmExportInstallFileGenerator.cxx | 122 +++++++++++++++++++- Source/cmExportInstallFileGenerator.h | 8 +- Source/cmPolicies.cxx | 5 + Source/cmPolicies.h | 2 +- Source/cmTarget.h | 3 +- .../RunCMake/TargetPolicies/PolicyList-stderr.txt | 1 + ...ativeIncludeDestination-CMP0057-NEW-result.txt} | 0 ...lativeIncludeDestination-CMP0057-NEW-stderr.txt | 9 ++ .../RelativeIncludeDestination-CMP0057-NEW.cmake | 13 +++ ...ativeIncludeDestination-CMP0057-OLD-result.txt} | 0 ...lativeIncludeDestination-CMP0057-OLD-stderr.txt | 10 ++ .../RelativeIncludeDestination-CMP0057-OLD.cmake | 13 +++ ...tiveIncludeDestination-CMP0057-WARN-result.txt} | 0 ...ativeIncludeDestination-CMP0057-WARN-stderr.txt | 14 +++ .../RelativeIncludeDestination-CMP0057-WARN.cmake | 11 ++ ...irectory-CMP0057-INSTALL_PREFIX-NEW-result.txt} | 0 ...Directory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt | 10 ++ ...cludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake | 13 +++ ...irectory-CMP0057-INSTALL_PREFIX-OLD-result.txt} | 0 ...Directory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt | 11 ++ ...cludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake | 13 +++ ...rectory-CMP0057-INSTALL_PREFIX-WARN-result.txt} | 0 ...irectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt | 15 +++ ...ludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake | 11 ++ ...elativeIncludeDirectory-CMP0057-NEW-result.txt} | 0 ...RelativeIncludeDirectory-CMP0057-NEW-stderr.txt | 10 ++ .../RelativeIncludeDirectory-CMP0057-NEW.cmake | 13 +++ ...elativeIncludeDirectory-CMP0057-OLD-result.txt} | 0 ...RelativeIncludeDirectory-CMP0057-OLD-stderr.txt | 11 ++ .../RelativeIncludeDirectory-CMP0057-OLD.cmake | 13 +++ ...lativeIncludeDirectory-CMP0057-WARN-result.txt} | 0 ...elativeIncludeDirectory-CMP0057-WARN-stderr.txt | 15 +++ .../RelativeIncludeDirectory-CMP0057-WARN.cmake | 11 ++ .../RelativeLibDir-result.txt} | 0 Tests/RunCMake/export/RelativeLibDir-stderr.txt | 1 + Tests/RunCMake/export/RelativeLibDir.cmake | 10 ++ Tests/RunCMake/export/RunCMakeTest.cmake | 10 ++ Tests/RunCMake/{CMP0022 => export}/empty.cpp | 0 42 files changed, 422 insertions(+), 22 deletions(-) create mode 100644 Help/policy/CMP0057.rst copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => export/RelativeIncludeDestination-CMP0057-NEW-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => export/RelativeIncludeDestination-CMP0057-OLD-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => export/RelativeIncludeDestination-CMP0057-WARN-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => export/RelativeIncludeDirectory-CMP0057-NEW-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => export/RelativeIncludeDirectory-CMP0057-OLD-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => export/RelativeIncludeDirectory-CMP0057-WARN-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => export/RelativeLibDir-result.txt} (100%) create mode 100644 Tests/RunCMake/export/RelativeLibDir-stderr.txt create mode 100644 Tests/RunCMake/export/RelativeLibDir.cmake copy Tests/RunCMake/{CMP0022 => export}/empty.cpp (100%) hooks/post-receive -- CMake From steveire at gmail.com Mon Dec 8 13:51:27 2014 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 8 Dec 2014 13:51:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1171-g8f8db00 Message-ID: <20141208185127.EBB24A7F28@public.kitware.com> This is an automated email from 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 8f8db003453933a0b468cdf5d58bc6b11cc98b3a (commit) via a1e587bad3ecbbec1d3b1d559a956dfcbc3b0634 (commit) from b1b54ed34a6c129445f056bd3ab0ad590f45b774 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f8db003453933a0b468cdf5d58bc6b11cc98b3a commit 8f8db003453933a0b468cdf5d58bc6b11cc98b3a Merge: b1b54ed a1e587b Author: Stephen Kelly AuthorDate: Mon Dec 8 13:51:27 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 13:51:27 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next a1e587ba Fix policy docs. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1e587bad3ecbbec1d3b1d559a956dfcbc3b0634 commit a1e587bad3ecbbec1d3b1d559a956dfcbc3b0634 Author: Stephen Kelly AuthorDate: Mon Dec 8 19:29:56 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 19:51:02 2014 +0100 Fix policy docs. diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst index 4b456bf..5a790b0 100644 --- a/Help/policy/CMP0057.rst +++ b/Help/policy/CMP0057.rst @@ -6,8 +6,12 @@ Error on export with bad INCLUDES DESTINATION. CMake 3.1 and lower generated unusable files with the :command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used with it, and a relative path was passed to the ``INCLUDES DESTINATION`` of a -target in the specified export set. In such cases, a use of an internal -variable was generated, although the internal variable was unset. +target in the specified export set. Unusable files could also be generated +if the ``$`` generator expression was used, despite an +export with an absolute ``DESTINATION``, or if the ``$`` +generator expression was used containing a relative path. In such cases, +a use of an internal variable was generated, although the internal +variable was unset. The ``OLD`` behavior for this policy is to issue a warning if a the :command:`install(EXPORT)` command generates such an unusable file. The ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0057.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Mon Dec 8 13:52:40 2014 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 8 Dec 2014 13:52:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1173-g76b4b59 Message-ID: <20141208185240.39380A7FC4@public.kitware.com> This is an automated email from 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 76b4b594e096249fac2b26678ad2d48985574088 (commit) via d41c3ecb89233857b92e494d00e89dbd315376ea (commit) from 8f8db003453933a0b468cdf5d58bc6b11cc98b3a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76b4b594e096249fac2b26678ad2d48985574088 commit 76b4b594e096249fac2b26678ad2d48985574088 Merge: 8f8db00 d41c3ec Author: Stephen Kelly AuthorDate: Mon Dec 8 13:52:39 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 13:52:39 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next d41c3ecb Export: Issue error if generating unusable export file (#15258). http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d41c3ecb89233857b92e494d00e89dbd315376ea commit d41c3ecb89233857b92e494d00e89dbd315376ea Author: Stephen Kelly AuthorDate: Mon Dec 8 19:29:56 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 19:51:49 2014 +0100 Export: Issue error if generating unusable export file (#15258). Diagnose presence of $ in exported target properties, as can appear in user code, or generated for relative paths inside a $ generator expression. The case of use of install(TARGETS) with a relative path in INCLUDES DESTINATION would also be caught by this diagnostic, but that is handled separately because in that case the $ is generated by cmake internally, so a more-specific diagnostic is desired. Extend policy CMP0057 to cover this diagnostic. diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst index 4b456bf..5a790b0 100644 --- a/Help/policy/CMP0057.rst +++ b/Help/policy/CMP0057.rst @@ -6,8 +6,12 @@ Error on export with bad INCLUDES DESTINATION. CMake 3.1 and lower generated unusable files with the :command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used with it, and a relative path was passed to the ``INCLUDES DESTINATION`` of a -target in the specified export set. In such cases, a use of an internal -variable was generated, although the internal variable was unset. +target in the specified export set. Unusable files could also be generated +if the ``$`` generator expression was used, despite an +export with an absolute ``DESTINATION``, or if the ``$`` +generator expression was used containing a relative path. In such cases, +a use of an internal variable was generated, although the internal +variable was unset. The ``OLD`` behavior for this policy is to issue a warning if a the :command:`install(EXPORT)` command generates such an unusable file. The diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 1f39d7a..37956dc 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -171,7 +171,7 @@ void cmExportFileGenerator::PopulateInterfaceProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions(propName, prepro, target, missingTargets); properties[outputName] = prepro; } @@ -205,7 +205,8 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions("INTERFACE_LINK_LIBRARIES", + prepro, target, missingTargets, ReplaceFreeTargets); properties["INTERFACE_LINK_LIBRARIES"] = prepro; @@ -383,7 +384,8 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( tei->InterfaceIncludeDirectories, preprocessRule, true); - this->ReplaceInstallPrefix(dirs); + this->ReplaceInstallPrefix(tei->Target, "INTERFACE_INCLUDE_DIRECTORIES", + dirs); cmsys::auto_ptr cge = ge.Parse(dirs); std::string exportDirs = cge->Evaluate(target->GetMakefile(), "", false, target); @@ -421,8 +423,9 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( true); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets); + this->ResolveTargetsInGeneratorExpressions("INTERFACE_INCLUDE_DIRECTORIES", + prepro, target, + missingTargets); if (!checkInterfaceDirs(prepro, target)) { @@ -607,6 +610,7 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input, //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets, @@ -614,7 +618,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( { if (replace == NoReplaceFreeTargets) { - this->ResolveTargetsInGeneratorExpression(input, target, missingTargets); + this->ResolveTargetsInGeneratorExpression(propName, input, + target, missingTargets); return; } std::vector parts; @@ -631,7 +636,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( } else { - this->ResolveTargetsInGeneratorExpression( + this->ResolveTargetsInGeneratorExpression(propName, *li, target, missingTargets); @@ -644,6 +649,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets) @@ -709,7 +715,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( lastPos = endPos; } - this->ReplaceInstallPrefix(input); + this->ReplaceInstallPrefix(target, propName, input); if (!errorString.empty()) { @@ -719,7 +725,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( //---------------------------------------------------------------------------- void -cmExportFileGenerator::ReplaceInstallPrefix(std::string &) +cmExportFileGenerator::ReplaceInstallPrefix(cmTarget*, + std::string const&, std::string &) { // Do nothing } @@ -792,9 +799,11 @@ cmExportFileGenerator preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets, - ReplaceFreeTargets); + this->ResolveTargetsInGeneratorExpressions( + "LINK_INTERFACE_LIBRARIES" + suffix, + prepro, target, + missingTargets, + ReplaceFreeTargets); properties["IMPORTED_LINK_INTERFACE_LIBRARIES" + suffix] = prepro; } } diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 919924e..d3b9fee 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -151,7 +151,9 @@ protected: NoReplaceFreeTargets }; - void ResolveTargetsInGeneratorExpressions(std::string &input, + void ResolveTargetsInGeneratorExpressions( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets, FreeTargetsReplace replace = NoReplaceFreeTargets); @@ -187,11 +189,15 @@ private: bool AddTargetNamespace(std::string &input, cmTarget* target, std::vector &missingTargets); - void ResolveTargetsInGeneratorExpression(std::string &input, + void ResolveTargetsInGeneratorExpression( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); virtual std::string InstallNameDir(cmTarget* target, const std::string& config) = 0; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 5bc36a5..ebe5b85 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -299,14 +299,68 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) } //---------------------------------------------------------------------------- +static bool checkCMP0057(cmTarget* target, std::string const& propName, + std::string const& input, cmExportSet* exportSet) +{ + cmOStringStream e; + cmake::MessageType messageType = cmake::FATAL_ERROR; + cmMakefile* mf = target->GetMakefile(); + switch(target->GetPolicyStatusCMP0057()) + { + case cmPolicies::WARN: + e << (mf->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; + case cmPolicies::OLD: + messageType = cmake::AUTHOR_WARNING; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + break; + } + e << "Target \"" + << target->GetName() + << "\" is installed with a path relative to the installation " + "prefix\n \"" << input << "\"\nin its " << propName + << " property. The target is part of export set \"" + << exportSet->GetName() << "\" which is installed " + "with an absolute path as its DESTINATION. This mixing of " + "absolute and relative paths creates unusable target export files."; + mf->IssueMessage(messageType, e.str()); + if (messageType == cmake::FATAL_ERROR) + { + return false; + } + return true; +} + +//---------------------------------------------------------------------------- void -cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string &input) +cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input) { std::string::size_type pos = 0; std::string::size_type lastPos = pos; + if (input.find("${_IMPORT_PREFIX}") != std::string::npos + && this->ImportPrefix.empty()) + { + if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) + { + return; + } + } + while((pos = input.find("$", lastPos)) != input.npos) { + if (this->ImportPrefix.empty()) + { + if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) + { + return; + } + } std::string::size_type endPos = pos + sizeof("$") - 1; input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}"); lastPos = endPos; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 3d7b0c6..0723085 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -62,7 +62,9 @@ protected: cmTarget* depender, cmTarget* dependee); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); void ComplainAboutMissingTarget(cmTarget* depender, cmTarget* dependee, diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt new file mode 100644 index 0000000..2968b91 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake new file mode 100644 index 0000000..c7255db --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt new file mode 100644 index 0000000..860f62f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake new file mode 100644 index 0000000..1c27fd7 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt new file mode 100644 index 0000000..1426fff --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. + Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake new file mode 100644 index 0000000..06e793e --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt new file mode 100644 index 0000000..0084903 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\${_IMPORT_PREFIX}/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake new file mode 100644 index 0000000..912aaef --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt new file mode 100644 index 0000000..9cad673 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\${_IMPORT_PREFIX}/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake new file mode 100644 index 0000000..e6f5b96 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt new file mode 100644 index 0000000..e0b4627 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. + Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "\${_IMPORT_PREFIX}/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake new file mode 100644 index 0000000..6d112b2 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 296d440..2ebe8c0 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -8,3 +8,9 @@ run_cmake(RelativeLibDir) run_cmake(RelativeIncludeDestination-CMP0057-NEW) run_cmake(RelativeIncludeDestination-CMP0057-OLD) run_cmake(RelativeIncludeDestination-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 14:37:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 14:37:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-451-g95655dc Message-ID: <20141208193724.0D036A82D0@public.kitware.com> This is an automated email from 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 95655dc730118202464f5ac8289af89c29c4a4a7 (commit) via 1f6f114a7a61043ec0b9d6147f3b297081d214d5 (commit) from 09498b2ead29a64816e5c301b7465164cec25c1c (commit) Those revisions listed 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 Mon Dec 8 14:37:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 14:37:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1090-g82cc543 Message-ID: <20141208193724.3026EA82D1@public.kitware.com> This is an automated email from 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 82cc543238b2b5735ccbfa6938d98a14634cad19 (commit) via 95655dc730118202464f5ac8289af89c29c4a4a7 (commit) from 76b4b594e096249fac2b26678ad2d48985574088 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82cc543238b2b5735ccbfa6938d98a14634cad19 commit 82cc543238b2b5735ccbfa6938d98a14634cad19 Merge: 76b4b59 95655dc Author: Brad King AuthorDate: Mon Dec 8 14:37:09 2014 -0500 Commit: Brad King CommitDate: Mon Dec 8 14:37:09 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 14:37:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 14:37:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc3 Message-ID: <20141208193724.3D925A82DA@public.kitware.com> This is an automated email from 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 1f6f114a7a61043ec0b9d6147f3b297081d214d5 (commit) from e2c431dc642225aa163fc229a0a850844d6bcff2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 14:37:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 14:37:24 -0500 (EST) Subject: [Cmake-commits] CMake annotated tag, v3.1.0-rc3, created. v3.1.0-rc3 Message-ID: <20141208193724.571C0A82DA@public.kitware.com> This is an automated email 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.1.0-rc3 has been created at b4b2cd5327e5c2afe66b09828ee130df2f5a1a22 (tag) tagging 1f6f114a7a61043ec0b9d6147f3b297081d214d5 (commit) replaces v3.1.0-rc2 tagged by Brad King on Mon Dec 8 14:31:18 2014 -0500 - Log ----------------------------------------------------------------- CMake 3.1.0-rc3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUhfyOAAoJEOyP7zp7+07aEQQP/iwAIJ1bgI55WHxKRA1McoaQ XdYq6U2uCUYbSPriw4mzEkZCyB53lVBJPnTxIY9b7uPIFe/r7HpxMMv36wkpyHjg eQsELb1KBs+p+RjPFWekQ3M6tJfyxeNh7HFqfFQpk9uAhBnF4kRRPrBGtHfofa6s k9ATKrJHMQve5Ap8oPUDefl3NT85B0BYVf3Q9YK8anCAyI4m/dSqZC25tS7+3JOA ooU1xlz5IQ7zNoCdxgtiGWQh+hTsAAn9x/lJQLq5+5yys9ioGAtV33A2jKZq81NG Jn2KZGUwb/b/otsa/gRcp9kgXxPPnr/MCqNNQZwTX2OTQ5gd9pUig0T++neypV0c nb20epumhFiAaP0PutdAxG88faJPCBqVV5k6cDj2VdoTskSsLj7Pqsms/JrspqfL HMAw5Wv6rwuLqQcbEn1vFK4R233Ii7/kdLoKF42A4aSqzE1OTDfIb/DuyUsHYlbT LqbbYtPdz7zGmHTRHFVCYWkqEyr495FmHBaR6qNtXvX2TPABqOEaovuuFBK+WPuZ b9YZ3DDW1QiLcQg9w/676wxPm8J2lK1jHvO0KYYrc74iUF8dXnhBJQ3DwWmw3W1B PrxQVUI9Qww96V4KiQXBQA/CdobIzVSoD5RGhQ08KX4goBey0d1NL4/AEvTm3qJI 0r1Ng4gl0WpYi/4NWDJ/ =HOTs -----END PGP SIGNATURE----- Ben Boeckel (1): Revert "ClearMatches: Only clear matches which were actually set" (#15261) Brad King (56): Help: Document COMPONENT option of install(SCRIPT/CODE) (#14956) Do not use just-built CMake to install itself when cross-compiling (#15248) Merge branch 'doc-install-SCRIPT-CODE-COMPONENT' into release Merge branch 'no-AppleClang-C-features' into release Merge branch 'no-cmake-self-install-when-cross-compiling' into release Merge branch 'vs-nsight-tegra-version' into release KWSys SharedForward: Hard-code the ldpath buffer size to below VS 14 limit VS: Rename VS 14 generator to 'Visual Studio 14 2015' Merge branch 'kwsys-SharedForward-vs14' into release Merge branch 'vs14-is-2015' into release Help: target_include_directories does not allow target names Merge branch 'doc-target_include_directories-fixup' into release Utilities/Sphinx: Add missing call to note_explicit_target Merge branch 'doc-sphinx-cmake-fixup' into release Merge branch 'vs-check-phone-store-tools' into release FindJava: Do not accept OS X stub 'java' as Java Merge branch 'FindJava-no-osx-stub' into release Merge branch 'backport-fix-CMP0054-MSVC' into release Merge branch 'fix-openmp-fortran' into release Merge branch 'default-lang-dialect' into release Merge branch 'fix-GNU-CXX-dialect-versions' into release Merge branch 'fix-WCDH-docs' into release Merge branch 'C-features-Wundef' into release Merge branch 'FindwxWidgets-new-versions' into release Merge branch 'revert-cached-regex-clear' into release Fix lookup of source names after conversion to their actual case (#15259) Merge branch 'fix-source-case-matching' into release Help: Format set_property and get_property command docs Help: Add 3.1 release notes for INSTALL property scope Merge branch 'doc-CMP0053-dedup-char' into release Merge branch 'doc-installed-file-property' into release Merge branch 'fix-transitive-OBJECT_SOURCES-context' into release Merge branch 'target-sources-error-conditions' into release Merge branch 'doc-ctest-j-typo' into release CMakeParseImplicitLinkInfo: Fix implicit library logging Makefile: Do not create an empty linker response file Merge branch 'fix-implicit-lib-logging' into release Merge branch 'link-no-empty-response-files' into release FindOpenGL: Revert support for imported targets (#15267) Merge branch 'doc-compile-features-typo' into release Merge branch 'FindPythonInterp-Fix-1.4' into release Merge branch 'FindOpenGL-revert-imported-targets' into release Help: Document Nsight Tegra toolchain configuration (#15276) Merge branch 'fix-wince-unicode-entry-point' into release Merge branch 'doc-Nsight-Tegra-toolchain' into release Merge branch 'CPackIFW-doc-typos' into release Merge branch 'doc-CMAKE_CXX_KNOWN_FEATURES-typo' into release Merge branch 'vs-hlsl-settings' into release Merge branch 'vs-phone-store-deployment-location' into release Utilities/Sphinx: Fix link targets for mixed-case command names Merge branch 'doc-mixed-case-commands' into release Modules: Rename FindXerces to FindXercesC Help: Document file(GENERATE) signature option order Merge branch 'doc-file-GENERATE-order' into release Merge branch 'xerces-rename' into release CMake 3.1.0-rc3 Cedric Perthuis (1): VS: Add source file properties to set the hlsl shader entry point and model Christoph Gr?ninger (1): Help: Remove duplicate '#' in CMP0053 valid character list Christopher Dembia (1): Help: Add missing space to ctest -j option description Christopher Gittner (1): FindwxWidgets: Add versions 3.0.1 and 3.0.2 David Demelier (2): Help: Fix typo in cmake-compile-features(7) manual Help: Fix typo in CMAKE_CXX_KNOWN_FEATURES docs Dmitry Polyanitsa (1): VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9 Fraser Hutchison (1): Avoid if() quoted auto-dereference when checking for "MSVC" Gilles Khouzam (3): VS: Improve error messages when compiler is not detected (#15228) VS: Do not produce WinMD file for OBJECT libraries (#15228) VS: Add source file property to specify Windows App deployment location Konstantin Podsvirov (1): CPackIFW: Correction of the module documentation Nils Gladitz (2): FindOpenMP: Use fixed form Fortran test program Help: Document installed file property API Pascal Bach (1): VS, WINCE: Fix entry point for Unicode builds Rolf Eike Beer (1): FindPythonInterp: fix version component variables for Python 1.4 (#15275) Stephen Kelly (12): Features: Don't record for AppleClang Features: Test the CXX compiler only if it has features. Features: Fix references to CXX compiler version in Clang-C.cmake. Features: Record C++11 dialect switch only for GNU 4.7 and later. Features: Fix the default C dialect for Clang and GNU. Fix the test for running the CxxDialog unit test. WCDH: Don't imply that MSVC is supported by the module. WCDH: Make the header -Wundef safe for the C language. Genex: Fix evaluation context propagation for TARGET_OBJECTS. cmTarget: Don't allow relative paths in INTERFACE_SOURCES Export: Disallow export of targets with INTERFACE_SOURCES Help: Document the export limitation of INTERFACE_SOURCES. ----------------------------------------------------------------------- hooks/post-receive -- CMake From steveire at gmail.com Mon Dec 8 14:49:43 2014 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 8 Dec 2014 14:49:43 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1094-g9a6d379 Message-ID: <20141208194943.4E5D3A7EDD@public.kitware.com> This is an automated email from 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 9a6d37950af7a360578102c7d26d93c827e32d4d (commit) via d8b6a60f55755da95774d796a7712d3e87056e43 (commit) via a8edbcaec860a4405bb274a089e313f52236959c (commit) via c8645a323f11242bf71a0c8c99750315721c1d70 (commit) from 82cc543238b2b5735ccbfa6938d98a14634cad19 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a6d37950af7a360578102c7d26d93c827e32d4d commit 9a6d37950af7a360578102c7d26d93c827e32d4d Merge: 82cc543 d8b6a60 Author: Stephen Kelly AuthorDate: Mon Dec 8 14:49:42 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 14:49:42 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next d8b6a60f fixup! Export: Issue error if generating unusable export file (#15258). a8edbcae fixup! Export: Issue error if generating unusable export file (#15258). c8645a32 fixup! Export: Diagnose issues in INCLUDES DESTINATION while http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8b6a60f55755da95774d796a7712d3e87056e43 commit d8b6a60f55755da95774d796a7712d3e87056e43 Author: Stephen Kelly AuthorDate: Mon Dec 8 20:19:24 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 20:48:28 2014 +0100 fixup! Export: Issue error if generating unusable export file (#15258). diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index ebe5b85..9b1754f 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -346,12 +346,24 @@ cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target, if (input.find("${_IMPORT_PREFIX}") != std::string::npos && this->ImportPrefix.empty()) { - if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) + std::string userFacingInput = input; + while((pos = userFacingInput.find("${_IMPORT_PREFIX}/", lastPos)) + != userFacingInput.npos) + { + std::string::size_type endPos = pos + sizeof("${_IMPORT_PREFIX}/") - 1; + userFacingInput.erase(pos, endPos - pos); + lastPos = endPos; + } + + if (!checkCMP0057(target, propName, userFacingInput, this->IEGen->GetExportSet())) { return; } } + pos = 0; + lastPos = pos; + while((pos = input.find("$", lastPos)) != input.npos) { if (this->ImportPrefix.empty()) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt index 0084903..a11f06a 100644 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt @@ -2,7 +2,7 @@ CMake Error in CMakeLists.txt: Target "somelib" is installed with a path relative to the installation prefix - "\${_IMPORT_PREFIX}/include" + "include" in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of export set "exp" which is installed with an absolute path as its diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt index 9cad673..32cc756 100644 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt @@ -2,7 +2,7 @@ CMake Warning \(dev\) in CMakeLists.txt: Target "somelib" is installed with a path relative to the installation prefix - "\${_IMPORT_PREFIX}/include" + "include" in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of export set "exp" which is installed with an absolute path as its diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt index 2d2dc5b..1c2acb5 100644 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt @@ -6,7 +6,7 @@ CMake Warning \(dev\) in CMakeLists.txt: Target "somelib" is installed with a path relative to the installation prefix - "\${_IMPORT_PREFIX}/include" + "include" in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of export set "exp" which is installed with an absolute path as its http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8edbcaec860a4405bb274a089e313f52236959c commit a8edbcaec860a4405bb274a089e313f52236959c Author: Stephen Kelly AuthorDate: Mon Dec 8 20:15:50 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 20:48:26 2014 +0100 fixup! Export: Issue error if generating unusable export file (#15258). diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt index 1426fff..a5ece0d 100644 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt @@ -1,7 +1,7 @@ CMake Warning \(dev\) in CMakeLists.txt: - Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. - Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy - command to set the policy and suppress this warning. + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. Target "somelib" is installed with a path relative to the installation prefix diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt index e0b4627..2d2dc5b 100644 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt @@ -1,7 +1,7 @@ CMake Warning \(dev\) in CMakeLists.txt: - Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. - Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy - command to set the policy and suppress this warning. + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. Target "somelib" is installed with a path relative to the installation prefix http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8645a323f11242bf71a0c8c99750315721c1d70 commit c8645a323f11242bf71a0c8c99750315721c1d70 Author: Stephen Kelly AuthorDate: Mon Dec 8 20:02:01 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 20:47:41 2014 +0100 fixup! Export: Diagnose issues in INCLUDES DESTINATION while diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst index 5a790b0..ddd2bf1 100644 --- a/Help/policy/CMP0057.rst +++ b/Help/policy/CMP0057.rst @@ -1,7 +1,7 @@ CMP0057 ------- -Error on export with bad INCLUDES DESTINATION. +Error on absolute export with relative usage requirements. CMake 3.1 and lower generated unusable files with the :command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 8110f6e..d3061f3 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -377,7 +377,7 @@ cmPolicies::cmPolicies() this->DefinePolicy( CMP0057, "CMP0057", - "Error on export with bad INCLUDES DESTINATION.", + "Error on absolute export with relative usage requirements.", 3,2,0, cmPolicies::WARN); } diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 26c351f..c3866bd 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -112,7 +112,7 @@ public: /// or keywords when unquoted. CMP0055, ///< Strict checking for break() command. CMP0056, ///< Honor link flags in try_compile() source-file signature. - CMP0057, ///< Error on export with bad INCLUDES DESTINATION. + CMP0057, ///< Error on absolute export with relative usage requirements. /** \brief Always the last entry. * diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt index fd9a743..c8e413c 100644 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt @@ -1,7 +1,7 @@ CMake Warning \(dev\) in CMakeLists.txt: - Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION. - Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy - command to set the policy and suppress this warning. + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. Target "somelib" is installed as part of export set "exp" with an INCLUDES DESTINATION containing relative path ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0057.rst | 2 +- Source/cmExportInstallFileGenerator.cxx | 14 +++++++++++++- Source/cmPolicies.cxx | 2 +- Source/cmPolicies.h | 2 +- .../RelativeIncludeDestination-CMP0057-WARN-stderr.txt | 6 +++--- ...cludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt | 6 +++--- .../RelativeIncludeDirectory-CMP0057-NEW-stderr.txt | 2 +- .../RelativeIncludeDirectory-CMP0057-OLD-stderr.txt | 2 +- .../RelativeIncludeDirectory-CMP0057-WARN-stderr.txt | 8 ++++---- 9 files changed, 28 insertions(+), 16 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Mon Dec 8 14:53:01 2014 From: steveire at gmail.com (Stephen Kelly) Date: Mon, 8 Dec 2014 14:53:01 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1097-g52fe999 Message-ID: <20141208195301.13C6FA8027@public.kitware.com> This is an automated email from 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 52fe99979c62f63a26c836d2419d40a072710b44 (commit) via 9c32070ac60538282982236ec4c85c4dfab6b3c2 (commit) via 29f92485f1792cccd84077a0c5f5d452ba2a85aa (commit) from 9a6d37950af7a360578102c7d26d93c827e32d4d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52fe99979c62f63a26c836d2419d40a072710b44 commit 52fe99979c62f63a26c836d2419d40a072710b44 Merge: 9a6d379 9c32070 Author: Stephen Kelly AuthorDate: Mon Dec 8 14:52:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 14:52:59 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next 9c32070a Export: Issue error if generating unusable export file (#15258). 29f92485 Export: Diagnose issues in INCLUDES DESTINATION while generating (#15258). http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c32070ac60538282982236ec4c85c4dfab6b3c2 commit 9c32070ac60538282982236ec4c85c4dfab6b3c2 Author: Stephen Kelly AuthorDate: Mon Dec 8 19:29:56 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 20:50:11 2014 +0100 Export: Issue error if generating unusable export file (#15258). Diagnose presence of $ in exported target properties, as can appear in user code, or generated for relative paths inside a $ generator expression. The case of use of install(TARGETS) with a relative path in INCLUDES DESTINATION would also be caught by this diagnostic, but that is handled separately because in that case the $ is generated by cmake internally, so a more-specific diagnostic is desired. Extend policy CMP0057 to cover this diagnostic. diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst index 79da0b9..ddd2bf1 100644 --- a/Help/policy/CMP0057.rst +++ b/Help/policy/CMP0057.rst @@ -6,8 +6,12 @@ Error on absolute export with relative usage requirements. CMake 3.1 and lower generated unusable files with the :command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used with it, and a relative path was passed to the ``INCLUDES DESTINATION`` of a -target in the specified export set. In such cases, a use of an internal -variable was generated, although the internal variable was unset. +target in the specified export set. Unusable files could also be generated +if the ``$`` generator expression was used, despite an +export with an absolute ``DESTINATION``, or if the ``$`` +generator expression was used containing a relative path. In such cases, +a use of an internal variable was generated, although the internal +variable was unset. The ``OLD`` behavior for this policy is to issue a warning if a the :command:`install(EXPORT)` command generates such an unusable file. The diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 1f39d7a..37956dc 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -171,7 +171,7 @@ void cmExportFileGenerator::PopulateInterfaceProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions(propName, prepro, target, missingTargets); properties[outputName] = prepro; } @@ -205,7 +205,8 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions("INTERFACE_LINK_LIBRARIES", + prepro, target, missingTargets, ReplaceFreeTargets); properties["INTERFACE_LINK_LIBRARIES"] = prepro; @@ -383,7 +384,8 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( tei->InterfaceIncludeDirectories, preprocessRule, true); - this->ReplaceInstallPrefix(dirs); + this->ReplaceInstallPrefix(tei->Target, "INTERFACE_INCLUDE_DIRECTORIES", + dirs); cmsys::auto_ptr cge = ge.Parse(dirs); std::string exportDirs = cge->Evaluate(target->GetMakefile(), "", false, target); @@ -421,8 +423,9 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( true); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets); + this->ResolveTargetsInGeneratorExpressions("INTERFACE_INCLUDE_DIRECTORIES", + prepro, target, + missingTargets); if (!checkInterfaceDirs(prepro, target)) { @@ -607,6 +610,7 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input, //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets, @@ -614,7 +618,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( { if (replace == NoReplaceFreeTargets) { - this->ResolveTargetsInGeneratorExpression(input, target, missingTargets); + this->ResolveTargetsInGeneratorExpression(propName, input, + target, missingTargets); return; } std::vector parts; @@ -631,7 +636,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( } else { - this->ResolveTargetsInGeneratorExpression( + this->ResolveTargetsInGeneratorExpression(propName, *li, target, missingTargets); @@ -644,6 +649,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets) @@ -709,7 +715,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( lastPos = endPos; } - this->ReplaceInstallPrefix(input); + this->ReplaceInstallPrefix(target, propName, input); if (!errorString.empty()) { @@ -719,7 +725,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( //---------------------------------------------------------------------------- void -cmExportFileGenerator::ReplaceInstallPrefix(std::string &) +cmExportFileGenerator::ReplaceInstallPrefix(cmTarget*, + std::string const&, std::string &) { // Do nothing } @@ -792,9 +799,11 @@ cmExportFileGenerator preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets, - ReplaceFreeTargets); + this->ResolveTargetsInGeneratorExpressions( + "LINK_INTERFACE_LIBRARIES" + suffix, + prepro, target, + missingTargets, + ReplaceFreeTargets); properties["IMPORTED_LINK_INTERFACE_LIBRARIES" + suffix] = prepro; } } diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 919924e..d3b9fee 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -151,7 +151,9 @@ protected: NoReplaceFreeTargets }; - void ResolveTargetsInGeneratorExpressions(std::string &input, + void ResolveTargetsInGeneratorExpressions( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets, FreeTargetsReplace replace = NoReplaceFreeTargets); @@ -187,11 +189,15 @@ private: bool AddTargetNamespace(std::string &input, cmTarget* target, std::vector &missingTargets); - void ResolveTargetsInGeneratorExpression(std::string &input, + void ResolveTargetsInGeneratorExpression( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); virtual std::string InstallNameDir(cmTarget* target, const std::string& config) = 0; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 5bc36a5..9b1754f 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -299,14 +299,80 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) } //---------------------------------------------------------------------------- +static bool checkCMP0057(cmTarget* target, std::string const& propName, + std::string const& input, cmExportSet* exportSet) +{ + cmOStringStream e; + cmake::MessageType messageType = cmake::FATAL_ERROR; + cmMakefile* mf = target->GetMakefile(); + switch(target->GetPolicyStatusCMP0057()) + { + case cmPolicies::WARN: + e << (mf->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; + case cmPolicies::OLD: + messageType = cmake::AUTHOR_WARNING; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + break; + } + e << "Target \"" + << target->GetName() + << "\" is installed with a path relative to the installation " + "prefix\n \"" << input << "\"\nin its " << propName + << " property. The target is part of export set \"" + << exportSet->GetName() << "\" which is installed " + "with an absolute path as its DESTINATION. This mixing of " + "absolute and relative paths creates unusable target export files."; + mf->IssueMessage(messageType, e.str()); + if (messageType == cmake::FATAL_ERROR) + { + return false; + } + return true; +} + +//---------------------------------------------------------------------------- void -cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string &input) +cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input) { std::string::size_type pos = 0; std::string::size_type lastPos = pos; + if (input.find("${_IMPORT_PREFIX}") != std::string::npos + && this->ImportPrefix.empty()) + { + std::string userFacingInput = input; + while((pos = userFacingInput.find("${_IMPORT_PREFIX}/", lastPos)) + != userFacingInput.npos) + { + std::string::size_type endPos = pos + sizeof("${_IMPORT_PREFIX}/") - 1; + userFacingInput.erase(pos, endPos - pos); + lastPos = endPos; + } + + if (!checkCMP0057(target, propName, userFacingInput, this->IEGen->GetExportSet())) + { + return; + } + } + + pos = 0; + lastPos = pos; + while((pos = input.find("$", lastPos)) != input.npos) { + if (this->ImportPrefix.empty()) + { + if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) + { + return; + } + } std::string::size_type endPos = pos + sizeof("$") - 1; input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}"); lastPos = endPos; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 3d7b0c6..0723085 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -62,7 +62,9 @@ protected: cmTarget* depender, cmTarget* dependee); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); void ComplainAboutMissingTarget(cmTarget* depender, cmTarget* dependee, diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt new file mode 100644 index 0000000..2968b91 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake new file mode 100644 index 0000000..c7255db --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt new file mode 100644 index 0000000..860f62f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake new file mode 100644 index 0000000..1c27fd7 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt new file mode 100644 index 0000000..a5ece0d --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake new file mode 100644 index 0000000..06e793e --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt new file mode 100644 index 0000000..a11f06a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake new file mode 100644 index 0000000..912aaef --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt new file mode 100644 index 0000000..32cc756 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake new file mode 100644 index 0000000..e6f5b96 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt new file mode 100644 index 0000000..1c2acb5 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake new file mode 100644 index 0000000..6d112b2 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 296d440..2ebe8c0 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -8,3 +8,9 @@ run_cmake(RelativeLibDir) run_cmake(RelativeIncludeDestination-CMP0057-NEW) run_cmake(RelativeIncludeDestination-CMP0057-OLD) run_cmake(RelativeIncludeDestination-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29f92485f1792cccd84077a0c5f5d452ba2a85aa commit 29f92485f1792cccd84077a0c5f5d452ba2a85aa Author: Stephen Kelly AuthorDate: Sun Dec 7 22:34:44 2014 +0100 Commit: Stephen Kelly CommitDate: Mon Dec 8 20:50:10 2014 +0100 Export: Diagnose issues in INCLUDES DESTINATION while generating (#15258). The _IMPORT_PREFIX variable is generated in export files only if the installation destination is relative. If packagers set the path to an absolute destination, the generated file must not have any references to the _IMPORT_PREFIX as it is undefined. A use of _IMPORT_PREFIX is generated for content passed to install(TARGETS) in the INCLUDES DESTINATION component, if the content is a relative path. Issue a message to notify the user that that the generated file is unusable, and introduce policy CMP0057 to control the severity of the message. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 96f39e6..76ca5d4 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -114,3 +114,4 @@ All Policies /policy/CMP0054 /policy/CMP0055 /policy/CMP0056 + /policy/CMP0057 diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst new file mode 100644 index 0000000..79da0b9 --- /dev/null +++ b/Help/policy/CMP0057.rst @@ -0,0 +1,20 @@ +CMP0057 +------- + +Error on absolute export with relative usage requirements. + +CMake 3.1 and lower generated unusable files with the +:command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used +with it, and a relative path was passed to the ``INCLUDES DESTINATION`` of a +target in the specified export set. In such cases, a use of an internal +variable was generated, although the internal variable was unset. + +The ``OLD`` behavior for this policy is to issue a warning if a the +:command:`install(EXPORT)` command generates such an unusable file. The +``NEW`` behavior for this policy is to issue an error instead of generating +the file. + +This policy was introduced in CMake version 3.2. +CMake version |release| warns when the policy is not set and uses +``OLD`` behavior. Use the :command:`cmake_policy` command to set it to +``OLD`` or ``NEW`` explicitly. diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 23180f1..5bc36a5 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -37,15 +37,70 @@ std::string cmExportInstallFileGenerator::GetConfigImportFileGlob() } //---------------------------------------------------------------------------- +bool cmExportInstallFileGenerator +::CheckIncludesDestinationContent(cmTargetExport* tei, + cmExportSet* exportSet) +{ + std::vector parts; + cmGeneratorExpression::Split(tei->InterfaceIncludeDirectories, parts); + for (std::vector::const_iterator it = parts.begin(); + it != parts.end(); ++it) + { + if (!cmSystemTools::FileIsFullPath(*it)) + { + if (cmGeneratorExpression::Find(*it) != 0) + { + if (this->ImportPrefix.empty()) + { + cmOStringStream e; + cmake::MessageType messageType = cmake::FATAL_ERROR; + cmMakefile* mf = tei->Target->GetMakefile(); + switch(tei->Target->GetPolicyStatusCMP0057()) + { + case cmPolicies::WARN: + e << (mf->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; + case cmPolicies::OLD: + messageType = cmake::AUTHOR_WARNING; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + break; + } + e << "Target \"" + << tei->Target->GetName() + << "\" is installed as part of export set \"" + << exportSet->GetName() << "\" with an INCLUDES DESTINATION " + "containing relative path\n \"" << *it + << "\"\nThe export set \"" + << exportSet->GetName() + << "\" is installed with an absolute path as its DESTINATION. " + "This mixing of absolute and relative paths creates unusable " + "target export files."; + mf->IssueMessage(messageType, e.str()); + if (messageType == cmake::FATAL_ERROR) + { + return false; + } + } + } + } + } + return true; +} + +//---------------------------------------------------------------------------- bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { std::vector allTargets; + cmExportSet* exportSet = this->IEGen->GetExportSet(); { std::string expectedTargets; std::string sep; for(std::vector::const_iterator - tei = this->IEGen->GetExportSet()->GetTargetExports()->begin(); - tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) + tei = exportSet->GetTargetExports()->begin(); + tei != exportSet->GetTargetExports()->end(); ++tei) { expectedTargets += sep + this->Namespace + (*tei)->Target->GetExportName(); sep = " "; @@ -58,7 +113,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { cmOStringStream e; e << "install(EXPORT \"" - << this->IEGen->GetExportSet()->GetName() + << exportSet->GetName() << "\" ...) " << "includes target \"" << te->Target->GetName() << "\" more than once in the export set."; cmSystemTools::Error(e.str().c_str()); @@ -141,6 +196,11 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) ImportPropertyMap properties; + if (!this->CheckIncludesDestinationContent(*tei, exportSet)) + { + return false; + } + this->PopulateIncludeDirectoriesInterface(*tei, cmGeneratorExpression::InstallInterface, properties, missingTargets); diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index b851ad5..3d7b0c6 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -16,6 +16,7 @@ class cmInstallExportGenerator; class cmInstallTargetGenerator; +class cmExportSet; /** \class cmExportInstallFileGenerator * \brief Generate a file exporting targets from an install tree. @@ -87,6 +88,9 @@ protected: std::string InstallNameDir(cmTarget* target, const std::string& config); + bool CheckIncludesDestinationContent(cmTargetExport* tei, + cmExportSet* exportSet); + cmInstallExportGenerator* IEGen; std::string ImportPrefix; diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 1a27a25..d3061f3 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -374,6 +374,11 @@ cmPolicies::cmPolicies() CMP0056, "CMP0056", "Honor link flags in try_compile() source-file signature.", 3,2,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0057, "CMP0057", + "Error on absolute export with relative usage requirements.", + 3,2,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 2ad4890..c3866bd 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -112,6 +112,7 @@ public: /// or keywords when unquoted. CMP0055, ///< Strict checking for break() command. CMP0056, ///< Honor link flags in try_compile() source-file signature. + CMP0057, ///< Error on absolute export with relative usage requirements. /** \brief Always the last entry. * diff --git a/Source/cmTarget.h b/Source/cmTarget.h index a3ecca0..dc4e6c6 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -34,7 +34,8 @@ F(CMP0041) \ F(CMP0042) \ F(CMP0046) \ - F(CMP0052) + F(CMP0052) \ + F(CMP0057) class cmake; class cmMakefile; diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index f4b744b..7a59902 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -17,6 +17,7 @@ \* CMP0042 \* CMP0046 \* CMP0052 + \* CMP0057 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt new file mode 100644 index 0000000..8cd27c2 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt @@ -0,0 +1,9 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed as part of export set "exp" with an INCLUDES + DESTINATION containing relative path + + "include" + + The export set "exp" is installed with an absolute path as its DESTINATION. + This mixing of absolute and relative paths creates unusable target export + files. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake new file mode 100644 index 0000000..cab9ac6 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + INCLUDES DESTINATION include +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt new file mode 100644 index 0000000..79c92a1 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt @@ -0,0 +1,10 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed as part of export set "exp" with an INCLUDES + DESTINATION containing relative path + + "include" + + The export set "exp" is installed with an absolute path as its DESTINATION. + This mixing of absolute and relative paths creates unusable target export + files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake new file mode 100644 index 0000000..58bcbb7 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + INCLUDES DESTINATION include +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt new file mode 100644 index 0000000..c8e413c --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt @@ -0,0 +1,14 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. + + Target "somelib" is installed as part of export set "exp" with an INCLUDES + DESTINATION containing relative path + + "include" + + The export set "exp" is installed with an absolute path as its DESTINATION. + This mixing of absolute and relative paths creates unusable target export + files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake new file mode 100644 index 0000000..82bde5d --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + INCLUDES DESTINATION include +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 32cf30c..296d440 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -5,3 +5,6 @@ run_cmake(AppendExport) run_cmake(OldIface) run_cmake(NoExportSet) run_cmake(RelativeLibDir) +run_cmake(RelativeIncludeDestination-CMP0057-NEW) +run_cmake(RelativeIncludeDestination-CMP0057-OLD) +run_cmake(RelativeIncludeDestination-CMP0057-WARN) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 8 15:42:25 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 8 Dec 2014 15:42:25 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1099-g6b98d15 Message-ID: <20141208204225.13B79A52DB@public.kitware.com> This is an automated email from 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 6b98d152fa2767eb11528dbec0f5741ac02d2bbe (commit) via ce331bab929c5a38e048ba15d7393dcf96fad9e1 (commit) from 52fe99979c62f63a26c836d2419d40a072710b44 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b98d152fa2767eb11528dbec0f5741ac02d2bbe commit 6b98d152fa2767eb11528dbec0f5741ac02d2bbe Merge: 52fe999 ce331ba Author: Brad King AuthorDate: Mon Dec 8 15:42:23 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 8 15:42:23 2014 -0500 Merge topic 'find_library-updated-directory-content' into next ce331bab find_library: Fix repeat call after changing directory content (#15293) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce331bab929c5a38e048ba15d7393dcf96fad9e1 commit ce331bab929c5a38e048ba15d7393dcf96fad9e1 Author: Brad King AuthorDate: Mon Dec 8 15:12:51 2014 -0500 Commit: Brad King CommitDate: Mon Dec 8 15:35:50 2014 -0500 find_library: Fix repeat call after changing directory content (#15293) We use cmGlobalGenerator::GetDirectoryContent to avoid repeating directory listings. However, GetDirectoryContent loads content from disk at most once. This breaks find_library calls that occur when disk content has changed since preceding find_library calls. Teach cmGlobalGenerator::GetDirectoryContent to save the directory modification time when content is loaded and re-load content if it changes. Create a RunCMake.find_library test with a case covering this. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 29ab7d0..dd7fbc8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2725,7 +2725,9 @@ void cmGlobalGenerator::AddToManifest(const std::string& config, // Add to the content listing for the file's directory. std::string dir = cmSystemTools::GetFilenamePath(f); std::string file = cmSystemTools::GetFilenameName(f); - this->DirectoryContentMap[dir].insert(file); + DirectoryContent& dc = this->DirectoryContentMap[dir]; + dc.Generated.insert(file); + dc.All.insert(file); } //---------------------------------------------------------------------------- @@ -2733,25 +2735,32 @@ std::set const& cmGlobalGenerator::GetDirectoryContent(std::string const& dir, bool needDisk) { DirectoryContent& dc = this->DirectoryContentMap[dir]; - if(needDisk && !dc.LoadedFromDisk) + if(needDisk) { - // Load the directory content from disk. - cmsys::Directory d; - if(d.Load(dir)) + long mt = cmSystemTools::ModifiedTime(dir); + if (mt != dc.LastDiskTime) { - unsigned long n = d.GetNumberOfFiles(); - for(unsigned long i = 0; i < n; ++i) + // Reset to non-loaded directory content. + dc.All = dc.Generated; + + // Load the directory content from disk. + cmsys::Directory d; + if(d.Load(dir)) { - const char* f = d.GetFile(i); - if(strcmp(f, ".") != 0 && strcmp(f, "..") != 0) + unsigned long n = d.GetNumberOfFiles(); + for(unsigned long i = 0; i < n; ++i) { - dc.insert(f); + const char* f = d.GetFile(i); + if(strcmp(f, ".") != 0 && strcmp(f, "..") != 0) + { + dc.All.insert(f); + } } } + dc.LastDiskTime = mt; } - dc.LoadedFromDisk = true; } - return dc; + return dc.All; } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 6b75298..08f061a 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -255,9 +255,9 @@ public: cmTargetManifest const& GetTargetManifest() const { return this->TargetManifest; } - /** Get the content of a directory. Directory listings are loaded - from disk at most once and cached. During the generation step - the content will include the target files to be built even if + /** Get the content of a directory. Directory listings are cached + and re-loaded from disk only when modified. During the generation + step the content will include the target files to be built even if they do not yet exist. */ std::set const& GetDirectoryContent(std::string const& dir, bool needDisk = true); @@ -486,13 +486,14 @@ private: virtual const char* GetBuildIgnoreErrorsFlag() const { return 0; } // Cache directory content and target files to be built. - struct DirectoryContent: public std::set + struct DirectoryContent { - typedef std::set derived; - bool LoadedFromDisk; - DirectoryContent(): LoadedFromDisk(false) {} + long LastDiskTime; + std::set All; + std::set Generated; + DirectoryContent(): LastDiskTime(-1) {} DirectoryContent(DirectoryContent const& dc): - derived(dc), LoadedFromDisk(dc.LoadedFromDisk) {} + LastDiskTime(dc.LastDiskTime), All(dc.All), Generated(dc.Generated) {} }; std::map DirectoryContentMap; diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 54fe2d9..2bfd4d6 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -104,6 +104,7 @@ add_RunCMake_test(export) add_RunCMake_test(cmake_minimum_required) add_RunCMake_test(continue) add_RunCMake_test(file) +add_RunCMake_test(find_library) add_RunCMake_test(find_package) add_RunCMake_test(get_filename_component) add_RunCMake_test(if) diff --git a/Tests/RunCMake/find_library/CMakeLists.txt b/Tests/RunCMake/find_library/CMakeLists.txt new file mode 100644 index 0000000..ef2163c --- /dev/null +++ b/Tests/RunCMake/find_library/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.1) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_library/Created-stderr.txt b/Tests/RunCMake/find_library/Created-stderr.txt new file mode 100644 index 0000000..67b3474 --- /dev/null +++ b/Tests/RunCMake/find_library/Created-stderr.txt @@ -0,0 +1,2 @@ +CREATED_LIBRARY='CREATED_LIBRARY-NOTFOUND' +CREATED_LIBRARY='[^']*/Tests/RunCMake/find_library/Created-build/lib/libcreated.a' diff --git a/Tests/RunCMake/find_library/Created.cmake b/Tests/RunCMake/find_library/Created.cmake new file mode 100644 index 0000000..c0fd823 --- /dev/null +++ b/Tests/RunCMake/find_library/Created.cmake @@ -0,0 +1,16 @@ +list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib) +list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .a) +find_library(CREATED_LIBRARY + NAMES created + PATHS ${CMAKE_CURRENT_BINARY_DIR}/lib + NO_DEFAULT_PATH + ) +message("CREATED_LIBRARY='${CREATED_LIBRARY}'") +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lib/libcreated.a" "created") +find_library(CREATED_LIBRARY + NAMES created + PATHS ${CMAKE_CURRENT_BINARY_DIR}/lib + NO_DEFAULT_PATH + ) +message("CREATED_LIBRARY='${CREATED_LIBRARY}'") diff --git a/Tests/RunCMake/find_library/RunCMakeTest.cmake b/Tests/RunCMake/find_library/RunCMakeTest.cmake new file mode 100644 index 0000000..4000679 --- /dev/null +++ b/Tests/RunCMake/find_library/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(Created) ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 33 +++++++++++++------- Source/cmGlobalGenerator.h | 17 +++++----- Tests/RunCMake/CMakeLists.txt | 1 + .../{CMP0055 => find_library}/CMakeLists.txt | 0 Tests/RunCMake/find_library/Created-stderr.txt | 2 ++ Tests/RunCMake/find_library/Created.cmake | 16 ++++++++++ Tests/RunCMake/find_library/RunCMakeTest.cmake | 3 ++ 7 files changed, 52 insertions(+), 20 deletions(-) copy Tests/RunCMake/{CMP0055 => find_library}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/find_library/Created-stderr.txt create mode 100644 Tests/RunCMake/find_library/Created.cmake create mode 100644 Tests/RunCMake/find_library/RunCMakeTest.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 9 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 9 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-452-g2372cda Message-ID: <20141209050110.CA96DA80DD@public.kitware.com> This is an automated email from 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 2372cdaa3aa2c8b6fb0da1e6c74c10695a1b1ae8 (commit) from 95655dc730118202464f5ac8289af89c29c4a4a7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2372cdaa3aa2c8b6fb0da1e6c74c10695a1b1ae8 commit 2372cdaa3aa2c8b6fb0da1e6c74c10695a1b1ae8 Author: Kitware Robot AuthorDate: Tue Dec 9 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Tue Dec 9 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9dd227c..32a15e0 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 1) -set(CMake_VERSION_PATCH 20141208) +set(CMake_VERSION_PATCH 20141209) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Tue Dec 9 02:20:55 2014 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 9 Dec 2014 02:20:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1101-g2a7d72c Message-ID: <20141209072055.D9F10A76E9@public.kitware.com> This is an automated email from 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 2a7d72c38f023c6a8491f11e9a470fa6a8f7297b (commit) via c58da28d5cf9bcc4280096493d4fc4361fcb175d (commit) from 6b98d152fa2767eb11528dbec0f5741ac02d2bbe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a7d72c38f023c6a8491f11e9a470fa6a8f7297b commit 2a7d72c38f023c6a8491f11e9a470fa6a8f7297b Merge: 6b98d15 c58da28 Author: Stephen Kelly AuthorDate: Tue Dec 9 02:20:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 02:20:54 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next c58da28d Whitespace. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c58da28d5cf9bcc4280096493d4fc4361fcb175d commit c58da28d5cf9bcc4280096493d4fc4361fcb175d Author: Stephen Kelly AuthorDate: Tue Dec 9 08:20:35 2014 +0100 Commit: Stephen Kelly CommitDate: Tue Dec 9 08:20:35 2014 +0100 Whitespace. diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 9b1754f..b519a98 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -355,7 +355,8 @@ cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target, lastPos = endPos; } - if (!checkCMP0057(target, propName, userFacingInput, this->IEGen->GetExportSet())) + if (!checkCMP0057(target, propName, userFacingInput, + this->IEGen->GetExportSet())) { return; } ----------------------------------------------------------------------- Summary of changes: Source/cmExportInstallFileGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Tue Dec 9 02:21:15 2014 From: steveire at gmail.com (Stephen Kelly) Date: Tue, 9 Dec 2014 02:21:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1103-g2ac7065 Message-ID: <20141209072115.7F7F6A770F@public.kitware.com> This is an automated email from 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 2ac7065953475fdc254e2f64efdf922ca1839229 (commit) via 2bdb47b2c3d2848175cceb4b6adfd88ef8911bac (commit) from 2a7d72c38f023c6a8491f11e9a470fa6a8f7297b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ac7065953475fdc254e2f64efdf922ca1839229 commit 2ac7065953475fdc254e2f64efdf922ca1839229 Merge: 2a7d72c 2bdb47b Author: Stephen Kelly AuthorDate: Tue Dec 9 02:21:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 02:21:14 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next 2bdb47b2 Export: Issue error if generating unusable export file (#15258). http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bdb47b2c3d2848175cceb4b6adfd88ef8911bac commit 2bdb47b2c3d2848175cceb4b6adfd88ef8911bac Author: Stephen Kelly AuthorDate: Mon Dec 8 19:29:56 2014 +0100 Commit: Stephen Kelly CommitDate: Tue Dec 9 08:21:12 2014 +0100 Export: Issue error if generating unusable export file (#15258). Diagnose presence of $ in exported target properties, as can appear in user code, or generated for relative paths inside a $ generator expression. The case of use of install(TARGETS) with a relative path in INCLUDES DESTINATION would also be caught by this diagnostic, but that is handled separately because in that case the $ is generated by cmake internally, so a more-specific diagnostic is desired. Extend policy CMP0057 to cover this diagnostic. diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst index 79da0b9..ddd2bf1 100644 --- a/Help/policy/CMP0057.rst +++ b/Help/policy/CMP0057.rst @@ -6,8 +6,12 @@ Error on absolute export with relative usage requirements. CMake 3.1 and lower generated unusable files with the :command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used with it, and a relative path was passed to the ``INCLUDES DESTINATION`` of a -target in the specified export set. In such cases, a use of an internal -variable was generated, although the internal variable was unset. +target in the specified export set. Unusable files could also be generated +if the ``$`` generator expression was used, despite an +export with an absolute ``DESTINATION``, or if the ``$`` +generator expression was used containing a relative path. In such cases, +a use of an internal variable was generated, although the internal +variable was unset. The ``OLD`` behavior for this policy is to issue a warning if a the :command:`install(EXPORT)` command generates such an unusable file. The diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 1f39d7a..37956dc 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -171,7 +171,7 @@ void cmExportFileGenerator::PopulateInterfaceProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions(propName, prepro, target, missingTargets); properties[outputName] = prepro; } @@ -205,7 +205,8 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, + this->ResolveTargetsInGeneratorExpressions("INTERFACE_LINK_LIBRARIES", + prepro, target, missingTargets, ReplaceFreeTargets); properties["INTERFACE_LINK_LIBRARIES"] = prepro; @@ -383,7 +384,8 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( tei->InterfaceIncludeDirectories, preprocessRule, true); - this->ReplaceInstallPrefix(dirs); + this->ReplaceInstallPrefix(tei->Target, "INTERFACE_INCLUDE_DIRECTORIES", + dirs); cmsys::auto_ptr cge = ge.Parse(dirs); std::string exportDirs = cge->Evaluate(target->GetMakefile(), "", false, target); @@ -421,8 +423,9 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( true); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets); + this->ResolveTargetsInGeneratorExpressions("INTERFACE_INCLUDE_DIRECTORIES", + prepro, target, + missingTargets); if (!checkInterfaceDirs(prepro, target)) { @@ -607,6 +610,7 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input, //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets, @@ -614,7 +618,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( { if (replace == NoReplaceFreeTargets) { - this->ResolveTargetsInGeneratorExpression(input, target, missingTargets); + this->ResolveTargetsInGeneratorExpression(propName, input, + target, missingTargets); return; } std::vector parts; @@ -631,7 +636,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( } else { - this->ResolveTargetsInGeneratorExpression( + this->ResolveTargetsInGeneratorExpression(propName, *li, target, missingTargets); @@ -644,6 +649,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( + std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets) @@ -709,7 +715,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( lastPos = endPos; } - this->ReplaceInstallPrefix(input); + this->ReplaceInstallPrefix(target, propName, input); if (!errorString.empty()) { @@ -719,7 +725,8 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( //---------------------------------------------------------------------------- void -cmExportFileGenerator::ReplaceInstallPrefix(std::string &) +cmExportFileGenerator::ReplaceInstallPrefix(cmTarget*, + std::string const&, std::string &) { // Do nothing } @@ -792,9 +799,11 @@ cmExportFileGenerator preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(prepro, target, - missingTargets, - ReplaceFreeTargets); + this->ResolveTargetsInGeneratorExpressions( + "LINK_INTERFACE_LIBRARIES" + suffix, + prepro, target, + missingTargets, + ReplaceFreeTargets); properties["IMPORTED_LINK_INTERFACE_LIBRARIES" + suffix] = prepro; } } diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 919924e..d3b9fee 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -151,7 +151,9 @@ protected: NoReplaceFreeTargets }; - void ResolveTargetsInGeneratorExpressions(std::string &input, + void ResolveTargetsInGeneratorExpressions( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets, FreeTargetsReplace replace = NoReplaceFreeTargets); @@ -187,11 +189,15 @@ private: bool AddTargetNamespace(std::string &input, cmTarget* target, std::vector &missingTargets); - void ResolveTargetsInGeneratorExpression(std::string &input, + void ResolveTargetsInGeneratorExpression( + std::string const& propName, + std::string &input, cmTarget* target, std::vector &missingTargets); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); virtual std::string InstallNameDir(cmTarget* target, const std::string& config) = 0; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 5bc36a5..b519a98 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -299,14 +299,81 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) } //---------------------------------------------------------------------------- +static bool checkCMP0057(cmTarget* target, std::string const& propName, + std::string const& input, cmExportSet* exportSet) +{ + cmOStringStream e; + cmake::MessageType messageType = cmake::FATAL_ERROR; + cmMakefile* mf = target->GetMakefile(); + switch(target->GetPolicyStatusCMP0057()) + { + case cmPolicies::WARN: + e << (mf->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; + case cmPolicies::OLD: + messageType = cmake::AUTHOR_WARNING; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + break; + } + e << "Target \"" + << target->GetName() + << "\" is installed with a path relative to the installation " + "prefix\n \"" << input << "\"\nin its " << propName + << " property. The target is part of export set \"" + << exportSet->GetName() << "\" which is installed " + "with an absolute path as its DESTINATION. This mixing of " + "absolute and relative paths creates unusable target export files."; + mf->IssueMessage(messageType, e.str()); + if (messageType == cmake::FATAL_ERROR) + { + return false; + } + return true; +} + +//---------------------------------------------------------------------------- void -cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string &input) +cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input) { std::string::size_type pos = 0; std::string::size_type lastPos = pos; + if (input.find("${_IMPORT_PREFIX}") != std::string::npos + && this->ImportPrefix.empty()) + { + std::string userFacingInput = input; + while((pos = userFacingInput.find("${_IMPORT_PREFIX}/", lastPos)) + != userFacingInput.npos) + { + std::string::size_type endPos = pos + sizeof("${_IMPORT_PREFIX}/") - 1; + userFacingInput.erase(pos, endPos - pos); + lastPos = endPos; + } + + if (!checkCMP0057(target, propName, userFacingInput, + this->IEGen->GetExportSet())) + { + return; + } + } + + pos = 0; + lastPos = pos; + while((pos = input.find("$", lastPos)) != input.npos) { + if (this->ImportPrefix.empty()) + { + if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) + { + return; + } + } std::string::size_type endPos = pos + sizeof("$") - 1; input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}"); lastPos = endPos; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 3d7b0c6..0723085 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -62,7 +62,9 @@ protected: cmTarget* depender, cmTarget* dependee); - virtual void ReplaceInstallPrefix(std::string &input); + virtual void ReplaceInstallPrefix(cmTarget* target, + std::string const& propName, + std::string &input); void ComplainAboutMissingTarget(cmTarget* depender, cmTarget* dependee, diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt new file mode 100644 index 0000000..2968b91 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake new file mode 100644 index 0000000..c7255db --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt new file mode 100644 index 0000000..860f62f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake new file mode 100644 index 0000000..1c27fd7 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt new file mode 100644 index 0000000..a5ece0d --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "\$/include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake new file mode 100644 index 0000000..06e793e --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $/include>) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt new file mode 100644 index 0000000..a11f06a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt @@ -0,0 +1,10 @@ +CMake Error in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake new file mode 100644 index 0000000..912aaef --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 NEW) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt new file mode 100644 index 0000000..32cc756 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Target "somelib" is installed with a path relative to the installation + prefix + + "include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake new file mode 100644 index 0000000..e6f5b96 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0057 OLD) + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt new file mode 100644 index 0000000..1c2acb5 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0057 is not set: Error on absolute export with relative usage + requirements. Run "cmake --help-policy CMP0057" for policy details. Use + the cmake_policy command to set the policy and suppress this warning. + + Target "somelib" is installed with a path relative to the installation + prefix + + "include" + + in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of + export set "exp" which is installed with an absolute path as its + DESTINATION. This mixing of absolute and relative paths creates unusable + target export files. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake new file mode 100644 index 0000000..6d112b2 --- /dev/null +++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake @@ -0,0 +1,11 @@ + +add_library(somelib SHARED empty.cpp) +target_include_directories(somelib INTERFACE $) + +install(TARGETS somelib EXPORT exp + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +) + +install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 296d440..2ebe8c0 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -8,3 +8,9 @@ run_cmake(RelativeLibDir) run_cmake(RelativeIncludeDestination-CMP0057-NEW) run_cmake(RelativeIncludeDestination-CMP0057-OLD) run_cmake(RelativeIncludeDestination-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-WARN) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD) +run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 9 08:41:56 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 9 Dec 2014 08:41:56 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1107-g3916541 Message-ID: <20141209134156.AD0D0A4DA5@public.kitware.com> This is an automated email from 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 391654193b2be0815c0a546ca0a9a3d6a092af8e (commit) via 3fb33e01a1c7a55f35c44a489273f780b21bbca6 (commit) via d425c1104588e82619a461b77e310b15b6dec1d0 (commit) via 8235effe482308b640e91ca44f0ffe21546522d0 (commit) from 2ac7065953475fdc254e2f64efdf922ca1839229 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=391654193b2be0815c0a546ca0a9a3d6a092af8e commit 391654193b2be0815c0a546ca0a9a3d6a092af8e Merge: 2ac7065 3fb33e0 Author: Brad King AuthorDate: Tue Dec 9 08:41:55 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 08:41:55 2014 -0500 Merge topic 'doc-find-module-no-summary' into next 3fb33e01 Merge branch 'backport-doc-find-module-no-summary' into doc-find-module-no-summary d425c110 Help: Drop FeatureSummary example in cmake-developer.7 8235effe Help: Drop FeatureSummary example in cmake-developer.7 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fb33e01a1c7a55f35c44a489273f780b21bbca6 commit 3fb33e01a1c7a55f35c44a489273f780b21bbca6 Merge: 8235eff d425c11 Author: Brad King AuthorDate: Tue Dec 9 08:40:59 2014 -0500 Commit: Brad King CommitDate: Tue Dec 9 08:40:59 2014 -0500 Merge branch 'backport-doc-find-module-no-summary' into doc-find-module-no-summary Resolve conflict in Help/manual/cmake-developer.7.rst by taking our side. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d425c1104588e82619a461b77e310b15b6dec1d0 commit d425c1104588e82619a461b77e310b15b6dec1d0 Author: Brad King AuthorDate: Tue Dec 9 08:40:33 2014 -0500 Commit: Brad King CommitDate: Tue Dec 9 08:40:33 2014 -0500 Help: Drop FeatureSummary example in cmake-developer.7 The use of FeatureSummary inside a find module is not a convention yet used by upstream CMake modules. Drop the example from the documentation about how to write find modules. If in the future we add use of FeatureSummary to many of the upstream find modules then this example can be restored as part of establishing the convention. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 0884a59..097d8fc 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -1115,17 +1115,6 @@ not any of its dependencies. Instead, those dependencies should also be targets, and CMake should be told that they are dependencies of this target. CMake will then combine all the necessary information automatically. -We should also provide some information about the package, such as where to -download it. - -.. code-block:: cmake - - include(FeatureSummary) - set_package_properties(Foo PROPERTIES - URL "http://www.foo.example.com/" - DESCRIPTION "A library for doing useful things" - ) - Most of the cache variables should be hidden in the ``ccmake`` interface unless the user explicitly asks to edit them. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8235effe482308b640e91ca44f0ffe21546522d0 commit 8235effe482308b640e91ca44f0ffe21546522d0 Author: Brad King AuthorDate: Tue Dec 9 08:35:46 2014 -0500 Commit: Brad King CommitDate: Tue Dec 9 08:40:17 2014 -0500 Help: Drop FeatureSummary example in cmake-developer.7 The use of FeatureSummary inside a find module is not a convention yet used by upstream CMake modules. Drop the example from the documentation about how to write find modules. If in the future we add use of FeatureSummary to many of the upstream find modules then this example can be restored as part of establishing the convention. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 3b9b921..682ce47 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -1093,17 +1093,6 @@ The ``RELEASE`` variant should be listed first in the property so that that variant is chosen if the user uses a configuration which is not an exact match for any listed ``IMPORTED_CONFIGURATIONS``. -We should also provide some information about the package, such as where to -download it. - -.. code-block:: cmake - - include(FeatureSummary) - set_package_properties(Foo PROPERTIES - URL "http://www.foo.example.com/" - DESCRIPTION "A library for doing useful things" - ) - Most of the cache variables should be hidden in the ``ccmake`` interface unless the user explicitly asks to edit them. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-developer.7.rst | 11 ----------- 1 file changed, 11 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 9 10:33:53 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 9 Dec 2014 10:33:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1109-g5e666d8 Message-ID: <20141209153353.6E48DA8382@public.kitware.com> This is an automated email from 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 5e666d80cabcae57555df81df15cd2e70177b865 (commit) via df01a380f0a1586629db9445173650fbac6de31b (commit) from 391654193b2be0815c0a546ca0a9a3d6a092af8e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e666d80cabcae57555df81df15cd2e70177b865 commit 5e666d80cabcae57555df81df15cd2e70177b865 Merge: 3916541 df01a38 Author: Brad King AuthorDate: Tue Dec 9 10:33:52 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 10:33:52 2014 -0500 Merge topic 'fix-wince-unicode-entry-point' into next df01a380 Revert "VS, WINCE: Fix entry point for Unicode builds" http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df01a380f0a1586629db9445173650fbac6de31b commit df01a380f0a1586629db9445173650fbac6de31b Author: Brad King AuthorDate: Tue Dec 9 10:31:05 2014 -0500 Commit: Brad King CommitDate: Tue Dec 9 10:31:05 2014 -0500 Revert "VS, WINCE: Fix entry point for Unicode builds" This reverts commit 681cda02bf656c1cc114632d60afc8bd0cac4b09. The selection of entry point depends on the source code content and is independent of whether _UNICODE is defined. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2ef27e2..26fc317 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2267,14 +2267,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - if (this->ClOptions[config]->UsingUnicode()) - { - linkOptions.AddFlag("EntryPointSymbol", "wWinMainCRTStartup"); - } - else - { - linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); - } + linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); } } else @@ -2289,14 +2282,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - if (this->ClOptions[config]->UsingUnicode()) - { - linkOptions.AddFlag("EntryPointSymbol", "mainWCRTStartup"); - } - else - { - linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); - } + linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); } } else ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 9 10:44:11 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 9 Dec 2014 10:44:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1111-g98d9f6e3 Message-ID: <20141209154411.B6066A664A@public.kitware.com> This is an automated email from 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 98d9f6e3e107a5c17b03e3003d7ab92ffdc33677 (commit) via 009c1865dcc967a349be63a713c46ac88d297250 (commit) from 5e666d80cabcae57555df81df15cd2e70177b865 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98d9f6e3e107a5c17b03e3003d7ab92ffdc33677 commit 98d9f6e3e107a5c17b03e3003d7ab92ffdc33677 Merge: 5e666d8 009c186 Author: Brad King AuthorDate: Tue Dec 9 10:44:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 10:44:11 2014 -0500 Merge topic 'FindQt4-fix-major-version-mismatch' into next 009c1865 FindQt4: Fix handling of QT_VERSION_MAJOR mismatch http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=009c1865dcc967a349be63a713c46ac88d297250 commit 009c1865dcc967a349be63a713c46ac88d297250 Author: Daniel Scharrer AuthorDate: Tue Dec 9 15:40:45 2014 +0100 Commit: Brad King CommitDate: Tue Dec 9 10:43:02 2014 -0500 FindQt4: Fix handling of QT_VERSION_MAJOR mismatch Fix capitalization of Qt4_FOUND variable when setting it to false in this case. This caused find_package(Qt4) to appear successful when it was not. Note that the legacy QT4_FOUND variable is unconditionally overwritten at the end of the file with the value of Qt4_FOUND. diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index a79246a..11091b5 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -1321,7 +1321,7 @@ endif() if (NOT QT_VERSION_MAJOR EQUAL 4) set(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}") - set(QT4_FOUND FALSE) + set(Qt4_FOUND FALSE) if(Qt4_FIND_REQUIRED) message( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x") else() ----------------------------------------------------------------------- Summary of changes: Modules/FindQt4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 9 10:54:53 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 9 Dec 2014 10:54:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-456-g92eaa47 Message-ID: <20141209155453.B01BFA8049@public.kitware.com> This is an automated email from 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 92eaa4707785ccdcbd4b6203a7e0a62b990211cc (commit) via 3fb33e01a1c7a55f35c44a489273f780b21bbca6 (commit) via d425c1104588e82619a461b77e310b15b6dec1d0 (commit) via 8235effe482308b640e91ca44f0ffe21546522d0 (commit) from 2372cdaa3aa2c8b6fb0da1e6c74c10695a1b1ae8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92eaa4707785ccdcbd4b6203a7e0a62b990211cc commit 92eaa4707785ccdcbd4b6203a7e0a62b990211cc Merge: 2372cda 3fb33e0 Author: Brad King AuthorDate: Tue Dec 9 10:54:52 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 10:54:52 2014 -0500 Merge topic 'doc-find-module-no-summary' 3fb33e01 Merge branch 'backport-doc-find-module-no-summary' into doc-find-module-no-summary d425c110 Help: Drop FeatureSummary example in cmake-developer.7 8235effe Help: Drop FeatureSummary example in cmake-developer.7 ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-developer.7.rst | 11 ----------- 1 file changed, 11 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 9 10:54:55 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 9 Dec 2014 10:54:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-458-g3b94772 Message-ID: <20141209155455.DF01BA8060@public.kitware.com> This is an automated email from 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 3b9477231d2947fa6281a1e29b4459d3f66d4a49 (commit) via ce331bab929c5a38e048ba15d7393dcf96fad9e1 (commit) from 92eaa4707785ccdcbd4b6203a7e0a62b990211cc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b9477231d2947fa6281a1e29b4459d3f66d4a49 commit 3b9477231d2947fa6281a1e29b4459d3f66d4a49 Merge: 92eaa47 ce331ba Author: Brad King AuthorDate: Tue Dec 9 10:54:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 10:54:54 2014 -0500 Merge topic 'find_library-updated-directory-content' ce331bab find_library: Fix repeat call after changing directory content (#15293) ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalGenerator.cxx | 33 +++++++++++++------- Source/cmGlobalGenerator.h | 17 +++++----- Tests/RunCMake/CMakeLists.txt | 1 + .../{CMP0055 => find_library}/CMakeLists.txt | 0 Tests/RunCMake/find_library/Created-stderr.txt | 2 ++ Tests/RunCMake/find_library/Created.cmake | 16 ++++++++++ Tests/RunCMake/find_library/RunCMakeTest.cmake | 3 ++ 7 files changed, 52 insertions(+), 20 deletions(-) copy Tests/RunCMake/{CMP0055 => find_library}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/find_library/Created-stderr.txt create mode 100644 Tests/RunCMake/find_library/Created.cmake create mode 100644 Tests/RunCMake/find_library/RunCMakeTest.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 9 10:54:57 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 9 Dec 2014 10:54:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-460-g66f587e Message-ID: <20141209155457.B8FF9A806A@public.kitware.com> This is an automated email from 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 66f587e7dcd127bf82bb175a8c7e9cc8cecb7a97 (commit) via e01040636d3c8028019f00c2f226dd2f6d552732 (commit) from 3b9477231d2947fa6281a1e29b4459d3f66d4a49 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66f587e7dcd127bf82bb175a8c7e9cc8cecb7a97 commit 66f587e7dcd127bf82bb175a8c7e9cc8cecb7a97 Merge: 3b94772 e010406 Author: Brad King AuthorDate: Tue Dec 9 10:54:56 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 10:54:56 2014 -0500 Merge topic 'FindLATEX-use-FPHSA' e0104063 FindLATEX: Use FPHSA to report status in standard way ----------------------------------------------------------------------- Summary of changes: Modules/FindLATEX.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 9 10:55:51 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 9 Dec 2014 10:55:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1116-gc58581c Message-ID: <20141209155551.2186FA7289@public.kitware.com> This is an automated email from 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 c58581c63a990ff54882b61c64249a63a37b9d51 (commit) via 66f587e7dcd127bf82bb175a8c7e9cc8cecb7a97 (commit) via 3b9477231d2947fa6281a1e29b4459d3f66d4a49 (commit) via 92eaa4707785ccdcbd4b6203a7e0a62b990211cc (commit) via 2372cdaa3aa2c8b6fb0da1e6c74c10695a1b1ae8 (commit) from 98d9f6e3e107a5c17b03e3003d7ab92ffdc33677 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c58581c63a990ff54882b61c64249a63a37b9d51 commit c58581c63a990ff54882b61c64249a63a37b9d51 Merge: 98d9f6e3 66f587e Author: Brad King AuthorDate: Tue Dec 9 10:55:06 2014 -0500 Commit: Brad King CommitDate: Tue Dec 9 10:55:06 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Tue Dec 9 15:54:55 2014 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Tue, 9 Dec 2014 15:54:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1118-g9bb68ec Message-ID: <20141209205455.77578A7A97@public.kitware.com> This is an automated email from 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 9bb68ece44b1aa88e5bb0fbf2f053e96a2fc5a57 (commit) via c6dcb83b8ea949936ea257b0b7cc0aaab2f2466c (commit) from c58581c63a990ff54882b61c64249a63a37b9d51 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9bb68ece44b1aa88e5bb0fbf2f053e96a2fc5a57 commit 9bb68ece44b1aa88e5bb0fbf2f053e96a2fc5a57 Merge: c58581c c6dcb83 Author: Nils Gladitz AuthorDate: Tue Dec 9 15:54:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 9 15:54:54 2014 -0500 Merge topic 'extend-CMP0054-doc' into next c6dcb83b CMP0054: Extend policy documentation with an example http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6dcb83b8ea949936ea257b0b7cc0aaab2f2466c commit c6dcb83b8ea949936ea257b0b7cc0aaab2f2466c Author: Nils Gladitz AuthorDate: Tue Dec 9 21:52:23 2014 +0100 Commit: Nils Gladitz CommitDate: Tue Dec 9 21:52:23 2014 +0100 CMP0054: Extend policy documentation with an example diff --git a/Help/policy/CMP0054.rst b/Help/policy/CMP0054.rst index dffee5e..39f0c40 100644 --- a/Help/policy/CMP0054.rst +++ b/Help/policy/CMP0054.rst @@ -3,15 +3,43 @@ CMP0054 Only interpret :command:`if` arguments as variables or keywords when unquoted. -CMake 3.1 and above no longer dereference variables or interpret keywords -in an :command:`if` command argument when it is a :ref:`Quoted Argument` -or a :ref:`Bracket Argument`. +CMake 3.1 and above no longer implicitly dereference variables or +interpret keywords in an :command:`if` command argument when +it is a :ref:`Quoted Argument` or a :ref:`Bracket Argument`. The ``OLD`` behavior for this policy is to dereference variables and interpret keywords even if they are quoted or bracketed. The ``NEW`` behavior is to not dereference variables or interpret keywords that have been quoted or bracketed. +Given the following partial example: + +:: + + set(MONKEY 1) + set(ANIMAL MONKEY) + + if("${ANIMAL}" STREQUAL "MONKEY") + +After explicit expansion of variables this gives: + +:: + + if("MONKEY" STREQUAL "MONKEY") + +With the policy set to ``OLD`` implicit expansion reduces this semantically to: + +:: + + if("1" STREQUAL "1") + +With the policy set to ``NEW`` the quoted arguments will not be +further dereferenced: + +:: + + if("MONKEY" STREQUAL "MONKEY") + This policy was introduced in CMake version 3.1. CMake version |release| warns when the policy is not set and uses ``OLD`` behavior. Use the :command:`cmake_policy` command to set ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0054.rst | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 10 00:01:09 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 10 Dec 2014 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-461-ga7d8345 Message-ID: <20141210050110.0A266A8081@public.kitware.com> This is an automated email from 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 a7d8345d8c2f319d44576b70481c7cf2e3528226 (commit) from 66f587e7dcd127bf82bb175a8c7e9cc8cecb7a97 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7d8345d8c2f319d44576b70481c7cf2e3528226 commit a7d8345d8c2f319d44576b70481c7cf2e3528226 Author: Kitware Robot AuthorDate: Wed Dec 10 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Wed Dec 10 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 32a15e0..cea0230 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 1) -set(CMake_VERSION_PATCH 20141209) +set(CMake_VERSION_PATCH 20141210) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Wed Dec 10 17:24:13 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 10 Dec 2014 17:24:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1120-g9a91d8a Message-ID: <20141210222413.E6B5EA8145@public.kitware.com> This is an automated email from 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 9a91d8a80855a5db8446f73c527c28aecdf17ee3 (commit) via d8589e6437451ef174fc480d0dfc4e83e49b1b30 (commit) from 9bb68ece44b1aa88e5bb0fbf2f053e96a2fc5a57 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a91d8a80855a5db8446f73c527c28aecdf17ee3 commit 9a91d8a80855a5db8446f73c527c28aecdf17ee3 Merge: 9bb68ec d8589e6 Author: Ben Boeckel AuthorDate: Wed Dec 10 17:24:13 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 10 17:24:13 2014 -0500 Merge topic 'catch-ctest-errors-better' into next d8589e64 ctest: count errors from scripts properly http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8589e6437451ef174fc480d0dfc4e83e49b1b30 commit d8589e6437451ef174fc480d0dfc4e83e49b1b30 Author: Ben Boeckel AuthorDate: Wed Dec 10 17:22:21 2014 -0500 Commit: Ben Boeckel CommitDate: Wed Dec 10 17:22:21 2014 -0500 ctest: count errors from scripts properly In the unlikely event that someone has a billion+ scripts (or some codepath returns negative numbers), we could overflow and make a pile of errors a non-error. This change also allows us to use flags for the error in the future rather than just "something went wrong". diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 749eb58..f958e7b 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -183,7 +183,7 @@ int cmCTestScriptHandler::ProcessHandler() for (size_t i=0; i < this->ConfigurationScripts.size(); ++i) { // for each script run it - res += this->RunConfigurationScript + res |= this->RunConfigurationScript (cmSystemTools::CollapseFullPath(this->ConfigurationScripts[i]), this->ScriptProcessScope[i]); } ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestScriptHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 11 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 11 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-462-g3171fe0 Message-ID: <20141211050110.67AB0A7E4B@public.kitware.com> This is an automated email from 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 3171fe0afa7169c1e814a5c0e08b115002f0d3c3 (commit) from a7d8345d8c2f319d44576b70481c7cf2e3528226 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3171fe0afa7169c1e814a5c0e08b115002f0d3c3 commit 3171fe0afa7169c1e814a5c0e08b115002f0d3c3 Author: Kitware Robot AuthorDate: Thu Dec 11 00:01:07 2014 -0500 Commit: Kitware Robot CommitDate: Thu Dec 11 00:01:07 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index cea0230..44b118f 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 1) -set(CMake_VERSION_PATCH 20141210) +set(CMake_VERSION_PATCH 20141211) #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 Dec 11 11:42:59 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 11 Dec 2014 11:42:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1122-ga660cdb Message-ID: <20141211164259.A432BA4E9C@public.kitware.com> This is an automated email from 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 a660cdb10ece78f5d19456c07cce628ee47bdf0e (commit) via 0e75a3371daf0bad47d467fd8168c445373c51b5 (commit) from 9a91d8a80855a5db8446f73c527c28aecdf17ee3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a660cdb10ece78f5d19456c07cce628ee47bdf0e commit a660cdb10ece78f5d19456c07cce628ee47bdf0e Merge: 9a91d8a 0e75a33 Author: Brad King AuthorDate: Thu Dec 11 11:42:58 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 11 11:42:58 2014 -0500 Merge topic 'fix-wince-unicode-entry-point' into next 0e75a337 Revert "Revert "VS, WINCE: Fix entry point for Unicode builds"" http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e75a3371daf0bad47d467fd8168c445373c51b5 commit 0e75a3371daf0bad47d467fd8168c445373c51b5 Author: Brad King AuthorDate: Thu Dec 11 11:38:55 2014 -0500 Commit: Brad King CommitDate: Thu Dec 11 11:38:55 2014 -0500 Revert "Revert "VS, WINCE: Fix entry point for Unicode builds"" This reverts commit df01a380f0a1586629db9445173650fbac6de31b. The VS <= 9 generators have logic that Unicode implies wmain. Use that in VS >= 10 for consistency across VS versions. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 26fc317..2ef27e2 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2267,7 +2267,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "wWinMainCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup"); + } } } else @@ -2282,7 +2289,14 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("SubSystem", "WindowsCE"); if (this->Target->GetType() == cmTarget::EXECUTABLE) { - linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + if (this->ClOptions[config]->UsingUnicode()) + { + linkOptions.AddFlag("EntryPointSymbol", "mainWCRTStartup"); + } + else + { + linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup"); + } } } else ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 11 13:57:54 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 11 Dec 2014 13:57:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1126-g21d155f Message-ID: <20141211185754.8D586A80BF@public.kitware.com> This is an automated email from 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 21d155f0cb279724c595f2ea8fcb0ceda6bce41d (commit) via 111be1801fcf50412e702be2d5966dbf52926b94 (commit) via 3171fe0afa7169c1e814a5c0e08b115002f0d3c3 (commit) via a7d8345d8c2f319d44576b70481c7cf2e3528226 (commit) from a660cdb10ece78f5d19456c07cce628ee47bdf0e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21d155f0cb279724c595f2ea8fcb0ceda6bce41d commit 21d155f0cb279724c595f2ea8fcb0ceda6bce41d Merge: a660cdb 111be18 Author: Brad King AuthorDate: Thu Dec 11 13:57:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 11 13:57:53 2014 -0500 Merge topic 'drop-double-underscores' into next 111be180 Rename header guards to not start with double underscore 3171fe0a CMake Nightly Date Stamp a7d8345d CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=111be1801fcf50412e702be2d5966dbf52926b94 commit 111be1801fcf50412e702be2d5966dbf52926b94 Author: Sean McBride AuthorDate: Thu Dec 11 13:10:03 2014 -0500 Commit: Brad King CommitDate: Thu Dec 11 13:53:06 2014 -0500 Rename header guards to not start with double underscore Use regex to find/replace: __(cm.*_h) \1 Then fix QCMake.h by hand. diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index d2a25ca..8a57c73 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesBoolWidget_h -#define __cmCursesBoolWidget_h +#ifndef cmCursesBoolWidget_h +#define cmCursesBoolWidget_h #include "cmCursesWidget.h" class cmCursesMainForm; @@ -37,4 +37,4 @@ protected: }; -#endif // __cmCursesBoolWidget_h +#endif // cmCursesBoolWidget_h diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index 98107cc..7cdf13b 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesCacheEntryComposite_h -#define __cmCursesCacheEntryComposite_h +#ifndef cmCursesCacheEntryComposite_h +#define cmCursesCacheEntryComposite_h #include "../cmCacheManager.h" #include "cmCursesLabelWidget.h" @@ -40,4 +40,4 @@ protected: int EntryWidth; }; -#endif // __cmCursesCacheEntryComposite_h +#endif // cmCursesCacheEntryComposite_h diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index 9ac1365..2b3b9b5 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesDummyWidget_h -#define __cmCursesDummyWidget_h +#ifndef cmCursesDummyWidget_h +#define cmCursesDummyWidget_h #include "cmCursesWidget.h" @@ -33,4 +33,4 @@ protected: }; -#endif // __cmCursesDummyWidget_h +#endif // cmCursesDummyWidget_h diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h index 9d2972e..6c50dd4 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.h +++ b/Source/CursesDialog/cmCursesFilePathWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesFilePathWidget_h -#define __cmCursesFilePathWidget_h +#ifndef cmCursesFilePathWidget_h +#define cmCursesFilePathWidget_h #include "cmCursesPathWidget.h" @@ -25,4 +25,4 @@ protected: }; -#endif // __cmCursesFilePathWidget_h +#endif // cmCursesFilePathWidget_h diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h index f9317b9..9837f5a 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesForm_h -#define __cmCursesForm_h +#ifndef cmCursesForm_h +#define cmCursesForm_h #include "../cmStandardIncludes.h" #include "cmCursesStandardIncludes.h" @@ -73,4 +73,4 @@ protected: FORM* Form; }; -#endif // __cmCursesForm_h +#endif // cmCursesForm_h diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index cc32d11..98170f5 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesLabelWidget_h -#define __cmCursesLabelWidget_h +#ifndef cmCursesLabelWidget_h +#define cmCursesLabelWidget_h #include "cmCursesWidget.h" #include "cmCursesStandardIncludes.h" @@ -35,4 +35,4 @@ protected: void operator=(const cmCursesLabelWidget&); }; -#endif // __cmCursesLabelWidget_h +#endif // cmCursesLabelWidget_h diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index 1e86974..6e37eea 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesLongMessageForm_h -#define __cmCursesLongMessageForm_h +#ifndef cmCursesLongMessageForm_h +#define cmCursesLongMessageForm_h #include "../cmStandardIncludes.h" #include "cmCursesForm.h" @@ -55,4 +55,4 @@ protected: }; -#endif // __cmCursesLongMessageForm_h +#endif // cmCursesLongMessageForm_h diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index fba9bc5..6455252 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesMainForm_h -#define __cmCursesMainForm_h +#ifndef cmCursesMainForm_h +#define cmCursesMainForm_h #include "../cmStandardIncludes.h" #include "cmCursesForm.h" @@ -161,4 +161,4 @@ protected: bool SearchMode; }; -#endif // __cmCursesMainForm_h +#endif // cmCursesMainForm_h diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h index 5cee489..324014e 100644 --- a/Source/CursesDialog/cmCursesOptionsWidget.h +++ b/Source/CursesDialog/cmCursesOptionsWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesOptionsWidget_h -#define __cmCursesOptionsWidget_h +#ifndef cmCursesOptionsWidget_h +#define cmCursesOptionsWidget_h #include "cmCursesWidget.h" class cmCursesMainForm; @@ -36,4 +36,4 @@ protected: std::vector::size_type CurrentOption; }; -#endif // __cmCursesOptionsWidget_h +#endif // cmCursesOptionsWidget_h diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h index 45c22a3..18d298a 100644 --- a/Source/CursesDialog/cmCursesPathWidget.h +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesPathWidget_h -#define __cmCursesPathWidget_h +#ifndef cmCursesPathWidget_h +#define cmCursesPathWidget_h #include "cmCursesStringWidget.h" @@ -37,4 +37,4 @@ protected: std::string::size_type CurrentIndex; }; -#endif // __cmCursesPathWidget_h +#endif // cmCursesPathWidget_h diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index dd8c02a..fc1b2ba 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesStringWidget_h -#define __cmCursesStringWidget_h +#ifndef cmCursesStringWidget_h +#define cmCursesStringWidget_h #include "cmCursesWidget.h" @@ -73,4 +73,4 @@ protected: bool Done; }; -#endif // __cmCursesStringWidget_h +#endif // cmCursesStringWidget_h diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index d91a0cb..7d82864 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmCursesWidget_h -#define __cmCursesWidget_h +#ifndef cmCursesWidget_h +#define cmCursesWidget_h #include "../cmCacheManager.h" #include "cmCursesStandardIncludes.h" @@ -84,4 +84,4 @@ protected: int Page; }; -#endif // __cmCursesWidget_h +#endif // cmCursesWidget_h diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index bd82f0d..d910eb7 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -10,8 +10,8 @@ See the License for more information. ============================================================================*/ -#ifndef __QCMake_h -#define __QCMake_h +#ifndef QCMake_h +#define QCMake_h #ifdef _MSC_VER #pragma warning ( disable : 4127 ) #pragma warning ( disable : 4512 ) @@ -152,5 +152,5 @@ protected: QAtomicInt InterruptFlag; }; -#endif // __QCMake_h +#endif // QCMake_h diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h index d038b5c..84bc9bc 100644 --- a/Source/cmDynamicLoader.h +++ b/Source/cmDynamicLoader.h @@ -15,8 +15,8 @@ // libraries into a process. -#ifndef __cmDynamicLoader_h -#define __cmDynamicLoader_h +#ifndef cmDynamicLoader_h +#define cmDynamicLoader_h #include "cmStandardIncludes.h" diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in index 726c843..b883284 100644 --- a/Utilities/cmThirdParty.h.in +++ b/Utilities/cmThirdParty.h.in @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cmThirdParty_h -#define __cmThirdParty_h +#ifndef cmThirdParty_h +#define cmThirdParty_h /* Whether CMake is using its own utility libraries. */ #cmakedefine CMAKE_USE_SYSTEM_CURL diff --git a/Utilities/cm_bzlib.h b/Utilities/cm_bzlib.h index d1fffa1..5678025 100644 --- a/Utilities/cm_bzlib.h +++ b/Utilities/cm_bzlib.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cm_bzlib_h -#define __cm_bzlib_h +#ifndef cm_bzlib_h +#define cm_bzlib_h /* Use the bzip2 library configured for CMake. */ #include "cmThirdParty.h" diff --git a/Utilities/cm_curl.h b/Utilities/cm_curl.h index a3b049b..c9835e7 100644 --- a/Utilities/cm_curl.h +++ b/Utilities/cm_curl.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cm_curl_h -#define __cm_curl_h +#ifndef cm_curl_h +#define cm_curl_h /* Use the curl library configured for CMake. */ #include "cmThirdParty.h" diff --git a/Utilities/cm_expat.h b/Utilities/cm_expat.h index 91f4a7b..f361541 100644 --- a/Utilities/cm_expat.h +++ b/Utilities/cm_expat.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cm_expat_h -#define __cm_expat_h +#ifndef cm_expat_h +#define cm_expat_h /* Use the expat library configured for CMake. */ #include "cmThirdParty.h" diff --git a/Utilities/cm_libarchive.h b/Utilities/cm_libarchive.h index 1469bae..0f18c91 100644 --- a/Utilities/cm_libarchive.h +++ b/Utilities/cm_libarchive.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cm_libarchive_h -#define __cm_libarchive_h +#ifndef cm_libarchive_h +#define cm_libarchive_h /* Use the libarchive configured for CMake. */ #include "cmThirdParty.h" diff --git a/Utilities/cm_lzma.h b/Utilities/cm_lzma.h index c11c916..02d7e4f 100644 --- a/Utilities/cm_lzma.h +++ b/Utilities/cm_lzma.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cm_lzma_h -#define __cm_lzma_h +#ifndef cm_lzma_h +#define cm_lzma_h /* Use the liblzma configured for CMake. */ #include "cmThirdParty.h" diff --git a/Utilities/cm_xmlrpc.h b/Utilities/cm_xmlrpc.h index a6b375d..ac461f9 100644 --- a/Utilities/cm_xmlrpc.h +++ b/Utilities/cm_xmlrpc.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cm_xmlrpc_h -#define __cm_xmlrpc_h +#ifndef cm_xmlrpc_h +#define cm_xmlrpc_h /* Use the xmlrpc library configured for CMake. */ #include "cmThirdParty.h" diff --git a/Utilities/cm_zlib.h b/Utilities/cm_zlib.h index fb5832e..1b5c06e 100644 --- a/Utilities/cm_zlib.h +++ b/Utilities/cm_zlib.h @@ -9,8 +9,8 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ -#ifndef __cm_zlib_h -#define __cm_zlib_h +#ifndef cm_zlib_h +#define cm_zlib_h /* Use the zlib library configured for CMake. */ #include "cmThirdParty.h" diff --git a/Utilities/cmcompress/cmcompress.h b/Utilities/cmcompress/cmcompress.h index fdb0d90..4cd3a1c 100644 --- a/Utilities/cmcompress/cmcompress.h +++ b/Utilities/cmcompress/cmcompress.h @@ -35,8 +35,8 @@ * SUCH DAMAGE. */ -#ifndef __cmcompress__h_ -#define __cmcompress__h_ +#ifndef cmcompress__h_ +#define cmcompress__h_ #include @@ -192,4 +192,4 @@ extern "C" #endif -#endif /* __cmcompress__h_ */ +#endif /* cmcompress__h_ */ ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/CursesDialog/cmCursesBoolWidget.h | 6 +++--- Source/CursesDialog/cmCursesCacheEntryComposite.h | 6 +++--- Source/CursesDialog/cmCursesDummyWidget.h | 6 +++--- Source/CursesDialog/cmCursesFilePathWidget.h | 6 +++--- Source/CursesDialog/cmCursesForm.h | 6 +++--- Source/CursesDialog/cmCursesLabelWidget.h | 6 +++--- Source/CursesDialog/cmCursesLongMessageForm.h | 6 +++--- Source/CursesDialog/cmCursesMainForm.h | 6 +++--- Source/CursesDialog/cmCursesOptionsWidget.h | 6 +++--- Source/CursesDialog/cmCursesPathWidget.h | 6 +++--- Source/CursesDialog/cmCursesStringWidget.h | 6 +++--- Source/CursesDialog/cmCursesWidget.h | 6 +++--- Source/QtDialog/QCMake.h | 6 +++--- Source/cmDynamicLoader.h | 4 ++-- Utilities/cmThirdParty.h.in | 4 ++-- Utilities/cm_bzlib.h | 4 ++-- Utilities/cm_curl.h | 4 ++-- Utilities/cm_expat.h | 4 ++-- Utilities/cm_libarchive.h | 4 ++-- Utilities/cm_lzma.h | 4 ++-- Utilities/cm_xmlrpc.h | 4 ++-- Utilities/cm_zlib.h | 4 ++-- Utilities/cmcompress/cmcompress.h | 6 +++--- 24 files changed, 61 insertions(+), 61 deletions(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Thu Dec 11 17:30:04 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 11 Dec 2014 17:30:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1128-g265a5f4 Message-ID: <20141211223004.444AAA833B@public.kitware.com> This is an automated email from 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 265a5f4ec38c933cbb7212568ce5a3813e50e42d (commit) via 17a846ac3e8d0fab4bb99e238dbe867941594465 (commit) from 21d155f0cb279724c595f2ea8fcb0ceda6bce41d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=265a5f4ec38c933cbb7212568ce5a3813e50e42d commit 265a5f4ec38c933cbb7212568ce5a3813e50e42d Merge: 21d155f 17a846a Author: Ben Boeckel AuthorDate: Thu Dec 11 17:30:03 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 11 17:30:03 2014 -0500 Merge topic 'find-msmpi' into next 17a846ac FindMPI: search for msmpi's mpiexec as well http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17a846ac3e8d0fab4bb99e238dbe867941594465 commit 17a846ac3e8d0fab4bb99e238dbe867941594465 Author: Ben Boeckel AuthorDate: Thu Dec 11 17:26:06 2014 -0500 Commit: Ben Boeckel CommitDate: Thu Dec 11 17:26:06 2014 -0500 FindMPI: search for msmpi's mpiexec as well diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 6f6dcf3..0508579 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -174,6 +174,7 @@ set(_MPI_EXEC_NAMES mpiexec mpirun lamexec srun) # Grab the path to MPI from the registry if we're on windows. set(_MPI_PREFIX_PATH) if(WIN32) + list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin") list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..") list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]") list(APPEND _MPI_PREFIX_PATH "$ENV{ProgramW6432}/MPICH2/") ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From steveire at gmail.com Thu Dec 11 18:23:28 2014 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 11 Dec 2014 18:23:28 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1130-g97f3bfd Message-ID: <20141211232331.4AF39A81C8@public.kitware.com> This is an automated email from 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 97f3bfd8b9d9b4cb9ef1d85086883b498e6fc21e (commit) via a3c35b583f53d7d37ad32d92bf216614a425ab2c (commit) from 265a5f4ec38c933cbb7212568ce5a3813e50e42d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97f3bfd8b9d9b4cb9ef1d85086883b498e6fc21e commit 97f3bfd8b9d9b4cb9ef1d85086883b498e6fc21e Merge: 265a5f4 a3c35b5 Author: Stephen Kelly AuthorDate: Thu Dec 11 18:23:23 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 11 18:23:23 2014 -0500 Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next a3c35b58 Revert topic. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3c35b583f53d7d37ad32d92bf216614a425ab2c commit a3c35b583f53d7d37ad32d92bf216614a425ab2c Author: Stephen Kelly AuthorDate: Fri Dec 12 00:22:42 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 12 00:22:54 2014 +0100 Revert topic. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 76ca5d4..96f39e6 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -114,4 +114,3 @@ All Policies /policy/CMP0054 /policy/CMP0055 /policy/CMP0056 - /policy/CMP0057 diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst deleted file mode 100644 index ddd2bf1..0000000 --- a/Help/policy/CMP0057.rst +++ /dev/null @@ -1,24 +0,0 @@ -CMP0057 -------- - -Error on absolute export with relative usage requirements. - -CMake 3.1 and lower generated unusable files with the -:command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used -with it, and a relative path was passed to the ``INCLUDES DESTINATION`` of a -target in the specified export set. Unusable files could also be generated -if the ``$`` generator expression was used, despite an -export with an absolute ``DESTINATION``, or if the ``$`` -generator expression was used containing a relative path. In such cases, -a use of an internal variable was generated, although the internal -variable was unset. - -The ``OLD`` behavior for this policy is to issue a warning if a the -:command:`install(EXPORT)` command generates such an unusable file. The -``NEW`` behavior for this policy is to issue an error instead of generating -the file. - -This policy was introduced in CMake version 3.2. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it to -``OLD`` or ``NEW`` explicitly. diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 37956dc..1f39d7a 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -171,7 +171,7 @@ void cmExportFileGenerator::PopulateInterfaceProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions(propName, prepro, target, + this->ResolveTargetsInGeneratorExpressions(prepro, target, missingTargets); properties[outputName] = prepro; } @@ -205,8 +205,7 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions("INTERFACE_LINK_LIBRARIES", - prepro, target, + this->ResolveTargetsInGeneratorExpressions(prepro, target, missingTargets, ReplaceFreeTargets); properties["INTERFACE_LINK_LIBRARIES"] = prepro; @@ -384,8 +383,7 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( tei->InterfaceIncludeDirectories, preprocessRule, true); - this->ReplaceInstallPrefix(tei->Target, "INTERFACE_INCLUDE_DIRECTORIES", - dirs); + this->ReplaceInstallPrefix(dirs); cmsys::auto_ptr cge = ge.Parse(dirs); std::string exportDirs = cge->Evaluate(target->GetMakefile(), "", false, target); @@ -423,9 +421,8 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( true); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions("INTERFACE_INCLUDE_DIRECTORIES", - prepro, target, - missingTargets); + this->ResolveTargetsInGeneratorExpressions(prepro, target, + missingTargets); if (!checkInterfaceDirs(prepro, target)) { @@ -610,7 +607,6 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input, //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( - std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets, @@ -618,8 +614,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( { if (replace == NoReplaceFreeTargets) { - this->ResolveTargetsInGeneratorExpression(propName, input, - target, missingTargets); + this->ResolveTargetsInGeneratorExpression(input, target, missingTargets); return; } std::vector parts; @@ -636,7 +631,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( } else { - this->ResolveTargetsInGeneratorExpression(propName, + this->ResolveTargetsInGeneratorExpression( *li, target, missingTargets); @@ -649,7 +644,6 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( //---------------------------------------------------------------------------- void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( - std::string const& propName, std::string &input, cmTarget* target, std::vector &missingTargets) @@ -715,7 +709,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( lastPos = endPos; } - this->ReplaceInstallPrefix(target, propName, input); + this->ReplaceInstallPrefix(input); if (!errorString.empty()) { @@ -725,8 +719,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( //---------------------------------------------------------------------------- void -cmExportFileGenerator::ReplaceInstallPrefix(cmTarget*, - std::string const&, std::string &) +cmExportFileGenerator::ReplaceInstallPrefix(std::string &) { // Do nothing } @@ -799,11 +792,9 @@ cmExportFileGenerator preprocessRule); if (!prepro.empty()) { - this->ResolveTargetsInGeneratorExpressions( - "LINK_INTERFACE_LIBRARIES" + suffix, - prepro, target, - missingTargets, - ReplaceFreeTargets); + this->ResolveTargetsInGeneratorExpressions(prepro, target, + missingTargets, + ReplaceFreeTargets); properties["IMPORTED_LINK_INTERFACE_LIBRARIES" + suffix] = prepro; } } diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index d3b9fee..919924e 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -151,9 +151,7 @@ protected: NoReplaceFreeTargets }; - void ResolveTargetsInGeneratorExpressions( - std::string const& propName, - std::string &input, + void ResolveTargetsInGeneratorExpressions(std::string &input, cmTarget* target, std::vector &missingTargets, FreeTargetsReplace replace = NoReplaceFreeTargets); @@ -189,15 +187,11 @@ private: bool AddTargetNamespace(std::string &input, cmTarget* target, std::vector &missingTargets); - void ResolveTargetsInGeneratorExpression( - std::string const& propName, - std::string &input, + void ResolveTargetsInGeneratorExpression(std::string &input, cmTarget* target, std::vector &missingTargets); - virtual void ReplaceInstallPrefix(cmTarget* target, - std::string const& propName, - std::string &input); + virtual void ReplaceInstallPrefix(std::string &input); virtual std::string InstallNameDir(cmTarget* target, const std::string& config) = 0; diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index b519a98..23180f1 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -37,70 +37,15 @@ std::string cmExportInstallFileGenerator::GetConfigImportFileGlob() } //---------------------------------------------------------------------------- -bool cmExportInstallFileGenerator -::CheckIncludesDestinationContent(cmTargetExport* tei, - cmExportSet* exportSet) -{ - std::vector parts; - cmGeneratorExpression::Split(tei->InterfaceIncludeDirectories, parts); - for (std::vector::const_iterator it = parts.begin(); - it != parts.end(); ++it) - { - if (!cmSystemTools::FileIsFullPath(*it)) - { - if (cmGeneratorExpression::Find(*it) != 0) - { - if (this->ImportPrefix.empty()) - { - cmOStringStream e; - cmake::MessageType messageType = cmake::FATAL_ERROR; - cmMakefile* mf = tei->Target->GetMakefile(); - switch(tei->Target->GetPolicyStatusCMP0057()) - { - case cmPolicies::WARN: - e << (mf->GetPolicies() - ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; - case cmPolicies::OLD: - messageType = cmake::AUTHOR_WARNING; - break; - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::NEW: - break; - } - e << "Target \"" - << tei->Target->GetName() - << "\" is installed as part of export set \"" - << exportSet->GetName() << "\" with an INCLUDES DESTINATION " - "containing relative path\n \"" << *it - << "\"\nThe export set \"" - << exportSet->GetName() - << "\" is installed with an absolute path as its DESTINATION. " - "This mixing of absolute and relative paths creates unusable " - "target export files."; - mf->IssueMessage(messageType, e.str()); - if (messageType == cmake::FATAL_ERROR) - { - return false; - } - } - } - } - } - return true; -} - -//---------------------------------------------------------------------------- bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { std::vector allTargets; - cmExportSet* exportSet = this->IEGen->GetExportSet(); { std::string expectedTargets; std::string sep; for(std::vector::const_iterator - tei = exportSet->GetTargetExports()->begin(); - tei != exportSet->GetTargetExports()->end(); ++tei) + tei = this->IEGen->GetExportSet()->GetTargetExports()->begin(); + tei != this->IEGen->GetExportSet()->GetTargetExports()->end(); ++tei) { expectedTargets += sep + this->Namespace + (*tei)->Target->GetExportName(); sep = " "; @@ -113,7 +58,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { cmOStringStream e; e << "install(EXPORT \"" - << exportSet->GetName() + << this->IEGen->GetExportSet()->GetName() << "\" ...) " << "includes target \"" << te->Target->GetName() << "\" more than once in the export set."; cmSystemTools::Error(e.str().c_str()); @@ -196,11 +141,6 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) ImportPropertyMap properties; - if (!this->CheckIncludesDestinationContent(*tei, exportSet)) - { - return false; - } - this->PopulateIncludeDirectoriesInterface(*tei, cmGeneratorExpression::InstallInterface, properties, missingTargets); @@ -299,81 +239,14 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) } //---------------------------------------------------------------------------- -static bool checkCMP0057(cmTarget* target, std::string const& propName, - std::string const& input, cmExportSet* exportSet) -{ - cmOStringStream e; - cmake::MessageType messageType = cmake::FATAL_ERROR; - cmMakefile* mf = target->GetMakefile(); - switch(target->GetPolicyStatusCMP0057()) - { - case cmPolicies::WARN: - e << (mf->GetPolicies() - ->GetPolicyWarning(cmPolicies::CMP0057)) << "\n"; - case cmPolicies::OLD: - messageType = cmake::AUTHOR_WARNING; - break; - case cmPolicies::REQUIRED_ALWAYS: - case cmPolicies::REQUIRED_IF_USED: - case cmPolicies::NEW: - break; - } - e << "Target \"" - << target->GetName() - << "\" is installed with a path relative to the installation " - "prefix\n \"" << input << "\"\nin its " << propName - << " property. The target is part of export set \"" - << exportSet->GetName() << "\" which is installed " - "with an absolute path as its DESTINATION. This mixing of " - "absolute and relative paths creates unusable target export files."; - mf->IssueMessage(messageType, e.str()); - if (messageType == cmake::FATAL_ERROR) - { - return false; - } - return true; -} - -//---------------------------------------------------------------------------- void -cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target, - std::string const& propName, - std::string &input) +cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string &input) { std::string::size_type pos = 0; std::string::size_type lastPos = pos; - if (input.find("${_IMPORT_PREFIX}") != std::string::npos - && this->ImportPrefix.empty()) - { - std::string userFacingInput = input; - while((pos = userFacingInput.find("${_IMPORT_PREFIX}/", lastPos)) - != userFacingInput.npos) - { - std::string::size_type endPos = pos + sizeof("${_IMPORT_PREFIX}/") - 1; - userFacingInput.erase(pos, endPos - pos); - lastPos = endPos; - } - - if (!checkCMP0057(target, propName, userFacingInput, - this->IEGen->GetExportSet())) - { - return; - } - } - - pos = 0; - lastPos = pos; - while((pos = input.find("$", lastPos)) != input.npos) { - if (this->ImportPrefix.empty()) - { - if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet())) - { - return; - } - } std::string::size_type endPos = pos + sizeof("$") - 1; input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}"); lastPos = endPos; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index 0723085..b851ad5 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -16,7 +16,6 @@ class cmInstallExportGenerator; class cmInstallTargetGenerator; -class cmExportSet; /** \class cmExportInstallFileGenerator * \brief Generate a file exporting targets from an install tree. @@ -62,9 +61,7 @@ protected: cmTarget* depender, cmTarget* dependee); - virtual void ReplaceInstallPrefix(cmTarget* target, - std::string const& propName, - std::string &input); + virtual void ReplaceInstallPrefix(std::string &input); void ComplainAboutMissingTarget(cmTarget* depender, cmTarget* dependee, @@ -90,9 +87,6 @@ protected: std::string InstallNameDir(cmTarget* target, const std::string& config); - bool CheckIncludesDestinationContent(cmTargetExport* tei, - cmExportSet* exportSet); - cmInstallExportGenerator* IEGen; std::string ImportPrefix; diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index d3061f3..1a27a25 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -374,11 +374,6 @@ cmPolicies::cmPolicies() CMP0056, "CMP0056", "Honor link flags in try_compile() source-file signature.", 3,2,0, cmPolicies::WARN); - - this->DefinePolicy( - CMP0057, "CMP0057", - "Error on absolute export with relative usage requirements.", - 3,2,0, cmPolicies::WARN); } cmPolicies::~cmPolicies() diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index c3866bd..c393c2f 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -107,12 +107,12 @@ public: CMP0051, ///< List TARGET_OBJECTS in SOURCES target property CMP0052, ///< Reject source and build dirs in installed /// INTERFACE_INCLUDE_DIRECTORIES + CMP0053, ///< Simplify variable reference and escape sequence evaluation CMP0054, ///< Only interpret if() arguments as variables /// or keywords when unquoted. CMP0055, ///< Strict checking for break() command. CMP0056, ///< Honor link flags in try_compile() source-file signature. - CMP0057, ///< Error on absolute export with relative usage requirements. /** \brief Always the last entry. * diff --git a/Source/cmTarget.h b/Source/cmTarget.h index dc4e6c6..a3ecca0 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -34,8 +34,7 @@ F(CMP0041) \ F(CMP0042) \ F(CMP0046) \ - F(CMP0052) \ - F(CMP0057) + F(CMP0052) class cmake; class cmMakefile; diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index 7a59902..f4b744b 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -17,7 +17,6 @@ \* CMP0042 \* CMP0046 \* CMP0052 - \* CMP0057 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt deleted file mode 100644 index 8cd27c2..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Error in CMakeLists.txt: - Target "somelib" is installed as part of export set "exp" with an INCLUDES - DESTINATION containing relative path - - "include" - - The export set "exp" is installed with an absolute path as its DESTINATION. - This mixing of absolute and relative paths creates unusable target export - files. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake deleted file mode 100644 index cab9ac6..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_policy(SET CMP0057 NEW) - -add_library(somelib SHARED empty.cpp) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - INCLUDES DESTINATION include -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt deleted file mode 100644 index 79c92a1..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Warning \(dev\) in CMakeLists.txt: - Target "somelib" is installed as part of export set "exp" with an INCLUDES - DESTINATION containing relative path - - "include" - - The export set "exp" is installed with an absolute path as its DESTINATION. - This mixing of absolute and relative paths creates unusable target export - files. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake deleted file mode 100644 index 58bcbb7..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_policy(SET CMP0057 OLD) - -add_library(somelib SHARED empty.cpp) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - INCLUDES DESTINATION include -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt deleted file mode 100644 index c8e413c..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt +++ /dev/null @@ -1,14 +0,0 @@ -CMake Warning \(dev\) in CMakeLists.txt: - Policy CMP0057 is not set: Error on absolute export with relative usage - requirements. Run "cmake --help-policy CMP0057" for policy details. Use - the cmake_policy command to set the policy and suppress this warning. - - Target "somelib" is installed as part of export set "exp" with an INCLUDES - DESTINATION containing relative path - - "include" - - The export set "exp" is installed with an absolute path as its DESTINATION. - This mixing of absolute and relative paths creates unusable target export - files. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake deleted file mode 100644 index 82bde5d..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake +++ /dev/null @@ -1,11 +0,0 @@ - -add_library(somelib SHARED empty.cpp) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - INCLUDES DESTINATION include -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt deleted file mode 100644 index 2968b91..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error in CMakeLists.txt: - Target "somelib" is installed with a path relative to the installation - prefix - - "\$/include" - - in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of - export set "exp" which is installed with an absolute path as its - DESTINATION. This mixing of absolute and relative paths creates unusable - target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake deleted file mode 100644 index c7255db..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_policy(SET CMP0057 NEW) - -add_library(somelib SHARED empty.cpp) -target_include_directories(somelib INTERFACE $/include>) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt deleted file mode 100644 index 860f62f..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -CMake Warning \(dev\) in CMakeLists.txt: - Target "somelib" is installed with a path relative to the installation - prefix - - "\$/include" - - in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of - export set "exp" which is installed with an absolute path as its - DESTINATION. This mixing of absolute and relative paths creates unusable - target export files. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake deleted file mode 100644 index 1c27fd7..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_policy(SET CMP0057 OLD) - -add_library(somelib SHARED empty.cpp) -target_include_directories(somelib INTERFACE $/include>) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt deleted file mode 100644 index a5ece0d..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt +++ /dev/null @@ -1,15 +0,0 @@ -CMake Warning \(dev\) in CMakeLists.txt: - Policy CMP0057 is not set: Error on absolute export with relative usage - requirements. Run "cmake --help-policy CMP0057" for policy details. Use - the cmake_policy command to set the policy and suppress this warning. - - Target "somelib" is installed with a path relative to the installation - prefix - - "\$/include" - - in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of - export set "exp" which is installed with an absolute path as its - DESTINATION. This mixing of absolute and relative paths creates unusable - target export files. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake deleted file mode 100644 index 06e793e..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake +++ /dev/null @@ -1,11 +0,0 @@ - -add_library(somelib SHARED empty.cpp) -target_include_directories(somelib INTERFACE $/include>) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt deleted file mode 100644 index a11f06a..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error in CMakeLists.txt: - Target "somelib" is installed with a path relative to the installation - prefix - - "include" - - in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of - export set "exp" which is installed with an absolute path as its - DESTINATION. This mixing of absolute and relative paths creates unusable - target export files. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake deleted file mode 100644 index 912aaef..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_policy(SET CMP0057 NEW) - -add_library(somelib SHARED empty.cpp) -target_include_directories(somelib INTERFACE $) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt deleted file mode 100644 index 32cc756..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -CMake Warning \(dev\) in CMakeLists.txt: - Target "somelib" is installed with a path relative to the installation - prefix - - "include" - - in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of - export set "exp" which is installed with an absolute path as its - DESTINATION. This mixing of absolute and relative paths creates unusable - target export files. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake deleted file mode 100644 index e6f5b96..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -cmake_policy(SET CMP0057 OLD) - -add_library(somelib SHARED empty.cpp) -target_include_directories(somelib INTERFACE $) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt deleted file mode 100644 index 573541a..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt deleted file mode 100644 index 1c2acb5..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt +++ /dev/null @@ -1,15 +0,0 @@ -CMake Warning \(dev\) in CMakeLists.txt: - Policy CMP0057 is not set: Error on absolute export with relative usage - requirements. Run "cmake --help-policy CMP0057" for policy details. Use - the cmake_policy command to set the policy and suppress this warning. - - Target "somelib" is installed with a path relative to the installation - prefix - - "include" - - in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of - export set "exp" which is installed with an absolute path as its - DESTINATION. This mixing of absolute and relative paths creates unusable - target export files. -This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake deleted file mode 100644 index 6d112b2..0000000 --- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake +++ /dev/null @@ -1,11 +0,0 @@ - -add_library(somelib SHARED empty.cpp) -target_include_directories(somelib INTERFACE $) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RelativeLibDir-result.txt b/Tests/RunCMake/export/RelativeLibDir-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/export/RelativeLibDir-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/export/RelativeLibDir-stderr.txt b/Tests/RunCMake/export/RelativeLibDir-stderr.txt deleted file mode 100644 index 98fd01f..0000000 --- a/Tests/RunCMake/export/RelativeLibDir-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -CMake Error: install\(EXPORT "exp"\) given absolute DESTINATION "[^"]*" but the export references an installation of target "somelib" which has relative DESTINATION "lib". diff --git a/Tests/RunCMake/export/RelativeLibDir.cmake b/Tests/RunCMake/export/RelativeLibDir.cmake deleted file mode 100644 index a663451..0000000 --- a/Tests/RunCMake/export/RelativeLibDir.cmake +++ /dev/null @@ -1,10 +0,0 @@ - -add_library(somelib SHARED empty.cpp) - -install(TARGETS somelib EXPORT exp - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin -) - -install(EXPORT exp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake) diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake index 2ebe8c0..4b04f18 100644 --- a/Tests/RunCMake/export/RunCMakeTest.cmake +++ b/Tests/RunCMake/export/RunCMakeTest.cmake @@ -4,13 +4,3 @@ run_cmake(TargetNotFound) run_cmake(AppendExport) run_cmake(OldIface) run_cmake(NoExportSet) -run_cmake(RelativeLibDir) -run_cmake(RelativeIncludeDestination-CMP0057-NEW) -run_cmake(RelativeIncludeDestination-CMP0057-OLD) -run_cmake(RelativeIncludeDestination-CMP0057-WARN) -run_cmake(RelativeIncludeDirectory-CMP0057-NEW) -run_cmake(RelativeIncludeDirectory-CMP0057-OLD) -run_cmake(RelativeIncludeDirectory-CMP0057-WARN) -run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW) -run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD) -run_cmake(RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN) diff --git a/Tests/RunCMake/export/empty.cpp b/Tests/RunCMake/export/empty.cpp deleted file mode 100644 index bfbbdde..0000000 --- a/Tests/RunCMake/export/empty.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int empty() -{ - return 0; -} ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-policies.7.rst | 1 - Help/policy/CMP0057.rst | 24 ---- Source/cmExportFileGenerator.cxx | 33 ++--- Source/cmExportFileGenerator.h | 12 +- Source/cmExportInstallFileGenerator.cxx | 135 +------------------- Source/cmExportInstallFileGenerator.h | 8 +- Source/cmPolicies.cxx | 5 - Source/cmPolicies.h | 2 +- Source/cmTarget.h | 3 +- .../RunCMake/TargetPolicies/PolicyList-stderr.txt | 1 - ...lativeIncludeDestination-CMP0057-NEW-result.txt | 1 - ...lativeIncludeDestination-CMP0057-NEW-stderr.txt | 9 -- .../RelativeIncludeDestination-CMP0057-NEW.cmake | 13 -- ...lativeIncludeDestination-CMP0057-OLD-result.txt | 1 - ...lativeIncludeDestination-CMP0057-OLD-stderr.txt | 10 -- .../RelativeIncludeDestination-CMP0057-OLD.cmake | 13 -- ...ativeIncludeDestination-CMP0057-WARN-result.txt | 1 - ...ativeIncludeDestination-CMP0057-WARN-stderr.txt | 14 -- .../RelativeIncludeDestination-CMP0057-WARN.cmake | 11 -- ...Directory-CMP0057-INSTALL_PREFIX-NEW-result.txt | 1 - ...Directory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt | 10 -- ...cludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake | 13 -- ...Directory-CMP0057-INSTALL_PREFIX-OLD-result.txt | 1 - ...Directory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt | 11 -- ...cludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake | 13 -- ...irectory-CMP0057-INSTALL_PREFIX-WARN-result.txt | 1 - ...irectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt | 15 --- ...ludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake | 11 -- ...RelativeIncludeDirectory-CMP0057-NEW-result.txt | 1 - ...RelativeIncludeDirectory-CMP0057-NEW-stderr.txt | 10 -- .../RelativeIncludeDirectory-CMP0057-NEW.cmake | 13 -- ...RelativeIncludeDirectory-CMP0057-OLD-result.txt | 1 - ...RelativeIncludeDirectory-CMP0057-OLD-stderr.txt | 11 -- .../RelativeIncludeDirectory-CMP0057-OLD.cmake | 13 -- ...elativeIncludeDirectory-CMP0057-WARN-result.txt | 1 - ...elativeIncludeDirectory-CMP0057-WARN-stderr.txt | 15 --- .../RelativeIncludeDirectory-CMP0057-WARN.cmake | 11 -- Tests/RunCMake/export/RelativeLibDir-result.txt | 1 - Tests/RunCMake/export/RelativeLibDir-stderr.txt | 1 - Tests/RunCMake/export/RelativeLibDir.cmake | 10 -- Tests/RunCMake/export/RunCMakeTest.cmake | 10 -- Tests/RunCMake/export/empty.cpp | 7 - 42 files changed, 22 insertions(+), 456 deletions(-) delete mode 100644 Help/policy/CMP0057.rst delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-NEW.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-OLD.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-NEW.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-OLD.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD.cmake delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-result.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN.cmake delete mode 100644 Tests/RunCMake/export/RelativeLibDir-result.txt delete mode 100644 Tests/RunCMake/export/RelativeLibDir-stderr.txt delete mode 100644 Tests/RunCMake/export/RelativeLibDir.cmake delete mode 100644 Tests/RunCMake/export/empty.cpp hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 12 00:01:11 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 12 Dec 2014 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-463-g17f638a Message-ID: <20141212050111.948CDA7C12@public.kitware.com> This is an automated email from 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 17f638a4c923bdf96376e8ecfe365337906a6bcc (commit) from 3171fe0afa7169c1e814a5c0e08b115002f0d3c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17f638a4c923bdf96376e8ecfe365337906a6bcc commit 17f638a4c923bdf96376e8ecfe365337906a6bcc Author: Kitware Robot AuthorDate: Fri Dec 12 00:01:09 2014 -0500 Commit: Kitware Robot CommitDate: Fri Dec 12 00:01:09 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 44b118f..60b4644 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 1) -set(CMake_VERSION_PATCH 20141211) +set(CMake_VERSION_PATCH 20141212) #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 Dec 12 09:54:00 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 09:54:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1132-g515f233 Message-ID: <20141212145400.77FF1A7A3F@public.kitware.com> This is an automated email from 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 515f2331dc203f56b4c4e7eb2703298ba1116a7d (commit) via a0792c48513fd76d8eb00a52f551f0f6fe1b71dc (commit) from 97f3bfd8b9d9b4cb9ef1d85086883b498e6fc21e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=515f2331dc203f56b4c4e7eb2703298ba1116a7d commit 515f2331dc203f56b4c4e7eb2703298ba1116a7d Merge: 97f3bfd a0792c4 Author: Brad King AuthorDate: Fri Dec 12 09:53:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 09:53:59 2014 -0500 Merge topic 'FindMPI-parse-Xlinker-flags' into next a0792c48 FindMPI: Extract -Xlinker options http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0792c48513fd76d8eb00a52f551f0f6fe1b71dc commit a0792c48513fd76d8eb00a52f551f0f6fe1b71dc Author: Alin Marin Elena AuthorDate: Tue Dec 9 10:52:33 2014 +0000 Commit: Brad King CommitDate: Fri Dec 12 09:53:43 2014 -0500 FindMPI: Extract -Xlinker options Extend the regex that mathces -Wl, linker options to match -Xlinker too. These are used by Intel MPI and perhaps others. diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 6f6dcf3..56fffc7 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -363,7 +363,7 @@ function (interrogate_mpi_compiler lang try_libs) endif() # Extract linker flags from the link command line - string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}") + string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker )([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}") set(MPI_LINK_FLAGS_WORK) foreach(FLAG ${MPI_ALL_LINK_FLAGS}) if (MPI_LINK_FLAGS_WORK) ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 12 10:15:12 2014 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 12 Dec 2014 10:15:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1134-g1ba345d Message-ID: <20141212151513.4192FA7FCE@public.kitware.com> This is an automated email from 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 1ba345dcbfa22e7404acc82238fed14757255fe4 (commit) via 97b65f8156734db2adc367b27c822a5fe332d740 (commit) from 515f2331dc203f56b4c4e7eb2703298ba1116a7d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ba345dcbfa22e7404acc82238fed14757255fe4 commit 1ba345dcbfa22e7404acc82238fed14757255fe4 Merge: 515f233 97b65f8 Author: Chuck Atkins AuthorDate: Fri Dec 12 10:15:12 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 10:15:12 2014 -0500 Merge topic 'suncc-fixes' into next 97b65f81 Misc. fixes for the Oracle / Sun compiler. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97b65f8156734db2adc367b27c822a5fe332d740 commit 97b65f8156734db2adc367b27c822a5fe332d740 Author: Chuck Atkins AuthorDate: Fri Dec 12 10:04:47 2014 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 12 10:04:47 2014 -0500 Misc. fixes for the Oracle / Sun compiler. A few pieces of code have some ambiguous type deduction that seems to resolve correctly for most compilers but not for the Oracle compiler. This makes those few instances more explicit. diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 1fb8f30..a636d23 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -266,9 +266,10 @@ cmComputeLinkDepends::Compute() // Iterate in reverse order so we can keep only the last occurrence // of a shared library. std::set emmitted; + const std::vector& cFLO = this->FinalLinkOrder; for(std::vector::const_reverse_iterator - li = this->FinalLinkOrder.rbegin(), - le = this->FinalLinkOrder.rend(); + li = cFLO.rbegin(), + le = cFLO.rend(); li != le; ++li) { int i = *li; diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 0130006..8410cda 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -80,12 +80,15 @@ void cmFindPackageCommand::AppendSearchPathGroups() PathLabel::SystemRegistry); // Create the new path objects - this->LabeledPaths.insert(std::make_pair(PathLabel::UserRegistry, - cmSearchPath(this))); - this->LabeledPaths.insert(std::make_pair(PathLabel::Builds, - cmSearchPath(this))); - this->LabeledPaths.insert(std::make_pair(PathLabel::SystemRegistry, - cmSearchPath(this))); + this->LabeledPaths.insert( + std::pair( + PathLabel::UserRegistry, cmSearchPath(this))); + this->LabeledPaths.insert( + std::pair( + PathLabel::Builds, cmSearchPath(this))); + this->LabeledPaths.insert( + std::pair( + PathLabel::SystemRegistry, cmSearchPath(this))); } //---------------------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/cmComputeLinkDepends.cxx | 5 +++-- Source/cmFindPackageCommand.cxx | 15 +++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:13:18 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:13:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1136-g5dc677f Message-ID: <20141212161318.0DE3CA4EE2@public.kitware.com> This is an automated email from 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 5dc677feb2df6c3c79e060bf939b8bf10159b429 (commit) via f2f1c95dd9a1e1b3dc6652ef2afb7ca74c0c986f (commit) from 1ba345dcbfa22e7404acc82238fed14757255fe4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5dc677feb2df6c3c79e060bf939b8bf10159b429 commit 5dc677feb2df6c3c79e060bf939b8bf10159b429 Merge: 1ba345d f2f1c95 Author: Brad King AuthorDate: Fri Dec 12 11:13:17 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 11:13:17 2014 -0500 Merge topic 'doc-CMP0054-example' into next f2f1c95d Help: Extend policy CMP0054 documentation with an example http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2f1c95dd9a1e1b3dc6652ef2afb7ca74c0c986f commit f2f1c95dd9a1e1b3dc6652ef2afb7ca74c0c986f Author: Nils Gladitz AuthorDate: Tue Dec 9 21:52:23 2014 +0100 Commit: Brad King CommitDate: Fri Dec 12 11:12:46 2014 -0500 Help: Extend policy CMP0054 documentation with an example diff --git a/Help/policy/CMP0054.rst b/Help/policy/CMP0054.rst index dffee5e..39f0c40 100644 --- a/Help/policy/CMP0054.rst +++ b/Help/policy/CMP0054.rst @@ -3,15 +3,43 @@ CMP0054 Only interpret :command:`if` arguments as variables or keywords when unquoted. -CMake 3.1 and above no longer dereference variables or interpret keywords -in an :command:`if` command argument when it is a :ref:`Quoted Argument` -or a :ref:`Bracket Argument`. +CMake 3.1 and above no longer implicitly dereference variables or +interpret keywords in an :command:`if` command argument when +it is a :ref:`Quoted Argument` or a :ref:`Bracket Argument`. The ``OLD`` behavior for this policy is to dereference variables and interpret keywords even if they are quoted or bracketed. The ``NEW`` behavior is to not dereference variables or interpret keywords that have been quoted or bracketed. +Given the following partial example: + +:: + + set(MONKEY 1) + set(ANIMAL MONKEY) + + if("${ANIMAL}" STREQUAL "MONKEY") + +After explicit expansion of variables this gives: + +:: + + if("MONKEY" STREQUAL "MONKEY") + +With the policy set to ``OLD`` implicit expansion reduces this semantically to: + +:: + + if("1" STREQUAL "1") + +With the policy set to ``NEW`` the quoted arguments will not be +further dereferenced: + +:: + + if("MONKEY" STREQUAL "MONKEY") + This policy was introduced in CMake version 3.1. CMake version |release| warns when the policy is not set and uses ``OLD`` behavior. Use the :command:`cmake_policy` command to set ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:16:00 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:16:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-465-gccbdac2 Message-ID: <20141212161600.1BBB7A7FF3@public.kitware.com> This is an automated email from 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 ccbdac21df01b3e084bd70dd3b5b4ea7337c23d0 (commit) via f2f1c95dd9a1e1b3dc6652ef2afb7ca74c0c986f (commit) from 17f638a4c923bdf96376e8ecfe365337906a6bcc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccbdac21df01b3e084bd70dd3b5b4ea7337c23d0 commit ccbdac21df01b3e084bd70dd3b5b4ea7337c23d0 Merge: 17f638a f2f1c95 Author: Brad King AuthorDate: Fri Dec 12 11:15:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 11:15:59 2014 -0500 Merge topic 'doc-CMP0054-example' f2f1c95d Help: Extend policy CMP0054 documentation with an example ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0054.rst | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:16:02 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:16:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-467-g9c4ef20 Message-ID: <20141212161602.22952A8005@public.kitware.com> This is an automated email from 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 9c4ef206c7d13da0cd4314f4efea6452ae183fbb (commit) via 111be1801fcf50412e702be2d5966dbf52926b94 (commit) from ccbdac21df01b3e084bd70dd3b5b4ea7337c23d0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c4ef206c7d13da0cd4314f4efea6452ae183fbb commit 9c4ef206c7d13da0cd4314f4efea6452ae183fbb Merge: ccbdac2 111be18 Author: Brad King AuthorDate: Fri Dec 12 11:16:00 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 11:16:00 2014 -0500 Merge topic 'drop-double-underscores' 111be180 Rename header guards to not start with double underscore ----------------------------------------------------------------------- Summary of changes: Source/CursesDialog/cmCursesBoolWidget.h | 6 +++--- Source/CursesDialog/cmCursesCacheEntryComposite.h | 6 +++--- Source/CursesDialog/cmCursesDummyWidget.h | 6 +++--- Source/CursesDialog/cmCursesFilePathWidget.h | 6 +++--- Source/CursesDialog/cmCursesForm.h | 6 +++--- Source/CursesDialog/cmCursesLabelWidget.h | 6 +++--- Source/CursesDialog/cmCursesLongMessageForm.h | 6 +++--- Source/CursesDialog/cmCursesMainForm.h | 6 +++--- Source/CursesDialog/cmCursesOptionsWidget.h | 6 +++--- Source/CursesDialog/cmCursesPathWidget.h | 6 +++--- Source/CursesDialog/cmCursesStringWidget.h | 6 +++--- Source/CursesDialog/cmCursesWidget.h | 6 +++--- Source/QtDialog/QCMake.h | 6 +++--- Source/cmDynamicLoader.h | 4 ++-- Utilities/cmThirdParty.h.in | 4 ++-- Utilities/cm_bzlib.h | 4 ++-- Utilities/cm_curl.h | 4 ++-- Utilities/cm_expat.h | 4 ++-- Utilities/cm_libarchive.h | 4 ++-- Utilities/cm_lzma.h | 4 ++-- Utilities/cm_xmlrpc.h | 4 ++-- Utilities/cm_zlib.h | 4 ++-- Utilities/cmcompress/cmcompress.h | 6 +++--- 23 files changed, 60 insertions(+), 60 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:16:03 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:16:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-469-gf6c8d3d Message-ID: <20141212161603.E367DA7FDF@public.kitware.com> This is an automated email from 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 f6c8d3d82fca676b127a601db97e6c0d5b7342e4 (commit) via 009c1865dcc967a349be63a713c46ac88d297250 (commit) from 9c4ef206c7d13da0cd4314f4efea6452ae183fbb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6c8d3d82fca676b127a601db97e6c0d5b7342e4 commit f6c8d3d82fca676b127a601db97e6c0d5b7342e4 Merge: 9c4ef20 009c186 Author: Brad King AuthorDate: Fri Dec 12 11:16:02 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 11:16:02 2014 -0500 Merge topic 'FindQt4-fix-major-version-mismatch' 009c1865 FindQt4: Fix handling of QT_VERSION_MAJOR mismatch ----------------------------------------------------------------------- Summary of changes: Modules/FindQt4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:16:05 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:16:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-471-g9f41c45 Message-ID: <20141212161605.E7D40A8021@public.kitware.com> This is an automated email from 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 9f41c45f4325271a24c96e17853aadac3a081fe8 (commit) via d8589e6437451ef174fc480d0dfc4e83e49b1b30 (commit) from f6c8d3d82fca676b127a601db97e6c0d5b7342e4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f41c45f4325271a24c96e17853aadac3a081fe8 commit 9f41c45f4325271a24c96e17853aadac3a081fe8 Merge: f6c8d3d d8589e6 Author: Brad King AuthorDate: Fri Dec 12 11:16:04 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 11:16:04 2014 -0500 Merge topic 'catch-ctest-errors-better' d8589e64 ctest: count errors from scripts properly ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestScriptHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:16:07 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:16:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-473-g3cc84d1 Message-ID: <20141212161607.9F1DFA8059@public.kitware.com> This is an automated email from 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 3cc84d18d428934076baa16e1dddf6d414f09622 (commit) via 17a846ac3e8d0fab4bb99e238dbe867941594465 (commit) from 9f41c45f4325271a24c96e17853aadac3a081fe8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cc84d18d428934076baa16e1dddf6d414f09622 commit 3cc84d18d428934076baa16e1dddf6d414f09622 Merge: 9f41c45 17a846a Author: Brad King AuthorDate: Fri Dec 12 11:16:06 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 11:16:06 2014 -0500 Merge topic 'find-msmpi' 17a846ac FindMPI: search for msmpi's mpiexec as well ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:16:40 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:16:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1143-g73c7293 Message-ID: <20141212161640.DE6B9A8078@public.kitware.com> This is an automated email from 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 73c72935b3eb977539648bd867ec80b09a06458d (commit) via 3cc84d18d428934076baa16e1dddf6d414f09622 (commit) via 9f41c45f4325271a24c96e17853aadac3a081fe8 (commit) via f6c8d3d82fca676b127a601db97e6c0d5b7342e4 (commit) via 9c4ef206c7d13da0cd4314f4efea6452ae183fbb (commit) via ccbdac21df01b3e084bd70dd3b5b4ea7337c23d0 (commit) via 17f638a4c923bdf96376e8ecfe365337906a6bcc (commit) from 5dc677feb2df6c3c79e060bf939b8bf10159b429 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73c72935b3eb977539648bd867ec80b09a06458d commit 73c72935b3eb977539648bd867ec80b09a06458d Merge: 5dc677f 3cc84d1 Author: Brad King AuthorDate: Fri Dec 12 11:16:14 2014 -0500 Commit: Brad King CommitDate: Fri Dec 12 11:16:14 2014 -0500 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 Dec 12 11:18:10 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:18:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-476-ga829f09 Message-ID: <20141212161810.7B9D3A80DB@public.kitware.com> This is an automated email from 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 a829f09bdd5cf28c59eeebd39d1652be2bd23283 (commit) via 0dd9e7173d43251fa4aca0846d85911cc7e84d2a (commit) via ce53ef0be135f15a95987db502cd29bebe03c0cc (commit) from 3cc84d18d428934076baa16e1dddf6d414f09622 (commit) Those revisions listed 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 Dec 12 11:18:10 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:18:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1147-g3d00a5e Message-ID: <20141212161810.9D658A80DC@public.kitware.com> This is an automated email from 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 3d00a5ef75bd3626a82a762bcfed2f5b01e95539 (commit) via a829f09bdd5cf28c59eeebd39d1652be2bd23283 (commit) via 0dd9e7173d43251fa4aca0846d85911cc7e84d2a (commit) via ce53ef0be135f15a95987db502cd29bebe03c0cc (commit) from 73c72935b3eb977539648bd867ec80b09a06458d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d00a5ef75bd3626a82a762bcfed2f5b01e95539 commit 3d00a5ef75bd3626a82a762bcfed2f5b01e95539 Merge: 73c7293 a829f09 Author: Brad King AuthorDate: Fri Dec 12 11:18:01 2014 -0500 Commit: Brad King CommitDate: Fri Dec 12 11:18:01 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 11:18:10 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 11:18:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-rc3-4-g0dd9e71 Message-ID: <20141212161810.B8A64A80E4@public.kitware.com> This is an automated email from 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 0dd9e7173d43251fa4aca0846d85911cc7e84d2a (commit) via f2f1c95dd9a1e1b3dc6652ef2afb7ca74c0c986f (commit) via ce53ef0be135f15a95987db502cd29bebe03c0cc (commit) via d425c1104588e82619a461b77e310b15b6dec1d0 (commit) from 1f6f114a7a61043ec0b9d6147f3b297081d214d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-developer.7.rst | 11 ----------- Help/policy/CMP0054.rst | 34 +++++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 14 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 13:57:44 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 13:57:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1149-g2889094 Message-ID: <20141212185744.AC049A7DA4@public.kitware.com> This is an automated email from 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 288909421dc5cc1556c3f51ca497bb87b738f971 (commit) via 9713a191222ae84f75820efff6618778ca7ce0a2 (commit) from 3d00a5ef75bd3626a82a762bcfed2f5b01e95539 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=288909421dc5cc1556c3f51ca497bb87b738f971 commit 288909421dc5cc1556c3f51ca497bb87b738f971 Merge: 3d00a5e 9713a19 Author: Brad King AuthorDate: Fri Dec 12 13:57:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 13:57:43 2014 -0500 Merge topic 'assert-no-string-conversion' into next 9713a191 Fix some Clang -Wstring-conversion warnings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9713a191222ae84f75820efff6618778ca7ce0a2 commit 9713a191222ae84f75820efff6618778ca7ce0a2 Author: Sean McBride AuthorDate: Fri Dec 12 12:21:54 2014 -0500 Commit: Brad King CommitDate: Fri Dec 12 13:03:37 2014 -0500 Fix some Clang -Wstring-conversion warnings Some false positives, but some flagged faluty asserts where the ! was inside the string instead of outside. diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index bff6f5f..b6fe414 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -447,7 +447,7 @@ std::string cmGeneratorExpression::Preprocess(const std::string &input, return stripExportInterface(input, context, resolveRelative); } - assert(!"cmGeneratorExpression::Preprocess called with invalid args"); + assert(0 && "cmGeneratorExpression::Preprocess called with invalid args"); return std::string(); } diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 17adad7..7ddf4d0 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1429,7 +1429,7 @@ cmPolicies::PolicyStatus statusForTarget(cmTarget const* tgt, #undef RETURN_POLICY - assert("!Unreachable code. Not a valid policy"); + assert(0 && "Unreachable code. Not a valid policy"); return cmPolicies::WARN; } @@ -1445,7 +1445,7 @@ cmPolicies::PolicyID policyForString(const char *policy_id) #undef RETURN_POLICY_ID - assert("!Unreachable code. Not a valid policy"); + assert(0 && "Unreachable code. Not a valid policy"); return cmPolicies::CMP0002; } diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index a41a6e5..ec15daf 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -292,11 +292,11 @@ void cmGeneratorExpressionParser::ParseContent( } else { - assert(!"Got unexpected syntax token."); + assert(0 && "Got unexpected syntax token."); } assert(this->it != this->Tokens.end()); ++this->it; return; } - assert(!"Unhandled token in generator expression."); + assert(0 && "Unhandled token in generator expression."); } diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index d689c89..bb346fb 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -95,7 +95,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, case cmTarget::INTERFACE_LIBRARY: // Not reachable. We never create a cmInstallTargetGenerator for // an INTERFACE_LIBRARY. - assert(!"INTERFACE_LIBRARY targets have no installable outputs."); + assert(0 && "INTERFACE_LIBRARY targets have no installable outputs."); break; case cmTarget::OBJECT_LIBRARY: case cmTarget::UTILITY: diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f0957d0..37aa26e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4856,7 +4856,7 @@ std::pair consistentProperty(const char *lhs, switch(t) { case BoolType: - assert(!"consistentProperty for strings called with BoolType"); + assert(0 && "consistentProperty for strings called with BoolType"); return std::pair(false, null_ptr); case StringType: return consistentStringProperty(lhs, rhs); @@ -4864,7 +4864,7 @@ std::pair consistentProperty(const char *lhs, case NumberMaxType: return consistentNumberProperty(lhs, rhs, t); } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return std::pair(false, null_ptr); } @@ -4949,7 +4949,7 @@ std::string compatibilityType(CompatibleType t) case NumberMinType: return "Numeric minimum compatibility"; } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return ""; } @@ -4965,7 +4965,7 @@ std::string compatibilityAgree(CompatibleType t, bool dominant) case NumberMinType: return dominant ? "(Dominant)\n" : "(Ignored)\n"; } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return ""; } @@ -6578,7 +6578,7 @@ const char * getLinkInterfaceDependentProperty(cmTarget const* tgt, switch(t) { case BoolType: - assert(!"String compatibility check function called for boolean"); + assert(0 && "String compatibility check function called for boolean"); return 0; case StringType: return tgt->GetLinkInterfaceDependentStringProperty(prop, config); @@ -6587,7 +6587,7 @@ const char * getLinkInterfaceDependentProperty(cmTarget const* tgt, case NumberMaxType: return tgt->GetLinkInterfaceDependentNumberMaxProperty(prop, config); } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return 0; } ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpression.cxx | 2 +- Source/cmGeneratorExpressionEvaluator.cxx | 4 ++-- Source/cmGeneratorExpressionParser.cxx | 4 ++-- Source/cmInstallTargetGenerator.cxx | 2 +- Source/cmTarget.cxx | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 13:59:52 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 13:59:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1151-gd5df322 Message-ID: <20141212185952.12B70A7EBE@public.kitware.com> This is an automated email from 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 d5df32261c864bf3bcff71c63d65324a7229ad63 (commit) via ba8c6632194256a6a3370713d8e0423ad516361a (commit) from 288909421dc5cc1556c3f51ca497bb87b738f971 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5df32261c864bf3bcff71c63d65324a7229ad63 commit d5df32261c864bf3bcff71c63d65324a7229ad63 Merge: 2889094 ba8c663 Author: Brad King AuthorDate: Fri Dec 12 13:59:51 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 13:59:51 2014 -0500 Merge topic 'curl-winssl' into next ba8c6632 curl: Use Windows SSL/TLS native implementation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba8c6632194256a6a3370713d8e0423ad516361a commit ba8c6632194256a6a3370713d8e0423ad516361a Author: Brad King AuthorDate: Fri Dec 12 13:29:54 2014 -0500 Commit: Brad King CommitDate: Fri Dec 12 13:52:46 2014 -0500 curl: Use Windows SSL/TLS native implementation On Windows, when CMAKE_USE_OPENSSL is OFF, use the OS implementation. This will allow the OS-configured CA list to be trusted automatically. diff --git a/Help/release/dev/curl-winssl.rst b/Help/release/dev/curl-winssl.rst new file mode 100644 index 0000000..9a28f4f --- /dev/null +++ b/Help/release/dev/curl-winssl.rst @@ -0,0 +1,9 @@ +curl-winssl +----------- + +* On Windows, commands supporting network communication, such as + :command:`file(DOWNLOAD)`, :command:`file(UPLOAD)`, and + :command:`ctest_submit`, now support SSL/TLS even when CMake + is not built against OpenSSL. The Windows native SSL/TLS + implementation is used by default. OS-configured certificate + authorities will be trusted automatically. diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index eaf276b..1092e48 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -460,7 +460,11 @@ if(CMAKE_USE_OPENSSL) add_definitions(-DCURL_CA_BUNDLE="${CURL_CA_BUNDLE}") endif() endif(OPENSSL_FOUND) -endif(CMAKE_USE_OPENSSL) +elseif(WIN32) + # Use Windows SSL/TLS native implementation. + add_definitions(-DUSE_SCHANNEL) + set(USE_WINDOWS_SSPI 1) +endif() #libSSH2 option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON) ----------------------------------------------------------------------- Summary of changes: Help/release/dev/curl-winssl.rst | 9 +++++++++ Utilities/cmcurl/CMakeLists.txt | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/curl-winssl.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 14:38:54 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 14:38:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1153-g9f5d54e Message-ID: <20141212193854.8546FA83B5@public.kitware.com> This is an automated email from 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 9f5d54ee3c08429917803a9e855f936c7265471f (commit) via 2e92570bdaacfd5791c37e0fc302e05f095c3901 (commit) from d5df32261c864bf3bcff71c63d65324a7229ad63 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f5d54ee3c08429917803a9e855f936c7265471f commit 9f5d54ee3c08429917803a9e855f936c7265471f Merge: d5df322 2e92570 Author: Brad King AuthorDate: Fri Dec 12 14:38:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 14:38:53 2014 -0500 Merge topic 'assert-no-string-conversion' into next 2e92570b Fix some Clang -Wstring-conversion warnings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e92570bdaacfd5791c37e0fc302e05f095c3901 commit 2e92570bdaacfd5791c37e0fc302e05f095c3901 Author: Sean McBride AuthorDate: Fri Dec 12 12:21:54 2014 -0500 Commit: Brad King CommitDate: Fri Dec 12 14:38:23 2014 -0500 Fix some Clang -Wstring-conversion warnings Some false positives, but some flagged faulty asserts where the ! was inside the string instead of outside. diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index bff6f5f..b6fe414 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -447,7 +447,7 @@ std::string cmGeneratorExpression::Preprocess(const std::string &input, return stripExportInterface(input, context, resolveRelative); } - assert(!"cmGeneratorExpression::Preprocess called with invalid args"); + assert(0 && "cmGeneratorExpression::Preprocess called with invalid args"); return std::string(); } diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 17adad7..7ddf4d0 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1429,7 +1429,7 @@ cmPolicies::PolicyStatus statusForTarget(cmTarget const* tgt, #undef RETURN_POLICY - assert("!Unreachable code. Not a valid policy"); + assert(0 && "Unreachable code. Not a valid policy"); return cmPolicies::WARN; } @@ -1445,7 +1445,7 @@ cmPolicies::PolicyID policyForString(const char *policy_id) #undef RETURN_POLICY_ID - assert("!Unreachable code. Not a valid policy"); + assert(0 && "Unreachable code. Not a valid policy"); return cmPolicies::CMP0002; } diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index a41a6e5..ec15daf 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -292,11 +292,11 @@ void cmGeneratorExpressionParser::ParseContent( } else { - assert(!"Got unexpected syntax token."); + assert(0 && "Got unexpected syntax token."); } assert(this->it != this->Tokens.end()); ++this->it; return; } - assert(!"Unhandled token in generator expression."); + assert(0 && "Unhandled token in generator expression."); } diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index d689c89..bb346fb 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -95,7 +95,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, case cmTarget::INTERFACE_LIBRARY: // Not reachable. We never create a cmInstallTargetGenerator for // an INTERFACE_LIBRARY. - assert(!"INTERFACE_LIBRARY targets have no installable outputs."); + assert(0 && "INTERFACE_LIBRARY targets have no installable outputs."); break; case cmTarget::OBJECT_LIBRARY: case cmTarget::UTILITY: diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f0957d0..37aa26e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4856,7 +4856,7 @@ std::pair consistentProperty(const char *lhs, switch(t) { case BoolType: - assert(!"consistentProperty for strings called with BoolType"); + assert(0 && "consistentProperty for strings called with BoolType"); return std::pair(false, null_ptr); case StringType: return consistentStringProperty(lhs, rhs); @@ -4864,7 +4864,7 @@ std::pair consistentProperty(const char *lhs, case NumberMaxType: return consistentNumberProperty(lhs, rhs, t); } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return std::pair(false, null_ptr); } @@ -4949,7 +4949,7 @@ std::string compatibilityType(CompatibleType t) case NumberMinType: return "Numeric minimum compatibility"; } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return ""; } @@ -4965,7 +4965,7 @@ std::string compatibilityAgree(CompatibleType t, bool dominant) case NumberMinType: return dominant ? "(Dominant)\n" : "(Ignored)\n"; } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return ""; } @@ -6578,7 +6578,7 @@ const char * getLinkInterfaceDependentProperty(cmTarget const* tgt, switch(t) { case BoolType: - assert(!"String compatibility check function called for boolean"); + assert(0 && "String compatibility check function called for boolean"); return 0; case StringType: return tgt->GetLinkInterfaceDependentStringProperty(prop, config); @@ -6587,7 +6587,7 @@ const char * getLinkInterfaceDependentProperty(cmTarget const* tgt, case NumberMaxType: return tgt->GetLinkInterfaceDependentNumberMaxProperty(prop, config); } - assert(!"Unreachable!"); + assert(0 && "Unreachable!"); return 0; } ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 12 15:16:48 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 12 Dec 2014 15:16:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1155-g0154b57 Message-ID: <20141212201648.8E06FA6A24@public.kitware.com> This is an automated email from 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 0154b576c4d9bcf98d0ee3964110cd684ba95241 (commit) via f53a3340bbb6ca4fa57c21187206df8160221d4d (commit) from 9f5d54ee3c08429917803a9e855f936c7265471f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0154b576c4d9bcf98d0ee3964110cd684ba95241 commit 0154b576c4d9bcf98d0ee3964110cd684ba95241 Merge: 9f5d54e f53a334 Author: Brad King AuthorDate: Fri Dec 12 15:16:47 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 15:16:47 2014 -0500 Merge topic 'tests-osx-version' into next f53a3340 Tests: Fix OS X version check to use component-wise test http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f53a3340bbb6ca4fa57c21187206df8160221d4d commit f53a3340bbb6ca4fa57c21187206df8160221d4d Author: Brad King AuthorDate: Fri Dec 12 15:08:00 2014 -0500 Commit: Brad King CommitDate: Fri Dec 12 15:11:37 2014 -0500 Tests: Fix OS X version check to use component-wise test Otherwise 10.10 may be considered to be less than 10.4 and the tests for CPack will not run. Reported-by: Sean McBride diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index fda9359..33c18ce 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -171,7 +171,7 @@ if(BUILD_TESTING) OUTPUT_VARIABLE OSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) - if(OSX_VERSION MATCHES "^10\\.[0123]" OR OSX_VERSION MATCHES "ProductVersion:\t10\\.[0123]") + if(OSX_VERSION VERSION_LESS 10.4) message(STATUS "Forcing CTEST_TEST_CPACK=OFF on OSX < 10.4") message(STATUS "OSX_VERSION='${OSX_VERSION}'") set(CTEST_TEST_CPACK OFF) ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Fri Dec 12 18:35:49 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 12 Dec 2014 18:35:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1157-gd42fb10 Message-ID: <20141212233549.E2BFFA83DD@public.kitware.com> This is an automated email from 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 d42fb107b932f29001ba2ac362c2fee319c8c55a (commit) via a300d0ff0fbec17360113f9bb1c09e9efab19792 (commit) from 0154b576c4d9bcf98d0ee3964110cd684ba95241 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d42fb107b932f29001ba2ac362c2fee319c8c55a commit d42fb107b932f29001ba2ac362c2fee319c8c55a Merge: 0154b57 a300d0f Author: Ben Boeckel AuthorDate: Fri Dec 12 18:35:48 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 18:35:48 2014 -0500 Merge topic 'cmp0054-warnings-extproj' into next a300d0ff ExternalProject: avoid CMP0054 warnings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a300d0ff0fbec17360113f9bb1c09e9efab19792 commit a300d0ff0fbec17360113f9bb1c09e9efab19792 Author: Ben Boeckel AuthorDate: Fri Dec 12 18:30:00 2014 -0500 Commit: Ben Boeckel CommitDate: Fri Dec 12 18:30:00 2014 -0500 ExternalProject: avoid CMP0054 warnings Found where ${command} is "make" which is a local variable. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 7e4cc37..a11055b 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1241,7 +1241,7 @@ function(_ep_write_log_script name step cmd_var) set(make "") set(code_cygpath_make "") - if("${command}" MATCHES "^\\$\\(MAKE\\)") + if(command MATCHES "^\\$\\(MAKE\\)") # GNU make recognizes the string "$(MAKE)" as recursive make, so # ensure that it appears directly in the makefile. string(REGEX REPLACE "^\\$\\(MAKE\\)" "\${make}" command "${command}") @@ -1273,7 +1273,7 @@ endif() # Wrap multiple 'COMMAND' lines up into a second-level wrapper # script so all output can be sent to one log file. - if("${command}" MATCHES ";COMMAND;") + if(command MATCHES ";COMMAND;") set(code_execute_process " ${code_cygpath_make} execute_process(COMMAND \${command} RESULT_VARIABLE result) ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Fri Dec 12 18:44:19 2014 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 12 Dec 2014 18:44:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1159-gd246327 Message-ID: <20141212234419.362D9A51C1@public.kitware.com> This is an automated email from 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 d2463278c7760710e1c1913d0332e31fa8f50740 (commit) via 480e60298f862e0c1942b6e028e509f81b9ab71e (commit) from d42fb107b932f29001ba2ac362c2fee319c8c55a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2463278c7760710e1c1913d0332e31fa8f50740 commit d2463278c7760710e1c1913d0332e31fa8f50740 Merge: d42fb10 480e602 Author: Ben Boeckel AuthorDate: Fri Dec 12 18:44:17 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 12 18:44:17 2014 -0500 Merge topic 'extproj-extra-newlines' into next 480e6029 ExternalProject: remove extra newlines from log messages http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=480e60298f862e0c1942b6e028e509f81b9ab71e commit 480e60298f862e0c1942b6e028e509f81b9ab71e Author: Ben Boeckel AuthorDate: Fri Dec 12 18:42:33 2014 -0500 Commit: Ben Boeckel CommitDate: Fri Dec 12 18:42:33 2014 -0500 ExternalProject: remove extra newlines from log messages message() already adds a newline. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 7e4cc37..98ff716 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1320,10 +1320,10 @@ if(result) foreach(arg IN LISTS command) set(msg \"\${msg} '\${arg}'\") endforeach() - set(msg \"\${msg}\\nSee also\\n ${logbase}-*.log\\n\") + set(msg \"\${msg}\\nSee also\\n ${logbase}-*.log\") message(FATAL_ERROR \"\${msg}\") else() - set(msg \"${name} ${step} command succeeded. See also ${logbase}-*.log\\n\") + set(msg \"${name} ${step} command succeeded. See also ${logbase}-*.log\") message(STATUS \"\${msg}\") endif() ") ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 13 00:01:33 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 13 Dec 2014 00:01:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-477-gfef31f1 Message-ID: <20141213050134.774E9A7A98@public.kitware.com> This is an automated email from 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 fef31f1f21fe642b9c2893544a330144982c7449 (commit) from a829f09bdd5cf28c59eeebd39d1652be2bd23283 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fef31f1f21fe642b9c2893544a330144982c7449 commit fef31f1f21fe642b9c2893544a330144982c7449 Author: Kitware Robot AuthorDate: Sat Dec 13 00:01:30 2014 -0500 Commit: Kitware Robot CommitDate: Sat Dec 13 00:01:30 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 60b4644..6883176 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 1) -set(CMake_VERSION_PATCH 20141212) +set(CMake_VERSION_PATCH 20141213) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 14 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 14 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-478-g18817e0 Message-ID: <20141214050111.022CDA813C@public.kitware.com> This is an automated email from 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 18817e07d61beea11fa5d52bbb26db715b7f8b1d (commit) from fef31f1f21fe642b9c2893544a330144982c7449 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18817e07d61beea11fa5d52bbb26db715b7f8b1d commit 18817e07d61beea11fa5d52bbb26db715b7f8b1d Author: Kitware Robot AuthorDate: Sun Dec 14 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Sun Dec 14 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6883176..196059a 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 1) -set(CMake_VERSION_PATCH 20141213) +set(CMake_VERSION_PATCH 20141214) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 15 00:01:09 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 15 Dec 2014 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-479-gbbabb9d Message-ID: <20141215050109.432D2A8207@public.kitware.com> This is an automated email from 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 bbabb9d810b52df303980a2271ad538637c077d5 (commit) from 18817e07d61beea11fa5d52bbb26db715b7f8b1d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbabb9d810b52df303980a2271ad538637c077d5 commit bbabb9d810b52df303980a2271ad538637c077d5 Author: Kitware Robot AuthorDate: Mon Dec 15 00:01:07 2014 -0500 Commit: Kitware Robot CommitDate: Mon Dec 15 00:01:07 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 196059a..396ac98 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 1) -set(CMake_VERSION_PATCH 20141214) +set(CMake_VERSION_PATCH 20141215) #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 Dec 15 11:06:44 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:06:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-481-g4d2c629 Message-ID: <20141215160644.2FFAFA840A@public.kitware.com> This is an automated email from 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 4d2c6290453e00f0b1060788cf52a5a01963b864 (commit) via a0792c48513fd76d8eb00a52f551f0f6fe1b71dc (commit) from bbabb9d810b52df303980a2271ad538637c077d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d2c6290453e00f0b1060788cf52a5a01963b864 commit 4d2c6290453e00f0b1060788cf52a5a01963b864 Merge: bbabb9d a0792c4 Author: Brad King AuthorDate: Mon Dec 15 11:06:42 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:06:42 2014 -0500 Merge topic 'FindMPI-parse-Xlinker-flags' a0792c48 FindMPI: Extract -Xlinker options ----------------------------------------------------------------------- Summary of changes: Modules/FindMPI.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:06:46 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:06:46 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-483-g6da3f17 Message-ID: <20141215160646.4CD29A8413@public.kitware.com> This is an automated email from 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 6da3f173093ed5b6b2b1944c9c561fcd62d07eee (commit) via 97b65f8156734db2adc367b27c822a5fe332d740 (commit) from 4d2c6290453e00f0b1060788cf52a5a01963b864 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6da3f173093ed5b6b2b1944c9c561fcd62d07eee commit 6da3f173093ed5b6b2b1944c9c561fcd62d07eee Merge: 4d2c629 97b65f8 Author: Brad King AuthorDate: Mon Dec 15 11:06:44 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:06:44 2014 -0500 Merge topic 'suncc-fixes' 97b65f81 Misc. fixes for the Oracle / Sun compiler. ----------------------------------------------------------------------- Summary of changes: Source/cmComputeLinkDepends.cxx | 5 +++-- Source/cmFindPackageCommand.cxx | 15 +++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:06:48 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:06:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-485-g526c34b Message-ID: <20141215160648.937D2A840B@public.kitware.com> This is an automated email from 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 526c34b240638bea90cce4162a95f0c8c7ea8a88 (commit) via ba8c6632194256a6a3370713d8e0423ad516361a (commit) from 6da3f173093ed5b6b2b1944c9c561fcd62d07eee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=526c34b240638bea90cce4162a95f0c8c7ea8a88 commit 526c34b240638bea90cce4162a95f0c8c7ea8a88 Merge: 6da3f17 ba8c663 Author: Brad King AuthorDate: Mon Dec 15 11:06:47 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:06:47 2014 -0500 Merge topic 'curl-winssl' ba8c6632 curl: Use Windows SSL/TLS native implementation ----------------------------------------------------------------------- Summary of changes: Help/release/dev/curl-winssl.rst | 9 +++++++++ Utilities/cmcurl/CMakeLists.txt | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/curl-winssl.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:06:50 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:06:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-487-g872ad7a Message-ID: <20141215160650.7423BA8416@public.kitware.com> This is an automated email from 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 872ad7a26d9cfeec877d148a49e10d18e29141bf (commit) via 2e92570bdaacfd5791c37e0fc302e05f095c3901 (commit) from 526c34b240638bea90cce4162a95f0c8c7ea8a88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=872ad7a26d9cfeec877d148a49e10d18e29141bf commit 872ad7a26d9cfeec877d148a49e10d18e29141bf Merge: 526c34b 2e92570 Author: Brad King AuthorDate: Mon Dec 15 11:06:49 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:06:49 2014 -0500 Merge topic 'assert-no-string-conversion' 2e92570b Fix some Clang -Wstring-conversion warnings ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpression.cxx | 2 +- Source/cmGeneratorExpressionEvaluator.cxx | 4 ++-- Source/cmGeneratorExpressionParser.cxx | 4 ++-- Source/cmInstallTargetGenerator.cxx | 2 +- Source/cmTarget.cxx | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:06:52 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:06:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-489-gab09122 Message-ID: <20141215160652.75EF0A8417@public.kitware.com> This is an automated email from 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 ab09122717ff8138086cd46787f0badbba0f5669 (commit) via f53a3340bbb6ca4fa57c21187206df8160221d4d (commit) from 872ad7a26d9cfeec877d148a49e10d18e29141bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab09122717ff8138086cd46787f0badbba0f5669 commit ab09122717ff8138086cd46787f0badbba0f5669 Merge: 872ad7a f53a334 Author: Brad King AuthorDate: Mon Dec 15 11:06:51 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:06:51 2014 -0500 Merge topic 'tests-osx-version' f53a3340 Tests: Fix OS X version check to use component-wise test ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:06:56 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:06:56 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-491-gb9e0bab Message-ID: <20141215160656.D26AFA8415@public.kitware.com> This is an automated email from 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 b9e0babea92829e622eab9415ea64e43ec41bacf (commit) via 480e60298f862e0c1942b6e028e509f81b9ab71e (commit) from ab09122717ff8138086cd46787f0badbba0f5669 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9e0babea92829e622eab9415ea64e43ec41bacf commit b9e0babea92829e622eab9415ea64e43ec41bacf Merge: ab09122 480e602 Author: Brad King AuthorDate: Mon Dec 15 11:06:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:06:54 2014 -0500 Merge topic 'extproj-extra-newlines' 480e6029 ExternalProject: remove extra newlines from log messages ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:06:58 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:06:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-493-g1b3ab33 Message-ID: <20141215160658.B44D6A83DE@public.kitware.com> This is an automated email from 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 1b3ab3318dcdabe074da3c95b54f9483d47f95be (commit) via a300d0ff0fbec17360113f9bb1c09e9efab19792 (commit) from b9e0babea92829e622eab9415ea64e43ec41bacf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b3ab3318dcdabe074da3c95b54f9483d47f95be commit 1b3ab3318dcdabe074da3c95b54f9483d47f95be Merge: b9e0bab a300d0f Author: Brad King AuthorDate: Mon Dec 15 11:06:57 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:06:57 2014 -0500 Merge topic 'cmp0054-warnings-extproj' a300d0ff ExternalProject: avoid CMP0054 warnings ----------------------------------------------------------------------- Summary of changes: Modules/ExternalProject.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:07:23 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:07:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1170-ga815f79 Message-ID: <20141215160723.4490FA841E@public.kitware.com> This is an automated email from 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 a815f790edb4e45aa4bc250bf0b4b89a945c470e (commit) via 1b3ab3318dcdabe074da3c95b54f9483d47f95be (commit) via b9e0babea92829e622eab9415ea64e43ec41bacf (commit) via ab09122717ff8138086cd46787f0badbba0f5669 (commit) via 872ad7a26d9cfeec877d148a49e10d18e29141bf (commit) via 526c34b240638bea90cce4162a95f0c8c7ea8a88 (commit) via 6da3f173093ed5b6b2b1944c9c561fcd62d07eee (commit) via 4d2c6290453e00f0b1060788cf52a5a01963b864 (commit) via bbabb9d810b52df303980a2271ad538637c077d5 (commit) via 18817e07d61beea11fa5d52bbb26db715b7f8b1d (commit) via fef31f1f21fe642b9c2893544a330144982c7449 (commit) from d2463278c7760710e1c1913d0332e31fa8f50740 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a815f790edb4e45aa4bc250bf0b4b89a945c470e commit a815f790edb4e45aa4bc250bf0b4b89a945c470e Merge: d246327 1b3ab33 Author: Brad King AuthorDate: Mon Dec 15 11:07:07 2014 -0500 Commit: Brad King CommitDate: Mon Dec 15 11:07:07 2014 -0500 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 Dec 15 11:12:35 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:12:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1173-gd033f0c Message-ID: <20141215161235.AB1A0A52DB@public.kitware.com> This is an automated email from 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 d033f0cc1e5fe673ef3a50e51712c1e7f8de07f0 (commit) via fdece311757f64d3fb22b214a66cdadccd521a6e (commit) via c118816d44e178e4364a0c32aaece81a14511237 (commit) from a815f790edb4e45aa4bc250bf0b4b89a945c470e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d033f0cc1e5fe673ef3a50e51712c1e7f8de07f0 commit d033f0cc1e5fe673ef3a50e51712c1e7f8de07f0 Merge: a815f79 fdece31 Author: Brad King AuthorDate: Mon Dec 15 11:12:34 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:12:34 2014 -0500 Merge topic 'test-release' into next fdece311 Merge branch 'release' into test-release c118816d CMake 3.1.0 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdece311757f64d3fb22b214a66cdadccd521a6e commit fdece311757f64d3fb22b214a66cdadccd521a6e Merge: 1b3ab33 c118816 Author: Brad King AuthorDate: Mon Dec 15 11:12:09 2014 -0500 Commit: Brad King CommitDate: Mon Dec 15 11:12:09 2014 -0500 Merge branch 'release' into test-release http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c118816d44e178e4364a0c32aaece81a14511237 commit c118816d44e178e4364a0c32aaece81a14511237 Author: Brad King AuthorDate: Mon Dec 15 11:08:08 2014 -0500 Commit: Brad King CommitDate: Mon Dec 15 11:08:08 2014 -0500 CMake 3.1.0 diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c7f60fe..1bde1e0 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,4 +2,4 @@ set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 1) set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 3) +#set(CMake_VERSION_RC 0) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 11:46:20 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 11:46:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1175-g5c1b101 Message-ID: <20141215164620.8EBAFA7F59@public.kitware.com> This is an automated email from 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 5c1b101320812d9c82025302215a753d50800678 (commit) via dd089e08b578f20b7dc7d2ce658e3df05e346e35 (commit) from d033f0cc1e5fe673ef3a50e51712c1e7f8de07f0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c1b101320812d9c82025302215a753d50800678 commit 5c1b101320812d9c82025302215a753d50800678 Merge: d033f0c dd089e0 Author: Brad King AuthorDate: Mon Dec 15 11:46:19 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 11:46:19 2014 -0500 Merge topic 'install-EXPORT-absolute-prefix' into next dd089e08 install: Allow absolute EXPORT destination with relative targets (#15258) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd089e08b578f20b7dc7d2ce658e3df05e346e35 commit dd089e08b578f20b7dc7d2ce658e3df05e346e35 Author: Brad King AuthorDate: Mon Dec 15 09:52:48 2014 -0500 Commit: Brad King CommitDate: Mon Dec 15 11:45:49 2014 -0500 install: Allow absolute EXPORT destination with relative targets (#15258) When install(EXPORT) is given an absolute destination we cannot compute the install prefix relative to the installed export file location. Previously we disallowed installation of targets in such exports with a relative destination, but did not enforce this for target property values besides the location of the main target file. This could lead to broken installations when the EXPORT is installed to an absolute path but usage requirements are specified relative to the install prefix. Since an EXPORT installed to an absolute destination cannot be relocated we can just hard-code the value of CMAKE_INSTALL_PREFIX as the base for relative paths. This will allow absolute install(EXPORT) destinations to work with relative destinations for targets and usage requirements. Extend the ExportImport test with a case covering this behavior. diff --git a/Help/release/dev/install-EXPORT-absolute-prefix.rst b/Help/release/dev/install-EXPORT-absolute-prefix.rst new file mode 100644 index 0000000..1b2a01c --- /dev/null +++ b/Help/release/dev/install-EXPORT-absolute-prefix.rst @@ -0,0 +1,9 @@ +install-EXPORT-absolute-prefix +------------------------------ + +* The :command:`install(EXPORT)` command now works with an absolute + ``DESTINATION`` even if targets in the export set are installed + with a destination or usage requirements specified relative to the + install prefix. The value of the :variable:`CMAKE_INSTALL_PREFIX` + variable is hard-coded into the installed export file as the base + for relative references. diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 23180f1..3f5866a 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -69,13 +69,24 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) this->GenerateExpectedTargetsCode(os, expectedTargets); } - // Add code to compute the installation prefix relative to the - // import file location. + // Set an _IMPORT_PREFIX variable for import location properties + // to reference if they are relative to the install prefix. + std::string installPrefix = + this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX"); const char* installDest = this->IEGen->GetDestination(); - if(!cmSystemTools::FileIsFullPath(installDest)) + if(cmSystemTools::FileIsFullPath(installDest)) { - std::string installPrefix = - this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX"); + // The export file is being installed to an absolute path so the + // package is not relocatable. Use the configured install prefix. + os << + "# The installation prefix configured by this project.\n" + "set(_IMPORT_PREFIX \"" << installPrefix << "\")\n" + "\n"; + } + else + { + // Add code to compute the installation prefix relative to the + // import file location. std::string absDest = installPrefix + "/" + installDest; std::string absDestS = absDest + "/"; os << "# Compute the installation prefix relative to this file.\n" @@ -106,9 +117,6 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) dest = cmSystemTools::GetFilenamePath(dest); } os << "\n"; - - // Import location properties may reference this variable. - this->ImportPrefix = "${_IMPORT_PREFIX}/"; } std::vector missingTargets; @@ -209,12 +217,9 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) << "\n"; // Cleanup the import prefix variable. - if(!this->ImportPrefix.empty()) - { - os << "# Cleanup temporary variables.\n" - << "set(_IMPORT_PREFIX)\n" - << "\n"; - } + os << "# Cleanup temporary variables.\n" + << "set(_IMPORT_PREFIX)\n" + << "\n"; this->GenerateImportedFileCheckLoop(os); bool result = true; @@ -394,11 +399,7 @@ cmExportInstallFileGenerator if(!cmSystemTools::FileIsFullPath(dest.c_str())) { // The target is installed relative to the installation prefix. - if(this->ImportPrefix.empty()) - { - this->ComplainAboutImportPrefix(itgen); - } - value = this->ImportPrefix; + value = "${_IMPORT_PREFIX}/"; } value += dest; value += "/"; @@ -508,24 +509,6 @@ cmExportInstallFileGenerator return namespaces; } - -//---------------------------------------------------------------------------- -void -cmExportInstallFileGenerator -::ComplainAboutImportPrefix(cmInstallTargetGenerator* itgen) -{ - const char* installDest = this->IEGen->GetDestination(); - cmOStringStream e; - e << "install(EXPORT \"" - << this->IEGen->GetExportSet()->GetName() - << "\") given absolute " - << "DESTINATION \"" << installDest << "\" but the export " - << "references an installation of target \"" - << itgen->GetTarget()->GetName() << "\" which has relative " - << "DESTINATION \"" << itgen->GetDestination() << "\"."; - cmSystemTools::Error(e.str().c_str()); -} - //---------------------------------------------------------------------------- void cmExportInstallFileGenerator diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index b851ad5..6f86ac9 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -83,14 +83,10 @@ protected: std::set& importedLocations ); - void ComplainAboutImportPrefix(cmInstallTargetGenerator* itgen); - std::string InstallNameDir(cmTarget* target, const std::string& config); cmInstallExportGenerator* IEGen; - std::string ImportPrefix; - // The import file generated for each configuration. std::map ConfigImportFiles; }; diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index febdfe6..e130eca 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -508,3 +508,18 @@ export(TARGETS testExe2 testLib4 testLib5 testLib6 testExe3 testExe2lib ) add_subdirectory(Interface) + +#----------------------------------------------------------------------------- +# Install export with absolute destination but relative pieces. +add_library(testLibAbs1 STATIC testLibAbs1.c) +target_include_directories(testLibAbs1 INTERFACE + "$/include/abs/1a;include/abs/1b>" + ) +install( + TARGETS testLibAbs1 + EXPORT expAbs + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include/abs + ) +install(DIRECTORY include/abs DESTINATION include) +install(EXPORT expAbs NAMESPACE expAbs_ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/expAbs) diff --git a/Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h b/Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h new file mode 100644 index 0000000..4421227 --- /dev/null +++ b/Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h @@ -0,0 +1 @@ +#define testLibAbs1a diff --git a/Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h b/Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h new file mode 100644 index 0000000..00a2a29 --- /dev/null +++ b/Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h @@ -0,0 +1 @@ +#define testLibAbs1b diff --git a/Tests/ExportImport/Export/include/abs/testLibAbs1.h b/Tests/ExportImport/Export/include/abs/testLibAbs1.h new file mode 100644 index 0000000..19d80a5 --- /dev/null +++ b/Tests/ExportImport/Export/include/abs/testLibAbs1.h @@ -0,0 +1 @@ +extern int testLibAbs1(void); diff --git a/Tests/ExportImport/Export/testLibAbs1.c b/Tests/ExportImport/Export/testLibAbs1.c new file mode 100644 index 0000000..34aec75 --- /dev/null +++ b/Tests/ExportImport/Export/testLibAbs1.c @@ -0,0 +1 @@ +int testLibAbs1(void) { return 0; } diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index eb0bbf8..9450c82 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -96,6 +96,16 @@ foreach(c DEBUG RELWITHDEBINFO) endforeach() #----------------------------------------------------------------------------- +include(${CMAKE_INSTALL_PREFIX}/lib/expAbs/expAbs.cmake) + +add_executable(imp_testExeAbs1 + imp_testExeAbs1.c + ) +target_link_libraries(imp_testExeAbs1 + expAbs_testLibAbs1 + ) + +#----------------------------------------------------------------------------- # Create a custom target to generate a header for the libraries below. # Drive the header generation through an indirect chain of imported # target dependencies. diff --git a/Tests/ExportImport/Import/A/imp_testExeAbs1.c b/Tests/ExportImport/Import/A/imp_testExeAbs1.c new file mode 100644 index 0000000..069c3f0 --- /dev/null +++ b/Tests/ExportImport/Import/A/imp_testExeAbs1.c @@ -0,0 +1,15 @@ +#include "testLibAbs1.h" +#include "testLibAbs1a.h" +#include "testLibAbs1b.h" +#ifndef testLibAbs1a +# error "testLibAbs1a not defined" +#endif +#ifndef testLibAbs1b +# error "testLibAbs1b not defined" +#endif +int main() +{ + return 0 + + testLibAbs1() + ; +} ----------------------------------------------------------------------- Summary of changes: .../release/dev/install-EXPORT-absolute-prefix.rst | 9 ++++ Source/cmExportInstallFileGenerator.cxx | 57 +++++++------------- Source/cmExportInstallFileGenerator.h | 4 -- Tests/ExportImport/Export/CMakeLists.txt | 15 ++++++ .../Export/include/abs/1a/testLibAbs1a.h | 1 + .../Export/include/abs/1b/testLibAbs1b.h | 1 + .../ExportImport/Export/include/abs/testLibAbs1.h | 1 + Tests/ExportImport/Export/testLibAbs1.c | 1 + Tests/ExportImport/Import/A/CMakeLists.txt | 10 ++++ Tests/ExportImport/Import/A/imp_testExeAbs1.c | 15 ++++++ 10 files changed, 73 insertions(+), 41 deletions(-) create mode 100644 Help/release/dev/install-EXPORT-absolute-prefix.rst create mode 100644 Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h create mode 100644 Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h create mode 100644 Tests/ExportImport/Export/include/abs/testLibAbs1.h create mode 100644 Tests/ExportImport/Export/testLibAbs1.c create mode 100644 Tests/ExportImport/Import/A/imp_testExeAbs1.c hooks/post-receive -- CMake From joe.snyder at kitware.com Mon Dec 15 13:11:47 2014 From: joe.snyder at kitware.com (Joe Snyder) Date: Mon, 15 Dec 2014 13:11:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1177-gde3c9d8 Message-ID: <20141215181147.B9AE3A324A@public.kitware.com> This is an automated email from 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 de3c9d8c5f3bdda60c0711e04238fd392c46a59f (commit) via 0622f92d23771126b2ff5470faea58a76326c413 (commit) from 5c1b101320812d9c82025302215a753d50800678 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de3c9d8c5f3bdda60c0711e04238fd392c46a59f commit de3c9d8c5f3bdda60c0711e04238fd392c46a59f Merge: 5c1b101 0622f92 Author: Joe Snyder AuthorDate: Mon Dec 15 13:11:47 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 13:11:47 2014 -0500 Merge topic 'fix_coverage_scanbuild_errors' into next 0622f92d CTest: Remove code to fix scanbuild errors http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0622f92d23771126b2ff5470faea58a76326c413 commit 0622f92d23771126b2ff5470faea58a76326c413 Author: Joseph Snyder AuthorDate: Mon Dec 15 12:48:08 2014 -0500 Commit: Joseph Snyder CommitDate: Mon Dec 15 12:48:08 2014 -0500 CTest: Remove code to fix scanbuild errors Remove code from cmParseBlanketJSCoverage.cxx and cmParseDelphiCoverage.cxx which caused scanbuild errors about not reading the value that was stored. diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index fc90bc1..85d066b 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -81,7 +81,6 @@ public: this->Coverage.TotalCoverage[filename]; CoverageVector = localCoverageVector; localCoverageVector.clear(); - foundFile=false; } foundFile= true; inSource = false; @@ -122,7 +121,6 @@ public: FileLinesType& CoverageVector = this->Coverage.TotalCoverage[filename]; CoverageVector = localCoverageVector; - foundFile=false; localCoverageVector.clear(); return true; } diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx index ad71c85..8e331b1 100644 --- a/Source/CTest/cmParseDelphiCoverage.cxx +++ b/Source/CTest/cmParseDelphiCoverage.cxx @@ -136,8 +136,6 @@ public: break; } pos = lastoffset+1; - endnamepos = 0; - lastoffset =0; } /* * Glob through the source directory for the ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmParseBlanketJSCoverage.cxx | 2 -- Source/CTest/cmParseDelphiCoverage.cxx | 2 -- 2 files changed, 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 15 15:48:12 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 15 Dec 2014 15:48:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1179-gc6aad83 Message-ID: <20141215204812.1997FA7F4F@public.kitware.com> This is an automated email from 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 c6aad8356f66067a17d7988bc039a86d37b12927 (commit) via 1bdad220b8ef1b335ab36dbf02987819de471214 (commit) from de3c9d8c5f3bdda60c0711e04238fd392c46a59f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6aad8356f66067a17d7988bc039a86d37b12927 commit c6aad8356f66067a17d7988bc039a86d37b12927 Merge: de3c9d8 1bdad22 Author: Brad King AuthorDate: Mon Dec 15 15:48:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 15 15:48:11 2014 -0500 Merge topic 'curl-darwinssl' into next 1bdad220 curl: Use OS X SSL/TLS native implementation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1bdad220b8ef1b335ab36dbf02987819de471214 commit 1bdad220b8ef1b335ab36dbf02987819de471214 Author: Brad King AuthorDate: Mon Dec 15 14:36:59 2014 -0500 Commit: Brad King CommitDate: Mon Dec 15 15:42:29 2014 -0500 curl: Use OS X SSL/TLS native implementation On OS X, when CMAKE_USE_OPENSSL is OFF, use the OS implementation. This will allow the OS-configured CA list to be trusted automatically. diff --git a/Help/release/dev/curl-darwinssl.rst b/Help/release/dev/curl-darwinssl.rst new file mode 100644 index 0000000..3571bd1 --- /dev/null +++ b/Help/release/dev/curl-darwinssl.rst @@ -0,0 +1,9 @@ +curl-darwinssl +-------------- + +* On OS X, commands supporting network communication, such as + :command:`file(DOWNLOAD)`, :command:`file(UPLOAD)`, and + :command:`ctest_submit`, now support SSL/TLS even when CMake + is not built against OpenSSL. The OS X native SSL/TLS + implementation is used by default. OS-configured certificate + authorities will be trusted automatically. diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 1092e48..7fe19a1 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -464,6 +464,24 @@ elseif(WIN32) # Use Windows SSL/TLS native implementation. add_definitions(-DUSE_SCHANNEL) set(USE_WINDOWS_SSPI 1) +elseif(APPLE) + # Use OS X SSL/TLS native implementation if available on target version. + if(CMAKE_OSX_DEPLOYMENT_TARGET) + set(OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) + else() + execute_process( + COMMAND sw_vers -productVersion + OUTPUT_VARIABLE OSX_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() + if(NOT OSX_VERSION VERSION_LESS 10.7) + add_definitions(-DUSE_DARWINSSL) + list(APPEND CURL_LIBS + "-framework CoreFoundation" + "-framework Security" + ) + endif() endif() #libSSH2 ----------------------------------------------------------------------- Summary of changes: .../dev/{curl-winssl.rst => curl-darwinssl.rst} | 8 ++++---- Utilities/cmcurl/CMakeLists.txt | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) copy Help/release/dev/{curl-winssl.rst => curl-darwinssl.rst} (60%) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 16 00:01:11 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 16 Dec 2014 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-494-gf30bac5 Message-ID: <20141216050111.34A95A80A0@public.kitware.com> This is an automated email from 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 f30bac5eb47b06d90be57d9aa8f176eeba1c9152 (commit) from 1b3ab3318dcdabe074da3c95b54f9483d47f95be (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f30bac5eb47b06d90be57d9aa8f176eeba1c9152 commit f30bac5eb47b06d90be57d9aa8f176eeba1c9152 Author: Kitware Robot AuthorDate: Tue Dec 16 00:01:09 2014 -0500 Commit: Kitware Robot CommitDate: Tue Dec 16 00:01:09 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 396ac98..a5a3c88 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 1) -set(CMake_VERSION_PATCH 20141215) +set(CMake_VERSION_PATCH 20141216) #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 Dec 16 09:46:32 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 16 Dec 2014 09:46:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1181-gddf17d5 Message-ID: <20141216144632.3CEF5A762B@public.kitware.com> This is an automated email from 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 ddf17d549972cb0fa229f62915ebac916cff4ac0 (commit) via 697aa25068fe008008ff7aac934a852774218245 (commit) from c6aad8356f66067a17d7988bc039a86d37b12927 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ddf17d549972cb0fa229f62915ebac916cff4ac0 commit ddf17d549972cb0fa229f62915ebac916cff4ac0 Merge: c6aad83 697aa25 Author: Brad King AuthorDate: Tue Dec 16 09:46:29 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 16 09:46:29 2014 -0500 Merge topic 'curl-darwinssl' into next 697aa250 curl: DarwinSSL works on OS X 10.5 and above with GNU and Clang http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=697aa25068fe008008ff7aac934a852774218245 commit 697aa25068fe008008ff7aac934a852774218245 Author: Brad King AuthorDate: Tue Dec 16 09:37:20 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 09:45:49 2014 -0500 curl: DarwinSSL works on OS X 10.5 and above with GNU and Clang It does not work with the Intel compiler. diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 7fe19a1..94aafb9 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -475,7 +475,8 @@ elseif(APPLE) OUTPUT_STRIP_TRAILING_WHITESPACE ) endif() - if(NOT OSX_VERSION VERSION_LESS 10.7) + if(NOT OSX_VERSION VERSION_LESS 10.5 AND + CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang") add_definitions(-DUSE_DARWINSSL) list(APPEND CURL_LIBS "-framework CoreFoundation" ----------------------------------------------------------------------- Summary of changes: Utilities/cmcurl/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 16 10:12:57 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 16 Dec 2014 10:12:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1184-gab8daef Message-ID: <20141216151257.B85E3A51F8@public.kitware.com> This is an automated email from 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 ab8daef62e29365988d595dd6bbf47fcd8aacc4e (commit) via a85ee8b8cf4fb4be5f5ebd6e88e2753d1ec654ae (commit) via da7155f5bc70440ccb1238e73194c2a454442f8d (commit) from ddf17d549972cb0fa229f62915ebac916cff4ac0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab8daef62e29365988d595dd6bbf47fcd8aacc4e commit ab8daef62e29365988d595dd6bbf47fcd8aacc4e Merge: ddf17d5 a85ee8b Author: Brad King AuthorDate: Tue Dec 16 10:12:56 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 16 10:12:56 2014 -0500 Merge topic 'test-RunCMake-updates' into next a85ee8b8 Tests: Simplify RunCMake test extra argument passing da7155f5 Tests: Allow RunCMake tests to pass generator expressions http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a85ee8b8cf4fb4be5f5ebd6e88e2753d1ec654ae commit a85ee8b8cf4fb4be5f5ebd6e88e2753d1ec654ae Author: Brad King AuthorDate: Mon Dec 15 16:46:05 2014 -0500 Commit: Brad King CommitDate: Mon Dec 15 16:46:49 2014 -0500 Tests: Simplify RunCMake test extra argument passing Allow add_RunCMake_test calls to pass non-optional arguments immediately. diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 4ec8feb..e74eadd 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -9,6 +9,7 @@ macro(add_RunCMake_test test) -DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test} -DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${test} ${${test}_ARGS} + ${ARGN} -P "${CMAKE_CURRENT_SOURCE_DIR}/${test}/RunCMakeTest.cmake" ) endmacro() @@ -131,8 +132,7 @@ if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0) add_RunCMake_test(IncompatibleQt) endif() if (QT4_FOUND) - set(ObsoleteQtMacros_ARGS -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}) - add_RunCMake_test(ObsoleteQtMacros) + add_RunCMake_test(ObsoleteQtMacros -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}) endif() find_package(PkgConfig QUIET) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da7155f5bc70440ccb1238e73194c2a454442f8d commit da7155f5bc70440ccb1238e73194c2a454442f8d Author: Brad King AuthorDate: Mon Dec 15 16:44:59 2014 -0500 Commit: Brad King CommitDate: Mon Dec 15 16:46:49 2014 -0500 Tests: Allow RunCMake tests to pass generator expressions diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 2bfd4d6..4ec8feb 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -1,7 +1,7 @@ # See adjacent README.rst for documentation of this test infrastructure. macro(add_RunCMake_test test) - add_test(RunCMake.${test} ${CMAKE_CMAKE_COMMAND} + add_test(NAME RunCMake.${test} COMMAND ${CMAKE_CMAKE_COMMAND} -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR} -DRunCMake_GENERATOR=${CMAKE_GENERATOR} -DRunCMake_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 16 10:39:39 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 16 Dec 2014 10:39:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1187-g2123458 Message-ID: <20141216153939.3EB8E8F625@public.kitware.com> This is an automated email from 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 2123458b2d7eb2c3ab2a7a6275098477de1176a2 (commit) via 953d34fd1fd004459704d4625aff54a9dcf9141b (commit) via 9859042c0501f444fbb9d5f2b78b5e563a97f71d (commit) from ab8daef62e29365988d595dd6bbf47fcd8aacc4e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2123458b2d7eb2c3ab2a7a6275098477de1176a2 commit 2123458b2d7eb2c3ab2a7a6275098477de1176a2 Merge: ab8daef 953d34f Author: Brad King AuthorDate: Tue Dec 16 10:39:38 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 16 10:39:38 2014 -0500 Merge topic 'doc-custom-command-depends' into next 953d34fd Help: Document MAIN_DEPENDENCY limitation in add_custom_command 9859042c Help: Mention add_dependencies in add_custom_target DEPENDS option http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=953d34fd1fd004459704d4625aff54a9dcf9141b commit 953d34fd1fd004459704d4625aff54a9dcf9141b Author: Brad King AuthorDate: Tue Dec 16 10:38:43 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 10:38:43 2014 -0500 Help: Document MAIN_DEPENDENCY limitation in add_custom_command Specify explicitly that at most one custom command may use a given source file as its main dependency. diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 9fbad4b..1307a58 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -130,7 +130,8 @@ The options are: Specify the primary input source file to the command. This is treated just like any value given to the ``DEPENDS`` option but also suggests to Visual Studio generators where to hang - the custom command. + the custom command. At most one custom command may specify a + given source file as its main dependency. ``OUTPUT`` Specify the output files the command is expected to produce. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9859042c0501f444fbb9d5f2b78b5e563a97f71d commit 9859042c0501f444fbb9d5f2b78b5e563a97f71d Author: Brad King AuthorDate: Tue Dec 16 10:38:10 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 10:38:10 2014 -0500 Help: Mention add_dependencies in add_custom_target DEPENDS option This will direct readers looking to add target-level dependencies. diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst index 996d08e..5134a70 100644 --- a/Help/command/add_custom_target.rst +++ b/Help/command/add_custom_target.rst @@ -82,6 +82,9 @@ The options are: (``CMakeLists.txt`` file). They will be brought up to date when the target is built. + Use the :command:`add_dependencies` command to add dependencies + on other targets. + ``SOURCES`` Specify additional source files to be included in the custom target. Specified source files will be added to IDE project files for ----------------------------------------------------------------------- Summary of changes: Help/command/add_custom_command.rst | 3 ++- Help/command/add_custom_target.rst | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 16 13:38:40 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 16 Dec 2014 13:38:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1189-g5d0d719 Message-ID: <20141216183840.4B3E4A82AE@public.kitware.com> This is an automated email from 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 5d0d71905dc79d422fe5ec22111d1062b7d5e9a7 (commit) via 29533380ea887e3f5eab44260bbd77933cf91ca9 (commit) from 2123458b2d7eb2c3ab2a7a6275098477de1176a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d0d71905dc79d422fe5ec22111d1062b7d5e9a7 commit 5d0d71905dc79d422fe5ec22111d1062b7d5e9a7 Merge: 2123458 2953338 Author: Brad King AuthorDate: Tue Dec 16 13:38:39 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 16 13:38:39 2014 -0500 Merge topic 'test-RunCMake-updates' into next 29533380 Tests: Allow RunCMake expected result code to be a regex http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29533380ea887e3f5eab44260bbd77933cf91ca9 commit 29533380ea887e3f5eab44260bbd77933cf91ca9 Author: Brad King AuthorDate: Tue Dec 16 13:33:47 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 13:34:34 2014 -0500 Tests: Allow RunCMake expected result code to be a regex This will allow the '-result.txt' files to specify a regex matching different results on different platforms. diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 56d69c8..7b1a5b2 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -65,7 +65,7 @@ function(run_cmake test) ) endif() set(msg "") - if(NOT "${actual_result}" STREQUAL "${expect_result}") + if(NOT "${actual_result}" MATCHES "${expect_result}") set(msg "${msg}Result is [${actual_result}], not [${expect_result}].\n") endif() foreach(o out err) ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/RunCMake.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 16 14:21:50 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 16 Dec 2014 14:21:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1193-g602f618 Message-ID: <20141216192150.26463A7DEE@public.kitware.com> This is an automated email from 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 602f6185809d86bbbb52c6db44092e46ac48475c (commit) via a6ee00e6ce6a59e07cc89d8502fe3935f18dab09 (commit) via 0e94a59a6227a4c1fc5ebf343147ce6455958278 (commit) via 1c8129795ac482b36a67d0b7131f2bbd6ad04a54 (commit) from 5d0d71905dc79d422fe5ec22111d1062b7d5e9a7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=602f6185809d86bbbb52c6db44092e46ac48475c commit 602f6185809d86bbbb52c6db44092e46ac48475c Merge: 5d0d719 a6ee00e Author: Brad King AuthorDate: Tue Dec 16 14:21:47 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 16 14:21:47 2014 -0500 Merge topic 'test-memcheck-with-RunCMake' into next a6ee00e6 Tests: Move CTestTestMemcheck tools into Tests/CMakeLib 0e94a59a Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test 1c812979 ctest_memcheck: Do not open empty BC output file name http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6ee00e6ce6a59e07cc89d8502fe3935f18dab09 commit a6ee00e6ce6a59e07cc89d8502fe3935f18dab09 Author: Brad King AuthorDate: Tue Dec 16 13:59:22 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 14:16:41 2014 -0500 Tests: Move CTestTestMemcheck tools into Tests/CMakeLib The dummy memcheck tools we build for the RunCMake.CTestMemcheck tests require CMakeLib, so put them in a Tests/CMakeLib/PseudoMemcheck directory. diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 8c99f64..7ef3c03 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -48,3 +48,5 @@ if(TEST_CompileCommandOutput) add_executable(runcompilecommands run_compile_commands.cxx) target_link_libraries(runcompilecommands CMakeLib) endif() + +add_subdirectory(PseudoMemcheck) diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt similarity index 97% rename from Tests/CTestTestMemcheck/CMakeLists.txt rename to Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt index 5d6319a..c53befc 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt @@ -23,7 +23,7 @@ target_link_libraries(memcheck_fail CMakeLib) # Binaries that are used as memchecker that do not write the expected # output file. Need to be in their own subdirectory as they have the # same filenames. -add_subdirectory(NoLogDummyChecker) +add_subdirectory(NoLog) # Xcode 2.x forgets to create the output directory before linking # the individual architectures. diff --git a/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt b/Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt similarity index 100% rename from Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt rename to Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt diff --git a/Tests/CTestTestMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in similarity index 100% rename from Tests/CTestTestMemcheck/memtester.cxx.in rename to Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 33c18ce..250e966 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -110,10 +110,6 @@ if(BUILD_TESTING) add_subdirectory(FindPackageModeMakefileTest) - if(NOT CMake_TEST_EXTERNAL_CMAKE) - add_subdirectory(CTestTestMemcheck) - endif() - # Collect a list of all test build directories. set(TEST_BUILD_DIRS) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e94a59a6227a4c1fc5ebf343147ce6455958278 commit 0e94a59a6227a4c1fc5ebf343147ce6455958278 Author: Brad King AuthorDate: Tue Dec 16 13:50:30 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 14:16:41 2014 -0500 Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test The CTestTestMemcheck test cases all try to check the ctest output with a regular expression. They fail intermittently due to ordering of the portions of the output that come from stdout and stderr being mixed. Convert all the test cases to use the RunCMake infrastructure to match stdout and stderr separately. diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt index 2023e74..5d6319a 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CTestTestMemcheck/CMakeLists.txt @@ -1,13 +1,3 @@ -REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") - -get_filename_component(CTEST_REALPATH_CMAKE_CURRENT_BINARY_DIR - "${CMAKE_CURRENT_BINARY_DIR}" REALPATH -) - -REGEX_ESCAPE_STRING(CTEST_ESCAPED_REALPATH_CMAKE_CURRENT_BINARY_DIR - "${CTEST_REALPATH_CMAKE_CURRENT_BINARY_DIR}" -) - foreach (_retval 0 1) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/memtester.cxx.in" "${CMAKE_CURRENT_BINARY_DIR}/ret${_retval}.cxx" @ONLY) endforeach () @@ -35,245 +25,6 @@ target_link_libraries(memcheck_fail CMakeLib) # same filenames. add_subdirectory(NoLogDummyChecker) -if(APPLE) - # filter out additional messages by Guard Malloc integrated in Xcode - set(guard_malloc_msg "ctest\\([0-9]+\\) malloc: ") - set(guard_malloc_lines "(${guard_malloc_msg}[^\n]*\n)*") - set(guard_malloc_output "${guard_malloc_msg}|") -else() - set(guard_malloc_msg "") - set(guard_malloc_lines "") - set(guard_malloc_output "") -endif() - -# When this entire test runs under coverage or memcheck tools -# they may add output to the end, so match known cases: -# - Bullseye adds a "BullseyeCoverage..." line. -# - Valgrind memcheck may add extra "==..." lines. -set(other_tool_output "((${guard_malloc_output}BullseyeCoverage|==)[^\n]*\n)*") - -string(REPLACE "\r\n" "\n" ctest_and_tool_outputs " -1/1 MemCheck #1: RunCMake \\.+ Passed +[0-9]+\\.[0-9]+ sec -${guard_malloc_lines} -100% tests passed, 0 tests failed out of 1 -.* --- Processing memory checking output:( ) -${guard_malloc_lines}Memory checking results: -${other_tool_output}") - -function(gen_mc_test_internal NAME CHECKER) - set(SUBTEST_NAME "${NAME}") - set(CHECKER_COMMAND "${CHECKER}") - foreach(_file IN ITEMS CMakeLists.txt CTestConfig.cmake test.cmake) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${_file}.in" - "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/${_file}" @ONLY) - endforeach() - add_test(NAME CTestTestMemcheck${NAME} - COMMAND ${CMAKE_CTEST_COMMAND} - -C $ - -S "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/test.cmake" -V - --output-log "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/testOutput.log" - ${ARGN} - ) -endfunction(gen_mc_test_internal) - -function(gen_mc_test NAME CHECKER) - gen_mc_test_internal(${NAME} "${CHECKER}" - -D PSEUDO_BC=$ - -D PSEUDO_PURIFY=$ - -D PSEUDO_VALGRIND=$ - -D ERROR_COMMAND=$ - ${ARGN} - ) -endfunction(gen_mc_test) - -function(gen_mcnl_test NAME CHECKER) - gen_mc_test_internal(${NAME} ${CHECKER} - -D PSEUDO_BC=$ - -D PSEUDO_PURIFY=$ - -D PSEUDO_VALGRIND=$ - ${ARGN} - ) - set_tests_properties(CTestTestMemcheck${NAME} - PROPERTIES - PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/${NAME}/Testing/Temporary/MemoryChecker.1.log\n(.*\n)?Error in read script: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/${NAME}/test.cmake\n") -endfunction(gen_mcnl_test) - -unset(CTEST_EXTRA_CONFIG) -unset(CTEST_EXTRA_CODE) -unset(CMAKELISTS_EXTRA_CODE) - -#----------------------------------------------------------------------------- -# add ThreadSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\") -") -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testThreadSanitizer.cmake\") -") -gen_mc_test_internal(DummyThreadSanitizer "" -DMEMCHECK_TYPE=ThreadSanitizer) -set_tests_properties(CTestTestMemcheckDummyThreadSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*data race.* - 1.*data race on vptr .ctor/dtor vs virtual call. - 1.*heap-use-after-free - 1.*thread leak - 1.*destroy of a locked mutex - 1.*double lock of a mutex - 1.*unlock of an unlocked mutex .or by a wrong thread. - 1.*read lock of a write locked mutex - 1.*read unlock of a write locked mutex - 1.*signal-unsafe call inside of a signal - 1.*signal handler spoils errno - 1.*lock-order-inversion .potential deadlock. - 1.*") -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) - -#----------------------------------------------------------------------------- -# add LeakSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") -") -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testLeakSanitizer.cmake\") -") -gen_mc_test_internal(DummyLeakSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyLeakSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*Direct leak - 2.*Indirect leak - 1.*") - -#----------------------------------------------------------------------------- -# add AddressSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") -") -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testAddressSanitizer.cmake\") -") -gen_mc_test_internal(DummyAddressSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyAddressSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*heap-buffer-overflow - 1.*") - -#----------------------------------------------------------------------------- -# add MemorySanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") -") - -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testMemorySanitizer.cmake\") -") -gen_mc_test_internal(DummyMemorySanitizer "" -DMEMCHECK_TYPE=MemorySanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyMemorySanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*use-of-uninitialized-value - 1.*") - -#----------------------------------------------------------------------------- -# add UndefinedBehaviorSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\") -") - -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\") -") -gen_mc_test_internal(DummyUndefinedBehaviorSanitizer "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyUndefinedBehaviorSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*left shift of negative value -256 - 1.*") - -#----------------------------------------------------------------------------- - -gen_mc_test(DummyPurify "\${PSEUDO_PURIFY}") -gen_mc_test(DummyValgrind "\${PSEUDO_VALGRIND}") -gen_mc_test(DummyBC "\${PSEUDO_BC}") -gen_mcnl_test(DummyPurifyNoLogfile "\${PSEUDO_PURIFY}") -gen_mcnl_test(DummyValgrindNoLogfile "\${PSEUDO_VALGRIND}") -gen_mcnl_test(DummyBCNoLogfile "\${PSEUDO_BC}") - -set(CTEST_EXTRA_CODE "string(REPLACE \" \" \"\\\\ \" PRE_POST_COMMAND \"\${CTEST_MEMORYCHECK_COMMAND}\") - -set(CTEST_CUSTOM_PRE_MEMCHECK \"\${PRE_POST_COMMAND} pre command\") -set(CTEST_CUSTOM_POST_MEMCHECK \"\${PRE_POST_COMMAND} post command \") -") -gen_mc_test(DummyValgrindPrePost "\${PSEUDO_VALGRIND}") - -set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_POST_MEMCHECK \"\${ERROR_COMMAND}\")") -gen_mc_test(DummyValgrindFailPost "\${PSEUDO_VALGRIND}") - -set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_PRE_MEMCHECK \"\${ERROR_COMMAND}\")") -gen_mc_test(DummyValgrindFailPre "\${PSEUDO_VALGRIND}") - -unset(CTEST_EXTRA_CODE) -set(CTEST_EXTRA_CONFIG "set(CTEST_CUSTOM_MEMCHECK_IGNORE RunCMakeAgain)\n") -set(CMAKELISTS_EXTRA_CODE "add_test(NAME RunCMakeAgain COMMAND \"\${CMAKE_COMMAND}\" --version)") -gen_mc_test(DummyValgrindIgnoreMemcheck "\${PSEUDO_VALGRIND}") - -unset(CTEST_EXTRA_CONFIG) -gen_mc_test(DummyValgrindTwoTargets "\${PSEUDO_VALGRIND}" "-VV") - -set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/does-not-exist\")") -unset(CMAKELISTS_EXTRA_CODE) -gen_mc_test(DummyValgrindInvalidSupFile "\${PSEUDO_VALGRIND}") - -# CTest will add the logfile option before any custom options. Set the logfile -# again, this time to an empty string. This will cause the logfile to be -# missing, which will be the prove for us that the custom option is indeed used. -set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"--log-file=\")") -gen_mc_test(DummyValgrindCustomOptions "\${PSEUDO_VALGRIND}") - -unset(CTEST_EXTRA_CONFIG) -gen_mc_test(NotExist "\${CTEST_BINARY_DIRECTORY}/no-memcheck-exe") - -gen_mc_test(Unknown "${CMAKE_COMMAND}") - -string(REPLACE "\\" "\\\\" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND}") -string(REPLACE "(" "\\(" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}") -string(REPLACE ")" "\\)" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}") -string(REPLACE "+" "\\+" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}") - -set_tests_properties(CTestTestMemcheckUnknown PROPERTIES - PASS_REGULAR_EXPRESSION "Do not understand memory checker: ${CMAKE_COMMAND_ESCAPED}\n(.*\n)?Error in read script: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/Unknown/test.cmake\n") - -set_tests_properties(CTestTestMemcheckNotExist PROPERTIES - PASS_REGULAR_EXPRESSION "Memory checker \\(MemoryCheckCommand\\) not set, or cannot find the specified program.") - -# It is a valid result if valgrind does not output any files (can e.g. happen -# if you have not compiled in debug mode), so these tests will not fail. -set_tests_properties(CTestTestMemcheckDummyValgrind - CTestTestMemcheckDummyValgrindPrePost - CTestTestMemcheckDummyPurify - PROPERTIES - PASS_REGULAR_EXPRESSION "${ctest_and_tool_outputs}$") - -foreach (_pp Pre Post) - string(TOLOWER ${_pp} _pp_lower) - set_tests_properties(CTestTestMemcheckDummyValgrindFail${_pp} - PROPERTIES - PASS_REGULAR_EXPRESSION "\nProblem running command: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}[^\n]*fail[^\n]*\n(.*\n)?Problem executing ${_pp_lower}-memcheck command\\(s\\\).\n(.*\n)?Error in read script: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindFail${_pp}/test.cmake\n") -endforeach () - -set_tests_properties(CTestTestMemcheckDummyValgrindIgnoreMemcheck - PROPERTIES - PASS_REGULAR_EXPRESSION "\n2/2 Test #2: RunCMakeAgain .*${ctest_and_tool_outputs}$") - -set_tests_properties(CTestTestMemcheckDummyBC PROPERTIES - PASS_REGULAR_EXPRESSION "\n1/1 MemCheck #1: RunCMake \\.+ Passed +[0-9]+.[0-9]+ sec\n${guard_malloc_lines}\n100% tests passed, 0 tests failed out of 1\n(.*\n)?Error parsing XML in stream at line 1: no element found\n") - -set_tests_properties(CTestTestMemcheckDummyValgrindInvalidSupFile PROPERTIES - PASS_REGULAR_EXPRESSION "\nCannot find memory checker suppression file: ${CTEST_ESCAPED_REALPATH_CMAKE_CURRENT_BINARY_DIR}/does-not-exist\n") - -set_tests_properties(CTestTestMemcheckDummyValgrindCustomOptions PROPERTIES - PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindCustomOptions/Testing/Temporary/MemoryChecker.1.log\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyValgrindCustomOptions/test.cmake\n") - -set_tests_properties(CTestTestMemcheckDummyValgrindTwoTargets PROPERTIES - PASS_REGULAR_EXPRESSION - "\nMemory check project ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets\n.*\n *Start 1: RunCMake\n(.*\n)?Memory check command: .* \"--log-file=${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets/Testing/Temporary/MemoryChecker.1.log\" \"-q\".*\n *Start 2: RunCMakeAgain\n(.*\n)?Memory check command: .* \"--log-file=${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets/Testing/Temporary/MemoryChecker.2.log\" \"-q\".*\n") - - # Xcode 2.x forgets to create the output directory before linking # the individual architectures. if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index e74eadd..b5e41d9 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -52,6 +52,19 @@ add_RunCMake_test(CMP0053) add_RunCMake_test(CMP0054) add_RunCMake_test(CMP0055) add_RunCMake_test(CTest) + +if(NOT CMake_TEST_EXTERNAL_CMAKE) + add_RunCMake_test(CTestMemcheck + -DPSEUDO_BC=$ + -DPSEUDO_PURIFY=$ + -DPSEUDO_VALGRIND=$ + -DPSEUDO_BC_NOLOG=$ + -DPSEUDO_PURIFY_NOLOG=$ + -DPSEUDO_VALGRIND_NOLOG=$ + -DMEMCHECK_FAIL=$ + ) +endif() + if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja") add_RunCMake_test(CompilerChange) endif() diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt.in b/Tests/RunCMake/CTestMemcheck/CMakeLists.txt.in similarity index 100% rename from Tests/CTestTestMemcheck/CMakeLists.txt.in rename to Tests/RunCMake/CTestMemcheck/CMakeLists.txt.in diff --git a/Tests/CTestTestMemcheck/CTestConfig.cmake.in b/Tests/RunCMake/CTestMemcheck/CTestConfig.cmake.in similarity index 100% rename from Tests/CTestTestMemcheck/CTestConfig.cmake.in rename to Tests/RunCMake/CTestMemcheck/CTestConfig.cmake.in diff --git a/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt new file mode 100644 index 0000000..725270c --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt new file mode 100644 index 0000000..1d255d0 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt @@ -0,0 +1,2 @@ +Memory checking results: +heap-buffer-overflow - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyBC-result.txt b/Tests/RunCMake/CTestMemcheck/DummyBC-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBC-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt new file mode 100644 index 0000000..24f536a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt @@ -0,0 +1 @@ +Error parsing XML in stream at line 1: no element found diff --git a/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt new file mode 100644 index 0000000..360bec5 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt new file mode 100644 index 0000000..634e331 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt @@ -0,0 +1,3 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-build/Testing/Temporary/MemoryChecker.1.log +.*Error parsing XML in stream at line 1: no element found +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt new file mode 100644 index 0000000..360bec5 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt new file mode 100644 index 0000000..520222f --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt new file mode 100644 index 0000000..97a8a9b --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt @@ -0,0 +1,3 @@ +Memory checking results: +Direct leak - 2 +Indirect leak - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt new file mode 100644 index 0000000..29c6ec7 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt new file mode 100644 index 0000000..64390c7 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt @@ -0,0 +1,2 @@ +Memory checking results: +use-of-uninitialized-value - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-result.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt new file mode 100644 index 0000000..ccd0acc --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt new file mode 100644 index 0000000..2506f35 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-build/Testing/Temporary/MemoryChecker.1.log +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt new file mode 100644 index 0000000..360bec5 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt new file mode 100644 index 0000000..ca23692 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt new file mode 100644 index 0000000..c3af1f9 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt @@ -0,0 +1,13 @@ +Memory checking results: +data race - 1 +data race on vptr \(ctor/dtor vs virtual call\) - 1 +heap-use-after-free - 1 +thread leak - 1 +destroy of a locked mutex - 1 +double lock of a mutex - 1 +unlock of an unlocked mutex \(or by a wrong thread\) - 1 +read lock of a write locked mutex - 1 +read unlock of a write locked mutex - 1 +signal-unsafe call inside of a signal - 1 +signal handler spoils errno - 1 +lock-order-inversion \(potential deadlock\) - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt new file mode 100644 index 0000000..fd684da --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt new file mode 100644 index 0000000..b3473bf --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt @@ -0,0 +1,2 @@ +Memory checking results: +left shift of negative value -256 - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt new file mode 100644 index 0000000..ccd0acc --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt new file mode 100644 index 0000000..1a2ee5c --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-build/Testing/Temporary/MemoryChecker.1.log +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt new file mode 100644 index 0000000..ccd0acc --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt new file mode 100644 index 0000000..2d078ef --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt @@ -0,0 +1,3 @@ +Problem running command: .*memcheck_fail.* +Problem executing post-memcheck command\(s\). +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt new file mode 100644 index 0000000..ccd0acc --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt new file mode 100644 index 0000000..43ccb2e --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt @@ -0,0 +1,3 @@ +Problem running command: .*memcheck_fail.* +Problem executing pre-memcheck command\(s\). +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt new file mode 100644 index 0000000..9a6a1d6 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-build diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt new file mode 100644 index 0000000..0eedce8 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt @@ -0,0 +1,7 @@ +2/2 Test #2: RunCMakeAgain .* +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt new file mode 100644 index 0000000..d8d1ff0 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory checker suppression file: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-build/does-not-exist +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt new file mode 100644 index 0000000..d46912e --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-build$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt new file mode 100644 index 0000000..321a2a5 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-build/Testing/Temporary/MemoryChecker.1.log +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt new file mode 100644 index 0000000..360bec5 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt new file mode 100644 index 0000000..ccd0acc --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec +(ctest\([0-9]+\) malloc: [^\n]*\n)* +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt new file mode 100644 index 0000000..3e0fdb2 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt @@ -0,0 +1,8 @@ +Memory check project .*/DummyValgrindTwoTargets-build +.* + *Start 1: RunCMake +(.* +)?Memory check command: .* \"--log-file=.*/DummyValgrindTwoTargets-build/Testing/Temporary/MemoryChecker.1.log\" \"-q\".* + *Start 2: RunCMakeAgain +(.* +)?Memory check command: .* \"--log-file=.*/DummyValgrindTwoTargets-build/Testing/Temporary/MemoryChecker.2.log\" \"-q\".* diff --git a/Tests/RunCMake/CTestMemcheck/NotExist-result.txt b/Tests/RunCMake/CTestMemcheck/NotExist-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/NotExist-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt b/Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt new file mode 100644 index 0000000..0af5b7a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt @@ -0,0 +1 @@ +Memory checker \(MemoryCheckCommand\) not set, or cannot find the specified program\. diff --git a/Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt b/Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt new file mode 100644 index 0000000..9e92266 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/NotExist-build$ diff --git a/Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake b/Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake new file mode 100644 index 0000000..6485de8 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake @@ -0,0 +1,144 @@ +include(RunCMake) + +set(SITE test-site) +set(BUILDNAME test-build) +set(COVERAGE_COMMAND "") + +function(run_mc_test SUBTEST_NAME CHECKER_COMMAND) + configure_file(${RunCMake_SOURCE_DIR}/test.cmake.in + ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/test.cmake @ONLY) + configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in + ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/CTestConfig.cmake @ONLY) + configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in + ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/CMakeLists.txt @ONLY) + run_cmake_command(${SUBTEST_NAME} ${CMAKE_CTEST_COMMAND} + -C Debug + -S ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/test.cmake + -V + --output-log ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}-build/testOutput.log + ${ARGN} + ) +endfunction() + +unset(CTEST_EXTRA_CONFIG) +unset(CTEST_EXTRA_CODE) +unset(CMAKELISTS_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add ThreadSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testThreadSanitizer.cmake\") +") +run_mc_test(DummyThreadSanitizer "" -DMEMCHECK_TYPE=ThreadSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add LeakSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testLeakSanitizer.cmake\") +") +run_mc_test(DummyLeakSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add AddressSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testAddressSanitizer.cmake\") +") +run_mc_test(DummyAddressSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add MemorySanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testMemorySanitizer.cmake\") +") +run_mc_test(DummyMemorySanitizer "" -DMEMCHECK_TYPE=MemorySanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add UndefinedBehaviorSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\") +") +run_mc_test(DummyUndefinedBehaviorSanitizer "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CODE "string(REPLACE \" \" \"\\\\ \" PRE_POST_COMMAND \"\${CTEST_MEMORYCHECK_COMMAND}\") + +set(CTEST_CUSTOM_PRE_MEMCHECK \"\${PRE_POST_COMMAND} pre command\") +set(CTEST_CUSTOM_POST_MEMCHECK \"\${PRE_POST_COMMAND} post command \") +") +run_mc_test(DummyValgrindPrePost "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_POST_MEMCHECK \"${MEMCHECK_FAIL}\")") +run_mc_test(DummyValgrindFailPost "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_PRE_MEMCHECK \"${MEMCHECK_FAIL}\")") +run_mc_test(DummyValgrindFailPre "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CONFIG "set(CTEST_CUSTOM_MEMCHECK_IGNORE RunCMakeAgain)\n") +set(CMAKELISTS_EXTRA_CODE "add_test(NAME RunCMakeAgain COMMAND \"\${CMAKE_COMMAND}\" --version)") +run_mc_test(DummyValgrindIgnoreMemcheck "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CONFIG) +unset(CMAKELISTS_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CMAKELISTS_EXTRA_CODE "add_test(NAME RunCMakeAgain COMMAND \"\${CMAKE_COMMAND}\" --version)") +run_mc_test(DummyValgrindTwoTargets "${PSEUDO_VALGRIND}" "-VV") +unset(CMAKELISTS_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/does-not-exist\")") +run_mc_test(DummyValgrindInvalidSupFile "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CONFIG) + +#----------------------------------------------------------------------------- +# CTest will add the logfile option before any custom options. Set the logfile +# again, this time to an empty string. This will cause the logfile to be +# missing, which will be the prove for us that the custom option is indeed used. +set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"--log-file=\")") +run_mc_test(DummyValgrindCustomOptions "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CONFIG) + +#----------------------------------------------------------------------------- +run_mc_test(DummyPurify "${PSEUDO_PURIFY}") +run_mc_test(DummyValgrind "${PSEUDO_VALGRIND}") +run_mc_test(DummyBC "${PSEUDO_BC}") +run_mc_test(DummyPurifyNoLogFile "${PSEUDO_PURIFY_NOLOG}") +run_mc_test(DummyValgrindNoLogFile "${PSEUDO_VALGRIND_NOLOG}") +run_mc_test(DummyBCNoLogFile "${PSEUDO_BC_NOLOG}") +run_mc_test(NotExist "\${CTEST_BINARY_DIRECTORY}/no-memcheck-exe") +run_mc_test(Unknown "\${CMAKE_COMMAND}") diff --git a/Tests/RunCMake/CTestMemcheck/Unknown-result.txt b/Tests/RunCMake/CTestMemcheck/Unknown-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/Unknown-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt b/Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt new file mode 100644 index 0000000..2beea2d --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt @@ -0,0 +1,2 @@ +Do not understand memory checker: .*/cmake.* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/Unknown/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt b/Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt new file mode 100644 index 0000000..7ea1af0 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/Unknown-build$ diff --git a/Tests/CTestTestMemcheck/test.cmake.in b/Tests/RunCMake/CTestMemcheck/test.cmake.in similarity index 60% rename from Tests/CTestTestMemcheck/test.cmake.in rename to Tests/RunCMake/CTestMemcheck/test.cmake.in index f2ffd06..622d709 100644 --- a/Tests/CTestTestMemcheck/test.cmake.in +++ b/Tests/RunCMake/CTestMemcheck/test.cmake.in @@ -1,16 +1,14 @@ cmake_minimum_required(VERSION 2.8.9) # Settings: -set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@") set(CTEST_SITE "@SITE@") set(CTEST_BUILD_NAME "CTestTest- at BUILDNAME@-Memcheck at SUBTEST_NAME@") -set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@") -set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@") -set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") +set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@SUBTEST_NAME@") +set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@SUBTEST_NAME at -build") +set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testAddressSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testAddressSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testAddressSanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testLeakSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testLeakSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testLeakSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testLeakSanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testMemorySanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testMemorySanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testMemorySanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testMemorySanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testThreadSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testThreadSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testThreadSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testThreadSanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testUndefinedBehaviorSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testUndefinedBehaviorSanitizer.cmake http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c8129795ac482b36a67d0b7131f2bbd6ad04a54 commit 1c8129795ac482b36a67d0b7131f2bbd6ad04a54 Author: Brad King AuthorDate: Tue Dec 16 13:47:35 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 13:49:38 2014 -0500 ctest_memcheck: Do not open empty BC output file name In cmCTestMemCheckHandler::PostProcessBoundsCheckerTest return early if the output file name is empty. We already do this in the similar cmCTestMemCheckHandler::AppendMemTesterOutput method. diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 089e84b..09cf760 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -1202,6 +1202,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res, return; } std::string ofile = files[0]; + if ( ofile.empty() ) + { + return; + } // put a scope around this to close ifs so the file can be removed { cmsys::ifstream ifs(ofile.c_str()); ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 4 + Tests/CMakeLib/CMakeLists.txt | 2 + Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt | 41 +++ .../PseudoMemcheck/NoLog}/CMakeLists.txt | 0 .../PseudoMemcheck}/memtester.cxx.in | 0 Tests/CMakeLists.txt | 4 - Tests/CTestTestMemcheck/CMakeLists.txt | 290 -------------------- Tests/RunCMake/CMakeLists.txt | 13 + .../CTestMemcheck}/CMakeLists.txt.in | 0 .../CTestMemcheck}/CTestConfig.cmake.in | 0 .../CTestMemcheck/DummyAddressSanitizer-result.txt | 1 + .../CTestMemcheck/DummyAddressSanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyAddressSanitizer-stdout.txt | 2 + Tests/RunCMake/CTestMemcheck/DummyBC-result.txt | 1 + Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt | 1 + Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt | 3 + .../CTestMemcheck/DummyBCNoLogFile-result.txt | 1 + .../CTestMemcheck/DummyBCNoLogFile-stderr.txt | 3 + .../CTestMemcheck/DummyBCNoLogFile-stdout.txt | 3 + .../CTestMemcheck/DummyLeakSanitizer-result.txt | 1 + .../CTestMemcheck/DummyLeakSanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyLeakSanitizer-stdout.txt | 3 + .../CTestMemcheck/DummyMemorySanitizer-result.txt | 1 + .../CTestMemcheck/DummyMemorySanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyMemorySanitizer-stdout.txt | 2 + .../DummyPurify-result.txt} | 0 .../DummyPurify-stderr.txt} | 0 .../RunCMake/CTestMemcheck/DummyPurify-stdout.txt | 6 + .../CTestMemcheck/DummyPurifyNoLogFile-result.txt | 1 + .../CTestMemcheck/DummyPurifyNoLogFile-stderr.txt | 2 + .../CTestMemcheck/DummyPurifyNoLogFile-stdout.txt | 3 + .../CTestMemcheck/DummyThreadSanitizer-result.txt | 1 + .../CTestMemcheck/DummyThreadSanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyThreadSanitizer-stdout.txt | 13 + .../DummyUndefinedBehaviorSanitizer-result.txt | 1 + .../DummyUndefinedBehaviorSanitizer-stderr.txt | 2 + .../DummyUndefinedBehaviorSanitizer-stdout.txt | 2 + .../DummyValgrind-result.txt} | 0 .../DummyValgrind-stderr.txt} | 0 .../CTestMemcheck/DummyValgrind-stdout.txt | 6 + .../DummyValgrindCustomOptions-result.txt | 1 + .../DummyValgrindCustomOptions-stderr.txt | 2 + .../DummyValgrindCustomOptions-stdout.txt | 6 + .../CTestMemcheck/DummyValgrindFailPost-result.txt | 1 + .../CTestMemcheck/DummyValgrindFailPost-stderr.txt | 3 + .../CTestMemcheck/DummyValgrindFailPost-stdout.txt | 6 + .../CTestMemcheck/DummyValgrindFailPre-result.txt | 1 + .../CTestMemcheck/DummyValgrindFailPre-stderr.txt | 3 + .../CTestMemcheck/DummyValgrindFailPre-stdout.txt | 1 + .../DummyValgrindIgnoreMemcheck-result.txt} | 0 .../DummyValgrindIgnoreMemcheck-stderr.txt} | 0 .../DummyValgrindIgnoreMemcheck-stdout.txt | 7 + .../DummyValgrindInvalidSupFile-result.txt | 1 + .../DummyValgrindInvalidSupFile-stderr.txt | 2 + .../DummyValgrindInvalidSupFile-stdout.txt | 1 + .../DummyValgrindNoLogFile-result.txt | 1 + .../DummyValgrindNoLogFile-stderr.txt | 2 + .../DummyValgrindNoLogFile-stdout.txt | 3 + .../DummyValgrindPrePost-result.txt} | 0 .../DummyValgrindPrePost-stderr.txt} | 0 .../CTestMemcheck/DummyValgrindPrePost-stdout.txt | 6 + .../DummyValgrindTwoTargets-result.txt} | 0 .../DummyValgrindTwoTargets-stderr.txt} | 0 .../DummyValgrindTwoTargets-stdout.txt | 8 + .../NotExist-result.txt} | 0 Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt | 1 + Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt | 1 + Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake | 144 ++++++++++ Tests/RunCMake/CTestMemcheck/Unknown-result.txt | 1 + Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt | 2 + Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt | 1 + .../CTestMemcheck}/test.cmake.in | 12 +- .../CTestMemcheck}/testAddressSanitizer.cmake | 0 .../CTestMemcheck}/testLeakSanitizer.cmake | 0 .../CTestMemcheck}/testMemorySanitizer.cmake | 0 .../CTestMemcheck}/testThreadSanitizer.cmake | 0 .../testUndefinedBehaviorSanitizer.cmake | 0 77 files changed, 337 insertions(+), 301 deletions(-) create mode 100644 Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt rename Tests/{CTestTestMemcheck/NoLogDummyChecker => CMakeLib/PseudoMemcheck/NoLog}/CMakeLists.txt (100%) rename Tests/{CTestTestMemcheck => CMakeLib/PseudoMemcheck}/memtester.cxx.in (100%) delete mode 100644 Tests/CTestTestMemcheck/CMakeLists.txt rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/CMakeLists.txt.in (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/CTestConfig.cmake.in (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBC-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyPurify-result.txt} (100%) copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => CTestMemcheck/DummyPurify-stderr.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrind-result.txt} (100%) copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => CTestMemcheck/DummyValgrind-stderr.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt} (100%) copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrindPrePost-result.txt} (100%) copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => CTestMemcheck/DummyValgrindPrePost-stderr.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrindTwoTargets-result.txt} (100%) copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => CTestMemcheck/DummyValgrindTwoTargets-stderr.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/NotExist-result.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/CTestMemcheck/Unknown-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/test.cmake.in (60%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testAddressSanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testLeakSanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testMemorySanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testThreadSanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testUndefinedBehaviorSanitizer.cmake (100%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 16 14:42:32 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 16 Dec 2014 14:42:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1195-g708c33b Message-ID: <20141216194232.A3E4DA4CDE@public.kitware.com> This is an automated email from 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 708c33bbcc11707f9ac80829aff2556ca750d089 (commit) via ca67465742b141af67f7c00db3045af12f4663f1 (commit) from 602f6185809d86bbbb52c6db44092e46ac48475c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=708c33bbcc11707f9ac80829aff2556ca750d089 commit 708c33bbcc11707f9ac80829aff2556ca750d089 Merge: 602f618 ca67465 Author: Brad King AuthorDate: Tue Dec 16 14:42:32 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 16 14:42:32 2014 -0500 Merge topic 'remove-stray-source-file' into next ca674657 Tests: Remove stray source file (temporary change) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca67465742b141af67f7c00db3045af12f4663f1 commit ca67465742b141af67f7c00db3045af12f4663f1 Author: Brad King AuthorDate: Tue Dec 16 14:40:58 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 14:40:58 2014 -0500 Tests: Remove stray source file (temporary change) A few dashboard machines have failed the CheckSourceTree test since a stray file was accidentally left behind by one revision of a topic. Add code to remove this file. This change will not be merged to any branch except 'next'. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 33c18ce..7dc31d9 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3085,3 +3085,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(CMakeTests) endif() endif() + +# Remove a stray source file from a few dashboard machines. +file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/QtAutogen/autorcc_depends/res2_input.txt) ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 16 14:51:37 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 16 Dec 2014 14:51:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1198-gea807b0 Message-ID: <20141216195137.7A1E3A7F4B@public.kitware.com> This is an automated email from 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 ea807b0f7db7e6b7115e97bb9361d5de070798e1 (commit) via 2a3e263173e10de4a067a9de61318f6d6e0f0f17 (commit) via f30bac5eb47b06d90be57d9aa8f176eeba1c9152 (commit) from 708c33bbcc11707f9ac80829aff2556ca750d089 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea807b0f7db7e6b7115e97bb9361d5de070798e1 commit ea807b0f7db7e6b7115e97bb9361d5de070798e1 Merge: 708c33b 2a3e263 Author: Brad King AuthorDate: Tue Dec 16 14:51:36 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 16 14:51:36 2014 -0500 Merge topic 'test-CheckSourceTree-update' into next 2a3e2631 Tests: Fix CheckSourceTree test for newer Git f30bac5e CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a3e263173e10de4a067a9de61318f6d6e0f0f17 commit 2a3e263173e10de4a067a9de61318f6d6e0f0f17 Author: Brad King AuthorDate: Tue Dec 16 14:51:06 2014 -0500 Commit: Brad King CommitDate: Tue Dec 16 14:51:06 2014 -0500 Tests: Fix CheckSourceTree test for newer Git The output of 'git status' no longer starts each line in '#'. Match that optionally. diff --git a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in index 59b2890..33fe5f3 100644 --- a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in +++ b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in @@ -268,12 +268,12 @@ if(NOT ov STREQUAL "") if(consider) if(is_git_checkout) - if(line MATCHES "^#[ \t]*modified:") + if(line MATCHES "^#?[ \t]*modified:") message(" locally modified file detected...") set(modifications 1) endif() - if(line MATCHES "^# Untracked") + if(line MATCHES "^(# )?Untracked") message(" locally non-added file/directory detected...") set(nonadditions 1) endif() ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Tests/CMakeTests/CheckSourceTreeTest.cmake.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 17 00:01:11 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 17 Dec 2014 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-rc3-495-gddd193f Message-ID: <20141217050111.673EFA7E08@public.kitware.com> This is an automated email from 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 ddd193fcddbf7e81ffcd51a6e51227342a78cc4e (commit) from f30bac5eb47b06d90be57d9aa8f176eeba1c9152 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ddd193fcddbf7e81ffcd51a6e51227342a78cc4e commit ddd193fcddbf7e81ffcd51a6e51227342a78cc4e Author: Kitware Robot AuthorDate: Wed Dec 17 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Wed Dec 17 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a5a3c88..4f5fc38 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 1) -set(CMake_VERSION_PATCH 20141216) +set(CMake_VERSION_PATCH 20141217) #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 Dec 17 08:47:35 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 08:47:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1200-g7f64cc5 Message-ID: <20141217134735.24CFDA7691@public.kitware.com> This is an automated email from 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 7f64cc5880012743332070bc908fa875ede019e4 (commit) via cf3ca1fcdd31e7d0cf36e801d8dcd93b85a236f2 (commit) from ea807b0f7db7e6b7115e97bb9361d5de070798e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f64cc5880012743332070bc908fa875ede019e4 commit 7f64cc5880012743332070bc908fa875ede019e4 Merge: ea807b0 cf3ca1f Author: Brad King AuthorDate: Wed Dec 17 08:47:34 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 08:47:34 2014 -0500 Merge topic 'remove-stray-source-file' into next cf3ca1fc Tests: Remove stray source file (temporary change) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf3ca1fcdd31e7d0cf36e801d8dcd93b85a236f2 commit cf3ca1fcdd31e7d0cf36e801d8dcd93b85a236f2 Author: Brad King AuthorDate: Wed Dec 17 08:47:14 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 08:47:14 2014 -0500 Tests: Remove stray source file (temporary change) A few dashboard machines have failed the CheckSourceTree test since a stray file was accidentally left behind by one revision of a topic. Add code to remove this file. This change will not be merged to any branch except 'next'. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 7dc31d9..d2309f9 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3087,4 +3087,4 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() # Remove a stray source file from a few dashboard machines. -file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/QtAutogen/autorcc_depends/res2_input.txt) +file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/ExternalProjectUpdate/core) ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 09:30:19 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 09:30:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1202-g2177c44 Message-ID: <20141217143019.476F4A812F@public.kitware.com> This is an automated email from 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 2177c44cdbced14775ba1525c90f5d322b83dee4 (commit) via 84e0a079c5a03bd6d5c6be186b8c3ba8e443d53c (commit) from 7f64cc5880012743332070bc908fa875ede019e4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2177c44cdbced14775ba1525c90f5d322b83dee4 commit 2177c44cdbced14775ba1525c90f5d322b83dee4 Merge: 7f64cc5 84e0a07 Author: Brad King AuthorDate: Wed Dec 17 09:30:18 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 09:30:18 2014 -0500 Merge topic 'curl-darwinssl' into next 84e0a079 curl: DarwinSSL works on OS X 10.6 and above http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=84e0a079c5a03bd6d5c6be186b8c3ba8e443d53c commit 84e0a079c5a03bd6d5c6be186b8c3ba8e443d53c Author: Brad King AuthorDate: Wed Dec 17 09:29:18 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 09:29:18 2014 -0500 curl: DarwinSSL works on OS X 10.6 and above On 10.5 it fails to link _SecTrustSetAnchorCertificatesOnly and a few other symbols. diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 94aafb9..0db741e 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -475,7 +475,7 @@ elseif(APPLE) OUTPUT_STRIP_TRAILING_WHITESPACE ) endif() - if(NOT OSX_VERSION VERSION_LESS 10.5 AND + if(NOT OSX_VERSION VERSION_LESS 10.6 AND CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang") add_definitions(-DUSE_DARWINSSL) list(APPEND CURL_LIBS ----------------------------------------------------------------------- Summary of changes: Utilities/cmcurl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 09:44:12 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 09:44:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1204-g4a06460 Message-ID: <20141217144412.B3DEAA5C4B@public.kitware.com> This is an automated email from 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 4a06460d9878b869037bda40dcec1fd7515e0942 (commit) via 947464f337201fffcfd205c0f0ef39c1d2d00dde (commit) from 2177c44cdbced14775ba1525c90f5d322b83dee4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a06460d9878b869037bda40dcec1fd7515e0942 commit 4a06460d9878b869037bda40dcec1fd7515e0942 Merge: 2177c44 947464f Author: Brad King AuthorDate: Wed Dec 17 09:44:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 09:44:11 2014 -0500 Merge topic 'test-memcheck-with-RunCMake' into next 947464f3 Tests: Fix RunCMake.CTestMemcheck matching of guard malloc lines http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=947464f337201fffcfd205c0f0ef39c1d2d00dde commit 947464f337201fffcfd205c0f0ef39c1d2d00dde Author: Brad King AuthorDate: Wed Dec 17 09:41:17 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 09:41:17 2014 -0500 Tests: Fix RunCMake.CTestMemcheck matching of guard malloc lines They appear in stderr, not stdout, and '\n' cannot be used to encode a newline in the expectation file regex syntax. diff --git a/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt index 360bec5..5829613 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt @@ -1,3 +1,3 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt index 360bec5..5829613 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt @@ -1,3 +1,3 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt index 10f3293..14bc228 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt @@ -1 +1,3 @@ -^$ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt index ccd0acc..dabb004 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt @@ -1,6 +1,6 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 .* -- Processing memory checking output:( ) -(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt index 360bec5..5829613 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt @@ -1,3 +1,3 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt index 10f3293..14bc228 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt @@ -1 +1,3 @@ -^$ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt index ccd0acc..dabb004 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt @@ -1,6 +1,6 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 .* -- Processing memory checking output:( ) -(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt index ccd0acc..dabb004 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt @@ -1,6 +1,6 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 .* -- Processing memory checking output:( ) -(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt index ccd0acc..dabb004 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt @@ -1,6 +1,6 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 .* -- Processing memory checking output:( ) -(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt index 10f3293..14bc228 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt @@ -1 +1,3 @@ -^$ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt index 0eedce8..5a5675c 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt @@ -1,7 +1,7 @@ 2/2 Test #2: RunCMakeAgain .* 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 .* -- Processing memory checking output:( ) -(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt index 360bec5..5829613 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt @@ -1,3 +1,3 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt index 10f3293..14bc228 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt @@ -1 +1,3 @@ -^$ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt index ccd0acc..dabb004 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt @@ -1,6 +1,6 @@ 1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec -(ctest\([0-9]+\) malloc: [^\n]*\n)* + 100% tests passed, 0 tests failed out of 1 .* -- Processing memory checking output:( ) -(ctest\([0-9]+\) malloc: [^\n]*\n)*Memory checking results: +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt index 10f3293..14bc228 100644 --- a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt @@ -1 +1,3 @@ -^$ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt | 2 +- Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt | 2 +- Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt | 4 +++- Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt | 4 ++-- Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt | 2 +- Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt | 4 +++- Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt | 4 ++-- Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt | 4 ++-- Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt | 4 ++-- .../RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt | 4 +++- .../RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt | 4 ++-- Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt | 2 +- Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt | 4 +++- Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt | 4 ++-- Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt | 4 +++- 15 files changed, 31 insertions(+), 21 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 11:01:26 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 11:01:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1207-g12c1121 Message-ID: <20141217160126.497F3A8294@public.kitware.com> This is an automated email from 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 12c11218568d9e2b9b40198813a058ed577b5577 (commit) via 1b28e3b28b86de40ceb6d402b6f41f30eb0c8b59 (commit) via ddd193fcddbf7e81ffcd51a6e51227342a78cc4e (commit) from 4a06460d9878b869037bda40dcec1fd7515e0942 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12c11218568d9e2b9b40198813a058ed577b5577 commit 12c11218568d9e2b9b40198813a058ed577b5577 Merge: 4a06460 1b28e3b Author: Brad King AuthorDate: Wed Dec 17 11:01:24 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 11:01:24 2014 -0500 Merge topic 'add-FindGSL' into next 1b28e3b2 FindGSL: Add module to find the GNU Scientific Library ddd193fc CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b28e3b28b86de40ceb6d402b6f41f30eb0c8b59 commit 1b28e3b28b86de40ceb6d402b6f41f30eb0c8b59 Author: Kelly Thompson AuthorDate: Wed Dec 17 10:10:23 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 10:59:48 2014 -0500 FindGSL: Add module to find the GNU Scientific Library diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 8337118..5196485 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -108,6 +108,7 @@ All Modules /module/FindGLUT /module/FindGnuplot /module/FindGnuTLS + /module/FindGSL /module/FindGTest /module/FindGTK2 /module/FindGTK diff --git a/Help/module/FindGSL.rst b/Help/module/FindGSL.rst new file mode 100644 index 0000000..baf2213 --- /dev/null +++ b/Help/module/FindGSL.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/FindGSL.cmake diff --git a/Help/release/dev/add-FindGSL.rst b/Help/release/dev/add-FindGSL.rst new file mode 100644 index 0000000..47a0a25 --- /dev/null +++ b/Help/release/dev/add-FindGSL.rst @@ -0,0 +1,5 @@ +add-FindGSL +----------- + +* A :module:`FindGSL` module was introduced to find the + GNU Scientific Library. diff --git a/Modules/FindGSL.cmake b/Modules/FindGSL.cmake new file mode 100644 index 0000000..ef125c0 --- /dev/null +++ b/Modules/FindGSL.cmake @@ -0,0 +1,238 @@ +#.rst: +# FindGSL +# -------- +# +# Find the native GSL includes and libraries. +# +# The GNU Scientific Library (GSL) is a numerical library for C and C++ +# programmers. It is free software under the GNU General Public +# License. +# +# Imported Targets +# ^^^^^^^^^^^^^^^^ +# +# If GSL is found, this module defines the following :prop_tgt:`IMPORTED` +# targets:: +# +# GSL::gsl - The main GSL library. +# GSL::gslcblas - The CBLAS support library used by GSL. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module will set the following variables in your project:: +# +# GSL_FOUND - True if GSL found on the local system +# GSL_INCLUDE_DIRS - Location of GSL header files. +# GSL_LIBRARIES - The GSL libraries. +# GSL_VERSION - The version of the discovered GSL install. +# +# Hints +# ^^^^^ +# +# Set ``GSL_ROOT_DIR`` to a directory that contains a GSL installation. +# +# This script expects to find libraries at ``$GSL_ROOT_DIR/lib`` and the GSL +# headers at ``$GSL_ROOT_DIR/include/gsl``. The library directory may +# optionally provide Release and Debug folders. For Unix-like systems, this +# script will use ``$GSL_ROOT_DIR/bin/gsl-config`` (if found) to aid in the +# discovery GSL. +# +# Cache Variables +# ^^^^^^^^^^^^^^^ +# +# This module may set the following variables depending on platform and type +# of GSL installation discovered. These variables may optionally be set to +# help this module find the correct files:: +# +# GSL_CLBAS_LIBRARY - Location of the GSL CBLAS library. +# GSL_CBLAS_LIBRARY_DEBUG - Location of the debug GSL CBLAS library (if any). +# GSL_CONFIG_EXECUTABLE - Location of the ``gsl-config`` script (if any). +# GSL_LIBRARY - Location of the GSL library. +# GSL_LIBRARY_DEBUG - Location of the debug GSL library (if any). +# + +#============================================================================= +# Copyright 2014 Kelly Thompson +# +# 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. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# Include these modules to handle the QUIETLY and REQUIRED arguments. +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + +#============================================================================= +# If the user has provided ``GSL_ROOT_DIR``, use it! Choose items found +# at this location over system locations. +if( EXISTS "$ENV{GSL_ROOT_DIR}" ) + file( TO_CMAKE_PATH "$ENV{GSL_ROOT_DIR}" GSL_ROOT_DIR ) + set( GSL_ROOT_DIR "${GSL_ROOT_DIR}" CACHE PATH "Prefix for GSL installation." ) +endif() +if( NOT EXISTS "${GSL_ROOT_DIR}" ) + set( GSL_USE_PKGCONFIG ON ) +endif() + +#============================================================================= +# As a first try, use the PkgConfig module. This will work on many +# *NIX systems. See :module:`findpkgconfig` +# This will return ``GSL_INCLUDEDIR`` and ``GSL_LIBDIR`` used below. +if( GSL_USE_PKGCONFIG ) + find_package(PkgConfig) + pkg_check_modules( GSL QUIET gsl ) + + if( EXISTS "${GSL_INCLUDEDIR}" ) + get_filename_component( GSL_ROOT_DIR "${GSL_INCLUDEDIR}" DIRECTORY CACHE) + endif() +endif() + +#============================================================================= +# Set GSL_INCLUDE_DIRS and GSL_LIBRARIES. If we skipped the PkgConfig step, try +# to find the libraries at $GSL_ROOT_DIR (if provided) or in standard system +# locations. These find_library and find_path calls will prefer custom +# locations over standard locations (HINTS). If the requested file is not found +# at the HINTS location, standard system locations will be still be searched +# (/usr/lib64 (Redhat), lib/i386-linux-gnu (Debian)). + +find_path( GSL_INCLUDE_DIR + NAMES gsl/gsl_sf.h + HINTS ${GSL_ROOT_DIR}/include ${GSL_INCLUDEDIR} +) +find_library( GSL_LIBRARY + NAMES gsl + HINTS ${GSL_ROOT_DIR}/lib ${GSL_LIBDIR} + PATH_SUFFIXES Release Debug +) +find_library( GSL_CBLAS_LIBRARY + NAMES gslcblas cblas + HINTS ${GSL_ROOT_DIR}/lib ${GSL_LIBDIR} + PATH_SUFFIXES Release Debug +) +# Do we also have debug versions? +find_library( GSL_LIBRARY_DEBUG + NAMES gsl + HINTS ${GSL_ROOT_DIR}/lib ${GSL_LIBDIR} + PATH_SUFFIXES Debug +) +find_library( GSL_CBLAS_LIBRARY_DEBUG + NAMES gslcblas cblas + HINTS ${GSL_ROOT_DIR}/lib ${GSL_LIBDIR} + PATH_SUFFIXES Debug +) +set( GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} ) +set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} ) + +# If we didn't use PkgConfig, try to find the version via gsl-config or by +# reading gsl_version.h. +if( NOT GSL_VERSION ) + # 1. If gsl-config exists, query for the version. + find_program( GSL_CONFIG_EXECUTABLE + NAMES gsl-config + HINTS "${GSL_ROOT_DIR}/bin" + ) + if( EXISTS "${GSL_CONFIG_EXECUTABLE}" ) + execute_process( + COMMAND "${GSL_CONFIG_EXECUTABLE}" --version + OUTPUT_VARIABLE GSL_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE ) + endif() + + # 2. If gsl-config is not available, try looking in gsl/gsl_version.h + if( NOT GSL_VERSION AND EXISTS "${GSL_INCLUDE_DIRS}/gsl/gsl_version.h" ) + file( STRINGS "${GSL_INCLUDE_DIRS}/gsl/gsl_version.h" gsl_version_h_contents REGEX "define GSL_VERSION" ) + string( REGEX REPLACE ".*([0-9].[0-9][0-9]).*" "\\1" GSL_VERSION ${gsl_version_h_contents} ) + endif() + + # might also try scraping the directory name for a regex match "gsl-X.X" +endif() + +#============================================================================= +# handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE if all +# listed variables are TRUE +find_package_handle_standard_args( GSL + FOUND_VAR + GSL_FOUND + REQUIRED_VARS + GSL_INCLUDE_DIR + GSL_LIBRARY + GSL_CBLAS_LIBRARY + VERSION_VAR + GSL_VERSION + ) + +mark_as_advanced( GSL_ROOT_DIR GSL_VERSION GSL_LIBRARY GSL_INCLUDE_DIR + GSL_CBLAS_LIBRARY GSL_LIBRARY_DEBUG GSL_CBLAS_LIBRARY_DEBUG + GSL_USE_PKGCONFIG GSL_CONFIG ) + +#============================================================================= +# Register imported libraries: +# 1. If we can find a Windows .dll file (or if we can find both Debug and +# Release libraries), we will set appropriate target properties for these. +# 2. However, for most systems, we will only register the import location and +# include directory. + +# Look for dlls, or Release and Debug libraries. +if(WIN32) + string( REPLACE ".lib" ".dll" GSL_LIBRARY_DLL "${GSL_LIBRARY}" ) + string( REPLACE ".lib" ".dll" GSL_CBLAS_LIBRARY_DLL "${GSL_CBLAS_LIBRARY}" ) + string( REPLACE ".lib" ".dll" GSL_LIBRARY_DEBUG_DLL "${GSL_LIBRARY_DEBUG}" ) + string( REPLACE ".lib" ".dll" GSL_CBLAS_LIBRARY_DEBUG_DLL "${GSL_CBLAS_LIBRARY_DEBUG}" ) +endif() + +if( GSL_FOUND AND NOT TARGET GSL::gsl ) + if( EXISTS "${GSL_LIBRARY_DLL}" AND EXISTS "${GSL_CBLAS_LIBRARY_DLL}") + + # Windows systems with dll libraries. + add_library( GSL::gsl SHARED IMPORTED ) + add_library( GSL::gslcblas SHARED IMPORTED ) + + # Windows with dlls, but only Release libraries. + set_target_properties( GSL::gslcblas PROPERTIES + IMPORTED_LOCATION_RELEASE "${GSL_CBLAS_LIBRARY_DLL}" + IMPORTED_IMPLIB "${GSL_CBLAS_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${GSL_INCLUDE_DIRS}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + set_target_properties( GSL::gsl PROPERTIES + IMPORTED_LOCATION_RELEASE "${GSL_LIBRARY_DLL}" + IMPORTED_IMPLIB "${GSL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${GSL_INCLUDE_DIRS}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + INTERFACE_LINK_LIBRARIES GSL::gslcblas ) + + # If we have both Debug and Release libraries + if( EXISTS "${GSL_LIBRARY_DEBUG_DLL}" AND EXISTS "${GSL_CBLAS_LIBRARY_DEBUG_DLL}") + set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gslcblas PROPERTIES + IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" ) + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gsl PROPERTIES + IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${GSL_LIBRARY_DEBUG}" ) + endif() + + else() + + # For all other environments (ones without dll libraries), create + # the imported library targets. + add_library( GSL::gsl UNKNOWN IMPORTED ) + add_library( GSL::gslcblas UNKNOWN IMPORTED ) + set_target_properties( GSL::gslcblas PROPERTIES + IMPORTED_LOCATION "${GSL_CBLAS_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${GSL_INCLUDE_DIRS}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + set_target_properties( GSL::gsl PROPERTIES + IMPORTED_LOCATION "${GSL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${GSL_INCLUDE_DIRS}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + INTERFACE_LINK_LIBRARIES GSL::gslcblas ) + endif() +endif() diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 33c18ce..123e5fd 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1247,6 +1247,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() endif() + if(CMake_TEST_FindGSL) + add_subdirectory(FindGSL) + endif() + find_package(GTK2 QUIET) if(GTK2_FOUND) add_subdirectory(FindGTK2) diff --git a/Tests/FindGSL/CMakeLists.txt b/Tests/FindGSL/CMakeLists.txt new file mode 100644 index 0000000..45a3471 --- /dev/null +++ b/Tests/FindGSL/CMakeLists.txt @@ -0,0 +1,9 @@ +add_test(NAME FindGSL.rng COMMAND ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindGSL/rng" + "${CMake_BINARY_DIR}/Tests/FindGSL/rng" + ${build_generator_args} + --build-project FindGSL_rng + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V + ) diff --git a/Tests/FindGSL/rng/CMakeLists.txt b/Tests/FindGSL/rng/CMakeLists.txt new file mode 100644 index 0000000..b15d6ac --- /dev/null +++ b/Tests/FindGSL/rng/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0) +project(FindGSL_rng CXX) +include(CTest) + +find_package(GSL REQUIRED) + +add_executable(tstgslrng_tgt main.cc) +target_link_libraries(tstgslrng_tgt GSL::gsl) +add_test(NAME tstgslrng_tgt COMMAND tstgslrng_tgt) + +add_executable(tstgslrng_var main.cc) +target_link_libraries(tstgslrng_var ${GSL_LIBRARIES}) +target_include_directories(tstgslrng_var PRIVATE ${GSL_INCLUDE_DIRS}) +add_test(NAME tstgslrng_var COMMAND tstgslrng_var) diff --git a/Tests/FindGSL/rng/main.cc b/Tests/FindGSL/rng/main.cc new file mode 100644 index 0000000..72543be --- /dev/null +++ b/Tests/FindGSL/rng/main.cc @@ -0,0 +1,24 @@ +#include +#include "gsl/gsl_rng.h" + +int main() +{ + // return code + int retval = 1; + + // create a generator + gsl_rng *generator; + generator = gsl_rng_alloc(gsl_rng_mt19937); + + // Read a value. + double const Result = gsl_rng_uniform(generator); + + // Check value + double const expectedResult( 0.999741748906672 ); + if( fabs( expectedResult - Result ) < 1.0e-6 ) + retval = 0; + + // free allocated memory + gsl_rng_free(generator); + return retval; +} ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 1 + Help/module/FindGSL.rst | 1 + Help/release/dev/add-FindGSL.rst | 5 + Modules/FindGSL.cmake | 238 ++++++++++++++++++++++++++++++++++++++ Source/CMakeVersion.cmake | 2 +- Tests/CMakeLists.txt | 4 + Tests/FindGSL/CMakeLists.txt | 9 ++ Tests/FindGSL/rng/CMakeLists.txt | 14 +++ Tests/FindGSL/rng/main.cc | 24 ++++ 9 files changed, 297 insertions(+), 1 deletion(-) create mode 100644 Help/module/FindGSL.rst create mode 100644 Help/release/dev/add-FindGSL.rst create mode 100644 Modules/FindGSL.cmake create mode 100644 Tests/FindGSL/CMakeLists.txt create mode 100644 Tests/FindGSL/rng/CMakeLists.txt create mode 100644 Tests/FindGSL/rng/main.cc hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 11:18:00 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 11:18:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1209-gd43b20f Message-ID: <20141217161800.1D4FDA7401@public.kitware.com> This is an automated email from 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 d43b20fb1b6c136548bd60acb74df1cc71d3a8fc (commit) via eeaa25e52144626dc76717dea37af3b8d20cb171 (commit) from 12c11218568d9e2b9b40198813a058ed577b5577 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d43b20fb1b6c136548bd60acb74df1cc71d3a8fc commit d43b20fb1b6c136548bd60acb74df1cc71d3a8fc Merge: 12c1121 eeaa25e Author: Brad King AuthorDate: Wed Dec 17 11:17:58 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 11:17:58 2014 -0500 Merge topic 'vs-nsight-tegra-min-api' into next eeaa25e5 Add 'ANDROID_API_MIN' target property to set Android Target MIN API http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eeaa25e52144626dc76717dea37af3b8d20cb171 commit eeaa25e52144626dc76717dea37af3b8d20cb171 Author: Dmitry Polyanitsa AuthorDate: Wed Dec 17 17:11:51 2014 +0300 Commit: Brad King CommitDate: Wed Dec 17 11:17:28 2014 -0500 Add 'ANDROID_API_MIN' target property to set Android Target MIN API Also add a 'CMAKE_ANDROID_API_MIN' variable to set the property default. Teach the VS generator to write the MIN API value into Nsight Tegra project files. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index cca6d28..68954c5 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -80,6 +80,7 @@ Properties on Targets /prop_tgt/ALIASED_TARGET /prop_tgt/ANDROID_API + /prop_tgt/ANDROID_API_MIN /prop_tgt/ANDROID_GUI /prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG /prop_tgt/ARCHIVE_OUTPUT_DIRECTORY diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst index 44ffb3b..054438d 100644 --- a/Help/manual/cmake-toolchains.7.rst +++ b/Help/manual/cmake-toolchains.7.rst @@ -256,5 +256,6 @@ like this: The :variable:`CMAKE_GENERATOR_TOOLSET` may be set to select the Nsight Tegra "Toolchain Version" value. -See the :prop_tgt:`ANDROID_API` and :prop_tgt:`ANDROID_GUI` -target properties to configure targets within the project. +See the :prop_tgt:`ANDROID_API_MIN`, :prop_tgt:`ANDROID_API` +and :prop_tgt:`ANDROID_GUI` target properties to configure +targets within the project. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 2de4103..4d54075 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -206,6 +206,7 @@ Variables that Control the Build :maxdepth: 1 /variable/CMAKE_ANDROID_API + /variable/CMAKE_ANDROID_API_MIN /variable/CMAKE_ANDROID_GUI /variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY /variable/CMAKE_AUTOMOC_MOC_OPTIONS diff --git a/Help/prop_tgt/ANDROID_API_MIN.rst b/Help/prop_tgt/ANDROID_API_MIN.rst new file mode 100644 index 0000000..773ab3f --- /dev/null +++ b/Help/prop_tgt/ANDROID_API_MIN.rst @@ -0,0 +1,7 @@ +ANDROID_API_MIN +--------------- + +Set the Android MIN API version (e.g. ``9``). The version number +must be a positive decimal integer. This property is initialized by +the value of the :variable:`CMAKE_ANDROID_API_MIN` variable if it is set +when a target is created. Native code builds using this API version. diff --git a/Help/release/dev/vs-nsight-tegra-min-api.rst b/Help/release/dev/vs-nsight-tegra-min-api.rst new file mode 100644 index 0000000..f8fa056 --- /dev/null +++ b/Help/release/dev/vs-nsight-tegra-min-api.rst @@ -0,0 +1,5 @@ +vs-nsight-tegra-min-api +----------------------- + +* A :prop_tgt:`ANDROID_API_MIN` target property was introduced to + specify the minimum version to be targeted by the toolchain. diff --git a/Help/variable/CMAKE_ANDROID_API_MIN.rst b/Help/variable/CMAKE_ANDROID_API_MIN.rst new file mode 100644 index 0000000..0246c75 --- /dev/null +++ b/Help/variable/CMAKE_ANDROID_API_MIN.rst @@ -0,0 +1,5 @@ +CMAKE_ANDROID_API_MIN +--------------------- + +Default value for the :prop_tgt:`ANDROID_API_MIN` target property. +See that target property for additional information. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 37aa26e..865a824 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -325,6 +325,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY) { this->SetPropertyDefault("ANDROID_API", 0); + this->SetPropertyDefault("ANDROID_API_MIN", 0); this->SetPropertyDefault("INSTALL_NAME_DIR", 0); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index f903bdb..b265c0e 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -748,6 +748,12 @@ void cmVisualStudio10TargetGenerator ntv += toolset? toolset : "Default"; ntv += "\n"; this->WriteString(ntv.c_str(), 2); + if(const char* minApi = this->Target->GetProperty("ANDROID_API_MIN")) + { + this->WriteString("", 2); + (*this->BuildFileStream ) << + "android-" << cmVS10EscapeXML(minApi) << "\n"; + } if(const char* api = this->Target->GetProperty("ANDROID_API")) { this->WriteString("", 2); diff --git a/Tests/VSNsightTegra/CMakeLists.txt b/Tests/VSNsightTegra/CMakeLists.txt index 570733b..10f55d9 100644 --- a/Tests/VSNsightTegra/CMakeLists.txt +++ b/Tests/VSNsightTegra/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(VSNsightTegra C CXX) +set(CMAKE_ANDROID_API_MIN 9) set(CMAKE_ANDROID_API 15) set(CMAKE_ANDROID_GUI 1) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/manual/cmake-toolchains.7.rst | 5 +++-- Help/manual/cmake-variables.7.rst | 1 + Help/prop_tgt/ANDROID_API_MIN.rst | 7 +++++++ Help/release/dev/vs-nsight-tegra-min-api.rst | 5 +++++ Help/variable/CMAKE_ANDROID_API_MIN.rst | 5 +++++ Source/cmTarget.cxx | 1 + Source/cmVisualStudio10TargetGenerator.cxx | 6 ++++++ Tests/VSNsightTegra/CMakeLists.txt | 1 + 9 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 Help/prop_tgt/ANDROID_API_MIN.rst create mode 100644 Help/release/dev/vs-nsight-tegra-min-api.rst create mode 100644 Help/variable/CMAKE_ANDROID_API_MIN.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 11:46:31 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 11:46:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1213-g23fefd0 Message-ID: <20141217164631.AC019A7659@public.kitware.com> This is an automated email from 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 23fefd0ba3d758fd095b2e662ade88df2350a520 (commit) via e02814d487a0e8ab58d8358991eada7adca14cb2 (commit) via 3a605693a5349a252bb9c3eb472d02b1c23886e3 (commit) via 207b7af00be53f0779c4896f311f130455d3aadd (commit) from d43b20fb1b6c136548bd60acb74df1cc71d3a8fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23fefd0ba3d758fd095b2e662ade88df2350a520 commit 23fefd0ba3d758fd095b2e662ade88df2350a520 Merge: d43b20f e02814d Author: Brad King AuthorDate: Wed Dec 17 11:46:30 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 11:46:30 2014 -0500 Merge topic 'osx-cfbundle-tweaks' into next e02814d4 Tests: Run CFBundleTest only with valid configuration 3a605693 Xcode: Call IsCFBundleOnApple to decide if bundle is being built 207b7af0 cmTarget: Use GetCFBundleDirectory within GetFullNameInternal http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e02814d487a0e8ab58d8358991eada7adca14cb2 commit e02814d487a0e8ab58d8358991eada7adca14cb2 Author: Brad King AuthorDate: Wed Dec 17 11:42:19 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 11:42:32 2014 -0500 Tests: Run CFBundleTest only with valid configuration The verification script needs to know the configuration tested. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 33c18ce..87ab29e 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1935,7 +1935,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest") - add_test(CFBundleTest ${CMAKE_CTEST_COMMAND} + add_test(NAME CFBundleTest COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/CFBundleTest" "${CMake_BINARY_DIR}/Tests/CFBundleTest" @@ -1944,7 +1944,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --build-project CFBundleTest --build-options ${build_options} --test-command - ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE} + ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=$ -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest -Dgen=${CMAKE_GENERATOR} -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a605693a5349a252bb9c3eb472d02b1c23886e3 commit 3a605693a5349a252bb9c3eb472d02b1c23886e3 Author: Gregor Jasny AuthorDate: Tue Dec 16 22:22:08 2014 +0100 Commit: Brad King CommitDate: Wed Dec 17 11:26:10 2014 -0500 Xcode: Call IsCFBundleOnApple to decide if bundle is being built Narrow down the decision if a CFBundle is built to one place. This is a preparation patch to add another target property which, if set, will imply BUNDLE. Having only one function which will have to look at both properties helps to keep code clean. Signed-off-by: Gregor Jasny diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index de6e915..6a480a9 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1925,7 +1925,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, { buildSettings->AddAttribute("LIBRARY_STYLE", this->CreateString("BUNDLE")); - if (target.GetPropertyAsBool("BUNDLE")) + if (target.IsCFBundleOnApple()) { // It turns out that a BUNDLE is basically the same // in many ways as an application bundle, as far as http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=207b7af00be53f0779c4896f311f130455d3aadd commit 207b7af00be53f0779c4896f311f130455d3aadd Author: Gregor Jasny AuthorDate: Tue Dec 16 22:22:07 2014 +0100 Commit: Brad King CommitDate: Wed Dec 17 11:24:02 2014 -0500 cmTarget: Use GetCFBundleDirectory within GetFullNameInternal Replace duplicated code by call to GetCFBundleDirectory. Signed-off-by: Gregor Jasny diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 37aa26e..9c4801e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4056,15 +4056,8 @@ void cmTarget::GetFullNameInternal(const std::string& config, if(this->IsCFBundleOnApple()) { - fw_prefix = this->GetOutputName(config, false); - fw_prefix += "."; - const char *ext = this->GetProperty("BUNDLE_EXTENSION"); - if (!ext) - { - ext = "bundle"; - } - fw_prefix += ext; - fw_prefix += "/Contents/MacOS/"; + fw_prefix = this->GetCFBundleDirectory(config, false); + fw_prefix += "/"; targetPrefix = fw_prefix.c_str(); targetSuffix = 0; } ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmTarget.cxx | 11 ++--------- Tests/CMakeLists.txt | 4 ++-- 3 files changed, 5 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 13:55:43 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 13:55:43 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1215-g865ed26 Message-ID: <20141217185543.02F99A8170@public.kitware.com> This is an automated email from 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 865ed261e6f50705f4db55e7d9a193af08d7f8b9 (commit) via d4d2d72f5d28e044d18ff5479ee55d872c9c5746 (commit) from 23fefd0ba3d758fd095b2e662ade88df2350a520 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=865ed261e6f50705f4db55e7d9a193af08d7f8b9 commit 865ed261e6f50705f4db55e7d9a193af08d7f8b9 Merge: 23fefd0 d4d2d72 Author: Brad King AuthorDate: Wed Dec 17 13:55:42 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 13:55:42 2014 -0500 Merge topic 'fix-sha2-cast-constness' into next d4d2d72f sha2: Fix -Wcast-qual warnings by adding const to some casts http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4d2d72f5d28e044d18ff5479ee55d872c9c5746 commit d4d2d72f5d28e044d18ff5479ee55d872c9c5746 Author: Sean McBride AuthorDate: Wed Dec 17 11:59:21 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 13:53:04 2014 -0500 sha2: Fix -Wcast-qual warnings by adding const to some casts diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c index 4738920..b90e060 100644 --- a/Source/cm_sha2.c +++ b/Source/cm_sha2.c @@ -663,7 +663,7 @@ void SHA1_Update(SHA_CTX* context, const sha_byte *data, size_t len) { context->s1.bitcount += freespace << 3; len -= freespace; data += freespace; - SHA1_Internal_Transform(context, (sha_word32*)context->s1.buffer); + SHA1_Internal_Transform(context, (const sha_word32*)context->s1.buffer); } else { /* The buffer is not yet full */ MEMCPY_BCOPY(&context->s1.buffer[usedspace], data, len); @@ -675,7 +675,7 @@ void SHA1_Update(SHA_CTX* context, const sha_byte *data, size_t len) { } while (len >= 64) { /* Process as many complete blocks as we can */ - SHA1_Internal_Transform(context, (sha_word32*)data); + SHA1_Internal_Transform(context, (const sha_word32*)data); context->s1.bitcount += 512; len -= 64; data += 64; @@ -724,7 +724,7 @@ void SHA1_Final(sha_byte digest[], SHA_CTX* context) { MEMSET_BZERO(&context->s1.buffer[usedspace], 64 - usedspace); } /* Do second-to-last transform: */ - SHA1_Internal_Transform(context, (sha_word32*)context->s1.buffer); + SHA1_Internal_Transform(context, (const sha_word32*)context->s1.buffer); /* And set-up for the last transform: */ MEMSET_BZERO(context->s1.buffer, 56); @@ -741,7 +741,7 @@ void SHA1_Final(sha_byte digest[], SHA_CTX* context) { sizeof(sha_word64)); /* Final transform: */ - SHA1_Internal_Transform(context, (sha_word32*)context->s1.buffer); + SHA1_Internal_Transform(context, (const sha_word32*)context->s1.buffer); /* Save the hash data for output: */ #if BYTE_ORDER == LITTLE_ENDIAN @@ -1004,7 +1004,7 @@ void SHA256_Update(SHA_CTX* context, const sha_byte *data, size_t len) { context->s256.bitcount += freespace << 3; len -= freespace; data += freespace; - SHA256_Internal_Transform(context, (sha_word32*)context->s256.buffer); + SHA256_Internal_Transform(context, (const sha_word32*)context->s256.buffer); } else { /* The buffer is not yet full */ MEMCPY_BCOPY(&context->s256.buffer[usedspace], data, len); @@ -1016,7 +1016,7 @@ void SHA256_Update(SHA_CTX* context, const sha_byte *data, size_t len) { } while (len >= 64) { /* Process as many complete blocks as we can */ - SHA256_Internal_Transform(context, (sha_word32*)data); + SHA256_Internal_Transform(context, (const sha_word32*)data); context->s256.bitcount += 512; len -= 64; data += 64; @@ -1050,7 +1050,7 @@ void SHA256_Internal_Last(SHA_CTX* context) { MEMSET_BZERO(&context->s256.buffer[usedspace], 64 - usedspace); } /* Do second-to-last transform: */ - SHA256_Internal_Transform(context, (sha_word32*)context->s256.buffer); + SHA256_Internal_Transform(context, (const sha_word32*)context->s256.buffer); /* And set-up for the last transform: */ MEMSET_BZERO(context->s256.buffer, 56); @@ -1069,7 +1069,7 @@ void SHA256_Internal_Last(SHA_CTX* context) { sizeof(sha_word64)); /* Final transform: */ - SHA256_Internal_Transform(context, (sha_word32*)context->s256.buffer); + SHA256_Internal_Transform(context, (const sha_word32*)context->s256.buffer); } void SHA256_Final(sha_byte digest[], SHA_CTX* context) { @@ -1412,7 +1412,7 @@ void SHA512_Update(SHA_CTX* context, const sha_byte *data, size_t len) { ADDINC128(context->s512.bitcount, freespace << 3); len -= freespace; data += freespace; - SHA512_Internal_Transform(context, (sha_word64*)context->s512.buffer); + SHA512_Internal_Transform(context, (const sha_word64*)context->s512.buffer); } else { /* The buffer is not yet full */ MEMCPY_BCOPY(&context->s512.buffer[usedspace], data, len); @@ -1424,7 +1424,7 @@ void SHA512_Update(SHA_CTX* context, const sha_byte *data, size_t len) { } while (len >= 128) { /* Process as many complete blocks as we can */ - SHA512_Internal_Transform(context, (sha_word64*)data); + SHA512_Internal_Transform(context, (const sha_word64*)data); ADDINC128(context->s512.bitcount, 1024); len -= 128; data += 128; @@ -1459,7 +1459,7 @@ void SHA512_Internal_Last(SHA_CTX* context) { MEMSET_BZERO(&context->s512.buffer[usedspace], 128 - usedspace); } /* Do second-to-last transform: */ - SHA512_Internal_Transform(context, (sha_word64*)context->s512.buffer); + SHA512_Internal_Transform(context, (const sha_word64*)context->s512.buffer); /* And set-up for the last transform: */ MEMSET_BZERO(context->s512.buffer, 112); @@ -1480,7 +1480,7 @@ void SHA512_Internal_Last(SHA_CTX* context) { sizeof(sha_word64)); /* Final transform: */ - SHA512_Internal_Transform(context, (sha_word64*)context->s512.buffer); + SHA512_Internal_Transform(context, (const sha_word64*)context->s512.buffer); } void SHA512_Final(sha_byte digest[], SHA_CTX* context) { ----------------------------------------------------------------------- Summary of changes: Source/cm_sha2.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:05:44 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:05:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-492-g1dc6f6f Message-ID: <20141217190544.BA2B8A83DF@public.kitware.com> This is an automated email from 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 1dc6f6f8a18be8e9eaaf7e114c47c9d30c352ffd (commit) via c118816d44e178e4364a0c32aaece81a14511237 (commit) from ddd193fcddbf7e81ffcd51a6e51227342a78cc4e (commit) Those revisions listed 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 Dec 17 14:05:44 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:05:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1212-ga455b56 Message-ID: <20141217190544.E9242A83F8@public.kitware.com> This is an automated email from 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 a455b5672fa1c61183bb8876de727731c22ed4a3 (commit) via 1dc6f6f8a18be8e9eaaf7e114c47c9d30c352ffd (commit) from 865ed261e6f50705f4db55e7d9a193af08d7f8b9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a455b5672fa1c61183bb8876de727731c22ed4a3 commit a455b5672fa1c61183bb8876de727731c22ed4a3 Merge: 865ed26 1dc6f6f Author: Brad King AuthorDate: Wed Dec 17 14:05:20 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 14:05:20 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:05:45 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:05:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0 Message-ID: <20141217190545.03852A83FA@public.kitware.com> This is an automated email from 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 c118816d44e178e4364a0c32aaece81a14511237 (commit) from 0dd9e7173d43251fa4aca0846d85911cc7e84d2a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:05:45 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:05:45 -0500 (EST) Subject: [Cmake-commits] CMake annotated tag, v3.1.0, created. v3.1.0 Message-ID: <20141217190545.1B73AA83FA@public.kitware.com> This is an automated email 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.1.0 has been created at 84135f5fc95db07bc3983ae959eb64678482c4e9 (tag) tagging c118816d44e178e4364a0c32aaece81a14511237 (commit) replaces v3.1.0-rc3 tagged by Brad King on Wed Dec 17 14:02:51 2014 -0500 - Log ----------------------------------------------------------------- CMake 3.1.0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUkdNfAAoJEOyP7zp7+07aPw4QAJ/jM3/QkLRyK6YpjNELb0O9 3i3E101Cxx6MbE4bl1rwWLsaaOVxo6Ms4jmW+CsFwu043ywjbVSF6aNmkEp8jGsL TTQSTsr7N8ew4vWdySQbrbgTIIE3YRM1JNIyzTSbhdTrVREjNrQ6xtywAWSnAjnn FXYCrPVT/4ZlGUEytD4O6E+lvwEyOrSRM5m4FVdhx4gkCx2PE002dTT+/RZM0KUa N8l9istPQiobp/6UiNVqDM3vj9out0ACPc8JG2T7LUXtQ9El02g5jnzPu0rNVPwM ECQk+fFNq3aN1G25PiXTd8bJCi9GGN3+H+2Zbf+paNC5kZ5EBsuv9BjlwURLVsLS b7OJhMaTxN0wIdz8mpwBdUTQ2Dt+DzTu9Yt5RWqO4odgw3J4pzhNrCeaQ9mmCCG3 Uno3DxUWLkVW5kcFvBSltASNWAGW+Vujq7NR+sCTRcS9qSfODuGyTfIrDPDPc+8s gi1SDZOoVFGMHA9Tb/d/qpNEspBC75681STZ/uOlczCGkEy+QVUXGM0EXY2icPhZ YQbC0YMkruW/J2cpBOkpCGwJpaGRR37zwKT688vYKHzpfAYmQpxJQduJ9qyi6DW/ ZViz+M+7gyHq4Isqdd5ZYSjJdG0IxYibRbR27qsUDXVflC4354I5W+M45gpFB0nv l1pLJz8DsjLYqbjFHOuc =3hSC -----END PGP SIGNATURE----- Brad King (4): Help: Drop FeatureSummary example in cmake-developer.7 Merge branch 'backport-doc-find-module-no-summary' into release Merge branch 'doc-CMP0054-example' into release CMake 3.1.0 Nils Gladitz (1): Help: Extend policy CMP0054 documentation with an example ----------------------------------------------------------------------- hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:44:16 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:44:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-495-gbd62c52 Message-ID: <20141217194416.83E4BA5643@public.kitware.com> This is an automated email from 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 bd62c5211576d626d19a27d389d1fa7b42390576 (commit) via 953d34fd1fd004459704d4625aff54a9dcf9141b (commit) via 9859042c0501f444fbb9d5f2b78b5e563a97f71d (commit) from 1dc6f6f8a18be8e9eaaf7e114c47c9d30c352ffd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd62c5211576d626d19a27d389d1fa7b42390576 commit bd62c5211576d626d19a27d389d1fa7b42390576 Merge: 1dc6f6f 953d34f Author: Brad King AuthorDate: Wed Dec 17 14:44:15 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 14:44:15 2014 -0500 Merge topic 'doc-custom-command-depends' 953d34fd Help: Document MAIN_DEPENDENCY limitation in add_custom_command 9859042c Help: Mention add_dependencies in add_custom_target DEPENDS option ----------------------------------------------------------------------- Summary of changes: Help/command/add_custom_command.rst | 3 ++- Help/command/add_custom_target.rst | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:44:18 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:44:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-497-g4e61edc Message-ID: <20141217194418.CC4DEA57F7@public.kitware.com> This is an automated email from 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 4e61edc4577b5e01dd6bd802b9b4779e1985f77d (commit) via 2a3e263173e10de4a067a9de61318f6d6e0f0f17 (commit) from bd62c5211576d626d19a27d389d1fa7b42390576 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e61edc4577b5e01dd6bd802b9b4779e1985f77d commit 4e61edc4577b5e01dd6bd802b9b4779e1985f77d Merge: bd62c52 2a3e263 Author: Brad King AuthorDate: Wed Dec 17 14:44:17 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 14:44:17 2014 -0500 Merge topic 'test-CheckSourceTree-update' 2a3e2631 Tests: Fix CheckSourceTree test for newer Git ----------------------------------------------------------------------- Summary of changes: Tests/CMakeTests/CheckSourceTreeTest.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:44:21 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:44:21 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-499-gf408667 Message-ID: <20141217194421.2C825A756D@public.kitware.com> This is an automated email from 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 f408667d1926167fcafbd4f4f16d117a5dbd2823 (commit) via 0622f92d23771126b2ff5470faea58a76326c413 (commit) from 4e61edc4577b5e01dd6bd802b9b4779e1985f77d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f408667d1926167fcafbd4f4f16d117a5dbd2823 commit f408667d1926167fcafbd4f4f16d117a5dbd2823 Merge: 4e61edc 0622f92 Author: Brad King AuthorDate: Wed Dec 17 14:44:19 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 14:44:19 2014 -0500 Merge topic 'fix_coverage_scanbuild_errors' 0622f92d CTest: Remove code to fix scanbuild errors ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmParseBlanketJSCoverage.cxx | 2 -- Source/CTest/cmParseDelphiCoverage.cxx | 2 -- 2 files changed, 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:44:23 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:44:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-503-g70ffd71 Message-ID: <20141217194423.7EED9A6099@public.kitware.com> This is an automated email from 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 70ffd71db1dff3973f93edb9a6120cec0023f89f (commit) via 29533380ea887e3f5eab44260bbd77933cf91ca9 (commit) via a85ee8b8cf4fb4be5f5ebd6e88e2753d1ec654ae (commit) via da7155f5bc70440ccb1238e73194c2a454442f8d (commit) from f408667d1926167fcafbd4f4f16d117a5dbd2823 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70ffd71db1dff3973f93edb9a6120cec0023f89f commit 70ffd71db1dff3973f93edb9a6120cec0023f89f Merge: f408667 2953338 Author: Brad King AuthorDate: Wed Dec 17 14:44:22 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 14:44:22 2014 -0500 Merge topic 'test-RunCMake-updates' 29533380 Tests: Allow RunCMake expected result code to be a regex a85ee8b8 Tests: Simplify RunCMake test extra argument passing da7155f5 Tests: Allow RunCMake tests to pass generator expressions ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CMakeLists.txt | 6 +++--- Tests/RunCMake/RunCMake.cmake | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:44:49 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:44:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1217-gf59e83c Message-ID: <20141217194449.B321BA7688@public.kitware.com> This is an automated email from 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 f59e83c39f91a4d56f0928366886ddc962c27e53 (commit) via 70ffd71db1dff3973f93edb9a6120cec0023f89f (commit) via f408667d1926167fcafbd4f4f16d117a5dbd2823 (commit) via 4e61edc4577b5e01dd6bd802b9b4779e1985f77d (commit) via bd62c5211576d626d19a27d389d1fa7b42390576 (commit) from a455b5672fa1c61183bb8876de727731c22ed4a3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f59e83c39f91a4d56f0928366886ddc962c27e53 commit f59e83c39f91a4d56f0928366886ddc962c27e53 Merge: a455b56 70ffd71 Author: Brad King AuthorDate: Wed Dec 17 14:44:40 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 14:44:40 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:54:15 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:54:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-505-g9c7c6e4 Message-ID: <20141217195415.5F72CA8208@public.kitware.com> This is an automated email from 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 9c7c6e434a1483ad5a188136a1cfb7bbf9cf5d61 (commit) via 1c8129795ac482b36a67d0b7131f2bbd6ad04a54 (commit) from 70ffd71db1dff3973f93edb9a6120cec0023f89f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c7c6e434a1483ad5a188136a1cfb7bbf9cf5d61 commit 9c7c6e434a1483ad5a188136a1cfb7bbf9cf5d61 Merge: 70ffd71 1c81297 Author: Brad King AuthorDate: Wed Dec 17 14:54:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 14:54:14 2014 -0500 Merge topic 'ctest_memcheck-no-empty-BC-output' 1c812979 ctest_memcheck: Do not open empty BC output file name ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 14:54:30 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 14:54:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1219-g8cff103 Message-ID: <20141217195430.35D0AA8232@public.kitware.com> This is an automated email from 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 8cff10383e6198df9c1f1d4649049961d7c8f00a (commit) via 9c7c6e434a1483ad5a188136a1cfb7bbf9cf5d61 (commit) from f59e83c39f91a4d56f0928366886ddc962c27e53 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cff10383e6198df9c1f1d4649049961d7c8f00a commit 8cff10383e6198df9c1f1d4649049961d7c8f00a Merge: f59e83c 9c7c6e4 Author: Brad King AuthorDate: Wed Dec 17 14:54:21 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 14:54:21 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 15:01:44 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 15:01:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1222-g3f59a44 Message-ID: <20141217200144.3DE8AA836A@public.kitware.com> This is an automated email from 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 3f59a446c7f7f874f8b223a32eb47397fabebef2 (commit) via 3470704f5a68310a063d928e290a41be5e49620f (commit) via 6a5ab894fbb1683ed24bfa5d603eff6ff3f40039 (commit) from 8cff10383e6198df9c1f1d4649049961d7c8f00a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f59a446c7f7f874f8b223a32eb47397fabebef2 commit 3f59a446c7f7f874f8b223a32eb47397fabebef2 Merge: 8cff103 3470704 Author: Brad King AuthorDate: Wed Dec 17 15:01:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 15:01:43 2014 -0500 Merge topic 'update-kwsys' into next 3470704f Merge branch 'upstream-kwsys' into update-kwsys 6a5ab894 KWSys 2014-12-16 (cc4046a8) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3470704f5a68310a063d928e290a41be5e49620f commit 3470704f5a68310a063d928e290a41be5e49620f Merge: 9c7c6e4 6a5ab89 Author: Brad King AuthorDate: Wed Dec 17 15:00:39 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 15:00:39 2014 -0500 Merge branch 'upstream-kwsys' into update-kwsys diff --cc Source/kwsys/CONTRIBUTING.rst index 0000000,e097b76..e097b76 mode 000000,100644..100644 --- a/Source/kwsys/CONTRIBUTING.rst +++ b/Source/kwsys/CONTRIBUTING.rst http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a5ab894fbb1683ed24bfa5d603eff6ff3f40039 commit 6a5ab894fbb1683ed24bfa5d603eff6ff3f40039 Author: KWSys Robot AuthorDate: Tue Dec 16 08:48:30 2014 -0500 Commit: Brad King CommitDate: Wed Dec 17 15:00:15 2014 -0500 KWSys 2014-12-16 (cc4046a8) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ cc4046a8 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' dec9c30b..cc4046a8 Brad King (2): 9c3eacf8 Add CONTRIBUTING.rst file with instructions to contribute cc4046a8 Directory: Work around PGI problem with Linux Large File Support Jean-Christophe Fillion-Robin (2): c38ba638 SystemInformation: Improve Get(Available/Total)VirtualMemory for windows 58308145 SystemInformation: Improve comments in private implementation Change-Id: Ic033444a9c03a8a8b5195e7dac108af2aec79fa6 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..e097b76 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,35 @@ +Contributing to KWSys +********************* + +Overview +======== + +KWSys is kept in its own Git repository and shared by several projects +via copies in their source trees. Changes to KWSys should not be made +directly in a host project, except perhaps in maintenance branches. + +Please visit + + http://public.kitware.com/Wiki/KWSys/Git + +to contribute changes directly to KWSys upstream. Once changes are +reviewed, tested, and integrated there then the copies of KWSys within +dependent projects can be updated to get the changes. + +Issues +====== + +KWSys has no independent issue tracker. After encountering an issue +(bug) please try to submit a patch using the above instructions. +Otherwise please report the issue to the tracker for the project that +hosts the copy of KWSys in which the problem was found. + +License +======= + +We do not require any formal copyright assignment or contributor license +agreement. Any contributions intentionally sent upstream are presumed +to be offerred under terms of the OSI-approved BSD 3-clause License. +See `Copyright.txt`_ for details. + +.. _`Copyright.txt`: Copyright.txt diff --git a/Directory.cxx b/Directory.cxx index 741bcba..04b2866 100644 --- a/Directory.cxx +++ b/Directory.cxx @@ -203,13 +203,18 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& na #include #include -/* There is a problem with the Portland compiler, large file -support and glibc/Linux system headers: -http://www.pgroup.com/userforum/viewtopic.php? -p=1992&sid=f16167f51964f1a68fe5041b8eb213b6 -*/ -#if defined(__PGI) && defined(__USE_FILE_OFFSET64) -# define dirent dirent64 +// PGI with glibc has trouble with dirent and large file support: +// http://www.pgroup.com/userforum/viewtopic.php? +// p=1992&sid=f16167f51964f1a68fe5041b8eb213b6 +// Work around the problem by mapping dirent the same way as readdir. +#if defined(__PGI) && defined(__GLIBC__) +# define kwsys_dirent_readdir dirent +# define kwsys_dirent_readdir64 dirent64 +# define kwsys_dirent kwsys_dirent_lookup(readdir) +# define kwsys_dirent_lookup(x) kwsys_dirent_lookup_delay(x) +# define kwsys_dirent_lookup_delay(x) kwsys_dirent_##x +#else +# define kwsys_dirent dirent #endif namespace KWSYS_NAMESPACE @@ -226,7 +231,7 @@ bool Directory::Load(const kwsys_stl::string& name) return 0; } - for (dirent* d = readdir(dir); d; d = readdir(dir) ) + for (kwsys_dirent* d = readdir(dir); d; d = readdir(dir) ) { this->Internal->Files.push_back(d->d_name); } @@ -240,7 +245,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& na DIR* dir = opendir(name.c_str()); unsigned long count = 0; - for (dirent* d = readdir(dir); d; d = readdir(dir) ) + for (kwsys_dirent* d = readdir(dir); d; d = readdir(dir) ) { count++; } diff --git a/README.txt b/README.txt index ba03f8d..b8191f7 100644 --- a/README.txt +++ b/README.txt @@ -8,3 +8,5 @@ details. You are probably reading this file in the source tree of a surrounding project. In that case, see "../README.kwsys" for details of using KWSys in your project. + +See CONTRIBUTING.rst for instructions to contribute KWSys changes. diff --git a/SystemInformation.cxx b/SystemInformation.cxx index 3e1a1ab..3d5e728 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -443,7 +443,7 @@ public: }; protected: - // Functions. + // For windows bool RetrieveCPUFeatures(); bool RetrieveCPUIdentity(); bool RetrieveCPUCacheDetails(); @@ -457,6 +457,7 @@ protected: bool RetrieveClassicalCPUIdentity(); bool RetrieveExtendedCPUIdentity(); + // Processor information Manufacturer ChipManufacturer; CPUFeatures Features; ID ChipID; @@ -464,11 +465,11 @@ protected: unsigned int NumberOfLogicalCPU; unsigned int NumberOfPhysicalCPU; - int CPUCount(); + int CPUCount(); // For windows unsigned char LogicalCPUPerPhysicalCPU(); - unsigned char GetAPICId(); + unsigned char GetAPICId(); // For windows bool IsHyperThreadingSupported(); - static LongLong GetCyclesDifference(DELAY_FUNC, unsigned int); + static LongLong GetCyclesDifference(DELAY_FUNC, unsigned int); // For windows // For Linux and Cygwin, /proc/cpuinfo formats are slightly different bool RetreiveInformationFromCpuInfoFile(); @@ -3753,9 +3754,9 @@ bool SystemInformationImplementation::QueryWindowsMemory() } # define MEM_VAL(value) ull##value # endif - tv = ms.MEM_VAL(TotalVirtual); + tv = ms.MEM_VAL(TotalPageFile); tp = ms.MEM_VAL(TotalPhys); - av = ms.MEM_VAL(AvailVirtual); + av = ms.MEM_VAL(AvailPageFile); ap = ms.MEM_VAL(AvailPhys); this->TotalVirtualMemory = tv>>10>>10; this->TotalPhysicalMemory = tp>>10>>10; ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CONTRIBUTING.rst | 35 +++++++++++++++++++++++++++++++++++ Source/kwsys/Directory.cxx | 23 ++++++++++++++--------- Source/kwsys/README.txt | 2 ++ Source/kwsys/SystemInformation.cxx | 13 +++++++------ 4 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 Source/kwsys/CONTRIBUTING.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 17 16:04:15 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 17 Dec 2014 16:04:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1224-g9a64b8d Message-ID: <20141217210415.94F44A83BF@public.kitware.com> This is an automated email from 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 9a64b8d559d0123da0c110dd5d13ce5f3a46ecf8 (commit) via 473446abfa20c949ea896aa11b331f17a0d09029 (commit) from 3f59a446c7f7f874f8b223a32eb47397fabebef2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a64b8d559d0123da0c110dd5d13ce5f3a46ecf8 commit 9a64b8d559d0123da0c110dd5d13ce5f3a46ecf8 Merge: 3f59a44 473446a Author: Brad King AuthorDate: Wed Dec 17 16:04:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 17 16:04:14 2014 -0500 Merge topic 'doc-INTERFACE-target-type' into next 473446ab Help: Add INTERFACE_LIBRARY to TYPE target property documentation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=473446abfa20c949ea896aa11b331f17a0d09029 commit 473446abfa20c949ea896aa11b331f17a0d09029 Author: Tim Blechmann AuthorDate: Wed Dec 17 21:59:51 2014 +0100 Commit: Brad King CommitDate: Wed Dec 17 16:03:29 2014 -0500 Help: Add INTERFACE_LIBRARY to TYPE target property documentation diff --git a/Help/prop_tgt/TYPE.rst b/Help/prop_tgt/TYPE.rst index 1951d46..5ac63cc 100644 --- a/Help/prop_tgt/TYPE.rst +++ b/Help/prop_tgt/TYPE.rst @@ -5,4 +5,5 @@ The type of the target. This read-only property can be used to test the type of the given target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY, -SHARED_LIBRARY, EXECUTABLE or one of the internal target types. +SHARED_LIBRARY, INTERFACE_LIBRARY, EXECUTABLE or one of the internal +target types. ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/TYPE.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 18 00:01:22 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 18 Dec 2014 00:01:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-506-g2a45da6 Message-ID: <20141218050122.8C8B1A8193@public.kitware.com> This is an automated email from 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 2a45da6ea4ea2548258ef550afb3dd3cf1475b4f (commit) from 9c7c6e434a1483ad5a188136a1cfb7bbf9cf5d61 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a45da6ea4ea2548258ef550afb3dd3cf1475b4f commit 2a45da6ea4ea2548258ef550afb3dd3cf1475b4f Author: Kitware Robot AuthorDate: Thu Dec 18 00:01:20 2014 -0500 Commit: Kitware Robot CommitDate: Thu Dec 18 00:01:20 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4f5fc38..0c23b82 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 1) -set(CMake_VERSION_PATCH 20141217) +set(CMake_VERSION_PATCH 20141218) #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 Dec 18 08:49:51 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 08:49:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1226-g7e6d0ee Message-ID: <20141218134951.BB1B9A80BD@public.kitware.com> This is an automated email from 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 7e6d0eed6a86bf798eff158ac3f234b09bbbb0c1 (commit) via ae1c31fc4276c38cead89663cfd660db89de3d3b (commit) from 9a64b8d559d0123da0c110dd5d13ce5f3a46ecf8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e6d0eed6a86bf798eff158ac3f234b09bbbb0c1 commit 7e6d0eed6a86bf798eff158ac3f234b09bbbb0c1 Merge: 9a64b8d ae1c31f Author: Brad King AuthorDate: Thu Dec 18 08:49:50 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 08:49:50 2014 -0500 Merge topic 'remove-stray-source-file' into next ae1c31fc Revert topic 'remove-stray-source-file' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae1c31fc4276c38cead89663cfd660db89de3d3b commit ae1c31fc4276c38cead89663cfd660db89de3d3b Author: Brad King AuthorDate: Thu Dec 18 08:49:11 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 08:49:16 2014 -0500 Revert topic 'remove-stray-source-file' It was only temporarily in 'next' to clean up some dashboard machine source trees. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index d2309f9..33c18ce 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3085,6 +3085,3 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(CMakeTests) endif() endif() - -# Remove a stray source file from a few dashboard machines. -file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/ExternalProjectUpdate/core) ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 09:16:26 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 09:16:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1229-gefb496d Message-ID: <20141218141626.1F90DA74E2@public.kitware.com> This is an automated email from 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 efb496dcefde4cd2114375cd363ae4580624cff4 (commit) via f90335ea40766480abe30239d723b58b2a49cdcc (commit) via 2a45da6ea4ea2548258ef550afb3dd3cf1475b4f (commit) from 7e6d0eed6a86bf798eff158ac3f234b09bbbb0c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efb496dcefde4cd2114375cd363ae4580624cff4 commit efb496dcefde4cd2114375cd363ae4580624cff4 Merge: 7e6d0ee f90335e Author: Brad King AuthorDate: Thu Dec 18 09:16:25 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 09:16:25 2014 -0500 Merge topic 'osx-release-binary-name' into next f90335ea Utilities/Release: Fix name of OS X 10.6+ x86_64-only binary 2a45da6e CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f90335ea40766480abe30239d723b58b2a49cdcc commit f90335ea40766480abe30239d723b58b2a49cdcc Author: Brad King AuthorDate: Thu Dec 18 09:13:44 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 09:15:40 2014 -0500 Utilities/Release: Fix name of OS X 10.6+ x86_64-only binary In commit v3.1.0-rc1~52^2 (Make the OSX 10.6+ release x86_64 only, 2014-09-29) we forgot to remove the name "universal" from the binary name. Drop it now since the binary is no longer universal. While at it, update the deployment target to actually be 10.6. diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index 6c9b8f4..0822a1c 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -15,9 +15,9 @@ OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a CMAKE_BUILD_TYPE:STRING=Release CMAKE_OSX_ARCHITECTURES:STRING=x86_64 -CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5 +CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CPACK_SYSTEM_NAME:STRING=Darwin64-universal +CPACK_SYSTEM_NAME:STRING=Darwin64 BUILD_QtDialog:BOOL=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Utilities/Release/dashmacmini5_release.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 09:42:48 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 09:42:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1231-g1090b10 Message-ID: <20141218144248.1F3B8A4D74@public.kitware.com> This is an automated email from 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 1090b107730fac0ae870e6da634fdea6aaec50af (commit) via 82a0307adb897fa9a746d4a297058d34e422e8c9 (commit) from efb496dcefde4cd2114375cd363ae4580624cff4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1090b107730fac0ae870e6da634fdea6aaec50af commit 1090b107730fac0ae870e6da634fdea6aaec50af Merge: efb496d 82a0307 Author: Brad King AuthorDate: Thu Dec 18 09:42:47 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 09:42:47 2014 -0500 Merge topic 'osx-cfbundle-tweaks' into next 82a0307a Tests/CFBundleTest: Fix build output locations http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82a0307adb897fa9a746d4a297058d34e422e8c9 commit 82a0307adb897fa9a746d4a297058d34e422e8c9 Author: Brad King AuthorDate: Thu Dec 18 09:41:15 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 09:41:15 2014 -0500 Tests/CFBundleTest: Fix build output locations diff --git a/Tests/CFBundleTest/VerifyResult.cmake b/Tests/CFBundleTest/VerifyResult.cmake index e622900..e637bb1 100644 --- a/Tests/CFBundleTest/VerifyResult.cmake +++ b/Tests/CFBundleTest/VerifyResult.cmake @@ -14,13 +14,10 @@ message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'") message(STATUS "dir='${dir}'") message(STATUS "gen='${gen}'") -if(gen MATCHES "Make" OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig") - set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") -else() +if(gen STREQUAL "Xcode") set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") +else() + set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") endif() if(NOT EXISTS "${expected_filename}") diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 87ab29e..568fc86 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1942,6 +1942,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release --build-two-config ${build_generator_args} --build-project CFBundleTest + --build-config $ --build-options ${build_options} --test-command ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=$ ----------------------------------------------------------------------- Summary of changes: Tests/CFBundleTest/VerifyResult.cmake | 9 +++------ Tests/CMakeLists.txt | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:08:48 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:08:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1233-g01eb6be Message-ID: <20141218150848.C4412A8475@public.kitware.com> This is an automated email from 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 01eb6be389e2e57838150f6b1ba73b3f67bd6fa5 (commit) via eea2973be414d31357a3850b0de6219d652d59b3 (commit) from 1090b107730fac0ae870e6da634fdea6aaec50af (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01eb6be389e2e57838150f6b1ba73b3f67bd6fa5 commit 01eb6be389e2e57838150f6b1ba73b3f67bd6fa5 Merge: 1090b10 eea2973 Author: Brad King AuthorDate: Thu Dec 18 10:08:48 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:08:48 2014 -0500 Merge topic 'bootstrap-solaris' into next eea2973b bootstrap: Fix syntax for Solaris 10 shell http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eea2973be414d31357a3850b0de6219d652d59b3 commit eea2973be414d31357a3850b0de6219d652d59b3 Author: Brad King AuthorDate: Thu Dec 18 09:56:52 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 09:56:52 2014 -0500 bootstrap: Fix syntax for Solaris 10 shell In commit v3.1.0-rc2~7^2 (Workaround for short jump tables on PA-RISC, 2014-11-04) we added use of shell syntax not supported on the Solaris shell. Avoid using the '!' operator. Reported-by: Friedrich Haubensak diff --git a/bootstrap b/bootstrap index 94bed0e..fe051e1 100755 --- a/bootstrap +++ b/bootstrap @@ -145,7 +145,7 @@ if ${cmake_system_linux}; then cmake_machine_parisc=true fi elif ${cmake_system_hpux}; then - if !(uname -m | grep ia64 >/dev/null 2>&1); then + if uname -m | grep ia64 >/dev/null 2>&1; then : ; else cmake_machine_parisc=true fi fi ----------------------------------------------------------------------- Summary of changes: bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:10:30 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:10:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1235-gaecde43 Message-ID: <20141218151030.807049C8E9@public.kitware.com> This is an automated email from 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 aecde43f487e84cd72b74713b4f2eabf4afb05c1 (commit) via e4563257ba66266017fadf24c1b97fd103a138e4 (commit) from 01eb6be389e2e57838150f6b1ba73b3f67bd6fa5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aecde43f487e84cd72b74713b4f2eabf4afb05c1 commit aecde43f487e84cd72b74713b4f2eabf4afb05c1 Merge: 01eb6be e456325 Author: Brad King AuthorDate: Thu Dec 18 10:10:29 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:10:29 2014 -0500 Merge topic 'curl-darwinssl' into next e4563257 curl: Use OS X SSL/TLS native implementation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4563257ba66266017fadf24c1b97fd103a138e4 commit e4563257ba66266017fadf24c1b97fd103a138e4 Author: Brad King AuthorDate: Mon Dec 15 14:36:59 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 09:44:19 2014 -0500 curl: Use OS X SSL/TLS native implementation On OS X, when CMAKE_USE_OPENSSL is OFF, use the OS implementation. This will allow the OS-configured CA list to be trusted automatically. This is supported on OS X 10.6 and above using AppleClang, Clang, and GNU compilers. diff --git a/Help/release/dev/curl-darwinssl.rst b/Help/release/dev/curl-darwinssl.rst new file mode 100644 index 0000000..3571bd1 --- /dev/null +++ b/Help/release/dev/curl-darwinssl.rst @@ -0,0 +1,9 @@ +curl-darwinssl +-------------- + +* On OS X, commands supporting network communication, such as + :command:`file(DOWNLOAD)`, :command:`file(UPLOAD)`, and + :command:`ctest_submit`, now support SSL/TLS even when CMake + is not built against OpenSSL. The OS X native SSL/TLS + implementation is used by default. OS-configured certificate + authorities will be trusted automatically. diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 1092e48..0db741e 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -464,6 +464,25 @@ elseif(WIN32) # Use Windows SSL/TLS native implementation. add_definitions(-DUSE_SCHANNEL) set(USE_WINDOWS_SSPI 1) +elseif(APPLE) + # Use OS X SSL/TLS native implementation if available on target version. + if(CMAKE_OSX_DEPLOYMENT_TARGET) + set(OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) + else() + execute_process( + COMMAND sw_vers -productVersion + OUTPUT_VARIABLE OSX_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() + if(NOT OSX_VERSION VERSION_LESS 10.6 AND + CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang") + add_definitions(-DUSE_DARWINSSL) + list(APPEND CURL_LIBS + "-framework CoreFoundation" + "-framework Security" + ) + endif() endif() #libSSH2 ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:13:40 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:13:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1238-gbff2f16 Message-ID: <20141218151340.CD595A51F3@public.kitware.com> This is an automated email from 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 bff2f161d5be2a0334339fd155db304127e69533 (commit) via 7ca6bdf0355157da9f85f6bbf039a632ffdf66b7 (commit) via 1651dc96683282c0af8ef47973db9afa950d6bde (commit) from aecde43f487e84cd72b74713b4f2eabf4afb05c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bff2f161d5be2a0334339fd155db304127e69533 commit bff2f161d5be2a0334339fd155db304127e69533 Merge: aecde43 7ca6bdf Author: Brad King AuthorDate: Thu Dec 18 10:13:38 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:13:38 2014 -0500 Merge topic 'test-memcheck-with-RunCMake' into next 7ca6bdf0 Tests: Move CTestTestMemcheck tools into Tests/CMakeLib 1651dc96 Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ca6bdf0355157da9f85f6bbf039a632ffdf66b7 commit 7ca6bdf0355157da9f85f6bbf039a632ffdf66b7 Author: Brad King AuthorDate: Tue Dec 16 13:59:22 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:12:16 2014 -0500 Tests: Move CTestTestMemcheck tools into Tests/CMakeLib The dummy memcheck tools we build for the RunCMake.CTestMemcheck tests require CMakeLib, so put them in a Tests/CMakeLib/PseudoMemcheck directory. diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 8c99f64..7ef3c03 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -48,3 +48,5 @@ if(TEST_CompileCommandOutput) add_executable(runcompilecommands run_compile_commands.cxx) target_link_libraries(runcompilecommands CMakeLib) endif() + +add_subdirectory(PseudoMemcheck) diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt similarity index 97% rename from Tests/CTestTestMemcheck/CMakeLists.txt rename to Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt index 5d6319a..c53befc 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt @@ -23,7 +23,7 @@ target_link_libraries(memcheck_fail CMakeLib) # Binaries that are used as memchecker that do not write the expected # output file. Need to be in their own subdirectory as they have the # same filenames. -add_subdirectory(NoLogDummyChecker) +add_subdirectory(NoLog) # Xcode 2.x forgets to create the output directory before linking # the individual architectures. diff --git a/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt b/Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt similarity index 100% rename from Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt rename to Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt diff --git a/Tests/CTestTestMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in similarity index 100% rename from Tests/CTestTestMemcheck/memtester.cxx.in rename to Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 33c18ce..250e966 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -110,10 +110,6 @@ if(BUILD_TESTING) add_subdirectory(FindPackageModeMakefileTest) - if(NOT CMake_TEST_EXTERNAL_CMAKE) - add_subdirectory(CTestTestMemcheck) - endif() - # Collect a list of all test build directories. set(TEST_BUILD_DIRS) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1651dc96683282c0af8ef47973db9afa950d6bde commit 1651dc96683282c0af8ef47973db9afa950d6bde Author: Brad King AuthorDate: Tue Dec 16 13:50:30 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:12:15 2014 -0500 Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test The CTestTestMemcheck test cases all try to check the ctest output with a regular expression. They fail intermittently due to ordering of the portions of the output that come from stdout and stderr being mixed. Convert all the test cases to use the RunCMake infrastructure to match stdout and stderr separately. diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt index 2023e74..5d6319a 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CTestTestMemcheck/CMakeLists.txt @@ -1,13 +1,3 @@ -REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") - -get_filename_component(CTEST_REALPATH_CMAKE_CURRENT_BINARY_DIR - "${CMAKE_CURRENT_BINARY_DIR}" REALPATH -) - -REGEX_ESCAPE_STRING(CTEST_ESCAPED_REALPATH_CMAKE_CURRENT_BINARY_DIR - "${CTEST_REALPATH_CMAKE_CURRENT_BINARY_DIR}" -) - foreach (_retval 0 1) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/memtester.cxx.in" "${CMAKE_CURRENT_BINARY_DIR}/ret${_retval}.cxx" @ONLY) endforeach () @@ -35,245 +25,6 @@ target_link_libraries(memcheck_fail CMakeLib) # same filenames. add_subdirectory(NoLogDummyChecker) -if(APPLE) - # filter out additional messages by Guard Malloc integrated in Xcode - set(guard_malloc_msg "ctest\\([0-9]+\\) malloc: ") - set(guard_malloc_lines "(${guard_malloc_msg}[^\n]*\n)*") - set(guard_malloc_output "${guard_malloc_msg}|") -else() - set(guard_malloc_msg "") - set(guard_malloc_lines "") - set(guard_malloc_output "") -endif() - -# When this entire test runs under coverage or memcheck tools -# they may add output to the end, so match known cases: -# - Bullseye adds a "BullseyeCoverage..." line. -# - Valgrind memcheck may add extra "==..." lines. -set(other_tool_output "((${guard_malloc_output}BullseyeCoverage|==)[^\n]*\n)*") - -string(REPLACE "\r\n" "\n" ctest_and_tool_outputs " -1/1 MemCheck #1: RunCMake \\.+ Passed +[0-9]+\\.[0-9]+ sec -${guard_malloc_lines} -100% tests passed, 0 tests failed out of 1 -.* --- Processing memory checking output:( ) -${guard_malloc_lines}Memory checking results: -${other_tool_output}") - -function(gen_mc_test_internal NAME CHECKER) - set(SUBTEST_NAME "${NAME}") - set(CHECKER_COMMAND "${CHECKER}") - foreach(_file IN ITEMS CMakeLists.txt CTestConfig.cmake test.cmake) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${_file}.in" - "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/${_file}" @ONLY) - endforeach() - add_test(NAME CTestTestMemcheck${NAME} - COMMAND ${CMAKE_CTEST_COMMAND} - -C $ - -S "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/test.cmake" -V - --output-log "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/testOutput.log" - ${ARGN} - ) -endfunction(gen_mc_test_internal) - -function(gen_mc_test NAME CHECKER) - gen_mc_test_internal(${NAME} "${CHECKER}" - -D PSEUDO_BC=$ - -D PSEUDO_PURIFY=$ - -D PSEUDO_VALGRIND=$ - -D ERROR_COMMAND=$ - ${ARGN} - ) -endfunction(gen_mc_test) - -function(gen_mcnl_test NAME CHECKER) - gen_mc_test_internal(${NAME} ${CHECKER} - -D PSEUDO_BC=$ - -D PSEUDO_PURIFY=$ - -D PSEUDO_VALGRIND=$ - ${ARGN} - ) - set_tests_properties(CTestTestMemcheck${NAME} - PROPERTIES - PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/${NAME}/Testing/Temporary/MemoryChecker.1.log\n(.*\n)?Error in read script: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/${NAME}/test.cmake\n") -endfunction(gen_mcnl_test) - -unset(CTEST_EXTRA_CONFIG) -unset(CTEST_EXTRA_CODE) -unset(CMAKELISTS_EXTRA_CODE) - -#----------------------------------------------------------------------------- -# add ThreadSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\") -") -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testThreadSanitizer.cmake\") -") -gen_mc_test_internal(DummyThreadSanitizer "" -DMEMCHECK_TYPE=ThreadSanitizer) -set_tests_properties(CTestTestMemcheckDummyThreadSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*data race.* - 1.*data race on vptr .ctor/dtor vs virtual call. - 1.*heap-use-after-free - 1.*thread leak - 1.*destroy of a locked mutex - 1.*double lock of a mutex - 1.*unlock of an unlocked mutex .or by a wrong thread. - 1.*read lock of a write locked mutex - 1.*read unlock of a write locked mutex - 1.*signal-unsafe call inside of a signal - 1.*signal handler spoils errno - 1.*lock-order-inversion .potential deadlock. - 1.*") -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) - -#----------------------------------------------------------------------------- -# add LeakSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") -") -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testLeakSanitizer.cmake\") -") -gen_mc_test_internal(DummyLeakSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyLeakSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*Direct leak - 2.*Indirect leak - 1.*") - -#----------------------------------------------------------------------------- -# add AddressSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") -") -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testAddressSanitizer.cmake\") -") -gen_mc_test_internal(DummyAddressSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyAddressSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*heap-buffer-overflow - 1.*") - -#----------------------------------------------------------------------------- -# add MemorySanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") -") - -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testMemorySanitizer.cmake\") -") -gen_mc_test_internal(DummyMemorySanitizer "" -DMEMCHECK_TYPE=MemorySanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyMemorySanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*use-of-uninitialized-value - 1.*") - -#----------------------------------------------------------------------------- -# add UndefinedBehaviorSanitizer test -set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\") -") - -set(CMAKELISTS_EXTRA_CODE -"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" --P \"${CMAKE_CURRENT_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\") -") -gen_mc_test_internal(DummyUndefinedBehaviorSanitizer "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer) -set(CMAKELISTS_EXTRA_CODE ) -set(CTEST_EXTRA_CODE) -set_tests_properties(CTestTestMemcheckDummyUndefinedBehaviorSanitizer PROPERTIES - PASS_REGULAR_EXPRESSION - ".*Memory checking results:.*left shift of negative value -256 - 1.*") - -#----------------------------------------------------------------------------- - -gen_mc_test(DummyPurify "\${PSEUDO_PURIFY}") -gen_mc_test(DummyValgrind "\${PSEUDO_VALGRIND}") -gen_mc_test(DummyBC "\${PSEUDO_BC}") -gen_mcnl_test(DummyPurifyNoLogfile "\${PSEUDO_PURIFY}") -gen_mcnl_test(DummyValgrindNoLogfile "\${PSEUDO_VALGRIND}") -gen_mcnl_test(DummyBCNoLogfile "\${PSEUDO_BC}") - -set(CTEST_EXTRA_CODE "string(REPLACE \" \" \"\\\\ \" PRE_POST_COMMAND \"\${CTEST_MEMORYCHECK_COMMAND}\") - -set(CTEST_CUSTOM_PRE_MEMCHECK \"\${PRE_POST_COMMAND} pre command\") -set(CTEST_CUSTOM_POST_MEMCHECK \"\${PRE_POST_COMMAND} post command \") -") -gen_mc_test(DummyValgrindPrePost "\${PSEUDO_VALGRIND}") - -set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_POST_MEMCHECK \"\${ERROR_COMMAND}\")") -gen_mc_test(DummyValgrindFailPost "\${PSEUDO_VALGRIND}") - -set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_PRE_MEMCHECK \"\${ERROR_COMMAND}\")") -gen_mc_test(DummyValgrindFailPre "\${PSEUDO_VALGRIND}") - -unset(CTEST_EXTRA_CODE) -set(CTEST_EXTRA_CONFIG "set(CTEST_CUSTOM_MEMCHECK_IGNORE RunCMakeAgain)\n") -set(CMAKELISTS_EXTRA_CODE "add_test(NAME RunCMakeAgain COMMAND \"\${CMAKE_COMMAND}\" --version)") -gen_mc_test(DummyValgrindIgnoreMemcheck "\${PSEUDO_VALGRIND}") - -unset(CTEST_EXTRA_CONFIG) -gen_mc_test(DummyValgrindTwoTargets "\${PSEUDO_VALGRIND}" "-VV") - -set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/does-not-exist\")") -unset(CMAKELISTS_EXTRA_CODE) -gen_mc_test(DummyValgrindInvalidSupFile "\${PSEUDO_VALGRIND}") - -# CTest will add the logfile option before any custom options. Set the logfile -# again, this time to an empty string. This will cause the logfile to be -# missing, which will be the prove for us that the custom option is indeed used. -set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"--log-file=\")") -gen_mc_test(DummyValgrindCustomOptions "\${PSEUDO_VALGRIND}") - -unset(CTEST_EXTRA_CONFIG) -gen_mc_test(NotExist "\${CTEST_BINARY_DIRECTORY}/no-memcheck-exe") - -gen_mc_test(Unknown "${CMAKE_COMMAND}") - -string(REPLACE "\\" "\\\\" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND}") -string(REPLACE "(" "\\(" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}") -string(REPLACE ")" "\\)" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}") -string(REPLACE "+" "\\+" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}") - -set_tests_properties(CTestTestMemcheckUnknown PROPERTIES - PASS_REGULAR_EXPRESSION "Do not understand memory checker: ${CMAKE_COMMAND_ESCAPED}\n(.*\n)?Error in read script: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/Unknown/test.cmake\n") - -set_tests_properties(CTestTestMemcheckNotExist PROPERTIES - PASS_REGULAR_EXPRESSION "Memory checker \\(MemoryCheckCommand\\) not set, or cannot find the specified program.") - -# It is a valid result if valgrind does not output any files (can e.g. happen -# if you have not compiled in debug mode), so these tests will not fail. -set_tests_properties(CTestTestMemcheckDummyValgrind - CTestTestMemcheckDummyValgrindPrePost - CTestTestMemcheckDummyPurify - PROPERTIES - PASS_REGULAR_EXPRESSION "${ctest_and_tool_outputs}$") - -foreach (_pp Pre Post) - string(TOLOWER ${_pp} _pp_lower) - set_tests_properties(CTestTestMemcheckDummyValgrindFail${_pp} - PROPERTIES - PASS_REGULAR_EXPRESSION "\nProblem running command: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}[^\n]*fail[^\n]*\n(.*\n)?Problem executing ${_pp_lower}-memcheck command\\(s\\\).\n(.*\n)?Error in read script: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindFail${_pp}/test.cmake\n") -endforeach () - -set_tests_properties(CTestTestMemcheckDummyValgrindIgnoreMemcheck - PROPERTIES - PASS_REGULAR_EXPRESSION "\n2/2 Test #2: RunCMakeAgain .*${ctest_and_tool_outputs}$") - -set_tests_properties(CTestTestMemcheckDummyBC PROPERTIES - PASS_REGULAR_EXPRESSION "\n1/1 MemCheck #1: RunCMake \\.+ Passed +[0-9]+.[0-9]+ sec\n${guard_malloc_lines}\n100% tests passed, 0 tests failed out of 1\n(.*\n)?Error parsing XML in stream at line 1: no element found\n") - -set_tests_properties(CTestTestMemcheckDummyValgrindInvalidSupFile PROPERTIES - PASS_REGULAR_EXPRESSION "\nCannot find memory checker suppression file: ${CTEST_ESCAPED_REALPATH_CMAKE_CURRENT_BINARY_DIR}/does-not-exist\n") - -set_tests_properties(CTestTestMemcheckDummyValgrindCustomOptions PROPERTIES - PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindCustomOptions/Testing/Temporary/MemoryChecker.1.log\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyValgrindCustomOptions/test.cmake\n") - -set_tests_properties(CTestTestMemcheckDummyValgrindTwoTargets PROPERTIES - PASS_REGULAR_EXPRESSION - "\nMemory check project ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets\n.*\n *Start 1: RunCMake\n(.*\n)?Memory check command: .* \"--log-file=${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets/Testing/Temporary/MemoryChecker.1.log\" \"-q\".*\n *Start 2: RunCMakeAgain\n(.*\n)?Memory check command: .* \"--log-file=${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets/Testing/Temporary/MemoryChecker.2.log\" \"-q\".*\n") - - # Xcode 2.x forgets to create the output directory before linking # the individual architectures. if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index e74eadd..b5e41d9 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -52,6 +52,19 @@ add_RunCMake_test(CMP0053) add_RunCMake_test(CMP0054) add_RunCMake_test(CMP0055) add_RunCMake_test(CTest) + +if(NOT CMake_TEST_EXTERNAL_CMAKE) + add_RunCMake_test(CTestMemcheck + -DPSEUDO_BC=$ + -DPSEUDO_PURIFY=$ + -DPSEUDO_VALGRIND=$ + -DPSEUDO_BC_NOLOG=$ + -DPSEUDO_PURIFY_NOLOG=$ + -DPSEUDO_VALGRIND_NOLOG=$ + -DMEMCHECK_FAIL=$ + ) +endif() + if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja") add_RunCMake_test(CompilerChange) endif() diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt.in b/Tests/RunCMake/CTestMemcheck/CMakeLists.txt.in similarity index 100% rename from Tests/CTestTestMemcheck/CMakeLists.txt.in rename to Tests/RunCMake/CTestMemcheck/CMakeLists.txt.in diff --git a/Tests/CTestTestMemcheck/CTestConfig.cmake.in b/Tests/RunCMake/CTestMemcheck/CTestConfig.cmake.in similarity index 100% rename from Tests/CTestTestMemcheck/CTestConfig.cmake.in rename to Tests/RunCMake/CTestMemcheck/CTestConfig.cmake.in diff --git a/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt new file mode 100644 index 0000000..725270c --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt new file mode 100644 index 0000000..1d255d0 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt @@ -0,0 +1,2 @@ +Memory checking results: +heap-buffer-overflow - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyBC-result.txt b/Tests/RunCMake/CTestMemcheck/DummyBC-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBC-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt new file mode 100644 index 0000000..24f536a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt @@ -0,0 +1 @@ +Error parsing XML in stream at line 1: no element found diff --git a/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt new file mode 100644 index 0000000..5829613 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt new file mode 100644 index 0000000..634e331 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt @@ -0,0 +1,3 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-build/Testing/Temporary/MemoryChecker.1.log +.*Error parsing XML in stream at line 1: no element found +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt new file mode 100644 index 0000000..5829613 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt new file mode 100644 index 0000000..520222f --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt new file mode 100644 index 0000000..97a8a9b --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt @@ -0,0 +1,3 @@ +Memory checking results: +Direct leak - 2 +Indirect leak - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt new file mode 100644 index 0000000..29c6ec7 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt new file mode 100644 index 0000000..64390c7 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt @@ -0,0 +1,2 @@ +Memory checking results: +use-of-uninitialized-value - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-result.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt new file mode 100644 index 0000000..14bc228 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt @@ -0,0 +1,3 @@ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt new file mode 100644 index 0000000..dabb004 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt new file mode 100644 index 0000000..2506f35 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-build/Testing/Temporary/MemoryChecker.1.log +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt new file mode 100644 index 0000000..5829613 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt new file mode 100644 index 0000000..ca23692 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt new file mode 100644 index 0000000..c3af1f9 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt @@ -0,0 +1,13 @@ +Memory checking results: +data race - 1 +data race on vptr \(ctor/dtor vs virtual call\) - 1 +heap-use-after-free - 1 +thread leak - 1 +destroy of a locked mutex - 1 +double lock of a mutex - 1 +unlock of an unlocked mutex \(or by a wrong thread\) - 1 +read lock of a write locked mutex - 1 +read unlock of a write locked mutex - 1 +signal-unsafe call inside of a signal - 1 +signal handler spoils errno - 1 +lock-order-inversion \(potential deadlock\) - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt new file mode 100644 index 0000000..fd684da --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt new file mode 100644 index 0000000..b3473bf --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt @@ -0,0 +1,2 @@ +Memory checking results: +left shift of negative value -256 - 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt new file mode 100644 index 0000000..14bc228 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt @@ -0,0 +1,3 @@ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt new file mode 100644 index 0000000..dabb004 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt new file mode 100644 index 0000000..1a2ee5c --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-build/Testing/Temporary/MemoryChecker.1.log +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt new file mode 100644 index 0000000..dabb004 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt new file mode 100644 index 0000000..2d078ef --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt @@ -0,0 +1,3 @@ +Problem running command: .*memcheck_fail.* +Problem executing post-memcheck command\(s\). +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt new file mode 100644 index 0000000..dabb004 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt new file mode 100644 index 0000000..43ccb2e --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt @@ -0,0 +1,3 @@ +Problem running command: .*memcheck_fail.* +Problem executing pre-memcheck command\(s\). +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt new file mode 100644 index 0000000..9a6a1d6 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-build diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt new file mode 100644 index 0000000..14bc228 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt @@ -0,0 +1,3 @@ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt new file mode 100644 index 0000000..5a5675c --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt @@ -0,0 +1,7 @@ +2/2 Test #2: RunCMakeAgain .* +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt new file mode 100644 index 0000000..d8d1ff0 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory checker suppression file: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-build/does-not-exist +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt new file mode 100644 index 0000000..d46912e --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-build$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt new file mode 100644 index 0000000..321a2a5 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt @@ -0,0 +1,2 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-build/Testing/Temporary/MemoryChecker.1.log +Error in read script: .*/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt new file mode 100644 index 0000000..5829613 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt @@ -0,0 +1,3 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt new file mode 100644 index 0000000..14bc228 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt @@ -0,0 +1,3 @@ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt new file mode 100644 index 0000000..dabb004 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt @@ -0,0 +1,6 @@ +1/1 MemCheck #1: RunCMake \.+ Passed +[0-9]+.[0-9]+ sec + +100% tests passed, 0 tests failed out of 1 +.* +-- Processing memory checking output:( ) +Memory checking results: diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-result.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt new file mode 100644 index 0000000..14bc228 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt @@ -0,0 +1,3 @@ +^((^| +)(BullseyeCoverage|==|ctest\([0-9]+\) malloc:)[^ +]*)*$ diff --git a/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt new file mode 100644 index 0000000..3e0fdb2 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt @@ -0,0 +1,8 @@ +Memory check project .*/DummyValgrindTwoTargets-build +.* + *Start 1: RunCMake +(.* +)?Memory check command: .* \"--log-file=.*/DummyValgrindTwoTargets-build/Testing/Temporary/MemoryChecker.1.log\" \"-q\".* + *Start 2: RunCMakeAgain +(.* +)?Memory check command: .* \"--log-file=.*/DummyValgrindTwoTargets-build/Testing/Temporary/MemoryChecker.2.log\" \"-q\".* diff --git a/Tests/RunCMake/CTestMemcheck/NotExist-result.txt b/Tests/RunCMake/CTestMemcheck/NotExist-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/NotExist-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt b/Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt new file mode 100644 index 0000000..0af5b7a --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt @@ -0,0 +1 @@ +Memory checker \(MemoryCheckCommand\) not set, or cannot find the specified program\. diff --git a/Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt b/Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt new file mode 100644 index 0000000..9e92266 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/NotExist-build$ diff --git a/Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake b/Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake new file mode 100644 index 0000000..6485de8 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake @@ -0,0 +1,144 @@ +include(RunCMake) + +set(SITE test-site) +set(BUILDNAME test-build) +set(COVERAGE_COMMAND "") + +function(run_mc_test SUBTEST_NAME CHECKER_COMMAND) + configure_file(${RunCMake_SOURCE_DIR}/test.cmake.in + ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/test.cmake @ONLY) + configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in + ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/CTestConfig.cmake @ONLY) + configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in + ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/CMakeLists.txt @ONLY) + run_cmake_command(${SUBTEST_NAME} ${CMAKE_CTEST_COMMAND} + -C Debug + -S ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}/test.cmake + -V + --output-log ${RunCMake_BINARY_DIR}/${SUBTEST_NAME}-build/testOutput.log + ${ARGN} + ) +endfunction() + +unset(CTEST_EXTRA_CONFIG) +unset(CTEST_EXTRA_CODE) +unset(CMAKELISTS_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add ThreadSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testThreadSanitizer.cmake\") +") +run_mc_test(DummyThreadSanitizer "" -DMEMCHECK_TYPE=ThreadSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add LeakSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testLeakSanitizer.cmake\") +") +run_mc_test(DummyLeakSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add AddressSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testAddressSanitizer.cmake\") +") +run_mc_test(DummyAddressSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add MemorySanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testMemorySanitizer.cmake\") +") +run_mc_test(DummyMemorySanitizer "" -DMEMCHECK_TYPE=MemorySanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +# add UndefinedBehaviorSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\") +") +run_mc_test(DummyUndefinedBehaviorSanitizer "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CODE "string(REPLACE \" \" \"\\\\ \" PRE_POST_COMMAND \"\${CTEST_MEMORYCHECK_COMMAND}\") + +set(CTEST_CUSTOM_PRE_MEMCHECK \"\${PRE_POST_COMMAND} pre command\") +set(CTEST_CUSTOM_POST_MEMCHECK \"\${PRE_POST_COMMAND} post command \") +") +run_mc_test(DummyValgrindPrePost "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_POST_MEMCHECK \"${MEMCHECK_FAIL}\")") +run_mc_test(DummyValgrindFailPost "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_PRE_MEMCHECK \"${MEMCHECK_FAIL}\")") +run_mc_test(DummyValgrindFailPre "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CONFIG "set(CTEST_CUSTOM_MEMCHECK_IGNORE RunCMakeAgain)\n") +set(CMAKELISTS_EXTRA_CODE "add_test(NAME RunCMakeAgain COMMAND \"\${CMAKE_COMMAND}\" --version)") +run_mc_test(DummyValgrindIgnoreMemcheck "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CONFIG) +unset(CMAKELISTS_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CMAKELISTS_EXTRA_CODE "add_test(NAME RunCMakeAgain COMMAND \"\${CMAKE_COMMAND}\" --version)") +run_mc_test(DummyValgrindTwoTargets "${PSEUDO_VALGRIND}" "-VV") +unset(CMAKELISTS_EXTRA_CODE) + +#----------------------------------------------------------------------------- +set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/does-not-exist\")") +run_mc_test(DummyValgrindInvalidSupFile "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CONFIG) + +#----------------------------------------------------------------------------- +# CTest will add the logfile option before any custom options. Set the logfile +# again, this time to an empty string. This will cause the logfile to be +# missing, which will be the prove for us that the custom option is indeed used. +set(CTEST_EXTRA_CONFIG "set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"--log-file=\")") +run_mc_test(DummyValgrindCustomOptions "${PSEUDO_VALGRIND}") +unset(CTEST_EXTRA_CONFIG) + +#----------------------------------------------------------------------------- +run_mc_test(DummyPurify "${PSEUDO_PURIFY}") +run_mc_test(DummyValgrind "${PSEUDO_VALGRIND}") +run_mc_test(DummyBC "${PSEUDO_BC}") +run_mc_test(DummyPurifyNoLogFile "${PSEUDO_PURIFY_NOLOG}") +run_mc_test(DummyValgrindNoLogFile "${PSEUDO_VALGRIND_NOLOG}") +run_mc_test(DummyBCNoLogFile "${PSEUDO_BC_NOLOG}") +run_mc_test(NotExist "\${CTEST_BINARY_DIRECTORY}/no-memcheck-exe") +run_mc_test(Unknown "\${CMAKE_COMMAND}") diff --git a/Tests/RunCMake/CTestMemcheck/Unknown-result.txt b/Tests/RunCMake/CTestMemcheck/Unknown-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/Unknown-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt b/Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt new file mode 100644 index 0000000..2beea2d --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt @@ -0,0 +1,2 @@ +Do not understand memory checker: .*/cmake.* +Error in read script: .*/Tests/RunCMake/CTestMemcheck/Unknown/test.cmake diff --git a/Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt b/Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt new file mode 100644 index 0000000..7ea1af0 --- /dev/null +++ b/Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt @@ -0,0 +1 @@ +Memory check project .*/Tests/RunCMake/CTestMemcheck/Unknown-build$ diff --git a/Tests/CTestTestMemcheck/test.cmake.in b/Tests/RunCMake/CTestMemcheck/test.cmake.in similarity index 60% rename from Tests/CTestTestMemcheck/test.cmake.in rename to Tests/RunCMake/CTestMemcheck/test.cmake.in index f2ffd06..622d709 100644 --- a/Tests/CTestTestMemcheck/test.cmake.in +++ b/Tests/RunCMake/CTestMemcheck/test.cmake.in @@ -1,16 +1,14 @@ cmake_minimum_required(VERSION 2.8.9) # Settings: -set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@") set(CTEST_SITE "@SITE@") set(CTEST_BUILD_NAME "CTestTest- at BUILDNAME@-Memcheck at SUBTEST_NAME@") -set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@") -set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@") -set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") +set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@SUBTEST_NAME@") +set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@SUBTEST_NAME at -build") +set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testAddressSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testAddressSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testAddressSanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testLeakSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testLeakSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testLeakSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testLeakSanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testMemorySanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testMemorySanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testMemorySanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testMemorySanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testThreadSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testThreadSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testThreadSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testThreadSanitizer.cmake diff --git a/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake b/Tests/RunCMake/CTestMemcheck/testUndefinedBehaviorSanitizer.cmake similarity index 100% rename from Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake rename to Tests/RunCMake/CTestMemcheck/testUndefinedBehaviorSanitizer.cmake ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:16:30 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:16:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-508-gbdf278a Message-ID: <20141218151630.BFA9CA747B@public.kitware.com> This is an automated email from 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 bdf278ad5f9029dc7b63469106db808e20a8ca8c (commit) via e4563257ba66266017fadf24c1b97fd103a138e4 (commit) from 2a45da6ea4ea2548258ef550afb3dd3cf1475b4f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bdf278ad5f9029dc7b63469106db808e20a8ca8c commit bdf278ad5f9029dc7b63469106db808e20a8ca8c Merge: 2a45da6 e456325 Author: Brad King AuthorDate: Thu Dec 18 10:16:29 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:16:29 2014 -0500 Merge topic 'curl-darwinssl' e4563257 curl: Use OS X SSL/TLS native implementation ----------------------------------------------------------------------- Summary of changes: .../dev/{curl-winssl.rst => curl-darwinssl.rst} | 8 ++++---- Utilities/cmcurl/CMakeLists.txt | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) copy Help/release/dev/{curl-winssl.rst => curl-darwinssl.rst} (60%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:16:33 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:16:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-511-g0549694 Message-ID: <20141218151634.A5916A51F3@public.kitware.com> This is an automated email from 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 0549694718237430b349e07f3ca34e3ef91e3c18 (commit) via 7ca6bdf0355157da9f85f6bbf039a632ffdf66b7 (commit) via 1651dc96683282c0af8ef47973db9afa950d6bde (commit) from bdf278ad5f9029dc7b63469106db808e20a8ca8c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0549694718237430b349e07f3ca34e3ef91e3c18 commit 0549694718237430b349e07f3ca34e3ef91e3c18 Merge: bdf278a 7ca6bdf Author: Brad King AuthorDate: Thu Dec 18 10:16:31 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:16:31 2014 -0500 Merge topic 'test-memcheck-with-RunCMake' 7ca6bdf0 Tests: Move CTestTestMemcheck tools into Tests/CMakeLib 1651dc96 Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test ----------------------------------------------------------------------- Summary of changes: Tests/CMakeLib/CMakeLists.txt | 2 + Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt | 41 +++ .../PseudoMemcheck/NoLog}/CMakeLists.txt | 0 .../PseudoMemcheck}/memtester.cxx.in | 0 Tests/CMakeLists.txt | 4 - Tests/CTestTestMemcheck/CMakeLists.txt | 290 -------------------- Tests/RunCMake/CMakeLists.txt | 13 + .../CTestMemcheck}/CMakeLists.txt.in | 0 .../CTestMemcheck}/CTestConfig.cmake.in | 0 .../CTestMemcheck/DummyAddressSanitizer-result.txt | 1 + .../CTestMemcheck/DummyAddressSanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyAddressSanitizer-stdout.txt | 2 + Tests/RunCMake/CTestMemcheck/DummyBC-result.txt | 1 + Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt | 1 + Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt | 3 + .../CTestMemcheck/DummyBCNoLogFile-result.txt | 1 + .../CTestMemcheck/DummyBCNoLogFile-stderr.txt | 3 + .../CTestMemcheck/DummyBCNoLogFile-stdout.txt | 3 + .../CTestMemcheck/DummyLeakSanitizer-result.txt | 1 + .../CTestMemcheck/DummyLeakSanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyLeakSanitizer-stdout.txt | 3 + .../CTestMemcheck/DummyMemorySanitizer-result.txt | 1 + .../CTestMemcheck/DummyMemorySanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyMemorySanitizer-stdout.txt | 2 + .../DummyPurify-result.txt} | 0 .../RunCMake/CTestMemcheck/DummyPurify-stderr.txt | 3 + .../RunCMake/CTestMemcheck/DummyPurify-stdout.txt | 6 + .../CTestMemcheck/DummyPurifyNoLogFile-result.txt | 1 + .../CTestMemcheck/DummyPurifyNoLogFile-stderr.txt | 2 + .../CTestMemcheck/DummyPurifyNoLogFile-stdout.txt | 3 + .../CTestMemcheck/DummyThreadSanitizer-result.txt | 1 + .../CTestMemcheck/DummyThreadSanitizer-stderr.txt | 2 + .../CTestMemcheck/DummyThreadSanitizer-stdout.txt | 13 + .../DummyUndefinedBehaviorSanitizer-result.txt | 1 + .../DummyUndefinedBehaviorSanitizer-stderr.txt | 2 + .../DummyUndefinedBehaviorSanitizer-stdout.txt | 2 + .../DummyValgrind-result.txt} | 0 .../CTestMemcheck/DummyValgrind-stderr.txt | 3 + .../CTestMemcheck/DummyValgrind-stdout.txt | 6 + .../DummyValgrindCustomOptions-result.txt | 1 + .../DummyValgrindCustomOptions-stderr.txt | 2 + .../DummyValgrindCustomOptions-stdout.txt | 6 + .../CTestMemcheck/DummyValgrindFailPost-result.txt | 1 + .../CTestMemcheck/DummyValgrindFailPost-stderr.txt | 3 + .../CTestMemcheck/DummyValgrindFailPost-stdout.txt | 6 + .../CTestMemcheck/DummyValgrindFailPre-result.txt | 1 + .../CTestMemcheck/DummyValgrindFailPre-stderr.txt | 3 + .../CTestMemcheck/DummyValgrindFailPre-stdout.txt | 1 + .../DummyValgrindIgnoreMemcheck-result.txt} | 0 .../DummyValgrindIgnoreMemcheck-stderr.txt | 3 + .../DummyValgrindIgnoreMemcheck-stdout.txt | 7 + .../DummyValgrindInvalidSupFile-result.txt | 1 + .../DummyValgrindInvalidSupFile-stderr.txt | 2 + .../DummyValgrindInvalidSupFile-stdout.txt | 1 + .../DummyValgrindNoLogFile-result.txt | 1 + .../DummyValgrindNoLogFile-stderr.txt | 2 + .../DummyValgrindNoLogFile-stdout.txt | 3 + .../DummyValgrindPrePost-result.txt} | 0 .../CTestMemcheck/DummyValgrindPrePost-stderr.txt | 3 + .../CTestMemcheck/DummyValgrindPrePost-stdout.txt | 6 + .../DummyValgrindTwoTargets-result.txt} | 0 .../DummyValgrindTwoTargets-stderr.txt | 3 + .../DummyValgrindTwoTargets-stdout.txt | 8 + .../NotExist-result.txt} | 0 Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt | 1 + Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt | 1 + Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake | 144 ++++++++++ Tests/RunCMake/CTestMemcheck/Unknown-result.txt | 1 + Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt | 2 + Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt | 1 + .../CTestMemcheck}/test.cmake.in | 12 +- .../CTestMemcheck}/testAddressSanitizer.cmake | 0 .../CTestMemcheck}/testLeakSanitizer.cmake | 0 .../CTestMemcheck}/testMemorySanitizer.cmake | 0 .../CTestMemcheck}/testThreadSanitizer.cmake | 0 .../testUndefinedBehaviorSanitizer.cmake | 0 76 files changed, 348 insertions(+), 301 deletions(-) create mode 100644 Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt rename Tests/{CTestTestMemcheck/NoLogDummyChecker => CMakeLib/PseudoMemcheck/NoLog}/CMakeLists.txt (100%) rename Tests/{CTestTestMemcheck => CMakeLib/PseudoMemcheck}/memtester.cxx.in (100%) delete mode 100644 Tests/CTestTestMemcheck/CMakeLists.txt rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/CMakeLists.txt.in (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/CTestConfig.cmake.in (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyAddressSanitizer-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBC-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBC-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBC-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyBCNoLogFile-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyLeakSanitizer-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyMemorySanitizer-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyPurify-result.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurify-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurify-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyPurifyNoLogFile-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyThreadSanitizer-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyUndefinedBehaviorSanitizer-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrind-result.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrind-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrind-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindCustomOptions-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPost-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindFailPre-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrindIgnoreMemcheck-result.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindIgnoreMemcheck-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindInvalidSupFile-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindNoLogFile-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrindPrePost-result.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindPrePost-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/DummyValgrindTwoTargets-result.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/DummyValgrindTwoTargets-stdout.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CTestMemcheck/NotExist-result.txt} (100%) create mode 100644 Tests/RunCMake/CTestMemcheck/NotExist-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/NotExist-stdout.txt create mode 100644 Tests/RunCMake/CTestMemcheck/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/CTestMemcheck/Unknown-result.txt create mode 100644 Tests/RunCMake/CTestMemcheck/Unknown-stderr.txt create mode 100644 Tests/RunCMake/CTestMemcheck/Unknown-stdout.txt rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/test.cmake.in (60%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testAddressSanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testLeakSanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testMemorySanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testThreadSanitizer.cmake (100%) rename Tests/{CTestTestMemcheck => RunCMake/CTestMemcheck}/testUndefinedBehaviorSanitizer.cmake (100%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:16:37 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:16:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-513-ge7f2668 Message-ID: <20141218151637.6D6F8A74E2@public.kitware.com> This is an automated email from 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 e7f26687abb54b2f4251c809f7499d238f08d430 (commit) via 473446abfa20c949ea896aa11b331f17a0d09029 (commit) from 0549694718237430b349e07f3ca34e3ef91e3c18 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7f26687abb54b2f4251c809f7499d238f08d430 commit e7f26687abb54b2f4251c809f7499d238f08d430 Merge: 0549694 473446a Author: Brad King AuthorDate: Thu Dec 18 10:16:36 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:16:36 2014 -0500 Merge topic 'doc-INTERFACE-target-type' 473446ab Help: Add INTERFACE_LIBRARY to TYPE target property documentation ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/TYPE.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:16:39 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:16:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-515-ga39e65a Message-ID: <20141218151639.95EDBA74FA@public.kitware.com> This is an automated email from 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 a39e65a8172097f8b2545610188a2bdc69598497 (commit) via d4d2d72f5d28e044d18ff5479ee55d872c9c5746 (commit) from e7f26687abb54b2f4251c809f7499d238f08d430 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a39e65a8172097f8b2545610188a2bdc69598497 commit a39e65a8172097f8b2545610188a2bdc69598497 Merge: e7f2668 d4d2d72 Author: Brad King AuthorDate: Thu Dec 18 10:16:38 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:16:38 2014 -0500 Merge topic 'fix-sha2-cast-constness' d4d2d72f sha2: Fix -Wcast-qual warnings by adding const to some casts ----------------------------------------------------------------------- Summary of changes: Source/cm_sha2.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:16:41 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:16:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-517-g45b1e31 Message-ID: <20141218151641.E8CD7A74FA@public.kitware.com> This is an automated email from 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 45b1e31451dc9e393703380282434a2456284954 (commit) via eeaa25e52144626dc76717dea37af3b8d20cb171 (commit) from a39e65a8172097f8b2545610188a2bdc69598497 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45b1e31451dc9e393703380282434a2456284954 commit 45b1e31451dc9e393703380282434a2456284954 Merge: a39e65a eeaa25e Author: Brad King AuthorDate: Thu Dec 18 10:16:40 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:16:40 2014 -0500 Merge topic 'vs-nsight-tegra-min-api' eeaa25e5 Add 'ANDROID_API_MIN' target property to set Android Target MIN API ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/manual/cmake-toolchains.7.rst | 5 +++-- Help/manual/cmake-variables.7.rst | 1 + Help/prop_tgt/ANDROID_API_MIN.rst | 7 +++++++ Help/release/dev/vs-nsight-tegra-min-api.rst | 5 +++++ Help/variable/CMAKE_ANDROID_API_MIN.rst | 5 +++++ Source/cmTarget.cxx | 1 + Source/cmVisualStudio10TargetGenerator.cxx | 6 ++++++ Tests/VSNsightTegra/CMakeLists.txt | 1 + 9 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 Help/prop_tgt/ANDROID_API_MIN.rst create mode 100644 Help/release/dev/vs-nsight-tegra-min-api.rst create mode 100644 Help/variable/CMAKE_ANDROID_API_MIN.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:16:44 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:16:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-520-gcd7bde8 Message-ID: <20141218151644.32739A74C1@public.kitware.com> This is an automated email from 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 cd7bde80bf3c3e141a92058ad033833066da509b (commit) via 3470704f5a68310a063d928e290a41be5e49620f (commit) via 6a5ab894fbb1683ed24bfa5d603eff6ff3f40039 (commit) from 45b1e31451dc9e393703380282434a2456284954 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd7bde80bf3c3e141a92058ad033833066da509b commit cd7bde80bf3c3e141a92058ad033833066da509b Merge: 45b1e31 3470704 Author: Brad King AuthorDate: Thu Dec 18 10:16:42 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:16:42 2014 -0500 Merge topic 'update-kwsys' 3470704f Merge branch 'upstream-kwsys' into update-kwsys 6a5ab894 KWSys 2014-12-16 (cc4046a8) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CONTRIBUTING.rst | 35 +++++++++++++++++++++++++++++++++++ Source/kwsys/Directory.cxx | 23 ++++++++++++++--------- Source/kwsys/README.txt | 2 ++ Source/kwsys/SystemInformation.cxx | 13 +++++++------ 4 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 Source/kwsys/CONTRIBUTING.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:16:59 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:16:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1245-gc777093 Message-ID: <20141218151659.C378FA74E3@public.kitware.com> This is an automated email from 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 c7770933596f56c28d6dc43d618cab994410dea7 (commit) via cd7bde80bf3c3e141a92058ad033833066da509b (commit) via 45b1e31451dc9e393703380282434a2456284954 (commit) via a39e65a8172097f8b2545610188a2bdc69598497 (commit) via e7f26687abb54b2f4251c809f7499d238f08d430 (commit) via 0549694718237430b349e07f3ca34e3ef91e3c18 (commit) via bdf278ad5f9029dc7b63469106db808e20a8ca8c (commit) from bff2f161d5be2a0334339fd155db304127e69533 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7770933596f56c28d6dc43d618cab994410dea7 commit c7770933596f56c28d6dc43d618cab994410dea7 Merge: bff2f16 cd7bde8 Author: Brad King AuthorDate: Thu Dec 18 10:16:50 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:16:50 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:17:44 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:17:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1248-gff6f0a1 Message-ID: <20141218151744.5B030A75DE@public.kitware.com> This is an automated email from 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 ff6f0a122150fa577a2f37c14ddd06c1b8c387b7 (commit) via 2e9acb6d4335064f5c742e5f96eac604f1abfa23 (commit) via 1f7de54346142f05aef5814ee16754fba017b521 (commit) from c7770933596f56c28d6dc43d618cab994410dea7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff6f0a122150fa577a2f37c14ddd06c1b8c387b7 commit ff6f0a122150fa577a2f37c14ddd06c1b8c387b7 Merge: c777093 2e9acb6 Author: Brad King AuthorDate: Thu Dec 18 10:17:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:17:43 2014 -0500 Merge topic 'update-kwsys' into next 2e9acb6d Merge branch 'upstream-kwsys' into update-kwsys 1f7de543 KWSys 2014-12-18 (87c65319) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e9acb6d4335064f5c742e5f96eac604f1abfa23 commit 2e9acb6d4335064f5c742e5f96eac604f1abfa23 Merge: cd7bde8 1f7de54 Author: Brad King AuthorDate: Thu Dec 18 10:17:20 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:17:20 2014 -0500 Merge branch 'upstream-kwsys' into update-kwsys http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f7de54346142f05aef5814ee16754fba017b521 commit 1f7de54346142f05aef5814ee16754fba017b521 Author: KWSys Robot AuthorDate: Thu Dec 18 08:31:15 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:17:16 2014 -0500 KWSys 2014-12-18 (87c65319) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 87c65319 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' cc4046a8..87c65319 Sean McBride (1): 87c65319 SharedForward: Suppress clang -Wcast-qual warnings with conditional pragma Change-Id: I2f79780385aca7e0caa24e5bb0c0b4106b786c37 diff --git a/SharedForward.h.in b/SharedForward.h.in index c6f345f..f22fa58 100644 --- a/SharedForward.h.in +++ b/SharedForward.h.in @@ -65,6 +65,15 @@ See the comments below for specific explanations of each macro. */ +/* Disable -Wcast-qual warnings since they are too hard to fix in a + cross-platform way. */ +#if defined(__clang__) && defined(__has_warning) +# if __has_warning("-Wcast-qual") +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wcast-qual" +# endif +#endif + /*--------------------------------------------------------------------------*/ /* Full path to the directory in which this executable is built. Do @@ -917,6 +926,13 @@ static int @KWSYS_NAMESPACE at _shared_forward_to_real(int argc, char** argv_in) return 1; } +/* Restore warning stack. */ +#if defined(__clang__) && defined(__has_warning) +# if __has_warning("-Wcast-qual") +# pragma clang diagnostic pop +# endif +#endif + #else # error "@KWSYS_NAMESPACE@/SharedForward.h should be included only once." #endif ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SharedForward.h.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:44:33 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:44:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1250-g6efd16b Message-ID: <20141218154433.310EBA6692@public.kitware.com> This is an automated email from 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 6efd16b3cc70483824229c365f9a966e1e6ee12e (commit) via 86d0e016881d059056724d21a474bd90a92f1b4d (commit) from ff6f0a122150fa577a2f37c14ddd06c1b8c387b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6efd16b3cc70483824229c365f9a966e1e6ee12e commit 6efd16b3cc70483824229c365f9a966e1e6ee12e Merge: ff6f0a1 86d0e01 Author: Brad King AuthorDate: Thu Dec 18 10:44:32 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:44:32 2014 -0500 Merge topic 'nightly-binary-updates' into next 86d0e016 Utilities/Release: Build Windows and OS X binaries with native SSL http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86d0e016881d059056724d21a474bd90a92f1b4d commit 86d0e016881d059056724d21a474bd90a92f1b4d Author: Brad King AuthorDate: Thu Dec 18 10:42:21 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:42:21 2014 -0500 Utilities/Release: Build Windows and OS X binaries with native SSL For the nightly binaries, turn of CMAKE_USE_OPENSSL on Windows and OS X 10.6+ platforms. This will activate the new curl behavior to use the OS-native SSL/TLS implementation. diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash2win64_release.cmake index 848e2f4..345870b 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash2win64_release.cmake @@ -7,8 +7,13 @@ set(CPACK_BINARY_GENERATORS "NSIS ZIP") set(CPACK_SOURCE_GENERATORS "ZIP") set(MAKE_PROGRAM "make") set(MAKE "${MAKE_PROGRAM} -j8") +if(CMAKE_CREATE_VERSION STREQUAL "nightly") + set(CMAKE_USE_OPENSSL OFF) +else() + set(CMAKE_USE_OPENSSL ON) +endif() set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_USE_OPENSSL:BOOL=ON +CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL} CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CMAKE_Fortran_COMPILER:FILEPATH=FALSE CMAKE_GENERATOR:INTERNAL=Unix Makefiles diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index 0822a1c..b2f1ceb 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -8,8 +8,13 @@ set(MAKE "${MAKE_PROGRAM} -j5") set(CPACK_BINARY_GENERATORS "DragNDrop TGZ TZ") set(CPACK_SOURCE_GENERATORS "TGZ TZ") set(CPACK_DMG_FORMAT "UDBZ") #build using bzip2 for smaller package size +if(CMAKE_CREATE_VERSION STREQUAL "nightly") + set(CMAKE_USE_OPENSSL OFF) +else() + set(CMAKE_USE_OPENSSL ON) +endif() set(INITIAL_CACHE " -CMAKE_USE_OPENSSL:BOOL=ON +CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL} OPENSSL_CRYPTO_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libcrypto.a OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a ----------------------------------------------------------------------- Summary of changes: Utilities/Release/dash2win64_release.cmake | 7 ++++++- Utilities/Release/dashmacmini5_release.cmake | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 10:44:44 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 10:44:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1253-gdb4b106 Message-ID: <20141218154444.A8498A6692@public.kitware.com> This is an automated email from 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 db4b106b69e047a6242623a418999d51919b11c6 (commit) via fb3db9f84cf4c7f847578cde49ef8fcdd572923f (commit) via c3d032f43de99c6e71dc248666ca8fef53c5ab12 (commit) from 6efd16b3cc70483824229c365f9a966e1e6ee12e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db4b106b69e047a6242623a418999d51919b11c6 commit db4b106b69e047a6242623a418999d51919b11c6 Merge: 6efd16b fb3db9f Author: Brad King AuthorDate: Thu Dec 18 10:44:44 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 10:44:44 2014 -0500 Merge topic 'nightly-binary-updates' into next fb3db9f8 Utilities/Release: Build Windows and OS X binaries with native SSL c3d032f4 Utilities/Release: Fix name of OS X 10.6+ x86_64-only binary http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb3db9f84cf4c7f847578cde49ef8fcdd572923f commit fb3db9f84cf4c7f847578cde49ef8fcdd572923f Author: Brad King AuthorDate: Thu Dec 18 10:42:21 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:44:37 2014 -0500 Utilities/Release: Build Windows and OS X binaries with native SSL For the nightly binaries, turn of CMAKE_USE_OPENSSL on Windows and OS X 10.6+ platforms. This will activate the new curl behavior to use the OS-native SSL/TLS implementation. diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash2win64_release.cmake index 848e2f4..345870b 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash2win64_release.cmake @@ -7,8 +7,13 @@ set(CPACK_BINARY_GENERATORS "NSIS ZIP") set(CPACK_SOURCE_GENERATORS "ZIP") set(MAKE_PROGRAM "make") set(MAKE "${MAKE_PROGRAM} -j8") +if(CMAKE_CREATE_VERSION STREQUAL "nightly") + set(CMAKE_USE_OPENSSL OFF) +else() + set(CMAKE_USE_OPENSSL ON) +endif() set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_USE_OPENSSL:BOOL=ON +CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL} CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CMAKE_Fortran_COMPILER:FILEPATH=FALSE CMAKE_GENERATOR:INTERNAL=Unix Makefiles diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index 0822a1c..b2f1ceb 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -8,8 +8,13 @@ set(MAKE "${MAKE_PROGRAM} -j5") set(CPACK_BINARY_GENERATORS "DragNDrop TGZ TZ") set(CPACK_SOURCE_GENERATORS "TGZ TZ") set(CPACK_DMG_FORMAT "UDBZ") #build using bzip2 for smaller package size +if(CMAKE_CREATE_VERSION STREQUAL "nightly") + set(CMAKE_USE_OPENSSL OFF) +else() + set(CMAKE_USE_OPENSSL ON) +endif() set(INITIAL_CACHE " -CMAKE_USE_OPENSSL:BOOL=ON +CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL} OPENSSL_CRYPTO_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libcrypto.a OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3d032f43de99c6e71dc248666ca8fef53c5ab12 commit c3d032f43de99c6e71dc248666ca8fef53c5ab12 Author: Brad King AuthorDate: Thu Dec 18 09:13:44 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 10:44:37 2014 -0500 Utilities/Release: Fix name of OS X 10.6+ x86_64-only binary In commit v3.1.0-rc1~52^2 (Make the OSX 10.6+ release x86_64 only, 2014-09-29) we forgot to remove the name "universal" from the binary name. Drop it now since the binary is no longer universal. While at it, update the deployment target to actually be 10.6. diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index 6c9b8f4..0822a1c 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -15,9 +15,9 @@ OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a CMAKE_BUILD_TYPE:STRING=Release CMAKE_OSX_ARCHITECTURES:STRING=x86_64 -CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5 +CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CPACK_SYSTEM_NAME:STRING=Darwin64-universal +CPACK_SYSTEM_NAME:STRING=Darwin64 BUILD_QtDialog:BOOL=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 18 11:09:22 2014 From: brad.king at kitware.com (Brad King) Date: Thu, 18 Dec 2014 11:09:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1255-gdf2bed8 Message-ID: <20141218160922.ED989252C@public.kitware.com> This is an automated email from 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 df2bed8f4d78e241db1664efe44d5e4b389bd62a (commit) via 44c6db6eb13b52683ad1b4ce49e6805cff076dfb (commit) from db4b106b69e047a6242623a418999d51919b11c6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df2bed8f4d78e241db1664efe44d5e4b389bd62a commit df2bed8f4d78e241db1664efe44d5e4b389bd62a Merge: db4b106 44c6db6 Author: Brad King AuthorDate: Thu Dec 18 11:09:22 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 11:09:22 2014 -0500 Merge topic 'bootstrap-solaris' into next 44c6db6e bootstrap: Fix syntax for Solaris 10 shell (#15317) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44c6db6eb13b52683ad1b4ce49e6805cff076dfb commit 44c6db6eb13b52683ad1b4ce49e6805cff076dfb Author: Brad King AuthorDate: Thu Dec 18 09:56:52 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 11:08:55 2014 -0500 bootstrap: Fix syntax for Solaris 10 shell (#15317) In commit v3.1.0-rc2~7^2 (Workaround for short jump tables on PA-RISC, 2014-11-04) we added use of shell syntax not supported on the Solaris shell. Avoid using the '!' operator. Reported-by: Friedrich Haubensak diff --git a/bootstrap b/bootstrap index 94bed0e..fe051e1 100755 --- a/bootstrap +++ b/bootstrap @@ -145,7 +145,7 @@ if ${cmake_system_linux}; then cmake_machine_parisc=true fi elif ${cmake_system_hpux}; then - if !(uname -m | grep ia64 >/dev/null 2>&1); then + if uname -m | grep ia64 >/dev/null 2>&1; then : ; else cmake_machine_parisc=true fi fi ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From steveire at gmail.com Thu Dec 18 12:32:05 2014 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 18 Dec 2014 12:32:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1257-g3255ea6 Message-ID: <20141218173205.62C4FA64E6@public.kitware.com> This is an automated email from 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 3255ea60adcaf7c083839b1a3d64a2de09d397f3 (commit) via 7c346ae68c4094d1b97f564d86f41c118285c345 (commit) from df2bed8f4d78e241db1664efe44d5e4b389bd62a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3255ea60adcaf7c083839b1a3d64a2de09d397f3 commit 3255ea60adcaf7c083839b1a3d64a2de09d397f3 Merge: df2bed8 7c346ae Author: Stephen Kelly AuthorDate: Thu Dec 18 12:32:04 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 12:32:04 2014 -0500 Merge topic 'AppleClang-5.1-features' into next 7c346ae6 Features: Record for AppleClang. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c346ae68c4094d1b97f564d86f41c118285c345 commit 7c346ae68c4094d1b97f564d86f41c118285c345 Author: Stephen Kelly AuthorDate: Wed Nov 12 22:48:17 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 18 18:28:41 2014 +0100 Features: Record for AppleClang. diff --git a/Modules/Compiler/AppleClang-C-FeatureTests.cmake b/Modules/Compiler/AppleClang-C-FeatureTests.cmake new file mode 100644 index 0000000..ec1d43f --- /dev/null +++ b/Modules/Compiler/AppleClang-C-FeatureTests.cmake @@ -0,0 +1,11 @@ + +set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") + +set(AppleClang_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L") +set(_cmake_feature_test_c_static_assert "${AppleClang_C11}") +set(AppleClang_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") +set(_cmake_feature_test_c_restrict "${AppleClang_C99}") +set(_cmake_feature_test_c_variadic_macros "${AppleClang_C99}") + +set(AppleClang_C90 "${_cmake_oldestSupported} && !defined(__STDC_VERSION__)") +set(_cmake_feature_test_c_function_prototypes "${AppleClang_C90}") diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake index 98fcd0b..10edc74 100644 --- a/Modules/Compiler/AppleClang-C.cmake +++ b/Modules/Compiler/AppleClang-C.cmake @@ -1,2 +1,33 @@ include(Compiler/Clang) __compiler_clang(C) + +if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) + set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") + + set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + + set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") +endif() + +set(CMAKE_C_STANDARD_DEFAULT 99) + +macro(cmake_record_c_compile_features) + macro(_get_appleclang_features std_version list) + record_compiler_features(C "${std_version}" ${list}) + endmacro() + + if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) + _get_appleclang_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES) + endif() + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_C90_STANDARD_COMPILE_OPTION} CMAKE_C90_COMPILE_FEATURES) + endif() + else() + set(_result 0) + endif() +endmacro() diff --git a/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake b/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake new file mode 100644 index 0000000..78bdb72 --- /dev/null +++ b/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake @@ -0,0 +1,31 @@ + +# No known reference for AppleClang versions. +# Generic reference: http://clang.llvm.org/cxx_status.html +# http://clang.llvm.org/docs/LanguageExtensions.html + +set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") + +include("${CMAKE_CURRENT_LIST_DIR}/Clang-CXX-TestableFeatures.cmake") + +set(AppleClang51_CXX14 "((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L") +# http://llvm.org/bugs/show_bug.cgi?id=19242 +set(_cmake_feature_test_cxx_attribute_deprecated "${AppleClang51_CXX14}") +# http://llvm.org/bugs/show_bug.cgi?id=19698 +set(_cmake_feature_test_cxx_decltype_auto "${AppleClang51_CXX14}") +set(_cmake_feature_test_cxx_digit_separators "${AppleClang51_CXX14}") +# http://llvm.org/bugs/show_bug.cgi?id=19674 +set(_cmake_feature_test_cxx_generic_lambdas "${AppleClang51_CXX14}") + +set(AppleClang51_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_enum_forward_declarations "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_sizeof_member "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_extended_friend_declarations "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_extern_templates "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_func_identifier "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_inline_namespaces "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_long_long_type "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_right_angle_brackets "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_variadic_macros "${AppleClang51_CXX11}") + +set(AppleClang_CXX98 "${_cmake_oldestSupported} && __cplusplus >= 199711L") +set(_cmake_feature_test_cxx_template_template_parameters "${AppleClang_CXX98}") diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index c1acae6..eb97f88 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -4,3 +4,34 @@ __compiler_clang(CXX) if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") endif() + +if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") + + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") + + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") +endif() + +set(CMAKE_CXX_STANDARD_DEFAULT 98) + +macro(cmake_record_cxx_compile_features) + macro(_get_appleclang_features std_version list) + record_compiler_features(CXX "${std_version}" ${list}) + endmacro() + + if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + _get_appleclang_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES) + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) + endif() + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES) + endif() + else() + set(_result 0) + endif() +endmacro() diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index 0b6f0de..36b9706 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -100,7 +100,7 @@ # write_compiler_detection_header( # FILE climbingstats_compiler_detection.h # PREFIX ClimbingStats -# COMPILERS GNU Clang +# COMPILERS GNU Clang AppleClang # FEATURES cxx_variadic_templates # ) # @@ -315,6 +315,7 @@ function(write_compiler_detection_header set(compilers GNU Clang + AppleClang ) set(_hex_compilers ADSP Borland Embarcadero SunPro) @@ -513,7 +514,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignas(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang # define ${def_value} __attribute__ ((__aligned__(X))) # else # define ${def_value} @@ -525,7 +526,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignof(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang # define ${def_value} __alignof__(X) # endif \n") ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/AppleClang-C-FeatureTests.cmake | 11 +++++++ Modules/Compiler/AppleClang-C.cmake | 31 ++++++++++++++++++++ Modules/Compiler/AppleClang-CXX-FeatureTests.cmake | 31 ++++++++++++++++++++ Modules/Compiler/AppleClang-CXX.cmake | 31 ++++++++++++++++++++ Modules/WriteCompilerDetectionHeader.cmake | 7 +++-- 5 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 Modules/Compiler/AppleClang-C-FeatureTests.cmake create mode 100644 Modules/Compiler/AppleClang-CXX-FeatureTests.cmake hooks/post-receive -- CMake From steveire at gmail.com Thu Dec 18 15:43:39 2014 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 18 Dec 2014 15:43:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1262-g6eb86e6 Message-ID: <20141218204339.D819EA51EB@public.kitware.com> This is an automated email from 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 6eb86e6d11bbcb7a6eaa38de2f79519c7f0a2ff9 (commit) via 23f6ecadfa7da49b22667e8aca3ad006783b4a94 (commit) via 3220330df6845547d041c37c1d565b382dcc7900 (commit) via c5d294cd189841cf17c4953e914e30159dc32531 (commit) via cc2e948d67334f12926d934ec78b5273f0965fea (commit) from 3255ea60adcaf7c083839b1a3d64a2de09d397f3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6eb86e6d11bbcb7a6eaa38de2f79519c7f0a2ff9 commit 6eb86e6d11bbcb7a6eaa38de2f79519c7f0a2ff9 Merge: 3255ea6 23f6eca Author: Stephen Kelly AuthorDate: Thu Dec 18 15:43:38 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 15:43:38 2014 -0500 Merge topic 'use-insert-with-iterators' into next 23f6ecad Use insert instead of a loop in some cases. 3220330d Remove some temporary vectors for ExpandListArgument. c5d294cd cmGeneratorExpression: Remove unused header. cc2e948d CTest: Expand a string directly into a container. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23f6ecadfa7da49b22667e8aca3ad006783b4a94 commit 23f6ecadfa7da49b22667e8aca3ad006783b4a94 Author: Stephen Kelly AuthorDate: Sat Nov 22 11:00:45 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 18 21:39:53 2014 +0100 Use insert instead of a loop in some cases. Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set. diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index d226a6c..5e7d764 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -1094,11 +1094,8 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, { // Create a contiguous array for the line this->CurrentProcessingLine.clear(); - t_BuildProcessingQueueType::iterator cit; - for ( cit = queue->begin(); cit != it; ++cit ) - { - this->CurrentProcessingLine.push_back(*cit); - } + this->CurrentProcessingLine.insert(this->CurrentProcessingLine.end(), + queue->begin(), queue->end()); this->CurrentProcessingLine.push_back(0); const char* line = &*this->CurrentProcessingLine.begin(); diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 4c89caa..97637ed 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -526,11 +526,8 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() TestList sortedCopy; - for(TestSet::const_iterator j = currentSet.begin(); - j != currentSet.end(); ++j) - { - sortedCopy.push_back(*j); - } + sortedCopy.insert(sortedCopy.end(), + currentSet.begin(), currentSet.end()); std::stable_sort(sortedCopy.begin(), sortedCopy.end(), comp); diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index 0bb1a99..52b98d7 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -349,11 +349,7 @@ void cmCTestP4::SetP4Options(std::vector &CommandOptions) std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - for(std::vector::const_iterator ai = args.begin(); - ai != args.end(); ++ai) - { - P4Options.push_back(*ai); - } + P4Options.insert(P4Options.end(), args.begin(), args.end()); } CommandOptions.clear(); diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 07a994d..4aa8d04 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -74,13 +74,8 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector notesFiles; cmCTest::VectorOfStrings newNotesFiles; cmSystemTools::ExpandListArgument(notesFilesVariable,notesFiles); - std::vector::iterator it; - for ( it = notesFiles.begin(); - it != notesFiles.end(); - ++ it ) - { - newNotesFiles.push_back(*it); - } + newNotesFiles.insert(newNotesFiles.end(), + notesFiles.begin(), notesFiles.end()); this->CTest->GenerateNotesFile(newNotesFiles); } @@ -91,13 +86,8 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector extraFiles; cmCTest::VectorOfStrings newExtraFiles; cmSystemTools::ExpandListArgument(extraFilesVariable,extraFiles); - std::vector::iterator it; - for ( it = extraFiles.begin(); - it != extraFiles.end(); - ++ it ) - { - newExtraFiles.push_back(*it); - } + newExtraFiles.insert(newExtraFiles.end(), + extraFiles.begin(), extraFiles.end()); if ( !this->CTest->SubmitExtraFiles(newExtraFiles)) { this->SetError("problem submitting extra files."); diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index 2531a1a..dc3b4c2 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -36,11 +36,7 @@ bool cmAddTestCommand // Collect the command with arguments. std::vector command; - for(std::vector::const_iterator it = args.begin() + 1; - it != args.end(); ++it) - { - command.push_back(*it); - } + command.insert(command.end(), args.begin() + 1, args.end()); // Create the test but add a generator only the first time it is // seen. This preserves behavior from before test generators. diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index aba26de..7a601e2 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -53,10 +53,7 @@ bool cmConditionEvaluator::IsTrue( cmArgumentList newArgs; // copy to the list structure - for(unsigned int i = 0; i < args.size(); ++i) - { - newArgs.push_back(args[i]); - } + newArgs.insert(newArgs.end(), args.begin(), args.end()); // now loop through the arguments and see if we can reduce any of them // we do this multiple times. Once for each level of precedence @@ -411,10 +408,7 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList &newArgs, // copy to the list structure cmArgumentList::iterator argP1 = arg; argP1++; - for(; argP1 != argClose; argP1++) - { - newArgs2.push_back(*argP1); - } + newArgs2.insert(newArgs2.end(), argP1, argClose); newArgs2.pop_back(); // now recursively invoke IsTrue to handle the values inside the // parenthetical expression diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 2afb029..015825d 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -131,21 +131,14 @@ const char* cmCustomCommand::GetComment() const //---------------------------------------------------------------------------- void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines) { - for(cmCustomCommandLines::const_iterator i=commandLines.begin(); - i != commandLines.end(); ++i) - { - this->CommandLines.push_back(*i); - } + this->CommandLines.insert(this->CommandLines.end(), + commandLines.begin(), commandLines.end()); } //---------------------------------------------------------------------------- void cmCustomCommand::AppendDepends(const std::vector& depends) { - for(std::vector::const_iterator i=depends.begin(); - i != depends.end(); ++i) - { - this->Depends.push_back(*i); - } + this->Depends.insert(this->Depends.end(), depends.begin(), depends.end()); } //---------------------------------------------------------------------------- diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index beb6dde..013724e 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -184,10 +184,8 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) std::vector shortArgs = this->Names; this->Names.clear(); // clear out any values in Names this->Names.push_back(shortArgs[0]); - for(unsigned int j = 1; j < shortArgs.size(); ++j) - { - this->UserGuessArgs.push_back(shortArgs[j]); - } + this->UserGuessArgs.insert(this->UserGuessArgs.end(), + shortArgs.begin() + 1, shortArgs.end()); } this->ExpandPaths(); diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 3580374..488538f 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -271,11 +271,7 @@ bool cmFunctionCommand // create a function blocker cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker(); - for(std::vector::const_iterator j = args.begin(); - j != args.end(); ++j) - { - f->Args.push_back(*j); - } + f->Args.insert(f->Args.end(), args.begin(), args.end()); this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 2b531e2..435452c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -489,11 +489,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir, unique.insert(*li); } result.clear(); - for(std::set::iterator li = unique.begin(); - li != unique.end(); ++li) - { - result.push_back(*li); - } + result.insert(result.end(), unique.begin(), unique.end()); IncludeCacheType::value_type entry(config_upper, result); iter = this->SystemIncludesCache.insert(entry).first; diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index f106e1a..a007693 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -47,11 +47,8 @@ bool cmInstallFilesCommand else { this->IsFilesForm = false; - std::vector::const_iterator s = args.begin(); - for (++s;s != args.end(); ++s) - { - this->FinalArgs.push_back(*s); - } + this->FinalArgs.insert(this->FinalArgs.end(), + args.begin() + 1, args.end()); } this->Makefile->GetLocalGenerator()->GetGlobalGenerator() diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index 0405769..cc223ab 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -27,11 +27,7 @@ bool cmInstallProgramsCommand this->Destination = args[0]; - std::vector::const_iterator s = args.begin(); - for (++s;s != args.end(); ++s) - { - this->FinalArgs.push_back(*s); - } + this->FinalArgs.insert(this->FinalArgs.end(), args.begin() + 1, args.end()); this->Makefile->GetLocalGenerator()->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2de6c93..a4185ad 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -634,11 +634,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); - a != cmd.end(); ++a) - { - commandLine.push_back(*a); - } + commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); // Store this command line. commandLines.push_back(commandLine); @@ -745,11 +741,7 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); - a != cmd.end(); ++a) - { - commandLine.push_back(*a); - } + commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); // Store this command line. commandLines.push_back(commandLine); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 812ded3..96beb1c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1856,13 +1856,8 @@ void cmLocalUnixMakefileGenerator3 { text = "Running external command ..."; } - std::set::const_iterator dit; - for ( dit = glIt->second.GetUtilities().begin(); - dit != glIt->second.GetUtilities().end(); - ++ dit ) - { - depends.push_back(*dit); - } + depends.insert(depends.end(), glIt->second.GetUtilities().begin(), + glIt->second.GetUtilities().end()); this->AppendEcho(commands, text, cmLocalUnixMakefileGenerator3::EchoGlobal); diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index ae81c58..d399313 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -328,11 +328,7 @@ bool cmMacroCommand::InitialPass(std::vector const& args, // create a function blocker cmMacroFunctionBlocker *f = new cmMacroFunctionBlocker(); - for(std::vector::const_iterator j = args.begin(); - j != args.end(); ++j) - { - f->Args.push_back(*j); - } + f->Args.insert(f->Args.end(), args.begin(), args.end()); this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 20dae5a..25d5881 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2567,12 +2567,7 @@ std::vector cmMakefile } std::vector res; - - std::set::iterator fit; - for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) - { - res.push_back(*fit); - } + res.insert(res.end(), definitions.begin(), definitions.end()); return res; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index cbf8573..040a7d6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -759,13 +759,10 @@ cmMakefileTargetGenerator if(const char* extra_outputs_str = source.GetProperty("OBJECT_OUTPUTS")) { + // Register these as extra files to clean. cmSystemTools::ExpandListArgument(extra_outputs_str, outputs); - for(std::vector::const_iterator eoi = outputs.begin()+1; - eoi != outputs.end(); ++eoi) - { - // Register this as an extra file to clean. - this->CleanFiles.push_back(*eoi); - } + this->CleanFiles.insert(this->CleanFiles.end(), + outputs.begin() + 1, outputs.end()); } // Write the rule. @@ -1174,11 +1171,7 @@ cmMakefileTargetGenerator { cmCustomCommandGenerator ccg(*cc, this->ConfigName, this->Makefile); const std::vector& outputs = ccg.GetOutputs(); - for(std::vector::const_iterator o = outputs.begin(); - o != outputs.end(); ++o) - { - depends.push_back(*o); - } + depends.insert(depends.end(), outputs.begin(), outputs.end()); } } } @@ -1462,11 +1455,8 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( } // Make sure the extra files are built. - for(std::set::const_iterator i = this->ExtraFiles.begin(); - i != this->ExtraFiles.end(); ++i) - { - depends.push_back(*i); - } + depends.insert(depends.end(), + this->ExtraFiles.begin(), this->ExtraFiles.end()); } // Write the driver rule. @@ -1553,11 +1543,7 @@ void cmMakefileTargetGenerator if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg)) { std::vector const& libDeps = cli->GetDepends(); - for(std::vector::const_iterator j = libDeps.begin(); - j != libDeps.end(); ++j) - { - depends.push_back(*j); - } + depends.insert(depends.end(), libDeps.begin(), libDeps.end()); } } @@ -1577,12 +1563,8 @@ void cmMakefileTargetGenerator } // Add dependencies on the external object files. - for(std::vector::const_iterator obj - = this->ExternalObjects.begin(); - obj != this->ExternalObjects.end(); ++obj) - { - depends.push_back(*obj); - } + depends.insert(depends.end(), + this->ExternalObjects.begin(), this->ExternalObjects.end()); // Add a dependency on the rule file itself. this->LocalGenerator->AppendRuleDepend(depends, diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a01a384..443162a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2188,24 +2188,12 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, std::vector command; command.push_back(this->MocExecutable); - for (std::list::const_iterator it = this->MocIncludes.begin(); - it != this->MocIncludes.end(); - ++it) - { - command.push_back(*it); - } - for(std::list::const_iterator it=this->MocDefinitions.begin(); - it != this->MocDefinitions.end(); - ++it) - { - command.push_back(*it); - } - for(std::vector::const_iterator it=this->MocOptions.begin(); - it != this->MocOptions.end(); - ++it) - { - command.push_back(*it); - } + command.insert(command.end(), + this->MocIncludes.begin(), this->MocIncludes.end()); + command.insert(command.end(), + this->MocDefinitions.begin(), this->MocDefinitions.end()); + command.insert(command.end(), + this->MocOptions.begin(), this->MocOptions.end()); #ifdef _WIN32 command.push_back("-DWIN32"); #endif @@ -2277,12 +2265,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, cmSystemTools::ExpandListArgument(optionIt->second, fileOpts); this->MergeUicOptions(opts, fileOpts, this->QtMajorVersion == "5"); } - for(std::vector::const_iterator optIt = opts.begin(); - optIt != opts.end(); - ++optIt) - { - command.push_back(*optIt); - } + command.insert(command.end(), opts.begin(), opts.end()); command.push_back("-o"); command.push_back(this->Builddir + ui_output_file); diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index bcb8564..d8aa1cb 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -39,10 +39,7 @@ bool cmRemoveCommand // check for REMOVE(VAR v1 v2 ... vn) std::vector argsExpanded; std::vector temp; - for(unsigned int j = 1; j < args.size(); ++j) - { - temp.push_back(args[j]); - } + temp.insert(temp.end(), args.begin() + 1, args.end()); cmSystemTools::ExpandList(temp, argsExpanded); // now create the new value diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c83dc2a..630944e 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1269,11 +1269,7 @@ bool cmSystemTools::Split(const char* s, std::vector& l) { std::vector temp; bool res = Superclass::Split(s, temp); - for(std::vector::const_iterator i = temp.begin(); - i != temp.end(); ++i) - { - l.push_back(*i); - } + l.insert(l.end(), temp.begin(), temp.end()); return res; } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 865a824..56e9258 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6456,11 +6456,8 @@ cmTargetInternals::ComputeLinkImplementationLanguages( // Get languages used in our source files. thisTarget->GetLanguages(languages, config); // Copy the set of langauges to the link implementation. - for(std::set::iterator li = languages.begin(); - li != languages.end(); ++li) - { - impl.Languages.push_back(*li); - } + impl.Languages.insert(impl.Languages.begin(), + languages.begin(), languages.end()); } //---------------------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3220330df6845547d041c37c1d565b382dcc7900 commit 3220330df6845547d041c37c1d565b382dcc7900 Author: Stephen Kelly AuthorDate: Thu Dec 18 21:03:38 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 18 21:34:29 2014 +0100 Remove some temporary vectors for ExpandListArgument. Expand directly into the target when possible. diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f330e58..78f1fd4 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2153,25 +2153,11 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "ATTACHED_FILES" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->AttachedFiles.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->AttachedFiles); } if ( key == "ATTACHED_FILES_ON_FAIL" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->AttachOnFail.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->AttachOnFail); } if ( key == "RESOURCE_LOCK" ) { @@ -2195,14 +2181,7 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "REQUIRED_FILES" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->RequiredFiles.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->RequiredFiles); } if ( key == "RUN_SERIAL" ) { @@ -2239,33 +2218,15 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "DEPENDS" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Depends.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Depends); } if ( key == "ENVIRONMENT" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Environment.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Environment); } if ( key == "LABELS" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Labels.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Labels); } if ( key == "MEASUREMENT" ) { diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 067714e..cbf8573 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1193,13 +1193,7 @@ void cmMakefileTargetGenerator depends.push_back(source.GetFullPath()); if(const char* objectDeps = source.GetProperty("OBJECT_DEPENDS")) { - std::vector deps; - cmSystemTools::ExpandListArgument(objectDeps, deps); - for(std::vector::iterator i = deps.begin(); - i != deps.end(); ++i) - { - depends.push_back(*i); - } + cmSystemTools::ExpandListArgument(objectDeps, depends); } } diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 0c38366..a01a384 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2368,14 +2368,7 @@ bool cmQtAutoGenerators::GenerateQrc() = this->RccOptions.find(*si); if (optionIt != this->RccOptions.end()) { - std::vector opts; - cmSystemTools::ExpandListArgument(optionIt->second, opts); - for(std::vector::const_iterator optIt = opts.begin(); - optIt != opts.end(); - ++optIt) - { - command.push_back(*optIt); - } + cmSystemTools::ExpandListArgument(optionIt->second, command); } command.push_back("-name"); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5d294cd189841cf17c4953e914e30159dc32531 commit c5d294cd189841cf17c4953e914e30159dc32531 Author: Stephen Kelly AuthorDate: Thu Dec 18 18:50:50 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 18 21:34:21 2014 +0100 cmGeneratorExpression: Remove unused header. diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index b6fe414..861122c 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -15,8 +15,6 @@ #include "cmTarget.h" #include "assert.h" -#include - #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc2e948d67334f12926d934ec78b5273f0965fea commit cc2e948d67334f12926d934ec78b5273f0965fea Author: Stephen Kelly AuthorDate: Thu Dec 18 21:10:44 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 18 21:34:20 2014 +0100 CTest: Expand a string directly into a container. Change the follow-up loop to use a const_iterator to log the content. diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2bf7b77..80dbaf3 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2598,16 +2598,14 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const std::string& def, return; } cmCTestLog(this, DEBUG, "PopulateCustomVector: " << def << std::endl); - std::vector slist; - cmSystemTools::ExpandListArgument(dval, slist); - std::vector::iterator it; vec.clear(); + cmSystemTools::ExpandListArgument(dval, vec); - for ( it = slist.begin(); it != slist.end(); ++it ) + for (std::vector::const_iterator it = vec.begin(); + it != vec.end(); ++it ) { cmCTestLog(this, DEBUG, " -- " << *it << std::endl); - vec.push_back(*it); } } ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestBuildHandler.cxx | 7 ++-- Source/CTest/cmCTestMultiProcessHandler.cxx | 7 ++-- Source/CTest/cmCTestP4.cxx | 6 +--- Source/CTest/cmCTestSubmitCommand.cxx | 18 +++------- Source/CTest/cmCTestTestHandler.cxx | 51 ++++----------------------- Source/cmAddTestCommand.cxx | 6 +--- Source/cmCTest.cxx | 8 ++--- Source/cmConditionEvaluator.cxx | 10 ++---- Source/cmCustomCommand.cxx | 13 ++----- Source/cmFindBase.cxx | 6 ++-- Source/cmFunctionCommand.cxx | 6 +--- Source/cmGeneratorExpression.cxx | 2 -- Source/cmGeneratorTarget.cxx | 6 +--- Source/cmInstallFilesCommand.cxx | 7 ++-- Source/cmInstallProgramsCommand.cxx | 6 +--- Source/cmLocalGenerator.cxx | 12 ++----- Source/cmLocalUnixMakefileGenerator3.cxx | 9 ++--- Source/cmMacroCommand.cxx | 6 +--- Source/cmMakefile.cxx | 7 +--- Source/cmMakefileTargetGenerator.cxx | 44 ++++++----------------- Source/cmQtAutoGenerators.cxx | 40 +++++---------------- Source/cmRemoveCommand.cxx | 5 +-- Source/cmSystemTools.cxx | 6 +--- Source/cmTarget.cxx | 7 ++-- 24 files changed, 59 insertions(+), 236 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Thu Dec 18 15:46:13 2014 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 18 Dec 2014 15:46:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1264-g6213867 Message-ID: <20141218204613.3FBBAA6AF7@public.kitware.com> This is an automated email from 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 6213867925e250e12d4143dbabc26842a7f2c83e (commit) via 3b2a58f91633c2eb5e52fbaab4055132e4a05cbe (commit) from 6eb86e6d11bbcb7a6eaa38de2f79519c7f0a2ff9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6213867925e250e12d4143dbabc26842a7f2c83e commit 6213867925e250e12d4143dbabc26842a7f2c83e Merge: 6eb86e6 3b2a58f Author: Stephen Kelly AuthorDate: Thu Dec 18 15:46:12 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 18 15:46:12 2014 -0500 Merge topic 'use-insert-with-iterators' into next 3b2a58f9 Revert topic. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b2a58f91633c2eb5e52fbaab4055132e4a05cbe commit 3b2a58f91633c2eb5e52fbaab4055132e4a05cbe Author: Stephen Kelly AuthorDate: Thu Dec 18 21:45:34 2014 +0100 Commit: Stephen Kelly CommitDate: Thu Dec 18 21:45:44 2014 +0100 Revert topic. Forgot about the topic freeze. diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 5e7d764..d226a6c 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -1094,8 +1094,11 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, { // Create a contiguous array for the line this->CurrentProcessingLine.clear(); - this->CurrentProcessingLine.insert(this->CurrentProcessingLine.end(), - queue->begin(), queue->end()); + t_BuildProcessingQueueType::iterator cit; + for ( cit = queue->begin(); cit != it; ++cit ) + { + this->CurrentProcessingLine.push_back(*cit); + } this->CurrentProcessingLine.push_back(0); const char* line = &*this->CurrentProcessingLine.begin(); diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 97637ed..4c89caa 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -526,8 +526,11 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() TestList sortedCopy; - sortedCopy.insert(sortedCopy.end(), - currentSet.begin(), currentSet.end()); + for(TestSet::const_iterator j = currentSet.begin(); + j != currentSet.end(); ++j) + { + sortedCopy.push_back(*j); + } std::stable_sort(sortedCopy.begin(), sortedCopy.end(), comp); diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index 52b98d7..0bb1a99 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -349,7 +349,11 @@ void cmCTestP4::SetP4Options(std::vector &CommandOptions) std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - P4Options.insert(P4Options.end(), args.begin(), args.end()); + for(std::vector::const_iterator ai = args.begin(); + ai != args.end(); ++ai) + { + P4Options.push_back(*ai); + } } CommandOptions.clear(); diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 4aa8d04..07a994d 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -74,8 +74,13 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector notesFiles; cmCTest::VectorOfStrings newNotesFiles; cmSystemTools::ExpandListArgument(notesFilesVariable,notesFiles); - newNotesFiles.insert(newNotesFiles.end(), - notesFiles.begin(), notesFiles.end()); + std::vector::iterator it; + for ( it = notesFiles.begin(); + it != notesFiles.end(); + ++ it ) + { + newNotesFiles.push_back(*it); + } this->CTest->GenerateNotesFile(newNotesFiles); } @@ -86,8 +91,13 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector extraFiles; cmCTest::VectorOfStrings newExtraFiles; cmSystemTools::ExpandListArgument(extraFilesVariable,extraFiles); - newExtraFiles.insert(newExtraFiles.end(), - extraFiles.begin(), extraFiles.end()); + std::vector::iterator it; + for ( it = extraFiles.begin(); + it != extraFiles.end(); + ++ it ) + { + newExtraFiles.push_back(*it); + } if ( !this->CTest->SubmitExtraFiles(newExtraFiles)) { this->SetError("problem submitting extra files."); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 78f1fd4..f330e58 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2153,11 +2153,25 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "ATTACHED_FILES" ) { - cmSystemTools::ExpandListArgument(val, rtit->AttachedFiles); + std::vector lval; + cmSystemTools::ExpandListArgument(val, lval); + + for(std::vector::iterator f = lval.begin(); + f != lval.end(); ++f) + { + rtit->AttachedFiles.push_back(*f); + } } if ( key == "ATTACHED_FILES_ON_FAIL" ) { - cmSystemTools::ExpandListArgument(val, rtit->AttachOnFail); + std::vector lval; + cmSystemTools::ExpandListArgument(val, lval); + + for(std::vector::iterator f = lval.begin(); + f != lval.end(); ++f) + { + rtit->AttachOnFail.push_back(*f); + } } if ( key == "RESOURCE_LOCK" ) { @@ -2181,7 +2195,14 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "REQUIRED_FILES" ) { - cmSystemTools::ExpandListArgument(val, rtit->RequiredFiles); + std::vector lval; + cmSystemTools::ExpandListArgument(val, lval); + + for(std::vector::iterator f = lval.begin(); + f != lval.end(); ++f) + { + rtit->RequiredFiles.push_back(*f); + } } if ( key == "RUN_SERIAL" ) { @@ -2218,15 +2239,33 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "DEPENDS" ) { - cmSystemTools::ExpandListArgument(val, rtit->Depends); + std::vector lval; + cmSystemTools::ExpandListArgument(val, lval); + std::vector::iterator crit; + for ( crit = lval.begin(); crit != lval.end(); ++ crit ) + { + rtit->Depends.push_back(*crit); + } } if ( key == "ENVIRONMENT" ) { - cmSystemTools::ExpandListArgument(val, rtit->Environment); + std::vector lval; + cmSystemTools::ExpandListArgument(val, lval); + std::vector::iterator crit; + for ( crit = lval.begin(); crit != lval.end(); ++ crit ) + { + rtit->Environment.push_back(*crit); + } } if ( key == "LABELS" ) { - cmSystemTools::ExpandListArgument(val, rtit->Labels); + std::vector lval; + cmSystemTools::ExpandListArgument(val, lval); + std::vector::iterator crit; + for ( crit = lval.begin(); crit != lval.end(); ++ crit ) + { + rtit->Labels.push_back(*crit); + } } if ( key == "MEASUREMENT" ) { diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index dc3b4c2..2531a1a 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -36,7 +36,11 @@ bool cmAddTestCommand // Collect the command with arguments. std::vector command; - command.insert(command.end(), args.begin() + 1, args.end()); + for(std::vector::const_iterator it = args.begin() + 1; + it != args.end(); ++it) + { + command.push_back(*it); + } // Create the test but add a generator only the first time it is // seen. This preserves behavior from before test generators. diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 80dbaf3..2bf7b77 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2598,14 +2598,16 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const std::string& def, return; } cmCTestLog(this, DEBUG, "PopulateCustomVector: " << def << std::endl); + std::vector slist; + cmSystemTools::ExpandListArgument(dval, slist); + std::vector::iterator it; vec.clear(); - cmSystemTools::ExpandListArgument(dval, vec); - for (std::vector::const_iterator it = vec.begin(); - it != vec.end(); ++it ) + for ( it = slist.begin(); it != slist.end(); ++it ) { cmCTestLog(this, DEBUG, " -- " << *it << std::endl); + vec.push_back(*it); } } diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 7a601e2..aba26de 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -53,7 +53,10 @@ bool cmConditionEvaluator::IsTrue( cmArgumentList newArgs; // copy to the list structure - newArgs.insert(newArgs.end(), args.begin(), args.end()); + for(unsigned int i = 0; i < args.size(); ++i) + { + newArgs.push_back(args[i]); + } // now loop through the arguments and see if we can reduce any of them // we do this multiple times. Once for each level of precedence @@ -408,7 +411,10 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList &newArgs, // copy to the list structure cmArgumentList::iterator argP1 = arg; argP1++; - newArgs2.insert(newArgs2.end(), argP1, argClose); + for(; argP1 != argClose; argP1++) + { + newArgs2.push_back(*argP1); + } newArgs2.pop_back(); // now recursively invoke IsTrue to handle the values inside the // parenthetical expression diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 015825d..2afb029 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -131,14 +131,21 @@ const char* cmCustomCommand::GetComment() const //---------------------------------------------------------------------------- void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines) { - this->CommandLines.insert(this->CommandLines.end(), - commandLines.begin(), commandLines.end()); + for(cmCustomCommandLines::const_iterator i=commandLines.begin(); + i != commandLines.end(); ++i) + { + this->CommandLines.push_back(*i); + } } //---------------------------------------------------------------------------- void cmCustomCommand::AppendDepends(const std::vector& depends) { - this->Depends.insert(this->Depends.end(), depends.begin(), depends.end()); + for(std::vector::const_iterator i=depends.begin(); + i != depends.end(); ++i) + { + this->Depends.push_back(*i); + } } //---------------------------------------------------------------------------- diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 013724e..beb6dde 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -184,8 +184,10 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) std::vector shortArgs = this->Names; this->Names.clear(); // clear out any values in Names this->Names.push_back(shortArgs[0]); - this->UserGuessArgs.insert(this->UserGuessArgs.end(), - shortArgs.begin() + 1, shortArgs.end()); + for(unsigned int j = 1; j < shortArgs.size(); ++j) + { + this->UserGuessArgs.push_back(shortArgs[j]); + } } this->ExpandPaths(); diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 488538f..3580374 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -271,7 +271,11 @@ bool cmFunctionCommand // create a function blocker cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker(); - f->Args.insert(f->Args.end(), args.begin(), args.end()); + for(std::vector::const_iterator j = args.begin(); + j != args.end(); ++j) + { + f->Args.push_back(*j); + } this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 861122c..b6fe414 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -15,6 +15,8 @@ #include "cmTarget.h" #include "assert.h" +#include + #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 435452c..2b531e2 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -489,7 +489,11 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir, unique.insert(*li); } result.clear(); - result.insert(result.end(), unique.begin(), unique.end()); + for(std::set::iterator li = unique.begin(); + li != unique.end(); ++li) + { + result.push_back(*li); + } IncludeCacheType::value_type entry(config_upper, result); iter = this->SystemIncludesCache.insert(entry).first; diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index a007693..f106e1a 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -47,8 +47,11 @@ bool cmInstallFilesCommand else { this->IsFilesForm = false; - this->FinalArgs.insert(this->FinalArgs.end(), - args.begin() + 1, args.end()); + std::vector::const_iterator s = args.begin(); + for (++s;s != args.end(); ++s) + { + this->FinalArgs.push_back(*s); + } } this->Makefile->GetLocalGenerator()->GetGlobalGenerator() diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index cc223ab..0405769 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -27,7 +27,11 @@ bool cmInstallProgramsCommand this->Destination = args[0]; - this->FinalArgs.insert(this->FinalArgs.end(), args.begin() + 1, args.end()); + std::vector::const_iterator s = args.begin(); + for (++s;s != args.end(); ++s) + { + this->FinalArgs.push_back(*s); + } this->Makefile->GetLocalGenerator()->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a4185ad..2de6c93 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -634,7 +634,11 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); + for(std::vector::iterator a = cmd.begin(); + a != cmd.end(); ++a) + { + commandLine.push_back(*a); + } // Store this command line. commandLines.push_back(commandLine); @@ -741,7 +745,11 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); + for(std::vector::iterator a = cmd.begin(); + a != cmd.end(); ++a) + { + commandLine.push_back(*a); + } // Store this command line. commandLines.push_back(commandLine); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 96beb1c..812ded3 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1856,8 +1856,13 @@ void cmLocalUnixMakefileGenerator3 { text = "Running external command ..."; } - depends.insert(depends.end(), glIt->second.GetUtilities().begin(), - glIt->second.GetUtilities().end()); + std::set::const_iterator dit; + for ( dit = glIt->second.GetUtilities().begin(); + dit != glIt->second.GetUtilities().end(); + ++ dit ) + { + depends.push_back(*dit); + } this->AppendEcho(commands, text, cmLocalUnixMakefileGenerator3::EchoGlobal); diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index d399313..ae81c58 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -328,7 +328,11 @@ bool cmMacroCommand::InitialPass(std::vector const& args, // create a function blocker cmMacroFunctionBlocker *f = new cmMacroFunctionBlocker(); - f->Args.insert(f->Args.end(), args.begin(), args.end()); + for(std::vector::const_iterator j = args.begin(); + j != args.end(); ++j) + { + f->Args.push_back(*j); + } this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 25d5881..20dae5a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2567,7 +2567,12 @@ std::vector cmMakefile } std::vector res; - res.insert(res.end(), definitions.begin(), definitions.end()); + + std::set::iterator fit; + for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) + { + res.push_back(*fit); + } return res; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 040a7d6..067714e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -759,10 +759,13 @@ cmMakefileTargetGenerator if(const char* extra_outputs_str = source.GetProperty("OBJECT_OUTPUTS")) { - // Register these as extra files to clean. cmSystemTools::ExpandListArgument(extra_outputs_str, outputs); - this->CleanFiles.insert(this->CleanFiles.end(), - outputs.begin() + 1, outputs.end()); + for(std::vector::const_iterator eoi = outputs.begin()+1; + eoi != outputs.end(); ++eoi) + { + // Register this as an extra file to clean. + this->CleanFiles.push_back(*eoi); + } } // Write the rule. @@ -1171,7 +1174,11 @@ cmMakefileTargetGenerator { cmCustomCommandGenerator ccg(*cc, this->ConfigName, this->Makefile); const std::vector& outputs = ccg.GetOutputs(); - depends.insert(depends.end(), outputs.begin(), outputs.end()); + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + depends.push_back(*o); + } } } } @@ -1186,7 +1193,13 @@ void cmMakefileTargetGenerator depends.push_back(source.GetFullPath()); if(const char* objectDeps = source.GetProperty("OBJECT_DEPENDS")) { - cmSystemTools::ExpandListArgument(objectDeps, depends); + std::vector deps; + cmSystemTools::ExpandListArgument(objectDeps, deps); + for(std::vector::iterator i = deps.begin(); + i != deps.end(); ++i) + { + depends.push_back(*i); + } } } @@ -1455,8 +1468,11 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( } // Make sure the extra files are built. - depends.insert(depends.end(), - this->ExtraFiles.begin(), this->ExtraFiles.end()); + for(std::set::const_iterator i = this->ExtraFiles.begin(); + i != this->ExtraFiles.end(); ++i) + { + depends.push_back(*i); + } } // Write the driver rule. @@ -1543,7 +1559,11 @@ void cmMakefileTargetGenerator if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg)) { std::vector const& libDeps = cli->GetDepends(); - depends.insert(depends.end(), libDeps.begin(), libDeps.end()); + for(std::vector::const_iterator j = libDeps.begin(); + j != libDeps.end(); ++j) + { + depends.push_back(*j); + } } } @@ -1563,8 +1583,12 @@ void cmMakefileTargetGenerator } // Add dependencies on the external object files. - depends.insert(depends.end(), - this->ExternalObjects.begin(), this->ExternalObjects.end()); + for(std::vector::const_iterator obj + = this->ExternalObjects.begin(); + obj != this->ExternalObjects.end(); ++obj) + { + depends.push_back(*obj); + } // Add a dependency on the rule file itself. this->LocalGenerator->AppendRuleDepend(depends, diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 443162a..0c38366 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2188,12 +2188,24 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, std::vector command; command.push_back(this->MocExecutable); - command.insert(command.end(), - this->MocIncludes.begin(), this->MocIncludes.end()); - command.insert(command.end(), - this->MocDefinitions.begin(), this->MocDefinitions.end()); - command.insert(command.end(), - this->MocOptions.begin(), this->MocOptions.end()); + for (std::list::const_iterator it = this->MocIncludes.begin(); + it != this->MocIncludes.end(); + ++it) + { + command.push_back(*it); + } + for(std::list::const_iterator it=this->MocDefinitions.begin(); + it != this->MocDefinitions.end(); + ++it) + { + command.push_back(*it); + } + for(std::vector::const_iterator it=this->MocOptions.begin(); + it != this->MocOptions.end(); + ++it) + { + command.push_back(*it); + } #ifdef _WIN32 command.push_back("-DWIN32"); #endif @@ -2265,7 +2277,12 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, cmSystemTools::ExpandListArgument(optionIt->second, fileOpts); this->MergeUicOptions(opts, fileOpts, this->QtMajorVersion == "5"); } - command.insert(command.end(), opts.begin(), opts.end()); + for(std::vector::const_iterator optIt = opts.begin(); + optIt != opts.end(); + ++optIt) + { + command.push_back(*optIt); + } command.push_back("-o"); command.push_back(this->Builddir + ui_output_file); @@ -2351,7 +2368,14 @@ bool cmQtAutoGenerators::GenerateQrc() = this->RccOptions.find(*si); if (optionIt != this->RccOptions.end()) { - cmSystemTools::ExpandListArgument(optionIt->second, command); + std::vector opts; + cmSystemTools::ExpandListArgument(optionIt->second, opts); + for(std::vector::const_iterator optIt = opts.begin(); + optIt != opts.end(); + ++optIt) + { + command.push_back(*optIt); + } } command.push_back("-name"); diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index d8aa1cb..bcb8564 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -39,7 +39,10 @@ bool cmRemoveCommand // check for REMOVE(VAR v1 v2 ... vn) std::vector argsExpanded; std::vector temp; - temp.insert(temp.end(), args.begin() + 1, args.end()); + for(unsigned int j = 1; j < args.size(); ++j) + { + temp.push_back(args[j]); + } cmSystemTools::ExpandList(temp, argsExpanded); // now create the new value diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 630944e..c83dc2a 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1269,7 +1269,11 @@ bool cmSystemTools::Split(const char* s, std::vector& l) { std::vector temp; bool res = Superclass::Split(s, temp); - l.insert(l.end(), temp.begin(), temp.end()); + for(std::vector::const_iterator i = temp.begin(); + i != temp.end(); ++i) + { + l.push_back(*i); + } return res; } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 56e9258..865a824 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6456,8 +6456,11 @@ cmTargetInternals::ComputeLinkImplementationLanguages( // Get languages used in our source files. thisTarget->GetLanguages(languages, config); // Copy the set of langauges to the link implementation. - impl.Languages.insert(impl.Languages.begin(), - languages.begin(), languages.end()); + for(std::set::iterator li = languages.begin(); + li != languages.end(); ++li) + { + impl.Languages.push_back(*li); + } } //---------------------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestBuildHandler.cxx | 7 ++-- Source/CTest/cmCTestMultiProcessHandler.cxx | 7 ++-- Source/CTest/cmCTestP4.cxx | 6 +++- Source/CTest/cmCTestSubmitCommand.cxx | 18 +++++++--- Source/CTest/cmCTestTestHandler.cxx | 51 +++++++++++++++++++++++---- Source/cmAddTestCommand.cxx | 6 +++- Source/cmCTest.cxx | 8 +++-- Source/cmConditionEvaluator.cxx | 10 ++++-- Source/cmCustomCommand.cxx | 13 +++++-- Source/cmFindBase.cxx | 6 ++-- Source/cmFunctionCommand.cxx | 6 +++- Source/cmGeneratorExpression.cxx | 2 ++ Source/cmGeneratorTarget.cxx | 6 +++- Source/cmInstallFilesCommand.cxx | 7 ++-- Source/cmInstallProgramsCommand.cxx | 6 +++- Source/cmLocalGenerator.cxx | 12 +++++-- Source/cmLocalUnixMakefileGenerator3.cxx | 9 +++-- Source/cmMacroCommand.cxx | 6 +++- Source/cmMakefile.cxx | 7 +++- Source/cmMakefileTargetGenerator.cxx | 44 +++++++++++++++++------ Source/cmQtAutoGenerators.cxx | 40 ++++++++++++++++----- Source/cmRemoveCommand.cxx | 5 ++- Source/cmSystemTools.cxx | 6 +++- Source/cmTarget.cxx | 7 ++-- 24 files changed, 236 insertions(+), 59 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 19 00:01:16 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 19 Dec 2014 00:01:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-521-gd48ccbe Message-ID: <20141219050117.8FC8FA805B@public.kitware.com> This is an automated email from 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 d48ccbe458b796ec7c263bbe2efb28fbb8b10147 (commit) from cd7bde80bf3c3e141a92058ad033833066da509b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d48ccbe458b796ec7c263bbe2efb28fbb8b10147 commit d48ccbe458b796ec7c263bbe2efb28fbb8b10147 Author: Kitware Robot AuthorDate: Fri Dec 19 00:01:09 2014 -0500 Commit: Kitware Robot CommitDate: Fri Dec 19 00:01:09 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0c23b82..e0ecd38 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 1) -set(CMake_VERSION_PATCH 20141218) +set(CMake_VERSION_PATCH 20141219) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Fri Dec 19 02:49:17 2014 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 19 Dec 2014 02:49:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1266-g7b44de8 Message-ID: <20141219074919.49AC1A7F3B@public.kitware.com> This is an automated email from 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 7b44de887d93ce747a8afcfbf8ad4a8691895261 (commit) via feb71a03a8fe6fceade6974d907855cf2b64595a (commit) from 6213867925e250e12d4143dbabc26842a7f2c83e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b44de887d93ce747a8afcfbf8ad4a8691895261 commit 7b44de887d93ce747a8afcfbf8ad4a8691895261 Merge: 6213867 feb71a0 Author: Stephen Kelly AuthorDate: Fri Dec 19 02:49:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 02:49:14 2014 -0500 Merge topic 'AppleClang-5.1-features' into next feb71a03 Revert "Features: Record for AppleClang." http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=feb71a03a8fe6fceade6974d907855cf2b64595a commit feb71a03a8fe6fceade6974d907855cf2b64595a Author: Stephen Kelly AuthorDate: Fri Dec 19 08:48:38 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 19 08:48:38 2014 +0100 Revert "Features: Record for AppleClang." This reverts commit 7c346ae68c4094d1b97f564d86f41c118285c345. diff --git a/Modules/Compiler/AppleClang-C-FeatureTests.cmake b/Modules/Compiler/AppleClang-C-FeatureTests.cmake deleted file mode 100644 index ec1d43f..0000000 --- a/Modules/Compiler/AppleClang-C-FeatureTests.cmake +++ /dev/null @@ -1,11 +0,0 @@ - -set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") - -set(AppleClang_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L") -set(_cmake_feature_test_c_static_assert "${AppleClang_C11}") -set(AppleClang_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") -set(_cmake_feature_test_c_restrict "${AppleClang_C99}") -set(_cmake_feature_test_c_variadic_macros "${AppleClang_C99}") - -set(AppleClang_C90 "${_cmake_oldestSupported} && !defined(__STDC_VERSION__)") -set(_cmake_feature_test_c_function_prototypes "${AppleClang_C90}") diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake index 10edc74..98fcd0b 100644 --- a/Modules/Compiler/AppleClang-C.cmake +++ b/Modules/Compiler/AppleClang-C.cmake @@ -1,33 +1,2 @@ include(Compiler/Clang) __compiler_clang(C) - -if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) - set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") - set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") - - set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") - set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") - - set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") - set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") -endif() - -set(CMAKE_C_STANDARD_DEFAULT 99) - -macro(cmake_record_c_compile_features) - macro(_get_appleclang_features std_version list) - record_compiler_features(C "${std_version}" ${list}) - endmacro() - - if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) - _get_appleclang_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) - if (_result EQUAL 0) - _get_appleclang_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES) - endif() - if (_result EQUAL 0) - _get_appleclang_features(${CMAKE_C90_STANDARD_COMPILE_OPTION} CMAKE_C90_COMPILE_FEATURES) - endif() - else() - set(_result 0) - endif() -endmacro() diff --git a/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake b/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake deleted file mode 100644 index 78bdb72..0000000 --- a/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake +++ /dev/null @@ -1,31 +0,0 @@ - -# No known reference for AppleClang versions. -# Generic reference: http://clang.llvm.org/cxx_status.html -# http://clang.llvm.org/docs/LanguageExtensions.html - -set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") - -include("${CMAKE_CURRENT_LIST_DIR}/Clang-CXX-TestableFeatures.cmake") - -set(AppleClang51_CXX14 "((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L") -# http://llvm.org/bugs/show_bug.cgi?id=19242 -set(_cmake_feature_test_cxx_attribute_deprecated "${AppleClang51_CXX14}") -# http://llvm.org/bugs/show_bug.cgi?id=19698 -set(_cmake_feature_test_cxx_decltype_auto "${AppleClang51_CXX14}") -set(_cmake_feature_test_cxx_digit_separators "${AppleClang51_CXX14}") -# http://llvm.org/bugs/show_bug.cgi?id=19674 -set(_cmake_feature_test_cxx_generic_lambdas "${AppleClang51_CXX14}") - -set(AppleClang51_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L") -set(_cmake_feature_test_cxx_enum_forward_declarations "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_sizeof_member "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_extended_friend_declarations "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_extern_templates "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_func_identifier "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_inline_namespaces "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_long_long_type "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_right_angle_brackets "${AppleClang51_CXX11}") -set(_cmake_feature_test_cxx_variadic_macros "${AppleClang51_CXX11}") - -set(AppleClang_CXX98 "${_cmake_oldestSupported} && __cplusplus >= 199711L") -set(_cmake_feature_test_cxx_template_template_parameters "${AppleClang_CXX98}") diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index eb97f88..c1acae6 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -4,34 +4,3 @@ __compiler_clang(CXX) if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") endif() - -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98") - set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") - - set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") - - set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") - set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") -endif() - -set(CMAKE_CXX_STANDARD_DEFAULT 98) - -macro(cmake_record_cxx_compile_features) - macro(_get_appleclang_features std_version list) - record_compiler_features(CXX "${std_version}" ${list}) - endmacro() - - if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) - _get_appleclang_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES) - if (_result EQUAL 0) - _get_appleclang_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) - endif() - if (_result EQUAL 0) - _get_appleclang_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES) - endif() - else() - set(_result 0) - endif() -endmacro() diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index 36b9706..0b6f0de 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -100,7 +100,7 @@ # write_compiler_detection_header( # FILE climbingstats_compiler_detection.h # PREFIX ClimbingStats -# COMPILERS GNU Clang AppleClang +# COMPILERS GNU Clang # FEATURES cxx_variadic_templates # ) # @@ -315,7 +315,6 @@ function(write_compiler_detection_header set(compilers GNU Clang - AppleClang ) set(_hex_compilers ADSP Borland Embarcadero SunPro) @@ -514,7 +513,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignas(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang # define ${def_value} __attribute__ ((__aligned__(X))) # else # define ${def_value} @@ -526,7 +525,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignof(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang # define ${def_value} __alignof__(X) # endif \n") ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/AppleClang-C-FeatureTests.cmake | 11 ------- Modules/Compiler/AppleClang-C.cmake | 31 -------------------- Modules/Compiler/AppleClang-CXX-FeatureTests.cmake | 31 -------------------- Modules/Compiler/AppleClang-CXX.cmake | 31 -------------------- Modules/WriteCompilerDetectionHeader.cmake | 7 ++--- 5 files changed, 3 insertions(+), 108 deletions(-) delete mode 100644 Modules/Compiler/AppleClang-C-FeatureTests.cmake delete mode 100644 Modules/Compiler/AppleClang-CXX-FeatureTests.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 08:24:38 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 08:24:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1268-gcea029e Message-ID: <20141219132439.04217A80F3@public.kitware.com> This is an automated email from 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 cea029e066d55935e52e0b6558d8d6c41293c318 (commit) via b189c5994d94b8dd0afdf14844db4a4be28cf4b1 (commit) from 7b44de887d93ce747a8afcfbf8ad4a8691895261 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cea029e066d55935e52e0b6558d8d6c41293c318 commit cea029e066d55935e52e0b6558d8d6c41293c318 Merge: 7b44de8 b189c59 Author: Brad King AuthorDate: Fri Dec 19 08:24:38 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 08:24:38 2014 -0500 Merge topic 'osx-cfbundle-tweaks' into next b189c599 Tests: Run CFBundleTest only with valid configuration http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b189c5994d94b8dd0afdf14844db4a4be28cf4b1 commit b189c5994d94b8dd0afdf14844db4a4be28cf4b1 Author: Brad King AuthorDate: Wed Dec 17 11:42:19 2014 -0500 Commit: Brad King CommitDate: Fri Dec 19 08:24:04 2014 -0500 Tests: Run CFBundleTest only with valid configuration The verification script needs to know the configuration tested. diff --git a/Tests/CFBundleTest/VerifyResult.cmake b/Tests/CFBundleTest/VerifyResult.cmake index e622900..e637bb1 100644 --- a/Tests/CFBundleTest/VerifyResult.cmake +++ b/Tests/CFBundleTest/VerifyResult.cmake @@ -14,13 +14,10 @@ message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'") message(STATUS "dir='${dir}'") message(STATUS "gen='${gen}'") -if(gen MATCHES "Make" OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig") - set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") -else() +if(gen STREQUAL "Xcode") set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") +else() + set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") endif() if(NOT EXISTS "${expected_filename}") diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 33c18ce..568fc86 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1935,16 +1935,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest") - add_test(CFBundleTest ${CMAKE_CTEST_COMMAND} + add_test(NAME CFBundleTest COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/CFBundleTest" "${CMake_BINARY_DIR}/Tests/CFBundleTest" --build-two-config ${build_generator_args} --build-project CFBundleTest + --build-config $ --build-options ${build_options} --test-command - ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE} + ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=$ -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest -Dgen=${CMAKE_GENERATOR} -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 08:26:56 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 08:26:56 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-523-g1ac8523 Message-ID: <20141219132656.B5D05A81FE@public.kitware.com> This is an automated email from 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 1ac8523c3bd4f404d8306b3d5fe905e1d988461c (commit) via dd089e08b578f20b7dc7d2ce658e3df05e346e35 (commit) from d48ccbe458b796ec7c263bbe2efb28fbb8b10147 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ac8523c3bd4f404d8306b3d5fe905e1d988461c commit 1ac8523c3bd4f404d8306b3d5fe905e1d988461c Merge: d48ccbe dd089e0 Author: Brad King AuthorDate: Fri Dec 19 08:26:55 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 08:26:55 2014 -0500 Merge topic 'install-EXPORT-absolute-prefix' dd089e08 install: Allow absolute EXPORT destination with relative targets (#15258) ----------------------------------------------------------------------- Summary of changes: .../release/dev/install-EXPORT-absolute-prefix.rst | 9 ++++ Source/cmExportInstallFileGenerator.cxx | 57 +++++++------------- Source/cmExportInstallFileGenerator.h | 4 -- Tests/ExportImport/Export/CMakeLists.txt | 15 ++++++ .../Export/include/abs/1a/testLibAbs1a.h | 1 + .../Export/include/abs/1b/testLibAbs1b.h | 1 + .../ExportImport/Export/include/abs/testLibAbs1.h | 1 + Tests/ExportImport/Export/testLibAbs1.c | 1 + Tests/ExportImport/Import/A/CMakeLists.txt | 10 ++++ Tests/ExportImport/Import/A/imp_testExeAbs1.c | 15 ++++++ 10 files changed, 73 insertions(+), 41 deletions(-) create mode 100644 Help/release/dev/install-EXPORT-absolute-prefix.rst create mode 100644 Tests/ExportImport/Export/include/abs/1a/testLibAbs1a.h create mode 100644 Tests/ExportImport/Export/include/abs/1b/testLibAbs1b.h create mode 100644 Tests/ExportImport/Export/include/abs/testLibAbs1.h create mode 100644 Tests/ExportImport/Export/testLibAbs1.c create mode 100644 Tests/ExportImport/Import/A/imp_testExeAbs1.c hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 08:26:58 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 08:26:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-527-gccd5822 Message-ID: <20141219132658.EAFFAA8213@public.kitware.com> This is an automated email from 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 ccd5822a8322155a491ad871fa135cfce1ef9a88 (commit) via b189c5994d94b8dd0afdf14844db4a4be28cf4b1 (commit) via 3a605693a5349a252bb9c3eb472d02b1c23886e3 (commit) via 207b7af00be53f0779c4896f311f130455d3aadd (commit) from 1ac8523c3bd4f404d8306b3d5fe905e1d988461c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccd5822a8322155a491ad871fa135cfce1ef9a88 commit ccd5822a8322155a491ad871fa135cfce1ef9a88 Merge: 1ac8523 b189c59 Author: Brad King AuthorDate: Fri Dec 19 08:26:57 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 08:26:57 2014 -0500 Merge topic 'osx-cfbundle-tweaks' b189c599 Tests: Run CFBundleTest only with valid configuration 3a605693 Xcode: Call IsCFBundleOnApple to decide if bundle is being built 207b7af0 cmTarget: Use GetCFBundleDirectory within GetFullNameInternal ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmTarget.cxx | 11 ++--------- Tests/CFBundleTest/VerifyResult.cmake | 9 +++------ Tests/CMakeLists.txt | 5 +++-- 4 files changed, 9 insertions(+), 18 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 08:27:00 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 08:27:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-530-gbf731be Message-ID: <20141219132700.E87CAA8211@public.kitware.com> This is an automated email from 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 bf731becfacfcbc1512644c60a706d385850a2e1 (commit) via 2e9acb6d4335064f5c742e5f96eac604f1abfa23 (commit) via 1f7de54346142f05aef5814ee16754fba017b521 (commit) from ccd5822a8322155a491ad871fa135cfce1ef9a88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf731becfacfcbc1512644c60a706d385850a2e1 commit bf731becfacfcbc1512644c60a706d385850a2e1 Merge: ccd5822 2e9acb6 Author: Brad King AuthorDate: Fri Dec 19 08:26:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 08:26:59 2014 -0500 Merge topic 'update-kwsys' 2e9acb6d Merge branch 'upstream-kwsys' into update-kwsys 1f7de543 KWSys 2014-12-18 (87c65319) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SharedForward.h.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 08:27:02 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 08:27:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-532-g852242b Message-ID: <20141219132702.F409EA8219@public.kitware.com> This is an automated email from 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 852242b60d09d505ea59dc4eaccc149df87ce7fc (commit) via 44c6db6eb13b52683ad1b4ce49e6805cff076dfb (commit) from bf731becfacfcbc1512644c60a706d385850a2e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=852242b60d09d505ea59dc4eaccc149df87ce7fc commit 852242b60d09d505ea59dc4eaccc149df87ce7fc Merge: bf731be 44c6db6 Author: Brad King AuthorDate: Fri Dec 19 08:27:01 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 08:27:01 2014 -0500 Merge topic 'bootstrap-solaris' 44c6db6e bootstrap: Fix syntax for Solaris 10 shell (#15317) ----------------------------------------------------------------------- Summary of changes: bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 08:27:45 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 08:27:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1274-g193897f Message-ID: <20141219132745.5BF2DA8208@public.kitware.com> This is an automated email from 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 193897f7eda7150a4ae8d4de0dec70f2910f934e (commit) via 852242b60d09d505ea59dc4eaccc149df87ce7fc (commit) via bf731becfacfcbc1512644c60a706d385850a2e1 (commit) via ccd5822a8322155a491ad871fa135cfce1ef9a88 (commit) via 1ac8523c3bd4f404d8306b3d5fe905e1d988461c (commit) via d48ccbe458b796ec7c263bbe2efb28fbb8b10147 (commit) from cea029e066d55935e52e0b6558d8d6c41293c318 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=193897f7eda7150a4ae8d4de0dec70f2910f934e commit 193897f7eda7150a4ae8d4de0dec70f2910f934e Merge: cea029e 852242b Author: Brad King AuthorDate: Fri Dec 19 08:27:35 2014 -0500 Commit: Brad King CommitDate: Fri Dec 19 08:27:35 2014 -0500 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 Dec 19 09:00:31 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 09:00:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1276-g5615032 Message-ID: <20141219140032.A9838A81D0@public.kitware.com> This is an automated email from 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 5615032515324d017f9181de515b18f2b8ac22dd (commit) via 267f613f961701bf24bbacf335668d77d5fb06ce (commit) from 193897f7eda7150a4ae8d4de0dec70f2910f934e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5615032515324d017f9181de515b18f2b8ac22dd commit 5615032515324d017f9181de515b18f2b8ac22dd Merge: 193897f 267f613 Author: Brad King AuthorDate: Fri Dec 19 09:00:29 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 09:00:29 2014 -0500 Merge topic 'doc-mingw-makefiles' into next 267f613f Help: Clarify MinGW v. MSYS Makefiles generators (#15319) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=267f613f961701bf24bbacf335668d77d5fb06ce commit 267f613f961701bf24bbacf335668d77d5fb06ce Author: Brad King AuthorDate: Fri Dec 19 08:51:17 2014 -0500 Commit: Brad King CommitDate: Fri Dec 19 09:00:03 2014 -0500 Help: Clarify MinGW v. MSYS Makefiles generators (#15319) Explain the usage of each generator more clearly and reference each as an alternative to the other. Suggested-by: Craig Hicks diff --git a/Help/generator/MSYS Makefiles.rst b/Help/generator/MSYS Makefiles.rst index 0b89126..f7cfa44 100644 --- a/Help/generator/MSYS Makefiles.rst +++ b/Help/generator/MSYS Makefiles.rst @@ -1,7 +1,11 @@ MSYS Makefiles -------------- -Generates MSYS makefiles. +Generates makefiles for use with MSYS ``make`` under the MSYS shell. -The makefiles use /bin/sh as the shell. They require msys to be -installed on the machine. +Use this generator in a MSYS shell prompt and using ``make`` as the build +tool. The generated makefiles use ``/bin/sh`` as the shell to launch build +rules. They are not compatible with a Windows command prompt. + +To build under a Windows command prompt, use the +:generator:`MinGW Makefiles` generator. diff --git a/Help/generator/MinGW Makefiles.rst b/Help/generator/MinGW Makefiles.rst index ed4ccdd..9fe5fe3 100644 --- a/Help/generator/MinGW Makefiles.rst +++ b/Help/generator/MinGW Makefiles.rst @@ -1,7 +1,12 @@ MinGW Makefiles --------------- -Generates a make file for use with mingw32-make. +Generates makefiles for use with ``mingw32-make`` under a Windows command +prompt. -The makefiles generated use cmd.exe as the shell. They do not require -msys or a unix shell. +Use this generator under a Windows command prompt with MinGW in the ``PATH`` +and using ``mingw32-make`` as the build tool. The generated makefiles use +``cmd.exe`` as the shell to launch build rules. They are not compatible with +MSYS or a unix shell. + +To build under the MSYS shell, use the :generator:`MSYS Makefiles` generator. ----------------------------------------------------------------------- Summary of changes: Help/generator/MSYS Makefiles.rst | 10 +++++++--- Help/generator/MinGW Makefiles.rst | 11 ++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 10:39:46 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 10:39:46 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1278-gb73a2d2 Message-ID: <20141219153946.0A8549A030@public.kitware.com> This is an automated email from 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 b73a2d2cdc48ca73c4ffa634500edba9d6be47f3 (commit) via 844f98c1fd1c9c61f1d73310ee1eb712528cd00f (commit) from 5615032515324d017f9181de515b18f2b8ac22dd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b73a2d2cdc48ca73c4ffa634500edba9d6be47f3 commit b73a2d2cdc48ca73c4ffa634500edba9d6be47f3 Merge: 5615032 844f98c Author: Brad King AuthorDate: Fri Dec 19 10:39:45 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 10:39:45 2014 -0500 Merge topic 'doc-mingw-makefiles' into next 844f98c1 Help: Clarify MinGW v. MSYS Makefiles generators (#15319) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=844f98c1fd1c9c61f1d73310ee1eb712528cd00f commit 844f98c1fd1c9c61f1d73310ee1eb712528cd00f Author: Brad King AuthorDate: Fri Dec 19 08:51:17 2014 -0500 Commit: Brad King CommitDate: Fri Dec 19 09:07:25 2014 -0500 Help: Clarify MinGW v. MSYS Makefiles generators (#15319) Explain the usage of each generator more clearly and reference each as an alternative to the other. Suggested-by: Craig Hicks diff --git a/Help/generator/MSYS Makefiles.rst b/Help/generator/MSYS Makefiles.rst index 0b89126..f7cfa44 100644 --- a/Help/generator/MSYS Makefiles.rst +++ b/Help/generator/MSYS Makefiles.rst @@ -1,7 +1,11 @@ MSYS Makefiles -------------- -Generates MSYS makefiles. +Generates makefiles for use with MSYS ``make`` under the MSYS shell. -The makefiles use /bin/sh as the shell. They require msys to be -installed on the machine. +Use this generator in a MSYS shell prompt and using ``make`` as the build +tool. The generated makefiles use ``/bin/sh`` as the shell to launch build +rules. They are not compatible with a Windows command prompt. + +To build under a Windows command prompt, use the +:generator:`MinGW Makefiles` generator. diff --git a/Help/generator/MinGW Makefiles.rst b/Help/generator/MinGW Makefiles.rst index ed4ccdd..9fe5fe3 100644 --- a/Help/generator/MinGW Makefiles.rst +++ b/Help/generator/MinGW Makefiles.rst @@ -1,7 +1,12 @@ MinGW Makefiles --------------- -Generates a make file for use with mingw32-make. +Generates makefiles for use with ``mingw32-make`` under a Windows command +prompt. -The makefiles generated use cmd.exe as the shell. They do not require -msys or a unix shell. +Use this generator under a Windows command prompt with MinGW in the ``PATH`` +and using ``mingw32-make`` as the build tool. The generated makefiles use +``cmd.exe`` as the shell to launch build rules. They are not compatible with +MSYS or a unix shell. + +To build under the MSYS shell, use the :generator:`MSYS Makefiles` generator. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From steveire at gmail.com Fri Dec 19 11:36:36 2014 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 19 Dec 2014 11:36:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1283-g8bda2ec Message-ID: <20141219163636.131F8A83FF@public.kitware.com> This is an automated email from 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 8bda2ecb6781d89957e2d4fb65d333bfa1530395 (commit) via 44f02a017d4a1f61488a9116cef24330ec1a10d9 (commit) via e2a489c76aed54e96e85627a66692a11784e9824 (commit) via 0f99feec04193504a5a9ffc05e2132619ecf7dfe (commit) via 722f1a71e397d1ebfad439fcaae6e199c8976289 (commit) from b73a2d2cdc48ca73c4ffa634500edba9d6be47f3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8bda2ecb6781d89957e2d4fb65d333bfa1530395 commit 8bda2ecb6781d89957e2d4fb65d333bfa1530395 Merge: b73a2d2 44f02a0 Author: Stephen Kelly AuthorDate: Fri Dec 19 11:36:34 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 11:36:34 2014 -0500 Merge topic 'use-insert-with-iterators' into next 44f02a01 Use insert instead of a loop in some cases. e2a489c7 Remove some temporary vectors for ExpandListArgument. 0f99feec cmGeneratorExpression: Remove unused header. 722f1a71 CTest: Expand a string directly into a container. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44f02a017d4a1f61488a9116cef24330ec1a10d9 commit 44f02a017d4a1f61488a9116cef24330ec1a10d9 Author: Stephen Kelly AuthorDate: Sat Nov 22 11:00:45 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 19 00:06:00 2014 +0100 Use insert instead of a loop in some cases. Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set. diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index d226a6c..5e7d764 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -1094,11 +1094,8 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, { // Create a contiguous array for the line this->CurrentProcessingLine.clear(); - t_BuildProcessingQueueType::iterator cit; - for ( cit = queue->begin(); cit != it; ++cit ) - { - this->CurrentProcessingLine.push_back(*cit); - } + this->CurrentProcessingLine.insert(this->CurrentProcessingLine.end(), + queue->begin(), queue->end()); this->CurrentProcessingLine.push_back(0); const char* line = &*this->CurrentProcessingLine.begin(); diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 4c89caa..97637ed 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -526,11 +526,8 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() TestList sortedCopy; - for(TestSet::const_iterator j = currentSet.begin(); - j != currentSet.end(); ++j) - { - sortedCopy.push_back(*j); - } + sortedCopy.insert(sortedCopy.end(), + currentSet.begin(), currentSet.end()); std::stable_sort(sortedCopy.begin(), sortedCopy.end(), comp); diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index 0bb1a99..52b98d7 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -349,11 +349,7 @@ void cmCTestP4::SetP4Options(std::vector &CommandOptions) std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - for(std::vector::const_iterator ai = args.begin(); - ai != args.end(); ++ai) - { - P4Options.push_back(*ai); - } + P4Options.insert(P4Options.end(), args.begin(), args.end()); } CommandOptions.clear(); diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 07a994d..4aa8d04 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -74,13 +74,8 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector notesFiles; cmCTest::VectorOfStrings newNotesFiles; cmSystemTools::ExpandListArgument(notesFilesVariable,notesFiles); - std::vector::iterator it; - for ( it = notesFiles.begin(); - it != notesFiles.end(); - ++ it ) - { - newNotesFiles.push_back(*it); - } + newNotesFiles.insert(newNotesFiles.end(), + notesFiles.begin(), notesFiles.end()); this->CTest->GenerateNotesFile(newNotesFiles); } @@ -91,13 +86,8 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector extraFiles; cmCTest::VectorOfStrings newExtraFiles; cmSystemTools::ExpandListArgument(extraFilesVariable,extraFiles); - std::vector::iterator it; - for ( it = extraFiles.begin(); - it != extraFiles.end(); - ++ it ) - { - newExtraFiles.push_back(*it); - } + newExtraFiles.insert(newExtraFiles.end(), + extraFiles.begin(), extraFiles.end()); if ( !this->CTest->SubmitExtraFiles(newExtraFiles)) { this->SetError("problem submitting extra files."); diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index 2531a1a..dc3b4c2 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -36,11 +36,7 @@ bool cmAddTestCommand // Collect the command with arguments. std::vector command; - for(std::vector::const_iterator it = args.begin() + 1; - it != args.end(); ++it) - { - command.push_back(*it); - } + command.insert(command.end(), args.begin() + 1, args.end()); // Create the test but add a generator only the first time it is // seen. This preserves behavior from before test generators. diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index aba26de..7a601e2 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -53,10 +53,7 @@ bool cmConditionEvaluator::IsTrue( cmArgumentList newArgs; // copy to the list structure - for(unsigned int i = 0; i < args.size(); ++i) - { - newArgs.push_back(args[i]); - } + newArgs.insert(newArgs.end(), args.begin(), args.end()); // now loop through the arguments and see if we can reduce any of them // we do this multiple times. Once for each level of precedence @@ -411,10 +408,7 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList &newArgs, // copy to the list structure cmArgumentList::iterator argP1 = arg; argP1++; - for(; argP1 != argClose; argP1++) - { - newArgs2.push_back(*argP1); - } + newArgs2.insert(newArgs2.end(), argP1, argClose); newArgs2.pop_back(); // now recursively invoke IsTrue to handle the values inside the // parenthetical expression diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 2afb029..015825d 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -131,21 +131,14 @@ const char* cmCustomCommand::GetComment() const //---------------------------------------------------------------------------- void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines) { - for(cmCustomCommandLines::const_iterator i=commandLines.begin(); - i != commandLines.end(); ++i) - { - this->CommandLines.push_back(*i); - } + this->CommandLines.insert(this->CommandLines.end(), + commandLines.begin(), commandLines.end()); } //---------------------------------------------------------------------------- void cmCustomCommand::AppendDepends(const std::vector& depends) { - for(std::vector::const_iterator i=depends.begin(); - i != depends.end(); ++i) - { - this->Depends.push_back(*i); - } + this->Depends.insert(this->Depends.end(), depends.begin(), depends.end()); } //---------------------------------------------------------------------------- diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index beb6dde..013724e 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -184,10 +184,8 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) std::vector shortArgs = this->Names; this->Names.clear(); // clear out any values in Names this->Names.push_back(shortArgs[0]); - for(unsigned int j = 1; j < shortArgs.size(); ++j) - { - this->UserGuessArgs.push_back(shortArgs[j]); - } + this->UserGuessArgs.insert(this->UserGuessArgs.end(), + shortArgs.begin() + 1, shortArgs.end()); } this->ExpandPaths(); diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 3580374..488538f 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -271,11 +271,7 @@ bool cmFunctionCommand // create a function blocker cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker(); - for(std::vector::const_iterator j = args.begin(); - j != args.end(); ++j) - { - f->Args.push_back(*j); - } + f->Args.insert(f->Args.end(), args.begin(), args.end()); this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 2b531e2..435452c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -489,11 +489,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir, unique.insert(*li); } result.clear(); - for(std::set::iterator li = unique.begin(); - li != unique.end(); ++li) - { - result.push_back(*li); - } + result.insert(result.end(), unique.begin(), unique.end()); IncludeCacheType::value_type entry(config_upper, result); iter = this->SystemIncludesCache.insert(entry).first; diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index f106e1a..a007693 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -47,11 +47,8 @@ bool cmInstallFilesCommand else { this->IsFilesForm = false; - std::vector::const_iterator s = args.begin(); - for (++s;s != args.end(); ++s) - { - this->FinalArgs.push_back(*s); - } + this->FinalArgs.insert(this->FinalArgs.end(), + args.begin() + 1, args.end()); } this->Makefile->GetLocalGenerator()->GetGlobalGenerator() diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index 0405769..cc223ab 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -27,11 +27,7 @@ bool cmInstallProgramsCommand this->Destination = args[0]; - std::vector::const_iterator s = args.begin(); - for (++s;s != args.end(); ++s) - { - this->FinalArgs.push_back(*s); - } + this->FinalArgs.insert(this->FinalArgs.end(), args.begin() + 1, args.end()); this->Makefile->GetLocalGenerator()->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2de6c93..a4185ad 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -634,11 +634,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); - a != cmd.end(); ++a) - { - commandLine.push_back(*a); - } + commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); // Store this command line. commandLines.push_back(commandLine); @@ -745,11 +741,7 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); - a != cmd.end(); ++a) - { - commandLine.push_back(*a); - } + commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); // Store this command line. commandLines.push_back(commandLine); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 812ded3..96beb1c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1856,13 +1856,8 @@ void cmLocalUnixMakefileGenerator3 { text = "Running external command ..."; } - std::set::const_iterator dit; - for ( dit = glIt->second.GetUtilities().begin(); - dit != glIt->second.GetUtilities().end(); - ++ dit ) - { - depends.push_back(*dit); - } + depends.insert(depends.end(), glIt->second.GetUtilities().begin(), + glIt->second.GetUtilities().end()); this->AppendEcho(commands, text, cmLocalUnixMakefileGenerator3::EchoGlobal); diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index ae81c58..d399313 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -328,11 +328,7 @@ bool cmMacroCommand::InitialPass(std::vector const& args, // create a function blocker cmMacroFunctionBlocker *f = new cmMacroFunctionBlocker(); - for(std::vector::const_iterator j = args.begin(); - j != args.end(); ++j) - { - f->Args.push_back(*j); - } + f->Args.insert(f->Args.end(), args.begin(), args.end()); this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 20dae5a..25d5881 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2567,12 +2567,7 @@ std::vector cmMakefile } std::vector res; - - std::set::iterator fit; - for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) - { - res.push_back(*fit); - } + res.insert(res.end(), definitions.begin(), definitions.end()); return res; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index cbf8573..040a7d6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -759,13 +759,10 @@ cmMakefileTargetGenerator if(const char* extra_outputs_str = source.GetProperty("OBJECT_OUTPUTS")) { + // Register these as extra files to clean. cmSystemTools::ExpandListArgument(extra_outputs_str, outputs); - for(std::vector::const_iterator eoi = outputs.begin()+1; - eoi != outputs.end(); ++eoi) - { - // Register this as an extra file to clean. - this->CleanFiles.push_back(*eoi); - } + this->CleanFiles.insert(this->CleanFiles.end(), + outputs.begin() + 1, outputs.end()); } // Write the rule. @@ -1174,11 +1171,7 @@ cmMakefileTargetGenerator { cmCustomCommandGenerator ccg(*cc, this->ConfigName, this->Makefile); const std::vector& outputs = ccg.GetOutputs(); - for(std::vector::const_iterator o = outputs.begin(); - o != outputs.end(); ++o) - { - depends.push_back(*o); - } + depends.insert(depends.end(), outputs.begin(), outputs.end()); } } } @@ -1462,11 +1455,8 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( } // Make sure the extra files are built. - for(std::set::const_iterator i = this->ExtraFiles.begin(); - i != this->ExtraFiles.end(); ++i) - { - depends.push_back(*i); - } + depends.insert(depends.end(), + this->ExtraFiles.begin(), this->ExtraFiles.end()); } // Write the driver rule. @@ -1553,11 +1543,7 @@ void cmMakefileTargetGenerator if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg)) { std::vector const& libDeps = cli->GetDepends(); - for(std::vector::const_iterator j = libDeps.begin(); - j != libDeps.end(); ++j) - { - depends.push_back(*j); - } + depends.insert(depends.end(), libDeps.begin(), libDeps.end()); } } @@ -1577,12 +1563,8 @@ void cmMakefileTargetGenerator } // Add dependencies on the external object files. - for(std::vector::const_iterator obj - = this->ExternalObjects.begin(); - obj != this->ExternalObjects.end(); ++obj) - { - depends.push_back(*obj); - } + depends.insert(depends.end(), + this->ExternalObjects.begin(), this->ExternalObjects.end()); // Add a dependency on the rule file itself. this->LocalGenerator->AppendRuleDepend(depends, diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a01a384..443162a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2188,24 +2188,12 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, std::vector command; command.push_back(this->MocExecutable); - for (std::list::const_iterator it = this->MocIncludes.begin(); - it != this->MocIncludes.end(); - ++it) - { - command.push_back(*it); - } - for(std::list::const_iterator it=this->MocDefinitions.begin(); - it != this->MocDefinitions.end(); - ++it) - { - command.push_back(*it); - } - for(std::vector::const_iterator it=this->MocOptions.begin(); - it != this->MocOptions.end(); - ++it) - { - command.push_back(*it); - } + command.insert(command.end(), + this->MocIncludes.begin(), this->MocIncludes.end()); + command.insert(command.end(), + this->MocDefinitions.begin(), this->MocDefinitions.end()); + command.insert(command.end(), + this->MocOptions.begin(), this->MocOptions.end()); #ifdef _WIN32 command.push_back("-DWIN32"); #endif @@ -2277,12 +2265,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, cmSystemTools::ExpandListArgument(optionIt->second, fileOpts); this->MergeUicOptions(opts, fileOpts, this->QtMajorVersion == "5"); } - for(std::vector::const_iterator optIt = opts.begin(); - optIt != opts.end(); - ++optIt) - { - command.push_back(*optIt); - } + command.insert(command.end(), opts.begin(), opts.end()); command.push_back("-o"); command.push_back(this->Builddir + ui_output_file); diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index bcb8564..d8aa1cb 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -39,10 +39,7 @@ bool cmRemoveCommand // check for REMOVE(VAR v1 v2 ... vn) std::vector argsExpanded; std::vector temp; - for(unsigned int j = 1; j < args.size(); ++j) - { - temp.push_back(args[j]); - } + temp.insert(temp.end(), args.begin() + 1, args.end()); cmSystemTools::ExpandList(temp, argsExpanded); // now create the new value diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c83dc2a..630944e 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1269,11 +1269,7 @@ bool cmSystemTools::Split(const char* s, std::vector& l) { std::vector temp; bool res = Superclass::Split(s, temp); - for(std::vector::const_iterator i = temp.begin(); - i != temp.end(); ++i) - { - l.push_back(*i); - } + l.insert(l.end(), temp.begin(), temp.end()); return res; } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 865a824..56e9258 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6456,11 +6456,8 @@ cmTargetInternals::ComputeLinkImplementationLanguages( // Get languages used in our source files. thisTarget->GetLanguages(languages, config); // Copy the set of langauges to the link implementation. - for(std::set::iterator li = languages.begin(); - li != languages.end(); ++li) - { - impl.Languages.push_back(*li); - } + impl.Languages.insert(impl.Languages.begin(), + languages.begin(), languages.end()); } //---------------------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2a489c76aed54e96e85627a66692a11784e9824 commit e2a489c76aed54e96e85627a66692a11784e9824 Author: Stephen Kelly AuthorDate: Thu Dec 18 21:03:38 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 19 00:06:00 2014 +0100 Remove some temporary vectors for ExpandListArgument. Expand directly into the target when possible. diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f330e58..78f1fd4 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2153,25 +2153,11 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "ATTACHED_FILES" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->AttachedFiles.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->AttachedFiles); } if ( key == "ATTACHED_FILES_ON_FAIL" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->AttachOnFail.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->AttachOnFail); } if ( key == "RESOURCE_LOCK" ) { @@ -2195,14 +2181,7 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "REQUIRED_FILES" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->RequiredFiles.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->RequiredFiles); } if ( key == "RUN_SERIAL" ) { @@ -2239,33 +2218,15 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "DEPENDS" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Depends.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Depends); } if ( key == "ENVIRONMENT" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Environment.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Environment); } if ( key == "LABELS" ) { - std::vector lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Labels.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Labels); } if ( key == "MEASUREMENT" ) { diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 067714e..cbf8573 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1193,13 +1193,7 @@ void cmMakefileTargetGenerator depends.push_back(source.GetFullPath()); if(const char* objectDeps = source.GetProperty("OBJECT_DEPENDS")) { - std::vector deps; - cmSystemTools::ExpandListArgument(objectDeps, deps); - for(std::vector::iterator i = deps.begin(); - i != deps.end(); ++i) - { - depends.push_back(*i); - } + cmSystemTools::ExpandListArgument(objectDeps, depends); } } diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 0c38366..a01a384 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2368,14 +2368,7 @@ bool cmQtAutoGenerators::GenerateQrc() = this->RccOptions.find(*si); if (optionIt != this->RccOptions.end()) { - std::vector opts; - cmSystemTools::ExpandListArgument(optionIt->second, opts); - for(std::vector::const_iterator optIt = opts.begin(); - optIt != opts.end(); - ++optIt) - { - command.push_back(*optIt); - } + cmSystemTools::ExpandListArgument(optionIt->second, command); } command.push_back("-name"); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f99feec04193504a5a9ffc05e2132619ecf7dfe commit 0f99feec04193504a5a9ffc05e2132619ecf7dfe Author: Stephen Kelly AuthorDate: Thu Dec 18 18:50:50 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 19 00:06:00 2014 +0100 cmGeneratorExpression: Remove unused header. diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index b6fe414..861122c 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -15,8 +15,6 @@ #include "cmTarget.h" #include "assert.h" -#include - #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=722f1a71e397d1ebfad439fcaae6e199c8976289 commit 722f1a71e397d1ebfad439fcaae6e199c8976289 Author: Stephen Kelly AuthorDate: Thu Dec 18 21:10:44 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 19 00:05:57 2014 +0100 CTest: Expand a string directly into a container. Change the follow-up loop to use a const_iterator to log the content. diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2bf7b77..80dbaf3 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2598,16 +2598,14 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const std::string& def, return; } cmCTestLog(this, DEBUG, "PopulateCustomVector: " << def << std::endl); - std::vector slist; - cmSystemTools::ExpandListArgument(dval, slist); - std::vector::iterator it; vec.clear(); + cmSystemTools::ExpandListArgument(dval, vec); - for ( it = slist.begin(); it != slist.end(); ++it ) + for (std::vector::const_iterator it = vec.begin(); + it != vec.end(); ++it ) { cmCTestLog(this, DEBUG, " -- " << *it << std::endl); - vec.push_back(*it); } } ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestBuildHandler.cxx | 7 ++-- Source/CTest/cmCTestMultiProcessHandler.cxx | 7 ++-- Source/CTest/cmCTestP4.cxx | 6 +--- Source/CTest/cmCTestSubmitCommand.cxx | 18 +++------- Source/CTest/cmCTestTestHandler.cxx | 51 ++++----------------------- Source/cmAddTestCommand.cxx | 6 +--- Source/cmCTest.cxx | 8 ++--- Source/cmConditionEvaluator.cxx | 10 ++---- Source/cmCustomCommand.cxx | 13 ++----- Source/cmFindBase.cxx | 6 ++-- Source/cmFunctionCommand.cxx | 6 +--- Source/cmGeneratorExpression.cxx | 2 -- Source/cmGeneratorTarget.cxx | 6 +--- Source/cmInstallFilesCommand.cxx | 7 ++-- Source/cmInstallProgramsCommand.cxx | 6 +--- Source/cmLocalGenerator.cxx | 12 ++----- Source/cmLocalUnixMakefileGenerator3.cxx | 9 ++--- Source/cmMacroCommand.cxx | 6 +--- Source/cmMakefile.cxx | 7 +--- Source/cmMakefileTargetGenerator.cxx | 44 ++++++----------------- Source/cmQtAutoGenerators.cxx | 40 +++++---------------- Source/cmRemoveCommand.cxx | 5 +-- Source/cmSystemTools.cxx | 6 +--- Source/cmTarget.cxx | 7 ++-- 24 files changed, 59 insertions(+), 236 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Fri Dec 19 11:39:05 2014 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 19 Dec 2014 11:39:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1285-g9bec0ea Message-ID: <20141219163905.0C6602439@public.kitware.com> This is an automated email from 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 9bec0eacdee5b500262d9298dac87ad13586d8a2 (commit) via 15c15fc05ad351f1f14bba92c0642a5737c28b52 (commit) from 8bda2ecb6781d89957e2d4fb65d333bfa1530395 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9bec0eacdee5b500262d9298dac87ad13586d8a2 commit 9bec0eacdee5b500262d9298dac87ad13586d8a2 Merge: 8bda2ec 15c15fc Author: Stephen Kelly AuthorDate: Fri Dec 19 11:39:04 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 11:39:04 2014 -0500 Merge topic 'AppleClang-5.1-features' into next 15c15fc0 Features: Record for AppleClang. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15c15fc05ad351f1f14bba92c0642a5737c28b52 commit 15c15fc05ad351f1f14bba92c0642a5737c28b52 Author: Stephen Kelly AuthorDate: Wed Nov 12 22:48:17 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 19 17:38:19 2014 +0100 Features: Record for AppleClang. diff --git a/Modules/Compiler/AppleClang-C-FeatureTests.cmake b/Modules/Compiler/AppleClang-C-FeatureTests.cmake new file mode 100644 index 0000000..ec1d43f --- /dev/null +++ b/Modules/Compiler/AppleClang-C-FeatureTests.cmake @@ -0,0 +1,11 @@ + +set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") + +set(AppleClang_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L") +set(_cmake_feature_test_c_static_assert "${AppleClang_C11}") +set(AppleClang_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") +set(_cmake_feature_test_c_restrict "${AppleClang_C99}") +set(_cmake_feature_test_c_variadic_macros "${AppleClang_C99}") + +set(AppleClang_C90 "${_cmake_oldestSupported} && !defined(__STDC_VERSION__)") +set(_cmake_feature_test_c_function_prototypes "${AppleClang_C90}") diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake index 98fcd0b..10edc74 100644 --- a/Modules/Compiler/AppleClang-C.cmake +++ b/Modules/Compiler/AppleClang-C.cmake @@ -1,2 +1,33 @@ include(Compiler/Clang) __compiler_clang(C) + +if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) + set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") + + set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + + set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") +endif() + +set(CMAKE_C_STANDARD_DEFAULT 99) + +macro(cmake_record_c_compile_features) + macro(_get_appleclang_features std_version list) + record_compiler_features(C "${std_version}" ${list}) + endmacro() + + if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) + _get_appleclang_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES) + endif() + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_C90_STANDARD_COMPILE_OPTION} CMAKE_C90_COMPILE_FEATURES) + endif() + else() + set(_result 0) + endif() +endmacro() diff --git a/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake b/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake new file mode 100644 index 0000000..78bdb72 --- /dev/null +++ b/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake @@ -0,0 +1,31 @@ + +# No known reference for AppleClang versions. +# Generic reference: http://clang.llvm.org/cxx_status.html +# http://clang.llvm.org/docs/LanguageExtensions.html + +set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") + +include("${CMAKE_CURRENT_LIST_DIR}/Clang-CXX-TestableFeatures.cmake") + +set(AppleClang51_CXX14 "((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L") +# http://llvm.org/bugs/show_bug.cgi?id=19242 +set(_cmake_feature_test_cxx_attribute_deprecated "${AppleClang51_CXX14}") +# http://llvm.org/bugs/show_bug.cgi?id=19698 +set(_cmake_feature_test_cxx_decltype_auto "${AppleClang51_CXX14}") +set(_cmake_feature_test_cxx_digit_separators "${AppleClang51_CXX14}") +# http://llvm.org/bugs/show_bug.cgi?id=19674 +set(_cmake_feature_test_cxx_generic_lambdas "${AppleClang51_CXX14}") + +set(AppleClang51_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_enum_forward_declarations "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_sizeof_member "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_extended_friend_declarations "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_extern_templates "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_func_identifier "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_inline_namespaces "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_long_long_type "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_right_angle_brackets "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_variadic_macros "${AppleClang51_CXX11}") + +set(AppleClang_CXX98 "${_cmake_oldestSupported} && __cplusplus >= 199711L") +set(_cmake_feature_test_cxx_template_template_parameters "${AppleClang_CXX98}") diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index c1acae6..eb97f88 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -4,3 +4,34 @@ __compiler_clang(CXX) if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") endif() + +if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") + + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") + + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") +endif() + +set(CMAKE_CXX_STANDARD_DEFAULT 98) + +macro(cmake_record_cxx_compile_features) + macro(_get_appleclang_features std_version list) + record_compiler_features(CXX "${std_version}" ${list}) + endmacro() + + if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + _get_appleclang_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES) + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) + endif() + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES) + endif() + else() + set(_result 0) + endif() +endmacro() diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index 0b6f0de..36b9706 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -100,7 +100,7 @@ # write_compiler_detection_header( # FILE climbingstats_compiler_detection.h # PREFIX ClimbingStats -# COMPILERS GNU Clang +# COMPILERS GNU Clang AppleClang # FEATURES cxx_variadic_templates # ) # @@ -315,6 +315,7 @@ function(write_compiler_detection_header set(compilers GNU Clang + AppleClang ) set(_hex_compilers ADSP Borland Embarcadero SunPro) @@ -513,7 +514,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignas(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang # define ${def_value} __attribute__ ((__aligned__(X))) # else # define ${def_value} @@ -525,7 +526,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignof(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang # define ${def_value} __alignof__(X) # endif \n") diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index 62c7e8c..5b2f1de 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -11,7 +11,7 @@ get_property(c_known_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) write_compiler_detection_header( FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h" PREFIX TEST - COMPILERS GNU Clang + COMPILERS GNU Clang AppleClang VERSION 3.1 PROLOG "// something" EPILOG "// more" @@ -57,14 +57,16 @@ macro(set_defines target true_defs false_defs) endmacro() if (CMAKE_CXX_COMPILER_ID STREQUAL GNU - OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) + OR CMAKE_CXX_COMPILER_ID STREQUAL Clang + OR CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) # False for C++98 mode. list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) endif() if (CMAKE_C_COMPILER_ID STREQUAL GNU - OR CMAKE_C_COMPILER_ID STREQUAL Clang) + OR CMAKE_C_COMPILER_ID STREQUAL Clang + OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) add_executable(C_undefined c_undefined.c) set_property(TARGET C_undefined PROPERTY CXX_STANDARD 90) target_compile_options(C_undefined PRIVATE -Werror=undef) @@ -79,7 +81,7 @@ write_compiler_detection_header( PREFIX MULTI OUTPUT_FILES_VAR multi_files OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support" - COMPILERS GNU Clang + COMPILERS GNU Clang AppleClang VERSION 3.1 FEATURES ${cxx_known_features} ${c_known_features} ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/AppleClang-C-FeatureTests.cmake | 11 +++++++ Modules/Compiler/AppleClang-C.cmake | 31 ++++++++++++++++++++ Modules/Compiler/AppleClang-CXX-FeatureTests.cmake | 31 ++++++++++++++++++++ Modules/Compiler/AppleClang-CXX.cmake | 31 ++++++++++++++++++++ Modules/WriteCompilerDetectionHeader.cmake | 7 +++-- .../WriteCompilerDetectionHeader/CMakeLists.txt | 10 ++++--- 6 files changed, 114 insertions(+), 7 deletions(-) create mode 100644 Modules/Compiler/AppleClang-C-FeatureTests.cmake create mode 100644 Modules/Compiler/AppleClang-CXX-FeatureTests.cmake hooks/post-receive -- CMake From steveire at gmail.com Fri Dec 19 11:53:37 2014 From: steveire at gmail.com (Stephen Kelly) Date: Fri, 19 Dec 2014 11:53:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1287-g1645a8f Message-ID: <20141219165337.BC5B1A7607@public.kitware.com> This is an automated email from 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 1645a8f6112ede0c970cf179d3b618d3f7091cb5 (commit) via c41a1f322510eeb486db73a37d115f4162761ce5 (commit) from 9bec0eacdee5b500262d9298dac87ad13586d8a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1645a8f6112ede0c970cf179d3b618d3f7091cb5 commit 1645a8f6112ede0c970cf179d3b618d3f7091cb5 Merge: 9bec0ea c41a1f3 Author: Stephen Kelly AuthorDate: Fri Dec 19 11:53:36 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 11:53:36 2014 -0500 Merge topic 'RunCMake-stderr-default' into next c41a1f32 RunCMake: Expect empty output by default. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c41a1f322510eeb486db73a37d115f4162761ce5 commit c41a1f322510eeb486db73a37d115f4162761ce5 Author: Stephen Kelly AuthorDate: Tue Dec 16 22:11:40 2014 +0100 Commit: Stephen Kelly CommitDate: Fri Dec 19 17:44:37 2014 +0100 RunCMake: Expect empty output by default. Expect tests to specify stderr content if it is present. Fix the CMP0019 test, which has only been testing the WARN status until now. Specify in the CommandLine and FPHSA tests that content is at least one character. diff --git a/Tests/RunCMake/CMP0019/CMakeLists.txt b/Tests/RunCMake/CMP0019/CMakeLists.txt index 12cd3c7..8f85fbf 100644 --- a/Tests/RunCMake/CMP0019/CMakeLists.txt +++ b/Tests/RunCMake/CMP0019/CMakeLists.txt @@ -1,3 +1,3 @@ cmake_minimum_required(VERSION 2.8.4) project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 84e3614..0c43c20 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -37,7 +37,9 @@ run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) +set(RunCMake_DEFAULT_stderr ".") run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) +unset(RunCMake_DEFAULT_stderr) run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index bb7743c..e9b2a7a 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -14,6 +14,7 @@ run_cmake(exact_1.2.3) run_cmake(exact_1.2.3.4) # now test every component with an invalid version +set(RunCMake_DEFAULT_stderr ".") run_cmake(exact_0) run_cmake(exact_2) run_cmake(exact_1.1) @@ -22,6 +23,7 @@ run_cmake(exact_1.2.2) run_cmake(exact_1.2.4) run_cmake(exact_1.2.3.3) run_cmake(exact_1.2.3.5) +unset(RunCMake_DEFAULT_stderr) # check if searching for a version 0 works list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0") diff --git a/Tests/RunCMake/README.rst b/Tests/RunCMake/README.rst index 536cff2..e801a86 100644 --- a/Tests/RunCMake/README.rst +++ b/Tests/RunCMake/README.rst @@ -41,7 +41,7 @@ but do not actually build anything. To add a test: ``-stdout.txt`` Regex matching expected stdout content ``-stderr.txt`` - Regex matching expected stderr content + Regex matching expected stderr content, if not "^$" ``-check.cmake`` Custom result check. diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 7b1a5b2..7b3eda7 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -25,6 +25,13 @@ function(run_cmake test) unset(expect_std${o}) endif() endforeach() + if (NOT expect_stderr) + if (NOT RunCMake_DEFAULT_stderr) + set(RunCMake_DEFAULT_stderr "^$") + endif() + set(expect_stderr ${RunCMake_DEFAULT_stderr}) + endif() + if (NOT RunCMake_TEST_SOURCE_DIR) set(RunCMake_TEST_SOURCE_DIR "${top_src}") endif() ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CMP0019/CMakeLists.txt | 2 +- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 2 ++ Tests/RunCMake/FPHSA/RunCMakeTest.cmake | 2 ++ Tests/RunCMake/README.rst | 2 +- Tests/RunCMake/RunCMake.cmake | 7 +++++++ 5 files changed, 13 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 19 12:09:12 2014 From: brad.king at kitware.com (Brad King) Date: Fri, 19 Dec 2014 12:09:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1289-g8a1b7e7 Message-ID: <20141219170912.7825B2A9C@public.kitware.com> This is an automated email from 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 8a1b7e7f4783873b0ed3bbfaf2a29b33afe86940 (commit) via 8ca0c618392153ed9a908563c7bb97b322ea208e (commit) from 1645a8f6112ede0c970cf179d3b618d3f7091cb5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a1b7e7f4783873b0ed3bbfaf2a29b33afe86940 commit 8a1b7e7f4783873b0ed3bbfaf2a29b33afe86940 Merge: 1645a8f 8ca0c61 Author: Brad King AuthorDate: Fri Dec 19 12:09:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 12:09:11 2014 -0500 Merge topic 'nightly-binary-updates' into next 8ca0c618 Utilities/Release: Change OS X 10.6+ binary name to use x86_64 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ca0c618392153ed9a908563c7bb97b322ea208e commit 8ca0c618392153ed9a908563c7bb97b322ea208e Author: Brad King AuthorDate: Fri Dec 19 12:08:50 2014 -0500 Commit: Brad King CommitDate: Fri Dec 19 12:08:55 2014 -0500 Utilities/Release: Change OS X 10.6+ binary name to use x86_64 This makes the pattern consistent with the other platforms. diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index b2f1ceb..910fcbd 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -22,7 +22,7 @@ CMAKE_BUILD_TYPE:STRING=Release CMAKE_OSX_ARCHITECTURES:STRING=x86_64 CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CPACK_SYSTEM_NAME:STRING=Darwin64 +CPACK_SYSTEM_NAME:STRING=Darwin-x86_64 BUILD_QtDialog:BOOL=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake ----------------------------------------------------------------------- Summary of changes: Utilities/Release/dashmacmini5_release.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From clinton at elemtech.com Fri Dec 19 16:16:55 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 19 Dec 2014 16:16:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1292-gb0d35d9 Message-ID: <20141219211655.30E9BA6398@public.kitware.com> This is an automated email from 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 b0d35d9e647b105718361b62a5ca230cdec3e782 (commit) via a5523142c5ecb29c54d5ae45edb7bff62b2a46cb (commit) via d92c95bc71923f4fcf774fd0cf33d2dbcc7a9174 (commit) from 8a1b7e7f4783873b0ed3bbfaf2a29b33afe86940 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0d35d9e647b105718361b62a5ca230cdec3e782 commit b0d35d9e647b105718361b62a5ca230cdec3e782 Merge: 8a1b7e7 a552314 Author: Clinton Stimpson AuthorDate: Fri Dec 19 16:16:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 16:16:53 2014 -0500 Merge topic 'macho-parser' into next a5523142 Use Mach-O parser to extract install names instead of otool. d92c95bc Add Mach-O parser for OS X and iOS. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5523142c5ecb29c54d5ae45edb7bff62b2a46cb commit a5523142c5ecb29c54d5ae45edb7bff62b2a46cb Author: Clinton Stimpson AuthorDate: Fri Dec 19 12:31:22 2014 -0700 Commit: Clinton Stimpson CommitDate: Fri Dec 19 12:49:10 2014 -0700 Use Mach-O parser to extract install names instead of otool. diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c83dc2a..ee707ec 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -63,6 +63,10 @@ # include "cmELF.h" #endif +#if defined(CMAKE_USE_MACH_PARSER) +# include "cmMachO.h" +#endif + class cmSystemToolsFileTime { public: @@ -2357,31 +2361,14 @@ bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath, bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath, std::string& soname) { - std::vector cmds; - cmds.push_back("otool"); - cmds.push_back("-D"); - cmds.push_back(fullPath); - - std::string output; - if(!RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE)) +#if defined(CMAKE_USE_MACH_PARSER) + cmMachO macho(fullPath.c_str()); + if(macho) { - cmds.insert(cmds.begin(), "-r"); - cmds.insert(cmds.begin(), "xcrun"); - if(!RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE)) - { - return false; - } + return macho.GetInstallName(soname); } +#endif - std::vector strs = cmSystemTools::tokenize(output, "\n"); - // otool returns extra lines reporting multiple install names - // in case the binary is multi-arch and none of the architectures - // is native (e.g. i386;ppc on x86_64) - if(strs.size() >= 2) - { - soname = strs[1]; - return true; - } return false; } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d92c95bc71923f4fcf774fd0cf33d2dbcc7a9174 commit d92c95bc71923f4fcf774fd0cf33d2dbcc7a9174 Author: Clinton Stimpson AuthorDate: Fri Dec 19 12:30:22 2014 -0700 Commit: Clinton Stimpson CommitDate: Fri Dec 19 12:49:06 2014 -0700 Add Mach-O parser for OS X and iOS. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a4c982f..97f57a3 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -39,6 +39,10 @@ else() set(CMAKE_USE_ELF_PARSER) endif() +if(APPLE) + set(CMAKE_USE_MACH_PARSER 1) +endif() + set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR}) # ensure Unicode friendly APIs are used on Windows @@ -140,6 +144,11 @@ if(CMAKE_USE_ELF_PARSER) set(ELF_SRCS cmELF.h cmELF.cxx) endif() +# Check if we can build the Mach-O parser. +if(CMAKE_USE_MACH_PARSER) + set(MACH_SRCS cmMachO.h cmMachO.cxx) +endif() + # # Sources for CMakeLib # @@ -267,6 +276,7 @@ set(SRCS cmLocalGenerator.cxx cmLocalGenerator.h cmLocalUnixMakefileGenerator3.cxx + ${MACH_SRCS} cmMakeDepend.cxx cmMakeDepend.h cmMakefile.cxx diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 2b0280d..79776f4 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -16,5 +16,6 @@ #cmakedefine HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE #cmakedefine HAVE_UNSETENV #cmakedefine CMAKE_USE_ELF_PARSER +#cmakedefine CMAKE_USE_MACH_PARSER #cmakedefine CMAKE_ENCODING_UTF8 #define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@" diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx new file mode 100644 index 0000000..fab8a4d --- /dev/null +++ b/Source/cmMachO.cxx @@ -0,0 +1,420 @@ +/*============================================================================ + 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 "cmStandardIncludes.h" // to get CMAKE_USE_MACH_PARSER first +#include "cmMachO.h" + +#include + +// Include the Mach-O format information system header. +#include +#include + + +/** + + https://developer.apple.com/library/mac/documentation/ + DeveloperTools/Conceptual/MachORuntime/index.html + + A Mach-O file has 3 major regions: header, load commands and segments. + Data Structures are provided from which + correspond to the file structure. + + The header can be either a struct mach_header or struct mach_header_64. + One can peek at the first 4 bytes to identify the type of header. + + Following is the load command region which starts with + struct load_command, and is followed by n number of load commands. + + In the case of a universal binary (an archive of multiple Mach-O files), + the file begins with a struct fat_header and is followed by multiple + struct fat_arch instances. The struct fat_arch indicates the offset + for each Mach-O file. + + */ + +namespace { + + // peek in the file + template + bool peek(cmsys::ifstream& fin, T &v) + { + std::streampos p = fin.tellg(); + if(!fin.read(reinterpret_cast(&v), sizeof(T))) + { + return false; + } + return fin.seekg(p); + } + + // read from the file and fill a data structure + template + bool read(cmsys::ifstream& fin, T& v) + { + if(!fin.read(reinterpret_cast(&v), sizeof(T))) + { + return false; + } + return true; + } + + // read from the file and fill multiple data structures where + // the vector has been resized + template + bool read(cmsys::ifstream& fin, std::vector& v) + { + // nothing to read + if(v.empty()) + { + return true; + } + if(!fin.read(reinterpret_cast(&v[0]), sizeof(T) * v.size())) + { + return false; + } + return true; + } +} + + +// Contains header and load commands for a single Mach-O file +class cmMachOHeaderAndLoadCommands +{ +public: + // A load_command and its associated data + struct RawLoadCommand + { + uint32_t type(const cmMachOHeaderAndLoadCommands* m) const + { + if(this->LoadCommand.size() < sizeof(load_command)) + { + return 0; + } + const load_command* cmd = + reinterpret_cast(&this->LoadCommand[0]); + return m->swap(cmd->cmd); + } + std::vector LoadCommand; + }; + + cmMachOHeaderAndLoadCommands(bool _swap) + : Swap(_swap) + { + } + virtual ~cmMachOHeaderAndLoadCommands() + { + } + + virtual bool read_mach_o(cmsys::ifstream& fin) = 0; + + const std::vector& load_commands() const + { + return this->LoadCommands; + } + + uint32_t swap(uint32_t v) const + { + if(this->Swap) + { + char* c = reinterpret_cast(&v); + std::swap(c[0], c[3]); + std::swap(c[1], c[2]); + } + return v; + } + +protected: + bool read_load_commands(uint32_t ncmds, uint32_t sizeofcmds, + cmsys::ifstream& fin); + + bool Swap; + std::vector LoadCommands; +}; + +// Implementation for reading Mach-O header and load commands. +// This is 32 or 64 bit arch specific. +template +class cmMachOHeaderAndLoadCommandsImpl : public cmMachOHeaderAndLoadCommands +{ +public: + cmMachOHeaderAndLoadCommandsImpl(bool _swap) + : cmMachOHeaderAndLoadCommands(_swap) + { + } + bool read_mach_o(cmsys::ifstream& fin) + { + if(!read(fin, this->Header)) + { + return false; + } + this->Header.cputype = swap(this->Header.cputype); + this->Header.cpusubtype = swap(this->Header.cpusubtype); + this->Header.filetype = swap(this->Header.filetype); + this->Header.ncmds = swap(this->Header.ncmds); + this->Header.sizeofcmds = swap(this->Header.sizeofcmds); + this->Header.flags = swap(this->Header.flags); + + return read_load_commands(this->Header.ncmds, + this->Header.sizeofcmds, + fin); + } +protected: + T Header; +}; + + +bool cmMachOHeaderAndLoadCommands::read_load_commands(uint32_t ncmds, + uint32_t sizeofcmds, + cmsys::ifstream& fin) +{ + uint32_t size_read = 0; + this->LoadCommands.resize(ncmds); + for(uint32_t i = 0; iLoadCommands[i]; + c.LoadCommand.resize(lc.cmdsize); + if(!read(fin, c.LoadCommand)) + { + return false; + } + } + + if(size_read != sizeofcmds) + { + this->LoadCommands.clear(); + return false; + } + + return true; +} + +//---------------------------------------------------------------------------- +class cmMachOInternal +{ +public: + cmMachOInternal(const char* fname); + ~cmMachOInternal(); + + // read a Mach-O file + bool read_mach_o(uint32_t file_offset); + + // the file we are reading + cmsys::ifstream Fin; + + // The archs in the universal binary + // If the binary is not a universal binary, this will be empty. + std::vector FatArchs; + + // the error message while parsing + std::string ErrorMessage; + + // the list of Mach-O's + std::vector MachOList; +}; + +cmMachOInternal::cmMachOInternal(const char* fname) + : Fin(fname) +{ + // Quit now if the file could not be opened. + if(!this->Fin || !this->Fin.get() ) + { + this->ErrorMessage = "Error opening input file."; + return; + } + + if(!this->Fin.seekg(0)) + { + this->ErrorMessage = "Error seeking to beginning of file."; + return; + } + + // Read the binary identification block. + uint32_t magic = 0; + if(!peek(this->Fin, magic)) + { + this->ErrorMessage = "Error reading Mach-O identification."; + return; + } + + // Verify the binary identification. + if(!(magic == MH_CIGAM || + magic == MH_MAGIC || + magic == MH_CIGAM_64 || + magic == MH_MAGIC_64 || + magic == FAT_CIGAM || + magic == FAT_MAGIC)) + { + this->ErrorMessage = "File does not have a valid Mach-O identification."; + return; + } + + if(magic == FAT_MAGIC || magic == FAT_CIGAM) + { + // this is a universal binary + fat_header header; + if(!read(this->Fin, header)) + { + this->ErrorMessage = "Error reading fat header."; + return; + } + + // read fat_archs + this->FatArchs.resize(OSSwapBigToHostInt32(header.nfat_arch)); + if(!read(this->Fin, this->FatArchs)) + { + this->ErrorMessage = "Error reading fat header archs."; + return; + } + + // parse each Mach-O file + for(size_t i=0; iFatArchs.size(); i++) + { + const fat_arch& arch = this->FatArchs[i]; + if(!this->read_mach_o(OSSwapBigToHostInt32(arch.offset))) + { + return; + } + } + } + else + { + // parse Mach-O file at the beginning of the file + this->read_mach_o(0); + } +} + +cmMachOInternal::~cmMachOInternal() +{ + for(size_t i=0; iMachOList.size(); i++) + { + delete this->MachOList[i]; + } +} + +bool cmMachOInternal::read_mach_o(uint32_t file_offset) +{ + if(!this->Fin.seekg(file_offset)) + { + this->ErrorMessage = "Failed to locate Mach-O content."; + return false; + } + + uint32_t magic; + if(!peek(this->Fin, magic)) + { + this->ErrorMessage = "Error reading Mach-O identification."; + return false; + } + + cmMachOHeaderAndLoadCommands* f = NULL; + if(magic == MH_CIGAM || magic == MH_MAGIC) + { + bool swap = false; + if(magic == MH_CIGAM) + { + swap = true; + } + f = new cmMachOHeaderAndLoadCommandsImpl(swap); + } + else if(magic == MH_CIGAM_64 || magic == MH_MAGIC_64) + { + bool swap = false; + if(magic == MH_CIGAM_64) + { + swap = true; + } + f = new cmMachOHeaderAndLoadCommandsImpl(swap); + } + + if(f && f->read_mach_o(this->Fin)) + { + this->MachOList.push_back(f); + } + else + { + delete f; + this->ErrorMessage = "Failed to read Mach-O header."; + return false; + } + + return true; +} + +//============================================================================ +// External class implementation. + +//---------------------------------------------------------------------------- +cmMachO::cmMachO(const char* fname): Internal(0) +{ + this->Internal = new cmMachOInternal(fname); + +} + +//---------------------------------------------------------------------------- +cmMachO::~cmMachO() +{ + delete this->Internal; +} + +std::string const& cmMachO::GetErrorMessage() const +{ + return this->Internal->ErrorMessage; +} + +//---------------------------------------------------------------------------- +bool cmMachO::Valid() const +{ + return !this->Internal->MachOList.empty(); +} + +bool cmMachO::GetInstallName(std::string& install_name) +{ + if(this->Internal->MachOList.empty()) + { + return false; + } + + // grab the first Mach-O and get the install name from that one + cmMachOHeaderAndLoadCommands* macho = this->Internal->MachOList[0]; + for(size_t i=0; iload_commands().size(); i++) + { + const cmMachOHeaderAndLoadCommands::RawLoadCommand &cmd = + macho->load_commands()[i]; + uint32_t lc_cmd = cmd.type(macho); + if(lc_cmd == LC_ID_DYLIB || + lc_cmd == LC_LOAD_WEAK_DYLIB || + lc_cmd == LC_REEXPORT_DYLIB || + lc_cmd == LC_LOAD_DYLIB) + { + if(sizeof(dylib_command) < cmd.LoadCommand.size()) + { + uint32_t namelen = cmd.LoadCommand.size() - sizeof(dylib_command); + install_name.assign(&cmd.LoadCommand[sizeof(dylib_command)], namelen); + return true; + } + } + } + + return false; +} + +void cmMachO::PrintInfo(std::ostream& /*os*/) const +{ +} diff --git a/Source/cmMachO.h b/Source/cmMachO.h new file mode 100644 index 0000000..f06f8de --- /dev/null +++ b/Source/cmMachO.h @@ -0,0 +1,51 @@ +/*============================================================================ + 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 cmMachO_h +#define cmMachO_h + +#if !defined(CMAKE_USE_MACH_PARSER) +# error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled." +#endif + +class cmMachOInternal; + +/** \class cmMachO + * \brief Executable and Link Format (Mach-O) parser. + */ +class cmMachO +{ +public: + /** Construct with the name of the Mach-O input file to parse. */ + cmMachO(const char* fname); + + /** Destruct. */ + ~cmMachO(); + + /** Get the error message if any. */ + std::string const& GetErrorMessage() const; + + /** Boolean conversion. True if the Mach-O file is valid. */ + operator bool() const { return this->Valid(); } + + /** Get Install name from binary **/ + bool GetInstallName(std::string& install_name); + + /** Print human-readable information about the Mach-O file. */ + void PrintInfo(std::ostream& os) const; + +private: + friend class cmMachOInternal; + bool Valid() const; + cmMachOInternal* Internal; +}; + +#endif ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 10 + Source/cmConfigure.cmake.h.in | 1 + Source/cmMachO.cxx | 420 +++++++++++++++++++++++++++++++++++++++++ Source/cmMachO.h | 51 +++++ Source/cmSystemTools.cxx | 31 +-- 5 files changed, 491 insertions(+), 22 deletions(-) create mode 100644 Source/cmMachO.cxx create mode 100644 Source/cmMachO.h hooks/post-receive -- CMake From clinton at elemtech.com Fri Dec 19 16:21:40 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 19 Dec 2014 16:21:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1294-gd13b3c7 Message-ID: <20141219212140.1F6C8A7DDF@public.kitware.com> This is an automated email from 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 d13b3c756347497a626a9964e6e5b8945b00fd6a (commit) via 30b090648301ca9615482838a09cfe1de744a03d (commit) from b0d35d9e647b105718361b62a5ca230cdec3e782 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d13b3c756347497a626a9964e6e5b8945b00fd6a commit d13b3c756347497a626a9964e6e5b8945b00fd6a Merge: b0d35d9 30b0906 Author: Clinton Stimpson AuthorDate: Fri Dec 19 16:21:39 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 16:21:39 2014 -0500 Merge topic 'macho-parser' into next 30b09064 Fix compile warnings on Linux without cmMachO. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30b090648301ca9615482838a09cfe1de744a03d commit 30b090648301ca9615482838a09cfe1de744a03d Author: Clinton Stimpson AuthorDate: Fri Dec 19 14:20:42 2014 -0700 Commit: Clinton Stimpson CommitDate: Fri Dec 19 14:20:42 2014 -0700 Fix compile warnings on Linux without cmMachO. diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ee707ec..1c8c387 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2367,6 +2367,9 @@ bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath, { return macho.GetInstallName(soname); } +#else + (void)fullPath; + (void)soname; #endif return false; ----------------------------------------------------------------------- Summary of changes: Source/cmSystemTools.cxx | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From clinton at elemtech.com Fri Dec 19 17:38:58 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 19 Dec 2014 17:38:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1296-ga04d50e Message-ID: <20141219223858.669CEA83AF@public.kitware.com> This is an automated email from 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 a04d50e5ba6bdc81ce2b09d683afbc6d5e1a1a66 (commit) via f68ca6cec7956a8a152d03d760517f64d3716f94 (commit) from d13b3c756347497a626a9964e6e5b8945b00fd6a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a04d50e5ba6bdc81ce2b09d683afbc6d5e1a1a66 commit a04d50e5ba6bdc81ce2b09d683afbc6d5e1a1a66 Merge: d13b3c7 f68ca6c Author: Clinton Stimpson AuthorDate: Fri Dec 19 17:38:57 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 17:38:57 2014 -0500 Merge topic 'macho-parser' into next f68ca6ce Fix compile errors when targeting 10.4 or less. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f68ca6cec7956a8a152d03d760517f64d3716f94 commit f68ca6cec7956a8a152d03d760517f64d3716f94 Author: Clinton Stimpson AuthorDate: Fri Dec 19 15:37:48 2014 -0700 Commit: Clinton Stimpson CommitDate: Fri Dec 19 15:38:46 2014 -0700 Fix compile errors when targeting 10.4 or less. diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx index fab8a4d..d2f07d0 100644 --- a/Source/cmMachO.cxx +++ b/Source/cmMachO.cxx @@ -18,6 +18,7 @@ #include #include +#include /** @@ -400,7 +401,9 @@ bool cmMachO::GetInstallName(std::string& install_name) uint32_t lc_cmd = cmd.type(macho); if(lc_cmd == LC_ID_DYLIB || lc_cmd == LC_LOAD_WEAK_DYLIB || +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 lc_cmd == LC_REEXPORT_DYLIB || +#endif lc_cmd == LC_LOAD_DYLIB) { if(sizeof(dylib_command) < cmd.LoadCommand.size()) ----------------------------------------------------------------------- Summary of changes: Source/cmMachO.cxx | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From clinton at elemtech.com Fri Dec 19 17:51:11 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 19 Dec 2014 17:51:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1298-g57d720f Message-ID: <20141219225111.31F26A764F@public.kitware.com> This is an automated email from 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 57d720f763f58ea0ab5127c590d4ce0ad9976567 (commit) via f248cd4724f062c4821d601bebd9b99fc2ba477a (commit) from a04d50e5ba6bdc81ce2b09d683afbc6d5e1a1a66 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57d720f763f58ea0ab5127c590d4ce0ad9976567 commit 57d720f763f58ea0ab5127c590d4ce0ad9976567 Merge: a04d50e f248cd4 Author: Clinton Stimpson AuthorDate: Fri Dec 19 17:51:10 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 17:51:10 2014 -0500 Merge topic 'macho-parser' into next f248cd47 Remove LC_REEXPORT_DYLIB from logic to identify install name. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f248cd4724f062c4821d601bebd9b99fc2ba477a commit f248cd4724f062c4821d601bebd9b99fc2ba477a Author: Clinton Stimpson AuthorDate: Fri Dec 19 15:50:22 2014 -0700 Commit: Clinton Stimpson CommitDate: Fri Dec 19 15:50:22 2014 -0700 Remove LC_REEXPORT_DYLIB from logic to identify install name. It wasn't supposed to be there in the first place. diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx index d2f07d0..e9e76fa 100644 --- a/Source/cmMachO.cxx +++ b/Source/cmMachO.cxx @@ -18,8 +18,6 @@ #include #include -#include - /** https://developer.apple.com/library/mac/documentation/ @@ -401,9 +399,6 @@ bool cmMachO::GetInstallName(std::string& install_name) uint32_t lc_cmd = cmd.type(macho); if(lc_cmd == LC_ID_DYLIB || lc_cmd == LC_LOAD_WEAK_DYLIB || -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 - lc_cmd == LC_REEXPORT_DYLIB || -#endif lc_cmd == LC_LOAD_DYLIB) { if(sizeof(dylib_command) < cmd.LoadCommand.size()) ----------------------------------------------------------------------- Summary of changes: Source/cmMachO.cxx | 5 ----- 1 file changed, 5 deletions(-) hooks/post-receive -- CMake From clinton at elemtech.com Fri Dec 19 23:44:36 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 19 Dec 2014 23:44:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1300-g7e07fc0 Message-ID: <20141220044436.B3825A56A3@public.kitware.com> This is an automated email from 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 7e07fc027b8d409a501514a39d0df2c0d11adfd0 (commit) via b85e9a8b0f69826ff63d2f3658ce5442b32b6896 (commit) from 57d720f763f58ea0ab5127c590d4ce0ad9976567 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e07fc027b8d409a501514a39d0df2c0d11adfd0 commit 7e07fc027b8d409a501514a39d0df2c0d11adfd0 Merge: 57d720f b85e9a8 Author: Clinton Stimpson AuthorDate: Fri Dec 19 23:44:35 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 19 23:44:35 2014 -0500 Merge topic 'macho-parser' into next b85e9a8b Fix compile error on some OS X machines. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b85e9a8b0f69826ff63d2f3658ce5442b32b6896 commit b85e9a8b0f69826ff63d2f3658ce5442b32b6896 Author: Clinton Stimpson AuthorDate: Fri Dec 19 21:44:07 2014 -0700 Commit: Clinton Stimpson CommitDate: Fri Dec 19 21:44:07 2014 -0700 Fix compile error on some OS X machines. diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx index e9e76fa..1607845 100644 --- a/Source/cmMachO.cxx +++ b/Source/cmMachO.cxx @@ -51,7 +51,8 @@ namespace { { return false; } - return fin.seekg(p); + fin.seekg(p); + return fin.good(); } // read from the file and fill a data structure ----------------------------------------------------------------------- Summary of changes: Source/cmMachO.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 20 00:01:13 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 20 Dec 2014 00:01:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-533-g5bb0ae0 Message-ID: <20141220050113.25BB6A7C31@public.kitware.com> This is an automated email from 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 5bb0ae03ef00b35d443269eef0d589d307306bb2 (commit) from 852242b60d09d505ea59dc4eaccc149df87ce7fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bb0ae03ef00b35d443269eef0d589d307306bb2 commit 5bb0ae03ef00b35d443269eef0d589d307306bb2 Author: Kitware Robot AuthorDate: Sat Dec 20 00:01:09 2014 -0500 Commit: Kitware Robot CommitDate: Sat Dec 20 00:01:09 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e0ecd38..98fa9bc 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 1) -set(CMake_VERSION_PATCH 20141219) +set(CMake_VERSION_PATCH 20141220) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Sat Dec 20 09:41:45 2014 From: steveire at gmail.com (Stephen Kelly) Date: Sat, 20 Dec 2014 09:41:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1302-g64972ed Message-ID: <20141220144145.C0A7F9CB15@public.kitware.com> This is an automated email from 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 64972eddc8caf4663356ae20ad25bb8cc9987147 (commit) via d4d491ef4c49ce84872f5e7039852de4bdc0628c (commit) from 7e07fc027b8d409a501514a39d0df2c0d11adfd0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64972eddc8caf4663356ae20ad25bb8cc9987147 commit 64972eddc8caf4663356ae20ad25bb8cc9987147 Merge: 7e07fc0 d4d491e Author: Stephen Kelly AuthorDate: Sat Dec 20 09:41:44 2014 -0500 Commit: CMake Topic Stage CommitDate: Sat Dec 20 09:41:44 2014 -0500 Merge topic 'RunCMake-stderr-default' into next d4d491ef Revert "RunCMake: Expect empty output by default." http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4d491ef4c49ce84872f5e7039852de4bdc0628c commit d4d491ef4c49ce84872f5e7039852de4bdc0628c Author: Stephen Kelly AuthorDate: Sat Dec 20 15:41:19 2014 +0100 Commit: Stephen Kelly CommitDate: Sat Dec 20 15:41:19 2014 +0100 Revert "RunCMake: Expect empty output by default." This reverts commit c41a1f322510eeb486db73a37d115f4162761ce5. diff --git a/Tests/RunCMake/CMP0019/CMakeLists.txt b/Tests/RunCMake/CMP0019/CMakeLists.txt index 8f85fbf..12cd3c7 100644 --- a/Tests/RunCMake/CMP0019/CMakeLists.txt +++ b/Tests/RunCMake/CMP0019/CMakeLists.txt @@ -1,3 +1,3 @@ cmake_minimum_required(VERSION 2.8.4) project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 0c43c20..84e3614 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -37,9 +37,7 @@ run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) -set(RunCMake_DEFAULT_stderr ".") run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) -unset(RunCMake_DEFAULT_stderr) run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index e9b2a7a..bb7743c 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -14,7 +14,6 @@ run_cmake(exact_1.2.3) run_cmake(exact_1.2.3.4) # now test every component with an invalid version -set(RunCMake_DEFAULT_stderr ".") run_cmake(exact_0) run_cmake(exact_2) run_cmake(exact_1.1) @@ -23,7 +22,6 @@ run_cmake(exact_1.2.2) run_cmake(exact_1.2.4) run_cmake(exact_1.2.3.3) run_cmake(exact_1.2.3.5) -unset(RunCMake_DEFAULT_stderr) # check if searching for a version 0 works list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0") diff --git a/Tests/RunCMake/README.rst b/Tests/RunCMake/README.rst index e801a86..536cff2 100644 --- a/Tests/RunCMake/README.rst +++ b/Tests/RunCMake/README.rst @@ -41,7 +41,7 @@ but do not actually build anything. To add a test: ``-stdout.txt`` Regex matching expected stdout content ``-stderr.txt`` - Regex matching expected stderr content, if not "^$" + Regex matching expected stderr content ``-check.cmake`` Custom result check. diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 7b3eda7..7b1a5b2 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -25,13 +25,6 @@ function(run_cmake test) unset(expect_std${o}) endif() endforeach() - if (NOT expect_stderr) - if (NOT RunCMake_DEFAULT_stderr) - set(RunCMake_DEFAULT_stderr "^$") - endif() - set(expect_stderr ${RunCMake_DEFAULT_stderr}) - endif() - if (NOT RunCMake_TEST_SOURCE_DIR) set(RunCMake_TEST_SOURCE_DIR "${top_src}") endif() ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CMP0019/CMakeLists.txt | 2 +- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 2 -- Tests/RunCMake/FPHSA/RunCMakeTest.cmake | 2 -- Tests/RunCMake/README.rst | 2 +- Tests/RunCMake/RunCMake.cmake | 7 ------- 5 files changed, 2 insertions(+), 13 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 21 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 21 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-534-g2c76f6f Message-ID: <20141221050110.8916AA7E5D@public.kitware.com> This is an automated email from 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 2c76f6f4da4f0fe9e94d70ec3ba9d3976dc43829 (commit) from 5bb0ae03ef00b35d443269eef0d589d307306bb2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c76f6f4da4f0fe9e94d70ec3ba9d3976dc43829 commit 2c76f6f4da4f0fe9e94d70ec3ba9d3976dc43829 Author: Kitware Robot AuthorDate: Sun Dec 21 00:01:07 2014 -0500 Commit: Kitware Robot CommitDate: Sun Dec 21 00:01:07 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 98fa9bc..8cae115 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 1) -set(CMake_VERSION_PATCH 20141220) +set(CMake_VERSION_PATCH 20141221) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 22 00:01:11 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 22 Dec 2014 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-535-gd63609e Message-ID: <20141222050111.09E67A81B2@public.kitware.com> This is an automated email from 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 d63609ed2a5f707b0e72adef2a1804cae611caa9 (commit) from 2c76f6f4da4f0fe9e94d70ec3ba9d3976dc43829 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d63609ed2a5f707b0e72adef2a1804cae611caa9 commit d63609ed2a5f707b0e72adef2a1804cae611caa9 Author: Kitware Robot AuthorDate: Mon Dec 22 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Mon Dec 22 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8cae115..a33b829 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 1) -set(CMake_VERSION_PATCH 20141221) +set(CMake_VERSION_PATCH 20141222) #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 Dec 22 08:48:17 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 08:48:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1305-g29b9c99 Message-ID: <20141222134817.3AEE8A7E09@public.kitware.com> This is an automated email from 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 29b9c996900a876060ca9324a2b4d9454005ea1b (commit) via 202056cdb89da39e35d8af745c1ff0852a9be75d (commit) via d64caa5372b182ce48f752c9afb9141d56055bd2 (commit) from 64972eddc8caf4663356ae20ad25bb8cc9987147 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29b9c996900a876060ca9324a2b4d9454005ea1b commit 29b9c996900a876060ca9324a2b4d9454005ea1b Merge: 64972ed 202056c Author: Brad King AuthorDate: Mon Dec 22 08:48:16 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 08:48:16 2014 -0500 Merge topic 'nightly-binary-updates' into next 202056cd Utilities/Release: Build Windows and OS X binaries with native SSL d64caa53 Utilities/Release: Fix name of OS X 10.6+ x86_64-only binary http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=202056cdb89da39e35d8af745c1ff0852a9be75d commit 202056cdb89da39e35d8af745c1ff0852a9be75d Author: Brad King AuthorDate: Thu Dec 18 10:42:21 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 08:47:46 2014 -0500 Utilities/Release: Build Windows and OS X binaries with native SSL For the nightly binaries, turn of CMAKE_USE_OPENSSL on Windows and OS X 10.6+ platforms. This will activate the new curl behavior to use the OS-native SSL/TLS implementation. diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash2win64_release.cmake index 848e2f4..345870b 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash2win64_release.cmake @@ -7,8 +7,13 @@ set(CPACK_BINARY_GENERATORS "NSIS ZIP") set(CPACK_SOURCE_GENERATORS "ZIP") set(MAKE_PROGRAM "make") set(MAKE "${MAKE_PROGRAM} -j8") +if(CMAKE_CREATE_VERSION STREQUAL "nightly") + set(CMAKE_USE_OPENSSL OFF) +else() + set(CMAKE_USE_OPENSSL ON) +endif() set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_USE_OPENSSL:BOOL=ON +CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL} CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CMAKE_Fortran_COMPILER:FILEPATH=FALSE CMAKE_GENERATOR:INTERNAL=Unix Makefiles diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index a9c9cfb..910fcbd 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -8,8 +8,13 @@ set(MAKE "${MAKE_PROGRAM} -j5") set(CPACK_BINARY_GENERATORS "DragNDrop TGZ TZ") set(CPACK_SOURCE_GENERATORS "TGZ TZ") set(CPACK_DMG_FORMAT "UDBZ") #build using bzip2 for smaller package size +if(CMAKE_CREATE_VERSION STREQUAL "nightly") + set(CMAKE_USE_OPENSSL OFF) +else() + set(CMAKE_USE_OPENSSL ON) +endif() set(INITIAL_CACHE " -CMAKE_USE_OPENSSL:BOOL=ON +CMAKE_USE_OPENSSL:BOOL=${CMAKE_USE_OPENSSL} OPENSSL_CRYPTO_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libcrypto.a OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d64caa5372b182ce48f752c9afb9141d56055bd2 commit d64caa5372b182ce48f752c9afb9141d56055bd2 Author: Brad King AuthorDate: Thu Dec 18 09:13:44 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 08:47:19 2014 -0500 Utilities/Release: Fix name of OS X 10.6+ x86_64-only binary In commit v3.1.0-rc1~52^2 (Make the OSX 10.6+ release x86_64 only, 2014-09-29) we forgot to remove the name "universal" from the binary name. Since the binary is no longer universal, use "x86_64" instead. While at it, update the deployment target to actually be 10.6. diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake index 6c9b8f4..a9c9cfb 100644 --- a/Utilities/Release/dashmacmini5_release.cmake +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -15,9 +15,9 @@ OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a CMAKE_BUILD_TYPE:STRING=Release CMAKE_OSX_ARCHITECTURES:STRING=x86_64 -CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5 +CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CPACK_SYSTEM_NAME:STRING=Darwin64-universal +CPACK_SYSTEM_NAME:STRING=Darwin-x86_64 BUILD_QtDialog:BOOL=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 09:17:31 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 09:17:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1309-g9d07d0f Message-ID: <20141222141731.3F87AA762A@public.kitware.com> This is an automated email from 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 9d07d0f2b1fbdbf0033d476ab348b00ee29c0dd5 (commit) via d63609ed2a5f707b0e72adef2a1804cae611caa9 (commit) via 2c76f6f4da4f0fe9e94d70ec3ba9d3976dc43829 (commit) via 5bb0ae03ef00b35d443269eef0d589d307306bb2 (commit) from 29b9c996900a876060ca9324a2b4d9454005ea1b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d07d0f2b1fbdbf0033d476ab348b00ee29c0dd5 commit 9d07d0f2b1fbdbf0033d476ab348b00ee29c0dd5 Merge: 29b9c99 d63609e Author: Brad King AuthorDate: Mon Dec 22 09:17:23 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 09:17:23 2014 -0500 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 Dec 22 09:17:55 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 09:17:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1311-g5c643da Message-ID: <20141222141757.93ACAA7688@public.kitware.com> This is an automated email from 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 5c643daa6edc597d8a3ffe0fc569fdc6100fd204 (commit) via 42ed76bc994ccdad56392ae5ed6213fb307651da (commit) from 9d07d0f2b1fbdbf0033d476ab348b00ee29c0dd5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c643daa6edc597d8a3ffe0fc569fdc6100fd204 commit 5c643daa6edc597d8a3ffe0fc569fdc6100fd204 Merge: 9d07d0f 42ed76b Author: Brad King AuthorDate: Mon Dec 22 09:17:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 09:17:53 2014 -0500 Merge topic 'cpack-PackageMaker-package-size' into next 42ed76bc cpack: Fix installed size computation with PackageMaker generator http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42ed76bc994ccdad56392ae5ed6213fb307651da commit 42ed76bc994ccdad56392ae5ed6213fb307651da Author: Calin Cascaval AuthorDate: Sat Dec 20 21:13:16 2014 -0800 Commit: Brad King CommitDate: Mon Dec 22 09:17:12 2014 -0500 cpack: Fix installed size computation with PackageMaker generator Use the CPACK_PACKAGING_INSTALL_PREFIX when looking for files in a component. Otherwise we report all packages having size 1. diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index d736948..e799d06 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -964,6 +964,7 @@ cmCPackPackageMakerGenerator::CreateChoice(const cmCPackComponent& component, std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); dirName += '/'; dirName += component.Name; + dirName += this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"); unsigned long installedSize = component.GetInstalledSizeInKbytes(dirName.c_str()); ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackPackageMakerGenerator.cxx | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 09:27:03 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 09:27:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1313-g76ef512 Message-ID: <20141222142703.2492AA7F9C@public.kitware.com> This is an automated email from 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 76ef512f4c3bdce8f6e177d9cf1c958f36966f9b (commit) via 9c4984b4e50b3ab9c09349240c532957c3189116 (commit) from 5c643daa6edc597d8a3ffe0fc569fdc6100fd204 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76ef512f4c3bdce8f6e177d9cf1c958f36966f9b commit 76ef512f4c3bdce8f6e177d9cf1c958f36966f9b Merge: 5c643da 9c4984b Author: Brad King AuthorDate: Mon Dec 22 09:27:02 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 09:27:02 2014 -0500 Merge topic 'ctest-coverage-extra-line-error' into next 9c4984b4 ctest_coverage: Fix error message to report the file name http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c4984b4e50b3ab9c09349240c532957c3189116 commit 9c4984b4e50b3ab9c09349240c532957c3189116 Author: Vladislav Vinogradov AuthorDate: Mon Dec 22 10:24:31 2014 +0300 Commit: Brad King CommitDate: Mon Dec 22 09:25:24 2014 -0500 ctest_coverage: Fix error message to report the file name Print file name instead of line content for "Looks like there are more lines in the file:" error message. diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index e782886..a1d770b 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -585,7 +585,7 @@ int cmCTestCoverageHandler::ProcessHandler() if ( cmSystemTools::GetLineFromStream(ifs, line) ) { cmOStringStream ostr; - ostr << "Looks like there are more lines in the file: " << line; + ostr << "Looks like there are more lines in the file: " << fullFileName; errorsWhileAccumulating.push_back(ostr.str()); } float cper = 0; ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestCoverageHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 09:58:44 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 09:58:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1315-gb00e2be Message-ID: <20141222145844.BBED5A842D@public.kitware.com> This is an automated email from 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 b00e2bee4eb74ce2153fee23ab7ed052dd5f9541 (commit) via 8f62d6bdc89d15e7382cb41aed23125e0f21844b (commit) from 76ef512f4c3bdce8f6e177d9cf1c958f36966f9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b00e2bee4eb74ce2153fee23ab7ed052dd5f9541 commit b00e2bee4eb74ce2153fee23ab7ed052dd5f9541 Merge: 76ef512 8f62d6b Author: Brad King AuthorDate: Mon Dec 22 09:58:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 09:58:43 2014 -0500 Merge topic 'use-insert-with-iterators' into next 8f62d6bd Revert "Use insert instead of a loop in some cases." http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f62d6bdc89d15e7382cb41aed23125e0f21844b commit 8f62d6bdc89d15e7382cb41aed23125e0f21844b Author: Brad King AuthorDate: Mon Dec 22 09:57:48 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 09:57:48 2014 -0500 Revert "Use insert instead of a loop in some cases." This reverts commit 44f02a017d4a1f61488a9116cef24330ec1a10d9. The Oracle/Sun compiler does not resolve the insert method. diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 5e7d764..d226a6c 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -1094,8 +1094,11 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, { // Create a contiguous array for the line this->CurrentProcessingLine.clear(); - this->CurrentProcessingLine.insert(this->CurrentProcessingLine.end(), - queue->begin(), queue->end()); + t_BuildProcessingQueueType::iterator cit; + for ( cit = queue->begin(); cit != it; ++cit ) + { + this->CurrentProcessingLine.push_back(*cit); + } this->CurrentProcessingLine.push_back(0); const char* line = &*this->CurrentProcessingLine.begin(); diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 97637ed..4c89caa 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -526,8 +526,11 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() TestList sortedCopy; - sortedCopy.insert(sortedCopy.end(), - currentSet.begin(), currentSet.end()); + for(TestSet::const_iterator j = currentSet.begin(); + j != currentSet.end(); ++j) + { + sortedCopy.push_back(*j); + } std::stable_sort(sortedCopy.begin(), sortedCopy.end(), comp); diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index 52b98d7..0bb1a99 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -349,7 +349,11 @@ void cmCTestP4::SetP4Options(std::vector &CommandOptions) std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - P4Options.insert(P4Options.end(), args.begin(), args.end()); + for(std::vector::const_iterator ai = args.begin(); + ai != args.end(); ++ai) + { + P4Options.push_back(*ai); + } } CommandOptions.clear(); diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 4aa8d04..07a994d 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -74,8 +74,13 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector notesFiles; cmCTest::VectorOfStrings newNotesFiles; cmSystemTools::ExpandListArgument(notesFilesVariable,notesFiles); - newNotesFiles.insert(newNotesFiles.end(), - notesFiles.begin(), notesFiles.end()); + std::vector::iterator it; + for ( it = notesFiles.begin(); + it != notesFiles.end(); + ++ it ) + { + newNotesFiles.push_back(*it); + } this->CTest->GenerateNotesFile(newNotesFiles); } @@ -86,8 +91,13 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector extraFiles; cmCTest::VectorOfStrings newExtraFiles; cmSystemTools::ExpandListArgument(extraFilesVariable,extraFiles); - newExtraFiles.insert(newExtraFiles.end(), - extraFiles.begin(), extraFiles.end()); + std::vector::iterator it; + for ( it = extraFiles.begin(); + it != extraFiles.end(); + ++ it ) + { + newExtraFiles.push_back(*it); + } if ( !this->CTest->SubmitExtraFiles(newExtraFiles)) { this->SetError("problem submitting extra files."); diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index dc3b4c2..2531a1a 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -36,7 +36,11 @@ bool cmAddTestCommand // Collect the command with arguments. std::vector command; - command.insert(command.end(), args.begin() + 1, args.end()); + for(std::vector::const_iterator it = args.begin() + 1; + it != args.end(); ++it) + { + command.push_back(*it); + } // Create the test but add a generator only the first time it is // seen. This preserves behavior from before test generators. diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 7a601e2..aba26de 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -53,7 +53,10 @@ bool cmConditionEvaluator::IsTrue( cmArgumentList newArgs; // copy to the list structure - newArgs.insert(newArgs.end(), args.begin(), args.end()); + for(unsigned int i = 0; i < args.size(); ++i) + { + newArgs.push_back(args[i]); + } // now loop through the arguments and see if we can reduce any of them // we do this multiple times. Once for each level of precedence @@ -408,7 +411,10 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList &newArgs, // copy to the list structure cmArgumentList::iterator argP1 = arg; argP1++; - newArgs2.insert(newArgs2.end(), argP1, argClose); + for(; argP1 != argClose; argP1++) + { + newArgs2.push_back(*argP1); + } newArgs2.pop_back(); // now recursively invoke IsTrue to handle the values inside the // parenthetical expression diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 015825d..2afb029 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -131,14 +131,21 @@ const char* cmCustomCommand::GetComment() const //---------------------------------------------------------------------------- void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines) { - this->CommandLines.insert(this->CommandLines.end(), - commandLines.begin(), commandLines.end()); + for(cmCustomCommandLines::const_iterator i=commandLines.begin(); + i != commandLines.end(); ++i) + { + this->CommandLines.push_back(*i); + } } //---------------------------------------------------------------------------- void cmCustomCommand::AppendDepends(const std::vector& depends) { - this->Depends.insert(this->Depends.end(), depends.begin(), depends.end()); + for(std::vector::const_iterator i=depends.begin(); + i != depends.end(); ++i) + { + this->Depends.push_back(*i); + } } //---------------------------------------------------------------------------- diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 013724e..beb6dde 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -184,8 +184,10 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) std::vector shortArgs = this->Names; this->Names.clear(); // clear out any values in Names this->Names.push_back(shortArgs[0]); - this->UserGuessArgs.insert(this->UserGuessArgs.end(), - shortArgs.begin() + 1, shortArgs.end()); + for(unsigned int j = 1; j < shortArgs.size(); ++j) + { + this->UserGuessArgs.push_back(shortArgs[j]); + } } this->ExpandPaths(); diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 488538f..3580374 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -271,7 +271,11 @@ bool cmFunctionCommand // create a function blocker cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker(); - f->Args.insert(f->Args.end(), args.begin(), args.end()); + for(std::vector::const_iterator j = args.begin(); + j != args.end(); ++j) + { + f->Args.push_back(*j); + } this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 435452c..2b531e2 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -489,7 +489,11 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir, unique.insert(*li); } result.clear(); - result.insert(result.end(), unique.begin(), unique.end()); + for(std::set::iterator li = unique.begin(); + li != unique.end(); ++li) + { + result.push_back(*li); + } IncludeCacheType::value_type entry(config_upper, result); iter = this->SystemIncludesCache.insert(entry).first; diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index a007693..f106e1a 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -47,8 +47,11 @@ bool cmInstallFilesCommand else { this->IsFilesForm = false; - this->FinalArgs.insert(this->FinalArgs.end(), - args.begin() + 1, args.end()); + std::vector::const_iterator s = args.begin(); + for (++s;s != args.end(); ++s) + { + this->FinalArgs.push_back(*s); + } } this->Makefile->GetLocalGenerator()->GetGlobalGenerator() diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index cc223ab..0405769 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -27,7 +27,11 @@ bool cmInstallProgramsCommand this->Destination = args[0]; - this->FinalArgs.insert(this->FinalArgs.end(), args.begin() + 1, args.end()); + std::vector::const_iterator s = args.begin(); + for (++s;s != args.end(); ++s) + { + this->FinalArgs.push_back(*s); + } this->Makefile->GetLocalGenerator()->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a4185ad..2de6c93 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -634,7 +634,11 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); + for(std::vector::iterator a = cmd.begin(); + a != cmd.end(); ++a) + { + commandLine.push_back(*a); + } // Store this command line. commandLines.push_back(commandLine); @@ -741,7 +745,11 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); + for(std::vector::iterator a = cmd.begin(); + a != cmd.end(); ++a) + { + commandLine.push_back(*a); + } // Store this command line. commandLines.push_back(commandLine); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 96beb1c..812ded3 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1856,8 +1856,13 @@ void cmLocalUnixMakefileGenerator3 { text = "Running external command ..."; } - depends.insert(depends.end(), glIt->second.GetUtilities().begin(), - glIt->second.GetUtilities().end()); + std::set::const_iterator dit; + for ( dit = glIt->second.GetUtilities().begin(); + dit != glIt->second.GetUtilities().end(); + ++ dit ) + { + depends.push_back(*dit); + } this->AppendEcho(commands, text, cmLocalUnixMakefileGenerator3::EchoGlobal); diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index d399313..ae81c58 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -328,7 +328,11 @@ bool cmMacroCommand::InitialPass(std::vector const& args, // create a function blocker cmMacroFunctionBlocker *f = new cmMacroFunctionBlocker(); - f->Args.insert(f->Args.end(), args.begin(), args.end()); + for(std::vector::const_iterator j = args.begin(); + j != args.end(); ++j) + { + f->Args.push_back(*j); + } this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 25d5881..20dae5a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2567,7 +2567,12 @@ std::vector cmMakefile } std::vector res; - res.insert(res.end(), definitions.begin(), definitions.end()); + + std::set::iterator fit; + for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) + { + res.push_back(*fit); + } return res; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 040a7d6..cbf8573 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -759,10 +759,13 @@ cmMakefileTargetGenerator if(const char* extra_outputs_str = source.GetProperty("OBJECT_OUTPUTS")) { - // Register these as extra files to clean. cmSystemTools::ExpandListArgument(extra_outputs_str, outputs); - this->CleanFiles.insert(this->CleanFiles.end(), - outputs.begin() + 1, outputs.end()); + for(std::vector::const_iterator eoi = outputs.begin()+1; + eoi != outputs.end(); ++eoi) + { + // Register this as an extra file to clean. + this->CleanFiles.push_back(*eoi); + } } // Write the rule. @@ -1171,7 +1174,11 @@ cmMakefileTargetGenerator { cmCustomCommandGenerator ccg(*cc, this->ConfigName, this->Makefile); const std::vector& outputs = ccg.GetOutputs(); - depends.insert(depends.end(), outputs.begin(), outputs.end()); + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + depends.push_back(*o); + } } } } @@ -1455,8 +1462,11 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( } // Make sure the extra files are built. - depends.insert(depends.end(), - this->ExtraFiles.begin(), this->ExtraFiles.end()); + for(std::set::const_iterator i = this->ExtraFiles.begin(); + i != this->ExtraFiles.end(); ++i) + { + depends.push_back(*i); + } } // Write the driver rule. @@ -1543,7 +1553,11 @@ void cmMakefileTargetGenerator if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg)) { std::vector const& libDeps = cli->GetDepends(); - depends.insert(depends.end(), libDeps.begin(), libDeps.end()); + for(std::vector::const_iterator j = libDeps.begin(); + j != libDeps.end(); ++j) + { + depends.push_back(*j); + } } } @@ -1563,8 +1577,12 @@ void cmMakefileTargetGenerator } // Add dependencies on the external object files. - depends.insert(depends.end(), - this->ExternalObjects.begin(), this->ExternalObjects.end()); + for(std::vector::const_iterator obj + = this->ExternalObjects.begin(); + obj != this->ExternalObjects.end(); ++obj) + { + depends.push_back(*obj); + } // Add a dependency on the rule file itself. this->LocalGenerator->AppendRuleDepend(depends, diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 443162a..a01a384 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2188,12 +2188,24 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, std::vector command; command.push_back(this->MocExecutable); - command.insert(command.end(), - this->MocIncludes.begin(), this->MocIncludes.end()); - command.insert(command.end(), - this->MocDefinitions.begin(), this->MocDefinitions.end()); - command.insert(command.end(), - this->MocOptions.begin(), this->MocOptions.end()); + for (std::list::const_iterator it = this->MocIncludes.begin(); + it != this->MocIncludes.end(); + ++it) + { + command.push_back(*it); + } + for(std::list::const_iterator it=this->MocDefinitions.begin(); + it != this->MocDefinitions.end(); + ++it) + { + command.push_back(*it); + } + for(std::vector::const_iterator it=this->MocOptions.begin(); + it != this->MocOptions.end(); + ++it) + { + command.push_back(*it); + } #ifdef _WIN32 command.push_back("-DWIN32"); #endif @@ -2265,7 +2277,12 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, cmSystemTools::ExpandListArgument(optionIt->second, fileOpts); this->MergeUicOptions(opts, fileOpts, this->QtMajorVersion == "5"); } - command.insert(command.end(), opts.begin(), opts.end()); + for(std::vector::const_iterator optIt = opts.begin(); + optIt != opts.end(); + ++optIt) + { + command.push_back(*optIt); + } command.push_back("-o"); command.push_back(this->Builddir + ui_output_file); diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index d8aa1cb..bcb8564 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -39,7 +39,10 @@ bool cmRemoveCommand // check for REMOVE(VAR v1 v2 ... vn) std::vector argsExpanded; std::vector temp; - temp.insert(temp.end(), args.begin() + 1, args.end()); + for(unsigned int j = 1; j < args.size(); ++j) + { + temp.push_back(args[j]); + } cmSystemTools::ExpandList(temp, argsExpanded); // now create the new value diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 630944e..c83dc2a 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1269,7 +1269,11 @@ bool cmSystemTools::Split(const char* s, std::vector& l) { std::vector temp; bool res = Superclass::Split(s, temp); - l.insert(l.end(), temp.begin(), temp.end()); + for(std::vector::const_iterator i = temp.begin(); + i != temp.end(); ++i) + { + l.push_back(*i); + } return res; } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 56e9258..865a824 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6456,8 +6456,11 @@ cmTargetInternals::ComputeLinkImplementationLanguages( // Get languages used in our source files. thisTarget->GetLanguages(languages, config); // Copy the set of langauges to the link implementation. - impl.Languages.insert(impl.Languages.begin(), - languages.begin(), languages.end()); + for(std::set::iterator li = languages.begin(); + li != languages.end(); ++li) + { + impl.Languages.push_back(*li); + } } //---------------------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestBuildHandler.cxx | 7 ++++-- Source/CTest/cmCTestMultiProcessHandler.cxx | 7 ++++-- Source/CTest/cmCTestP4.cxx | 6 ++++- Source/CTest/cmCTestSubmitCommand.cxx | 18 +++++++++++--- Source/cmAddTestCommand.cxx | 6 ++++- Source/cmConditionEvaluator.cxx | 10 ++++++-- Source/cmCustomCommand.cxx | 13 +++++++--- Source/cmFindBase.cxx | 6 +++-- Source/cmFunctionCommand.cxx | 6 ++++- Source/cmGeneratorTarget.cxx | 6 ++++- Source/cmInstallFilesCommand.cxx | 7 ++++-- Source/cmInstallProgramsCommand.cxx | 6 ++++- Source/cmLocalGenerator.cxx | 12 +++++++-- Source/cmLocalUnixMakefileGenerator3.cxx | 9 +++++-- Source/cmMacroCommand.cxx | 6 ++++- Source/cmMakefile.cxx | 7 +++++- Source/cmMakefileTargetGenerator.cxx | 36 ++++++++++++++++++++------- Source/cmQtAutoGenerators.cxx | 31 +++++++++++++++++------ Source/cmRemoveCommand.cxx | 5 +++- Source/cmSystemTools.cxx | 6 ++++- Source/cmTarget.cxx | 7 ++++-- 21 files changed, 169 insertions(+), 48 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 09:59:10 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 09:59:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-538-gd760c3c Message-ID: <20141222145910.86371A848C@public.kitware.com> This is an automated email from 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 d760c3cbe8ad5c63cef309ee7a182acdef79def7 (commit) via 202056cdb89da39e35d8af745c1ff0852a9be75d (commit) via d64caa5372b182ce48f752c9afb9141d56055bd2 (commit) from d63609ed2a5f707b0e72adef2a1804cae611caa9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d760c3cbe8ad5c63cef309ee7a182acdef79def7 commit d760c3cbe8ad5c63cef309ee7a182acdef79def7 Merge: d63609e 202056c Author: Brad King AuthorDate: Mon Dec 22 09:59:09 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 09:59:09 2014 -0500 Merge topic 'nightly-binary-updates' 202056cd Utilities/Release: Build Windows and OS X binaries with native SSL d64caa53 Utilities/Release: Fix name of OS X 10.6+ x86_64-only binary ----------------------------------------------------------------------- Summary of changes: Utilities/Release/dash2win64_release.cmake | 7 ++++++- Utilities/Release/dashmacmini5_release.cmake | 11 ++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 09:59:12 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 09:59:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-540-g594db49 Message-ID: <20141222145915.48F18A8494@public.kitware.com> This is an automated email from 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 594db49e567d705bd66501a5444a279b5b3eb0bd (commit) via 844f98c1fd1c9c61f1d73310ee1eb712528cd00f (commit) from d760c3cbe8ad5c63cef309ee7a182acdef79def7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=594db49e567d705bd66501a5444a279b5b3eb0bd commit 594db49e567d705bd66501a5444a279b5b3eb0bd Merge: d760c3c 844f98c Author: Brad King AuthorDate: Mon Dec 22 09:59:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 09:59:11 2014 -0500 Merge topic 'doc-mingw-makefiles' 844f98c1 Help: Clarify MinGW v. MSYS Makefiles generators (#15319) ----------------------------------------------------------------------- Summary of changes: Help/generator/MSYS Makefiles.rst | 10 +++++++--- Help/generator/MinGW Makefiles.rst | 11 ++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 10:00:42 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 10:00:42 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1318-gbe78ca2 Message-ID: <20141222150042.DAD4CA84B9@public.kitware.com> This is an automated email from 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 be78ca212eeef99c0e4de9edb768750257ff82a4 (commit) via 594db49e567d705bd66501a5444a279b5b3eb0bd (commit) via d760c3cbe8ad5c63cef309ee7a182acdef79def7 (commit) from b00e2bee4eb74ce2153fee23ab7ed052dd5f9541 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be78ca212eeef99c0e4de9edb768750257ff82a4 commit be78ca212eeef99c0e4de9edb768750257ff82a4 Merge: b00e2be 594db49 Author: Brad King AuthorDate: Mon Dec 22 10:00:35 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 10:00:35 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 10:01:14 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 10:01:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-544-g99ca7a0 Message-ID: <20141222150114.42810A8518@public.kitware.com> This is an automated email from 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 99ca7a0391dc8363c372aa8717c1217431c829fb (commit) via 90f5845e72a1cd485673940f637afef4730de6a9 (commit) via cbbe840e96aa588028ef5866f303a468d8da747d (commit) via 8af60777e2506611d023473c68a3a975470a6287 (commit) from 594db49e567d705bd66501a5444a279b5b3eb0bd (commit) Those revisions listed 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 Mon Dec 22 10:01:14 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 10:01:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1323-gac68de2 Message-ID: <20141222150114.60CC3A8519@public.kitware.com> This is an automated email from 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 ac68de2c4e85fc22d468b73c55602896625859c5 (commit) via 99ca7a0391dc8363c372aa8717c1217431c829fb (commit) via 90f5845e72a1cd485673940f637afef4730de6a9 (commit) via cbbe840e96aa588028ef5866f303a468d8da747d (commit) via 8af60777e2506611d023473c68a3a975470a6287 (commit) from be78ca212eeef99c0e4de9edb768750257ff82a4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac68de2c4e85fc22d468b73c55602896625859c5 commit ac68de2c4e85fc22d468b73c55602896625859c5 Merge: be78ca2 99ca7a0 Author: Brad King AuthorDate: Mon Dec 22 10:01:05 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 10:01:05 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 10:01:14 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 10:01:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-6-g90f5845 Message-ID: <20141222150114.87E93A851A@public.kitware.com> This is an automated email from 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 90f5845e72a1cd485673940f637afef4730de6a9 (commit) via 844f98c1fd1c9c61f1d73310ee1eb712528cd00f (commit) via cbbe840e96aa588028ef5866f303a468d8da747d (commit) via 44c6db6eb13b52683ad1b4ce49e6805cff076dfb (commit) via 8af60777e2506611d023473c68a3a975470a6287 (commit) via 473446abfa20c949ea896aa11b331f17a0d09029 (commit) from c118816d44e178e4364a0c32aaece81a14511237 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/generator/MSYS Makefiles.rst | 10 +++++++--- Help/generator/MinGW Makefiles.rst | 11 ++++++++--- Help/prop_tgt/TYPE.rst | 3 ++- bootstrap | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 10:35:32 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 10:35:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1325-g389409b Message-ID: <20141222153532.31D00A83ED@public.kitware.com> This is an automated email from 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 389409be3b5b11e8604429179d4998764268fa24 (commit) via e7781c6bbdb2074234bb4115fb50ad1c81998255 (commit) from ac68de2c4e85fc22d468b73c55602896625859c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=389409be3b5b11e8604429179d4998764268fa24 commit 389409be3b5b11e8604429179d4998764268fa24 Merge: ac68de2 e7781c6 Author: Brad King AuthorDate: Mon Dec 22 10:35:31 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 10:35:31 2014 -0500 Merge topic 'AppleClang-5.1-features' into next e7781c6b Tests: Fix RunCMake.CompileFeatures test on Xcode http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7781c6bbdb2074234bb4115fb50ad1c81998255 commit e7781c6bbdb2074234bb4115fb50ad1c81998255 Author: Brad King AuthorDate: Mon Dec 22 10:34:12 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 10:34:12 2014 -0500 Tests: Fix RunCMake.CompileFeatures test on Xcode In the NonValidTarget2 test case, mark the generated source file with the GENERATED property explicitly since it is not marked automatically as the output of any custom command. Mark both the 0 and 1 variants so it works no matter the outcome of the generator expression. diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake index eb84692..c41bf57 100644 --- a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake @@ -4,5 +4,7 @@ set(genexvar $) add_custom_target(copy_target COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.txt" ) +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/copied_file0.cpp" PROPERTY GENERATED 1) +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/copied_file1.cpp" PROPERTY GENERATED 1) add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp") ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 10:45:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 10:45:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1328-gbf87bec Message-ID: <20141222154524.060D0A501D@public.kitware.com> This is an automated email from 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 bf87becbc3d333ee1902226787aca69142789855 (commit) via bd6b42c1864dc1915e5c86cceb609e87f72f93b6 (commit) via b341799e53e468a02bca78e3270e60ddccf8b4f3 (commit) from 389409be3b5b11e8604429179d4998764268fa24 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf87becbc3d333ee1902226787aca69142789855 commit bf87becbc3d333ee1902226787aca69142789855 Merge: 389409b bd6b42c Author: Brad King AuthorDate: Mon Dec 22 10:45:23 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 10:45:23 2014 -0500 Merge topic 'AppleClang-5.1-features' into next bd6b42c1 Features: Record for AppleClang 5.1 b341799e Tests: Fix RunCMake.CompileFeatures test NonValidTarget2 case http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd6b42c1864dc1915e5c86cceb609e87f72f93b6 commit bd6b42c1864dc1915e5c86cceb609e87f72f93b6 Author: Stephen Kelly AuthorDate: Wed Nov 12 22:48:17 2014 +0100 Commit: Brad King CommitDate: Mon Dec 22 10:44:41 2014 -0500 Features: Record for AppleClang 5.1 Apple's Clang 5.1 already supports most of the C and C++ features CMake enumerates. diff --git a/Modules/Compiler/AppleClang-C-FeatureTests.cmake b/Modules/Compiler/AppleClang-C-FeatureTests.cmake new file mode 100644 index 0000000..ec1d43f --- /dev/null +++ b/Modules/Compiler/AppleClang-C-FeatureTests.cmake @@ -0,0 +1,11 @@ + +set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") + +set(AppleClang_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L") +set(_cmake_feature_test_c_static_assert "${AppleClang_C11}") +set(AppleClang_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") +set(_cmake_feature_test_c_restrict "${AppleClang_C99}") +set(_cmake_feature_test_c_variadic_macros "${AppleClang_C99}") + +set(AppleClang_C90 "${_cmake_oldestSupported} && !defined(__STDC_VERSION__)") +set(_cmake_feature_test_c_function_prototypes "${AppleClang_C90}") diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake index 98fcd0b..10edc74 100644 --- a/Modules/Compiler/AppleClang-C.cmake +++ b/Modules/Compiler/AppleClang-C.cmake @@ -1,2 +1,33 @@ include(Compiler/Clang) __compiler_clang(C) + +if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) + set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") + + set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + + set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") +endif() + +set(CMAKE_C_STANDARD_DEFAULT 99) + +macro(cmake_record_c_compile_features) + macro(_get_appleclang_features std_version list) + record_compiler_features(C "${std_version}" ${list}) + endmacro() + + if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1) + _get_appleclang_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES) + endif() + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_C90_STANDARD_COMPILE_OPTION} CMAKE_C90_COMPILE_FEATURES) + endif() + else() + set(_result 0) + endif() +endmacro() diff --git a/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake b/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake new file mode 100644 index 0000000..78bdb72 --- /dev/null +++ b/Modules/Compiler/AppleClang-CXX-FeatureTests.cmake @@ -0,0 +1,31 @@ + +# No known reference for AppleClang versions. +# Generic reference: http://clang.llvm.org/cxx_status.html +# http://clang.llvm.org/docs/LanguageExtensions.html + +set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 501") + +include("${CMAKE_CURRENT_LIST_DIR}/Clang-CXX-TestableFeatures.cmake") + +set(AppleClang51_CXX14 "((__clang_major__ * 100) + __clang_minor__) >= 501 && __cplusplus > 201103L") +# http://llvm.org/bugs/show_bug.cgi?id=19242 +set(_cmake_feature_test_cxx_attribute_deprecated "${AppleClang51_CXX14}") +# http://llvm.org/bugs/show_bug.cgi?id=19698 +set(_cmake_feature_test_cxx_decltype_auto "${AppleClang51_CXX14}") +set(_cmake_feature_test_cxx_digit_separators "${AppleClang51_CXX14}") +# http://llvm.org/bugs/show_bug.cgi?id=19674 +set(_cmake_feature_test_cxx_generic_lambdas "${AppleClang51_CXX14}") + +set(AppleClang51_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_enum_forward_declarations "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_sizeof_member "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_extended_friend_declarations "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_extern_templates "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_func_identifier "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_inline_namespaces "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_long_long_type "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_right_angle_brackets "${AppleClang51_CXX11}") +set(_cmake_feature_test_cxx_variadic_macros "${AppleClang51_CXX11}") + +set(AppleClang_CXX98 "${_cmake_oldestSupported} && __cplusplus >= 199711L") +set(_cmake_feature_test_cxx_template_template_parameters "${AppleClang_CXX98}") diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index c1acae6..eb97f88 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -4,3 +4,34 @@ __compiler_clang(CXX) if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") endif() + +if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") + + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") + + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") +endif() + +set(CMAKE_CXX_STANDARD_DEFAULT 98) + +macro(cmake_record_cxx_compile_features) + macro(_get_appleclang_features std_version list) + record_compiler_features(CXX "${std_version}" ${list}) + endmacro() + + if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) + _get_appleclang_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES) + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) + endif() + if (_result EQUAL 0) + _get_appleclang_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES) + endif() + else() + set(_result 0) + endif() +endmacro() diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index 0b6f0de..36b9706 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -100,7 +100,7 @@ # write_compiler_detection_header( # FILE climbingstats_compiler_detection.h # PREFIX ClimbingStats -# COMPILERS GNU Clang +# COMPILERS GNU Clang AppleClang # FEATURES cxx_variadic_templates # ) # @@ -315,6 +315,7 @@ function(write_compiler_detection_header set(compilers GNU Clang + AppleClang ) set(_hex_compilers ADSP Borland Embarcadero SunPro) @@ -513,7 +514,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignas(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang # define ${def_value} __attribute__ ((__aligned__(X))) # else # define ${def_value} @@ -525,7 +526,7 @@ function(write_compiler_detection_header set(file_content "${file_content} # if ${def_name} # define ${def_value} alignof(X) -# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang +# elif ${prefix_arg}_COMPILER_IS_GNU || ${prefix_arg}_COMPILER_IS_Clang || ${prefix_arg}_COMPILER_IS_AppleClang # define ${def_value} __alignof__(X) # endif \n") diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index 62c7e8c..5b2f1de 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -11,7 +11,7 @@ get_property(c_known_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) write_compiler_detection_header( FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h" PREFIX TEST - COMPILERS GNU Clang + COMPILERS GNU Clang AppleClang VERSION 3.1 PROLOG "// something" EPILOG "// more" @@ -57,14 +57,16 @@ macro(set_defines target true_defs false_defs) endmacro() if (CMAKE_CXX_COMPILER_ID STREQUAL GNU - OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) + OR CMAKE_CXX_COMPILER_ID STREQUAL Clang + OR CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) # False for C++98 mode. list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) endif() if (CMAKE_C_COMPILER_ID STREQUAL GNU - OR CMAKE_C_COMPILER_ID STREQUAL Clang) + OR CMAKE_C_COMPILER_ID STREQUAL Clang + OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) add_executable(C_undefined c_undefined.c) set_property(TARGET C_undefined PROPERTY CXX_STANDARD 90) target_compile_options(C_undefined PRIVATE -Werror=undef) @@ -79,7 +81,7 @@ write_compiler_detection_header( PREFIX MULTI OUTPUT_FILES_VAR multi_files OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support" - COMPILERS GNU Clang + COMPILERS GNU Clang AppleClang VERSION 3.1 FEATURES ${cxx_known_features} ${c_known_features} http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b341799e53e468a02bca78e3270e60ddccf8b4f3 commit b341799e53e468a02bca78e3270e60ddccf8b4f3 Author: Brad King AuthorDate: Mon Dec 22 10:34:12 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 10:36:35 2014 -0500 Tests: Fix RunCMake.CompileFeatures test NonValidTarget2 case Mark the generated source file with the GENERATED property explicitly since it is not marked automatically as the output of any custom command. Mark both the 0 and 1 variants so it works no matter the outcome of the generator expression. diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake index eb84692..c41bf57 100644 --- a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake @@ -4,5 +4,7 @@ set(genexvar $) add_custom_target(copy_target COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.txt" ) +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/copied_file0.cpp" PROPERTY GENERATED 1) +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/copied_file1.cpp" PROPERTY GENERATED 1) add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp") ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From daniele.domenichelli at gmail.com Mon Dec 22 11:26:00 2014 From: daniele.domenichelli at gmail.com (Daniele E. Domenichelli) Date: Mon, 22 Dec 2014 11:26:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1330-g15162ca Message-ID: <20141222162600.AFFA9A8165@public.kitware.com> This is an automated email from 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 15162ca3106d95b0f867b9a89d9b3a6dd0008297 (commit) via 64016393109cee55b3307d6669343e627d709e20 (commit) from bf87becbc3d333ee1902226787aca69142789855 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15162ca3106d95b0f867b9a89d9b3a6dd0008297 commit 15162ca3106d95b0f867b9a89d9b3a6dd0008297 Merge: bf87bec 6401639 Author: Daniele E. Domenichelli AuthorDate: Mon Dec 22 11:25:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 11:25:59 2014 -0500 Merge topic 'CPackComponent-docs-fix' into next 64016393 Help: Small fixes in CPackComponent documentation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64016393109cee55b3307d6669343e627d709e20 commit 64016393109cee55b3307d6669343e627d709e20 Author: Daniele E. Domenichelli AuthorDate: Mon Dec 22 10:29:05 2014 +0100 Commit: Daniele E. Domenichelli CommitDate: Mon Dec 22 17:23:46 2014 +0100 Help: Small fixes in CPackComponent documentation diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake index 5524a3f..573e5aa 100644 --- a/Modules/CPackComponent.cmake +++ b/Modules/CPackComponent.cmake @@ -110,7 +110,7 @@ # # DESCRIPTION is an extended description of the component, used in # graphical installers to give the user additional information about the -# component. Descriptions can span multiple lines using "\n" as the +# component. Descriptions can span multiple lines using ``\n`` as the # line separator. Typically, these descriptions should be no more than # a few lines long. # @@ -185,7 +185,7 @@ # DESCRIPTION is an extended description of the component group, used in # graphical installers to give the user additional information about the # components within that group. Descriptions can span multiple lines -# using "\n" as the line separator. Typically, these descriptions +# using ``\n`` as the line separator. Typically, these descriptions # should be no more than a few lines long. # # PARENT_GROUP, if supplied, names the parent group of this group. ----------------------------------------------------------------------- Summary of changes: Modules/CPackComponent.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From clinton at elemtech.com Mon Dec 22 13:34:21 2014 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 22 Dec 2014 13:34:21 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1333-g4da0681 Message-ID: <20141222183421.63850A8408@public.kitware.com> This is an automated email from 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 4da0681a70ac512367d59c93703e91e76cc62192 (commit) via c294a115f2a44b60eb6343324e15933ef8a4593d (commit) via e42da30782785a02f0fabc385d14ac8f561af602 (commit) from 15162ca3106d95b0f867b9a89d9b3a6dd0008297 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4da0681a70ac512367d59c93703e91e76cc62192 commit 4da0681a70ac512367d59c93703e91e76cc62192 Merge: 15162ca c294a11 Author: Clinton Stimpson AuthorDate: Mon Dec 22 13:34:20 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 13:34:20 2014 -0500 Merge topic 'macho-parser' into next c294a115 Mach-O: Use Mach-O parser to extract install names instead of otool. e42da307 Mach-O: Add Mach-O parser for OS X and iOS. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c294a115f2a44b60eb6343324e15933ef8a4593d commit c294a115f2a44b60eb6343324e15933ef8a4593d Author: Clinton Stimpson AuthorDate: Fri Dec 19 12:31:22 2014 -0700 Commit: Clinton Stimpson CommitDate: Mon Dec 22 11:33:00 2014 -0700 Mach-O: Use Mach-O parser to extract install names instead of otool. This has much better performance than calling "otool" or "xcrun -r otool" to extract install names for rpath support. Fixes bug #15178. diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c83dc2a..1c8c387 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -63,6 +63,10 @@ # include "cmELF.h" #endif +#if defined(CMAKE_USE_MACH_PARSER) +# include "cmMachO.h" +#endif + class cmSystemToolsFileTime { public: @@ -2357,31 +2361,17 @@ bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath, bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath, std::string& soname) { - std::vector cmds; - cmds.push_back("otool"); - cmds.push_back("-D"); - cmds.push_back(fullPath); - - std::string output; - if(!RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE)) +#if defined(CMAKE_USE_MACH_PARSER) + cmMachO macho(fullPath.c_str()); + if(macho) { - cmds.insert(cmds.begin(), "-r"); - cmds.insert(cmds.begin(), "xcrun"); - if(!RunSingleCommand(cmds, &output, 0, 0, OUTPUT_NONE)) - { - return false; - } + return macho.GetInstallName(soname); } +#else + (void)fullPath; + (void)soname; +#endif - std::vector strs = cmSystemTools::tokenize(output, "\n"); - // otool returns extra lines reporting multiple install names - // in case the binary is multi-arch and none of the architectures - // is native (e.g. i386;ppc on x86_64) - if(strs.size() >= 2) - { - soname = strs[1]; - return true; - } return false; } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e42da30782785a02f0fabc385d14ac8f561af602 commit e42da30782785a02f0fabc385d14ac8f561af602 Author: Clinton Stimpson AuthorDate: Fri Dec 19 12:30:22 2014 -0700 Commit: Clinton Stimpson CommitDate: Mon Dec 22 11:32:10 2014 -0700 Mach-O: Add Mach-O parser for OS X and iOS. This parser also supports fat binaries which archive multiple Mach-O binaries. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a4c982f..97f57a3 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -39,6 +39,10 @@ else() set(CMAKE_USE_ELF_PARSER) endif() +if(APPLE) + set(CMAKE_USE_MACH_PARSER 1) +endif() + set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR}) # ensure Unicode friendly APIs are used on Windows @@ -140,6 +144,11 @@ if(CMAKE_USE_ELF_PARSER) set(ELF_SRCS cmELF.h cmELF.cxx) endif() +# Check if we can build the Mach-O parser. +if(CMAKE_USE_MACH_PARSER) + set(MACH_SRCS cmMachO.h cmMachO.cxx) +endif() + # # Sources for CMakeLib # @@ -267,6 +276,7 @@ set(SRCS cmLocalGenerator.cxx cmLocalGenerator.h cmLocalUnixMakefileGenerator3.cxx + ${MACH_SRCS} cmMakeDepend.cxx cmMakeDepend.h cmMakefile.cxx diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 2b0280d..79776f4 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -16,5 +16,6 @@ #cmakedefine HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE #cmakedefine HAVE_UNSETENV #cmakedefine CMAKE_USE_ELF_PARSER +#cmakedefine CMAKE_USE_MACH_PARSER #cmakedefine CMAKE_ENCODING_UTF8 #define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@" diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx new file mode 100644 index 0000000..1607845 --- /dev/null +++ b/Source/cmMachO.cxx @@ -0,0 +1,419 @@ +/*============================================================================ + 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 "cmStandardIncludes.h" // to get CMAKE_USE_MACH_PARSER first +#include "cmMachO.h" + +#include + +// Include the Mach-O format information system header. +#include +#include + +/** + + https://developer.apple.com/library/mac/documentation/ + DeveloperTools/Conceptual/MachORuntime/index.html + + A Mach-O file has 3 major regions: header, load commands and segments. + Data Structures are provided from which + correspond to the file structure. + + The header can be either a struct mach_header or struct mach_header_64. + One can peek at the first 4 bytes to identify the type of header. + + Following is the load command region which starts with + struct load_command, and is followed by n number of load commands. + + In the case of a universal binary (an archive of multiple Mach-O files), + the file begins with a struct fat_header and is followed by multiple + struct fat_arch instances. The struct fat_arch indicates the offset + for each Mach-O file. + + */ + +namespace { + + // peek in the file + template + bool peek(cmsys::ifstream& fin, T &v) + { + std::streampos p = fin.tellg(); + if(!fin.read(reinterpret_cast(&v), sizeof(T))) + { + return false; + } + fin.seekg(p); + return fin.good(); + } + + // read from the file and fill a data structure + template + bool read(cmsys::ifstream& fin, T& v) + { + if(!fin.read(reinterpret_cast(&v), sizeof(T))) + { + return false; + } + return true; + } + + // read from the file and fill multiple data structures where + // the vector has been resized + template + bool read(cmsys::ifstream& fin, std::vector& v) + { + // nothing to read + if(v.empty()) + { + return true; + } + if(!fin.read(reinterpret_cast(&v[0]), sizeof(T) * v.size())) + { + return false; + } + return true; + } +} + + +// Contains header and load commands for a single Mach-O file +class cmMachOHeaderAndLoadCommands +{ +public: + // A load_command and its associated data + struct RawLoadCommand + { + uint32_t type(const cmMachOHeaderAndLoadCommands* m) const + { + if(this->LoadCommand.size() < sizeof(load_command)) + { + return 0; + } + const load_command* cmd = + reinterpret_cast(&this->LoadCommand[0]); + return m->swap(cmd->cmd); + } + std::vector LoadCommand; + }; + + cmMachOHeaderAndLoadCommands(bool _swap) + : Swap(_swap) + { + } + virtual ~cmMachOHeaderAndLoadCommands() + { + } + + virtual bool read_mach_o(cmsys::ifstream& fin) = 0; + + const std::vector& load_commands() const + { + return this->LoadCommands; + } + + uint32_t swap(uint32_t v) const + { + if(this->Swap) + { + char* c = reinterpret_cast(&v); + std::swap(c[0], c[3]); + std::swap(c[1], c[2]); + } + return v; + } + +protected: + bool read_load_commands(uint32_t ncmds, uint32_t sizeofcmds, + cmsys::ifstream& fin); + + bool Swap; + std::vector LoadCommands; +}; + +// Implementation for reading Mach-O header and load commands. +// This is 32 or 64 bit arch specific. +template +class cmMachOHeaderAndLoadCommandsImpl : public cmMachOHeaderAndLoadCommands +{ +public: + cmMachOHeaderAndLoadCommandsImpl(bool _swap) + : cmMachOHeaderAndLoadCommands(_swap) + { + } + bool read_mach_o(cmsys::ifstream& fin) + { + if(!read(fin, this->Header)) + { + return false; + } + this->Header.cputype = swap(this->Header.cputype); + this->Header.cpusubtype = swap(this->Header.cpusubtype); + this->Header.filetype = swap(this->Header.filetype); + this->Header.ncmds = swap(this->Header.ncmds); + this->Header.sizeofcmds = swap(this->Header.sizeofcmds); + this->Header.flags = swap(this->Header.flags); + + return read_load_commands(this->Header.ncmds, + this->Header.sizeofcmds, + fin); + } +protected: + T Header; +}; + + +bool cmMachOHeaderAndLoadCommands::read_load_commands(uint32_t ncmds, + uint32_t sizeofcmds, + cmsys::ifstream& fin) +{ + uint32_t size_read = 0; + this->LoadCommands.resize(ncmds); + for(uint32_t i = 0; iLoadCommands[i]; + c.LoadCommand.resize(lc.cmdsize); + if(!read(fin, c.LoadCommand)) + { + return false; + } + } + + if(size_read != sizeofcmds) + { + this->LoadCommands.clear(); + return false; + } + + return true; +} + +//---------------------------------------------------------------------------- +class cmMachOInternal +{ +public: + cmMachOInternal(const char* fname); + ~cmMachOInternal(); + + // read a Mach-O file + bool read_mach_o(uint32_t file_offset); + + // the file we are reading + cmsys::ifstream Fin; + + // The archs in the universal binary + // If the binary is not a universal binary, this will be empty. + std::vector FatArchs; + + // the error message while parsing + std::string ErrorMessage; + + // the list of Mach-O's + std::vector MachOList; +}; + +cmMachOInternal::cmMachOInternal(const char* fname) + : Fin(fname) +{ + // Quit now if the file could not be opened. + if(!this->Fin || !this->Fin.get() ) + { + this->ErrorMessage = "Error opening input file."; + return; + } + + if(!this->Fin.seekg(0)) + { + this->ErrorMessage = "Error seeking to beginning of file."; + return; + } + + // Read the binary identification block. + uint32_t magic = 0; + if(!peek(this->Fin, magic)) + { + this->ErrorMessage = "Error reading Mach-O identification."; + return; + } + + // Verify the binary identification. + if(!(magic == MH_CIGAM || + magic == MH_MAGIC || + magic == MH_CIGAM_64 || + magic == MH_MAGIC_64 || + magic == FAT_CIGAM || + magic == FAT_MAGIC)) + { + this->ErrorMessage = "File does not have a valid Mach-O identification."; + return; + } + + if(magic == FAT_MAGIC || magic == FAT_CIGAM) + { + // this is a universal binary + fat_header header; + if(!read(this->Fin, header)) + { + this->ErrorMessage = "Error reading fat header."; + return; + } + + // read fat_archs + this->FatArchs.resize(OSSwapBigToHostInt32(header.nfat_arch)); + if(!read(this->Fin, this->FatArchs)) + { + this->ErrorMessage = "Error reading fat header archs."; + return; + } + + // parse each Mach-O file + for(size_t i=0; iFatArchs.size(); i++) + { + const fat_arch& arch = this->FatArchs[i]; + if(!this->read_mach_o(OSSwapBigToHostInt32(arch.offset))) + { + return; + } + } + } + else + { + // parse Mach-O file at the beginning of the file + this->read_mach_o(0); + } +} + +cmMachOInternal::~cmMachOInternal() +{ + for(size_t i=0; iMachOList.size(); i++) + { + delete this->MachOList[i]; + } +} + +bool cmMachOInternal::read_mach_o(uint32_t file_offset) +{ + if(!this->Fin.seekg(file_offset)) + { + this->ErrorMessage = "Failed to locate Mach-O content."; + return false; + } + + uint32_t magic; + if(!peek(this->Fin, magic)) + { + this->ErrorMessage = "Error reading Mach-O identification."; + return false; + } + + cmMachOHeaderAndLoadCommands* f = NULL; + if(magic == MH_CIGAM || magic == MH_MAGIC) + { + bool swap = false; + if(magic == MH_CIGAM) + { + swap = true; + } + f = new cmMachOHeaderAndLoadCommandsImpl(swap); + } + else if(magic == MH_CIGAM_64 || magic == MH_MAGIC_64) + { + bool swap = false; + if(magic == MH_CIGAM_64) + { + swap = true; + } + f = new cmMachOHeaderAndLoadCommandsImpl(swap); + } + + if(f && f->read_mach_o(this->Fin)) + { + this->MachOList.push_back(f); + } + else + { + delete f; + this->ErrorMessage = "Failed to read Mach-O header."; + return false; + } + + return true; +} + +//============================================================================ +// External class implementation. + +//---------------------------------------------------------------------------- +cmMachO::cmMachO(const char* fname): Internal(0) +{ + this->Internal = new cmMachOInternal(fname); + +} + +//---------------------------------------------------------------------------- +cmMachO::~cmMachO() +{ + delete this->Internal; +} + +std::string const& cmMachO::GetErrorMessage() const +{ + return this->Internal->ErrorMessage; +} + +//---------------------------------------------------------------------------- +bool cmMachO::Valid() const +{ + return !this->Internal->MachOList.empty(); +} + +bool cmMachO::GetInstallName(std::string& install_name) +{ + if(this->Internal->MachOList.empty()) + { + return false; + } + + // grab the first Mach-O and get the install name from that one + cmMachOHeaderAndLoadCommands* macho = this->Internal->MachOList[0]; + for(size_t i=0; iload_commands().size(); i++) + { + const cmMachOHeaderAndLoadCommands::RawLoadCommand &cmd = + macho->load_commands()[i]; + uint32_t lc_cmd = cmd.type(macho); + if(lc_cmd == LC_ID_DYLIB || + lc_cmd == LC_LOAD_WEAK_DYLIB || + lc_cmd == LC_LOAD_DYLIB) + { + if(sizeof(dylib_command) < cmd.LoadCommand.size()) + { + uint32_t namelen = cmd.LoadCommand.size() - sizeof(dylib_command); + install_name.assign(&cmd.LoadCommand[sizeof(dylib_command)], namelen); + return true; + } + } + } + + return false; +} + +void cmMachO::PrintInfo(std::ostream& /*os*/) const +{ +} diff --git a/Source/cmMachO.h b/Source/cmMachO.h new file mode 100644 index 0000000..f06f8de --- /dev/null +++ b/Source/cmMachO.h @@ -0,0 +1,51 @@ +/*============================================================================ + 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 cmMachO_h +#define cmMachO_h + +#if !defined(CMAKE_USE_MACH_PARSER) +# error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled." +#endif + +class cmMachOInternal; + +/** \class cmMachO + * \brief Executable and Link Format (Mach-O) parser. + */ +class cmMachO +{ +public: + /** Construct with the name of the Mach-O input file to parse. */ + cmMachO(const char* fname); + + /** Destruct. */ + ~cmMachO(); + + /** Get the error message if any. */ + std::string const& GetErrorMessage() const; + + /** Boolean conversion. True if the Mach-O file is valid. */ + operator bool() const { return this->Valid(); } + + /** Get Install name from binary **/ + bool GetInstallName(std::string& install_name); + + /** Print human-readable information about the Mach-O file. */ + void PrintInfo(std::ostream& os) const; + +private: + friend class cmMachOInternal; + bool Valid() const; + cmMachOInternal* Internal; +}; + +#endif ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 13:41:05 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 13:41:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-547-g6c39bc5 Message-ID: <20141222184105.3667CA423B@public.kitware.com> This is an automated email from 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 6c39bc5520aca779a69ad31c0646777e99c2aaa5 (commit) via c294a115f2a44b60eb6343324e15933ef8a4593d (commit) via e42da30782785a02f0fabc385d14ac8f561af602 (commit) from 99ca7a0391dc8363c372aa8717c1217431c829fb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c39bc5520aca779a69ad31c0646777e99c2aaa5 commit 6c39bc5520aca779a69ad31c0646777e99c2aaa5 Merge: 99ca7a0 c294a11 Author: Brad King AuthorDate: Mon Dec 22 13:41:03 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 13:41:03 2014 -0500 Merge topic 'macho-parser' c294a115 Mach-O: Use Mach-O parser to extract install names instead of otool. e42da307 Mach-O: Add Mach-O parser for OS X and iOS. ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 10 + Source/cmConfigure.cmake.h.in | 1 + Source/cmMachO.cxx | 419 +++++++++++++++++++++++++++++++++++++++++ Source/cmMachO.h | 51 +++++ Source/cmSystemTools.cxx | 34 ++-- 5 files changed, 493 insertions(+), 22 deletions(-) create mode 100644 Source/cmMachO.cxx create mode 100644 Source/cmMachO.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 13:41:20 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 13:41:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1335-gbf4483a Message-ID: <20141222184120.C6971A4C8B@public.kitware.com> This is an automated email from 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 bf4483a2825783adfd1cbe3fa9256cafe1fac7b8 (commit) via 6c39bc5520aca779a69ad31c0646777e99c2aaa5 (commit) from 4da0681a70ac512367d59c93703e91e76cc62192 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf4483a2825783adfd1cbe3fa9256cafe1fac7b8 commit bf4483a2825783adfd1cbe3fa9256cafe1fac7b8 Merge: 4da0681 6c39bc5 Author: Brad King AuthorDate: Mon Dec 22 13:41:12 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 13:41:12 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From robert.maynard at kitware.com Mon Dec 22 14:15:34 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Mon, 22 Dec 2014 14:15:34 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1342-gb68c4f1 Message-ID: <20141222191534.66647A549F@public.kitware.com> This is an automated email from 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 b68c4f1dcb517f04d208c892013a35ad562b4955 (commit) via 76a39f7a191ec42d90157c7d093b8cc97209c912 (commit) via dfb74f5255e8a5ef3af799b61fc0721968adbe28 (commit) via 2dc198b221391e33b4c1f204b1d7d4e2347369c8 (commit) via 309ffd8ef0e2da664cb459d06ca20f0838dadec3 (commit) via a7f55ac9f1b720a3338948f6c6883b3658f9d27b (commit) via 2c8b9f506a6b8bdb2a9f036c1c7566adf5d4c5ab (commit) from bf4483a2825783adfd1cbe3fa9256cafe1fac7b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b68c4f1dcb517f04d208c892013a35ad562b4955 commit b68c4f1dcb517f04d208c892013a35ad562b4955 Merge: bf4483a 76a39f7 Author: Robert Maynard AuthorDate: Mon Dec 22 14:15:33 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 14:15:33 2014 -0500 Merge topic 'better_custom_dmgs' into next 76a39f7a DragNDropGenerator Updated Documentation to include new variables. dfb74f52 DragNDropGenerator now manually computes the size of the temp dmg image. 2dc198b2 DragNDropGenerator copies the background image after the dmg is created. 309ffd8e DragNDropGenerator now can run an apple script when making a package. a7f55ac9 DragNDropGenerator now places the background image file in a hidden folder. 2c8b9f50 DragNDropGenerator background image now uses source file extension. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76a39f7a191ec42d90157c7d093b8cc97209c912 commit 76a39f7a191ec42d90157c7d093b8cc97209c912 Author: Robert Maynard AuthorDate: Thu Dec 18 14:56:37 2014 -0500 Commit: Robert Maynard CommitDate: Thu Dec 18 14:56:37 2014 -0500 DragNDropGenerator Updated Documentation to include new variables. The DragNDropGenerator documentation now covers the new behavior of CPACK_DMG_BACKGROUND_IMAGE and what the purpose of CPACK_DMG_DS_STORE_SETUP_SCRIPT is. diff --git a/Modules/CPackDMG.cmake b/Modules/CPackDMG.cmake index b7a6ba5..b4231e8 100644 --- a/Modules/CPackDMG.cmake +++ b/Modules/CPackDMG.cmake @@ -29,12 +29,23 @@ # the Finder (either manually or through OSA-script) using a normal folder # from which the .DS_Store file can then be extracted. # +# .. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT +# +# Path to a custom OSA-script file. This apple script is used to +# the generate a .DS_Store file which specifies the Finder window +# position/geometry and layout (such as hidden toolbars, placement of the +# icons etc.). By specifying a custom apple script there is no need to +# CPACK_DMG_DS_STORE, as the .DS_Store that is generated by the OSA-script +# will be packaged. +# # .. variable:: CPACK_DMG_BACKGROUND_IMAGE # -# Path to a background image file. This file will be used as the background -# for the Finder Window when the disk image is opened. By default no -# background image is set. The background image is applied after applying the -# custom .DS_Store file. +# Path to an image file to be used as the background. This file will be copied +# to .background/background., where ext is the original image file +# extension. The background image is installed into the image before +# CPACK_DMG_DS_STORE_SETUP_SCRIPT is executed or CPACK_DMG_DS_STORE is +# installed +# By default no background image is set. # # .. variable:: CPACK_COMMAND_HDIUTIL # http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dfb74f5255e8a5ef3af799b61fc0721968adbe28 commit dfb74f5255e8a5ef3af799b61fc0721968adbe28 Author: Robert Maynard AuthorDate: Wed Oct 1 13:52:11 2014 -0400 Commit: Robert Maynard CommitDate: Thu Dec 18 14:39:05 2014 -0500 DragNDropGenerator now manually computes the size of the temp dmg image. When creating a DragNDrop bundle with a custom layout and background you need to make sure that the image size is large enough to store both the background and the custom .DS_Store. Now previously the DragNDropGenerator relied on the fact that both of these files would exist in the staging folder so it could let hdiutil compute an exact size. Now that we allow generation of the .DS_Store to happen after creation of the image we need to manually specify the size of the image to include room for the new .DS_Store and background. The whole reason why we have to delay the background image copy, is that if we let hdiutil package the background image it gets modified in such away that applescript aren't able to specify it as the background image. diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 4229e3d..a335946 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -15,8 +15,10 @@ #include "cmSystemTools.h" #include "cmGeneratedFileStream.h" -#include +#include #include +#include +#include static const char* SLAHeader = "data 'LPic' (5000) {\n" @@ -49,6 +51,49 @@ static const char* SLASTREnglish = "};\n" "\n"; + +namespace +{ + //computes the size of all items in a given folder. + //will not traverse symlinked folders + unsigned long compute_folder_content_size( const std::string& path ) + { + unsigned long sum = 0; //total size in bytes + cmsys::Directory dir; + dir.Load(path.c_str()); + for (unsigned long fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) + { + const std::string fileName(dir.GetFile(fileNum)); + const bool is_not_dot_file = fileName != std::string(".") && + fileName != std::string(".."); + if ( is_not_dot_file ) + { + std::string fullPath = path; + fullPath += "/"; + fullPath += fileName; + + const bool is_folder = + cmSystemTools::FileIsDirectory(fullPath.c_str()); + const bool is_file = + !is_folder; + const bool is_symlink = + cmSystemTools::FileIsSymlink(fullPath.c_str()); + + if( is_folder && !is_symlink) + { + sum += cmSystemTools::FileLength(fullPath.c_str()); + sum += compute_folder_content_size(fullPath); + } + else if( is_file ) + { + sum += cmSystemTools::FileLength(fullPath.c_str()); + } + } + } + return sum; + } +} + //---------------------------------------------------------------------- cmCPackDragNDropGenerator::cmCPackDragNDropGenerator() { @@ -250,6 +295,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT") ? this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT") : ""; + // only put license on dmg if is user provided if(!cpack_license_file.empty() && cpack_license_file.find("CPack.GenericLicense.txt") != std::string::npos) @@ -290,7 +336,25 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, } - // Create a temporary read-write disk image ... + // Create a temporary read-write disk image. If we are adding a DS_Store, + // Background or running a script we need to allocate some buffer space + // in the image, otherwise we won't have enough room + + //first compute the size of the staging_path which requires us to + //iterate over + const std::string staging_path = staging.str(); + unsigned long dmgSize = compute_folder_content_size( staging_path ); + if (!cpack_dmg_background_image.empty()) + { + dmgSize += cmSystemTools::FileLength(cpack_dmg_background_image.c_str()); + } + dmgSize += 8388608; //add 8MB for the DS_Store and buffer + + //now that we have computed the size of the disk image we need to convert + //it to kb. The reason for this is that the hdiutil doesn't have a byte + //size specifier. + const unsigned long dmgSizeAsKB = dmgSize / 1024; + std::string temp_image = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); temp_image += "/temp.dmg"; @@ -298,6 +362,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, temp_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); temp_image_command << " create"; temp_image_command << " -ov"; + temp_image_command << " -size " << dmgSizeAsKB << "k"; temp_image_command << " -srcfolder \"" << staging.str() << "\""; temp_image_command << " -volname \"" << cpack_dmg_volume_name << "\""; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dc198b221391e33b4c1f204b1d7d4e2347369c8 commit 2dc198b221391e33b4c1f204b1d7d4e2347369c8 Author: Robert Maynard AuthorDate: Mon Sep 29 08:43:47 2014 -0400 Commit: Robert Maynard CommitDate: Wed Oct 1 15:59:35 2014 -0400 DragNDropGenerator copies the background image after the dmg is created. This is required so that the permissions on the image are correct so that an apple script can set the background. diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index dac61b4..4229e3d 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -288,71 +288,6 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } } - // Optionally add a custom background image ... - // Make sure the background file type is the same as the custom image - // and that the file is hidden so it doesn't show up. - if(!cpack_dmg_background_image.empty()) - { - const std::string extension = - cmSystemTools::GetFilenameLastExtension(cpack_dmg_background_image); - cmOStringStream package_background_source; - package_background_source << cpack_dmg_background_image; - - cmOStringStream package_background_destination; - package_background_destination << staging.str() - << "/.background/background" << extension; - - if(!this->CopyFile(package_background_source, - package_background_destination)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error copying disk volume background image. " - "Check the value of CPACK_DMG_BACKGROUND_IMAGE." - << std::endl); - - return 0; - } - } - - // Figure out if we have a .DS_Store to install or if we need to run - // an apple-script to generate a .DS_Store - if(!cpack_dmg_ds_store.empty()) - { - // Optionally add a custom .DS_Store file - // (e.g. for setting background/layout) ... - cmOStringStream package_settings_source; - package_settings_source << cpack_dmg_ds_store; - - cmOStringStream package_settings_destination; - package_settings_destination << staging.str() << "/.DS_Store"; - - if(!this->CopyFile(package_settings_source, package_settings_destination)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error copying disk volume settings file. " - "Check the value of CPACK_DMG_DS_STORE." - << std::endl); - - return 0; - } - } - else if(!cpack_dmg_ds_store_setup_script.empty()) - { - //If you don't have a custom .DS_Store file - //we can execute a custom apple script to generate the .DS_Store for - //the application - cmOStringStream setup_script_command; - setup_script_command << "osascript " - << cpack_dmg_ds_store_setup_script; - if(!this->RunCommand(setup_script_command)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error executing custom script on disk image." - << std::endl); - - return 0; - } - } // Create a temporary read-write disk image ... @@ -378,10 +313,16 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } - // Optionally set the custom icon flag for the image ... - if(!cpack_package_icon.empty()) + //mount the image and set the ds_store or custom icon flag + const bool remount_image = !cpack_dmg_background_image.empty() || + !cpack_dmg_ds_store.empty() || + !cpack_dmg_ds_store_setup_script.empty() || + !cpack_package_icon.empty(); + if(remount_image) { - cmOStringStream temp_mount; + //store that we have a failure so that we always unmount the image + //before we exit + bool had_error = false; cmOStringStream attach_command; attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); @@ -397,25 +338,102 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } - cmsys::RegularExpression mountpoint_regex(".*(/Volumes/[^\n]+)\n.*"); mountpoint_regex.find(attach_output.c_str()); + + cmOStringStream temp_mount; temp_mount << mountpoint_regex.match(1); - cmOStringStream setfile_command; - setfile_command << this->GetOption("CPACK_COMMAND_SETFILE"); - setfile_command << " -a C"; - setfile_command << " \"" << temp_mount.str() << "\""; + // Optionally add a custom background image ... + // Make sure the background file type is the same as the custom image + // and that the file is hidden so it doesn't show up. + if(!cpack_dmg_background_image.empty()) + { + const std::string extension = + cmSystemTools::GetFilenameLastExtension(cpack_dmg_background_image); + cmOStringStream package_background_source; + package_background_source << cpack_dmg_background_image; + + cmOStringStream package_background_destination; + package_background_destination << temp_mount.str() + << "/.background/background" << extension; + + if(!this->CopyFile(package_background_source, + package_background_destination)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying disk volume background image. " + "Check the value of CPACK_DMG_BACKGROUND_IMAGE." + << std::endl); + + had_error = true; + } + } - if(!this->RunCommand(setfile_command)) + // Figure out if we have a .DS_Store to install or if we need to run + // an apple-script to generate a .DS_Store + if(!cpack_dmg_ds_store.empty()) { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error assigning custom icon to temporary disk image." - << std::endl); + // Optionally add a custom .DS_Store file + // (e.g. for setting background/layout) ... + cmOStringStream package_settings_source; + package_settings_source << cpack_dmg_ds_store; - return 0; + cmOStringStream package_settings_destination; + package_settings_destination << temp_mount.str() << "/.DS_Store"; + + if(!this->CopyFile(package_settings_source, + package_settings_destination)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying disk volume settings file. " + "Check the value of CPACK_DMG_DS_STORE." + << std::endl); + + had_error = true; + } } + else if(!cpack_dmg_ds_store_setup_script.empty()) + { + //If you don't have a custom .DS_Store file + //we can execute a custom apple script to generate the .DS_Store for + //the application. We pass in as arguments to the apple script + //the location of the disk image + cmOStringStream setup_script_command; + + setup_script_command << "osascript " + << cpack_dmg_ds_store_setup_script + << " " + << "\"" << cpack_dmg_volume_name << "\""; + + if(!this->RunCommand(setup_script_command)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error executing custom script on disk image." + << std::endl); + + had_error = true; + } + } + + if(!cpack_package_icon.empty()) + { + cmOStringStream setfile_command; + setfile_command << this->GetOption("CPACK_COMMAND_SETFILE"); + setfile_command << " -a C"; + setfile_command << " \"" << temp_mount.str() << "\""; + if(!this->RunCommand(setfile_command)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error assigning custom icon to temporary disk image." + << std::endl); + + had_error = true; + } + } + + //finish by detaching the package cmOStringStream detach_command; detach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); detach_command << " detach"; @@ -427,6 +445,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, "Error detaching temporary disk image." << std::endl); + had_error = true; + } + + if(had_error) + { return 0; } } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=309ffd8ef0e2da664cb459d06ca20f0838dadec3 commit 309ffd8ef0e2da664cb459d06ca20f0838dadec3 Author: Robert Maynard AuthorDate: Fri Sep 26 14:38:38 2014 -0400 Commit: Robert Maynard CommitDate: Wed Oct 1 15:59:01 2014 -0400 DragNDropGenerator now can run an apple script when making a package. While the DragNDropGenerator supports custom DS_Store and backgrounds, it is still very hard to automatically setup nice looking packages. The primary issue is that the DS_Store embeds the name of the volume in the path to backgrounds, which means that if a package embeds the version in its volume name a new DS_Store must generated for each release. Instead you now can use applescript to setup your DS_Store. diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 647c408..dac61b4 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -246,6 +246,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, this->GetOption("CPACK_DMG_DS_STORE") ? this->GetOption("CPACK_DMG_DS_STORE") : ""; + const std::string cpack_dmg_ds_store_setup_script = + this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT") + ? this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT") : ""; + // only put license on dmg if is user provided if(!cpack_license_file.empty() && cpack_license_file.find("CPack.GenericLicense.txt") != std::string::npos) @@ -284,11 +288,38 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } } + // Optionally add a custom background image ... + // Make sure the background file type is the same as the custom image + // and that the file is hidden so it doesn't show up. + if(!cpack_dmg_background_image.empty()) + { + const std::string extension = + cmSystemTools::GetFilenameLastExtension(cpack_dmg_background_image); + cmOStringStream package_background_source; + package_background_source << cpack_dmg_background_image; - // Optionally add a custom .DS_Store file - // (e.g. for setting background/layout) ... + cmOStringStream package_background_destination; + package_background_destination << staging.str() + << "/.background/background" << extension; + + if(!this->CopyFile(package_background_source, + package_background_destination)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying disk volume background image. " + "Check the value of CPACK_DMG_BACKGROUND_IMAGE." + << std::endl); + + return 0; + } + } + + // Figure out if we have a .DS_Store to install or if we need to run + // an apple-script to generate a .DS_Store if(!cpack_dmg_ds_store.empty()) { + // Optionally add a custom .DS_Store file + // (e.g. for setting background/layout) ... cmOStringStream package_settings_source; package_settings_source << cpack_dmg_ds_store; @@ -305,33 +336,25 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } } - - // Optionally add a custom background image ... - // Make sure the background file type is the same as the custom image - // and that the file is hidden so it doesn't show up. - if(!cpack_dmg_background_image.empty()) + else if(!cpack_dmg_ds_store_setup_script.empty()) { - const std::string extension = - cmSystemTools::GetFilenameLastExtension(cpack_dmg_background_image); - cmOStringStream package_background_source; - package_background_source << cpack_dmg_background_image; - - cmOStringStream package_background_destination; - package_background_destination << staging.str() - << "/.background/background" << extension; - - if(!this->CopyFile(package_background_source, - package_background_destination)) + //If you don't have a custom .DS_Store file + //we can execute a custom apple script to generate the .DS_Store for + //the application + cmOStringStream setup_script_command; + setup_script_command << "osascript " + << cpack_dmg_ds_store_setup_script; + if(!this->RunCommand(setup_script_command)) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error copying disk volume background image. " - "Check the value of CPACK_DMG_BACKGROUND_IMAGE." + "Error executing custom script on disk image." << std::endl); return 0; } } + // Create a temporary read-write disk image ... std::string temp_image = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); temp_image += "/temp.dmg"; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7f55ac9f1b720a3338948f6c6883b3658f9d27b commit a7f55ac9f1b720a3338948f6c6883b3658f9d27b Author: Robert Maynard AuthorDate: Thu Sep 18 13:59:57 2014 -0400 Commit: Robert Maynard CommitDate: Wed Oct 1 15:56:00 2014 -0400 DragNDropGenerator now places the background image file in a hidden folder. by using a hidden folder we avoid the need to mark the file as hidden from finder, and it makes it easier for future work to refer to the background image file. diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 969f6a3..647c408 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -308,6 +308,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, // Optionally add a custom background image ... // Make sure the background file type is the same as the custom image + // and that the file is hidden so it doesn't show up. if(!cpack_dmg_background_image.empty()) { const std::string extension = @@ -317,7 +318,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, cmOStringStream package_background_destination; package_background_destination << staging.str() - << "/background" << extension; + << "/.background/background" << extension; if(!this->CopyFile(package_background_source, package_background_destination)) @@ -329,21 +330,6 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } - - cmOStringStream temp_background_hiding_command; - temp_background_hiding_command << this->GetOption("CPACK_COMMAND_SETFILE"); - temp_background_hiding_command << " -a V \""; - temp_background_hiding_command << package_background_destination.str(); - temp_background_hiding_command << "\""; - - if(!this->RunCommand(temp_background_hiding_command)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error setting attributes on disk volume background image." - << std::endl); - - return 0; - } } // Create a temporary read-write disk image ... http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c8b9f506a6b8bdb2a9f036c1c7566adf5d4c5ab commit 2c8b9f506a6b8bdb2a9f036c1c7566adf5d4c5ab Author: Robert Maynard AuthorDate: Thu Sep 18 13:59:40 2014 -0400 Commit: Robert Maynard CommitDate: Thu Sep 18 14:41:04 2014 -0400 DragNDropGenerator background image now uses source file extension. Instead of blindly copying the CPACK_DMG_BACKGROUND_IMAGE file to background.png, we instead use the same file extension as the source image. This is needed for proper support of multi resolution tif backgrounds. diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 9f0a77e..969f6a3 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -307,13 +307,17 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, } // Optionally add a custom background image ... + // Make sure the background file type is the same as the custom image if(!cpack_dmg_background_image.empty()) { + const std::string extension = + cmSystemTools::GetFilenameLastExtension(cpack_dmg_background_image); cmOStringStream package_background_source; package_background_source << cpack_dmg_background_image; cmOStringStream package_background_destination; - package_background_destination << staging.str() << "/background.png"; + package_background_destination << staging.str() + << "/background" << extension; if(!this->CopyFile(package_background_source, package_background_destination)) ----------------------------------------------------------------------- Summary of changes: Modules/CPackDMG.cmake | 19 ++- Source/CPack/cmCPackDragNDropGenerator.cxx | 235 ++++++++++++++++++++-------- 2 files changed, 183 insertions(+), 71 deletions(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Mon Dec 22 14:15:55 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Mon, 22 Dec 2014 14:15:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1344-g7d315d7 Message-ID: <20141222191556.23BBFA5499@public.kitware.com> This is an automated email from 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 7d315d7e39a710fdf03b07388b4eec105a22e565 (commit) via 4549f8efd4424ac0d8e8b874d30ac5b25c6f7516 (commit) from b68c4f1dcb517f04d208c892013a35ad562b4955 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d315d7e39a710fdf03b07388b4eec105a22e565 commit 7d315d7e39a710fdf03b07388b4eec105a22e565 Merge: b68c4f1 4549f8e Author: Robert Maynard AuthorDate: Mon Dec 22 14:15:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 14:15:54 2014 -0500 Merge topic 'better_looking_mac_package' into next 4549f8ef CMake DragNDrop release now uses a custom background and script http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4549f8efd4424ac0d8e8b874d30ac5b25c6f7516 commit 4549f8efd4424ac0d8e8b874d30ac5b25c6f7516 Author: Robert Maynard AuthorDate: Mon Sep 29 08:42:49 2014 -0400 Commit: Robert Maynard CommitDate: Thu Dec 18 15:15:11 2014 -0500 CMake DragNDrop release now uses a custom background and script diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index aba404f..7488dc7 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -45,6 +45,12 @@ if("${CPACK_GENERATOR}" STREQUAL "PackageMaker") endif() endif() +if("${CPACK_GENERATOR}" STREQUAL "DragNDrop") + set(CPACK_DMG_BACKGROUND_IMAGE "@CMake_SOURCE_DIR@/CMakeDMGBackground.tif") + set(CPACK_DMG_DS_STORE_SETUP_SCRIPT + "@CMake_SOURCE_DIR@/CMakeDMG_Setup_Script.scrpt") +endif() + if("${CPACK_GENERATOR}" STREQUAL "WIX") # Reset CPACK_PACKAGE_VERSION to deal with WiX restriction. # But the file names still use the full CMake_VERSION value: diff --git a/CMakeDMGBackground.tif b/CMakeDMGBackground.tif new file mode 100644 index 0000000..91c4b13 Binary files /dev/null and b/CMakeDMGBackground.tif differ diff --git a/CMakeDMG_Setup_Script.scrpt b/CMakeDMG_Setup_Script.scrpt new file mode 100644 index 0000000..552c518 --- /dev/null +++ b/CMakeDMG_Setup_Script.scrpt @@ -0,0 +1,42 @@ +on run argv + set image_name to item 1 of argv + + tell application "Finder" + tell disk image_name + + -- open the image the first time and save a DS_Store with just + -- background and icon setup + open + set current view of container window to icon view + set theViewOptions to the icon view options of container window + set background picture of theViewOptions to file ".background:background.tif" + set arrangement of theViewOptions to not arranged + set icon size of theViewOptions to 128 + delay 1 + close + + -- next setup the position of the app and Applications symlink + -- plus hide all the window decoration + open + update without registering applications + tell container window + set sidebar width to 0 + set statusbar visible to false + set toolbar visible to false + set the bounds to { 400, 100, 900, 465 } + set position of item "CMake.app" to { 133, 200 } + set position of item "Applications" to { 378, 200 } + end tell + update without registering applications + delay 1 + close + + -- one last open and close so you can see everything looks correct + open + delay 5 + close + + end tell + delay 1 +end tell +end run \ No newline at end of file ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 6 ++++++ CMakeDMGBackground.tif | Bin 0 -> 95690 bytes CMakeDMG_Setup_Script.scrpt | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 CMakeDMGBackground.tif create mode 100644 CMakeDMG_Setup_Script.scrpt hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 14:25:41 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 14:25:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1346-g5e6b618 Message-ID: <20141222192541.C2E32A7F56@public.kitware.com> This is an automated email from 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 5e6b61862fa0a1bca328c690b0d7a24085688f7d (commit) via 107dcac3e03b6334a4415c0028c6111e3acb8b23 (commit) from 7d315d7e39a710fdf03b07388b4eec105a22e565 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e6b61862fa0a1bca328c690b0d7a24085688f7d commit 5e6b61862fa0a1bca328c690b0d7a24085688f7d Merge: 7d315d7 107dcac Author: Brad King AuthorDate: Mon Dec 22 14:25:41 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 14:25:41 2014 -0500 Merge topic 'backport-suncc-fixes' into next 107dcac3 Fix compilation with the Oracle / Sun compiler (#15318) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=107dcac3e03b6334a4415c0028c6111e3acb8b23 commit 107dcac3e03b6334a4415c0028c6111e3acb8b23 Author: Chuck Atkins AuthorDate: Fri Dec 12 10:04:47 2014 -0500 Commit: Brad King CommitDate: Thu Dec 18 11:23:41 2014 -0500 Fix compilation with the Oracle / Sun compiler (#15318) One piece of code has some ambiguous type deduction that seems to resolve correctly for most compilers but not for the Oracle compiler. Make it more explicit. diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 1fb8f30..a636d23 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -266,9 +266,10 @@ cmComputeLinkDepends::Compute() // Iterate in reverse order so we can keep only the last occurrence // of a shared library. std::set emmitted; + const std::vector& cFLO = this->FinalLinkOrder; for(std::vector::const_reverse_iterator - li = this->FinalLinkOrder.rbegin(), - le = this->FinalLinkOrder.rend(); + li = cFLO.rbegin(), + le = cFLO.rend(); li != le; ++li) { int i = *li; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 14:26:11 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 14:26:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-549-g6697765 Message-ID: <20141222192611.B11CFA7FA1@public.kitware.com> This is an automated email from 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 66977652309f4d754bc1b4603475569db40e4f77 (commit) via 107dcac3e03b6334a4415c0028c6111e3acb8b23 (commit) from 6c39bc5520aca779a69ad31c0646777e99c2aaa5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66977652309f4d754bc1b4603475569db40e4f77 commit 66977652309f4d754bc1b4603475569db40e4f77 Merge: 6c39bc5 107dcac Author: Brad King AuthorDate: Mon Dec 22 14:26:10 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 14:26:10 2014 -0500 Merge topic 'backport-suncc-fixes' 107dcac3 Fix compilation with the Oracle / Sun compiler (#15318) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 14:26:24 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 14:26:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1348-gc70add6 Message-ID: <20141222192624.D00DEA7FD5@public.kitware.com> This is an automated email from 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 c70add604d4dce7692c25bfb29c83b0bdc363877 (commit) via 66977652309f4d754bc1b4603475569db40e4f77 (commit) from 5e6b61862fa0a1bca328c690b0d7a24085688f7d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c70add604d4dce7692c25bfb29c83b0bdc363877 commit c70add604d4dce7692c25bfb29c83b0bdc363877 Merge: 5e6b618 6697765 Author: Brad King AuthorDate: Mon Dec 22 14:26:18 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 14:26:18 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From eike at sf-mail.de Mon Dec 22 15:53:42 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Mon, 22 Dec 2014 15:53:42 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1350-g927204b Message-ID: <20141222205342.2E301A8279@public.kitware.com> This is an automated email from 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 927204b4dad683d7587efb0a855762aa17b3a833 (commit) via 82fbf490b56e0b070cbcfaf1568c496340cd6e8a (commit) from c70add604d4dce7692c25bfb29c83b0bdc363877 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=927204b4dad683d7587efb0a855762aa17b3a833 commit 927204b4dad683d7587efb0a855762aa17b3a833 Merge: c70add6 82fbf49 Author: Rolf Eike Beer AuthorDate: Mon Dec 22 15:53:41 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 15:53:41 2014 -0500 Merge topic 'base64-constref' into next 82fbf490 cmCTestTestHandler: take reference to temporary string instead of doing a copy http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82fbf490b56e0b070cbcfaf1568c496340cd6e8a commit 82fbf490b56e0b070cbcfaf1568c496340cd6e8a Author: Rolf Eike Beer AuthorDate: Mon Dec 22 21:38:59 2014 +0100 Commit: Rolf Eike Beer CommitDate: Mon Dec 22 21:38:59 2014 +0100 cmCTestTestHandler: take reference to temporary string instead of doing a copy This will increase the lifetime of the temporary until the end of the function. diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f330e58..a058501 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1317,7 +1317,7 @@ void cmCTestTestHandler::AttachFiles(std::ostream& os, result->Properties->AttachedFiles.begin(); file != result->Properties->AttachedFiles.end(); ++file) { - std::string base64 = this->CTest->Base64GzipEncodeFile(*file); + const std::string &base64 = this->CTest->Base64GzipEncodeFile(*file); std::string fname = cmSystemTools::GetFilenameName(*file); os << "\t\t" ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestTestHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From eike at sf-mail.de Mon Dec 22 16:06:31 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Mon, 22 Dec 2014 16:06:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1352-g6248f55 Message-ID: <20141222210631.DD939A85A4@public.kitware.com> This is an automated email from 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 6248f5525545334114f2eed43499a415e40977c8 (commit) via 63ee771e798fab869db984914c928efb8d5e5c8f (commit) from 927204b4dad683d7587efb0a855762aa17b3a833 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6248f5525545334114f2eed43499a415e40977c8 commit 6248f5525545334114f2eed43499a415e40977c8 Merge: 927204b 63ee771 Author: Rolf Eike Beer AuthorDate: Mon Dec 22 16:06:31 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 16:06:31 2014 -0500 Merge topic 'base64-casts' into next 63ee771e cmCTest: fix integer overflow when uploading huge files http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63ee771e798fab869db984914c928efb8d5e5c8f commit 63ee771e798fab869db984914c928efb8d5e5c8f Author: Rolf Eike Beer AuthorDate: Mon Dec 22 21:56:14 2014 +0100 Commit: Rolf Eike Beer CommitDate: Mon Dec 22 21:56:14 2014 +0100 cmCTest: fix integer overflow when uploading huge files When uploading files greater 2GB with a 32 bit long the variable will overflow, leading to a bad alloc when passed to new. Also avoid floating point arithmetic when integer calculations will work as well. Reported-by: Justin Borodinsky diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2bf7b77..1a7bf45 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1688,7 +1688,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) //---------------------------------------------------------------------- std::string cmCTest::Base64EncodeFile(std::string file) { - long len = cmSystemTools::FileLength(file); + const size_t len = cmSystemTools::FileLength(file); cmsys::ifstream ifs(file.c_str(), std::ios::in #ifdef _WIN32 | std::ios::binary @@ -1699,8 +1699,7 @@ std::string cmCTest::Base64EncodeFile(std::string file) ifs.close(); unsigned char *encoded_buffer - = new unsigned char [ static_cast( - static_cast(len) * 1.5 + 5.0) ]; + = new unsigned char [ (len * 3) / 2 + 5 ]; unsigned long rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); ----------------------------------------------------------------------- Summary of changes: Source/cmCTest.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 22 18:36:47 2014 From: brad.king at kitware.com (Brad King) Date: Mon, 22 Dec 2014 18:36:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1354-gf37cc80 Message-ID: <20141222233647.687E14DF09@public.kitware.com> This is an automated email from 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 f37cc80bffc7f2fabe0ffb0c290cd19384a88b7f (commit) via 9a13fcbf02e16bda1b8d30332c97ea9460306e4d (commit) from 6248f5525545334114f2eed43499a415e40977c8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f37cc80bffc7f2fabe0ffb0c290cd19384a88b7f commit f37cc80bffc7f2fabe0ffb0c290cd19384a88b7f Merge: 6248f55 9a13fcb Author: Brad King AuthorDate: Mon Dec 22 18:36:44 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 22 18:36:44 2014 -0500 Merge topic 'ninja-fix-crash-on-error' into next 9a13fcbf Ninja: Do not crash when CMAKE__COMPILE_OBJECT is empty (#15325) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a13fcbf02e16bda1b8d30332c97ea9460306e4d commit 9a13fcbf02e16bda1b8d30332c97ea9460306e4d Author: Brad King AuthorDate: Mon Dec 22 18:34:28 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 18:36:07 2014 -0500 Ninja: Do not crash when CMAKE__COMPILE_OBJECT is empty (#15325) diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 816e6d8..b8cc5fb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -454,7 +454,10 @@ cmNinjaTargetGenerator std::vector compileCmds; cmSystemTools::ExpandListArgument(compileCmd, compileCmds); - compileCmds.front().insert(0, cldeps); + if (!compileCmds.empty()) + { + compileCmds.front().insert(0, cldeps); + } for (std::vector::iterator i = compileCmds.begin(); i != compileCmds.end(); ++i) ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaTargetGenerator.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 23 00:01:17 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 23 Dec 2014 00:01:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-550-g7a2d1cd Message-ID: <20141223050117.3982DA7F19@public.kitware.com> This is an automated email from 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 7a2d1cd6d4c1c8759078d2f9e26a930d5e353c88 (commit) from 66977652309f4d754bc1b4603475569db40e4f77 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a2d1cd6d4c1c8759078d2f9e26a930d5e353c88 commit 7a2d1cd6d4c1c8759078d2f9e26a930d5e353c88 Author: Kitware Robot AuthorDate: Tue Dec 23 00:01:15 2014 -0500 Commit: Kitware Robot CommitDate: Tue Dec 23 00:01:15 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a33b829..4c4c90d 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 1) -set(CMake_VERSION_PATCH 20141222) +set(CMake_VERSION_PATCH 20141223) #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 Dec 23 08:18:02 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:18:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1357-ged359fe Message-ID: <20141223131802.3F8BFA4D27@public.kitware.com> This is an automated email from 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 ed359fefbc80b68c3cdf91daa082cd74997f20e6 (commit) via 07fc7b75ef981300e7d873091ee90083b18d1c4a (commit) via fdbfcfdf0173c34845e495f4c0bd407faafc45b4 (commit) from f37cc80bffc7f2fabe0ffb0c290cd19384a88b7f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed359fefbc80b68c3cdf91daa082cd74997f20e6 commit ed359fefbc80b68c3cdf91daa082cd74997f20e6 Merge: f37cc80 07fc7b7 Author: Brad King AuthorDate: Tue Dec 23 08:18:00 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:18:00 2014 -0500 Merge topic 'ninja-fix-subdir-objlib-languages' into next 07fc7b75 Tests: Test using objects from a language enabled in a subdirectory (#15325) fdbfcfdf Ninja: Generate rules only for languages compiled in a target (#15325) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07fc7b75ef981300e7d873091ee90083b18d1c4a commit 07fc7b75ef981300e7d873091ee90083b18d1c4a Author: Brad King AuthorDate: Mon Dec 22 19:55:08 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 20:13:40 2014 -0500 Tests: Test using objects from a language enabled in a subdirectory (#15325) Add a test case that enables CXX in the top level and C in a subdirectory. Create an executable in the top level that uses C objects compiled in the subdirectory. Strictly speaking this is not defined behavior for all language combinations, but happens to work in this case. Test this behavior since projects might try to use it. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index a9cad14..f654330 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -255,6 +255,7 @@ if(BUILD_TESTING) endif() ADD_TEST_MACRO(COnly COnly) ADD_TEST_MACRO(CxxOnly CxxOnly) + ADD_TEST_MACRO(CxxSubdirC CxxSubdirC) ADD_TEST_MACRO(IPO COnly/COnly) ADD_TEST_MACRO(OutDir runtime/OutDir) ADD_TEST_MACRO(ObjectLibrary UseCshared) diff --git a/Tests/CxxSubdirC/CMakeLists.txt b/Tests/CxxSubdirC/CMakeLists.txt new file mode 100644 index 0000000..52474f8 --- /dev/null +++ b/Tests/CxxSubdirC/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.0) +project(CxxSubdirC CXX) +add_subdirectory(Cdir) +add_executable(CxxSubdirC main.cxx $) diff --git a/Tests/CxxSubdirC/Cdir/CMakeLists.txt b/Tests/CxxSubdirC/Cdir/CMakeLists.txt new file mode 100644 index 0000000..08a8757 --- /dev/null +++ b/Tests/CxxSubdirC/Cdir/CMakeLists.txt @@ -0,0 +1,2 @@ +enable_language(C) +add_library(Cobj OBJECT Cobj.c) diff --git a/Tests/CxxSubdirC/Cdir/Cobj.c b/Tests/CxxSubdirC/Cdir/Cobj.c new file mode 100644 index 0000000..75a0045 --- /dev/null +++ b/Tests/CxxSubdirC/Cdir/Cobj.c @@ -0,0 +1 @@ +int Cobj(void) { return 0; } diff --git a/Tests/CxxSubdirC/main.cxx b/Tests/CxxSubdirC/main.cxx new file mode 100644 index 0000000..049220f --- /dev/null +++ b/Tests/CxxSubdirC/main.cxx @@ -0,0 +1,2 @@ +extern "C" int Cobj(void); +int main() { return Cobj(); } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdbfcfdf0173c34845e495f4c0bd407faafc45b4 commit fdbfcfdf0173c34845e495f4c0bd407faafc45b4 Author: Brad King AuthorDate: Mon Dec 22 19:41:17 2014 -0500 Commit: Brad King CommitDate: Mon Dec 22 20:13:30 2014 -0500 Ninja: Generate rules only for languages compiled in a target (#15325) Refactoring in commit v3.1.0-rc1~688^2~2 (cmTarget: Compute languages from object libraries on demand, 2014-03-18) taught cmTarget::GetLanguages to (correctly) include the languages of object library sources. Previously this was done only in cmTarget::ComputeLinkImplementationLanguages to choose the linker language. The Ninja generator writes out generic build rules for each language compiled within a target using the rule variables defined in the directory of the target. This only needs to be done for languages actually compiled within the current target. Switch from using the cmTarget::GetLanguages method to get the list of languages over to using cmTarget::GetSourceFiles directly so we do not get the languages in object libraries. Strictly speaking this should make no difference because it is not safe to use objects from a language not enabled in the directory containing a target or else the link information for the language may not be considered. However, in cases when no link information happens to be needed for a language it was possible in CMake 3.0 and below to enable a language only in a subdirectory providing an object library, and then use the objects from a containing directory. The above change teaches the Ninja generator to continue working in this case. diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index e344df4..a05719d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -110,13 +110,26 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules() << "\n\n"; #endif + // Write rules for languages compiled in this target. std::set languages; - this->GetTarget()->GetLanguages(languages, - this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE")); + std::vector sourceFiles; + this->GetTarget()->GetSourceFiles(sourceFiles, + this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE")); + for(std::vector::const_iterator + i = sourceFiles.begin(); i != sourceFiles.end(); ++i) + { + const std::string& lang = (*i)->GetLanguage(); + if(!lang.empty()) + { + languages.insert(lang); + } + } for(std::set::const_iterator l = languages.begin(); l != languages.end(); ++l) + { this->WriteLanguageRules(*l); + } } const char *cmNinjaNormalTargetGenerator::GetVisibleTypeName() const ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaNormalTargetGenerator.cxx | 17 +++++++++++++++-- Tests/CMakeLists.txt | 1 + Tests/CxxSubdirC/CMakeLists.txt | 4 ++++ Tests/CxxSubdirC/Cdir/CMakeLists.txt | 2 ++ Tests/CxxSubdirC/Cdir/Cobj.c | 1 + Tests/CxxSubdirC/main.cxx | 2 ++ 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Tests/CxxSubdirC/CMakeLists.txt create mode 100644 Tests/CxxSubdirC/Cdir/CMakeLists.txt create mode 100644 Tests/CxxSubdirC/Cdir/Cobj.c create mode 100644 Tests/CxxSubdirC/main.cxx hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:27:31 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:27:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1359-geb2ec05 Message-ID: <20141223132731.462EAA8207@public.kitware.com> This is an automated email from 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 eb2ec05131f8e2a241c02c5fb3e7f03d1d6b54de (commit) via 8d70a91489d74bd6056ba6858d815f5ee47a2e67 (commit) from ed359fefbc80b68c3cdf91daa082cd74997f20e6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb2ec05131f8e2a241c02c5fb3e7f03d1d6b54de commit eb2ec05131f8e2a241c02c5fb3e7f03d1d6b54de Merge: ed359fe 8d70a91 Author: Brad King AuthorDate: Tue Dec 23 08:27:30 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:27:30 2014 -0500 Merge topic 'doc-octothorpe-escaping' into next 8d70a914 Help: Add 3.1 release note about '#' escaping in Makefiles (#15322) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d70a91489d74bd6056ba6858d815f5ee47a2e67 commit 8d70a91489d74bd6056ba6858d815f5ee47a2e67 Author: Brad King AuthorDate: Tue Dec 23 04:07:04 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 08:27:05 2014 -0500 Help: Add 3.1 release note about '#' escaping in Makefiles (#15322) The change in commit v3.1.0-rc1~174^2 (Makefile: Handle '#' in COMPILE_OPTIONS, 2014-08-12) was not compatible with code that tries to workaround the original bug. Unfortunately there is no good way to fix the bug in a compatible way. Add a release note to call attention to the change. diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst index a5b3e8e..97a63f9 100644 --- a/Help/release/3.1.0.rst +++ b/Help/release/3.1.0.rst @@ -353,6 +353,28 @@ Deprecated and Removed Features CMake 3.1 again requires the quotes for this to work correctly. +* Prior to CMake 3.1 the Makefile generators did not escape ``#`` + correctly inside make variable assignments used in generated + makefiles, causing them to be treated as comments. This made + code like:: + + add_compile_options(-Wno-#pragma-messages) + + not work in Makefile generators, but work in other generators. + Now it is escaped correctly, making the behavior consistent + across generators. However, some projects may have tried to + workaround the original bug with code like:: + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-\\#pragma-messages") + + This added the needed escape for Makefile generators but also + caused other generators to pass ``-Wno-\#pragma-messages`` to + the shell, which would work only in POSIX shells. + Unfortunately the escaping fix could not be made in a compatible + way so this platform- and generator-specific workaround no + longer works. Project code may test the :variable:`CMAKE_VERSION` + variable value to make the workaround version-specific too. + * Callbacks established by the :command:`variable_watch` command will no longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is ----------------------------------------------------------------------- Summary of changes: Help/release/3.1.0.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:42:54 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:42:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1361-g86e11c7 Message-ID: <20141223134254.28FB4145BC@public.kitware.com> This is an automated email from 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 86e11c7ecd365d5c1019980ece4056b6d8e4b138 (commit) via bb83cdaab67196c0ddcc0a0dbbd6f73f2e98938a (commit) from eb2ec05131f8e2a241c02c5fb3e7f03d1d6b54de (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86e11c7ecd365d5c1019980ece4056b6d8e4b138 commit 86e11c7ecd365d5c1019980ece4056b6d8e4b138 Merge: eb2ec05 bb83cda Author: Brad King AuthorDate: Tue Dec 23 08:42:53 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:42:53 2014 -0500 Merge topic 'AppleClang-5.1-features' into next bb83cdaa Help: Add notes for topic 'AppleClang-5.1-features' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb83cdaab67196c0ddcc0a0dbbd6f73f2e98938a commit bb83cdaab67196c0ddcc0a0dbbd6f73f2e98938a Author: Brad King AuthorDate: Tue Dec 23 08:41:41 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 08:42:01 2014 -0500 Help: Add notes for topic 'AppleClang-5.1-features' diff --git a/Help/release/dev/AppleClang-5.1-features.rst b/Help/release/dev/AppleClang-5.1-features.rst new file mode 100644 index 0000000..2b92d10 --- /dev/null +++ b/Help/release/dev/AppleClang-5.1-features.rst @@ -0,0 +1,5 @@ +AppleClang-5.1-features +----------------------- + +* The :manual:`Compile Features ` functionality + is now aware of features supported by Apple Clang 5.1 (``AppleClang``). ----------------------------------------------------------------------- Summary of changes: Help/release/dev/AppleClang-5.1-features.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Help/release/dev/AppleClang-5.1-features.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:48:32 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:48:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1364-g2a8f8d9 Message-ID: <20141223134832.815CFA6F5E@public.kitware.com> This is an automated email from 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 2a8f8d925fb30143c1a1f7ca22e125515e8c9c74 (commit) via 1819d4ad1fb0016c20a46a0b66274b53d2b0f010 (commit) via 6ed23ff4e9bbf848a77865e6d08c1e8e6074de92 (commit) from 86e11c7ecd365d5c1019980ece4056b6d8e4b138 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a8f8d925fb30143c1a1f7ca22e125515e8c9c74 commit 2a8f8d925fb30143c1a1f7ca22e125515e8c9c74 Merge: 86e11c7 1819d4a Author: Brad King AuthorDate: Tue Dec 23 08:48:31 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:48:31 2014 -0500 Merge topic 'update-kwsys' into next 1819d4ad Merge branch 'upstream-kwsys' into update-kwsys 6ed23ff4 KWSys 2014-12-23 (5a15cb3b) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1819d4ad1fb0016c20a46a0b66274b53d2b0f010 commit 1819d4ad1fb0016c20a46a0b66274b53d2b0f010 Merge: 6697765 6ed23ff Author: Brad King AuthorDate: Tue Dec 23 08:47:34 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 08:47:34 2014 -0500 Merge branch 'upstream-kwsys' into update-kwsys http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ed23ff4e9bbf848a77865e6d08c1e8e6074de92 commit 6ed23ff4e9bbf848a77865e6d08c1e8e6074de92 Author: KWSys Robot AuthorDate: Tue Dec 23 04:22:43 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 08:47:29 2014 -0500 KWSys 2014-12-23 (5a15cb3b) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 5a15cb3b | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 87c65319..5a15cb3b Brad King (1): 5a15cb3b Base64: Use size_t for lenghts in API Change-Id: I09a2c5d6b67280f96d580c7b26bf8b2aa0bdb709 diff --git a/Base64.c b/Base64.c index d07bdd0..4b8ede2 100644 --- a/Base64.c +++ b/Base64.c @@ -115,10 +115,10 @@ void kwsysBase64_Encode1(const unsigned char *src, unsigned char *dest) actually knowing how much data to expect (if the input is not a multiple of 3 bytes then the extra padding needed to complete the encode 4 bytes will stop the decoding anyway). */ -unsigned long kwsysBase64_Encode(const unsigned char *input, - unsigned long length, - unsigned char *output, - int mark_end) +size_t kwsysBase64_Encode(const unsigned char *input, + size_t length, + unsigned char *output, + int mark_end) { const unsigned char *ptr = input; const unsigned char *end = input + length; @@ -157,7 +157,7 @@ unsigned long kwsysBase64_Encode(const unsigned char *input, optr += 4; } - return (unsigned long)(optr - output); + return (size_t)(optr - output); } /*--------------------------------------------------------------------------*/ @@ -207,10 +207,10 @@ int kwsysBase64_Decode3(const unsigned char *src, unsigned char *dest) 'length' parameter is ignored. This enables the caller to decode a stream without actually knowing how much decoded data to expect (of course, the buffer must be large enough). */ -unsigned long kwsysBase64_Decode(const unsigned char *input, - unsigned long length, - unsigned char *output, - unsigned long max_input_length) +size_t kwsysBase64_Decode(const unsigned char *input, + size_t length, + unsigned char *output, + size_t max_input_length) { const unsigned char *ptr = input; unsigned char *optr = output; @@ -226,7 +226,7 @@ unsigned long kwsysBase64_Decode(const unsigned char *input, optr += len; if(len < 3) { - return (unsigned long)(optr - output); + return (size_t)(optr - output); } ptr += 4; } @@ -240,7 +240,7 @@ unsigned long kwsysBase64_Decode(const unsigned char *input, optr += len; if(len < 3) { - return (unsigned long)(optr - output); + return (size_t)(optr - output); } ptr += 4; } @@ -275,5 +275,5 @@ unsigned long kwsysBase64_Decode(const unsigned char *input, } } - return (unsigned long)(optr - output); + return (size_t)(optr - output); } diff --git a/Base64.h.in b/Base64.h.in index 3468007..36ed3cc 100644 --- a/Base64.h.in +++ b/Base64.h.in @@ -14,6 +14,8 @@ #include <@KWSYS_NAMESPACE@/Configure.h> +#include /* size_t */ + /* Redefine all public interface symbol names to be in the proper namespace. These macros are used internally to kwsys only, and are not visible to user code. Use kwsysHeaderDump.pl to reproduce @@ -68,10 +70,10 @@ kwsysEXPORT void kwsysBase64_Encode1(const unsigned char *src, * the extra padding needed to complete the encode 4 bytes will stop * the decoding anyway). */ -kwsysEXPORT unsigned long kwsysBase64_Encode(const unsigned char *input, - unsigned long length, - unsigned char *output, - int mark_end); +kwsysEXPORT size_t kwsysBase64_Encode(const unsigned char *input, + size_t length, + unsigned char *output, + int mark_end); /** * Decode 4 bytes into a 3 byte string. Returns the number of bytes @@ -92,10 +94,10 @@ kwsysEXPORT int kwsysBase64_Decode3(const unsigned char *src, * much decoded data to expect (of course, the buffer must be large * enough). */ -kwsysEXPORT unsigned long kwsysBase64_Decode(const unsigned char *input, - unsigned long length, - unsigned char *output, - unsigned long max_input_length); +kwsysEXPORT size_t kwsysBase64_Decode(const unsigned char *input, + size_t length, + unsigned char *output, + size_t max_input_length); #if defined(__cplusplus) } /* extern "C" */ ----------------------------------------------------------------------- Summary of changes: Source/kwsys/Base64.c | 24 ++++++++++++------------ Source/kwsys/Base64.h.in | 18 ++++++++++-------- 2 files changed, 22 insertions(+), 20 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:51:12 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:51:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1366-g4da208b Message-ID: <20141223135112.8AD35A764F@public.kitware.com> This is an automated email from 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 4da208b7b12d28d6b71cda06158acdb6a64dc2d2 (commit) via 990df2f2a2f3e2b5f41db97636b96add07a282ab (commit) from 2a8f8d925fb30143c1a1f7ca22e125515e8c9c74 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4da208b7b12d28d6b71cda06158acdb6a64dc2d2 commit 4da208b7b12d28d6b71cda06158acdb6a64dc2d2 Merge: 2a8f8d9 990df2f Author: Brad King AuthorDate: Tue Dec 23 08:51:11 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:51:11 2014 -0500 Merge topic 'base64-casts' into next 990df2f2 CTest: Fix integer overflow when uploading huge files http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=990df2f2a2f3e2b5f41db97636b96add07a282ab commit 990df2f2a2f3e2b5f41db97636b96add07a282ab Author: Rolf Eike Beer AuthorDate: Mon Dec 22 21:56:14 2014 +0100 Commit: Brad King CommitDate: Tue Dec 23 08:49:54 2014 -0500 CTest: Fix integer overflow when uploading huge files When uploading files greater 2GB a cast to 'int' overflows, leading to a bad alloc when passed to new. Also avoid floating point arithmetic when integer calculations will work as well. Reported-by: Justin Borodinsky diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2bf7b77..1a7bf45 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1688,7 +1688,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) //---------------------------------------------------------------------- std::string cmCTest::Base64EncodeFile(std::string file) { - long len = cmSystemTools::FileLength(file); + const size_t len = cmSystemTools::FileLength(file); cmsys::ifstream ifs(file.c_str(), std::ios::in #ifdef _WIN32 | std::ios::binary @@ -1699,8 +1699,7 @@ std::string cmCTest::Base64EncodeFile(std::string file) ifs.close(); unsigned char *encoded_buffer - = new unsigned char [ static_cast( - static_cast(len) * 1.5 + 5.0) ]; + = new unsigned char [ (len * 3) / 2 + 5 ]; unsigned long rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:53:47 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:53:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-552-g400af30 Message-ID: <20141223135347.3C54DA7F0E@public.kitware.com> This is an automated email from 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 400af305efb009e5274f1122dc0d596fb6781f69 (commit) via 1b28e3b28b86de40ceb6d402b6f41f30eb0c8b59 (commit) from 7a2d1cd6d4c1c8759078d2f9e26a930d5e353c88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=400af305efb009e5274f1122dc0d596fb6781f69 commit 400af305efb009e5274f1122dc0d596fb6781f69 Merge: 7a2d1cd 1b28e3b Author: Brad King AuthorDate: Tue Dec 23 08:53:45 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:53:45 2014 -0500 Merge topic 'add-FindGSL' 1b28e3b2 FindGSL: Add module to find the GNU Scientific Library ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 1 + Help/module/FindGSL.rst | 1 + Help/release/dev/add-FindGSL.rst | 5 + Modules/FindGSL.cmake | 238 ++++++++++++++++++++++++++++++++++++++ Tests/CMakeLists.txt | 4 + Tests/FindGSL/CMakeLists.txt | 9 ++ Tests/FindGSL/rng/CMakeLists.txt | 14 +++ Tests/FindGSL/rng/main.cc | 24 ++++ 8 files changed, 296 insertions(+) create mode 100644 Help/module/FindGSL.rst create mode 100644 Help/release/dev/add-FindGSL.rst create mode 100644 Modules/FindGSL.cmake create mode 100644 Tests/FindGSL/CMakeLists.txt create mode 100644 Tests/FindGSL/rng/CMakeLists.txt create mode 100644 Tests/FindGSL/rng/main.cc hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:53:49 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:53:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-554-ga19a43a Message-ID: <20141223135349.5440EA7F44@public.kitware.com> This is an automated email from 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 a19a43a930a577edb7f2aa2fc11e28faf7134d9c (commit) via 9c4984b4e50b3ab9c09349240c532957c3189116 (commit) from 400af305efb009e5274f1122dc0d596fb6781f69 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a19a43a930a577edb7f2aa2fc11e28faf7134d9c commit a19a43a930a577edb7f2aa2fc11e28faf7134d9c Merge: 400af30 9c4984b Author: Brad King AuthorDate: Tue Dec 23 08:53:48 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:53:48 2014 -0500 Merge topic 'ctest-coverage-extra-line-error' 9c4984b4 ctest_coverage: Fix error message to report the file name ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestCoverageHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:53:51 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:53:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-558-g656af73 Message-ID: <20141223135351.454EFA7653@public.kitware.com> This is an automated email from 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 656af73bca01e4d0834b398685513be2a30c2c7d (commit) via e2a489c76aed54e96e85627a66692a11784e9824 (commit) via 0f99feec04193504a5a9ffc05e2132619ecf7dfe (commit) via 722f1a71e397d1ebfad439fcaae6e199c8976289 (commit) from a19a43a930a577edb7f2aa2fc11e28faf7134d9c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=656af73bca01e4d0834b398685513be2a30c2c7d commit 656af73bca01e4d0834b398685513be2a30c2c7d Merge: a19a43a e2a489c Author: Brad King AuthorDate: Tue Dec 23 08:53:50 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:53:50 2014 -0500 Merge topic 'cleanup-ExpandListArgument-usage' e2a489c7 Remove some temporary vectors for ExpandListArgument. 0f99feec cmGeneratorExpression: Remove unused header. 722f1a71 CTest: Expand a string directly into a container. ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestTestHandler.cxx | 51 ++++------------------------------ Source/cmCTest.cxx | 8 ++---- Source/cmGeneratorExpression.cxx | 2 -- Source/cmMakefileTargetGenerator.cxx | 8 +----- Source/cmQtAutoGenerators.cxx | 9 +----- 5 files changed, 11 insertions(+), 67 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:53:53 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:53:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-562-g396a008 Message-ID: <20141223135353.8551FA7F44@public.kitware.com> This is an automated email from 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 396a008ff0ffed5d4f07f0cb66de5d2523772184 (commit) via bb83cdaab67196c0ddcc0a0dbbd6f73f2e98938a (commit) via bd6b42c1864dc1915e5c86cceb609e87f72f93b6 (commit) via b341799e53e468a02bca78e3270e60ddccf8b4f3 (commit) from 656af73bca01e4d0834b398685513be2a30c2c7d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=396a008ff0ffed5d4f07f0cb66de5d2523772184 commit 396a008ff0ffed5d4f07f0cb66de5d2523772184 Merge: 656af73 bb83cda Author: Brad King AuthorDate: Tue Dec 23 08:53:52 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:53:52 2014 -0500 Merge topic 'AppleClang-5.1-features' bb83cdaa Help: Add notes for topic 'AppleClang-5.1-features' bd6b42c1 Features: Record for AppleClang 5.1 b341799e Tests: Fix RunCMake.CompileFeatures test NonValidTarget2 case ----------------------------------------------------------------------- Summary of changes: Help/release/dev/AppleClang-5.1-features.rst | 5 ++++ Modules/Compiler/AppleClang-C-FeatureTests.cmake | 11 +++++++ Modules/Compiler/AppleClang-C.cmake | 31 ++++++++++++++++++++ Modules/Compiler/AppleClang-CXX-FeatureTests.cmake | 31 ++++++++++++++++++++ Modules/Compiler/AppleClang-CXX.cmake | 31 ++++++++++++++++++++ Modules/WriteCompilerDetectionHeader.cmake | 7 +++-- .../WriteCompilerDetectionHeader/CMakeLists.txt | 10 ++++--- .../RunCMake/CompileFeatures/NonValidTarget2.cmake | 2 ++ 8 files changed, 121 insertions(+), 7 deletions(-) create mode 100644 Help/release/dev/AppleClang-5.1-features.rst create mode 100644 Modules/Compiler/AppleClang-C-FeatureTests.cmake create mode 100644 Modules/Compiler/AppleClang-CXX-FeatureTests.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:53:55 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:53:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-564-g3b3da0d Message-ID: <20141223135355.BE608A7F3B@public.kitware.com> This is an automated email from 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 3b3da0d39e36b88db521c8f7eec31ede82596ba1 (commit) via 64016393109cee55b3307d6669343e627d709e20 (commit) from 396a008ff0ffed5d4f07f0cb66de5d2523772184 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b3da0d39e36b88db521c8f7eec31ede82596ba1 commit 3b3da0d39e36b88db521c8f7eec31ede82596ba1 Merge: 396a008 6401639 Author: Brad King AuthorDate: Tue Dec 23 08:53:54 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:53:54 2014 -0500 Merge topic 'CPackComponent-docs-fix' 64016393 Help: Small fixes in CPackComponent documentation ----------------------------------------------------------------------- Summary of changes: Modules/CPackComponent.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:53:57 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:53:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-566-g23e9bc5 Message-ID: <20141223135357.E78C8A7F2D@public.kitware.com> This is an automated email from 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 23e9bc55f38665adab6406980edfaa26f5b14d88 (commit) via 82fbf490b56e0b070cbcfaf1568c496340cd6e8a (commit) from 3b3da0d39e36b88db521c8f7eec31ede82596ba1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23e9bc55f38665adab6406980edfaa26f5b14d88 commit 23e9bc55f38665adab6406980edfaa26f5b14d88 Merge: 3b3da0d 82fbf49 Author: Brad King AuthorDate: Tue Dec 23 08:53:56 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:53:56 2014 -0500 Merge topic 'base64-constref' 82fbf490 cmCTestTestHandler: take reference to temporary string instead of doing a copy ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestTestHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:54:00 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:54:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-568-g90b015a Message-ID: <20141223135400.11530A7F0E@public.kitware.com> This is an automated email from 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 90b015a0bacdbc066670becf0e16843c104cce8c (commit) via 9a13fcbf02e16bda1b8d30332c97ea9460306e4d (commit) from 23e9bc55f38665adab6406980edfaa26f5b14d88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90b015a0bacdbc066670becf0e16843c104cce8c commit 90b015a0bacdbc066670becf0e16843c104cce8c Merge: 23e9bc5 9a13fcb Author: Brad King AuthorDate: Tue Dec 23 08:53:59 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:53:59 2014 -0500 Merge topic 'ninja-fix-crash-on-error' 9a13fcbf Ninja: Do not crash when CMAKE__COMPILE_OBJECT is empty (#15325) ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaTargetGenerator.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:54:02 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:54:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-570-gcca8c3b Message-ID: <20141223135402.3A423A7F47@public.kitware.com> This is an automated email from 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 cca8c3bb60ae156e3b14ca3d158a83b819b30d37 (commit) via 8d70a91489d74bd6056ba6858d815f5ee47a2e67 (commit) from 90b015a0bacdbc066670becf0e16843c104cce8c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cca8c3bb60ae156e3b14ca3d158a83b819b30d37 commit cca8c3bb60ae156e3b14ca3d158a83b819b30d37 Merge: 90b015a 8d70a91 Author: Brad King AuthorDate: Tue Dec 23 08:54:01 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 08:54:01 2014 -0500 Merge topic 'doc-octothorpe-escaping' 8d70a914 Help: Add 3.1 release note about '#' escaping in Makefiles (#15322) ----------------------------------------------------------------------- Summary of changes: Help/release/3.1.0.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:54:22 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:54:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1376-gf8d5ed1 Message-ID: <20141223135422.B7A0AA7F4E@public.kitware.com> This is an automated email from 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 f8d5ed133d146f00474fe68e73048c31e8359a83 (commit) via cca8c3bb60ae156e3b14ca3d158a83b819b30d37 (commit) via 90b015a0bacdbc066670becf0e16843c104cce8c (commit) via 23e9bc55f38665adab6406980edfaa26f5b14d88 (commit) via 3b3da0d39e36b88db521c8f7eec31ede82596ba1 (commit) via 396a008ff0ffed5d4f07f0cb66de5d2523772184 (commit) via 656af73bca01e4d0834b398685513be2a30c2c7d (commit) via a19a43a930a577edb7f2aa2fc11e28faf7134d9c (commit) via 400af305efb009e5274f1122dc0d596fb6781f69 (commit) via 7a2d1cd6d4c1c8759078d2f9e26a930d5e353c88 (commit) from 4da208b7b12d28d6b71cda06158acdb6a64dc2d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8d5ed133d146f00474fe68e73048c31e8359a83 commit f8d5ed133d146f00474fe68e73048c31e8359a83 Merge: 4da208b cca8c3b Author: Brad King AuthorDate: Tue Dec 23 08:54:12 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 08:54:12 2014 -0500 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 Dec 23 08:56:54 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:56:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-574-g99f682b Message-ID: <20141223135654.93D3FA80C8@public.kitware.com> This is an automated email from 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 99f682b0fd2d01c57a365442b472ed628bdb7a9b (commit) via 62b19984039235d5325ee1ad6a7643a4ccd696a8 (commit) via d62733b48a7360ffd62a2da4148f717c874da36c (commit) via 9755fd0e6c9a08dc40e922942d608d52542de9d6 (commit) from cca8c3bb60ae156e3b14ca3d158a83b819b30d37 (commit) Those revisions listed 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 Tue Dec 23 08:56:54 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:56:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1381-gc49d23f Message-ID: <20141223135654.B5798A80C9@public.kitware.com> This is an automated email from 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 c49d23f531be40047bd28d0cc248aa6ac47ef41c (commit) via 99f682b0fd2d01c57a365442b472ed628bdb7a9b (commit) via 62b19984039235d5325ee1ad6a7643a4ccd696a8 (commit) via d62733b48a7360ffd62a2da4148f717c874da36c (commit) via 9755fd0e6c9a08dc40e922942d608d52542de9d6 (commit) from f8d5ed133d146f00474fe68e73048c31e8359a83 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c49d23f531be40047bd28d0cc248aa6ac47ef41c commit c49d23f531be40047bd28d0cc248aa6ac47ef41c Merge: f8d5ed1 99f682b Author: Brad King AuthorDate: Tue Dec 23 08:56:44 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 08:56:44 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 08:56:54 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 08:56:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.1.0-12-g62b1998 Message-ID: <20141223135654.C705FA80C9@public.kitware.com> This is an automated email from 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 62b19984039235d5325ee1ad6a7643a4ccd696a8 (commit) via 9a13fcbf02e16bda1b8d30332c97ea9460306e4d (commit) via d62733b48a7360ffd62a2da4148f717c874da36c (commit) via 64016393109cee55b3307d6669343e627d709e20 (commit) via 9755fd0e6c9a08dc40e922942d608d52542de9d6 (commit) via 107dcac3e03b6334a4415c0028c6111e3acb8b23 (commit) from 90f5845e72a1cd485673940f637afef4730de6a9 (commit) Those revisions listed 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/CPackComponent.cmake | 4 ++-- Source/cmComputeLinkDepends.cxx | 5 +++-- Source/cmNinjaTargetGenerator.cxx | 5 ++++- 3 files changed, 9 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 09:00:09 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 09:00:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1383-g0ea1a97 Message-ID: <20141223140009.AAB6DA83F4@public.kitware.com> This is an automated email from 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 0ea1a975a8c4873be4529c03a6967b9c3e008c9b (commit) via 3b59cec219c58289c47311807734cfce2229e112 (commit) from c49d23f531be40047bd28d0cc248aa6ac47ef41c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ea1a975a8c4873be4529c03a6967b9c3e008c9b commit 0ea1a975a8c4873be4529c03a6967b9c3e008c9b Merge: c49d23f 3b59cec Author: Brad King AuthorDate: Tue Dec 23 09:00:08 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 09:00:08 2014 -0500 Merge topic 'better_looking_mac_package' into next 3b59cec2 Revert topic 'better_looking_mac_package' http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b59cec219c58289c47311807734cfce2229e112 commit 3b59cec219c58289c47311807734cfce2229e112 Author: Brad King AuthorDate: Tue Dec 23 08:59:28 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 08:59:35 2014 -0500 Revert topic 'better_looking_mac_package' It does not work on OS X <= 10.5 and will need to be revised. diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 7488dc7..aba404f 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -45,12 +45,6 @@ if("${CPACK_GENERATOR}" STREQUAL "PackageMaker") endif() endif() -if("${CPACK_GENERATOR}" STREQUAL "DragNDrop") - set(CPACK_DMG_BACKGROUND_IMAGE "@CMake_SOURCE_DIR@/CMakeDMGBackground.tif") - set(CPACK_DMG_DS_STORE_SETUP_SCRIPT - "@CMake_SOURCE_DIR@/CMakeDMG_Setup_Script.scrpt") -endif() - if("${CPACK_GENERATOR}" STREQUAL "WIX") # Reset CPACK_PACKAGE_VERSION to deal with WiX restriction. # But the file names still use the full CMake_VERSION value: diff --git a/CMakeDMGBackground.tif b/CMakeDMGBackground.tif deleted file mode 100644 index 91c4b13..0000000 Binary files a/CMakeDMGBackground.tif and /dev/null differ diff --git a/CMakeDMG_Setup_Script.scrpt b/CMakeDMG_Setup_Script.scrpt deleted file mode 100644 index 552c518..0000000 --- a/CMakeDMG_Setup_Script.scrpt +++ /dev/null @@ -1,42 +0,0 @@ -on run argv - set image_name to item 1 of argv - - tell application "Finder" - tell disk image_name - - -- open the image the first time and save a DS_Store with just - -- background and icon setup - open - set current view of container window to icon view - set theViewOptions to the icon view options of container window - set background picture of theViewOptions to file ".background:background.tif" - set arrangement of theViewOptions to not arranged - set icon size of theViewOptions to 128 - delay 1 - close - - -- next setup the position of the app and Applications symlink - -- plus hide all the window decoration - open - update without registering applications - tell container window - set sidebar width to 0 - set statusbar visible to false - set toolbar visible to false - set the bounds to { 400, 100, 900, 465 } - set position of item "CMake.app" to { 133, 200 } - set position of item "Applications" to { 378, 200 } - end tell - update without registering applications - delay 1 - close - - -- one last open and close so you can see everything looks correct - open - delay 5 - close - - end tell - delay 1 -end tell -end run \ No newline at end of file diff --git a/Modules/CPackDMG.cmake b/Modules/CPackDMG.cmake index b4231e8..b7a6ba5 100644 --- a/Modules/CPackDMG.cmake +++ b/Modules/CPackDMG.cmake @@ -29,23 +29,12 @@ # the Finder (either manually or through OSA-script) using a normal folder # from which the .DS_Store file can then be extracted. # -# .. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT -# -# Path to a custom OSA-script file. This apple script is used to -# the generate a .DS_Store file which specifies the Finder window -# position/geometry and layout (such as hidden toolbars, placement of the -# icons etc.). By specifying a custom apple script there is no need to -# CPACK_DMG_DS_STORE, as the .DS_Store that is generated by the OSA-script -# will be packaged. -# # .. variable:: CPACK_DMG_BACKGROUND_IMAGE # -# Path to an image file to be used as the background. This file will be copied -# to .background/background., where ext is the original image file -# extension. The background image is installed into the image before -# CPACK_DMG_DS_STORE_SETUP_SCRIPT is executed or CPACK_DMG_DS_STORE is -# installed -# By default no background image is set. +# Path to a background image file. This file will be used as the background +# for the Finder Window when the disk image is opened. By default no +# background image is set. The background image is applied after applying the +# custom .DS_Store file. # # .. variable:: CPACK_COMMAND_HDIUTIL # diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index a335946..9f0a77e 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -15,10 +15,8 @@ #include "cmSystemTools.h" #include "cmGeneratedFileStream.h" -#include -#include #include -#include +#include static const char* SLAHeader = "data 'LPic' (5000) {\n" @@ -51,49 +49,6 @@ static const char* SLASTREnglish = "};\n" "\n"; - -namespace -{ - //computes the size of all items in a given folder. - //will not traverse symlinked folders - unsigned long compute_folder_content_size( const std::string& path ) - { - unsigned long sum = 0; //total size in bytes - cmsys::Directory dir; - dir.Load(path.c_str()); - for (unsigned long fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) - { - const std::string fileName(dir.GetFile(fileNum)); - const bool is_not_dot_file = fileName != std::string(".") && - fileName != std::string(".."); - if ( is_not_dot_file ) - { - std::string fullPath = path; - fullPath += "/"; - fullPath += fileName; - - const bool is_folder = - cmSystemTools::FileIsDirectory(fullPath.c_str()); - const bool is_file = - !is_folder; - const bool is_symlink = - cmSystemTools::FileIsSymlink(fullPath.c_str()); - - if( is_folder && !is_symlink) - { - sum += cmSystemTools::FileLength(fullPath.c_str()); - sum += compute_folder_content_size(fullPath); - } - else if( is_file ) - { - sum += cmSystemTools::FileLength(fullPath.c_str()); - } - } - } - return sum; - } -} - //---------------------------------------------------------------------- cmCPackDragNDropGenerator::cmCPackDragNDropGenerator() { @@ -291,11 +246,6 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, this->GetOption("CPACK_DMG_DS_STORE") ? this->GetOption("CPACK_DMG_DS_STORE") : ""; - const std::string cpack_dmg_ds_store_setup_script = - this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT") - ? this->GetOption("CPACK_DMG_DS_STORE_SETUP_SCRIPT") : ""; - - // only put license on dmg if is user provided if(!cpack_license_file.empty() && cpack_license_file.find("CPack.GenericLicense.txt") != std::string::npos) @@ -335,26 +285,64 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, } } + // Optionally add a custom .DS_Store file + // (e.g. for setting background/layout) ... + if(!cpack_dmg_ds_store.empty()) + { + cmOStringStream package_settings_source; + package_settings_source << cpack_dmg_ds_store; - // Create a temporary read-write disk image. If we are adding a DS_Store, - // Background or running a script we need to allocate some buffer space - // in the image, otherwise we won't have enough room + cmOStringStream package_settings_destination; + package_settings_destination << staging.str() << "/.DS_Store"; - //first compute the size of the staging_path which requires us to - //iterate over - const std::string staging_path = staging.str(); - unsigned long dmgSize = compute_folder_content_size( staging_path ); - if (!cpack_dmg_background_image.empty()) - { - dmgSize += cmSystemTools::FileLength(cpack_dmg_background_image.c_str()); + if(!this->CopyFile(package_settings_source, package_settings_destination)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying disk volume settings file. " + "Check the value of CPACK_DMG_DS_STORE." + << std::endl); + + return 0; + } } - dmgSize += 8388608; //add 8MB for the DS_Store and buffer - //now that we have computed the size of the disk image we need to convert - //it to kb. The reason for this is that the hdiutil doesn't have a byte - //size specifier. - const unsigned long dmgSizeAsKB = dmgSize / 1024; + // Optionally add a custom background image ... + if(!cpack_dmg_background_image.empty()) + { + cmOStringStream package_background_source; + package_background_source << cpack_dmg_background_image; + + cmOStringStream package_background_destination; + package_background_destination << staging.str() << "/background.png"; + + if(!this->CopyFile(package_background_source, + package_background_destination)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error copying disk volume background image. " + "Check the value of CPACK_DMG_BACKGROUND_IMAGE." + << std::endl); + + return 0; + } + + cmOStringStream temp_background_hiding_command; + temp_background_hiding_command << this->GetOption("CPACK_COMMAND_SETFILE"); + temp_background_hiding_command << " -a V \""; + temp_background_hiding_command << package_background_destination.str(); + temp_background_hiding_command << "\""; + + if(!this->RunCommand(temp_background_hiding_command)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error setting attributes on disk volume background image." + << std::endl); + + return 0; + } + } + // Create a temporary read-write disk image ... std::string temp_image = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); temp_image += "/temp.dmg"; @@ -362,7 +350,6 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, temp_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); temp_image_command << " create"; temp_image_command << " -ov"; - temp_image_command << " -size " << dmgSizeAsKB << "k"; temp_image_command << " -srcfolder \"" << staging.str() << "\""; temp_image_command << " -volname \"" << cpack_dmg_volume_name << "\""; @@ -378,16 +365,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } - //mount the image and set the ds_store or custom icon flag - const bool remount_image = !cpack_dmg_background_image.empty() || - !cpack_dmg_ds_store.empty() || - !cpack_dmg_ds_store_setup_script.empty() || - !cpack_package_icon.empty(); - if(remount_image) + // Optionally set the custom icon flag for the image ... + if(!cpack_package_icon.empty()) { - //store that we have a failure so that we always unmount the image - //before we exit - bool had_error = false; + cmOStringStream temp_mount; cmOStringStream attach_command; attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); @@ -403,102 +384,25 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, return 0; } + cmsys::RegularExpression mountpoint_regex(".*(/Volumes/[^\n]+)\n.*"); mountpoint_regex.find(attach_output.c_str()); - - cmOStringStream temp_mount; temp_mount << mountpoint_regex.match(1); - // Optionally add a custom background image ... - // Make sure the background file type is the same as the custom image - // and that the file is hidden so it doesn't show up. - if(!cpack_dmg_background_image.empty()) - { - const std::string extension = - cmSystemTools::GetFilenameLastExtension(cpack_dmg_background_image); - cmOStringStream package_background_source; - package_background_source << cpack_dmg_background_image; - - cmOStringStream package_background_destination; - package_background_destination << temp_mount.str() - << "/.background/background" << extension; - - if(!this->CopyFile(package_background_source, - package_background_destination)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error copying disk volume background image. " - "Check the value of CPACK_DMG_BACKGROUND_IMAGE." - << std::endl); - - had_error = true; - } - } + cmOStringStream setfile_command; + setfile_command << this->GetOption("CPACK_COMMAND_SETFILE"); + setfile_command << " -a C"; + setfile_command << " \"" << temp_mount.str() << "\""; - // Figure out if we have a .DS_Store to install or if we need to run - // an apple-script to generate a .DS_Store - if(!cpack_dmg_ds_store.empty()) + if(!this->RunCommand(setfile_command)) { - // Optionally add a custom .DS_Store file - // (e.g. for setting background/layout) ... - cmOStringStream package_settings_source; - package_settings_source << cpack_dmg_ds_store; - - cmOStringStream package_settings_destination; - package_settings_destination << temp_mount.str() << "/.DS_Store"; - - if(!this->CopyFile(package_settings_source, - package_settings_destination)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error copying disk volume settings file. " - "Check the value of CPACK_DMG_DS_STORE." - << std::endl); - - had_error = true; - } - } - else if(!cpack_dmg_ds_store_setup_script.empty()) - { - //If you don't have a custom .DS_Store file - //we can execute a custom apple script to generate the .DS_Store for - //the application. We pass in as arguments to the apple script - //the location of the disk image - cmOStringStream setup_script_command; - - setup_script_command << "osascript " - << cpack_dmg_ds_store_setup_script - << " " - << "\"" << cpack_dmg_volume_name << "\""; - - if(!this->RunCommand(setup_script_command)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error executing custom script on disk image." - << std::endl); - - had_error = true; - } - } - - if(!cpack_package_icon.empty()) - { - cmOStringStream setfile_command; - setfile_command << this->GetOption("CPACK_COMMAND_SETFILE"); - setfile_command << " -a C"; - setfile_command << " \"" << temp_mount.str() << "\""; - - if(!this->RunCommand(setfile_command)) - { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error assigning custom icon to temporary disk image." - << std::endl); + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error assigning custom icon to temporary disk image." + << std::endl); - had_error = true; - } + return 0; } - //finish by detaching the package cmOStringStream detach_command; detach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); detach_command << " detach"; @@ -510,11 +414,6 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, "Error detaching temporary disk image." << std::endl); - had_error = true; - } - - if(had_error) - { return 0; } } ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 6 - CMakeDMGBackground.tif | Bin 95690 -> 0 bytes CMakeDMG_Setup_Script.scrpt | 42 ----- Modules/CPackDMG.cmake | 19 +-- Source/CPack/cmCPackDragNDropGenerator.cxx | 235 ++++++++-------------------- 5 files changed, 71 insertions(+), 231 deletions(-) delete mode 100644 CMakeDMGBackground.tif delete mode 100644 CMakeDMG_Setup_Script.scrpt hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 09:06:28 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 09:06:28 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1386-ge0a5d8f Message-ID: <20141223140628.B27F5A8515@public.kitware.com> This is an automated email from 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 e0a5d8f871bccbc5bcf4460778fd5bdfbf1957e3 (commit) via 098fc4a862d51ad7cca154cdd5f0a2a8ff0763c7 (commit) via 1a9ba38174578e56a277cc0d0dfa2b3f8340ea74 (commit) from 0ea1a975a8c4873be4529c03a6967b9c3e008c9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0a5d8f871bccbc5bcf4460778fd5bdfbf1957e3 commit e0a5d8f871bccbc5bcf4460778fd5bdfbf1957e3 Merge: 0ea1a97 098fc4a Author: Brad King AuthorDate: Tue Dec 23 09:06:26 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 09:06:26 2014 -0500 Merge topic 'minor-warning-fixes' into next 098fc4a8 cmCMakeMinimumRequired: Use unsigned int for version numbers 1a9ba381 cmParseDelphiCoverage: Remove superfluous semicolons after methods http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=098fc4a862d51ad7cca154cdd5f0a2a8ff0763c7 commit 098fc4a862d51ad7cca154cdd5f0a2a8ff0763c7 Author: Christoph Gr?ninger AuthorDate: Tue Dec 23 13:33:35 2014 +0100 Commit: Brad King CommitDate: Tue Dec 23 09:05:25 2014 -0500 cmCMakeMinimumRequired: Use unsigned int for version numbers diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index 58b61de..384e0a7 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -63,17 +63,17 @@ bool cmCMakeMinimumRequired // Get the current version number. - int current_major = cmVersion::GetMajorVersion(); - int current_minor = cmVersion::GetMinorVersion(); - int current_patch = cmVersion::GetPatchVersion(); - int current_tweak = cmVersion::GetTweakVersion(); + unsigned int current_major = cmVersion::GetMajorVersion(); + unsigned int current_minor = cmVersion::GetMinorVersion(); + unsigned int current_patch = cmVersion::GetPatchVersion(); + unsigned int current_tweak = cmVersion::GetTweakVersion(); // Parse at least two components of the version number. // Use zero for those not specified. - int required_major = 0; - int required_minor = 0; - int required_patch = 0; - int required_tweak = 0; + unsigned int required_major = 0; + unsigned int required_minor = 0; + unsigned int required_patch = 0; + unsigned int required_tweak = 0; if(sscanf(version_string.c_str(), "%u.%u.%u.%u", &required_major, &required_minor, &required_patch, &required_tweak) < 2) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a9ba38174578e56a277cc0d0dfa2b3f8340ea74 commit 1a9ba38174578e56a277cc0d0dfa2b3f8340ea74 Author: Christoph Gr?ninger AuthorDate: Tue Dec 23 12:24:58 2014 +0100 Commit: Brad King CommitDate: Tue Dec 23 09:05:11 2014 -0500 cmParseDelphiCoverage: Remove superfluous semicolons after methods diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx index 8e331b1..3afbfac 100644 --- a/Source/CTest/cmParseDelphiCoverage.cxx +++ b/Source/CTest/cmParseDelphiCoverage.cxx @@ -240,7 +240,7 @@ bool cmParseDelphiCoverage::LoadCoverageData( } } return true; - }; + } bool cmParseDelphiCoverage::ReadDelphiHTML(const char* file) { @@ -248,4 +248,4 @@ bool cmParseDelphiCoverage::ReadDelphiHTML(const char* file) parser(this->CTest, this->Coverage); parser.ParseFile(file); return true; - }; + } ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmParseDelphiCoverage.cxx | 4 ++-- Source/cmCMakeMinimumRequired.cxx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 10:21:15 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 10:21:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1388-g659c3ac Message-ID: <20141223152115.16FF6A7129@public.kitware.com> This is an automated email from 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 659c3ac9500c56c2f66302775f2d6a71ba87e943 (commit) via be1109d811a637f03328d97a3cacfb9dad273744 (commit) from e0a5d8f871bccbc5bcf4460778fd5bdfbf1957e3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=659c3ac9500c56c2f66302775f2d6a71ba87e943 commit 659c3ac9500c56c2f66302775f2d6a71ba87e943 Merge: e0a5d8f be1109d Author: Brad King AuthorDate: Tue Dec 23 10:21:14 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 10:21:14 2014 -0500 Merge topic 'sunpro-Fortran-preprocess' into next be1109d8 Oracle/Sun: Fix Fortran preprocessor rule generation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be1109d811a637f03328d97a3cacfb9dad273744 commit be1109d811a637f03328d97a3cacfb9dad273744 Author: Brad King AuthorDate: Tue Dec 23 10:14:12 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 10:15:27 2014 -0500 Oracle/Sun: Fix Fortran preprocessor rule generation The SunPro Fortran compiler uses "-F" instead of "-E" to request preprocessing. The output does not go to stdout so use "-o" to specify the output file. This fixes the guess originally made by commit b6b37e30 (Makefile: Add assembly and preprocessed targets for Fortran, 2014-11-05). diff --git a/Modules/Compiler/SunPro-Fortran.cmake b/Modules/Compiler/SunPro-Fortran.cmake index c38d5a5..e4db1e8 100644 --- a/Modules/Compiler/SunPro-Fortran.cmake +++ b/Modules/Compiler/SunPro-Fortran.cmake @@ -17,5 +17,5 @@ set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG") set(CMAKE_Fortran_MODDIR_FLAG "-moddir=") set(CMAKE_Fortran_MODPATH_FLAG "-M") -set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE " -E > ") +set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE " -F -o ") set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE " -S -o ") ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/SunPro-Fortran.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 23 11:28:06 2014 From: brad.king at kitware.com (Brad King) Date: Tue, 23 Dec 2014 11:28:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1390-g6a680df Message-ID: <20141223162806.E1831A815B@public.kitware.com> This is an automated email from 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 6a680df6aad7710c9aca4b01a16567dd3ca9771e (commit) via d6c2bbcbae15f45aa58f48beaedb8b03714df018 (commit) from 659c3ac9500c56c2f66302775f2d6a71ba87e943 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a680df6aad7710c9aca4b01a16567dd3ca9771e commit 6a680df6aad7710c9aca4b01a16567dd3ca9771e Merge: 659c3ac d6c2bbc Author: Brad King AuthorDate: Tue Dec 23 11:28:06 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 23 11:28:06 2014 -0500 Merge topic 'base64-casts' into next d6c2bbcb cmCTest: Use size_t for cmsysBase64_Encode return value http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6c2bbcbae15f45aa58f48beaedb8b03714df018 commit d6c2bbcbae15f45aa58f48beaedb8b03714df018 Author: Brad King AuthorDate: Tue Dec 23 11:26:55 2014 -0500 Commit: Brad King CommitDate: Tue Dec 23 11:26:55 2014 -0500 cmCTest: Use size_t for cmsysBase64_Encode return value diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 1a7bf45..b894db9 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1688,7 +1688,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) //---------------------------------------------------------------------- std::string cmCTest::Base64EncodeFile(std::string file) { - const size_t len = cmSystemTools::FileLength(file); + size_t const len = cmSystemTools::FileLength(file); cmsys::ifstream ifs(file.c_str(), std::ios::in #ifdef _WIN32 | std::ios::binary @@ -1701,11 +1701,11 @@ std::string cmCTest::Base64EncodeFile(std::string file) unsigned char *encoded_buffer = new unsigned char [ (len * 3) / 2 + 5 ]; - unsigned long rlen + size_t const rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); std::string base64 = ""; - for(unsigned long i = 0; i < rlen; i++) + for(size_t i = 0; i < rlen; i++) { base64 += encoded_buffer[i]; } ----------------------------------------------------------------------- Summary of changes: Source/cmCTest.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 24 00:01:12 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 24 Dec 2014 00:01:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-575-g279a2bc Message-ID: <20141224050112.ADBF1A8304@public.kitware.com> This is an automated email from 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 279a2bcd654b35591e4728e2c2a66cbe1ae2a767 (commit) from 99f682b0fd2d01c57a365442b472ed628bdb7a9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=279a2bcd654b35591e4728e2c2a66cbe1ae2a767 commit 279a2bcd654b35591e4728e2c2a66cbe1ae2a767 Author: Kitware Robot AuthorDate: Wed Dec 24 00:01:10 2014 -0500 Commit: Kitware Robot CommitDate: Wed Dec 24 00:01:10 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4c4c90d..db387d5 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 1) -set(CMake_VERSION_PATCH 20141223) +set(CMake_VERSION_PATCH 20141224) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From eike at sf-mail.de Wed Dec 24 04:54:03 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Wed, 24 Dec 2014 04:54:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1392-g889e889 Message-ID: <20141224095403.B427DA81F2@public.kitware.com> This is an automated email from 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 889e889a0377d047dd4430cd4e5f7f29d81d274e (commit) via 27890380d37224ab9e63c9854d3f828931a0b0a4 (commit) from 6a680df6aad7710c9aca4b01a16567dd3ca9771e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=889e889a0377d047dd4430cd4e5f7f29d81d274e commit 889e889a0377d047dd4430cd4e5f7f29d81d274e Merge: 6a680df 2789038 Author: Rolf Eike Beer AuthorDate: Wed Dec 24 04:54:02 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 24 04:54:02 2014 -0500 Merge topic 'base64-casts' into next 27890380 CTest: more base64 size_t fixes http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27890380d37224ab9e63c9854d3f828931a0b0a4 commit 27890380d37224ab9e63c9854d3f828931a0b0a4 Author: Rolf Eike Beer AuthorDate: Wed Dec 24 10:53:33 2014 +0100 Commit: Rolf Eike Beer CommitDate: Wed Dec 24 10:53:33 2014 +0100 CTest: more base64 size_t fixes Commit will be squashed. diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 9e3c9fc..ff55528 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -116,10 +116,10 @@ void cmCTestRunTest::CompressOutput() unsigned char *encoded_buffer = new unsigned char[static_cast(outSize * 1.5)]; - unsigned long rlen + size_t rlen = cmsysBase64_Encode(out, strm.total_out, encoded_buffer, 1); - for(unsigned long i = 0; i < rlen; i++) + for(size_t i = 0; i < rlen; i++) { this->CompressedOutput += encoded_buffer[i]; } diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f330e58..8518a90 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1976,9 +1976,8 @@ std::string cmCTestTestHandler::GenerateRegressionImages( = new unsigned char [ static_cast( static_cast(len) * 1.5 + 5.0) ]; - unsigned long rlen + size_t rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); - unsigned long cc; ostr << "\t\t\t" << std::endl << "\t\t\t\t"; - for ( cc = 0; cc < rlen; cc ++ ) + for (size_t cc = 0; cc < rlen; cc ++ ) { ostr << encoded_buffer[cc]; if ( cc % 60 == 0 && cc ) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b894db9..4ce5bec 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -3191,7 +3191,7 @@ bool cmCTest::CompressString(std::string& str) // Now base64 encode the resulting binary string unsigned char* base64EncodedBuffer - = new unsigned char[static_cast(outSize * 1.5)]; + = new unsigned char[(outSize * 3) / 2]; unsigned long rlen = cmsysBase64_Encode(out, strm.total_out, base64EncodedBuffer, 1); ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestRunTest.cxx | 4 ++-- Source/CTest/cmCTestTestHandler.cxx | 5 ++--- Source/cmCTest.cxx | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 24 06:38:13 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 24 Dec 2014 06:38:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-577-gc20d3d3 Message-ID: <20141224113818.0EBD9A8585@public.kitware.com> This is an automated email from 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 c20d3d319cb97da5793beebe42a80361b2d247c4 (commit) via 42ed76bc994ccdad56392ae5ed6213fb307651da (commit) from 279a2bcd654b35591e4728e2c2a66cbe1ae2a767 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c20d3d319cb97da5793beebe42a80361b2d247c4 commit c20d3d319cb97da5793beebe42a80361b2d247c4 Merge: 279a2bc 42ed76b Author: Brad King AuthorDate: Wed Dec 24 06:38:08 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 24 06:38:08 2014 -0500 Merge topic 'cpack-PackageMaker-package-size' 42ed76bc cpack: Fix installed size computation with PackageMaker generator ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackPackageMakerGenerator.cxx | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 24 06:38:27 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 24 Dec 2014 06:38:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-580-g661622f Message-ID: <20141224113829.00280A858B@public.kitware.com> This is an automated email from 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 661622f011810093433afa5c9a4795b3d2f19070 (commit) via 07fc7b75ef981300e7d873091ee90083b18d1c4a (commit) via fdbfcfdf0173c34845e495f4c0bd407faafc45b4 (commit) from c20d3d319cb97da5793beebe42a80361b2d247c4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=661622f011810093433afa5c9a4795b3d2f19070 commit 661622f011810093433afa5c9a4795b3d2f19070 Merge: c20d3d3 07fc7b7 Author: Brad King AuthorDate: Wed Dec 24 06:38:24 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 24 06:38:24 2014 -0500 Merge topic 'ninja-fix-subdir-objlib-languages' 07fc7b75 Tests: Test using objects from a language enabled in a subdirectory (#15325) fdbfcfdf Ninja: Generate rules only for languages compiled in a target (#15325) ----------------------------------------------------------------------- Summary of changes: Source/cmNinjaNormalTargetGenerator.cxx | 17 +++++++++++++++-- Tests/CMakeLists.txt | 1 + Tests/CxxSubdirC/CMakeLists.txt | 4 ++++ Tests/CxxSubdirC/Cdir/CMakeLists.txt | 2 ++ Tests/CxxSubdirC/Cdir/Cobj.c | 1 + Tests/CxxSubdirC/main.cxx | 2 ++ 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Tests/CxxSubdirC/CMakeLists.txt create mode 100644 Tests/CxxSubdirC/Cdir/CMakeLists.txt create mode 100644 Tests/CxxSubdirC/Cdir/Cobj.c create mode 100644 Tests/CxxSubdirC/main.cxx hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 24 06:38:34 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 24 Dec 2014 06:38:34 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-583-g2a9f3dc Message-ID: <20141224113838.7C6B0A8590@public.kitware.com> This is an automated email from 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 2a9f3dc6c7aed366d8dda71038bdc2b62e4fa78a (commit) via 098fc4a862d51ad7cca154cdd5f0a2a8ff0763c7 (commit) via 1a9ba38174578e56a277cc0d0dfa2b3f8340ea74 (commit) from 661622f011810093433afa5c9a4795b3d2f19070 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a9f3dc6c7aed366d8dda71038bdc2b62e4fa78a commit 2a9f3dc6c7aed366d8dda71038bdc2b62e4fa78a Merge: 661622f 098fc4a Author: Brad King AuthorDate: Wed Dec 24 06:38:33 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 24 06:38:33 2014 -0500 Merge topic 'minor-warning-fixes' 098fc4a8 cmCMakeMinimumRequired: Use unsigned int for version numbers 1a9ba381 cmParseDelphiCoverage: Remove superfluous semicolons after methods ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmParseDelphiCoverage.cxx | 4 ++-- Source/cmCMakeMinimumRequired.cxx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 24 06:38:40 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 24 Dec 2014 06:38:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-585-g52ee194 Message-ID: <20141224113844.C1E38A858E@public.kitware.com> This is an automated email from 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 52ee1946b9f25e8cc7befec9276b2d5379ebf92d (commit) via be1109d811a637f03328d97a3cacfb9dad273744 (commit) from 2a9f3dc6c7aed366d8dda71038bdc2b62e4fa78a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52ee1946b9f25e8cc7befec9276b2d5379ebf92d commit 52ee1946b9f25e8cc7befec9276b2d5379ebf92d Merge: 2a9f3dc be1109d Author: Brad King AuthorDate: Wed Dec 24 06:38:39 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 24 06:38:39 2014 -0500 Merge topic 'sunpro-Fortran-preprocess' be1109d8 Oracle/Sun: Fix Fortran preprocessor rule generation ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/SunPro-Fortran.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 24 06:39:25 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 24 Dec 2014 06:39:25 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1398-gd4c7b08 Message-ID: <20141224113931.F01FDF8E@public.kitware.com> This is an automated email from 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 d4c7b08bf72e733f63b10fa989466e3065cbaca6 (commit) via 52ee1946b9f25e8cc7befec9276b2d5379ebf92d (commit) via 2a9f3dc6c7aed366d8dda71038bdc2b62e4fa78a (commit) via 661622f011810093433afa5c9a4795b3d2f19070 (commit) via c20d3d319cb97da5793beebe42a80361b2d247c4 (commit) via 279a2bcd654b35591e4728e2c2a66cbe1ae2a767 (commit) from 889e889a0377d047dd4430cd4e5f7f29d81d274e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4c7b08bf72e733f63b10fa989466e3065cbaca6 commit d4c7b08bf72e733f63b10fa989466e3065cbaca6 Merge: 889e889 52ee194 Author: Brad King AuthorDate: Wed Dec 24 06:39:10 2014 -0500 Commit: Brad King CommitDate: Wed Dec 24 06:39:10 2014 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 25 00:01:12 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 25 Dec 2014 00:01:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-586-g05105d5 Message-ID: <20141225050112.B1CB5A85DD@public.kitware.com> This is an automated email from 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 05105d5c13f6662907cfb63fb6723f9f34f4558d (commit) from 52ee1946b9f25e8cc7befec9276b2d5379ebf92d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05105d5c13f6662907cfb63fb6723f9f34f4558d commit 05105d5c13f6662907cfb63fb6723f9f34f4558d Author: Kitware Robot AuthorDate: Thu Dec 25 00:01:09 2014 -0500 Commit: Kitware Robot CommitDate: Thu Dec 25 00:01:09 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index db387d5..71a3cc7 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 1) -set(CMake_VERSION_PATCH 20141224) +set(CMake_VERSION_PATCH 20141225) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From eike at sf-mail.de Thu Dec 25 04:49:44 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Thu, 25 Dec 2014 04:49:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1400-g34cda25 Message-ID: <20141225094944.E8505A5C4C@public.kitware.com> This is an automated email from 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 34cda259eb4546e5b863367fd2a7f8b1779bc438 (commit) via c19c17761099321b530a906a203e7158989e1c38 (commit) from d4c7b08bf72e733f63b10fa989466e3065cbaca6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34cda259eb4546e5b863367fd2a7f8b1779bc438 commit 34cda259eb4546e5b863367fd2a7f8b1779bc438 Merge: d4c7b08 c19c177 Author: Rolf Eike Beer AuthorDate: Thu Dec 25 04:49:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 25 04:49:43 2014 -0500 Merge topic 'base64-casts' into next c19c1776 CTest: yet another size_t change http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c19c17761099321b530a906a203e7158989e1c38 commit c19c17761099321b530a906a203e7158989e1c38 Author: Rolf Eike Beer AuthorDate: Thu Dec 25 10:49:24 2014 +0100 Commit: Rolf Eike Beer CommitDate: Thu Dec 25 10:49:24 2014 +0100 CTest: yet another size_t change diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 4ce5bec..1362a50 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -3193,7 +3193,7 @@ bool cmCTest::CompressString(std::string& str) unsigned char* base64EncodedBuffer = new unsigned char[(outSize * 3) / 2]; - unsigned long rlen + size_t rlen = cmsysBase64_Encode(out, strm.total_out, base64EncodedBuffer, 1); str = ""; ----------------------------------------------------------------------- Summary of changes: Source/cmCTest.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 26 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 26 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-587-g2b28e07 Message-ID: <20141226050110.8EEA5A8380@public.kitware.com> This is an automated email from 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 2b28e07c02d9f13867d0f518b8341e77f006faa4 (commit) from 05105d5c13f6662907cfb63fb6723f9f34f4558d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b28e07c02d9f13867d0f518b8341e77f006faa4 commit 2b28e07c02d9f13867d0f518b8341e77f006faa4 Author: Kitware Robot AuthorDate: Fri Dec 26 00:01:07 2014 -0500 Commit: Kitware Robot CommitDate: Fri Dec 26 00:01:07 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 71a3cc7..b69c4c9 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 1) -set(CMake_VERSION_PATCH 20141225) +set(CMake_VERSION_PATCH 20141226) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From eike at sf-mail.de Fri Dec 26 10:24:39 2014 From: eike at sf-mail.de (Rolf Eike Beer) Date: Fri, 26 Dec 2014 10:24:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1403-gd4e0699 Message-ID: <20141226152439.26316A6A9C@public.kitware.com> This is an automated email from 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 d4e069935251bb182498ed2b6ca7a8037897a989 (commit) via 0bdd4ebfb8303cc46e4a8bbe16f6c7bcc7108e2a (commit) via a9fae8ac1d952ffd3b54de6082f9729466101bb0 (commit) from 34cda259eb4546e5b863367fd2a7f8b1779bc438 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4e069935251bb182498ed2b6ca7a8037897a989 commit d4e069935251bb182498ed2b6ca7a8037897a989 Merge: 34cda25 0bdd4eb Author: Rolf Eike Beer AuthorDate: Fri Dec 26 10:24:38 2014 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 26 10:24:38 2014 -0500 Merge topic 'base64-casts' into next 0bdd4ebf cmCTest: Use size_t for cmsysBase64_Encode return value a9fae8ac CTest: Fix integer overflow when uploading huge files http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0bdd4ebfb8303cc46e4a8bbe16f6c7bcc7108e2a commit 0bdd4ebfb8303cc46e4a8bbe16f6c7bcc7108e2a Author: Brad King AuthorDate: Tue Dec 23 11:26:55 2014 -0500 Commit: Rolf Eike Beer CommitDate: Fri Dec 26 16:23:35 2014 +0100 cmCTest: Use size_t for cmsysBase64_Encode return value diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 9e3c9fc..ff55528 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -116,10 +116,10 @@ void cmCTestRunTest::CompressOutput() unsigned char *encoded_buffer = new unsigned char[static_cast(outSize * 1.5)]; - unsigned long rlen + size_t rlen = cmsysBase64_Encode(out, strm.total_out, encoded_buffer, 1); - for(unsigned long i = 0; i < rlen; i++) + for(size_t i = 0; i < rlen; i++) { this->CompressedOutput += encoded_buffer[i]; } diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f330e58..8518a90 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1976,9 +1976,8 @@ std::string cmCTestTestHandler::GenerateRegressionImages( = new unsigned char [ static_cast( static_cast(len) * 1.5 + 5.0) ]; - unsigned long rlen + size_t rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); - unsigned long cc; ostr << "\t\t\t" << std::endl << "\t\t\t\t"; - for ( cc = 0; cc < rlen; cc ++ ) + for (size_t cc = 0; cc < rlen; cc ++ ) { ostr << encoded_buffer[cc]; if ( cc % 60 == 0 && cc ) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 814c4e0..1362a50 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1701,11 +1701,11 @@ std::string cmCTest::Base64EncodeFile(std::string file) unsigned char *encoded_buffer = new unsigned char [ (len * 3) / 2 + 5 ]; - unsigned long rlen + size_t const rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); std::string base64 = ""; - for(unsigned long i = 0; i < rlen; i++) + for(size_t i = 0; i < rlen; i++) { base64 += encoded_buffer[i]; } @@ -3193,7 +3193,7 @@ bool cmCTest::CompressString(std::string& str) unsigned char* base64EncodedBuffer = new unsigned char[(outSize * 3) / 2]; - unsigned long rlen + size_t rlen = cmsysBase64_Encode(out, strm.total_out, base64EncodedBuffer, 1); str = ""; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9fae8ac1d952ffd3b54de6082f9729466101bb0 commit a9fae8ac1d952ffd3b54de6082f9729466101bb0 Author: Rolf Eike Beer AuthorDate: Mon Dec 22 21:56:14 2014 +0100 Commit: Rolf Eike Beer CommitDate: Fri Dec 26 16:23:31 2014 +0100 CTest: Fix integer overflow when uploading huge files When uploading files greater 2GB a cast to 'int' overflows, leading to a bad alloc when passed to new. Also avoid floating point arithmetic when integer calculations will work as well. Reported-by: Justin Borodinsky diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2bf7b77..814c4e0 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1688,7 +1688,7 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file) //---------------------------------------------------------------------- std::string cmCTest::Base64EncodeFile(std::string file) { - long len = cmSystemTools::FileLength(file); + size_t const len = cmSystemTools::FileLength(file); cmsys::ifstream ifs(file.c_str(), std::ios::in #ifdef _WIN32 | std::ios::binary @@ -1699,8 +1699,7 @@ std::string cmCTest::Base64EncodeFile(std::string file) ifs.close(); unsigned char *encoded_buffer - = new unsigned char [ static_cast( - static_cast(len) * 1.5 + 5.0) ]; + = new unsigned char [ (len * 3) / 2 + 5 ]; unsigned long rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); @@ -3192,7 +3191,7 @@ bool cmCTest::CompressString(std::string& str) // Now base64 encode the resulting binary string unsigned char* base64EncodedBuffer - = new unsigned char[static_cast(outSize * 1.5)]; + = new unsigned char[(outSize * 3) / 2]; unsigned long rlen = cmsysBase64_Encode(out, strm.total_out, base64EncodedBuffer, 1); ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 27 00:01:11 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 27 Dec 2014 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-588-g028cdfb Message-ID: <20141227050111.C657BA83AD@public.kitware.com> This is an automated email from 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 028cdfb3deaddef510537bbeb1a4202924c1a80b (commit) from 2b28e07c02d9f13867d0f518b8341e77f006faa4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=028cdfb3deaddef510537bbeb1a4202924c1a80b commit 028cdfb3deaddef510537bbeb1a4202924c1a80b Author: Kitware Robot AuthorDate: Sat Dec 27 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Sat Dec 27 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b69c4c9..607aeaf 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 1) -set(CMake_VERSION_PATCH 20141226) +set(CMake_VERSION_PATCH 20141227) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 28 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 28 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-589-g8e61140 Message-ID: <20141228050110.6D168A81F2@public.kitware.com> This is an automated email from 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 8e6114017873e50817c6961ffcedb3c52a2ed1f1 (commit) from 028cdfb3deaddef510537bbeb1a4202924c1a80b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e6114017873e50817c6961ffcedb3c52a2ed1f1 commit 8e6114017873e50817c6961ffcedb3c52a2ed1f1 Author: Kitware Robot AuthorDate: Sun Dec 28 00:01:07 2014 -0500 Commit: Kitware Robot CommitDate: Sun Dec 28 00:01:07 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 607aeaf..5655a1e 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 1) -set(CMake_VERSION_PATCH 20141227) +set(CMake_VERSION_PATCH 20141228) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 29 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 29 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-590-gca3d08e Message-ID: <20141229050110.9341AA8392@public.kitware.com> This is an automated email from 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 ca3d08e6b598a7f7d46b3125a0d7ddddf8be8dcd (commit) from 8e6114017873e50817c6961ffcedb3c52a2ed1f1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca3d08e6b598a7f7d46b3125a0d7ddddf8be8dcd commit ca3d08e6b598a7f7d46b3125a0d7ddddf8be8dcd Author: Kitware Robot AuthorDate: Mon Dec 29 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Mon Dec 29 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5655a1e..bacbbe2 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 1) -set(CMake_VERSION_PATCH 20141228) +set(CMake_VERSION_PATCH 20141229) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Mon Dec 29 16:03:50 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Mon, 29 Dec 2014 16:03:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1408-g55efb6d Message-ID: <20141229210350.E4484A8275@public.kitware.com> This is an automated email from 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 55efb6d191007eef921df832bae9ff014f85cd57 (commit) via ca4c03f7fef0d4035013e20e34ceb0b0f0839548 (commit) via c956cd9acf6f30047b4f5e82f19b6d3984e31ba9 (commit) via 7dcaab52d45fb58610803377c98b60b6fbbb7bc7 (commit) via d2fca349aee767267411fa3d8316675b93e150ea (commit) from d4e069935251bb182498ed2b6ca7a8037897a989 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55efb6d191007eef921df832bae9ff014f85cd57 commit 55efb6d191007eef921df832bae9ff014f85cd57 Merge: d4e0699 ca4c03f Author: Robert Maynard AuthorDate: Mon Dec 29 16:03:49 2014 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 29 16:03:49 2014 -0500 Merge topic 'feature_record_msvc' into next ca4c03f7 Features: Quote all the compile names. c956cd9a Features: Enable MSVC compiler detection header writing. 7dcaab52 Features: Record for MSVC 2015. d2fca349 Features: Record for MSVC 2010-2013. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca4c03f7fef0d4035013e20e34ceb0b0f0839548 commit ca4c03f7fef0d4035013e20e34ceb0b0f0839548 Author: Robert Maynard AuthorDate: Mon Dec 29 15:37:11 2014 -0500 Commit: Robert Maynard CommitDate: Mon Dec 29 15:37:11 2014 -0500 Features: Quote all the compile names. We need to quote the MSVC compiler name, as it is also a global variable in CMake. So to keep a consistent style we should quote all the compiler names. diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index c1cbd8e..cbfe3f3 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -56,9 +56,9 @@ macro(set_defines target true_defs false_defs) ) endmacro() -if (CMAKE_CXX_COMPILER_ID STREQUAL GNU - OR CMAKE_CXX_COMPILER_ID STREQUAL Clang - OR CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # False for C++98 mode. list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) @@ -76,9 +76,9 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) endif() -if (CMAKE_C_COMPILER_ID STREQUAL GNU - OR CMAKE_C_COMPILER_ID STREQUAL Clang - OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" + OR CMAKE_C_COMPILER_ID STREQUAL "Clang" + OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang") add_executable(C_undefined c_undefined.c) set_property(TARGET C_undefined PROPERTY CXX_STANDARD 90) target_compile_options(C_undefined PRIVATE -Werror=undef) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c956cd9acf6f30047b4f5e82f19b6d3984e31ba9 commit c956cd9acf6f30047b4f5e82f19b6d3984e31ba9 Author: Robert Maynard AuthorDate: Mon Dec 22 13:45:18 2014 -0500 Commit: Robert Maynard CommitDate: Mon Dec 29 15:35:54 2014 -0500 Features: Enable MSVC compiler detection header writing. diff --git a/Modules/Compiler/MSVC-C-FeatureTests.cmake b/Modules/Compiler/MSVC-C-FeatureTests.cmake new file mode 100644 index 0000000..64016bc --- /dev/null +++ b/Modules/Compiler/MSVC-C-FeatureTests.cmake @@ -0,0 +1,24 @@ + +# Reference: http://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx +# http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx +# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx +# http://www.visualstudio.com/en-us/news/vs2015-preview-vs.aspx + +set(_cmake_oldestSupported "_MSC_VER >= 1300") + +#currently disabling everything while we test +set(MSVC_2010 "_MSC_VER >= 1600") +set(_cmake_feature_test_c_static_assert "${MSVC_2010}") +set(_cmake_feature_test_c_variadic_macros "${MSVC_2010}") + +set(MSVC_2003 "_MSC_VER >= 1300") +set(_cmake_feature_test_c_function_prototypes "${MSVC_2003}") + +# Currently unsupported: +#restrict requires the __restrict syntax in msvc +#set(_cmake_feature_test_c_restrict) + +#Unset all the variables that we don't need exposed. +#_cmake_oldestSupported is required by WriteCompilerDetectionHeader +set(MSVC_2010) +set(MSVC_2003) \ No newline at end of file diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index 36b9706..bcaaafa 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -36,7 +36,7 @@ # PREFIX ClimbingStats # OUTPUT_FILES_VAR support_files # OUTPUT_DIR compilers -# COMPILERS GNU Clang +# COMPILERS GNU Clang MSVC # FEATURES cxx_variadic_templates # ) # install(FILES @@ -100,7 +100,7 @@ # write_compiler_detection_header( # FILE climbingstats_compiler_detection.h # PREFIX ClimbingStats -# COMPILERS GNU Clang AppleClang +# COMPILERS GNU Clang AppleClang MSVC # FEATURES cxx_variadic_templates # ) # @@ -316,6 +316,7 @@ function(write_compiler_detection_header GNU Clang AppleClang + MSVC ) set(_hex_compilers ADSP Borland Embarcadero SunPro) diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index 5b2f1de..c1cbd8e 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0) +cmake_minimum_required(VERSION 3.1.0) project(WriteCompilerDetectionHeader) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -11,7 +11,7 @@ get_property(c_known_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) write_compiler_detection_header( FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h" PREFIX TEST - COMPILERS GNU Clang AppleClang + COMPILERS GNU Clang AppleClang MSVC VERSION 3.1 PROLOG "// something" EPILOG "// more" @@ -64,6 +64,18 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) endif() +#for msvc the version determines if we support delegating constructors +#and variadic templates. Luckily support for both of these features was +#added in the same msvc version (1800) +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND + ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_delegating_constructors;") + list(APPEND true_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) + list(APPEND true_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) +else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) + list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) +endif() + if (CMAKE_C_COMPILER_ID STREQUAL GNU OR CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) @@ -81,7 +93,7 @@ write_compiler_detection_header( PREFIX MULTI OUTPUT_FILES_VAR multi_files OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support" - COMPILERS GNU Clang AppleClang + COMPILERS GNU Clang AppleClang MSVC VERSION 3.1 FEATURES ${cxx_known_features} ${c_known_features} http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dcaab52d45fb58610803377c98b60b6fbbb7bc7 commit 7dcaab52d45fb58610803377c98b60b6fbbb7bc7 Author: Robert Maynard AuthorDate: Mon Dec 22 10:25:18 2014 -0500 Commit: Robert Maynard CommitDate: Mon Dec 22 14:37:49 2014 -0500 Features: Record for MSVC 2015. diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake index 18dea24..980f53c 100644 --- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake +++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake @@ -1,8 +1,31 @@ # Reference: http://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx # http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx +# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx +# http://www.visualstudio.com/en-us/news/vs2015-preview-vs.aspx -set(_oldestSupported "_MSC_VER >= 1600") + +set(_cmake_oldestSupported "_MSC_VER >= 1600") + +set(MSVC_2015 "_MSC_VER >= 1900") +set(_cmake_feature_test_cxx_alignas "${MSVC_2015}") +set(_cmake_feature_test_cxx_alignof "${MSVC_2015}") +set(_cmake_feature_test_cxx_binary_literals "${MSVC_2015}") +set(_cmake_feature_test_cxx_decltype_auto "${MSVC_2015}") +set(_cmake_feature_test_cxx_digit_separators "${MSVC_2015}") +set(_cmake_feature_test_cxx_func_identifier "${MSVC_2015}") +set(_cmake_feature_test_cxx_generic_lambdas "${MSVC_2015}") +set(_cmake_feature_test_cxx_inheriting_constructors "${MSVC_2015}") +set(_cmake_feature_test_cxx_inline_namespaces "${MSVC_2015}") +set(_cmake_feature_test_cxx_lambda_init_captures "${MSVC_2015}") +set(_cmake_feature_test_cxx_noexcept "${MSVC_2015}") +set(_cmake_feature_test_cxx_return_type_deduction "${MSVC_2015}") +set(_cmake_feature_test_cxx_sizeof_member "${MSVC_2015}") +set(_cmake_feature_test_cxx_thread_local "${MSVC_2015}") +set(_cmake_feature_test_cxx_trailing_return_types "${MSVC_2015}") +set(_cmake_feature_test_cxx_unicode_literals "${MSVC_2015}") +set(_cmake_feature_test_cxx_unrestricted_unions "${MSVC_2015}") +set(_cmake_feature_test_cxx_user_literals "${MSVC_2015}") set(MSVC_2013 "_MSC_VER >= 1800") set(_cmake_feature_test_cxx_alias_templates "${MSVC_2013}") @@ -19,6 +42,10 @@ set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}") # Possibly broken: # http://thread.gmane.org/gmane.comp.lib.boost.devel/244986/focus=245333 set(_cmake_feature_test_cxx_variadic_templates "${MSVC_2013}") +# Microsoft now states they support contextual conversions +# see footnote 6 at: +# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx +set(_cmake_feature_test_cxx_contextual_conversions "${MSVC_2013}") set(MSVC_2012 "_MSC_VER >= 1700") set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${MSVC_2012}") @@ -46,20 +73,21 @@ set(_cmake_feature_test_cxx_variadic_macros "${MSVC_2010}") # Currently unsupported: # http://herbsutter.com/2013/11/18/visual-c-compiler-november-2013-ctp/ -# set(_cmake_feature_test_cxx_reference_qualified_functions ) -# set(_cmake_feature_test_cxx_inheriting_constructors ) -# set(_cmake_feature_test_cxx_alignas ) -# set(_cmake_feature_test_cxx_alignof ) -# set(_cmake_feature_test_cxx_thread_local ) -# set(_cmake_feature_test_cxx_func_identifier ) -# set(_cmake_feature_test_cxx_sizeof_member ) +# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx -# set(_cmake_feature_test_cxx_user_literals ) -# set(_cmake_feature_test_cxx_unrestricted_unions ) -# set(_cmake_feature_test_cxx_unicode_literals ) -# set(_cmake_feature_test_cxx_inline_namespaces ) +# set(_cmake_feature_test_cxx_reference_qualified_functions ) # set(_cmake_feature_test_cxx_constexpr ) -# set(_cmake_feature_test_cxx_noexcept ) # set(_cmake_feature_test_cxx_attributes ) +# set(_cmake_feature_test_cxx_aggregate_default_initializers ) +# set(_cmake_feature_test_cxx_attribute_deprecated ) +# set(_cmake_feature_test_cxx_defaulted_move_initializers ) +# set(_cmake_feature_test_cxx_nonstatic_member_init ) +# set(_cmake_feature_test_cxx_relaxed_constexpr ) +# set(_cmake_feature_test_cxx_variable_templates ) -set(_oldestSupported) +#Unset all the variables that we don't need exposed. +#_cmake_oldestSupported is required by WriteCompilerDetectionHeader +set(MSVC_2015) +set(MSVC_2013) +set(MSVC_2012) +set(MSVC_2010) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2fca349aee767267411fa3d8316675b93e150ea commit d2fca349aee767267411fa3d8316675b93e150ea Author: Stephen Kelly AuthorDate: Sun Apr 6 15:55:37 2014 +0200 Commit: Robert Maynard CommitDate: Mon Dec 22 14:37:49 2014 -0500 Features: Record for MSVC 2010-2013. diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake new file mode 100644 index 0000000..18dea24 --- /dev/null +++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake @@ -0,0 +1,65 @@ + +# Reference: http://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx +# http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx + +set(_oldestSupported "_MSC_VER >= 1600") + +set(MSVC_2013 "_MSC_VER >= 1800") +set(_cmake_feature_test_cxx_alias_templates "${MSVC_2013}") +set(_cmake_feature_test_cxx_default_function_template_args "${MSVC_2013}") +set(_cmake_feature_test_cxx_defaulted_functions "${MSVC_2013}") +set(_cmake_feature_test_cxx_delegating_constructors "${MSVC_2013}") +set(_cmake_feature_test_cxx_deleted_functions "${MSVC_2013}") +set(_cmake_feature_test_cxx_explicit_conversions "${MSVC_2013}") +# http://thread.gmane.org/gmane.comp.lib.boost.devel/245202/focus=245221 +set(_cmake_feature_test_cxx_generalized_initializers "${MSVC_2013}") +set(_cmake_feature_test_cxx_nonstatic_member_init "${MSVC_2013}") +set(_cmake_feature_test_cxx_raw_string_literals "${MSVC_2013}") +set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}") +# Possibly broken: +# http://thread.gmane.org/gmane.comp.lib.boost.devel/244986/focus=245333 +set(_cmake_feature_test_cxx_variadic_templates "${MSVC_2013}") + +set(MSVC_2012 "_MSC_VER >= 1700") +set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${MSVC_2012}") +set(_cmake_feature_test_cxx_enum_forward_declarations "${MSVC_2012}") +set(_cmake_feature_test_cxx_final "${MSVC_2012}") +set(_cmake_feature_test_cxx_range_for "${MSVC_2012}") +set(_cmake_feature_test_cxx_strong_enums "${MSVC_2012}") + +set(MSVC_2010 "_MSC_VER >= 1600") +set(_cmake_feature_test_cxx_auto_function "${MSVC_2010}") +set(_cmake_feature_test_cxx_auto_type "${MSVC_2010}") +set(_cmake_feature_test_cxx_decltype "${MSVC_2010}") +set(_cmake_feature_test_cxx_extended_friend_declarations "${MSVC_2010}") +set(_cmake_feature_test_cxx_extern_templates "${MSVC_2010}") +set(_cmake_feature_test_cxx_lambdas "${MSVC_2010}") +set(_cmake_feature_test_cxx_local_type_template_args "${MSVC_2010}") +set(_cmake_feature_test_cxx_long_long_type "${MSVC_2010}") +set(_cmake_feature_test_cxx_nullptr "${MSVC_2010}") +set(_cmake_feature_test_cxx_override "${MSVC_2010}") +set(_cmake_feature_test_cxx_right_angle_brackets "${MSVC_2010}") +set(_cmake_feature_test_cxx_rvalue_references "${MSVC_2010}") +set(_cmake_feature_test_cxx_static_assert "${MSVC_2010}") +set(_cmake_feature_test_cxx_template_template_parameters "${MSVC_2010}") +set(_cmake_feature_test_cxx_variadic_macros "${MSVC_2010}") + +# Currently unsupported: +# http://herbsutter.com/2013/11/18/visual-c-compiler-november-2013-ctp/ +# set(_cmake_feature_test_cxx_reference_qualified_functions ) +# set(_cmake_feature_test_cxx_inheriting_constructors ) +# set(_cmake_feature_test_cxx_alignas ) +# set(_cmake_feature_test_cxx_alignof ) +# set(_cmake_feature_test_cxx_thread_local ) +# set(_cmake_feature_test_cxx_func_identifier ) +# set(_cmake_feature_test_cxx_sizeof_member ) + +# set(_cmake_feature_test_cxx_user_literals ) +# set(_cmake_feature_test_cxx_unrestricted_unions ) +# set(_cmake_feature_test_cxx_unicode_literals ) +# set(_cmake_feature_test_cxx_inline_namespaces ) +# set(_cmake_feature_test_cxx_constexpr ) +# set(_cmake_feature_test_cxx_noexcept ) +# set(_cmake_feature_test_cxx_attributes ) + +set(_oldestSupported) diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake index 0e85005..89885b8 100644 --- a/Modules/Platform/Windows-MSVC-CXX.cmake +++ b/Modules/Platform/Windows-MSVC-CXX.cmake @@ -4,3 +4,7 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0) set(_FS_CXX " /FS") endif() __windows_compiler_msvc(CXX) + +macro(cmake_record_cxx_compile_features) + record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES) +endmacro() ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/MSVC-C-FeatureTests.cmake | 24 +++++ Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 93 ++++++++++++++++++++ Modules/Platform/Windows-MSVC-CXX.cmake | 4 + Modules/WriteCompilerDetectionHeader.cmake | 5 +- .../WriteCompilerDetectionHeader/CMakeLists.txt | 30 +++++-- 5 files changed, 145 insertions(+), 11 deletions(-) create mode 100644 Modules/Compiler/MSVC-C-FeatureTests.cmake create mode 100644 Modules/Compiler/MSVC-CXX-FeatureTests.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 30 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 30 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-591-g3b62cb7 Message-ID: <20141230050110.60382A7DA1@public.kitware.com> This is an automated email from 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 3b62cb7244716e0bd486d7023bec15d922572ad1 (commit) from ca3d08e6b598a7f7d46b3125a0d7ddddf8be8dcd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b62cb7244716e0bd486d7023bec15d922572ad1 commit 3b62cb7244716e0bd486d7023bec15d922572ad1 Author: Kitware Robot AuthorDate: Tue Dec 30 00:01:07 2014 -0500 Commit: Kitware Robot CommitDate: Tue Dec 30 00:01:07 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index bacbbe2..87108f5 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 1) -set(CMake_VERSION_PATCH 20141229) +set(CMake_VERSION_PATCH 20141230) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Tue Dec 30 12:23:18 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 30 Dec 2014 12:23:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1413-gcad7445 Message-ID: <20141230172318.D6A8CA8268@public.kitware.com> This is an automated email from 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 cad7445c492ece031d0521f4dc04ea05bf4770a7 (commit) via 61348b0dcb21da79f2a397899f13b1869e842803 (commit) via b27b068b6bf968e06e50184b8bae689d52b59f91 (commit) via a07ece6a437b889d64818333b6ec99da5a1f078c (commit) via d8f626b35ce1c51de3eca7fbd846e12e121788b4 (commit) from 55efb6d191007eef921df832bae9ff014f85cd57 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cad7445c492ece031d0521f4dc04ea05bf4770a7 commit cad7445c492ece031d0521f4dc04ea05bf4770a7 Merge: 55efb6d 61348b0 Author: Robert Maynard AuthorDate: Tue Dec 30 12:23:17 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 30 12:23:17 2014 -0500 Merge topic 'feature_record_msvc' into next 61348b0d Features: Don't test cxx_contextual_conversions with MSVC. b27b068b Features: MSVC trailing_return_types support was added in 2010. a07ece6a Try and get compile features test to work with MSVC2010 - 2013 d8f626b3 Features: cxx_trailing_return_types was supported in MSVC 2013. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61348b0dcb21da79f2a397899f13b1869e842803 commit 61348b0dcb21da79f2a397899f13b1869e842803 Author: Robert Maynard AuthorDate: Tue Dec 30 12:21:33 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 12:21:33 2014 -0500 Features: Don't test cxx_contextual_conversions with MSVC. VS2013 and above to conform to the updated cxx_contextual_conversions proposal, but VS2010 and above pass the test. I am hesitant to say that VS2010 and above meet all the requirements of the proposal currently. diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 0ff8ea4..52524f9 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -50,6 +50,13 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU cxx_return_type_deduction ) endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + list(REMOVE_ITEM CXX_non_features + #Micrsoft only officially supports this feature in VS2013 and above, due + #to new wording of the proposal. We don't test for this with MSVC because + #older compiler pass the test but might not actually conform + cxx_contextual_conversions + ) set(C_ext c) set(C_standard_flag 11) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b27b068b6bf968e06e50184b8bae689d52b59f91 commit b27b068b6bf968e06e50184b8bae689d52b59f91 Author: Robert Maynard AuthorDate: Tue Dec 30 12:21:07 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 12:21:07 2014 -0500 Features: MSVC trailing_return_types support was added in 2010. diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake index 2a557b1..50e0cbe 100644 --- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake +++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake @@ -37,7 +37,6 @@ set(_cmake_feature_test_cxx_explicit_conversions "${MSVC_2013}") set(_cmake_feature_test_cxx_generalized_initializers "${MSVC_2013}") set(_cmake_feature_test_cxx_nonstatic_member_init "${MSVC_2013}") set(_cmake_feature_test_cxx_raw_string_literals "${MSVC_2013}") -set(_cmake_feature_test_cxx_trailing_return_types "${MSVC_2013}") set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}") # Possibly broken: # http://thread.gmane.org/gmane.comp.lib.boost.devel/244986/focus=245333 @@ -69,6 +68,7 @@ set(_cmake_feature_test_cxx_right_angle_brackets "${MSVC_2010}") set(_cmake_feature_test_cxx_rvalue_references "${MSVC_2010}") set(_cmake_feature_test_cxx_static_assert "${MSVC_2010}") set(_cmake_feature_test_cxx_template_template_parameters "${MSVC_2010}") +set(_cmake_feature_test_cxx_trailing_return_types "${MSVC_2010}") set(_cmake_feature_test_cxx_variadic_macros "${MSVC_2010}") # Currently unsupported: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a07ece6a437b889d64818333b6ec99da5a1f078c commit a07ece6a437b889d64818333b6ec99da5a1f078c Author: Robert Maynard AuthorDate: Tue Dec 30 11:56:59 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 11:56:59 2014 -0500 Try and get compile features test to work with MSVC2010 - 2013 diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index ff5d745..0ff8ea4 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -122,15 +122,15 @@ if (CMAKE_CXX_COMPILE_FEATURES) add_executable(CompileFeaturesGenex genex_test.cpp) set_property(TARGET CompileFeaturesGenex PROPERTY CXX_STANDARD 11) - target_compile_definitions(CompileFeaturesGenex PRIVATE HAVE_OVERRIDE_CONTROL=$) + target_compile_definitions(CompileFeaturesGenex PRIVATE HAVE_OVERRIDE_CONTROL=$) add_executable(CompileFeaturesGenex2 genex_test.cpp) - target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_constexpr) - target_compile_definitions(CompileFeaturesGenex2 PRIVATE HAVE_OVERRIDE_CONTROL=$) + target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_static_assert) + target_compile_definitions(CompileFeaturesGenex2 PRIVATE HAVE_OVERRIDE_CONTROL=$) add_library(noexcept_iface INTERFACE) target_compile_features(noexcept_iface INTERFACE cxx_noexcept) add_executable(CompileFeaturesGenex3 genex_test.cpp) target_link_libraries(CompileFeaturesGenex3 PRIVATE noexcept_iface) - target_compile_definitions(CompileFeaturesGenex3 PRIVATE HAVE_OVERRIDE_CONTROL=$) + target_compile_definitions(CompileFeaturesGenex3 PRIVATE HAVE_OVERRIDE_CONTROL=$) endif() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8f626b35ce1c51de3eca7fbd846e12e121788b4 commit d8f626b35ce1c51de3eca7fbd846e12e121788b4 Author: Robert Maynard AuthorDate: Tue Dec 30 09:36:39 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 09:36:39 2014 -0500 Features: cxx_trailing_return_types was supported in MSVC 2013. diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake index 980f53c..2a557b1 100644 --- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake +++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake @@ -22,7 +22,6 @@ set(_cmake_feature_test_cxx_noexcept "${MSVC_2015}") set(_cmake_feature_test_cxx_return_type_deduction "${MSVC_2015}") set(_cmake_feature_test_cxx_sizeof_member "${MSVC_2015}") set(_cmake_feature_test_cxx_thread_local "${MSVC_2015}") -set(_cmake_feature_test_cxx_trailing_return_types "${MSVC_2015}") set(_cmake_feature_test_cxx_unicode_literals "${MSVC_2015}") set(_cmake_feature_test_cxx_unrestricted_unions "${MSVC_2015}") set(_cmake_feature_test_cxx_user_literals "${MSVC_2015}") @@ -38,6 +37,7 @@ set(_cmake_feature_test_cxx_explicit_conversions "${MSVC_2013}") set(_cmake_feature_test_cxx_generalized_initializers "${MSVC_2013}") set(_cmake_feature_test_cxx_nonstatic_member_init "${MSVC_2013}") set(_cmake_feature_test_cxx_raw_string_literals "${MSVC_2013}") +set(_cmake_feature_test_cxx_trailing_return_types "${MSVC_2013}") set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}") # Possibly broken: # http://thread.gmane.org/gmane.comp.lib.boost.devel/244986/focus=245333 ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 2 +- Tests/CompileFeatures/CMakeLists.txt | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Tue Dec 30 14:02:03 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 30 Dec 2014 14:02:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1415-g8cdd0d4 Message-ID: <20141230190203.94E01A7BB1@public.kitware.com> This is an automated email from 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 8cdd0d4208bb8782049cdc750bd516f96d5b5cba (commit) via ea913ff805b7d54cabc27f4a1d05515cf996c0fc (commit) from cad7445c492ece031d0521f4dc04ea05bf4770a7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cdd0d4208bb8782049cdc750bd516f96d5b5cba commit 8cdd0d4208bb8782049cdc750bd516f96d5b5cba Merge: cad7445 ea913ff Author: Robert Maynard AuthorDate: Tue Dec 30 14:02:02 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 30 14:02:02 2014 -0500 Merge topic 'feature_record_msvc' into next ea913ff8 fixup syntax issue. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea913ff805b7d54cabc27f4a1d05515cf996c0fc commit ea913ff805b7d54cabc27f4a1d05515cf996c0fc Author: Robert Maynard AuthorDate: Tue Dec 30 14:00:14 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 14:00:14 2014 -0500 fixup syntax issue. diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 52524f9..072dfce 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(CompileFeatures) @@ -31,13 +31,13 @@ foreach(feature ${cxx_features}) run_test(${feature} CXX) endforeach() -if (CMAKE_CXX_COMPILER_ID STREQUAL GNU +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) list(REMOVE_ITEM CXX_non_features cxx_alignof ) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL GNU +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) # GNU prior to 4.9 does not set any preprocessor define to distinguish # c++1y from c++11, so CMake does not support c++1y features before GNU 4.9. @@ -57,6 +57,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") #older compiler pass the test but might not actually conform cxx_contextual_conversions ) +endif() set(C_ext c) set(C_standard_flag 11) ----------------------------------------------------------------------- Summary of changes: Tests/CompileFeatures/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Tue Dec 30 17:11:45 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Tue, 30 Dec 2014 17:11:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1423-gce73c53 Message-ID: <20141230221145.D52F226C3@public.kitware.com> This is an automated email from 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 ce73c53c7a64d31432739f434f222cfa904c1aec (commit) via edcf86ec3a75e89ce3805c6db371b98b1adeb16e (commit) via a114dfa05df5936c312645171b741ac8279ad1d9 (commit) via 1a6b7625ffdb65ed0433bfab9676df6552e8e0cb (commit) via f79180f555b3e92b456fde6a5d033128a47c6d4f (commit) via 6c8e8e6db6e38c7e89f1932874ebb73293ca4f56 (commit) via 85c494047afcdc5fa05965ca0dddf6fd5f44d4d0 (commit) via 9dfde24f8fb3ae25da5814168fff4083231f6b85 (commit) from 8cdd0d4208bb8782049cdc750bd516f96d5b5cba (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce73c53c7a64d31432739f434f222cfa904c1aec commit ce73c53c7a64d31432739f434f222cfa904c1aec Merge: 8cdd0d4 edcf86e Author: Robert Maynard AuthorDate: Tue Dec 30 17:11:44 2014 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 30 17:11:44 2014 -0500 Merge topic 'feature_record_msvc' into next edcf86ec Features: Don't test cxx_decltype_incomplete_return_types with MSVC. a114dfa0 Feature: Correct initializer lists to be supported in 2015 and above. 1a6b7625 Compile Features: Can't use final as only MSVC 2015 and above support it. f79180f5 Features: Teach windows msvc which are the default compiler versions. 6c8e8e6d Features: test features actually supported by MSVC min supported. 85c49404 Features: Teach windows msvc which are the default compiler versions. 9dfde24f Features: Don't test cxx_contextual_conversions with MSVC. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=edcf86ec3a75e89ce3805c6db371b98b1adeb16e commit edcf86ec3a75e89ce3805c6db371b98b1adeb16e Author: Robert Maynard AuthorDate: Tue Dec 30 15:43:52 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 16:25:06 2014 -0500 Features: Don't test cxx_decltype_incomplete_return_types with MSVC. VS2012 and above to conform to cxx_decltype_incomplete_return_types proposal, but without support for auto return types the dcl.type.simple example in the proposal doesn't compile. diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index cc3dd9c..d6f39bf 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -26,7 +26,19 @@ get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) foreach(feature ${c_features}) run_test(${feature} C) endforeach() + get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) + +#blacklist for msvc +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + list(REMOVE_ITEM cxx_features + #This test requires auto return type deduction to work properly, but + #that is not supported by all versions of MSVC that support decltype + #incomplete return types. + cxx_decltype_incomplete_return_types + ) +endif() + foreach(feature ${cxx_features}) run_test(${feature} CXX) endforeach() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a114dfa05df5936c312645171b741ac8279ad1d9 commit a114dfa05df5936c312645171b741ac8279ad1d9 Author: Robert Maynard AuthorDate: Tue Dec 30 16:00:29 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 16:25:05 2014 -0500 Feature: Correct initializer lists to be supported in 2015 and above. Previous Visual Studio releases said they supported initializer lists but silently produced bad code. diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake index 50e0cbe..2dba314 100644 --- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake +++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake @@ -14,6 +14,11 @@ set(_cmake_feature_test_cxx_binary_literals "${MSVC_2015}") set(_cmake_feature_test_cxx_decltype_auto "${MSVC_2015}") set(_cmake_feature_test_cxx_digit_separators "${MSVC_2015}") set(_cmake_feature_test_cxx_func_identifier "${MSVC_2015}") +# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx +# Note 1. While previous version of VisualStudio said they supported this +# they silently produced bad code, and are now marked as having partial +# support +set(_cmake_feature_test_cxx_generalized_initializers "${MSVC_2015}") set(_cmake_feature_test_cxx_generic_lambdas "${MSVC_2015}") set(_cmake_feature_test_cxx_inheriting_constructors "${MSVC_2015}") set(_cmake_feature_test_cxx_inline_namespaces "${MSVC_2015}") @@ -33,8 +38,6 @@ set(_cmake_feature_test_cxx_defaulted_functions "${MSVC_2013}") set(_cmake_feature_test_cxx_delegating_constructors "${MSVC_2013}") set(_cmake_feature_test_cxx_deleted_functions "${MSVC_2013}") set(_cmake_feature_test_cxx_explicit_conversions "${MSVC_2013}") -# http://thread.gmane.org/gmane.comp.lib.boost.devel/245202/focus=245221 -set(_cmake_feature_test_cxx_generalized_initializers "${MSVC_2013}") set(_cmake_feature_test_cxx_nonstatic_member_init "${MSVC_2013}") set(_cmake_feature_test_cxx_raw_string_literals "${MSVC_2013}") set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}") @@ -85,6 +88,7 @@ set(_cmake_feature_test_cxx_variadic_macros "${MSVC_2010}") # set(_cmake_feature_test_cxx_relaxed_constexpr ) # set(_cmake_feature_test_cxx_variable_templates ) + #Unset all the variables that we don't need exposed. #_cmake_oldestSupported is required by WriteCompilerDetectionHeader set(MSVC_2015) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a6b7625ffdb65ed0433bfab9676df6552e8e0cb commit 1a6b7625ffdb65ed0433bfab9676df6552e8e0cb Author: Robert Maynard AuthorDate: Tue Dec 30 15:03:54 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 15:03:54 2014 -0500 Compile Features: Can't use final as only MSVC 2015 and above support it. diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp index ca38883..1d30884 100644 --- a/Tests/CompileFeatures/genex_test.cpp +++ b/Tests/CompileFeatures/genex_test.cpp @@ -8,7 +8,7 @@ struct A virtual int getA() { return 7; } }; -struct B final : A +struct B : A { int getA() override { return 42; } }; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f79180f555b3e92b456fde6a5d033128a47c6d4f commit f79180f555b3e92b456fde6a5d033128a47c6d4f Author: Robert Maynard AuthorDate: Tue Dec 30 14:59:15 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 14:59:15 2014 -0500 Features: Teach windows msvc which are the default compiler versions. diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake index 2a3f79a..d0599f9 100644 --- a/Modules/Platform/Windows-MSVC-CXX.cmake +++ b/Modules/Platform/Windows-MSVC-CXX.cmake @@ -5,12 +5,10 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0) endif() __windows_compiler_msvc(CXX) -if(MSVC_VERSION LESS 1600) - set(CMAKE_CXX_STANDARD_DEFAULT 98) -elseif(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION GREATER 1600) - #all versions starting with 2010 and above default to c++11 - set(CMAKE_CXX_STANDARD_DEFAULT 11) -endif() +#No version of MSVC has full conformance to C++11. Therefore the +#__cplusplus macro always evaluates to 98 even if the compilers come with +#C++11/14/+ features enabled. +set(CMAKE_CXX_STANDARD_DEFAULT 98) macro(cmake_record_cxx_compile_features) record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c8e8e6db6e38c7e89f1932874ebb73293ca4f56 commit 6c8e8e6db6e38c7e89f1932874ebb73293ca4f56 Author: Robert Maynard AuthorDate: Tue Dec 30 14:49:39 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 14:49:39 2014 -0500 Features: test features actually supported by MSVC min supported. diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 072dfce..cc3dd9c 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -136,9 +136,9 @@ if (CMAKE_CXX_COMPILE_FEATURES) target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_static_assert) target_compile_definitions(CompileFeaturesGenex2 PRIVATE HAVE_OVERRIDE_CONTROL=$) - add_library(noexcept_iface INTERFACE) - target_compile_features(noexcept_iface INTERFACE cxx_noexcept) + add_library(nullptr_iface INTERFACE) + target_compile_features(nullptr_iface INTERFACE cxx_nullptr) add_executable(CompileFeaturesGenex3 genex_test.cpp) - target_link_libraries(CompileFeaturesGenex3 PRIVATE noexcept_iface) + target_link_libraries(CompileFeaturesGenex3 PRIVATE nullptr_iface) target_compile_definitions(CompileFeaturesGenex3 PRIVATE HAVE_OVERRIDE_CONTROL=$) endif() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85c494047afcdc5fa05965ca0dddf6fd5f44d4d0 commit 85c494047afcdc5fa05965ca0dddf6fd5f44d4d0 Author: Robert Maynard AuthorDate: Tue Dec 30 14:41:07 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 14:41:07 2014 -0500 Features: Teach windows msvc which are the default compiler versions. diff --git a/Modules/Platform/Windows-MSVC-C.cmake b/Modules/Platform/Windows-MSVC-C.cmake index cbe1586..c7792eb 100644 --- a/Modules/Platform/Windows-MSVC-C.cmake +++ b/Modules/Platform/Windows-MSVC-C.cmake @@ -3,3 +3,5 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0) set(_FS_C " /FS") endif() __windows_compiler_msvc(C) + +set(CMAKE_C_STANDARD_DEFAULT 90) diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake index 89885b8..2a3f79a 100644 --- a/Modules/Platform/Windows-MSVC-CXX.cmake +++ b/Modules/Platform/Windows-MSVC-CXX.cmake @@ -5,6 +5,13 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0) endif() __windows_compiler_msvc(CXX) +if(MSVC_VERSION LESS 1600) + set(CMAKE_CXX_STANDARD_DEFAULT 98) +elseif(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION GREATER 1600) + #all versions starting with 2010 and above default to c++11 + set(CMAKE_CXX_STANDARD_DEFAULT 11) +endif() + macro(cmake_record_cxx_compile_features) record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES) endmacro() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dfde24f8fb3ae25da5814168fff4083231f6b85 commit 9dfde24f8fb3ae25da5814168fff4083231f6b85 Author: Robert Maynard AuthorDate: Tue Dec 30 12:21:33 2014 -0500 Commit: Robert Maynard CommitDate: Tue Dec 30 14:02:30 2014 -0500 Features: Don't test cxx_contextual_conversions with MSVC. VS2013 and above to conform to the updated cxx_contextual_conversions proposal, but VS2010 and above pass the test. I am hesitant to say that VS2010 and above meet all the requirements of the proposal currently. diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 0ff8ea4..072dfce 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(CompileFeatures) @@ -31,13 +31,13 @@ foreach(feature ${cxx_features}) run_test(${feature} CXX) endforeach() -if (CMAKE_CXX_COMPILER_ID STREQUAL GNU +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) list(REMOVE_ITEM CXX_non_features cxx_alignof ) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL GNU +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) # GNU prior to 4.9 does not set any preprocessor define to distinguish # c++1y from c++11, so CMake does not support c++1y features before GNU 4.9. @@ -50,6 +50,14 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU cxx_return_type_deduction ) endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + list(REMOVE_ITEM CXX_non_features + #Micrsoft only officially supports this feature in VS2013 and above, due + #to new wording of the proposal. We don't test for this with MSVC because + #older compiler pass the test but might not actually conform + cxx_contextual_conversions + ) +endif() set(C_ext c) set(C_standard_flag 11) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 8 ++++++-- Modules/Platform/Windows-MSVC-C.cmake | 2 ++ Modules/Platform/Windows-MSVC-CXX.cmake | 5 +++++ Tests/CompileFeatures/CMakeLists.txt | 18 +++++++++++++++--- Tests/CompileFeatures/genex_test.cpp | 2 +- 5 files changed, 29 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 31 00:01:10 2014 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 31 Dec 2014 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.1.0-592-gc2445d3 Message-ID: <20141231050111.036E2A7862@public.kitware.com> This is an automated email from 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 c2445d3dfd837cd2e372061f5545054317be110a (commit) from 3b62cb7244716e0bd486d7023bec15d922572ad1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2445d3dfd837cd2e372061f5545054317be110a commit c2445d3dfd837cd2e372061f5545054317be110a Author: Kitware Robot AuthorDate: Wed Dec 31 00:01:08 2014 -0500 Commit: Kitware Robot CommitDate: Wed Dec 31 00:01:08 2014 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 87108f5..ffad404 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 1) -set(CMake_VERSION_PATCH 20141230) +set(CMake_VERSION_PATCH 20141231) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From steveire at gmail.com Wed Dec 31 09:03:14 2014 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 31 Dec 2014 09:03:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1437-g2e1ea03 Message-ID: <20141231140314.B0CDFA7D64@public.kitware.com> This is an automated email from 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 2e1ea034a804cd1ec61ba5b9817452d49b6d0830 (commit) via 7403759846b9bd34bb425f5e90f6e367b80d1d58 (commit) via 59aa8d878e69fd694e44af3778e87615804ad53e (commit) via 6c02a443b92ba189288cbe9f01589e00cabfb994 (commit) via 57969aebfc5bc3589972b497fc5deb30e292230f (commit) via b162e9871e8fabacf6f565ad1ced05a6d234e25b (commit) via be77679552dbda01d62b03a85de05ad7e7684862 (commit) via 5e8b4a718169837db825538561ddfd85cf62be43 (commit) via 3b62cb7244716e0bd486d7023bec15d922572ad1 (commit) via ca3d08e6b598a7f7d46b3125a0d7ddddf8be8dcd (commit) via 8e6114017873e50817c6961ffcedb3c52a2ed1f1 (commit) via 028cdfb3deaddef510537bbeb1a4202924c1a80b (commit) via 2b28e07c02d9f13867d0f518b8341e77f006faa4 (commit) via 05105d5c13f6662907cfb63fb6723f9f34f4558d (commit) from ce73c53c7a64d31432739f434f222cfa904c1aec (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e1ea034a804cd1ec61ba5b9817452d49b6d0830 commit 2e1ea034a804cd1ec61ba5b9817452d49b6d0830 Merge: ce73c53 7403759 Author: Stephen Kelly AuthorDate: Wed Dec 31 09:03:12 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 31 09:03:12 2014 -0500 Merge topic 'sun-better-stdlib' into next 74037598 Help: Remove documented restriction on template use. 59aa8d87 Help: Remove documented restriction on find in conditions. 6c02a443 Help: Remove documented restriction on insert APIs. 57969aeb Use two-iterator std::set::insert where appropriate. b162e987 Use insert instead of a loop in some cases. be776795 Revert "Misc. fixes for the Oracle / Sun compiler." 5e8b4a71 SolarisStudio: Use alternative standard library to build CMake. 3b62cb72 CMake Nightly Date Stamp ca3d08e6 CMake Nightly Date Stamp 8e611401 CMake Nightly Date Stamp 028cdfb3 CMake Nightly Date Stamp 2b28e07c CMake Nightly Date Stamp 05105d5c CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7403759846b9bd34bb425f5e90f6e367b80d1d58 commit 7403759846b9bd34bb425f5e90f6e367b80d1d58 Author: Stephen Kelly AuthorDate: Wed Dec 31 14:38:43 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:00:43 2014 +0100 Help: Remove documented restriction on template use. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index a7abb4e..65b3a72 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -64,12 +64,6 @@ assigning the result of ``.size()`` on a container for example, the result should be assigned to ``size_t`` not to ``std::size_t``, ``unsigned int`` or similar types. -Templates ---------- - -Some template code is permitted, but with some limitations. Member templates -may not be used, and template friends may not be used. - Adding Compile Features ======================= http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59aa8d878e69fd694e44af3778e87615804ad53e commit 59aa8d878e69fd694e44af3778e87615804ad53e Author: Stephen Kelly AuthorDate: Wed Dec 31 14:37:44 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:00:43 2014 +0100 Help: Remove documented restriction on find in conditions. The necessary conversion is supported by all CMake host compilers. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 2f98b02..a7abb4e 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -21,32 +21,6 @@ CMake is required to build with ancient C++ compilers and standard library implementations. Some common C++ constructs may not be used in CMake in order to build with such toolchains. -std::set const iterators ------------------------- - -The ``find()`` member function of a ``const`` ``std::set`` instance may not be -used in a comparison with the iterator returned by ``end()``: - -.. code-block:: c++ - - const std::set& someSet = getSet(); - if (someSet.find("needle") == someSet.end()) // Wrong - { - // ... - } - -The return value of ``find()`` must be assigned to an intermediate -``const_iterator`` for comparison: - -.. code-block:: c++ - - const std::set& someSet; - const std::set::const_iterator i = someSet.find("needle"); - if (i != propSet.end()) // Ok - { - // ... - } - std::auto_ptr ------------- diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index 75a84cb..a660bd4 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -66,9 +66,7 @@ cmGeneratorExpressionDAGChecker::Initialize() if (it != top->Seen.end()) { const std::set &propSet = it->second; - const std::set::const_iterator i - = propSet.find(this->Property); - if (i != propSet.end()) + if (propSet.find(this->Property) != propSet.end()) { this->CheckResult = ALREADY_SEEN; return; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c02a443b92ba189288cbe9f01589e00cabfb994 commit 6c02a443b92ba189288cbe9f01589e00cabfb994 Author: Stephen Kelly AuthorDate: Tue Nov 25 16:33:00 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:00:43 2014 +0100 Help: Remove documented restriction on insert APIs. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 682ce47..2f98b02 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -54,53 +54,6 @@ Some implementations have a ``std::auto_ptr`` which can not be used as a return value from a function. ``std::auto_ptr`` may not be used. Use ``cmsys::auto_ptr`` instead. -std::vector::insert and std::set --------------------------------- - -Use of ``std::vector::insert`` with an iterator whose ``element_type`` requires -conversion is not allowed: - -.. code-block:: c++ - - std::set theSet; - std::vector theVector; - theVector.insert(theVector.end(), theSet.begin(), theSet.end()); // Wrong - -A loop must be used instead: - -.. code-block:: c++ - - std::set theSet; - std::vector theVector; - for(std::set::iterator li = theSet.begin(); - li != theSet.end(); ++li) - { - theVector.push_back(*li); - } - -std::set::insert ----------------- - -Use of ``std::set::insert`` is not allowed with any source container: - -.. code-block:: c++ - - std::set theSet; - theSet.insert(targets.begin(), targets.end()); // Wrong - -A loop must be used instead: - -.. code-block:: c++ - - ConstIterator it = targets.begin(); - const ConstIterator end = targets.end(); - for ( ; it != end; ++it) - { - theSet.insert(*it); - } - -.. SunCC 5.9 - Template Parameter Defaults --------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57969aebfc5bc3589972b497fc5deb30e292230f commit 57969aebfc5bc3589972b497fc5deb30e292230f Author: Stephen Kelly AuthorDate: Tue Nov 25 16:33:00 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:00:42 2014 +0100 Use two-iterator std::set::insert where appropriate. diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 7e00027..59c38e9 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -1150,12 +1150,7 @@ void cmCPackWIXGenerator::CollectExtensions( std::vector list; cmSystemTools::ExpandListArgument(variableContent, list); - - for(std::vector::const_iterator i = list.begin(); - i != list.end(); ++i) - { - extensions.insert(*i); - } + extensions.insert(list.begin(), list.end()); } void cmCPackWIXGenerator::AddCustomFlags( diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index a1d770b..fb3e367 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -2498,11 +2498,7 @@ void cmCTestCoverageHandler::LoadLabels(const char* dir) // Label the source with the target labels. LabelSet& labelSet = this->SourceLabels[source]; - for(std::vector::const_iterator li = targetLabels.begin(); - li != targetLabels.end(); ++li) - { - labelSet.insert(*li); - } + labelSet.insert(targetLabels.begin(), targetLabels.end()); } } } diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 97637ed..b83ebe0 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -162,12 +162,9 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test) //--------------------------------------------------------- void cmCTestMultiProcessHandler::LockResources(int index) { - for(std::set::iterator i = - this->Properties[index]->LockedResources.begin(); - i != this->Properties[index]->LockedResources.end(); ++i) - { - this->LockedResources.insert(*i); - } + this->LockedResources.insert( + this->Properties[index]->LockedResources.begin(), + this->Properties[index]->LockedResources.end()); } //--------------------------------------------------------- @@ -499,11 +496,7 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() i != previousSet.end(); ++i) { TestSet const& dependencies = this->Tests[*i]; - for(TestSet::const_iterator j = dependencies.begin(); - j != dependencies.end(); ++j) - { - currentSet.insert(*j); - } + currentSet.insert(dependencies.begin(), dependencies.end()); } for(TestSet::const_iterator i = currentSet.begin(); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 6aa1c2b..fea94ba 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -1160,11 +1160,7 @@ int cmCTestSubmitHandler::ProcessHandler() { // Submit the explicitly selected files: // - cmCTest::SetOfStrings::const_iterator it; - for (it = this->Files.begin(); it != this->Files.end(); ++it) - { - files.insert(*it); - } + files.insert(this->Files.begin(), this->Files.end()); } // Add to the list of files to submit from any selected, existing parts: @@ -1219,11 +1215,7 @@ int cmCTestSubmitHandler::ProcessHandler() // Submit files from this part. std::vector const& pfiles = this->CTest->GetSubmitFiles(p); - for(std::vector::const_iterator pi = pfiles.begin(); - pi != pfiles.end(); ++pi) - { - files.insert(*pi); - } + files.insert(pfiles.begin(), pfiles.end()); } if ( ofs ) @@ -1503,9 +1495,5 @@ void cmCTestSubmitHandler::SelectParts(std::set const& parts) //---------------------------------------------------------------------------- void cmCTestSubmitHandler::SelectFiles(cmCTest::SetOfStrings const& files) { - cmCTest::SetOfStrings::const_iterator it; - for (it = files.begin(); it != files.end(); ++it) - { - this->Files.insert(*it); - } + this->Files.insert(files.begin(), files.end()); } diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index b77825d..04fff91 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2164,11 +2164,7 @@ bool cmCTestTestHandler::SetTestsProperties( std::vector lval; cmSystemTools::ExpandListArgument(val, lval); - for(std::vector::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->LockedResources.insert(*f); - } + rtit->LockedResources.insert(lval.begin(), lval.end()); } if ( key == "TIMEOUT" ) { diff --git a/Source/cmCommandArgumentsHelper.cxx b/Source/cmCommandArgumentsHelper.cxx index 1d5fc07..1a2efc6 100644 --- a/Source/cmCommandArgumentsHelper.cxx +++ b/Source/cmCommandArgumentsHelper.cxx @@ -50,13 +50,8 @@ void cmCommandArgument::FollowsGroup(const cmCommandArgumentGroup* group) if (group!=0) { this->ArgumentsBeforeEmpty = false; - for(std::vector::const_iterator - argIt= group->ContainedArguments.begin(); - argIt != group->ContainedArguments.end(); - ++argIt) - { - this->ArgumentsBefore.insert(*argIt); - } + this->ArgumentsBefore.insert(group->ContainedArguments.begin(), + group->ContainedArguments.end()); } } diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index f4fa5c6..7171d6b 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -408,11 +408,7 @@ cmComputeLinkInformation // Construct a mask to not bother with this behavior for link // directories already specified by the user. std::vector const& dirs = this->Target->GetLinkDirectories(); - for(std::vector::const_iterator di = dirs.begin(); - di != dirs.end(); ++di) - { - this->OldLinkDirMask.insert(*di); - } + this->OldLinkDirMask.insert(dirs.begin(), dirs.end()); } } @@ -1420,11 +1416,8 @@ void cmComputeLinkInformation::ComputeFrameworkInfo() cmSystemTools::ExpandListArgument(implicitDirs, implicitDirVec); } - for(std::vector::const_iterator i = implicitDirVec.begin(); - i != implicitDirVec.end(); ++i) - { - this->FrameworkPathsEmmitted.insert(*i); - } + this->FrameworkPathsEmmitted.insert(implicitDirVec.begin(), + implicitDirVec.end()); // Regular expression to extract a framework path and name. this->SplitFramework.compile("(.*)/(.*)\\.framework$"); @@ -1694,11 +1687,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo() } // Store implicit link directories. - for(std::vector::const_iterator i = implicitDirVec.begin(); - i != implicitDirVec.end(); ++i) - { - this->ImplicitLinkDirs.insert(*i); - } + this->ImplicitLinkDirs.insert(implicitDirVec.begin(), implicitDirVec.end()); // Get language-specific implicit libraries. std::vector implicitLibVec; diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index a1fc268..a8711eb 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -125,11 +125,7 @@ bool cmDependsC::WriteDependencies(const std::set& sources, this->ValidDeps->find(obj); if (tmpIt!= this->ValidDeps->end()) { - for(DependencyVector::const_iterator i=tmpIt->second.begin(); - i != tmpIt->second.end(); ++i) - { - dependencies.insert(*i); - } + dependencies.insert(tmpIt->second.begin(), tmpIt->second.end()); haveDeps = true; } } diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 4082d24..d9818ce 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -319,17 +319,13 @@ void cmDependsFortran::LocateModules() infoI != objInfo.end(); ++infoI) { cmDependsFortranSourceInfo const& info = infoI->second; - for(std::set::const_iterator i = info.Provides.begin(); - i != info.Provides.end(); ++i) - { - // Include this module in the set provided by this target. - this->Internal->TargetProvides.insert(*i); - } + // Include this module in the set provided by this target. + this->Internal->TargetProvides.insert(info.Provides.begin(), + info.Provides.end()); for(std::set::const_iterator i = info.Requires.begin(); i != info.Requires.end(); ++i) { - // Include this module in the set required by this target. this->Internal->TargetRequires[*i] = ""; } } diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 1f39d7a..2b81d60 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -456,11 +456,7 @@ void getPropertyContents(cmTarget const* tgt, const std::string& prop, } std::vector content; cmSystemTools::ExpandListArgument(p, content); - for (std::vector::const_iterator ci = content.begin(); - ci != content.end(); ++ci) - { - ifaceProperties.insert(*ci); - } + ifaceProperties.insert(content.begin(), content.end()); } //---------------------------------------------------------------------------- diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 79d7bca..69857ef 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -615,12 +615,8 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, std::vector includes; target->GetMakefile()->GetLocalGenerator()-> GetIncludeDirectories(includes, gtgt, "C", buildType); - for(std::vector::const_iterator dirIt=includes.begin(); - dirIt != includes.end(); - ++dirIt) - { - uniqIncludeDirs.insert(*dirIt); - } + + uniqIncludeDirs.insert(includes.begin(), includes.end()); std::string systemIncludeDirs = makefile->GetSafeDefinition( "CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS"); @@ -628,12 +624,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, { std::vector dirs; cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs); - for(std::vector::const_iterator dirIt=dirs.begin(); - dirIt != dirs.end(); - ++dirIt) - { - uniqIncludeDirs.insert(*dirIt); - } + uniqIncludeDirs.insert(dirs.begin(), dirs.end()); } systemIncludeDirs = makefile->GetSafeDefinition( @@ -642,12 +633,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, { std::vector dirs; cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs); - for(std::vector::const_iterator dirIt=dirs.begin(); - dirIt != dirs.end(); - ++dirIt) - { - uniqIncludeDirs.insert(*dirIt); - } + uniqIncludeDirs.insert(dirs.begin(), dirs.end()); } for(std::set::const_iterator dirIt=uniqIncludeDirs.begin(); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 435452c..56213e9 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -818,11 +818,7 @@ cmTargetTraceDependencies = ge.Parse(*cli); cge->Evaluate(this->Makefile, "", true); std::set geTargets = cge->GetTargets(); - for(std::set::const_iterator it = geTargets.begin(); - it != geTargets.end(); ++it) - { - targets.insert(*it); - } + targets.insert(geTargets.begin(), geTargets.end()); } } diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 6f0586b..07ea942 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1021,12 +1021,9 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) } //insert outputs from all WirteBuild commands - for(std::set::iterator i = this->CombinedBuildOutputs.begin(); - i != this->CombinedBuildOutputs.end(); ++i) - { - //these paths have already be encoded when added to CombinedBuildOutputs - knownDependencies.insert(*i); - } + //these paths have already be encoded when added to CombinedBuildOutputs + knownDependencies.insert(this->CombinedBuildOutputs.begin(), + this->CombinedBuildOutputs.end()); //after we have combined the data into knownDependencies we have no need //to keep this data around diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 2dab23c..320a1f4 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -845,22 +845,14 @@ cmGlobalVisualStudioGenerator::TargetCompare cmGlobalVisualStudioGenerator::OrderedTargetDependSet ::OrderedTargetDependSet(TargetDependSet const& targets) { - for(TargetDependSet::const_iterator ti = - targets.begin(); ti != targets.end(); ++ti) - { - this->insert(*ti); - } + this->insert(targets.begin(), targets.end()); } //---------------------------------------------------------------------------- cmGlobalVisualStudioGenerator::OrderedTargetDependSet ::OrderedTargetDependSet(TargetSet const& targets) { - for(TargetSet::const_iterator ti = targets.begin(); - ti != targets.end(); ++ti) - { - this->insert(*ti); - } + this->insert(targets.begin(), targets.end()); } std::string cmGlobalVisualStudioGenerator::ExpandCFGIntDir( diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index df5508e..f37d8bc 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -71,11 +71,7 @@ bool cmIncludeDirectoryCommand } if (system) { - for (std::vector::const_iterator li = includes.begin(); - li != includes.end(); ++li) - { - systemIncludes.insert(*li); - } + systemIncludes.insert(includes.begin(), includes.end()); } } std::reverse(beforeIncludes.begin(), beforeIncludes.end()); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 25d5881..25d23f7 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1822,11 +1822,7 @@ void cmMakefile::AddIncludeDirectories(const std::vector &incs, void cmMakefile::AddSystemIncludeDirectories(const std::set &incs) { - for(std::set::const_iterator li = incs.begin(); - li != incs.end(); ++li) - { - this->SystemIncludeDirectories.insert(*li); - } + this->SystemIncludeDirectories.insert(incs.begin(), incs.end()); for (cmTargets::iterator l = this->Targets.begin(); l != this->Targets.end(); ++l) @@ -4556,16 +4552,8 @@ void cmMakefile::PopScope() this->Internal->VarInitStack.pop(); this->Internal->VarUsageStack.pop(); // Push initialization and usage up to the parent scope. - it = init.begin(); - for (; it != init.end(); ++it) - { - this->Internal->VarInitStack.top().insert(*it); - } - it = usage.begin(); - for (; it != usage.end(); ++it) - { - this->Internal->VarUsageStack.top().insert(*it); - } + this->Internal->VarInitStack.top().insert(init.begin(), init.end()); + this->Internal->VarUsageStack.top().insert(usage.begin(), usage.end()); } void cmMakefile::RaiseScope(const std::string& var, const char *varDef) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 443162a..ded85c3 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -899,12 +899,7 @@ void cmQtAutoGenerators::SetupAutoUicTarget(cmTarget const* target, std::set skipped; std::vector skipVec; cmSystemTools::ExpandListArgument(this->SkipUic, skipVec); - - for (std::vector::const_iterator li = skipVec.begin(); - li != skipVec.end(); ++li) - { - skipped.insert(*li); - } + skipped.insert(skipVec.begin(), skipVec.end()); makefile->AddDefinition("_skip_uic", cmLocalGenerator::EscapeForCMake(this->SkipUic).c_str()); @@ -1622,12 +1617,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) std::vector headerFilesVec; cmSystemTools::ExpandListArgument(this->Headers, headerFilesVec); - for (std::vector::const_iterator it = headerFilesVec.begin(); - it != headerFilesVec.end(); - ++it) - { - headerFiles.insert(*it); - } + headerFiles.insert(headerFilesVec.begin(), headerFilesVec.end()); // key = moc source filepath, value = moc output filename std::map notIncludedMocs; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1b39804..c8fbf61 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -424,12 +424,8 @@ void cmTarget::SetMakefile(cmMakefile* mf) const std::set parentSystemIncludes = this->Makefile->GetSystemIncludeDirectories(); - for (std::set::const_iterator it - = parentSystemIncludes.begin(); - it != parentSystemIncludes.end(); ++it) - { - this->SystemIncludeDirectories.insert(*it); - } + this->SystemIncludeDirectories.insert(parentSystemIncludes.begin(), + parentSystemIncludes.end()); const std::vector parentOptions = this->Makefile->GetCompileOptionsEntries(); @@ -1397,22 +1393,14 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, void cmTarget::AddSystemIncludeDirectories(const std::set &incs) { - for(std::set::const_iterator li = incs.begin(); - li != incs.end(); ++li) - { - this->SystemIncludeDirectories.insert(*li); - } + this->SystemIncludeDirectories.insert(incs.begin(), incs.end()); } //---------------------------------------------------------------------------- void cmTarget::AddSystemIncludeDirectories(const std::vector &incs) { - for(std::vector::const_iterator li = incs.begin(); - li != incs.end(); ++li) - { - this->SystemIncludeDirectories.insert(*li); - } + this->SystemIncludeDirectories.insert(incs.begin(), incs.end()); } #if defined(_WIN32) && !defined(__CYGWIN__) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b162e9871e8fabacf6f565ad1ced05a6d234e25b commit b162e9871e8fabacf6f565ad1ced05a6d234e25b Author: Stephen Kelly AuthorDate: Sat Nov 22 11:00:45 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:00:42 2014 +0100 Use insert instead of a loop in some cases. Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set. diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index d226a6c..5e7d764 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -1094,11 +1094,8 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, { // Create a contiguous array for the line this->CurrentProcessingLine.clear(); - t_BuildProcessingQueueType::iterator cit; - for ( cit = queue->begin(); cit != it; ++cit ) - { - this->CurrentProcessingLine.push_back(*cit); - } + this->CurrentProcessingLine.insert(this->CurrentProcessingLine.end(), + queue->begin(), queue->end()); this->CurrentProcessingLine.push_back(0); const char* line = &*this->CurrentProcessingLine.begin(); diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 4c89caa..97637ed 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -526,11 +526,8 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() TestList sortedCopy; - for(TestSet::const_iterator j = currentSet.begin(); - j != currentSet.end(); ++j) - { - sortedCopy.push_back(*j); - } + sortedCopy.insert(sortedCopy.end(), + currentSet.begin(), currentSet.end()); std::stable_sort(sortedCopy.begin(), sortedCopy.end(), comp); diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx index 0bb1a99..52b98d7 100644 --- a/Source/CTest/cmCTestP4.cxx +++ b/Source/CTest/cmCTestP4.cxx @@ -349,11 +349,7 @@ void cmCTestP4::SetP4Options(std::vector &CommandOptions) std::vector args = cmSystemTools::ParseArguments(opts.c_str()); - for(std::vector::const_iterator ai = args.begin(); - ai != args.end(); ++ai) - { - P4Options.push_back(*ai); - } + P4Options.insert(P4Options.end(), args.begin(), args.end()); } CommandOptions.clear(); diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 07a994d..4aa8d04 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -74,13 +74,8 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector notesFiles; cmCTest::VectorOfStrings newNotesFiles; cmSystemTools::ExpandListArgument(notesFilesVariable,notesFiles); - std::vector::iterator it; - for ( it = notesFiles.begin(); - it != notesFiles.end(); - ++ it ) - { - newNotesFiles.push_back(*it); - } + newNotesFiles.insert(newNotesFiles.end(), + notesFiles.begin(), notesFiles.end()); this->CTest->GenerateNotesFile(newNotesFiles); } @@ -91,13 +86,8 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() std::vector extraFiles; cmCTest::VectorOfStrings newExtraFiles; cmSystemTools::ExpandListArgument(extraFilesVariable,extraFiles); - std::vector::iterator it; - for ( it = extraFiles.begin(); - it != extraFiles.end(); - ++ it ) - { - newExtraFiles.push_back(*it); - } + newExtraFiles.insert(newExtraFiles.end(), + extraFiles.begin(), extraFiles.end()); if ( !this->CTest->SubmitExtraFiles(newExtraFiles)) { this->SetError("problem submitting extra files."); diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index 2531a1a..dc3b4c2 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -36,11 +36,7 @@ bool cmAddTestCommand // Collect the command with arguments. std::vector command; - for(std::vector::const_iterator it = args.begin() + 1; - it != args.end(); ++it) - { - command.push_back(*it); - } + command.insert(command.end(), args.begin() + 1, args.end()); // Create the test but add a generator only the first time it is // seen. This preserves behavior from before test generators. diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index aba26de..7a601e2 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -53,10 +53,7 @@ bool cmConditionEvaluator::IsTrue( cmArgumentList newArgs; // copy to the list structure - for(unsigned int i = 0; i < args.size(); ++i) - { - newArgs.push_back(args[i]); - } + newArgs.insert(newArgs.end(), args.begin(), args.end()); // now loop through the arguments and see if we can reduce any of them // we do this multiple times. Once for each level of precedence @@ -411,10 +408,7 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList &newArgs, // copy to the list structure cmArgumentList::iterator argP1 = arg; argP1++; - for(; argP1 != argClose; argP1++) - { - newArgs2.push_back(*argP1); - } + newArgs2.insert(newArgs2.end(), argP1, argClose); newArgs2.pop_back(); // now recursively invoke IsTrue to handle the values inside the // parenthetical expression diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 2afb029..015825d 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -131,21 +131,14 @@ const char* cmCustomCommand::GetComment() const //---------------------------------------------------------------------------- void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines) { - for(cmCustomCommandLines::const_iterator i=commandLines.begin(); - i != commandLines.end(); ++i) - { - this->CommandLines.push_back(*i); - } + this->CommandLines.insert(this->CommandLines.end(), + commandLines.begin(), commandLines.end()); } //---------------------------------------------------------------------------- void cmCustomCommand::AppendDepends(const std::vector& depends) { - for(std::vector::const_iterator i=depends.begin(); - i != depends.end(); ++i) - { - this->Depends.push_back(*i); - } + this->Depends.insert(this->Depends.end(), depends.begin(), depends.end()); } //---------------------------------------------------------------------------- diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index beb6dde..013724e 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -184,10 +184,8 @@ bool cmFindBase::ParseArguments(std::vector const& argsIn) std::vector shortArgs = this->Names; this->Names.clear(); // clear out any values in Names this->Names.push_back(shortArgs[0]); - for(unsigned int j = 1; j < shortArgs.size(); ++j) - { - this->UserGuessArgs.push_back(shortArgs[j]); - } + this->UserGuessArgs.insert(this->UserGuessArgs.end(), + shortArgs.begin() + 1, shortArgs.end()); } this->ExpandPaths(); diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 3580374..488538f 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -271,11 +271,7 @@ bool cmFunctionCommand // create a function blocker cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker(); - for(std::vector::const_iterator j = args.begin(); - j != args.end(); ++j) - { - f->Args.push_back(*j); - } + f->Args.insert(f->Args.end(), args.begin(), args.end()); this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 2b531e2..435452c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -489,11 +489,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir, unique.insert(*li); } result.clear(); - for(std::set::iterator li = unique.begin(); - li != unique.end(); ++li) - { - result.push_back(*li); - } + result.insert(result.end(), unique.begin(), unique.end()); IncludeCacheType::value_type entry(config_upper, result); iter = this->SystemIncludesCache.insert(entry).first; diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index f106e1a..a007693 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -47,11 +47,8 @@ bool cmInstallFilesCommand else { this->IsFilesForm = false; - std::vector::const_iterator s = args.begin(); - for (++s;s != args.end(); ++s) - { - this->FinalArgs.push_back(*s); - } + this->FinalArgs.insert(this->FinalArgs.end(), + args.begin() + 1, args.end()); } this->Makefile->GetLocalGenerator()->GetGlobalGenerator() diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index 0405769..cc223ab 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -27,11 +27,7 @@ bool cmInstallProgramsCommand this->Destination = args[0]; - std::vector::const_iterator s = args.begin(); - for (++s;s != args.end(); ++s) - { - this->FinalArgs.push_back(*s); - } + this->FinalArgs.insert(this->FinalArgs.end(), args.begin() + 1, args.end()); this->Makefile->GetLocalGenerator()->GetGlobalGenerator() ->AddInstallComponent(this->Makefile->GetSafeDefinition( diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2de6c93..a4185ad 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -634,11 +634,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); - a != cmd.end(); ++a) - { - commandLine.push_back(*a); - } + commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); // Store this command line. commandLines.push_back(commandLine); @@ -745,11 +741,7 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang, // Parse the string to get the custom command line. cmCustomCommandLine commandLine; std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); - for(std::vector::iterator a = cmd.begin(); - a != cmd.end(); ++a) - { - commandLine.push_back(*a); - } + commandLine.insert(commandLine.end(), cmd.begin(), cmd.end()); // Store this command line. commandLines.push_back(commandLine); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 812ded3..96beb1c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1856,13 +1856,8 @@ void cmLocalUnixMakefileGenerator3 { text = "Running external command ..."; } - std::set::const_iterator dit; - for ( dit = glIt->second.GetUtilities().begin(); - dit != glIt->second.GetUtilities().end(); - ++ dit ) - { - depends.push_back(*dit); - } + depends.insert(depends.end(), glIt->second.GetUtilities().begin(), + glIt->second.GetUtilities().end()); this->AppendEcho(commands, text, cmLocalUnixMakefileGenerator3::EchoGlobal); diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index ae81c58..d399313 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -328,11 +328,7 @@ bool cmMacroCommand::InitialPass(std::vector const& args, // create a function blocker cmMacroFunctionBlocker *f = new cmMacroFunctionBlocker(); - for(std::vector::const_iterator j = args.begin(); - j != args.end(); ++j) - { - f->Args.push_back(*j); - } + f->Args.insert(f->Args.end(), args.begin(), args.end()); this->Makefile->AddFunctionBlocker(f); return true; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 20dae5a..25d5881 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2567,12 +2567,7 @@ std::vector cmMakefile } std::vector res; - - std::set::iterator fit; - for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) - { - res.push_back(*fit); - } + res.insert(res.end(), definitions.begin(), definitions.end()); return res; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index cbf8573..040a7d6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -759,13 +759,10 @@ cmMakefileTargetGenerator if(const char* extra_outputs_str = source.GetProperty("OBJECT_OUTPUTS")) { + // Register these as extra files to clean. cmSystemTools::ExpandListArgument(extra_outputs_str, outputs); - for(std::vector::const_iterator eoi = outputs.begin()+1; - eoi != outputs.end(); ++eoi) - { - // Register this as an extra file to clean. - this->CleanFiles.push_back(*eoi); - } + this->CleanFiles.insert(this->CleanFiles.end(), + outputs.begin() + 1, outputs.end()); } // Write the rule. @@ -1174,11 +1171,7 @@ cmMakefileTargetGenerator { cmCustomCommandGenerator ccg(*cc, this->ConfigName, this->Makefile); const std::vector& outputs = ccg.GetOutputs(); - for(std::vector::const_iterator o = outputs.begin(); - o != outputs.end(); ++o) - { - depends.push_back(*o); - } + depends.insert(depends.end(), outputs.begin(), outputs.end()); } } } @@ -1462,11 +1455,8 @@ void cmMakefileTargetGenerator::WriteTargetDriverRule( } // Make sure the extra files are built. - for(std::set::const_iterator i = this->ExtraFiles.begin(); - i != this->ExtraFiles.end(); ++i) - { - depends.push_back(*i); - } + depends.insert(depends.end(), + this->ExtraFiles.begin(), this->ExtraFiles.end()); } // Write the driver rule. @@ -1553,11 +1543,7 @@ void cmMakefileTargetGenerator if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg)) { std::vector const& libDeps = cli->GetDepends(); - for(std::vector::const_iterator j = libDeps.begin(); - j != libDeps.end(); ++j) - { - depends.push_back(*j); - } + depends.insert(depends.end(), libDeps.begin(), libDeps.end()); } } @@ -1577,12 +1563,8 @@ void cmMakefileTargetGenerator } // Add dependencies on the external object files. - for(std::vector::const_iterator obj - = this->ExternalObjects.begin(); - obj != this->ExternalObjects.end(); ++obj) - { - depends.push_back(*obj); - } + depends.insert(depends.end(), + this->ExternalObjects.begin(), this->ExternalObjects.end()); // Add a dependency on the rule file itself. this->LocalGenerator->AppendRuleDepend(depends, diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a01a384..443162a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2188,24 +2188,12 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, std::vector command; command.push_back(this->MocExecutable); - for (std::list::const_iterator it = this->MocIncludes.begin(); - it != this->MocIncludes.end(); - ++it) - { - command.push_back(*it); - } - for(std::list::const_iterator it=this->MocDefinitions.begin(); - it != this->MocDefinitions.end(); - ++it) - { - command.push_back(*it); - } - for(std::vector::const_iterator it=this->MocOptions.begin(); - it != this->MocOptions.end(); - ++it) - { - command.push_back(*it); - } + command.insert(command.end(), + this->MocIncludes.begin(), this->MocIncludes.end()); + command.insert(command.end(), + this->MocDefinitions.begin(), this->MocDefinitions.end()); + command.insert(command.end(), + this->MocOptions.begin(), this->MocOptions.end()); #ifdef _WIN32 command.push_back("-DWIN32"); #endif @@ -2277,12 +2265,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, cmSystemTools::ExpandListArgument(optionIt->second, fileOpts); this->MergeUicOptions(opts, fileOpts, this->QtMajorVersion == "5"); } - for(std::vector::const_iterator optIt = opts.begin(); - optIt != opts.end(); - ++optIt) - { - command.push_back(*optIt); - } + command.insert(command.end(), opts.begin(), opts.end()); command.push_back("-o"); command.push_back(this->Builddir + ui_output_file); diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index bcb8564..d8aa1cb 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -39,10 +39,7 @@ bool cmRemoveCommand // check for REMOVE(VAR v1 v2 ... vn) std::vector argsExpanded; std::vector temp; - for(unsigned int j = 1; j < args.size(); ++j) - { - temp.push_back(args[j]); - } + temp.insert(temp.end(), args.begin() + 1, args.end()); cmSystemTools::ExpandList(temp, argsExpanded); // now create the new value diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 1c8c387..54dafd2 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1273,11 +1273,7 @@ bool cmSystemTools::Split(const char* s, std::vector& l) { std::vector temp; bool res = Superclass::Split(s, temp); - for(std::vector::const_iterator i = temp.begin(); - i != temp.end(); ++i) - { - l.push_back(*i); - } + l.insert(l.end(), temp.begin(), temp.end()); return res; } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 94a6de3..1b39804 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6449,11 +6449,8 @@ cmTargetInternals::ComputeLinkImplementationLanguages( // Get languages used in our source files. thisTarget->GetLanguages(languages, config); // Copy the set of langauges to the link implementation. - for(std::set::iterator li = languages.begin(); - li != languages.end(); ++li) - { - impl.Languages.push_back(*li); - } + impl.Languages.insert(impl.Languages.begin(), + languages.begin(), languages.end()); } //---------------------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be77679552dbda01d62b03a85de05ad7e7684862 commit be77679552dbda01d62b03a85de05ad7e7684862 Author: Stephen Kelly AuthorDate: Wed Dec 31 14:55:42 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:00:42 2014 +0100 Revert "Misc. fixes for the Oracle / Sun compiler." This reverts commit 97b65f8156734db2adc367b27c822a5fe332d740. diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index a636d23..1fb8f30 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -266,10 +266,9 @@ cmComputeLinkDepends::Compute() // Iterate in reverse order so we can keep only the last occurrence // of a shared library. std::set emmitted; - const std::vector& cFLO = this->FinalLinkOrder; for(std::vector::const_reverse_iterator - li = cFLO.rbegin(), - le = cFLO.rend(); + li = this->FinalLinkOrder.rbegin(), + le = this->FinalLinkOrder.rend(); li != le; ++li) { int i = *li; diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 8410cda..0130006 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -80,15 +80,12 @@ void cmFindPackageCommand::AppendSearchPathGroups() PathLabel::SystemRegistry); // Create the new path objects - this->LabeledPaths.insert( - std::pair( - PathLabel::UserRegistry, cmSearchPath(this))); - this->LabeledPaths.insert( - std::pair( - PathLabel::Builds, cmSearchPath(this))); - this->LabeledPaths.insert( - std::pair( - PathLabel::SystemRegistry, cmSearchPath(this))); + this->LabeledPaths.insert(std::make_pair(PathLabel::UserRegistry, + cmSearchPath(this))); + this->LabeledPaths.insert(std::make_pair(PathLabel::Builds, + cmSearchPath(this))); + this->LabeledPaths.insert(std::make_pair(PathLabel::SystemRegistry, + cmSearchPath(this))); } //---------------------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e8b4a718169837db825538561ddfd85cf62be43 commit 5e8b4a718169837db825538561ddfd85cf62be43 Author: Stephen Kelly AuthorDate: Wed Dec 31 12:23:50 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:00:07 2014 +0100 SolarisStudio: Use alternative standard library to build CMake. SolarisStudio ships a very old RogueWave standard library implementation (libCstd) and uses it by default for backward compatibility. The macros defined when building the system libCstd need to be the same as the macros defined when using it for binary compatibility reasons etc. The SolarisStudio compiler driver adds macros such as _RWSTD_NO_MEMBER_TEMPLATES and _RWSTD_NO_CLASS_PARTIAL_SPEC etc. These macros disable certain APIs in the standard library headers. Although the compiler supports the features 'member templates' and 'partial template specialization', the standard library does not provide APIs which rely on those features. This means that std::vector::insert in libCStd does not accept a pair of iterators from a different type of container, because that requires member templates, and reverse_iterator can not be constructed from a reverse_iterator because that requires partial specialization (or at least the _RWSTD_NO_CLASS_PARTIAL_SPEC define) and member templates. This causes many problems while building CMake using SolarisStudio, which have not been well understood until now. The problems are usually attributed to compiler limitations, while actually the problem is in the standard library, as in commit v3.0.0-rc1~99^2~1 (Help: Document non-use of std::set::insert., 2014-01-24) and commit 107dcac3 (Fix compilation with the Oracle / Sun compiler (#15318), 2014-12-12). SolarisStudio 12.3 and earlier also ships a version of stlport which may be used instead of libCstd by specifying -library=stlport4 https://docs.oracle.com/cd/E18659_01/html/821-1383/bkakg.html SolarisStudio 12.4 ships a version of libstdc++ from GCC 4.8.2 which may be used by specifying -std=c++03 or -std=c++11 etc http://docs.oracle.com/cd/E37069_01/html/E37075/bkamw.html#OSSCPgnaof Use these more-capable standard library implementations when building cmake. This will allow more use of 'normal' C++ (such as std::vector::insert), and cause fewer surprises resulting from dashboards using SolarisStudio. Because cmake is not a library linked against by 3rd parties and does not have external dependencies, issues related to mixing code using libCStd and libstdc++ do not apply. diff --git a/CMakeLists.txt b/CMakeLists.txt index 1812b27..3f383d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,14 @@ if(NOT DEFINED CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 14) endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4") + endif() +endif() + # option to set the internal encoding of CMake to UTF-8 option(CMAKE_ENCODING_UTF8 "Use UTF-8 encoding internally (experimental)." OFF) mark_as_advanced(CMAKE_ENCODING_UTF8) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 8 +++ Help/manual/cmake-developer.7.rst | 79 --------------------------- Source/CMakeVersion.cmake | 2 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 7 +-- Source/CTest/cmCTestBuildHandler.cxx | 7 +-- Source/CTest/cmCTestCoverageHandler.cxx | 6 +- Source/CTest/cmCTestMultiProcessHandler.cxx | 22 ++------ Source/CTest/cmCTestP4.cxx | 6 +- Source/CTest/cmCTestSubmitCommand.cxx | 18 ++---- Source/CTest/cmCTestSubmitHandler.cxx | 18 +----- Source/CTest/cmCTestTestHandler.cxx | 6 +- Source/cmAddTestCommand.cxx | 6 +- Source/cmCommandArgumentsHelper.cxx | 9 +-- Source/cmComputeLinkDepends.cxx | 5 +- Source/cmComputeLinkInformation.cxx | 19 ++----- Source/cmConditionEvaluator.cxx | 10 +--- Source/cmCustomCommand.cxx | 13 +---- Source/cmDependsC.cxx | 6 +- Source/cmDependsFortran.cxx | 10 +--- Source/cmExportFileGenerator.cxx | 6 +- Source/cmExtraCodeBlocksGenerator.cxx | 22 ++------ Source/cmFindBase.cxx | 6 +- Source/cmFindPackageCommand.cxx | 15 ++--- Source/cmFunctionCommand.cxx | 6 +- Source/cmGeneratorExpressionDAGChecker.cxx | 4 +- Source/cmGeneratorTarget.cxx | 12 +--- Source/cmGlobalNinjaGenerator.cxx | 9 +-- Source/cmGlobalVisualStudioGenerator.cxx | 12 +--- Source/cmIncludeDirectoryCommand.cxx | 6 +- Source/cmInstallFilesCommand.cxx | 7 +-- Source/cmInstallProgramsCommand.cxx | 6 +- Source/cmLocalGenerator.cxx | 12 +--- Source/cmLocalUnixMakefileGenerator3.cxx | 9 +-- Source/cmMacroCommand.cxx | 6 +- Source/cmMakefile.cxx | 25 ++------- Source/cmMakefileTargetGenerator.cxx | 36 +++--------- Source/cmQtAutoGenerators.cxx | 45 +++------------ Source/cmRemoveCommand.cxx | 5 +- Source/cmSystemTools.cxx | 6 +- Source/cmTarget.cxx | 27 ++------- 40 files changed, 107 insertions(+), 432 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Wed Dec 31 09:25:18 2014 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 31 Dec 2014 09:25:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1440-gff99adb Message-ID: <20141231142518.88528A8210@public.kitware.com> This is an automated email from 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 ff99adb80d59dcbe8cb0d9dc12db657a2f58be7e (commit) via 29b4f5420922a06cafeaf07c13b5d781790e8646 (commit) via c2445d3dfd837cd2e372061f5545054317be110a (commit) from 2e1ea034a804cd1ec61ba5b9817452d49b6d0830 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff99adb80d59dcbe8cb0d9dc12db657a2f58be7e commit ff99adb80d59dcbe8cb0d9dc12db657a2f58be7e Merge: 2e1ea03 29b4f54 Author: Stephen Kelly AuthorDate: Wed Dec 31 09:25:17 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 31 09:25:17 2014 -0500 Merge topic 'RunCMake-stderr-default' into next 29b4f542 RunCMake: Expect empty output by default. c2445d3d CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29b4f5420922a06cafeaf07c13b5d781790e8646 commit 29b4f5420922a06cafeaf07c13b5d781790e8646 Author: Stephen Kelly AuthorDate: Tue Dec 16 22:11:40 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 15:24:33 2014 +0100 RunCMake: Expect empty output by default. Expect tests to specify stderr content if it is present. Fix the CMP0019 test, which has only been testing the WARN status until now. Specify in the CommandLine and FPHSA tests that content is at least one character. Set policies in the Language and CheckModules tests, which have empty test output, modulo unrelated policies on some platforms. diff --git a/Tests/RunCMake/CMP0019/CMakeLists.txt b/Tests/RunCMake/CMP0019/CMakeLists.txt index 12cd3c7..8f85fbf 100644 --- a/Tests/RunCMake/CMP0019/CMakeLists.txt +++ b/Tests/RunCMake/CMP0019/CMakeLists.txt @@ -1,3 +1,3 @@ cmake_minimum_required(VERSION 2.8.4) project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt index 72abfc8..9872df2 100644 --- a/Tests/RunCMake/CheckModules/CMakeLists.txt +++ b/Tests/RunCMake/CheckModules/CMakeLists.txt @@ -1,3 +1,4 @@ cmake_minimum_required(VERSION 2.8.11) +cmake_policy(SET CMP0054 NEW) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 84e3614..0c43c20 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -37,7 +37,9 @@ run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) +set(RunCMake_DEFAULT_stderr ".") run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) +unset(RunCMake_DEFAULT_stderr) run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index bb7743c..e9b2a7a 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -14,6 +14,7 @@ run_cmake(exact_1.2.3) run_cmake(exact_1.2.3.4) # now test every component with an invalid version +set(RunCMake_DEFAULT_stderr ".") run_cmake(exact_0) run_cmake(exact_2) run_cmake(exact_1.1) @@ -22,6 +23,7 @@ run_cmake(exact_1.2.2) run_cmake(exact_1.2.4) run_cmake(exact_1.2.3.3) run_cmake(exact_1.2.3.5) +unset(RunCMake_DEFAULT_stderr) # check if searching for a version 0 works list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0") diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt index 12cd3c7..8996fef 100644 --- a/Tests/RunCMake/Languages/CMakeLists.txt +++ b/Tests/RunCMake/Languages/CMakeLists.txt @@ -1,3 +1,4 @@ cmake_minimum_required(VERSION 2.8.4) +cmake_policy(SET CMP0042 NEW) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/README.rst b/Tests/RunCMake/README.rst index 536cff2..e801a86 100644 --- a/Tests/RunCMake/README.rst +++ b/Tests/RunCMake/README.rst @@ -41,7 +41,7 @@ but do not actually build anything. To add a test: ``-stdout.txt`` Regex matching expected stdout content ``-stderr.txt`` - Regex matching expected stderr content + Regex matching expected stderr content, if not "^$" ``-check.cmake`` Custom result check. diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 7b1a5b2..7b3eda7 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -25,6 +25,13 @@ function(run_cmake test) unset(expect_std${o}) endif() endforeach() + if (NOT expect_stderr) + if (NOT RunCMake_DEFAULT_stderr) + set(RunCMake_DEFAULT_stderr "^$") + endif() + set(expect_stderr ${RunCMake_DEFAULT_stderr}) + endif() + if (NOT RunCMake_TEST_SOURCE_DIR) set(RunCMake_TEST_SOURCE_DIR "${top_src}") endif() ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Tests/RunCMake/CMP0019/CMakeLists.txt | 2 +- Tests/RunCMake/CheckModules/CMakeLists.txt | 1 + Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 2 ++ Tests/RunCMake/FPHSA/RunCMakeTest.cmake | 2 ++ Tests/RunCMake/Languages/CMakeLists.txt | 1 + Tests/RunCMake/README.rst | 2 +- Tests/RunCMake/RunCMake.cmake | 7 +++++++ 8 files changed, 16 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Wed Dec 31 10:29:37 2014 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 31 Dec 2014 10:29:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1443-g8ad33e0 Message-ID: <20141231152937.C927FA8354@public.kitware.com> This is an automated email from 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 8ad33e01d2ed27c9ac136fd19516a21449b4c87b (commit) via b97c86b5009307e6b089bcc2ddef55d77918f765 (commit) via 2c528f860ff8ea458fbf8ab6c85908aeeaa749e0 (commit) from ff99adb80d59dcbe8cb0d9dc12db657a2f58be7e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ad33e01d2ed27c9ac136fd19516a21449b4c87b commit 8ad33e01d2ed27c9ac136fd19516a21449b4c87b Merge: ff99adb b97c86b Author: Robert Maynard AuthorDate: Wed Dec 31 10:29:37 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 31 10:29:37 2014 -0500 Merge topic 'feature_record_msvc' into next b97c86b5 CompileFeatures: Support compilers that don't have version modess. 2c528f86 CompileFeatures: NonValidTarget1 now handles not have cxx_final. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b97c86b5009307e6b089bcc2ddef55d77918f765 commit b97c86b5009307e6b089bcc2ddef55d77918f765 Author: Robert Maynard AuthorDate: Wed Dec 31 10:27:24 2014 -0500 Commit: Robert Maynard CommitDate: Wed Dec 31 10:27:24 2014 -0500 CompileFeatures: Support compilers that don't have version modess. compilers such as MSVC have no explicit flags to enable C++11 mode, it just is always on. So only run the link tests with compilers that require a flag to specify the language version. diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake index 1892a5c..e4abed5 100644 --- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake @@ -27,8 +27,13 @@ if (NOT CXX_FEATURES) run_cmake(NoSupportedCxxFeatures) run_cmake(NoSupportedCxxFeaturesGenex) else() - run_cmake(LinkImplementationFeatureCycle) - run_cmake(LinkImplementationFeatureCycleSolved) + #compilers such as MSVC have no explicit flags to enable C++11 mode, + #it just is always on. So only run the link tests with compilers that require + #a flag to specify the language version. + if(CMAKE_CXX11_STANDARD_COMPILE_OPTION) + run_cmake(LinkImplementationFeatureCycle) + run_cmake(LinkImplementationFeatureCycleSolved) + endif() if (";${CXX_FEATURES};" MATCHES ";cxx_final;") set(RunCMake_TEST_OPTIONS "-DHAVE_FINAL=1") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c528f860ff8ea458fbf8ab6c85908aeeaa749e0 commit 2c528f860ff8ea458fbf8ab6c85908aeeaa749e0 Author: Robert Maynard AuthorDate: Wed Dec 31 10:25:33 2014 -0500 Commit: Robert Maynard CommitDate: Wed Dec 31 10:25:33 2014 -0500 CompileFeatures: NonValidTarget1 now handles not have cxx_final. Previously we expanded HAVE_FINAL to determine what the copied_file number would be, but when we don't have cxx_final than HAVE_FINAL is not defined. What we really want is to use expected_result. diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake index c6707c1..b544b99 100644 --- a/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake @@ -7,7 +7,7 @@ else() set(expected_result 0) endif() -add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${HAVE_FINAL}.cpp" +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${expected_result}.cpp" COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp" ) ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake | 2 +- Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Wed Dec 31 10:34:27 2014 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 31 Dec 2014 10:34:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1445-g3406589 Message-ID: <20141231153427.8993BA83D2@public.kitware.com> This is an automated email from 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 3406589fe3acfffc5db95f82220f13e8e29eea0d (commit) via e8b35676db2949443709d1d819f66f3df15d0c2e (commit) from 8ad33e01d2ed27c9ac136fd19516a21449b4c87b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3406589fe3acfffc5db95f82220f13e8e29eea0d commit 3406589fe3acfffc5db95f82220f13e8e29eea0d Merge: 8ad33e0 e8b3567 Author: Stephen Kelly AuthorDate: Wed Dec 31 10:34:26 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 31 10:34:26 2014 -0500 Merge topic 'RunCMake-stderr-default' into next e8b35676 Update tests. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8b35676db2949443709d1d819f66f3df15d0c2e commit e8b35676db2949443709d1d819f66f3df15d0c2e Author: Stephen Kelly AuthorDate: Wed Dec 31 16:33:21 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 16:33:49 2014 +0100 Update tests. diff --git a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt index 3a7f480..03c002e 100644 --- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt +++ b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt @@ -6,4 +6,4 @@ CMake Error at LINK_LANGUAGE-genex.cmake:[0-9]+ \(target_link_libraries\): LINKER_LANGUAGE target property can not be used while evaluating link libraries for a static library Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt index d8bc238..be3b12c 100644 --- a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt +++ b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt @@ -6,4 +6,4 @@ CMake Error at link-libraries-TARGET_FILE-genex.cmake:[0-9]+ \(target_link_libra Expressions which require the linker language may not be used while evaluating link libraries Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt | 2 +- Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From steveire at gmail.com Wed Dec 31 10:34:44 2014 From: steveire at gmail.com (Stephen Kelly) Date: Wed, 31 Dec 2014 10:34:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1447-g943791e Message-ID: <20141231153444.6D3D3A83DE@public.kitware.com> This is an automated email from 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 943791ec6b6166448216d2c12d355be291910948 (commit) via 73ae888506c89b8c0619905f4c19b79116afb514 (commit) from 3406589fe3acfffc5db95f82220f13e8e29eea0d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=943791ec6b6166448216d2c12d355be291910948 commit 943791ec6b6166448216d2c12d355be291910948 Merge: 3406589 73ae888 Author: Stephen Kelly AuthorDate: Wed Dec 31 10:34:43 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 31 10:34:43 2014 -0500 Merge topic 'RunCMake-stderr-default' into next 73ae8885 RunCMake: Expect empty output by default. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73ae888506c89b8c0619905f4c19b79116afb514 commit 73ae888506c89b8c0619905f4c19b79116afb514 Author: Stephen Kelly AuthorDate: Tue Dec 16 22:11:40 2014 +0100 Commit: Stephen Kelly CommitDate: Wed Dec 31 16:34:34 2014 +0100 RunCMake: Expect empty output by default. Expect tests to specify stderr content if it is present. Fix the CMP0019 test, which has only been testing the WARN status until now. Specify in the CommandLine and FPHSA tests that content is at least one character. Set policies in the Language and CheckModules tests, which have empty test output, modulo unrelated policies on some platforms. diff --git a/Tests/RunCMake/CMP0019/CMakeLists.txt b/Tests/RunCMake/CMP0019/CMakeLists.txt index 12cd3c7..8f85fbf 100644 --- a/Tests/RunCMake/CMP0019/CMakeLists.txt +++ b/Tests/RunCMake/CMP0019/CMakeLists.txt @@ -1,3 +1,3 @@ cmake_minimum_required(VERSION 2.8.4) project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt index 72abfc8..9872df2 100644 --- a/Tests/RunCMake/CheckModules/CMakeLists.txt +++ b/Tests/RunCMake/CheckModules/CMakeLists.txt @@ -1,3 +1,4 @@ cmake_minimum_required(VERSION 2.8.11) +cmake_policy(SET CMP0054 NEW) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 84e3614..0c43c20 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -37,7 +37,9 @@ run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) +set(RunCMake_DEFAULT_stderr ".") run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) +unset(RunCMake_DEFAULT_stderr) run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index bb7743c..e9b2a7a 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -14,6 +14,7 @@ run_cmake(exact_1.2.3) run_cmake(exact_1.2.3.4) # now test every component with an invalid version +set(RunCMake_DEFAULT_stderr ".") run_cmake(exact_0) run_cmake(exact_2) run_cmake(exact_1.1) @@ -22,6 +23,7 @@ run_cmake(exact_1.2.2) run_cmake(exact_1.2.4) run_cmake(exact_1.2.3.3) run_cmake(exact_1.2.3.5) +unset(RunCMake_DEFAULT_stderr) # check if searching for a version 0 works list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0") diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt index 12cd3c7..8996fef 100644 --- a/Tests/RunCMake/Languages/CMakeLists.txt +++ b/Tests/RunCMake/Languages/CMakeLists.txt @@ -1,3 +1,4 @@ cmake_minimum_required(VERSION 2.8.4) +cmake_policy(SET CMP0042 NEW) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt index 3a7f480..03c002e 100644 --- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt +++ b/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt @@ -6,4 +6,4 @@ CMake Error at LINK_LANGUAGE-genex.cmake:[0-9]+ \(target_link_libraries\): LINKER_LANGUAGE target property can not be used while evaluating link libraries for a static library Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt index d8bc238..be3b12c 100644 --- a/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt +++ b/Tests/RunCMake/Languages/link-libraries-TARGET_FILE-genex-stderr.txt @@ -6,4 +6,4 @@ CMake Error at link-libraries-TARGET_FILE-genex.cmake:[0-9]+ \(target_link_libra Expressions which require the linker language may not be used while evaluating link libraries Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/README.rst b/Tests/RunCMake/README.rst index 536cff2..e801a86 100644 --- a/Tests/RunCMake/README.rst +++ b/Tests/RunCMake/README.rst @@ -41,7 +41,7 @@ but do not actually build anything. To add a test: ``-stdout.txt`` Regex matching expected stdout content ``-stderr.txt`` - Regex matching expected stderr content + Regex matching expected stderr content, if not "^$" ``-check.cmake`` Custom result check. diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 7b1a5b2..7b3eda7 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -25,6 +25,13 @@ function(run_cmake test) unset(expect_std${o}) endif() endforeach() + if (NOT expect_stderr) + if (NOT RunCMake_DEFAULT_stderr) + set(RunCMake_DEFAULT_stderr "^$") + endif() + set(expect_stderr ${RunCMake_DEFAULT_stderr}) + endif() + if (NOT RunCMake_TEST_SOURCE_DIR) set(RunCMake_TEST_SOURCE_DIR "${top_src}") endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 31 21:11:11 2014 From: brad.king at kitware.com (Brad King) Date: Wed, 31 Dec 2014 21:11:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.1.0-1449-ga1839ec Message-ID: <20150101021111.4BB7E2034@public.kitware.com> This is an automated email from 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 a1839ec4124605ff90885bdcae3e06de946747cc (commit) via f881c6bafaab2c62617259c86f044b05cefe21c2 (commit) from 943791ec6b6166448216d2c12d355be291910948 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1839ec4124605ff90885bdcae3e06de946747cc commit a1839ec4124605ff90885bdcae3e06de946747cc Merge: 943791e f881c6b Author: Brad King AuthorDate: Wed Dec 31 21:11:09 2014 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 31 21:11:09 2014 -0500 Merge topic 'copyright-year' into next f881c6ba Copyright.txt: Update year range to end in 2015 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f881c6bafaab2c62617259c86f044b05cefe21c2 commit f881c6bafaab2c62617259c86f044b05cefe21c2 Author: Brad King AuthorDate: Wed Dec 31 21:09:37 2014 -0500 Commit: Brad King CommitDate: Wed Dec 31 21:09:37 2014 -0500 Copyright.txt: Update year range to end in 2015 diff --git a/Copyright.txt b/Copyright.txt index 214d7de..6c9fb09 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -1,5 +1,5 @@ CMake - Cross Platform Makefile Generator -Copyright 2000-2014 Kitware, Inc. +Copyright 2000-2015 Kitware, Inc. Copyright 2000-2011 Insight Software Consortium All rights reserved. ----------------------------------------------------------------------- Summary of changes: Copyright.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake