Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
de137a25
Commit
de137a25
authored
Apr 21, 2015
by
Milo Yip
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #312 from jollyroger/find_gtest
Introduce option to select default gtest installation
parents
8d39282a
04b67368
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
CMakeLists.txt
CMakeLists.txt
+2
-0
FindGTestSrc.cmake
CMakeModules/FindGTestSrc.cmake
+7
-1
No files found.
CMakeLists.txt
View file @
de137a25
...
...
@@ -17,6 +17,8 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
option
(
RAPIDJSON_BUILD_DOC
"Build rapidjson documentation."
ON
)
option
(
RAPIDJSON_BUILD_EXAMPLES
"Build rapidjson examples."
ON
)
option
(
RAPIDJSON_BUILD_TESTS
"Build rapidjson perftests and unittests."
ON
)
option
(
RAPIDJSON_BUILD_THIRDPARTY_GTEST
"Use gtest installation in `thirdparty/gtest` by default if available"
OFF
)
option
(
RAPIDJSON_HAS_STDSTRING
""
OFF
)
if
(
RAPIDJSON_HAS_STDSTRING
)
...
...
CMakeModules/FindGTestSrc.cmake
View file @
de137a25
SET
(
GTEST_SEARCH_PATH
"
${
GTEST_SOURCE_DIR
}
"
"
${
CMAKE_SOURCE_DIR
}
/thirdparty/gtest"
)
IF
(
UNIX
)
LIST
(
INSERT GTEST_SEARCH_PATH 1
"/usr/src/gtest"
)
IF
(
RAPIDJSON_BUILD_THIRDPARTY_GTEST
)
LIST
(
APPEND GTEST_SEARCH_PATH
"/usr/src/gtest"
)
ELSE
()
LIST
(
INSERT GTEST_SEARCH_PATH 1
"/usr/src/gtest"
)
ENDIF
()
ENDIF
()
FIND_PATH
(
GTEST_SOURCE_DIR
...
...
@@ -15,6 +20,7 @@ FIND_PATH(GTEST_SOURCE_DIR
FIND_PATH
(
GTEST_INCLUDE_DIR
NAMES gtest/gtest.h
PATH_SUFFIXES include
HINTS
${
GTEST_SOURCE_DIR
}
PATHS
${
GTEST_SEARCH_PATH
}
)
INCLUDE
(
FindPackageHandleStandardArgs
)
...
...
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