Hi there,

  CMake 2.8.7 recently added a new behavior when reading export files:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2be068c

  I perfectly understand the goal here, I think this is a great user
functionality. However this breaks the old behavior of cmake being
tolerant with missing files. This is particularly difficult to handle
for large package such as VTK. Currently in debian we split the VTK
package into sub-packages:
 * C++ dev,
 * Qt dev,
 * TCL,
 * Java and
 * Python bindings.
  Since there is a single export file, we are now forced to install
all those sub-packages while in the past we could bypass any cmake
internals checks and only install -say- C++-dev package.

  Would it make sense to conditionally remove this automatic check ?
Something like:

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index c4f5dfb..6eaf4d5 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -384,7 +384,7 @@
cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream& os)
   os << "# Loop over all imported files and verify that they actually exist\n"
         "FOREACH(target ${_IMPORT_CHECK_TARGETS} )\n"
         "  FOREACH(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n"
-        "    IF(NOT EXISTS \"${file}\" )\n"
+        "    IF(NOT CMAKE_SKIP_IMPORT_CHECK_FILES AND NOT EXISTS
\"${file}\" )\n"
         "      MESSAGE(FATAL_ERROR \"The imported target \\\"${target}\\\""
         " references the file\n"
         "   \\\"${file}\\\"\n"

Thanks for comments,

-- 
Mathieu
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to