Skip to content

Commit

Permalink
iox-eclipse-iceoryx#33 added gtest downloading in windows cmake; adju…
Browse files Browse the repository at this point in the history
…sted some unit test dependencies in cmake

Signed-off-by: Christian Eltzschig <christian.eltzschig2@de.bosch.com>
  • Loading branch information
elfenpiff committed Feb 5, 2020
1 parent 4607558 commit 69a9cd1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
21 changes: 19 additions & 2 deletions CMakeLists-Windows.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.14)
set(iceoryx_VERSION 0.16.0.1)

project(iceoryx VERSION ${iceoryx_VERSION})
include(FetchContent)

if(test)
FetchContent_Declare(
GOOGLETEST
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.10.0
)
FetchContent_GetProperties(GOOGLETEST)
if (NOT googletest_POPULATED)
message(STATUS "updating: googletest" )
FetchContent_Populate(GOOGLETEST)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
set(GTest_FOUND true)
add_library(GTest::gtest ALIAS gtest)
add_library(GTest::gmock ALIAS gmock)
endif()
endif(test)

add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/iceoryx_utils )
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/iceoryx_posh )
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/iceoryx_examples/icedelivery )
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/iceoryx_examples/iceperf )

5 changes: 5 additions & 0 deletions iceoryx_posh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ if(TOML_CONFIG)
target_compile_definitions(RouDi PRIVATE -DTOML_CONFIG_FILE)
endif(TOML_CONFIG)

if(test)
# since the unit tests have the roudi environment as dependency
set(roudi_environment ON)
endif(test)

if(roudi_environment)
add_library(iceoryx_posh_roudi_environment
source/roudi_environment/runtime_test_interface.cpp
Expand Down

0 comments on commit 69a9cd1

Please sign in to comment.