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  3e40be7854187a1d81deaf4723ef3d6c8fa8d210 (commit)
       via  da1d9bac63d486d430b0c61ee8d3928f8d09ab26 (commit)
       via  b96f6fc2aabed8a77cd45c0f87af7abb6a687576 (commit)
      from  a7423f9d55fb0f40318096d3b106d5bcad161115 (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=3e40be7854187a1d81deaf4723ef3d6c8fa8d210
commit 3e40be7854187a1d81deaf4723ef3d6c8fa8d210
Merge: a7423f9 da1d9ba
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Nov 27 08:46:39 2012 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Nov 27 08:46:39 2012 -0500

    Merge topic 'multiarch-include' into next
    
    da1d9ba Test find_path multiarch support (#13742)
    b96f6fc Teach find_(path|file) about Linux multiarch (#13742)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da1d9bac63d486d430b0c61ee8d3928f8d09ab26
commit da1d9bac63d486d430b0c61ee8d3928f8d09ab26
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 26 17:01:43 2012 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Nov 26 17:06:12 2012 -0500

    Test find_path multiarch support (#13742)

diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt
index 1b4ebc4..be7ddbc 100644
--- a/Tests/CMakeOnly/CMakeLists.txt
+++ b/Tests/CMakeOnly/CMakeLists.txt
@@ -32,6 +32,7 @@ add_CMakeOnly_test(SelectLibraryConfigurations)
 add_CMakeOnly_test(TargetScope)
 
 add_CMakeOnly_test(find_library)
+add_CMakeOnly_test(find_path)
 
 add_test(CMakeOnly.ProjectInclude ${CMAKE_CMAKE_COMMAND}
   -DTEST=ProjectInclude
diff --git a/Tests/CMakeOnly/find_path/CMakeLists.txt 
b/Tests/CMakeOnly/find_path/CMakeLists.txt
new file mode 100644
index 0000000..0e64ed4
--- /dev/null
+++ b/Tests/CMakeOnly/find_path/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 2.8)
+project(FindPathTest NONE)
+
+set(CMAKE_FIND_DEBUG_MODE 1)
+
+macro(test_find_path expected)
+  unset(HDR CACHE)
+  find_path(HDR ${ARGN}
+    NO_CMAKE_ENVIRONMENT_PATH
+    NO_SYSTEM_ENVIRONMENT_PATH
+    )
+  if(HDR)
+    # Convert to relative path for comparison to expected location.
+    file(RELATIVE_PATH REL_HDR "${CMAKE_CURRENT_SOURCE_DIR}" "${HDR}")
+
+    # Check and report failure.
+    if(NOT "${REL_HDR}" STREQUAL "${expected}")
+      message(SEND_ERROR "Header ${expected} found as [${REL_HDR}]")
+    elseif(CMAKE_FIND_DEBUG_MODE)
+      message(STATUS "Header ${expected} found as [${REL_HDR}]")
+    endif()
+  else()
+    message(SEND_ERROR "Header ${expected} NOT FOUND")
+  endif()
+endmacro()
+
+set(CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+set(CMAKE_LIBRARY_ARCHITECTURE arch)
+
+test_find_path(include NAMES test1.h)
+test_find_path(include/arch NAMES test1arch.h)
diff --git a/Tests/CMakeOnly/find_path/include/arch/test1arch.h 
b/Tests/CMakeOnly/find_path/include/arch/test1arch.h
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/CMakeOnly/find_path/include/test1.h 
b/Tests/CMakeOnly/find_path/include/test1.h
new file mode 100644
index 0000000..e69de29

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b96f6fc2aabed8a77cd45c0f87af7abb6a687576
commit b96f6fc2aabed8a77cd45c0f87af7abb6a687576
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Nov 26 16:44:56 2012 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Nov 26 16:46:04 2012 -0500

    Teach find_(path|file) about Linux multiarch (#13742)
    
    Implement support for multiarch include directories as specified here:
    
      https://wiki.ubuntu.com/MultiarchCross
    
    Generalize the multiarch feature added in commit b41ad3b3 (Teach
    find_(library|package) about Linux multiarch, 2011-06-08) to the
    find_path and find_file commands.  Teach them to search
    <prefix>/include/<arch> whenever they would search <prefix>/include.

diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 1de3982..7ce0032 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -360,13 +360,13 @@ void cmFindBase::AddPrefixPaths(std::vector<std::string> 
const& in_paths,
       {
       dir += "/";
       }
-    if(subdir == "lib")
+    if(subdir == "include" || subdir == "lib")
       {
       const char* arch =
         this->Makefile->GetDefinition("CMAKE_LIBRARY_ARCHITECTURE");
       if(arch && *arch)
         {
-        this->AddPathInternal(dir+"lib/"+arch, pathType);
+        this->AddPathInternal(dir+subdir+"/"+arch, pathType);
         }
       }
     std::string add = dir + subdir;
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index 9524924..6a43298 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -45,8 +45,10 @@ void cmFindPathCommand::GenerateDocumentation()
                                "SEARCH_XXX", "file in a directory");
   cmSystemTools::ReplaceString(this->GenericDocumentation,
                                "XXX_SUBDIR", "include");
-  cmSystemTools::ReplaceString(this->GenericDocumentation,
-                               "XXX_EXTRA_PREFIX_ENTRY", "");
+  cmSystemTools::ReplaceString(
+    this->GenericDocumentation,
+    "XXX_EXTRA_PREFIX_ENTRY",
+    "   <prefix>/include/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and\n");
   cmSystemTools::ReplaceString(this->GenericDocumentation,
                                "CMAKE_FIND_ROOT_PATH_MODE_XXX",
                                "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE");

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

Summary of changes:
 Source/cmFindBase.cxx                              |    4 +-
 Source/cmFindPathCommand.cxx                       |    6 ++-
 Tests/CMakeOnly/CMakeLists.txt                     |    1 +
 Tests/CMakeOnly/find_path/CMakeLists.txt           |   31 ++++++++++++++++++++
 .../CMakeOnly/find_path/include/arch/test1arch.h   |    0
 .../CMakeOnly/find_path/include/test1.h            |    0
 6 files changed, 38 insertions(+), 4 deletions(-)
 create mode 100644 Tests/CMakeOnly/find_path/CMakeLists.txt
 copy Modules/IntelVSImplicitPath/hello.f => 
Tests/CMakeOnly/find_path/include/arch/test1arch.h (100%)
 copy Modules/IntelVSImplicitPath/hello.f => 
Tests/CMakeOnly/find_path/include/test1.h (100%)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to