summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindZLIB.cmake2
-rw-r--r--Source/cmArchiveWrite.cxx3
-rw-r--r--Source/cmFindPackageCommand.cxx37
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt2
-rw-r--r--Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake3
6 files changed, 32 insertions, 17 deletions
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 2062a7e..77f9fda 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -67,7 +67,7 @@ ENDIF()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_INCLUDE_DIR ZLIB_LIBRARY
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
VERSION_VAR ZLIB_VERSION_STRING)
IF(ZLIB_FOUND)
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index d9e4742..25dc8ba 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -236,6 +236,9 @@ bool cmArchiveWrite::AddFile(const char* file,
this->Error += archive_error_string(this->Disk);
return false;
}
+ // Clear acl and xattr fields not useful for distribution.
+ archive_entry_acl_clear(e);
+ archive_entry_xattr_clear(e);
if(archive_write_header(this->Archive, e) != ARCHIVE_OK)
{
this->Error = "archive_write_header: ";
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index fdc1a01..d3c4bc7 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -101,9 +101,10 @@ void cmFindPackageCommand::GenerateDocumentation()
"The [version] argument requests a version with which the package found "
"should be compatible (format is major[.minor[.patch[.tweak]]]). "
"The EXACT option requests that the version be matched exactly. "
- "If no [version] is given to a recursive invocation inside a "
- "find-module, the [version] and EXACT arguments are forwarded "
- "automatically from the outer call. "
+ "If no [version] and/or component list is given to a recursive "
+ "invocation inside a find-module, the corresponding arguments "
+ "are forwarded automatically from the outer call (including the "
+ "EXACT flag for [version]). "
"Version support is currently provided only on a package-by-package "
"basis (details below).\n"
"User code should generally look for packages using the above simple "
@@ -524,7 +525,7 @@ bool cmFindPackageCommand
cmake::AUTHOR_WARNING, "Ignoring EXACT since no version is requested.");
}
- if(this->Version.empty())
+ if(this->Version.empty() || components.empty())
{
// Check whether we are recursing inside "Find<name>.cmake" within
// another find_package(<name>) call.
@@ -532,16 +533,24 @@ bool cmFindPackageCommand
mod += "_FIND_MODULE";
if(this->Makefile->IsOn(mod.c_str()))
{
- // Get version information from the outer call if necessary.
- // Requested version string.
- std::string ver = this->Name;
- ver += "_FIND_VERSION";
- this->Version = this->Makefile->GetSafeDefinition(ver.c_str());
-
- // Whether an exact version is required.
- std::string exact = this->Name;
- exact += "_FIND_VERSION_EXACT";
- this->VersionExact = this->Makefile->IsOn(exact.c_str());
+ if(this->Version.empty())
+ {
+ // Get version information from the outer call if necessary.
+ // Requested version string.
+ std::string ver = this->Name;
+ ver += "_FIND_VERSION";
+ this->Version = this->Makefile->GetSafeDefinition(ver.c_str());
+
+ // Whether an exact version is required.
+ std::string exact = this->Name;
+ exact += "_FIND_VERSION_EXACT";
+ this->VersionExact = this->Makefile->IsOn(exact.c_str());
+ }
+ if(components.empty())
+ {
+ std::string components_var = this->Name + "_FIND_COMPONENTS";
+ components = this->Makefile->GetSafeDefinition(components_var.c_str());
+ }
}
}
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 83d2c28..cae4bbd 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011)
SET(KWSYS_DATE_STAMP_MONTH 04)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 07)
+SET(KWSYS_DATE_STAMP_DAY 12)
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index f420f4b..d4984d7 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -105,7 +105,7 @@ FIND_PACKAGE(wibbleA NAMES wibble PATHS B)
FIND_PACKAGE(wibbleB NAMES wibble HINTS B)
# Look for package with recursive find-modules.
-FIND_PACKAGE(RecursiveA)
+FIND_PACKAGE(RecursiveA COMPONENTS A)
FIND_PACKAGE(RecursiveB 2)
FIND_PACKAGE(RecursiveC 3.1 EXACT)
diff --git a/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake b/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake
index deffa57..eff4d4f 100644
--- a/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake
+++ b/Tests/FindPackageTest/lib/RecursiveA/recursivea-config.cmake
@@ -1 +1,4 @@
# Test config file.
+if(NOT "${RecursiveA_FIND_COMPONENTS}" STREQUAL "A")
+ message(FATAL_ERROR "find_package(RecursiveA NO_MODULE) did not forward components")
+endif()