CMake/Tests/CxxSubdirC/CMakeLists.txt
Brad King 07fc7b75ef Tests: Test using objects from a language enabled in a subdirectory (#15325)
Add a test case that enables CXX in the top level and C in a subdirectory.
Create an executable in the top level that uses C objects compiled in the
subdirectory.  Strictly speaking this is not defined behavior for all
language combinations, but happens to work in this case.  Test this
behavior since projects might try to use it.
2014-12-22 20:13:40 -05:00

5 lines
142 B
CMake

cmake_minimum_required(VERSION 3.0)
project(CxxSubdirC CXX)
add_subdirectory(Cdir)
add_executable(CxxSubdirC main.cxx $<TARGET_OBJECTS:Cobj>)