Skip to content

Commit e40e835

Browse files
committed
Add test for objcpp compatibility
1 parent b6aee0a commit e40e835

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/CMakeLists.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,23 @@ if ( ATOMIC_QUEUE_BUILD_TESTS )
3030
NAME atomic_queue_tests
3131
COMMAND atomic_queue_tests
3232
)
33+
34+
if (APPLE)
35+
add_executable(
36+
atomic_queue_tests_objcpp
37+
${CMAKE_CURRENT_SOURCE_DIR}/tests.mm
38+
)
39+
40+
target_link_libraries(
41+
atomic_queue_tests_objcpp
42+
atomic_queue
43+
Boost::unit_test_framework
44+
)
45+
46+
add_test(
47+
NAME atomic_queue_tests_objcpp
48+
COMMAND atomic_queue_tests_objcpp
49+
)
50+
endif()
51+
3352
endif()

src/tests.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// For objective-c++ compatibility tests
2+
#import <Foundation/Foundation.h>
3+
#include "tests.cc"

0 commit comments

Comments
 (0)