Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iox-#220 require C++14 for iceoryx #390

Merged
merged 5 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion iceoryx_binding_c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ add_library(${PROJECT_NAME}
)
add_library(${PROJECT_NAMESPACE}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_STANDARD ${ICEORYX_CXX_STANDARD}
POSITION_INDEPENDENT_CODE ON
)

target_include_directories(${PROJECT_NAME}
PUBLIC
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_binding_c/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ endif()

# unittests
add_executable(${PROJECT_PREFIX}_integrationtests ${MODULETESTS_SRC})
set_property(TARGET ${PROJECT_PREFIX}_integrationtests PROPERTY CXX_STANDARD 11)
set_property(TARGET ${PROJECT_PREFIX}_integrationtests PROPERTY CXX_STANDARD ${ICEORYX_CXX_STANDARD})
target_include_directories(${PROJECT_PREFIX}_integrationtests PRIVATE .)
target_compile_options(${PROJECT_PREFIX}_integrationtests PUBLIC -fPIC PRIVATE ${TEST_CXX_FLAGS})
target_link_libraries(${PROJECT_PREFIX}_integrationtests ${TEST_LINK_LIBS})
6 changes: 5 additions & 1 deletion iceoryx_dds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ add_library(iceoryx_dds
)
add_library(${PROJECT_NAMESPACE}::iceoryx_dds ALIAS iceoryx_dds)

target_compile_options(iceoryx_dds PUBLIC -std=c++11)
set_target_properties(iceoryx_utils PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_STANDARD ${ICEORYX_CXX_STANDARD}
POSITION_INDEPENDENT_CODE ON
)

target_include_directories(iceoryx_dds
PUBLIC
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_dds/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ endif()

# unittests
add_executable(${PROJECT_PREFIX}_moduletests ${MODULETESTS_SRC})
set_property(TARGET ${PROJECT_PREFIX}_moduletests PROPERTY CXX_STANDARD 11)
set_property(TARGET ${PROJECT_PREFIX}_moduletests PROPERTY CXX_STANDARD ${ICEORYX_CXX_STANDARD})
target_include_directories(${PROJECT_PREFIX}_moduletests PRIVATE .)
target_compile_options(${PROJECT_PREFIX}_moduletests PUBLIC -fPIC PRIVATE ${TEST_CXX_FLAGS})
target_link_libraries(${PROJECT_PREFIX}_moduletests ${TEST_LINK_LIBS})
2 changes: 1 addition & 1 deletion iceoryx_posh/include/iceoryx_posh/roudi/roudi_app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RouDiApp
static RouDiConfig_t generateConfigFromMePooConfig(const mepoo::MePooConfig* mePooConfig) noexcept;

/// @deprecated Please port to RouDiApp(const CmdLineParser&, const RouDiConfig_T&)
[[gnu::deprecated]] RouDiApp(int argc, char* argv[], const mepoo::MePooConfig* mePooConfig = nullptr) noexcept;
[[deprecated]] RouDiApp(int argc, char* argv[], const mepoo::MePooConfig* mePooConfig = nullptr) noexcept;

/// @deprecated Will be deprecated soon, please port to RouDiApp(const CmdLineParser&, const RouDiConfig_T&)
RouDiApp(int argc, char* argv[], const RouDiConfig_t& config) noexcept;
Expand Down
6 changes: 3 additions & 3 deletions iceoryx_utils/cmake/IceoryxPlatformDetection.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ if(UNIX AND NOT APPLE)
endif(UNIX AND NOT APPLE)

if(LINUX)
set(ICEORYX_CXX_STANDARD 11)
set(ICEORYX_CXX_STANDARD 14)
elBoberido marked this conversation as resolved.
Show resolved Hide resolved
elseif(QNX)
set(ICEORYX_CXX_STANDARD 11)
set(ICEORYX_CXX_STANDARD 14)
elseif(WIN32)
set(ICEORYX_CXX_STANDARD 11)
set(ICEORYX_CXX_STANDARD 14)
elseif(APPLE)
set(ICEORYX_CXX_STANDARD 17)
endif(LINUX)
Expand Down
44 changes: 22 additions & 22 deletions iceoryx_utils/include/iceoryx_utils/cxx/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class expected<ErrorType>
/// std::cout << "error occured : " << result.get_error() << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_error(const cxx::function_ref<void(expected&)>& callable) const noexcept;
[[deprecated]] const expected& on_error(const cxx::function_ref<void(expected&)>& callable) const noexcept;

/// @brief if the expected does contain an error the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -266,7 +266,7 @@ class expected<ErrorType>
/// std::cout << "error occured : " << result.get_error() << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_error(const cxx::function_ref<void(expected&)>& callable) noexcept;
[[deprecated]] expected& on_error(const cxx::function_ref<void(expected&)>& callable) noexcept;

/// @brief if the expected does contain an error the given callable is called and
/// a reference to the ErrorType is given as an argument to the callable
Expand All @@ -277,7 +277,7 @@ class expected<ErrorType>
/// std::cout << "error occured : " << error << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) const noexcept;
[[deprecated]] const expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) const noexcept;
const expected& or_else(const cxx::function_ref<void(ErrorType&)>& callable) const noexcept;

/// @brief if the expected does contain an error the given callable is called and
Expand All @@ -289,7 +289,7 @@ class expected<ErrorType>
/// std::cout << "error occured : " << error << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) noexcept;
[[deprecated]] expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) noexcept;
expected& or_else(const cxx::function_ref<void(ErrorType&)>& callable) noexcept;

/// @brief if the expected does contain an error the given callable is called
Expand All @@ -300,7 +300,7 @@ class expected<ErrorType>
/// std::cout << "error occured " << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_error(const cxx::function_ref<void()>& callable) const noexcept;
[[deprecated]] const expected& on_error(const cxx::function_ref<void()>& callable) const noexcept;

/// @brief if the expected does contain an error the given callable is called
/// @param[in] callable callable which will be called if the expected contains an error
Expand All @@ -310,7 +310,7 @@ class expected<ErrorType>
/// std::cout << "error occured " << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_error(const cxx::function_ref<void()>& callable) noexcept;
[[deprecated]] expected& on_error(const cxx::function_ref<void()>& callable) noexcept;

/// @brief if the expected does contain a success value the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -321,7 +321,7 @@ class expected<ErrorType>
/// std::cout << "we are successful" << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_success(const cxx::function_ref<void(expected&)>& callable) const noexcept;
[[deprecated]] const expected& on_success(const cxx::function_ref<void(expected&)>& callable) const noexcept;

/// @brief if the expected does contain a success value the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -332,7 +332,7 @@ class expected<ErrorType>
/// std::cout << "we are successful" << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_success(const cxx::function_ref<void(expected&)>& callable) noexcept;
[[deprecated]] expected& on_success(const cxx::function_ref<void(expected&)>& callable) noexcept;

/// @brief if the expected does contain a success value the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -343,7 +343,7 @@ class expected<ErrorType>
/// std::cout << "we are successful!" << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_success(const cxx::function_ref<void()>& callable) const noexcept;
[[deprecated]] const expected& on_success(const cxx::function_ref<void()>& callable) const noexcept;
const expected& and_then(const cxx::function_ref<void()>& callable) const noexcept;

/// @brief if the expected does contain a success value the given callable is called and
Expand All @@ -355,7 +355,7 @@ class expected<ErrorType>
/// std::cout << "we are successful!" << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_success(const cxx::function_ref<void()>& callable) noexcept;
[[deprecated]] expected& on_success(const cxx::function_ref<void()>& callable) noexcept;
expected& and_then(const cxx::function_ref<void()>& callable) noexcept;

private:
Expand Down Expand Up @@ -566,7 +566,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "error occured : " << result.get_error() << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_error(const cxx::function_ref<void(expected&)>& callable) const noexcept;
[[deprecated]] const expected& on_error(const cxx::function_ref<void(expected&)>& callable) const noexcept;

/// @brief if the expected does contain an error the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -577,7 +577,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "error occured : " << result.get_error() << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_error(const cxx::function_ref<void(expected&)>& callable) noexcept;
[[deprecated]] expected& on_error(const cxx::function_ref<void(expected&)>& callable) noexcept;

/// @brief if the expected does contain an error the given callable is called and
/// a reference to the ErrorType is given as an argument to the callable
Expand All @@ -588,7 +588,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "error occured : " << error << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) const noexcept;
[[deprecated]] const expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) const noexcept;
const expected& or_else(const cxx::function_ref<void(ErrorType&)>& callable) const noexcept;

/// @brief if the expected does contain an error the given callable is called and
Expand All @@ -600,7 +600,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "error occured : " << error << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) noexcept;
[[deprecated]] expected& on_error(const cxx::function_ref<void(ErrorType&)>& callable) noexcept;
expected& or_else(const cxx::function_ref<void(ErrorType&)>& callable) noexcept;

/// @brief if the expected does contain an error the given callable is called
Expand All @@ -611,7 +611,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "error occured " << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_error(const cxx::function_ref<void()>& callable) const noexcept;
[[deprecated]] const expected& on_error(const cxx::function_ref<void()>& callable) const noexcept;

