[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6756-geda6051
Stephen Kelly
steveire at gmail.com
Mon Jan 6 12:42:41 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via eda60514724810f1b492033b2594c011502863f9 (commit)
via cfe3c66f5e10e5a82327b4ba6463fa2c4ad2b5e5 (commit)
via 672c5937137ee7486118c50ce5599f9856389a13 (commit)
via 89755d97dfcd1ca0c694714a7d8f6b940a8d31cf (commit)
via 1ae12a6b5080df0bba265d31f621b2981ca81943 (commit)
via 4d147397b56dc3aaa627df6bbd5494d108aab398 (commit)
via ed02098053441743b193f6ffa6f7bcd31b05391e (commit)
via 71f63c597f64969701f35a8ee443e9df6b487707 (commit)
via 0fa09ea108174ef70900b88ca1be915590781eee (commit)
via 4133b6131c9ebeccc6c35e428c33b7e2510b7204 (commit)
via ffc3a2ff261aa76d33d30e081836c57892624e40 (commit)
via 5bbe18d94d96e40a6a824facc367f65feff01f53 (commit)
via 1db5d3fd4c1cac222fafeae2ed50421b83f6a701 (commit)
from 6b0c1285a9a37d200a513412bc58634302372782 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eda60514724810f1b492033b2594c011502863f9
commit eda60514724810f1b492033b2594c011502863f9
Merge: 6b0c128 cfe3c66
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 6 12:42:39 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 6 12:42:39 2014 -0500
Merge topic 'minor-cleanups' into next
cfe3c66 Help: Document the target properties exported to IMPORTED targets.
672c593 CompatibleInterface: Test debugging of not-set property.
89755d9 Help: Note that language-specific 'built-ins' are set by the project command.
1ae12a6 Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs.
4d14739 Tests: simplify Qt4 target usage
ed02098 Help: Fix typo: 'target' -> 'target property'
71f63c5 Test: Remove obsolete commented code.
0fa09ea Help: Fix some erroneous code block markers in Module docs.
4133b61 Genex: Make EQUAL support upper case binary literals
ffc3a2f Genex: Fix case of methods in the dag checker.
5bbe18d Genex: Use a preprocessor loop to implement transitive DAG check.
1db5d3f Genex: List transitive properties and methods as a table, not two lists.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfe3c66f5e10e5a82327b4ba6463fa2c4ad2b5e5
commit cfe3c66f5e10e5a82327b4ba6463fa2c4ad2b5e5
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 4 12:34:02 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:34:48 2014 +0100
Help: Document the target properties exported to IMPORTED targets.
diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst
index be60ebb..03f9115 100644
--- a/Help/manual/cmake-buildsystem.7.rst
+++ b/Help/manual/cmake-buildsystem.7.rst
@@ -218,6 +218,8 @@ each keyword:
PRIVATE serialization
)
+.. _`Compatible Interface Properties`:
+
Compatible Interface Properties
-------------------------------
diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst
index 3eda829..b572bf7 100644
--- a/Help/manual/cmake-packages.7.rst
+++ b/Help/manual/cmake-packages.7.rst
@@ -280,6 +280,12 @@ shared library:
add_library(ClimbingStats SHARED climbingstats.cpp)
generate_export_header(ClimbingStats)
+ set_property(TARGET ClimbingStats PROPERTY VERSION ${Upstream_VERSION})
+ set_property(TARGET ClimbingStats PROPERTY SOVERSION 3)
+ set_property(TARGET ClimbingStats PROPERTY INTERFACE_ClimbingStats_MAJOR_VERSION 3)
+ set_property(TARGET ClimbingStats APPEND PROPERTY
+ COMPATIBLE_INTERFACE_STRING ClimbingStats_MAJOR_VERSION
+ )
install(TARGETS ClimbingStats EXPORT ClimbingStatsTargets
LIBRARY DESTINATION lib
@@ -346,6 +352,22 @@ targets, suitable for use by downsteams and arranges to install it to
and a ``cmake/ClimbingStatsConfig.cmake`` are installed to the same location,
completing the package.
+The generated :prop_tgt:`IMPORTED` targets have appropriate properties set
+to define their usage requirements, such as
+:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES`,
+:prop_tgt:`INTERFACE_COMPILE_DEFINITIONS` and other relevant built-in
+``INTERFACE_`` properties. The ``INTERFACE`` variant of user-defined
+properties listed in :prop_tgt:`COMPATIBLE_INTERFACE_STRING` and
+other :ref:`Compatible Interface Properties` are also propagated to the
+generated :prop_tgt:`IMPORTED` targets. In the above case,
+``ClimbingStats_MAJOR_VERSION`` is defined as a string which must be
+compatible among the dependencies of any depender. By setting this custom
+defined user property in this version and in the next version of
+``ClimbingStats``, :manual:`cmake(1)` will issue a diagnostic if there is an
+attempt to use version 3 together with version 4. Packages can choose to
+employ such a pattern if different major versions of the package are designed
+to be incompatible.
+
A ``NAMESPACE`` with double-colons is specified when exporting the targets
for installation. This convention of double-colons gives CMake a hint that
the name is an :prop_tgt:`IMPORTED` target when it is used by downstreams
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=672c5937137ee7486118c50ce5599f9856389a13
commit 672c5937137ee7486118c50ce5599f9856389a13
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 6 18:23:58 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:23:58 2014 +0100
CompatibleInterface: Test debugging of not-set property.
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
index e3efe28..17b8a5c 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt
@@ -67,6 +67,12 @@ CMake Debug Log:
\* Target "CompatibleInterface" has property content "prop3"
+
CMake Debug Log:
+ String compatibility of property "STRING_PROP4" for target
+ "CompatibleInterface" \(result: "\(unset\)"\):
+
+ \* Target "CompatibleInterface" property not set.
++
+CMake Debug Log:
Numeric minimum compatibility of property "NUMBER_MIN_PROP1" for target
"CompatibleInterface" \(result: "50"\):
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 42a3af2..0196611 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -22,6 +22,7 @@ set_property(TARGET iface1 APPEND PROPERTY
STRING_PROP1
STRING_PROP2
STRING_PROP3
+ STRING_PROP4 # Not set.
)
set_property(TARGET iface1 APPEND PROPERTY
COMPATIBLE_INTERFACE_NUMBER_MIN
@@ -36,7 +37,7 @@ set_property(TARGET iface1 APPEND PROPERTY
set(CMAKE_DEBUG_TARGET_PROPERTIES
BOOL_PROP1 BOOL_PROP2 BOOL_PROP3 BOOL_PROP4 BOOL_PROP5 BOOL_PROP6 BOOL_PROP7
- STRING_PROP1 STRING_PROP2 STRING_PROP3
+ STRING_PROP1 STRING_PROP2 STRING_PROP3 STRING_PROP4
NUMBER_MIN_PROP1 NUMBER_MIN_PROP2
NUMBER_MAX_PROP1 NUMBER_MAX_PROP2
)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89755d97dfcd1ca0c694714a7d8f6b940a8d31cf
commit 89755d97dfcd1ca0c694714a7d8f6b940a8d31cf
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 5 04:41:08 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:17:33 2014 +0100
Help: Note that language-specific 'built-ins' are set by the project command.
diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst
index 97cd650..fb529ad 100644
--- a/Help/manual/cmake-toolchains.7.rst
+++ b/Help/manual/cmake-toolchains.7.rst
@@ -20,7 +20,11 @@ with information about compiler and utility paths.
Languages
=========
-Languages are enabled by the :command:`project` command. If no project command
+Languages are enabled by the :command:`project` command. Language-specific
+built-in variables, such as
+:variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>`,
+:variable:`CMAKE_CXX_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` etc are set by
+invoking the :command:`project` command. If no project command
is in the top-level CMakeLists file, one will be implicitly generated. By default
the enabled languages are C and CXX:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ae12a6b5080df0bba265d31f621b2981ca81943
commit 1ae12a6b5080df0bba265d31f621b2981ca81943
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 6 16:35:31 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:07:57 2014 +0100
Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs.
diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst
index 376ec78..3eda829 100644
--- a/Help/manual/cmake-packages.7.rst
+++ b/Help/manual/cmake-packages.7.rst
@@ -72,6 +72,10 @@ or as a separate ``OPTIONAL_COMPONENTS`` list:
Handling of ``COMPONENTS`` and ``OPTIONAL_COMPONENTS`` is defined by the
package.
+By setting the :variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable to
+``TRUE``, the ``PackageName`` package will not be searched, and will always
+be ``NOTFOUND``.
+
Config-file Packages
--------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d147397b56dc3aaa627df6bbd5494d108aab398
commit 4d147397b56dc3aaa627df6bbd5494d108aab398
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 6 16:24:28 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:07:57 2014 +0100
Tests: simplify Qt4 target usage
This content was copied from another test where both the Core and Gui
targets are used.
diff --git a/Tests/RunCMake/CompatibleInterface/AutoUic.cmake b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
index 86bd5a0..03635e2 100644
--- a/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
+++ b/Tests/RunCMake/CompatibleInterface/AutoUic.cmake
@@ -1,9 +1,6 @@
find_package(Qt4 REQUIRED)
-set(QT_CORE_TARGET Qt4::QtCore)
-set(QT_GUI_TARGET Qt4::QtGui)
-
set(CMAKE_AUTOUIC ON)
set(CMAKE_DEBUG_TARGET_PROPERTIES AUTOUIC_OPTIONS)
@@ -19,4 +16,4 @@ set_property(TARGET OtherI18n APPEND PROPERTY
)
add_library(LibWidget empty.cpp)
-target_link_libraries(LibWidget KI18n OtherI18n ${QT_GUI_TARGET})
+target_link_libraries(LibWidget KI18n OtherI18n Qt4::QtGui)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed02098053441743b193f6ffa6f7bcd31b05391e
commit ed02098053441743b193f6ffa6f7bcd31b05391e
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 6 16:17:54 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:02:55 2014 +0100
Help: Fix typo: 'target' -> 'target property'
diff --git a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
index 2bc1881..3e6c4d1 100644
--- a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
+++ b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
@@ -9,6 +9,6 @@ files. As this ``_automoc`` target is created at generate-time, it is not
possible to define dependencies of it, such as to create inputs for the ``moc``
executable.
-The ``AUTOGEN_TARGET_DEPENDS`` target can be set instead to a list of dependencies
-for the ``_automoc`` target. The buildsystem will be generated to depend on its
-contents.
+The ``AUTOGEN_TARGET_DEPENDS`` target property can be set instead to a list of
+dependencies for the ``_automoc`` target. The buildsystem will be generated to
+depend on its contents.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71f63c597f64969701f35a8ee443e9df6b487707
commit 71f63c597f64969701f35a8ee443e9df6b487707
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 6 16:15:23 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:02:55 2014 +0100
Test: Remove obsolete commented code.
This should not have survived in commit a247911a (Tests: Don't read
the LOCATION property from build targets., 2013-11-18).
diff --git a/Tests/LinkDirectory/CMakeLists.txt b/Tests/LinkDirectory/CMakeLists.txt
index b8d5a04..c60de84 100644
--- a/Tests/LinkDirectory/CMakeLists.txt
+++ b/Tests/LinkDirectory/CMakeLists.txt
@@ -11,13 +11,11 @@ endif()
add_library(mylibA STATIC mylibA.c)
set_property(TARGET mylibA PROPERTY
ARCHIVE_OUTPUT_DIRECTORY "${LinkDirectory_BINARY_DIR}/External/lib")
-# get_property(mylibA TARGET mylibA PROPERTY LOCATION)
# Build a library into our build tree relative to the subproject build tree.
add_library(mylibB STATIC mylibB.c)
set_property(TARGET mylibB PROPERTY
ARCHIVE_OUTPUT_DIRECTORY "${LinkDirectory_BINARY_DIR}/lib")
-# get_property(mylibB TARGET mylibB PROPERTY LOCATION)
# Create a custom target to drive the subproject build.
include(ExternalProject)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fa09ea108174ef70900b88ca1be915590781eee
commit 0fa09ea108174ef70900b88ca1be915590781eee
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 4 20:43:10 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:02:55 2014 +0100
Help: Fix some erroneous code block markers in Module docs.
There are many style errors in these files. This patch fixes only
the syntactical errors.
The script which ported these to rst made some mistakes. Use a new
script to find problematic code:
.#!/usr/bin/env python
import os
rootDir = '.'
def checkFile(fname):
f = open(fname)
lines = f.readlines()
started = False
counter = 0
for l in lines:
if "#" in l:
started = True
elif started:
return
lin = l.find("(")
if lin != -1 and l.find(")", lin) == -1 and \
not "(To distribute this file outside of CMake, substitute the full" in l:
for lp in lines[counter+1:]:
if lp == "# ::\n":
print "\n\n######### " + fname + "\n\n"
print ''.join(lines[max(counter-2, 0):counter+6])
break
elif lp == "#\n" :
continue
break
counter += 1
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
checkFile(os.path.join(dirName, fname))
diff --git a/Modules/CMakeExpandImportedTargets.cmake b/Modules/CMakeExpandImportedTargets.cmake
index 47ac316..58cf440 100644
--- a/Modules/CMakeExpandImportedTargets.cmake
+++ b/Modules/CMakeExpandImportedTargets.cmake
@@ -2,13 +2,8 @@
# CMakeExpandImportedTargets
# --------------------------
#
-#
-#
# CMAKE_EXPAND_IMPORTED_TARGETS(<var> LIBRARIES lib1 lib2...libN
-#
-# ::
-#
-# [CONFIGURATION <config>] )
+# [CONFIGURATION <config>])
#
#
#
diff --git a/Modules/CMakePrintHelpers.cmake b/Modules/CMakePrintHelpers.cmake
index 72832ad..e553b4b 100644
--- a/Modules/CMakePrintHelpers.cmake
+++ b/Modules/CMakePrintHelpers.cmake
@@ -9,14 +9,11 @@
#
#
# CMAKE_PRINT_PROPERTIES([TARGETS target1 .. targetN]
-#
-# ::
-#
-# [SOURCES source1 .. sourceN]
-# [DIRECTORIES dir1 .. dirN]
-# [TESTS test1 .. testN]
-# [CACHE_ENTRIES entry1 .. entryN]
-# PROPERTIES prop1 .. propN )
+# [SOURCES source1 .. sourceN]
+# [DIRECTORIES dir1 .. dirN]
+# [TESTS test1 .. testN]
+# [CACHE_ENTRIES entry1 .. entryN]
+# PROPERTIES prop1 .. propN )
#
#
#
diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake
index a4ed8d5..74c2fe1 100644
--- a/Modules/CheckStructHasMember.cmake
+++ b/Modules/CheckStructHasMember.cmake
@@ -4,11 +4,8 @@
#
# Check if the given struct or class has the specified member variable
#
-# CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <variable>
-#
-# ::
-#
-# [LANGUAGE <language>])
+# CHECK_STRUCT_HAS_MEMBER(<struct> <member> <header> <variable>
+# [LANGUAGE <language>])
#
#
#
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index f7f242b..cf7eeec 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -9,19 +9,15 @@
# information on how to load Java into your CMake project.
#
# add_jar(target_name
-#
-# ::
-#
-# [SOURCES] source1 [source2 ...] [resource1 ...]
-# [INCLUDE_JARS jar1 [jar2 ...]]
-# [ENTRY_POINT entry]
-# [VERSION version]
-# [OUTPUT_NAME name]
-# [OUTPUT_DIR dir]
+# [SOURCES] source1 [source2 ...] [resource1 ...]
+# [INCLUDE_JARS jar1 [jar2 ...]]
+# [ENTRY_POINT entry]
+# [VERSION version]
+# [OUTPUT_NAME name]
+# [OUTPUT_DIR dir]
# )
#
#
-#
# This command creates a <target_name>.jar. It compiles the given
# source files (source) and adds the given resource files (resource) to
# the jar file. If only resource files are given then just a jar file
@@ -191,18 +187,15 @@
#
#
#
-# find_jar(<VAR>
-#
-# ::
#
-# name | NAMES name1 [name2 ...]
-# [PATHS path1 [path2 ... ENV var]]
-# [VERSIONS version1 [version2]]
-# [DOC "cache documentation string"]
+# find_jar(<VAR>
+# name | NAMES name1 [name2 ...]
+# [PATHS path1 [path2 ... ENV var]]
+# [VERSIONS version1 [version2]]
+# [DOC "cache documentation string"]
# )
#
#
-#
# This command is used to find a full path to the named jar. A cache
# entry named by <VAR> is created to stor the result of this command.
# If the full path to a jar is found the result is stored in the
@@ -227,23 +220,21 @@
# DESTINATION. It should be called in the same scope as add_jar() or it
# will fail.
#
-# create_javadoc(<VAR>
#
-# ::
#
-# PACKAGES pkg1 [pkg2 ...]
-# [SOURCEPATH <sourcepath>]
-# [CLASSPATH <classpath>]
-# [INSTALLPATH <install path>]
-# [DOCTITLE "the documentation title"]
-# [WINDOWTITLE "the title of the document"]
-# [AUTHOR TRUE|FALSE]
-# [USE TRUE|FALSE]
-# [VERSION TRUE|FALSE]
+# create_javadoc(<VAR>
+# PACKAGES pkg1 [pkg2 ...]
+# [SOURCEPATH <sourcepath>]
+# [CLASSPATH <classpath>]
+# [INSTALLPATH <install path>]
+# [DOCTITLE "the documentation title"]
+# [WINDOWTITLE "the title of the document"]
+# [AUTHOR TRUE|FALSE]
+# [USE TRUE|FALSE]
+# [VERSION TRUE|FALSE]
# )
#
#
-#
# Create java documentation based on files or packages. For more
# details please read the javadoc manpage.
#
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 67cab4a..11ca205 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -22,11 +22,9 @@
# swig generated module (swig -outdir option) The name-specific variable
# SWIG_MODULE_<name>_EXTRA_DEPS may be used to specify extra
# dependencies for the generated modules. If the source file generated
-# by swig need some special flag you can use
-# set_source_files_properties( ${swig_generated_file_fullname}
-#
-# ::
+# by swig need some special flag you can use::
#
+# set_source_files_properties( ${swig_generated_file_fullname}
# PROPERTIES COMPILE_FLAGS "-bla")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4133b6131c9ebeccc6c35e428c33b7e2510b7204
commit 4133b6131c9ebeccc6c35e428c33b7e2510b7204
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 4 19:38:23 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:02:55 2014 +0100
Genex: Make EQUAL support upper case binary literals
As C++11, python, D and java do.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf
Add test for uppercase hex literals.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index fec43b9..259ba94 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -215,18 +215,18 @@ static const struct EqualNode : public cmGeneratorExpressionNode
bool flipSign = false;
const char *lhs = parameters[0].c_str();
- if (cmHasLiteralPrefix(lhs, "0b"))
+ if (cmHasLiteralPrefix(lhs, "0b") || cmHasLiteralPrefix(lhs, "0B"))
{
base = 2;
lhs += 2;
}
- if (cmHasLiteralPrefix(lhs, "-0b"))
+ if (cmHasLiteralPrefix(lhs, "-0b") || cmHasLiteralPrefix(lhs, "-0B"))
{
base = 2;
lhs += 3;
flipSign = true;
}
- if (cmHasLiteralPrefix(lhs, "+0b"))
+ if (cmHasLiteralPrefix(lhs, "+0b") || cmHasLiteralPrefix(lhs, "+0B"))
{
base = 2;
lhs += 3;
@@ -249,18 +249,18 @@ static const struct EqualNode : public cmGeneratorExpressionNode
flipSign = false;
const char *rhs = parameters[1].c_str();
- if (cmHasLiteralPrefix(rhs, "0b"))
+ if (cmHasLiteralPrefix(rhs, "0b") || cmHasLiteralPrefix(rhs, "0B"))
{
base = 2;
rhs += 2;
}
- if (cmHasLiteralPrefix(rhs, "-0b"))
+ if (cmHasLiteralPrefix(rhs, "-0b") || cmHasLiteralPrefix(rhs, "-0B"))
{
base = 2;
rhs += 3;
flipSign = true;
}
- if (cmHasLiteralPrefix(rhs, "+0b"))
+ if (cmHasLiteralPrefix(rhs, "+0b") || cmHasLiteralPrefix(rhs, "+0B"))
{
base = 2;
rhs += 3;
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 4fb7ecd..9512efc 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -199,7 +199,7 @@ add_custom_target(check-part3 ALL
-Dequal1=$<EQUAL:1,2>
-Dequal2=$<EQUAL:1,1>
-Dequal3=$<EQUAL:0x1,1>
- -Dequal4=$<EQUAL:0x1,2>
+ -Dequal4=$<EQUAL:0X1,2>
-Dequal5=$<EQUAL:0xA,0xa>
-Dequal6=$<EQUAL:0xA,10>
-Dequal7=$<EQUAL:0xA,012>
@@ -208,15 +208,17 @@ add_custom_target(check-part3 ALL
-Dequal10=$<EQUAL:10,0b1010>
-Dequal11=$<EQUAL:-10,-0xa>
-Dequal12=$<EQUAL:10,+0xa>
- -Dequal13=$<EQUAL:+10,+0xa>
+ -Dequal13=$<EQUAL:+10,+0Xa>
-Dequal14=$<EQUAL:+10,0xa>
- -Dequal15=$<EQUAL:-10,-0xa>
+ -Dequal15=$<EQUAL:-10,-0Xa>
-Dequal16=$<EQUAL:-10,-0b1010>
-Dequal17=$<EQUAL:-10,+0b1010>
- -Dequal18=$<EQUAL:10,+0b1010>
- -Dequal19=$<EQUAL:10,+012>
- -Dequal20=$<EQUAL:10,-012>
- -Dequal21=$<EQUAL:-10,-012>
+ -Dequal18=$<EQUAL:10,+0B1010>
+ -Dequal19=$<EQUAL:10,-0B1010>
+ -Dequal20=$<EQUAL:10,0B1010>
+ -Dequal21=$<EQUAL:10,+012>
+ -Dequal22=$<EQUAL:10,-012>
+ -Dequal23=$<EQUAL:-10,-012>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check-part3.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 3)"
VERBATIM
diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake
index 2c6bf49..70ccfe1 100644
--- a/Tests/GeneratorExpression/check-part3.cmake
+++ b/Tests/GeneratorExpression/check-part3.cmake
@@ -55,6 +55,8 @@ check(equal15 "1")
check(equal16 "1")
check(equal17 "0")
check(equal18 "1")
-check(equal19 "1")
-check(equal20 "0")
+check(equal19 "0")
+check(equal20 "1")
check(equal21 "1")
+check(equal22 "0")
+check(equal23 "1")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ffc3a2ff261aa76d33d30e081836c57892624e40
commit ffc3a2ff261aa76d33d30e081836c57892624e40
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 5 05:25:09 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:02:55 2014 +0100
Genex: Fix case of methods in the dag checker.
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index 3e97163..e7e1d34 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -31,7 +31,7 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
top = p;
p = p->Parent;
}
- this->CheckResult = this->checkGraph();
+ this->CheckResult = this->CheckGraph();
#define TEST_TRANSITIVE_PROPERTY_METHOD(METHOD) \
top->METHOD () ||
@@ -61,13 +61,13 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
//----------------------------------------------------------------------------
cmGeneratorExpressionDAGChecker::Result
-cmGeneratorExpressionDAGChecker::check() const
+cmGeneratorExpressionDAGChecker::Check() const
{
return this->CheckResult;
}
//----------------------------------------------------------------------------
-void cmGeneratorExpressionDAGChecker::reportError(
+void cmGeneratorExpressionDAGChecker::ReportError(
cmGeneratorExpressionContext *context,
const std::string &expr)
{
@@ -125,7 +125,7 @@ void cmGeneratorExpressionDAGChecker::reportError(
//----------------------------------------------------------------------------
cmGeneratorExpressionDAGChecker::Result
-cmGeneratorExpressionDAGChecker::checkGraph() const
+cmGeneratorExpressionDAGChecker::CheckGraph() const
{
const cmGeneratorExpressionDAGChecker *parent = this->Parent;
while (parent)
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 1636492..b6effa1 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -52,9 +52,9 @@ struct cmGeneratorExpressionDAGChecker
ALREADY_SEEN
};
- Result check() const;
+ Result Check() const;
- void reportError(cmGeneratorExpressionContext *context,
+ void ReportError(cmGeneratorExpressionContext *context,
const std::string &expr);
bool EvaluatingLinkLibraries(const char *tgt = 0);
@@ -71,7 +71,7 @@ struct cmGeneratorExpressionDAGChecker
{ this->TransitivePropertiesOnly = true; }
private:
- Result checkGraph() const;
+ Result CheckGraph() const;
private:
const cmGeneratorExpressionDAGChecker * const Parent;
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index f0e40ea..fec43b9 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -957,10 +957,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
content,
dagCheckerParent);
- switch (dagChecker.check())
+ switch (dagChecker.Check())
{
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
- dagChecker.reportError(context, content->GetOriginalExpression());
+ dagChecker.ReportError(context, content->GetOriginalExpression());
return std::string();
case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE:
// No error. We just skip cyclic references.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bbe18d94d96e40a6a824facc367f65feff01f53
commit 5bbe18d94d96e40a6a824facc367f65feff01f53
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 5 12:40:38 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:02:54 2014 +0100
Genex: Use a preprocessor loop to implement transitive DAG check.
The other infrastructure for transitive property handling is
already using a preprocessor loop.
Implement special backward-compatibility handling of
COMPILE_DEFINITIONS_<CONFIG> using a template switch for the
extra check.
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index c2c4e20..3e97163 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -179,44 +179,37 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(const char *tgt)
|| strcmp(prop, "INTERFACE_LINK_LIBRARIES") == 0;
}
-//----------------------------------------------------------------------------
-bool cmGeneratorExpressionDAGChecker::EvaluatingIncludeDirectories() const
+enum TransitiveProperty {
+#define DEFINE_ENUM_ENTRY(NAME) NAME,
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(DEFINE_ENUM_ENTRY)
+#undef DEFINE_ENUM_ENTRY
+ TransitivePropertyTerminal
+};
+
+template<TransitiveProperty>
+bool additionalTest(const char* const)
{
- const char *prop = this->Property.c_str();
- return (strcmp(prop, "INCLUDE_DIRECTORIES") == 0
- || strcmp(prop, "INTERFACE_INCLUDE_DIRECTORIES") == 0 );
+ return false;
}
-//----------------------------------------------------------------------------
-bool
-cmGeneratorExpressionDAGChecker::EvaluatingSystemIncludeDirectories() const
+template<>
+bool additionalTest<COMPILE_DEFINITIONS>(const char* const prop)
{
- const char *prop = this->Property.c_str();
- return (strcmp(prop, "SYSTEM_INCLUDE_DIRECTORIES") == 0
- || strcmp(prop, "INTERFACE_SYSTEM_INCLUDE_DIRECTORIES") == 0);
+ return cmHasLiteralPrefix(prop, "COMPILE_DEFINITIONS_");
}
-//----------------------------------------------------------------------------
-bool cmGeneratorExpressionDAGChecker::EvaluatingCompileDefinitions() const
-{
- const char *prop = this->Property.c_str();
- return (strcmp(prop, "COMPILE_DEFINITIONS") == 0
- || strcmp(prop, "INTERFACE_COMPILE_DEFINITIONS") == 0
- || cmHasLiteralPrefix(prop, "COMPILE_DEFINITIONS_"));
+#define DEFINE_TRANSITIVE_PROPERTY_METHOD(METHOD, PROPERTY) \
+bool cmGeneratorExpressionDAGChecker::METHOD() const \
+{ \
+ const char* const prop = this->Property.c_str(); \
+ if (strcmp(prop, #PROPERTY) == 0 \
+ || strcmp(prop, "INTERFACE_" #PROPERTY) == 0) \
+ { \
+ return true; \
+ } \
+ return additionalTest<PROPERTY>(prop); \
}
-//----------------------------------------------------------------------------
-bool cmGeneratorExpressionDAGChecker::EvaluatingCompileOptions() const
-{
- const char *prop = this->Property.c_str();
- return (strcmp(prop, "COMPILE_OPTIONS") == 0
- || strcmp(prop, "INTERFACE_COMPILE_OPTIONS") == 0 );
-}
+CM_FOR_EACH_TRANSITIVE_PROPERTY(DEFINE_TRANSITIVE_PROPERTY_METHOD)
-//----------------------------------------------------------------------------
-bool cmGeneratorExpressionDAGChecker::EvaluatingAutoUicOptions() const
-{
- const char *prop = this->Property.c_str();
- return (strcmp(prop, "AUTOUIC_OPTIONS") == 0
- || strcmp(prop, "INTERFACE_AUTOUIC_OPTIONS") == 0 );
-}
+#undef DEFINE_TRANSITIVE_PROPERTY_METHOD
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 812e985..1636492 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -16,6 +16,7 @@
#include "cmGeneratorExpressionEvaluator.h"
+#define CM_SELECT_BOTH(F, A1, A2) F(A1, A2)
#define CM_SELECT_FIRST(F, A1, A2) F(A1)
#define CM_SELECT_SECOND(F, A1, A2) F(A2)
@@ -26,6 +27,9 @@
SELECT(F, EvaluatingCompileOptions, COMPILE_OPTIONS) \
SELECT(F, EvaluatingAutoUicOptions, AUTOUIC_OPTIONS)
+#define CM_FOR_EACH_TRANSITIVE_PROPERTY(F) \
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, CM_SELECT_BOTH)
+
#define CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(F) \
CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, CM_SELECT_FIRST)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1db5d3fd4c1cac222fafeae2ed50421b83f6a701
commit 1db5d3fd4c1cac222fafeae2ed50421b83f6a701
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 5 05:13:39 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 6 18:02:54 2014 +0100
Genex: List transitive properties and methods as a table, not two lists.
Introduce a new set of macros to select the column.
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 98ffd36..812e985 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -16,19 +16,21 @@
#include "cmGeneratorExpressionEvaluator.h"
+#define CM_SELECT_FIRST(F, A1, A2) F(A1)
+#define CM_SELECT_SECOND(F, A1, A2) F(A2)
+
+#define CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, SELECT) \
+ SELECT(F, EvaluatingIncludeDirectories, INCLUDE_DIRECTORIES) \
+ SELECT(F, EvaluatingSystemIncludeDirectories, SYSTEM_INCLUDE_DIRECTORIES) \
+ SELECT(F, EvaluatingCompileDefinitions, COMPILE_DEFINITIONS) \
+ SELECT(F, EvaluatingCompileOptions, COMPILE_OPTIONS) \
+ SELECT(F, EvaluatingAutoUicOptions, AUTOUIC_OPTIONS)
+
#define CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(F) \
- F(EvaluatingIncludeDirectories) \
- F(EvaluatingSystemIncludeDirectories) \
- F(EvaluatingCompileDefinitions) \
- F(EvaluatingCompileOptions) \
- F(EvaluatingAutoUicOptions)
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, CM_SELECT_FIRST)
#define CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(F) \
- F(INCLUDE_DIRECTORIES) \
- F(SYSTEM_INCLUDE_DIRECTORIES) \
- F(COMPILE_DEFINITIONS) \
- F(COMPILE_OPTIONS) \
- F(AUTOUIC_OPTIONS)
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, CM_SELECT_SECOND)
//----------------------------------------------------------------------------
struct cmGeneratorExpressionDAGChecker
-----------------------------------------------------------------------
Summary of changes:
Help/manual/cmake-buildsystem.7.rst | 2 +
Help/manual/cmake-packages.7.rst | 26 ++++++++
Help/manual/cmake-toolchains.7.rst | 6 ++-
Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst | 6 +-
Modules/CMakeExpandImportedTargets.cmake | 7 +--
Modules/CMakePrintHelpers.cmake | 13 ++---
Modules/CheckStructHasMember.cmake | 7 +--
Modules/UseJava.cmake | 51 ++++++---------
Modules/UseSWIG.cmake | 6 +-
Source/cmGeneratorExpressionDAGChecker.cxx | 65 +++++++++-----------
Source/cmGeneratorExpressionDAGChecker.h | 32 ++++++----
Source/cmGeneratorExpressionEvaluator.cxx | 16 +++---
Tests/GeneratorExpression/CMakeLists.txt | 16 +++--
Tests/GeneratorExpression/check-part3.cmake | 6 +-
Tests/LinkDirectory/CMakeLists.txt | 2 -
Tests/RunCMake/CompatibleInterface/AutoUic.cmake | 5 +-
.../CompatibleInterface/DebugProperties-stderr.txt | 6 ++
.../CompatibleInterface/DebugProperties.cmake | 3 +-
18 files changed, 145 insertions(+), 130 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list