Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
c4563182
Unverified
Commit
c4563182
authored
Oct 24, 2018
by
Jeff VanDyke
Committed by
GitHub
Oct 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change CMake googletest download location in docs
Change CMAKE_BINARY_DIR to CMAKE_CURRENT_BINARY_DIR Able to use in a subfolder's CMakeLists.txt
parent
6463ee81
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
README.md
googletest/README.md
+6
-6
No files found.
googletest/README.md
View file @
c4563182
...
@@ -124,8 +124,8 @@ include(ExternalProject)
...
@@ -124,8 +124,8 @@ include(ExternalProject)
ExternalProject_Add
(
googletest
ExternalProject_Add
(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
GIT_TAG master
SOURCE_DIR
"
${
CMAKE_BINARY_DIR
}
/googletest-src"
SOURCE_DIR
"
${
CMAKE_
CURRENT_
BINARY_DIR
}
/googletest-src"
BINARY_DIR
"
${
CMAKE_BINARY_DIR
}
/googletest-build"
BINARY_DIR
"
${
CMAKE_
CURRENT_
BINARY_DIR
}
/googletest-build"
CONFIGURE_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
""
INSTALL_COMMAND
""
...
@@ -140,13 +140,13 @@ Existing build's `CMakeLists.txt`:
...
@@ -140,13 +140,13 @@ Existing build's `CMakeLists.txt`:
configure_file
(
CMakeLists.txt.in googletest-download/CMakeLists.txt
)
configure_file
(
CMakeLists.txt.in googletest-download/CMakeLists.txt
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-G
"
${
CMAKE_GENERATOR
}
"
.
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-G
"
${
CMAKE_GENERATOR
}
"
.
RESULT_VARIABLE result
RESULT_VARIABLE result
WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
/googletest-download
)
WORKING_DIRECTORY
${
CMAKE_
CURRENT_
BINARY_DIR
}
/googletest-download
)
if
(
result
)
if
(
result
)
message
(
FATAL_ERROR
"CMake step for googletest failed:
${
result
}
"
)
message
(
FATAL_ERROR
"CMake step for googletest failed:
${
result
}
"
)
endif
()
endif
()
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
--build .
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
--build .
RESULT_VARIABLE result
RESULT_VARIABLE result
WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
/googletest-download
)
WORKING_DIRECTORY
${
CMAKE_
CURRENT_
BINARY_DIR
}
/googletest-download
)
if
(
result
)
if
(
result
)
message
(
FATAL_ERROR
"Build step for googletest failed:
${
result
}
"
)
message
(
FATAL_ERROR
"Build step for googletest failed:
${
result
}
"
)
endif
()
endif
()
...
@@ -157,8 +157,8 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
...
@@ -157,8 +157,8 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
# Add googletest directly to our build. This defines
# Add googletest directly to our build. This defines
# the gtest and gtest_main targets.
# the gtest and gtest_main targets.
add_subdirectory
(
${
CMAKE_BINARY_DIR
}
/googletest-src
add_subdirectory
(
${
CMAKE_
CURRENT_
BINARY_DIR
}
/googletest-src
${
CMAKE_BINARY_DIR
}
/googletest-build
${
CMAKE_
CURRENT_
BINARY_DIR
}
/googletest-build
EXCLUDE_FROM_ALL
)
EXCLUDE_FROM_ALL
)
# The gtest/gtest_main targets carry header search path
# The gtest/gtest_main targets carry header search path
...
...
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