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
c828e171
Commit
c828e171
authored
May 18, 2010
by
vladlosev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduces gtest_force_shared_crt option for CMake build scripts.
parent
55d166a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
CMakeLists.txt
CMakeLists.txt
+7
-0
internal_utils.cmake
cmake/internal_utils.cmake
+1
-1
No files found.
CMakeLists.txt
View file @
c828e171
...
@@ -12,6 +12,13 @@
...
@@ -12,6 +12,13 @@
# 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
)
# When other libraries are using a shared version of runtime libraries,
# Google Test also has to use one.
option
(
gtest_force_shared_crt
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
OFF
)
option
(
gtest_build_tests
"Build all of gtest's own tests."
OFF
)
option
(
gtest_build_tests
"Build all of gtest's own tests."
OFF
)
option
(
gtest_build_samples
"Build gtest's sample programs."
OFF
)
option
(
gtest_build_samples
"Build gtest's sample programs."
OFF
)
...
...
cmake/internal_utils.cmake
View file @
c828e171
...
@@ -15,7 +15,7 @@ macro(fix_default_settings)
...
@@ -15,7 +15,7 @@ macro(fix_default_settings)
foreach
(
flag_var
foreach
(
flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
)
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
)
if
(
NOT BUILD_SHARED_LIBS
)
if
(
NOT BUILD_SHARED_LIBS
AND NOT gtest_force_shared_crt
)
# When Google Test is built as a shared library, it should also use
# When Google Test is built as a shared library, it should also use
# shared runtime libraries. Otherwise, it may end up with multiple
# shared runtime libraries. Otherwise, it may end up with multiple
# copies of runtime library data in different modules, resulting in
# copies of runtime library data in different modules, resulting in
...
...
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