Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1287 Remove iox_add_test
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Eltzschig <me@elchris.org>
  • Loading branch information
elfenpiff committed May 10, 2022
1 parent 93c9dbc commit 4a8a903
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 39 deletions.
17 changes: 0 additions & 17 deletions iceoryx_hoofs/cmake/IceoryxPackageHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,6 @@ Macro(iox_set_rpath)
endif( LINUX OR UNIX )
endMacro()

Macro(iox_add_test)
set(arguments TARGET RPATH FILES FLAGS LIBS )
cmake_parse_arguments(IOX "" "" "${arguments}" ${ARGN} )

add_executable(${IOX_TARGET} ${IOX_FILES})
target_include_directories(${IOX_TARGET} PRIVATE .)
target_compile_options(${IOX_TARGET} PRIVATE ${IOX_FLAGS})
target_link_libraries(${IOX_TARGET} ${IOX_LIBS})
set_target_properties(${IOX_TARGET} PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_STANDARD ${ICEORYX_CXX_STANDARD}
POSITION_INDEPENDENT_CODE ON
)

iox_set_rpath( TARGET ${IOX_TARGET} RPATH ${IOX_RPATH} )
endMacro()

Macro(iox_add_executable)
set(switches USE_C_LANGUAGE)
set(arguments TARGET STACK_SIZE)
Expand Down
32 changes: 16 additions & 16 deletions iceoryx_hoofs/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,24 @@ elseif(WIN32)
set(TEST_CXX_FLAGS PRIVATE ${ICEORYX_WARNINGS} /bigobj)
endif()

iox_add_test( TARGET ${PROJECT_PREFIX}_moduletests
FILES ${MODULETESTS_SRC}
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})
iox_add_executable( TARGET ${PROJECT_PREFIX}_moduletests
FILES ${MODULETESTS_SRC}
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})

iox_add_test( TARGET ${PROJECT_PREFIX}_mocktests
FILES ${MOCKTESTS_SRC}
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})
iox_add_executable( TARGET ${PROJECT_PREFIX}_mocktests
FILES ${MOCKTESTS_SRC}
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})

iox_add_test( TARGET ${PROJECT_PREFIX}_integrationtests
FILES ${INTEGRATIONTESTS_SRC}
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})
iox_add_executable( TARGET ${PROJECT_PREFIX}_integrationtests
FILES ${INTEGRATIONTESTS_SRC}
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})

iox_add_test( TARGET test_stress_sofi
FILES stresstests/test_stress_sofi.cpp
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})
iox_add_executable( TARGET test_stress_sofi
FILES stresstests/test_stress_sofi.cpp
FLAGS ${TEST_CXX_FLAGS}
LIBS ${TEST_LINK_LIBS})

add_subdirectory(stresstests/benchmark_optional_and_expected)
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(TEST_CXX_FLAGS PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})
endif()

iox_add_test(
iox_add_executable(
TARGET iox-bm-optional-and-expected
FILES ./benchmark_optional_and_expected.cpp
LIBS iceoryx_hoofs::iceoryx_hoofs Threads::Threads
FLAGS ${TEST_CXX_FLAGS}
)

install(
TARGETS iox-bm-optional-and-expected
RUNTIME DESTINATION bin
)

0 comments on commit 4a8a903

Please sign in to comment.