[Cmake-commits] CMake branch, next, updated. v3.6.0-rc1-101-g15ecac9
Brad King
brad.king at kitware.com
Tue Jun 7 09:09:20 EDT 2016
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 15ecac966da9656101847cf8cc213e0ff2fa3691 (commit)
via 188baef00c3b19c6ee6ed8c3735817bae50f110e (commit)
from f6ae3ecd3763d255c91f3831ecaabd9f8d86eef9 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15ecac966da9656101847cf8cc213e0ff2fa3691
commit 15ecac966da9656101847cf8cc213e0ff2fa3691
Merge: f6ae3ec 188baef
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jun 7 09:09:19 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 7 09:09:19 2016 -0400
Merge topic 'find_path-in-framework' into next
188baef0 find_path: Fix location of <dir/header.h> in a framework on OS X
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=188baef00c3b19c6ee6ed8c3735817bae50f110e
commit 188baef00c3b19c6ee6ed8c3735817bae50f110e
Author: Harry Mallon <harry at codexdigital.com>
AuthorDate: Wed May 25 18:18:47 2016 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Jun 7 09:04:35 2016 -0400
find_path: Fix location of <dir/header.h> in a framework on OS X
After finding it in `foo.Framework/Headers/dir/header.h`, we should
report the `foo.Framework/Headers` directory, not
`foo.Framework/Headers/dir`, because the former is what actually
contains the path the caller wishes to include.
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index d24be6a..d71fc1a 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -117,7 +117,7 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string const& file,
if (this->IncludeFileInPath) {
return fheader;
}
- fheader = cmSystemTools::GetFilenamePath(fheader);
+ fheader.resize(fheader.size() - file.size());
return fheader;
}
return "";
diff --git a/Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir/Header.h b/Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir/Header.h
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt b/Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt
new file mode 100644
index 0000000..001a3e9
--- /dev/null
+++ b/Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt
@@ -0,0 +1 @@
+-- SOME_INCLUDE_DIR='[^']*Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers'
diff --git a/Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake b/Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake
new file mode 100644
index 0000000..b286021
--- /dev/null
+++ b/Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake
@@ -0,0 +1,3 @@
+set(CMAKE_FRAMEWORK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Frameworks")
+find_path(SOME_INCLUDE_DIR "Some/Dir/Header.h")
+message(STATUS "SOME_INCLUDE_DIR='${SOME_INCLUDE_DIR}'")
diff --git a/Tests/RunCMake/find_path/RunCMakeTest.cmake b/Tests/RunCMake/find_path/RunCMakeTest.cmake
index 5ce96e0..bf0fa89 100644
--- a/Tests/RunCMake/find_path/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_path/RunCMakeTest.cmake
@@ -3,3 +3,7 @@ include(RunCMake)
if(WIN32 OR CYGWIN)
run_cmake(PrefixInPATH)
endif()
+
+if(APPLE)
+ run_cmake(FrameworksWithSubdirs)
+endif()
-----------------------------------------------------------------------
Summary of changes:
Source/cmFindPathCommand.cxx | 2 +-
.../find_path/Frameworks/Foo.framework/Headers/Some/Dir}/Header.h | 0
Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt | 1 +
Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake | 3 +++
Tests/RunCMake/find_path/RunCMakeTest.cmake | 4 ++++
5 files changed, 9 insertions(+), 1 deletion(-)
copy Tests/{VSWindowsFormsResx/WindowsFormsResx => RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir}/Header.h (100%)
create mode 100644 Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt
create mode 100644 Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list