Skip to content

Commit

Permalink
Merge pull request #1688 from ApexAI/iox-1516-rework-iceoryx-posh-tes…
Browse files Browse the repository at this point in the history
…ting-cmake

iox-#1516 Refactor iceoryx_posh testing lib into own CMake file
  • Loading branch information
dkroenke authored Oct 26, 2022
2 parents 3aecfb8 + a72c6a8 commit 96aec4d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
uses: vmactions/freebsd-vm@v0
with:
usesh: true
copyback: false
mem: 4096
prepare: pkg install -y cmake git ncurses bash wget
run: |
Expand Down
1 change: 1 addition & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
- `cxx::function` is no longer nullable [\#1104](https://github.com/eclipse-iceoryx/iceoryx/issues/1104)
- Renamed `BaseRelativePointer` to `UntypedRelativePointer` [\#605](https://github.com/eclipse-iceoryx/iceoryx/issues/605)
- Prevent building GoogleTest when `GTest_DIR` is defined [\#1758](https://github.com/eclipse-iceoryx/iceoryx/issues/1758)
- Refactored `iceoryx_posh_testing` library into own CMakeLists.txt [\#1516](https://github.com/eclipse-iceoryx/iceoryx/issues/1516)

**Workflow:**

Expand Down
23 changes: 1 addition & 22 deletions iceoryx_posh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,28 +299,7 @@ setup_install_directories_and_export_package(
INCLUDE_DIRECTORIES include/
)

if(ROUDI_ENVIRONMENT OR BUILD_TEST)
#
######### posh roudi environment ##########
#
find_package(iceoryx_hoofs_testing REQUIRED)
iox_add_library(
STATIC
TARGET iceoryx_posh_testing
NAMESPACE iceoryx_posh_testing
PROJECT_PREFIX ${PREFIX}
BUILD_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/testing/include
INSTALL_INTERFACE include/${PREFIX}
EXPORT_INCLUDE_DIRS include/
PRIVATE_LIBS iceoryx_posh::iceoryx_posh
iceoryx_hoofs::iceoryx_hoofs
iceoryx_posh::iceoryx_posh_roudi
iceoryx_hoofs_testing::iceoryx_hoofs_testing
FILES
testing/roudi_environment/runtime_test_interface.cpp
testing/roudi_environment/roudi_environment.cpp
)
endif()
add_subdirectory(testing)

if(BUILD_TEST)
add_subdirectory(test)
Expand Down
42 changes: 42 additions & 0 deletions iceoryx_posh/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
# Copyright (c) 2020 - 2022 by Apex.AI Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

if(ROUDI_ENVIRONMENT OR BUILD_TEST)
#
######### posh roudi environment ##########
#
find_package(GTest CONFIG REQUIRED)
find_package(iceoryx_hoofs_testing REQUIRED)
iox_add_library(
STATIC
TARGET iceoryx_posh_testing
NAMESPACE iceoryx_posh_testing
PROJECT_PREFIX ${PREFIX}
BUILD_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include
INSTALL_INTERFACE include/${PREFIX}
EXPORT_INCLUDE_DIRS include/
PUBLIC_LIBS GTest::gtest
GTest::gmock
PRIVATE_LIBS iceoryx_posh::iceoryx_posh
iceoryx_hoofs::iceoryx_hoofs
iceoryx_posh::iceoryx_posh_roudi
iceoryx_hoofs_testing::iceoryx_hoofs_testing
FILES
roudi_environment/runtime_test_interface.cpp
roudi_environment/roudi_environment.cpp
)
endif()

0 comments on commit 96aec4d

Please sign in to comment.