-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for GTEST on windows Fix for GTEST on windows Fix for GTEST on windows Fix for GTEST on windows Fix for GTEST on windows Fix for GTEST on windows Fix for GTEST on windows Fix for GTEST on windows Fix for GTEST on windows
- Loading branch information
Showing
4 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
# Copyright 2021 Ingemar Hedvall | ||
# SPDX-License-Identifier: MIT | ||
|
||
if (NOT GTest_FOUND) | ||
set(GTEST_MSVC_SEARCH MT) | ||
if (COMP_DIR) | ||
set(GTEST_ROOT ${COMP_DIR}/googletest/master) | ||
endif() | ||
include (FetchContent) | ||
|
||
message(STATUS "GTest Fetching: " ${GTest_FOUND}) | ||
include(FetchContent) | ||
FetchContent_Declare(googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG HEAD | ||
) | ||
# For Windows: Prevent overriding the parent project's compiler/linker settings | ||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
FetchContent_MakeAvailable(googletest) | ||
message(STATUS "googletest Populated: " ${googletest_POPULATED}) | ||
message(STATUS "googletest Source: " ${googletest_SOURCE_DIR}) | ||
message(STATUS "googletest Binary: " ${googletest_BINARY_DIR}) | ||
|
||
find_package(GTest) | ||
message(STATUS "GTest Found: " ${GTest_FOUND}) | ||
message(STATUS "GTest Include Dirs: " ${GTEST_INCLUDE_DIRS}) | ||
message(STATUS "GTest Libraries: " ${GTEST_LIBRARIES}) | ||
message(STATUS "GTest Main Libraries: " ${GTEST_MAIN_LIBRARIES}) | ||
message(STATUS "GTest Both Libraries: " ${GTEST_BOTH_LIBRARIES}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters