[Cmake-commits] CMake branch, next, updated. v2.8.10.1-806-g49d5915

Brad King brad.king at kitware.com
Wed Nov 7 09:25:29 EST 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  49d59153a34fe5c9c12e3bbab83b9dc7636540d0 (commit)
       via  d2d43986e7f5013465473a71c393fc3897cecbac (commit)
      from  ce8c0494e411587a45cb92ca9c33aaf2d2e17a51 (commit)

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

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49d59153a34fe5c9c12e3bbab83b9dc7636540d0
commit 49d59153a34fe5c9c12e3bbab83b9dc7636540d0
Merge: ce8c049 d2d4398
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Nov 7 09:25:27 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Nov 7 09:25:27 2012 -0500

    Merge topic 'deprecate-load_command' into next
    
    d2d4398 load_command: Deprecate and document pending removal

diff --cc Tests/RunCMake/CMakeLists.txt
index 8c67625,a484983..360ad78
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@@ -53,8 -52,8 +53,9 @@@ add_RunCMake_test(ObjectLibrary
  add_RunCMake_test(build_command)
  add_RunCMake_test(find_package)
  add_RunCMake_test(include)
 +add_RunCMake_test(include_directories)
  add_RunCMake_test(list)
+ add_RunCMake_test(load_command)
  
  if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]")
    add_RunCMake_test(include_external_msproject)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2d43986e7f5013465473a71c393fc3897cecbac
commit d2d43986e7f5013465473a71c393fc3897cecbac
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 1 08:32:52 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Nov 7 09:24:05 2012 -0500

    load_command: Deprecate and document pending removal
    
    This command works only when building projects using the same
    architecture as the running CMake binary.  Since it was introduced
    CMake has learned macro() and function() to add commands, and the
    execute_process() command to launch advanced external computations.
    
    Add a RunCMake.load_command test to verify the warning appears.

diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index b2acf06..181b922 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -224,6 +224,10 @@ cmLoadedCommand::~cmLoadedCommand()
 bool cmLoadCommandCommand
 ::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
 {
+  this->Makefile->IssueMessage(
+    cmake::AUTHOR_WARNING,
+    "The \"load_command\" command will be removed in CMake 3.0.  "
+    "See command documentation for details.");
   if(args.size() < 1 )
     {
     return true;
diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h
index f0b34ee..bcd1831 100644
--- a/Source/cmLoadCommandCommand.h
+++ b/Source/cmLoadCommandCommand.h
@@ -47,7 +47,7 @@ public:
    */
   virtual const char* GetTerseDocumentation() const
     {
-    return "Load a command into a running CMake.";
+    return "Deprecated.  Use macro() or function() instead.";
     }
 
   /**
@@ -56,6 +56,13 @@ public:
   virtual const char* GetFullDocumentation() const
     {
     return
+      "This command will be removed in CMake 3.0.  "
+      "It works only when the target architecture matches the "
+      "running CMake binary.  "
+      "Use macro() or function() to add commands.  "
+      "Use execute_process() to run advanced computations "
+      "in external processes."
+      "\n"
       "  load_command(COMMAND_NAME <loc1> [loc2 ...])\n"
       "The given locations are searched for a library whose name is "
       "cmCOMMAND_NAME.  If found, it is loaded as a module and the command "
@@ -67,6 +74,12 @@ public:
       "Otherwise the variable will not be set.";
     }
 
+  /** This command is kept for compatibility with older CMake versions. */
+  virtual bool IsDiscouraged() const
+    {
+    return true;
+    }
+
   cmTypeMacro(cmLoadCommandCommand, cmCommand);
 };
 
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 3ea54f1..a484983 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -53,6 +53,7 @@ add_RunCMake_test(build_command)
 add_RunCMake_test(find_package)
 add_RunCMake_test(include)
 add_RunCMake_test(list)
+add_RunCMake_test(load_command)
 
 if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]")
   add_RunCMake_test(include_external_msproject)
diff --git a/Tests/RunCMake/load_command/CMakeLists.txt b/Tests/RunCMake/load_command/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/load_command/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/load_command/LoadCommandDeprecated-stderr.txt b/Tests/RunCMake/load_command/LoadCommandDeprecated-stderr.txt
new file mode 100644
index 0000000..7d374b2
--- /dev/null
+++ b/Tests/RunCMake/load_command/LoadCommandDeprecated-stderr.txt
@@ -0,0 +1,6 @@
+CMake Warning \(dev\) at LoadCommandDeprecated.cmake:1 \(load_command\):
+  The "load_command" command will be removed in CMake 3.0.  See command
+  documentation for details.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
+This warning is for project developers.  Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/load_command/LoadCommandDeprecated.cmake b/Tests/RunCMake/load_command/LoadCommandDeprecated.cmake
new file mode 100644
index 0000000..9e9b1f4
--- /dev/null
+++ b/Tests/RunCMake/load_command/LoadCommandDeprecated.cmake
@@ -0,0 +1 @@
+load_command()
diff --git a/Tests/RunCMake/load_command/RunCMakeTest.cmake b/Tests/RunCMake/load_command/RunCMakeTest.cmake
new file mode 100644
index 0000000..9a0f98d
--- /dev/null
+++ b/Tests/RunCMake/load_command/RunCMakeTest.cmake
@@ -0,0 +1,3 @@
+include(RunCMake)
+
+run_cmake(LoadCommandDeprecated)

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

Summary of changes:
 Source/cmLoadCommandCommand.cxx                    |    4 ++++
 Source/cmLoadCommandCommand.h                      |   15 ++++++++++++++-
 Tests/RunCMake/CMakeLists.txt                      |    1 +
 .../CMakeLists.txt                                 |    0
 .../load_command/LoadCommandDeprecated-stderr.txt  |    6 ++++++
 .../load_command/LoadCommandDeprecated.cmake       |    1 +
 Tests/RunCMake/load_command/RunCMakeTest.cmake     |    3 +++
 7 files changed, 29 insertions(+), 1 deletions(-)
 copy Tests/RunCMake/{GeneratorExpression => load_command}/CMakeLists.txt (100%)
 create mode 100644 Tests/RunCMake/load_command/LoadCommandDeprecated-stderr.txt
 create mode 100644 Tests/RunCMake/load_command/LoadCommandDeprecated.cmake
 create mode 100644 Tests/RunCMake/load_command/RunCMakeTest.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list