diff --git a/src/mx_stream/CMakeLists.txt b/src/mx_stream/CMakeLists.txt index dec566a6da7046924073d67d0b03e0f0438b2cab..a8e960a1a44643532fe347ab8e638a40f5b087ab 100644 --- a/src/mx_stream/CMakeLists.txt +++ b/src/mx_stream/CMakeLists.txt @@ -3,11 +3,15 @@ include(FindThreads) if (OPENMX_FOUND) - add_executable(mx_stream mx_stream.cc ${CMAKE_CURRENT_SOURCE_DIR}}/../drv/rfm.c) + # this is a weird area, these are .c files but need to be built as C++ + # this should be fixed after we stop the manual makefile build + set (CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER}) + add_executable(mx_stream mx_stream.c ${CMAKE_CURRENT_SOURCE_DIR}}/../drv/rfm.c) target_compile_definitions(mx_stream PUBLIC -DNO_RTL -D_XOPEN_SOURCE -D_BSD_SOURCE) target_include_directories(mx_stream PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../common ${CMAKE_CURRENT_SOURCE_DIR}/../common/bsd) target_link_libraries(mx_stream PUBLIC openmx::openmx ${MAKE_THREAD_LIBS_INIT}) + set_target_properties(mx_stream PROPERTIES LINKER_LANGUAGE CXX) endif (OPENMX_FOUND) diff --git a/src/mx_stream/mx_stream.cc b/src/mx_stream/mx_stream.c similarity index 99% rename from src/mx_stream/mx_stream.cc rename to src/mx_stream/mx_stream.c index 6ff633767e57216a6b640f735792a9abcc38dc57..758488ce1048081c347a6520438c015aa8becbc3 100644 --- a/src/mx_stream/mx_stream.cc +++ b/src/mx_stream/mx_stream.c @@ -56,9 +56,7 @@ volatile int threads_running; unsigned int do_wait = 0; // Wait for this number of milliseconds before starting a cycle unsigned int wait_delay = 4; // Wait before acknowledging sends with mx_wait() for this number of cycles times nsys -extern "C" { extern void *findSharedMemory(char *); -} void usage()