From c5b68beddeb8a0a4afea48f91f2b5d4082593594 Mon Sep 17 00:00:00 2001 From: oxmox Date: Sun, 12 Feb 2023 13:46:52 +0100 Subject: [PATCH] add test binary to make sure dp_common can be used from C --- src/CMakeLists.txt | 4 ++++ src/dp_common_c_test.c | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/dp_common_c_test.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ceb4c5d..d028b30 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,6 +31,10 @@ target_link_libraries(dp_imgui_demo PRIVATE imgui ) +add_executable(dp_common_c_test dp_common_c_test.c) +target_compile_features(dp_common_c_test PRIVATE c_std_11) +target_link_libraries(dp_common_c_test PRIVATE dp_common) + add_executable(doomsim doomsim.cc) target_compile_features(doomsim PRIVATE cxx_std_17) target_link_libraries(doomsim diff --git a/src/dp_common_c_test.c b/src/dp_common_c_test.c new file mode 100644 index 0000000..b94dbe6 --- /dev/null +++ b/src/dp_common_c_test.c @@ -0,0 +1,9 @@ +#include "dp_common.h" + +int main(int argc, char *argv[]) +{ + (void) argc; + (void) argv; + log_info("Hello from C11!"); + return 0; +} \ No newline at end of file