llvm-project/flang/test/Driver/write-module.f90
Tim Keith 8720ec6b9a [flang] Add -J and -module-dir to f18 driver
Add -J to the f18 driver for compatibility with gfortran.
Add -module-dir for compatibility with the new flang driver.

They both set the output directory for .mod files and add the
directory to the search list. -module still only does the former.

Clean up the new driver test to match.

Differential Revision: https://reviews.llvm.org/D97164
2021-02-22 09:03:31 -08:00

20 lines
791 B
Fortran

! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only %s
! RUN: ls %t/testmodule.mod && not ls %t/mod-dir/testmodule.mod
! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -module mod-dir %s
! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod
! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -module-dir mod-dir %s
! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod
! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -J mod-dir %s
! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod
! RUN: rm -rf %t && mkdir -p %t/mod-dir && cd %t && %f18 -fparse-only -Jmod-dir %s
! RUN: ls %t/mod-dir/testmodule.mod && not ls %t/testmodule.mod
module testmodule
type::t2
end type
end