/// @brief if the expected does contain an error the given callable is called
/// @param[in] callable callable which will be called if the expected contains an error
Expand All @@ -621,7 +621,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "error occured " << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_error(const cxx::function_ref<void()>& callable) noexcept;
[[deprecated]] expected& on_error(const cxx::function_ref<void()>& callable) noexcept;

/// @brief if the expected does contain a success value the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -632,7 +632,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "we have a result : " << result.get_value() << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_success(const cxx::function_ref<void(expected&)>& callable) const noexcept;
[[deprecated]] const expected& on_success(const cxx::function_ref<void(expected&)>& callable) const noexcept;

/// @brief if the expected does contain a success value the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -643,7 +643,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "we have a result : " << result.get_value() << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_success(const cxx::function_ref<void(expected&)>& callable) noexcept;
[[deprecated]] expected& on_success(const cxx::function_ref<void(expected&)>& callable) noexcept;

/// @brief if the expected does contain a success value the given callable is called and
/// a reference to the result is given as an argument to the callable
Expand All @@ -654,7 +654,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "we have a result : " << result << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_success(const cxx::function_ref<void(ValueType&)>& callable) const noexcept;
[[deprecated]] const expected& on_success(const cxx::function_ref<void(ValueType&)>& callable) const noexcept;
const expected& and_then(const cxx::function_ref<void(ValueType&)>& callable) const noexcept;

/// @brief if the expected does contain a success value the given callable is called and
Expand All @@ -666,7 +666,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "we have a result : " << result << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_success(const cxx::function_ref<void(ValueType&)>& callable) noexcept;
[[deprecated]] expected& on_success(const cxx::function_ref<void(ValueType&)>& callable) noexcept;
expected& and_then(const cxx::function_ref<void(ValueType&)>& callable) noexcept;

///
Expand Down Expand Up @@ -706,7 +706,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "we are successful!" << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] const expected& on_success(const cxx::function_ref<void()>& callable) const noexcept;
[[deprecated]] const expected& on_success(const cxx::function_ref<void()>& callable) const noexcept;

/// @brief if the expected does contain a success value the given callable is called and
/// a reference to the expected is given as an argument to the callable
Expand All @@ -717,7 +717,7 @@ class expected<ValueType, ErrorType>
/// std::cout << "we are successful!" << std::endl;
/// })
/// @endcode
[[gnu::deprecated]] expected& on_success(const cxx::function_ref<void()>& callable) noexcept;
[[deprecated]] expected& on_success(const cxx::function_ref<void()>& callable) noexcept;

///
/// @brief if the expected contains a success value and its type is an empty optional, calls the provided callable
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_utils/testutils/compile_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CompileTest
std::string m_codePrefix;
std::string m_compilerPath = "/usr/bin/g++";
std::string m_includePaths;
std::string m_compilerArguments = " -std=c++11 -xc++ - -o /tmp/funkyDoodle";
std::string m_compilerArguments = " -std=c++14 -xc++ - -o /tmp/funkyDoodle";

std::string m_embeddedFunctionPre = "void UnitTestFunction() {";
std::string m_embeddedFunctionPost = "}; int main() { UnitTestFunction(); }";
Expand Down
26 changes: 17 additions & 9 deletions tools/introspection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ set(${PROJECT_NAME}_DIR ${CMAKE_CURRENT_LIST_DIR}/cmake
)

add_library(iceoryx_introspection
source/iceoryx_introspection_app.cpp
source/introspection_app.cpp
)
set_property(TARGET iceoryx_introspection PROPERTY CXX_STANDARD 11)
source/iceoryx_introspection_app.cpp
source/introspection_app.cpp
)

add_library(${PROJECT_NAMESPACE}::iceoryx_introspection ALIAS iceoryx_introspection)

set_target_properties(iceoryx_introspection PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_STANDARD ${ICEORYX_CXX_STANDARD}
POSITION_INDEPENDENT_CODE ON
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)

target_include_directories(iceoryx_introspection
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand All @@ -69,12 +75,14 @@ endif()

target_link_libraries(iceoryx_introspection ${LIB_TINFO})

set_target_properties(iceoryx_introspection
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)

add_executable(iox-introspection-client source/introspection_main.cpp)
set_property(TARGET iox-introspection-client PROPERTY CXX_STANDARD 11)

set_target_properties(iox-introspection-client PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_STANDARD ${ICEORYX_CXX_STANDARD}
POSITION_INDEPENDENT_CODE ON
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)

target_link_libraries(iox-introspection-client
PRIVATE
Expand Down