diff options
author | Brad King <brad.king@kitware.com> | 2009-07-27 16:43:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-27 16:43:42 (GMT) |
commit | 2b849a77a6e108100cae8d1ae59be2a7727a66ec (patch) | |
tree | 75304fec96220ca657523ca12377099ab4ece647 /Tests/Fortran/CMakeLists.txt | |
parent | 1c98cdf2243313932eec329efcad5180591e177b (diff) | |
download | CMake-2b849a77a6e108100cae8d1ae59be2a7727a66ec.zip CMake-2b849a77a6e108100cae8d1ae59be2a7727a66ec.tar.gz CMake-2b849a77a6e108100cae8d1ae59be2a7727a66ec.tar.bz2 |
ENH: Test Fortran and C++ in one executable
This extends the Fortran-to-C interface test to add a C++ source file.
The executable can only link with the C++ linker and with the proper
Fortran runtime libraries. These libraries should be detected by CMake
automatically, so this tests verifies the detection functionality.
Diffstat (limited to 'Tests/Fortran/CMakeLists.txt')
-rw-r--r-- | Tests/Fortran/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index d11d299..91390e9 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required (VERSION 2.6) -project(testf Fortran C) +project(testf Fortran C CXX) message("CTEST_FULL_OUTPUT ") set(CMAKE_VERBOSE_MAKEFILE 1) message("ENV_FLAGS = $ENV{FFLAGS}") @@ -30,7 +30,7 @@ function(test_fortran_c_interface_module) endif(FORTRAN_C_MODULE_MANGLING_FOUND) endif() set(FORTRAN_FUNCTIONS ${FORTRAN_FUNCTIONS} my_sub mysub ) - set(srcs ${srcs} mysub.f foo.c) + set(srcs ${srcs} mysub.f foo.c foo.cxx) create_fortran_c_interface("F_" FORTRAN_FUNCTIONS "${testf_BINARY_DIR}/foo.h") include_directories("${testf_BINARY_DIR}") |