[Cmake-commits] CMake branch, next, updated. v3.1.1-2258-g1cb31f7

Brad King brad.king at kitware.com
Thu Jan 22 19:33:20 EST 2015


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

The branch, next has been updated
       via  1cb31f76cf50ca5c734fa86483d8bfdbf984b647 (commit)
       via  40b69ceab5e3d0eb6dcbd48837af6213290609f5 (commit)
      from  73637b85b622bda8d327a19be52e4ba0947f5cc6 (commit)

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

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1cb31f76cf50ca5c734fa86483d8bfdbf984b647
commit 1cb31f76cf50ca5c734fa86483d8bfdbf984b647
Merge: 73637b8 40b69ce
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 22 19:33:13 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 22 19:33:13 2015 -0500

    Merge topic 'if-test' into next
    
    40b69cea Revert topic 'if-test'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40b69ceab5e3d0eb6dcbd48837af6213290609f5
commit 40b69ceab5e3d0eb6dcbd48837af6213290609f5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 22 19:32:17 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 22 19:32:28 2015 -0500

    Revert topic 'if-test'
    
    Making TEST a keyword in if() can break existing code that expects
    it to act like a string or variable.

diff --git a/Help/command/if.rst b/Help/command/if.rst
index 93ff6d3..79e5d21 100644
--- a/Help/command/if.rst
+++ b/Help/command/if.rst
@@ -70,10 +70,6 @@ Possible expressions are:
  created by the :command:`add_executable`, :command:`add_library`, or
  :command:`add_custom_target` commands.
 
-``if(TEST test-name)``
- True if the given name is an existing test name created by the
- :command:`add_test` command.
-
 ``if(EXISTS path-to-file-or-directory)``
  True if the named file or directory exists.  Behavior is well-defined
  only for full paths.
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 29a71c7..aba26de 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -507,14 +507,6 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList &newArgs,
           this->Makefile.FindTargetToUse(argP1->GetValue())?true:false,
           reducible, arg, newArgs, argP1, argP2);
         }
-      // does a test exist
-      if (this->IsKeyword("TEST", *arg) && argP1 != newArgs.end())
-        {
-        const cmTest* haveTest = this->Makefile.GetTest(argP1->c_str());
-        this->HandlePredicate(
-          haveTest?true:false,
-          reducible, arg, newArgs, argP1, argP2);
-        }
       // is a variable defined
       if (this->IsKeyword("DEFINED", *arg) && argP1  != newArgs.end())
         {
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index bbd5878..bf23d4a 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -21,7 +21,7 @@ if(TARGET NotATarget)
   message(FATAL_ERROR "if(TARGET NotATarget) returned true!")
 endif()
 
-# Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to
+  # Use LINK_LIBRARIES instead of TARGET_LINK_LIBRARIES to
 set(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
 link_libraries(${COMPLEX_LIBS})
 
diff --git a/Tests/RunCMake/if/RunCMakeTest.cmake b/Tests/RunCMake/if/RunCMakeTest.cmake
index 9db79e9..6b6b74b 100644
--- a/Tests/RunCMake/if/RunCMakeTest.cmake
+++ b/Tests/RunCMake/if/RunCMakeTest.cmake
@@ -2,6 +2,3 @@ include(RunCMake)
 
 run_cmake(IsDirectory)
 run_cmake(IsDirectoryLong)
-
-run_cmake(TestNameThatExists)
-run_cmake(TestNameThatDoesNotExist)
diff --git a/Tests/RunCMake/if/TestNameThatDoesNotExist-stdout.txt b/Tests/RunCMake/if/TestNameThatDoesNotExist-stdout.txt
deleted file mode 100644
index 8874ca8..0000000
--- a/Tests/RunCMake/if/TestNameThatDoesNotExist-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestThatDoesNotExist is false
diff --git a/Tests/RunCMake/if/TestNameThatDoesNotExist.cmake b/Tests/RunCMake/if/TestNameThatDoesNotExist.cmake
deleted file mode 100644
index 68ad6e3..0000000
--- a/Tests/RunCMake/if/TestNameThatDoesNotExist.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-if(TEST TestThatDoesNotExist)
-  message(FATAL_ERROR "if TestThatDoesNotExist is true")
-else()
-  message(STATUS "if TestThatDoesNotExist is false")
-endif()
diff --git a/Tests/RunCMake/if/TestNameThatExists-stdout.txt b/Tests/RunCMake/if/TestNameThatExists-stdout.txt
deleted file mode 100644
index 54911bc..0000000
--- a/Tests/RunCMake/if/TestNameThatExists-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestThatExists is true
diff --git a/Tests/RunCMake/if/TestNameThatExists.cmake b/Tests/RunCMake/if/TestNameThatExists.cmake
deleted file mode 100644
index e03e148..0000000
--- a/Tests/RunCMake/if/TestNameThatExists.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-add_test(NAME TestThatExists COMMAND ${CMAKE_COMMAND} -E echo "A CMake Test")
-if(TEST TestThatExists)
-  message(STATUS "if TestThatExists is true")
-else()
-  message(FATAL_ERROR "if TestThatExists is false")
-endif()

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

Summary of changes:
 Help/command/if.rst                                   |    4 ----
 Source/cmConditionEvaluator.cxx                       |    8 --------
 Tests/Complex/Executable/CMakeLists.txt               |    2 +-
 Tests/RunCMake/if/RunCMakeTest.cmake                  |    3 ---
 Tests/RunCMake/if/TestNameThatDoesNotExist-stdout.txt |    1 -
 Tests/RunCMake/if/TestNameThatDoesNotExist.cmake      |    5 -----
 Tests/RunCMake/if/TestNameThatExists-stdout.txt       |    1 -
 Tests/RunCMake/if/TestNameThatExists.cmake            |    6 ------
 8 files changed, 1 insertion(+), 29 deletions(-)
 delete mode 100644 Tests/RunCMake/if/TestNameThatDoesNotExist-stdout.txt
 delete mode 100644 Tests/RunCMake/if/TestNameThatDoesNotExist.cmake
 delete mode 100644 Tests/RunCMake/if/TestNameThatExists-stdout.txt
 delete mode 100644 Tests/RunCMake/if/TestNameThatExists.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list