Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
0162ff72
Commit
0162ff72
authored
Dec 10, 2015
by
Billy Donahue
Browse files
Merge pull request #657 from audiofanatic/issue655-targetHeaderDeps
Add include dirs to targets if CMake version supports it
parents
c1cd9c2b
f601ee16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
googlemock/CMakeLists.txt
googlemock/CMakeLists.txt
+8
-0
googletest/CMakeLists.txt
googletest/CMakeLists.txt
+8
-0
No files found.
googlemock/CMakeLists.txt
View file @
0162ff72
...
...
@@ -92,6 +92,14 @@ cxx_library(gmock_main
src/gmock-all.cc
src/gmock_main.cc
)
# If the CMake version supports it, attach header directory information
# to the targets for when we are part of a parent build (ie being pulled
# in via add_subdirectory() rather than being a standalone build).
if
(
DEFINED CMAKE_VERSION AND NOT
"
${
CMAKE_VERSION
}
"
VERSION_LESS
"2.8.11"
)
target_include_directories
(
gmock INTERFACE
"
${
gmock_SOURCE_DIR
}
/include"
)
target_include_directories
(
gmock_main INTERFACE
"
${
gmock_SOURCE_DIR
}
/include"
)
endif
()
########################################################################
#
# Install rules
...
...
googletest/CMakeLists.txt
View file @
0162ff72
...
...
@@ -91,6 +91,14 @@ cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
cxx_library
(
gtest_main
"
${
cxx_strict
}
"
src/gtest_main.cc
)
target_link_libraries
(
gtest_main gtest
)
# If the CMake version supports it, attach header directory information
# to the targets for when we are part of a parent build (ie being pulled
# in via add_subdirectory() rather than being a standalone build).
if
(
DEFINED CMAKE_VERSION AND NOT
"
${
CMAKE_VERSION
}
"
VERSION_LESS
"2.8.11"
)
target_include_directories
(
gtest INTERFACE
"
${
gtest_SOURCE_DIR
}
/include"
)
target_include_directories
(
gtest_main INTERFACE
"
${
gtest_SOURCE_DIR
}
/include"
)
endif
()
########################################################################
#
# Install rules
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment