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
e588a3bb
"googlemock/vscode:/vscode.git/clone" did not exist on "58b71c9ea2fa52a7412e2267895d016abe14a971"
Commit
e588a3bb
authored
May 11, 2010
by
vladlosev
Browse files
Renames CMake build script options.
parent
61baf319
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
CMakeLists.txt
CMakeLists.txt
+7
-7
README
README
+3
-4
No files found.
CMakeLists.txt
View file @
e588a3bb
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
# make it prominent in the GUI.
# make it prominent in the GUI.
option
(
BUILD_SHARED_LIBS
"Build shared libraries (DLLs)."
OFF
)
option
(
BUILD_SHARED_LIBS
"Build shared libraries (DLLs)."
OFF
)
option
(
build_all_gtest
_tests
"Build all of gtest's own tests."
OFF
)
option
(
gtest_build
_tests
"Build all of gtest's own tests."
OFF
)
option
(
build_gtest
_samples
"Build gtest's sample programs."
OFF
)
option
(
gtest_build
_samples
"Build gtest's sample programs."
OFF
)
include
(
cmake/hermetic_build.cmake OPTIONAL
)
include
(
cmake/hermetic_build.cmake OPTIONAL
)
...
@@ -69,10 +69,10 @@ target_link_libraries(gtest_main gtest)
...
@@ -69,10 +69,10 @@ target_link_libraries(gtest_main gtest)
# Samples on how to link user tests with gtest or gtest_main.
# Samples on how to link user tests with gtest or gtest_main.
#
#
# They are not built by default. To build them, set the
# They are not built by default. To build them, set the
#
build_gtest
_samples option to ON. You can do it by running ccmake
#
gtest_build
_samples option to ON. You can do it by running ccmake
# or specifying the -Dbuild_gtest_samples=ON flag when running cmake.
# or specifying the -Dbuild_gtest_samples=ON flag when running cmake.
if
(
build_gtest
_samples
)
if
(
gtest_build
_samples
)
cxx_executable
(
sample1_unittest samples gtest_main samples/sample1.cc
)
cxx_executable
(
sample1_unittest samples gtest_main samples/sample1.cc
)
cxx_executable
(
sample2_unittest samples gtest_main samples/sample2.cc
)
cxx_executable
(
sample2_unittest samples gtest_main samples/sample2.cc
)
cxx_executable
(
sample3_unittest samples gtest_main
)
cxx_executable
(
sample3_unittest samples gtest_main
)
...
@@ -93,10 +93,10 @@ endif()
...
@@ -93,10 +93,10 @@ endif()
# Google Test itself.
# Google Test itself.
#
#
# Most of the tests are not built by default. To build them, set the
# Most of the tests are not built by default. To build them, set the
#
build_all_gtest
_tests option to ON. You can do it by running ccmake
#
gtest_build
_tests option to ON. You can do it by running ccmake
# or specifying the -D
build_all_gtest
_tests=ON flag when running cmake.
# or specifying the -D
gtest_build
_tests=ON flag when running cmake.
if
(
build_all_gtest
_tests
)
if
(
gtest_build
_tests
)
# This must be set in the root directory for the tests to be run by
# This must be set in the root directory for the tests to be run by
# 'make test' or ctest.
# 'make test' or ctest.
enable_testing
()
enable_testing
()
...
...
README
View file @
e588a3bb
...
@@ -171,7 +171,7 @@ workflow starts with:
...
@@ -171,7 +171,7 @@ workflow starts with:
If
you
want
to
build
Google
Test
's samples, you should replace the
If
you
want
to
build
Google
Test
's samples, you should replace the
last command with
last command with
cmake -D
build_gtest
_samples=ON ${GTEST_DIR}
cmake -D
gtest_build
_samples=ON ${GTEST_DIR}
If you are on a *nix system, you should now see a Makefile in the
If you are on a *nix system, you should now see a Makefile in the
current directory. Just type '
make
' to build gtest.
current directory. Just type '
make
' to build gtest.
...
@@ -371,7 +371,7 @@ For that you can use CMake:
...
@@ -371,7 +371,7 @@ For that you can use CMake:
mkdir
mybuild
mkdir
mybuild
cd
mybuild
cd
mybuild
cmake
-
D
build_all_gtest
_tests
=
ON
${
GTEST_DIR
}
cmake
-
D
gtest_build
_tests
=
ON
${
GTEST_DIR
}
Make
sure
you
have
Python
installed
,
as
some
of
Google
Test
's tests
Make
sure
you
have
Python
installed
,
as
some
of
Google
Test
's tests
are written in Python. If the cmake command complains about not being
are written in Python. If the cmake command complains about not being
...
@@ -379,8 +379,7 @@ able to find Python ("Could NOT find PythonInterp (missing:
...
@@ -379,8 +379,7 @@ able to find Python ("Could NOT find PythonInterp (missing:
PYTHON_EXECUTABLE)"), try telling it explicitly where your Python
PYTHON_EXECUTABLE)"), try telling it explicitly where your Python
executable can be found:
executable can be found:
cmake -DPYTHON_EXECUTABLE=path/to/python -Dbuild_all_gtest_tests=ON \
cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
${GTEST_DIR}
Next, you can build Google Test and all of its own tests. On *nix,
Next, you can build Google Test and all of its own tests. On *nix,
this is usually done by '
make
'. To run the tests, do
this is usually done by '
make
'. To run the tests, do
...
...
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