Browse Source

LLVMFlang-Fortran: Use -J instead of -module-dir

In flang, both -J and -module-dir support both joined and separate values. For
the -J option, these are of the form `-J<value>` and `-J <value>` respectively.
Once https://github.com/llvm/llvm-project/pull/168748 is committed, -module-dir
will only work with a separate value. Setting CMAKE_Fortran_MODDIR_FLAG to -J
ensures that both joined and separate styles will continue to work after that
change is made. As far as behavior is concerned, both -J and -module-dir are
aliases.
Tarun Prabhu 1 week ago
parent
commit
db6b82ae54
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/Compiler/LLVMFlang-Fortran.cmake

+ 1 - 1
Modules/Compiler/LLVMFlang-Fortran.cmake

@@ -7,7 +7,7 @@ set(CMAKE_Fortran_PREPROCESS_SOURCE
 set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
 set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
 
-set(CMAKE_Fortran_MODDIR_FLAG "-module-dir")
+set(CMAKE_Fortran_MODDIR_FLAG "-J")
 
 set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
 set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")