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
b22e8dec
"googlemock/vscode:/vscode.git/clone" did not exist on "b78f858d0c12cc71d41607b261e3cfd6c6bfa185"
Commit
b22e8dec
authored
Apr 05, 2018
by
Henry Fredrick Schreiner
Browse files
Clean up cache non-advanced variable for subproject
parent
2cf2a1f8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
9 deletions
+34
-9
googlemock/CMakeLists.txt
googlemock/CMakeLists.txt
+14
-4
googletest/CMakeLists.txt
googletest/CMakeLists.txt
+20
-5
No files found.
googlemock/CMakeLists.txt
View file @
b22e8dec
...
@@ -5,10 +5,6 @@
...
@@ -5,10 +5,6 @@
# ctest. You can select which tests to run using 'ctest -R regex'.
# ctest. You can select which tests to run using 'ctest -R regex'.
# For more options, run 'ctest --help'.
# For more options, run 'ctest --help'.
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
# make it prominent in the GUI.
option
(
BUILD_SHARED_LIBS
"Build shared libraries (DLLs)."
OFF
)
option
(
gmock_build_tests
"Build all of Google Mock's own tests."
OFF
)
option
(
gmock_build_tests
"Build all of Google Mock's own tests."
OFF
)
# A directory to find Google Test sources.
# A directory to find Google Test sources.
...
@@ -55,6 +51,20 @@ endif()
...
@@ -55,6 +51,20 @@ endif()
# if they are the same (the default).
# if they are the same (the default).
add_subdirectory
(
"
${
gtest_dir
}
"
"
${
gmock_BINARY_DIR
}
/gtest"
)
add_subdirectory
(
"
${
gtest_dir
}
"
"
${
gmock_BINARY_DIR
}
/gtest"
)
# These commands only run if this is the main project
if
(
CMAKE_PROJECT_NAME STREQUAL
"gmock"
OR CMAKE_PROJECT_NAME STREQUAL
"googletest-distribution"
)
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
# make it prominent in the GUI.
option
(
BUILD_SHARED_LIBS
"Build shared libraries (DLLs)."
OFF
)
else
()
mark_as_advanced
(
gmock_build_tests
)
endif
()
# Although Google Test's CMakeLists.txt calls this function, the
# Although Google Test's CMakeLists.txt calls this function, the
# changes there don't affect the current scope. Therefore we have to
# changes there don't affect the current scope. Therefore we have to
# call it again here.
# call it again here.
...
...
googletest/CMakeLists.txt
View file @
b22e8dec
...
@@ -5,10 +5,6 @@
...
@@ -5,10 +5,6 @@
# ctest. You can select which tests to run using 'ctest -R regex'.
# ctest. You can select which tests to run using 'ctest -R regex'.
# For more options, run 'ctest --help'.
# For more options, run 'ctest --help'.
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
# make it prominent in the GUI.
option
(
BUILD_SHARED_LIBS
"Build shared libraries (DLLs)."
OFF
)
# When other libraries are using a shared version of runtime libraries,
# When other libraries are using a shared version of runtime libraries,
# Google Test also has to use one.
# Google Test also has to use one.
option
(
option
(
...
@@ -60,6 +56,25 @@ if (COMMAND set_up_hermetic_build)
...
@@ -60,6 +56,25 @@ if (COMMAND set_up_hermetic_build)
set_up_hermetic_build
()
set_up_hermetic_build
()
endif
()
endif
()
# These commands only run if this is the main project
if
(
CMAKE_PROJECT_NAME STREQUAL
"gtest"
OR CMAKE_PROJECT_NAME STREQUAL
"googletest-distribution"
)
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
# make it prominent in the GUI.
option
(
BUILD_SHARED_LIBS
"Build shared libraries (DLLs)."
OFF
)
else
()
mark_as_advanced
(
gtest_force_shared_crt
gtest_build_tests
gtest_build_samples
gtest_disable_pthreads
gtest_hide_internal_symbols
)
endif
()
if
(
gtest_hide_internal_symbols
)
if
(
gtest_hide_internal_symbols
)
set
(
CMAKE_CXX_VISIBILITY_PRESET hidden
)
set
(
CMAKE_CXX_VISIBILITY_PRESET hidden
)
set
(
CMAKE_VISIBILITY_INLINES_HIDDEN 1
)
set
(
CMAKE_VISIBILITY_INLINES_HIDDEN 1
)
...
...
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