[Cmake-commits] CMake branch, next, updated. v2.8.9-1171-gcb4bff9

Stephen Kelly steveire at gmail.com
Sat Oct 20 08:25:47 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  cb4bff9882ecb7dbd674cc9d97ac5cd42248f0dc (commit)
       via  4bacff7a4c1fa26d7c1fb93471578c8f67c96fdc (commit)
      from  38fa21de726aeab8fc9a0df146a5eea9ff9d04e6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb4bff9882ecb7dbd674cc9d97ac5cd42248f0dc
commit cb4bff9882ecb7dbd674cc9d97ac5cd42248f0dc
Merge: 38fa21d 4bacff7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 20 08:25:39 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 20 08:25:39 2012 -0400

    Merge topic 'generator-expression-bug-fixes' into next
    
    4bacff7 GenEx: Test early determination of AND and OR


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bacff7a4c1fa26d7c1fb93471578c8f67c96fdc
commit 4bacff7a4c1fa26d7c1fb93471578c8f67c96fdc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 20 14:14:20 2012 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 20 14:23:47 2012 +0200

    GenEx: Test early determination of AND and OR
    
    It should be possible for example to do this:
    
     "$<AND:${FOO},$<BOOL:${TGT}>,$<BOOL:$<TARGET_PROPERTY:${TGT},PROP>"
    
    such that it works simliarly to the C code:
    
     if (foo && tgt && tgt->prop())
       {
       }
    
    The example of generator expression code is a little bit contrived as
    it could be written other ways with the same functionality. Nevertheless,
    as these cases already work and are intentional, test for them.

diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 891fa11..581d483 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -14,6 +14,9 @@ add_custom_target(check ALL
     -Dtest_and_1=$<AND:1>
     -Dtest_and_1_0=$<AND:1,0>
     -Dtest_and_1_1=$<AND:1,1>
+    # Ordinarily, the 'invalidcontent' would cause an error, but
+    # the '0' makes the AND abort early.
+    -Dtest_and_0_invalidcontent=$<AND:0,invalidcontent>
     -Dtest_config_0=$<CONFIG:$<CONFIGURATION>x>
     -Dtest_config_1=$<CONFIG:$<CONFIGURATION>>
     -Dtest_not_0=$<NOT:0>
@@ -24,6 +27,7 @@ add_custom_target(check ALL
     -Dtest_or_1=$<OR:1>
     -Dtest_or_1_0=$<OR:1,0>
     -Dtest_or_1_1=$<OR:1,1>
+    -Dtest_or_1_invalidcontent=$<OR:1,invalidcontent>
     -Dtest_bool_notfound=$<BOOL:NOTFOUND>
     -Dtest_bool_foo_notfound=$<BOOL:Foo-NOTFOUND>
     -Dtest_bool_true=$<BOOL:True>
diff --git a/Tests/GeneratorExpression/check.cmake b/Tests/GeneratorExpression/check.cmake
index 8ffa481..88a60ce 100644
--- a/Tests/GeneratorExpression/check.cmake
+++ b/Tests/GeneratorExpression/check.cmake
@@ -15,6 +15,7 @@ check(test_and_0_1 "0")
 check(test_and_1 "1")
 check(test_and_1_0 "0")
 check(test_and_1_1 "1")
+check(test_and_0_invalidcontent "0")
 check(test_config_0 "0")
 check(test_config_1 "1")
 check(test_not_0 "1")
@@ -25,6 +26,7 @@ check(test_or_0_1 "1")
 check(test_or_1 "1")
 check(test_or_1_0 "1")
 check(test_or_1_1 "1")
+check(test_or_1_invalidcontent "1")
 check(test_bool_notfound "0")
 check(test_bool_foo_notfound "0")
 check(test_bool_true "1")
diff --git a/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt
index 36302db..0e48ba4 100644
--- a/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadAND-stderr.txt
@@ -41,4 +41,13 @@ CMake Error at BadAND.cmake:1 \(add_custom_target\):
 
   Parameters to \$<AND> must resolve to either '0' or '1'.
 Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+CMake Error at BadAND.cmake:1 \(add_custom_target\):
+  Error evaluating generator expression:
+
+    \$<AND:1,nothing>
+
+  Parameters to \$<AND> must resolve to either '0' or '1'.
+Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/GeneratorExpression/BadAND.cmake b/Tests/RunCMake/GeneratorExpression/BadAND.cmake
index 265e414..8a7993f 100644
--- a/Tests/RunCMake/GeneratorExpression/BadAND.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadAND.cmake
@@ -4,4 +4,5 @@ add_custom_target(check ALL COMMAND check
   $<AND:,>
   $<AND:01>
   $<AND:nothing>
+  $<AND:1,nothing>
   VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt
index d4ccab7..eb26328 100644
--- a/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadOR-stderr.txt
@@ -41,4 +41,13 @@ CMake Error at BadOR.cmake:1 \(add_custom_target\):
 
   Parameters to \$<OR> must resolve to either '0' or '1'.
 Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+CMake Error at BadOR.cmake:1 \(add_custom_target\):
+  Error evaluating generator expression:
+
+    \$<OR:0,nothing>
+
+  Parameters to \$<OR> must resolve to either '0' or '1'.
+Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/GeneratorExpression/BadOR.cmake b/Tests/RunCMake/GeneratorExpression/BadOR.cmake
index 0813400..c0309da 100644
--- a/Tests/RunCMake/GeneratorExpression/BadOR.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadOR.cmake
@@ -4,4 +4,5 @@ add_custom_target(check ALL COMMAND check
   $<OR:,>
   $<OR:01>
   $<OR:nothing>
+  $<OR:0,nothing>
   VERBATIM)

-----------------------------------------------------------------------

Summary of changes:
 Tests/GeneratorExpression/CMakeLists.txt           |    4 ++++
 Tests/GeneratorExpression/check.cmake              |    2 ++
 .../RunCMake/GeneratorExpression/BadAND-stderr.txt |    9 +++++++++
 Tests/RunCMake/GeneratorExpression/BadAND.cmake    |    1 +
 .../RunCMake/GeneratorExpression/BadOR-stderr.txt  |    9 +++++++++
 Tests/RunCMake/GeneratorExpression/BadOR.cmake     |    1 +
 6 files changed, 26 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list