mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 03:11:08 -06:00
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.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user