Skip to content

Commit

Permalink
iox-eclipse-iceoryx#590 Move classes with target quality level 2 to i…
Browse files Browse the repository at this point in the history
…ceoryx_dust and unused files to separate repository

Signed-off-by: Simon Hoinkis <[email protected]>
  • Loading branch information
mossmaurice committed Aug 4, 2022
1 parent 70ec584 commit aee570c
Show file tree
Hide file tree
Showing 99 changed files with 357 additions and 2,850 deletions.
60 changes: 60 additions & 0 deletions iceoryx_dust/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) 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

cmake_minimum_required(VERSION 3.16)

set(IOX_VERSION_STRING "2.90.0")

project(iceoryx_dust VERSION ${IOX_VERSION_STRING})

find_package(iceoryx_hoofs REQUIRED)

include(IceoryxPackageHelper)
include(IceoryxPlatform)

if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
endif()

#
########## build iceoryx dust lib ##########
#

iox_add_library(
TARGET iceoryx_dust
NAMESPACE iceoryx_dust
PROJECT_PREFIX ${PREFIX}
PRIVATE_LIBS ${ICEORYX_SANITIZER_FLAGS}
PRIVATE_LIBS_LINUX ${CODE_COVERAGE_LIBS}
PUBLIC_LIBS iceoryx_hoofs::iceoryx_hoofs
BUILD_INTERFACE ${PROJECT_SOURCE_DIR}/include
INSTALL_INTERFACE include/${PREFIX}
FILES
source/cxx/file_reader.cpp
source/posix_wrapper/named_pipe.cpp
source/posix_wrapper/signal_watcher.cpp
source/posix_wrapper/message_queue.cpp
)

#
########## dust testing ##########
#

# Finding gtest and adding the subdirectories is split to support the use case of
# building the testing lib without the tests by providing gtest externally
if(NOT GTest_FOUND AND BUILD_TEST)
find_package(GTest CONFIG REQUIRED)
endif()
23 changes: 23 additions & 0 deletions iceoryx_dust/cmake/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2020 by Robert Bosch GmbH 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

@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
list(APPEND CMAKE_MODULE_PATH "@DESTINATION_CONFIGDIR@")
check_required_components("@PROJECT_NAME@")
25 changes: 25 additions & 0 deletions iceoryx_dust/cmake/iceoryx_dustConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2020 by Robert Bosch GmbH. 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

#
########## dummyConfig.cmake to be able to use find_package with the source tree ##########
#

if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED)
message(STATUS "The package '${CMAKE_FIND_PACKAGE_NAME}' is used in source code version.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED true CACHE INTERNAL "")
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
24 changes: 24 additions & 0 deletions iceoryx_dust/cmake/iceoryx_dust_testingConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2020 by Robert Bosch GmbH. 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

#
########## dummyConfig.cmake to be able to use find_package with the source tree ##########
#

if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED)
message(STATUS "The package '${CMAKE_FIND_PACKAGE_NAME}' is used in source code version.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND_PRINTED true CACHE INTERNAL "")
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_CXX_FORWARD_LIST_HPP
#define IOX_HOOFS_CXX_FORWARD_LIST_HPP
#ifndef IOX_DUST_CXX_FORWARD_LIST_HPP
#define IOX_DUST_CXX_FORWARD_LIST_HPP

#include "iceoryx_hoofs/cxx/helplets.hpp"

Expand Down Expand Up @@ -368,6 +368,6 @@ class forward_list
} // namespace cxx
} // namespace iox

#include "iceoryx_hoofs/internal/cxx/forward_list.inl"
#include "iceoryx_dust/internal/cxx/forward_list.inl"

#endif // IOX_HOOFS_CXX_FORWARD_LIST_HPP
#endif // IOX_DUST_CXX_FORWARD_LIST_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_CXX_FORWARD_LIST_INL
#define IOX_HOOFS_CXX_FORWARD_LIST_INL
#ifndef IOX_DUST_CXX_FORWARD_LIST_INL
#define IOX_DUST_CXX_FORWARD_LIST_INL


#include "iceoryx_hoofs/cxx/forward_list.hpp"
#include "iceoryx_dust/cxx/forward_list.hpp"


namespace iox
Expand Down Expand Up @@ -619,4 +619,4 @@ inline void forward_list<T, Capacity>::errorMessage(const char* source, const ch
} // namespace cxx
} // namespace iox

#endif // IOX_HOOFS_CXX_FORWARD_LIST_INL
#endif // IOX_DUST_CXX_FORWARD_LIST_INL
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_OBJECTPOOL_OBJECTPOOL_HPP
#define IOX_HOOFS_OBJECTPOOL_OBJECTPOOL_HPP
#ifndef IOX_DUST_OBJECTPOOL_OBJECTPOOL_HPP
#define IOX_DUST_OBJECTPOOL_OBJECTPOOL_HPP

#include <cstddef> //for size_t
#include <cstdint>
Expand Down Expand Up @@ -451,4 +451,4 @@ class ObjectPool
} // namespace cxx
} // namespace iox

#endif // IOX_HOOFS_OBJECTPOOL_OBJECTPOOL_HPP
#endif // IOX_DUST_OBJECTPOOL_OBJECTPOOL_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#define IOX_HOOFS_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#ifndef IOX_DUST_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#define IOX_DUST_POSIX_WRAPPER_MESSAGE_QUEUE_HPP

#include "iceoryx_hoofs/cxx/optional.hpp"
#include "iceoryx_hoofs/design_pattern/creation.hpp"
Expand Down Expand Up @@ -128,4 +128,4 @@ class MessageQueue : public DesignPattern::Creation<MessageQueue, IpcChannelErro
} // namespace posix
} // namespace iox

