Skip to content

Commit aa1e969

Browse files
committed
Revert "[test-suite] Disable Fortran FM509 test when -std=legacy is not supported"
This reverts commit 518d9c3. Due to failures like https://lab.llvm.org/buildbot/#/builders/174/builds/7154 where "Source" is not being respected as it should have been.
1 parent 518d9c3 commit aa1e969

File tree

2 files changed

+12
-26
lines changed

2 files changed

+12
-26
lines changed

Fortran/UnitTests/fcvs21_f95/CMakeLists.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,13 @@
3333
# clean-up fort.* files otherwise one of the tests will fail
3434
llvm_test_prepare(rm -f %S/fort.*)
3535

36-
file(GLOB Source CONFIGURE_DEPENDS *.f)
37-
38-
# Test 509 requires this flag in more recent versions of GCC.
39-
# If this flag is not supported, the test should be excluded.
36+
# Test 509 requires this flag in more recent versions of GCC
4037
check_fortran_compiler_flag("-std=legacy" SUPPORTS_LEGACY)
4138
if (SUPPORTS_LEGACY)
4239
add_compile_options(-std=legacy)
43-
else()
44-
# Regex because the GLOB returns the full path to each file
45-
list(FILTER Source EXCLUDE REGEX "FM509\.f$")
46-
endif()
40+
endif ()
4741

4842
set(FP_TOLERANCE 1.0e-11) # set by the most sensitive numerical test
49-
llvm_singlesource(${Source})
43+
llvm_singlesource()
5044

5145
file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")

cmake/modules/SingleMultiSource.cmake

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
#
88
# Defines helpers to add executables and tests. The entry points to this
99
# file are:
10-
# `llvm_singlesource([PREFIX p] [sources...])`, and
10+
# `llvm_singlesource([PREFIX p])`, and
1111
# `llvm_multisource()`
1212
#
1313
# Following convenience functions provide shortcuts for common test cases:
1414
#
15-
# llvm_singlesource([PREFIX p] [sources...])
15+
# llvm_singlesource([PREFIX p])
1616
#
17-
# Invokes llvm_test_executable() for each C/C++/Fortran source file.
18-
# If sources is empty, creates test executables for all C/C++/Fortran
19-
# files in current directory.
17+
# Invokes llvm_test_executable() for each c/c++ source file. If
18+
# 'sources is emptyno sources are specified, creates test executables
19+
# for all C/C++ files in current directory.
2020
# Passes optional PREFIX parameter to llvm_test_executable().
2121
#
2222
# llvm_multisource(target)
@@ -27,22 +27,14 @@
2727
include(TestSuite)
2828

2929
# Configure the current directory as a SingleSource subdirectory - i.e. every
30-
# C/C++/Fortran file is treated as its own test.
30+
# file in *.{c,cpp,cc} is treated as its own test.
3131
function(llvm_singlesource)
32-
# PREFIX is optional so it cannot be a named argument.
3332
cmake_parse_arguments(_LSARG "" "PREFIX" "" ${ARGN})
34-
if(DEFINED _LSARG_PREFIX)
35-
# Remove "PREFIX" and the associated value from ARGN so that it only
36-
# contains sources.
37-
list(REMOVE_AT ARGN 0)
38-
list(REMOVE_AT ARGN 0)
39-
endif()
40-
41-
set(sources ${ARGN})
42-
if(NOT sources)
33+
if(DEFINED Source)
34+
set(sources ${Source})
35+
else()
4336
file(GLOB sources *.c *.cpp *.cc *.f *.F *.f90 *.F90)
4437
endif()
45-
4638
foreach(source ${sources})
4739
basename(name ${source})
4840
set(_target ${_LSARG_PREFIX}${name})

0 commit comments

Comments
 (0)