Skip to content

Commit 8c18b14

Browse files
pscorodaltenty
authored andcommitted
Enable Fortran testsuite when TEST_SUITE_SUBDIRS=Fortran
Enable Fortran testsuite/language when TEST_SUITE_SUBDIRS=Fortran is passed Differential Revision: https://reviews.llvm.org/D139633
1 parent 361a7aa commit 8c18b14

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ cmake_minimum_required(VERSION 3.13.4)
22

33
include(CheckSymbolExists)
44

5-
option(TEST_SUITE_FORTRAN "Enable Fortran test suite" OFF)
65

76
project(test-suite C CXX)
87

8+
if(${TEST_SUITE_SUBDIRS} MATCHES "Fortran")
9+
set(TEST_SUITE_FORTRAN_default ON)
10+
else()
11+
set(TEST_SUITE_FORTRAN_default OFF)
12+
endif()
13+
option(TEST_SUITE_FORTRAN "Enable Fortran test suite" ${TEST_SUITE_FORTRAN_default})
14+
915
if(TEST_SUITE_FORTRAN)
1016
enable_language(Fortran)
1117
endif()

Fortran/UnitTests/fcvs21_f95/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
# explicit acknowledgement of what has been changed. Please
3434
# amend README file if you modify the tests.
3535

36+
include(CheckFortranCompilerFlag)
37+
3638
# clean-up fort.* files otherwise one of the tests will fail
3739
llvm_test_prepare(rm -f %S/fort.*)
3840

0 commit comments

Comments
 (0)