#endif // IOX_HOOFS_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
#endif // IOX_DUST_POSIX_WRAPPER_MESSAGE_QUEUE_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_POSIX_WRAPPER_NAMED_PIPE_HPP
#define IOX_HOOFS_POSIX_WRAPPER_NAMED_PIPE_HPP
#ifndef IOX_DUST_POSIX_WRAPPER_NAMED_PIPE_HPP
#define IOX_DUST_POSIX_WRAPPER_NAMED_PIPE_HPP

#include "iceoryx_hoofs/concurrent/lockfree_queue.hpp"
#include "iceoryx_hoofs/cxx/string.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
#define IOX_HOOFS_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
#ifndef IOX_DUST_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
#define IOX_DUST_POSIX_WRAPPER_SIGNAL_WATCHER_HPP

#include "iceoryx_hoofs/posix_wrapper/signal_handler.hpp"
#include "iceoryx_hoofs/posix_wrapper/unnamed_semaphore.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#define IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#ifndef IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#define IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP

#include <cstdint>
#include <type_traits>
Expand Down Expand Up @@ -144,6 +144,6 @@ bool operator!=(const relocatable_ptr<T>& lhs, const relocatable_ptr<T>& rhs) no
} // namespace rp
} // namespace iox

#include "iceoryx_hoofs/internal/relocatable_pointer/relocatable_ptr.inl"
#include "iceoryx_dust/relocatable_pointer/relocatable_ptr.inl"

#endif // IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
#endif // IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_INL
#define IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_INL
#ifndef IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_INL
#define IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_INL

#include "iceoryx_hoofs/internal/relocatable_pointer/relocatable_ptr.hpp"
#include "iceoryx_dust/relocatable_pointer/relocatable_ptr.hpp"

namespace iox
{
Expand Down Expand Up @@ -161,4 +161,4 @@ inline bool operator!=(const relocatable_ptr<T>& lhs, const relocatable_ptr<T>&
} // namespace rp
} // namespace iox

#endif // IOX_HOOFS_RELOCATABLE_POINTER_RELOCATABLE_PTR_INL
#endif // IOX_DUST_RELOCATABLE_POINTER_RELOCATABLE_PTR_INL
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/internal/file_reader/file_reader.hpp"
#include "iceoryx_dust/cxx/file_reader.hpp"
#include "iceoryx_hoofs/cxx/helplets.hpp"

#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/internal/posix_wrapper/message_queue.hpp"
#include "iceoryx_dust/posix_wrapper/message_queue.hpp"
#include "iceoryx_hoofs/platform/fcntl.hpp"
#include "iceoryx_hoofs/platform/platform_correction.hpp"
#include "iceoryx_hoofs/posix_wrapper/posix_call.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/posix_wrapper/named_pipe.hpp"
#include "iceoryx_dust/posix_wrapper/named_pipe.hpp"
#include "iceoryx_hoofs/cxx/deadline_timer.hpp"
#include "iceoryx_hoofs/cxx/helplets.hpp"
#include "iceoryx_hoofs/posix_wrapper/posix_call.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#include "iceoryx_hoofs/posix_wrapper/signal_watcher.hpp"
#include "iceoryx_dust/posix_wrapper/signal_watcher.hpp"
#include "iceoryx_hoofs/cxx/helplets.hpp"
#include "iceoryx_hoofs/internal/log/hoofs_logging.hpp"
#include "iceoryx_hoofs/platform/unistd.hpp"
Expand Down
46 changes: 46 additions & 0 deletions iceoryx_dust/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright (c) 2019 - 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

cmake_minimum_required(VERSION 3.16)
set(test_iceoryx_dust_VERSION 0)
project(test_iceoryx_dust VERSION ${test_iceoryx_hoofs_VERSION})

find_package(Threads REQUIRED)
find_package(iceoryx_hoofs_testing REQUIRED)

set(PROJECT_PREFIX "dust")

file(GLOB_RECURSE MODULETESTS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/moduletests/*.cpp")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_PREFIX}/test)

set(TEST_LINK_LIBS
${CODE_COVERAGE_LIBS}
GTest::gtest
GTest::gmock
iceoryx_hoofs::iceoryx_hoofs
iceoryx_hoofs_testing::iceoryx_hoofs_testing
)

iox_add_executable( TARGET ${PROJECT_PREFIX}_moduletests
INCLUDE_DIRECTORIES .
LIBS ${TEST_LINK_LIBS}
LIBS_LINUX acl dl pthread rt
FILES ${MODULETESTS_SRC}
)

target_compile_options(${PROJECT_PREFIX}_moduletests PRIVATE ${TEST_CXX_FLAGS})
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/cxx/attributes.hpp"
#include "iceoryx_hoofs/cxx/forward_list.hpp"
#include "iceoryx_dust/cxx/forward_list.hpp"
#include "test.hpp"

namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/internal/file_reader/file_reader.hpp"
#include "iceoryx_dust/cxx/file_reader.hpp"
#include "test.hpp"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/internal/objectpool/objectpool.hpp"
#include "iceoryx_dust/objectpool/objectpool.hpp"

#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_hoofs/posix_wrapper/signal_watcher.hpp"
#include "iceoryx_dust/posix_wrapper/signal_watcher.hpp"
#include "iceoryx_hoofs/testing/barrier.hpp"
#include "iceoryx_hoofs/testing/watch_dog.hpp"
#include "test.hpp"
Expand Down
Loading

0 comments on commit aee570c

Please sign in to comment.