You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/09/03 12:51:38 UTC
[16/42] mesos git commit: CMake: Added workaround for imported
library include directory bug.
CMake: Added workaround for imported library include directory bug.
The include directory for imported libraries must exist, otherwise
CMake will error out. This is internally inconsistent with
`include_directories()`, which does not require directories given
to the function to exist.
Review: https://reviews.apache.org/r/61302/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5c52e467
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5c52e467
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5c52e467
Branch: refs/heads/master
Commit: 5c52e467a905450d20bf4990ede1d39a145f8d95
Parents: 0be3415
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Thu Aug 17 12:20:05 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Sun Sep 3 05:51:06 2017 -0700
----------------------------------------------------------------------
3rdparty/CMakeLists.txt | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5c52e467/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index e27d20d..26ccb70 100755
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -182,6 +182,15 @@ endif ()
# Third-party libraries. Tell the build system how to pull in and build third-
# party libraries at compile time, using the ExternalProject_Add macro.
##############################################################################
+
+# This function works around a CMake issue with setting include directories of
+# imported libraries built with `ExternalProject_Add`.
+# https://gitlab.kitware.com/cmake/cmake/issues/15052
+function(MAKE_INCLUDE_DIR TARGET)
+ get_target_property(DIR ${TARGET} INTERFACE_INCLUDE_DIRECTORIES)
+ file(MAKE_DIRECTORY ${DIR})
+endfunction()
+
ExternalProject_Add(
${BOOST_TARGET}
PREFIX ${BOOST_CMAKE_ROOT}