Skip to content

Commit 8f703a7

Browse files
committed
iox-eclipse-iceoryx#1758 Prevent to build googletest when GTest_DIR is defined
If GTest_DIR is defined with cmake parameters by users, It means that the external googletest version will be used. So, Downloading and building GoogleTest is not necessary.
1 parent 2b4165d commit 8f703a7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmake/googletest/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
cmake_minimum_required(VERSION 3.16)
1818
project(googletest-build CXX)
1919

20-
if(BUILD_TEST)
20+
if(BUILD_TEST AND NOT GTest_DIR)
2121

2222
# set download config, source and build paths
2323
set(DOWNLOAD_CONFIG_DIR ${CMAKE_BINARY_DIR}/dependencies/googletest/download)

doc/website/release-notes/iceoryx-unreleased.md

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
- `ReleativePointer::registerPtr` returns `cxx::optional` [\#605](https://github.com/eclipse-iceoryx/iceoryx/issues/605)
9595
- `cxx::function` is no longer nullable [\#1104](https://github.com/eclipse-iceoryx/iceoryx/issues/1104)
9696
- Renamed `BaseRelativePointer` to `UntypedRelativePointer` [\#605](https://github.com/eclipse-iceoryx/iceoryx/issues/605)
97+
- Prevent building GoogleTest when `GTest_DIR` is defined [\#1758](https://github.com/eclipse-iceoryx/iceoryx/issues/1758)
9798

9899
**Workflow:**
99100

0 commit comments

Comments
 (0)