[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4368-g92e0db0

Brad King brad.king at kitware.com
Mon Sep 30 15:02:09 EDT 2013


This is an automated email from 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  92e0db00464f447dbab81d2cf94fec16ba8dcbd8 (commit)
       via  3e888cacac372295a5bbd00eee9e68d8a3226101 (commit)
      from  d821938693a7bd425a810712c56a719e95aba71c (commit)

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

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92e0db00464f447dbab81d2cf94fec16ba8dcbd8
commit 92e0db00464f447dbab81d2cf94fec16ba8dcbd8
Merge: d821938 3e888ca
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 30 15:02:05 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 30 15:02:05 2013 -0400

    Merge topic 'fix-duplicate-custom-commands' into next
    
    3e888ca Do not warn on multiple custom commands for the same output (#14446)

diff --cc Tests/RunCMake/CMakeLists.txt
index e8001aa,1b9c17b..7fc3203
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@@ -85,9 -85,7 +85,8 @@@ if(NOT WIN32
    endif()
  endif()
  add_RunCMake_test(CompatibleInterface)
 +add_RunCMake_test(Syntax)
  
- add_RunCMake_test(add_custom_command)
  add_RunCMake_test(add_dependencies)
  add_RunCMake_test(build_command)
  add_RunCMake_test(find_package)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e888cacac372295a5bbd00eee9e68d8a3226101
commit 3e888cacac372295a5bbd00eee9e68d8a3226101
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 30 14:57:11 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 30 14:57:11 2013 -0400

    Do not warn on multiple custom commands for the same output (#14446)
    
    The VS 8 generator triggers the warning, and it is possible there are
    valid use cases with different rules to generate the same output going
    into different targets with different MAIN_DEPENDENCY options.  Leave
    a TODO comment for warning in the future.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 292bc86..848b1f1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1036,13 +1036,14 @@ cmMakefile::UpdateOutputToSourceMap(std::string const& output,
   OutputToSourceMap::iterator i = this->OutputToSource.find(output);
   if(i != this->OutputToSource.end())
     {
-    cmOStringStream m;
-    m <<
-      "Attempt to add a custom command to generate\n"
-      "  " << output << "\n"
-      "but source file \"" << i->second->GetLocation().GetName() <<
-      "\" already has a custom command to generate it.";
-    this->IssueMessage(cmake::AUTHOR_WARNING, m.str());
+    // Multiple custom commands produce the same output but may
+    // be attached to a different source file (MAIN_DEPENDENCY).
+    // LinearGetSourceFileWithOutput would return the first one,
+    // so keep the mapping for the first one.
+    //
+    // TODO: Warn the user about this case.  However, the VS 8 generator
+    // triggers it for separate generate.stamp rules in ZERO_CHECK and
+    // individual targets.
     return;
     }
   this->OutputToSource[output] = source;
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index e2b1cec..1b9c17b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -86,7 +86,6 @@ if(NOT WIN32)
 endif()
 add_RunCMake_test(CompatibleInterface)
 
-add_RunCMake_test(add_custom_command)
 add_RunCMake_test(add_dependencies)
 add_RunCMake_test(build_command)
 add_RunCMake_test(find_package)
diff --git a/Tests/RunCMake/add_custom_command/CMakeLists.txt b/Tests/RunCMake/add_custom_command/CMakeLists.txt
deleted file mode 100644
index e8db6b0..0000000
--- a/Tests/RunCMake/add_custom_command/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_custom_command/DuplicateOutput-stderr.txt b/Tests/RunCMake/add_custom_command/DuplicateOutput-stderr.txt
deleted file mode 100644
index 6ee49ec..0000000
--- a/Tests/RunCMake/add_custom_command/DuplicateOutput-stderr.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-CMake Warning \(dev\) at DuplicateOutput.cmake:6 \(add_custom_command\):
-  Attempt to add a custom command to generate
-
-    .*/Tests/RunCMake/add_custom_command/DuplicateOutput-build/out.h
-
-  but source file "out.h.in" already has a custom command to generate it.
-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/add_custom_command/DuplicateOutput.cmake b/Tests/RunCMake/add_custom_command/DuplicateOutput.cmake
deleted file mode 100644
index 7adc97c..0000000
--- a/Tests/RunCMake/add_custom_command/DuplicateOutput.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-add_custom_command(
-  OUTPUT out.h
-  COMMAND echo
-  MAIN_DEPENDENCY out.h.in
-  )
-add_custom_command(
-  OUTPUT out.h
-  COMMAND echo
-  )
diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
deleted file mode 100644
index 68a281d..0000000
--- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-include(RunCMake)
-
-run_cmake(DuplicateOutput)
diff --git a/Tests/RunCMake/add_custom_command/out.h.in b/Tests/RunCMake/add_custom_command/out.h.in
deleted file mode 100644
index e69de29..0000000

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

Summary of changes:
 Source/cmMakefile.cxx                              |   15 ++++++++-------
 Tests/RunCMake/CMakeLists.txt                      |    1 -
 Tests/RunCMake/add_custom_command/CMakeLists.txt   |    3 ---
 .../add_custom_command/DuplicateOutput-stderr.txt  |    9 ---------
 .../add_custom_command/DuplicateOutput.cmake       |    9 ---------
 .../RunCMake/add_custom_command/RunCMakeTest.cmake |    3 ---
 6 files changed, 8 insertions(+), 32 deletions(-)
 delete mode 100644 Tests/RunCMake/add_custom_command/CMakeLists.txt
 delete mode 100644 Tests/RunCMake/add_custom_command/DuplicateOutput-stderr.txt
 delete mode 100644 Tests/RunCMake/add_custom_command/DuplicateOutput.cmake
 delete mode 100644 Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
 delete mode 100644 Tests/RunCMake/add_custom_command/out.h.in


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list