From e86bb4f781292c6256f35d055a42b54e5a641392 Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Thu, 8 Feb 2018 09:26:03 +0300 Subject: [PATCH] Compile some GC tests as C++ to test extern 'C' in header files Issue #201 (bdwgc). * tests/CMakeLists.txt (SET_SOURCE_FILES_PROPERTIES): Add to treat leak_test.c and test.c as C++ files. --- tests/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2666349..3c84220 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,6 +16,12 @@ ADD_DEFINITIONS(-DGC_NOT_DLL) +# Compile some tests as C++ to test extern "C" in header files. +SET_SOURCE_FILES_PROPERTIES( + leak_test.c + test.c + PROPERTIES LANGUAGE CXX) + ADD_EXECUTABLE(gctest WIN32 test.c) TARGET_LINK_LIBRARIES(gctest gc-lib) ADD_TEST(NAME gctest COMMAND gctest) -- 2.7.4