diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index a9cad1456..f6543304f 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -255,6 +255,7 @@ if(BUILD_TESTING) endif() ADD_TEST_MACRO(COnly COnly) ADD_TEST_MACRO(CxxOnly CxxOnly) + ADD_TEST_MACRO(CxxSubdirC CxxSubdirC) ADD_TEST_MACRO(IPO COnly/COnly) ADD_TEST_MACRO(OutDir runtime/OutDir) ADD_TEST_MACRO(ObjectLibrary UseCshared) diff --git a/Tests/CxxSubdirC/CMakeLists.txt b/Tests/CxxSubdirC/CMakeLists.txt new file mode 100644 index 000000000..52474f8dc --- /dev/null +++ b/Tests/CxxSubdirC/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.0) +project(CxxSubdirC CXX) +add_subdirectory(Cdir) +add_executable(CxxSubdirC main.cxx $) diff --git a/Tests/CxxSubdirC/Cdir/CMakeLists.txt b/Tests/CxxSubdirC/Cdir/CMakeLists.txt new file mode 100644 index 000000000..08a87579b --- /dev/null +++ b/Tests/CxxSubdirC/Cdir/CMakeLists.txt @@ -0,0 +1,2 @@ +enable_language(C) +add_library(Cobj OBJECT Cobj.c) diff --git a/Tests/CxxSubdirC/Cdir/Cobj.c b/Tests/CxxSubdirC/Cdir/Cobj.c new file mode 100644 index 000000000..75a00458b --- /dev/null +++ b/Tests/CxxSubdirC/Cdir/Cobj.c @@ -0,0 +1 @@ +int Cobj(void) { return 0; } diff --git a/Tests/CxxSubdirC/main.cxx b/Tests/CxxSubdirC/main.cxx new file mode 100644 index 000000000..049220f11 --- /dev/null +++ b/Tests/CxxSubdirC/main.cxx @@ -0,0 +1,2 @@ +extern "C" int Cobj(void); +int main() { return Cobj(); }