Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1516 Refactor iceoryx_posh_testing into own CMake…
Browse files Browse the repository at this point in the history
… file

Signed-off-by: Dietrich Krönke <[email protected]>
  • Loading branch information
dkroenke committed Oct 24, 2022
1 parent 5ba595f commit 4c416a2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 21 deletions.
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 @@ -96,6 +96,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
22 changes: 1 addition & 21 deletions iceoryx_posh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,27 +299,7 @@ setup_install_directories_and_export_package(
INCLUDE_DIRECTORY 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}
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
41 changes: 41 additions & 0 deletions iceoryx_posh/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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}
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 4c416a2

Please sign in to comment.