Skip to content

Commit 36717e6

Browse files
committed
cmake_policy(SET CMP0077 NEW)
1 parent e47902d commit 36717e6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

3rdparty/gtest/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
option(
1414
gtest_force_shared_crt
1515
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
16-
ON)
16+
OFF)
1717

1818
option(gtest_build_tests "Build all of gtest's own tests." OFF)
1919

@@ -59,6 +59,10 @@ if (POLICY CMP0063) # Visibility
5959
cmake_policy(SET CMP0063 NEW)
6060
endif (POLICY CMP0063)
6161

62+
if (POLICY CMP0077) # Visibility
63+
cmake_policy(SET CMP0077 NEW)
64+
endif (POLICY CMP0077)
65+
6266
if (COMMAND set_up_hermetic_build)
6367
set_up_hermetic_build()
6468
endif()

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(cpp-ipc)
44
option(LIBIPC_BUILD_TESTS "Build all of libipc's own tests." OFF)
55
option(LIBIPC_BUILD_DEMOS "Build all of libipc's own demos." OFF)
66
option(LIBIPC_BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
7-
option(LIBIPC_USE_STATIC_CRT "Set to ON to build with static CRT on Windows (/MT)." ON )
7+
option(LIBIPC_USE_STATIC_CRT "Set to ON to build with static CRT on Windows (/MT)." OFF)
88

99
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1010
set(CMAKE_CXX_STANDARD 17)
@@ -38,7 +38,6 @@ add_subdirectory(src)
3838

3939
if (LIBIPC_BUILD_TESTS)
4040
set(GOOGLETEST_VERSION 1.10.0)
41-
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
4241
set(gtest_force_shared_crt $<NOT:$<BOOL:${LIBIPC_USE_STATIC_CRT}>>)
4342
add_subdirectory(3rdparty/gtest)
4443
add_subdirectory(test)

0 commit comments

Comments
 (0)