From 87199ea66b171708736e85989bf9b0af89a805c1 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 21:41:33 +0800 Subject: CheckIPOSupported: Add Fortran support --- Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in | 8 ++++++++ Modules/CheckIPOSupported/foo.f | 2 ++ Modules/CheckIPOSupported/main.f | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in create mode 100644 Modules/CheckIPOSupported/foo.f create mode 100644 Modules/CheckIPOSupported/main.f (limited to 'Modules/CheckIPOSupported') diff --git a/Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in b/Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in new file mode 100644 index 0000000000..9fab0772f4 --- /dev/null +++ b/Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION "@CMAKE_VERSION@") +project("@TRY_COMPILE_PROJECT_NAME@" LANGUAGES Fortran) + +cmake_policy(SET CMP0069 NEW) + +add_library(foo foo.f) +add_executable(boo main.f) +target_link_libraries(boo PUBLIC foo) diff --git a/Modules/CheckIPOSupported/foo.f b/Modules/CheckIPOSupported/foo.f new file mode 100644 index 0000000000..945d2d559e --- /dev/null +++ b/Modules/CheckIPOSupported/foo.f @@ -0,0 +1,2 @@ + SUBROUTINE FOO + END diff --git a/Modules/CheckIPOSupported/main.f b/Modules/CheckIPOSupported/main.f new file mode 100644 index 0000000000..9d1de9f8a4 --- /dev/null +++ b/Modules/CheckIPOSupported/main.f @@ -0,0 +1,3 @@ + PROGRAM BOO + CALL FOO() + END -- cgit v1.2.1