From: Jay Krell Date: Thu, 8 Feb 2018 06:26:03 +0000 (+0300) Subject: Compile some GC tests as C++ to test extern 'C' in header files X-Git-Tag: v8.0.0~365 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e86bb4f781292c6256f35d055a42b54e5a641392;p=gc 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. --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 26663493..3c84220b 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)