<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">There's a newly open sourced fortran compiler flang: <a href="https://github.com/flang-compiler/flang">https://github.com/flang-compiler/flang</a></div><div dir="ltr"><br></div><div>The CMakeTestFortranCompiler.cmake erroneously says that the compiler doesn't work.</div><div><br></div><div><div>-- The Fortran compiler identification is Flang 99.99.1</div><div>-- Check for working Fortran compiler: /usr/local/bin/flang</div><div>-- Check for working Fortran compiler: /usr/local/bin/flang  -- broken</div><div>CMake Error at /usr/local/share/cmake/Modules/CMakeTestFortranCompiler.cmake:45 (message):</div><div>  The Fortran compiler</div><div><br></div><div>    "/usr/local/bin/flang"</div><div><br></div><div>  is not able to compile a simple test program.</div><div><br></div><div>  It fails with the following output:</div><div><br></div><div>    Change Dir: /wrkdirs/usr/ports/math/trilinos/work/.build/CMakeFiles/CMakeTmp</div><div>    </div><div>    Run Build Command:"/usr/local/bin/ninja" "cmTC_3bdf7"</div><div>    [1/4] Building Fortran preprocessed CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f</div><div>    FAILED: CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f.ddi </div><div>    /usr/local/bin/flang -cpp    -E testFortranCompiler.f -o CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f && /usr/local/bin/cmake -E cmake_ninja_depends --tdi=CMakeFiles/cmTC_3bdf7.dir/FortranDependInfo.json --pp=CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f --dep=CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f.d --obj=CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f.o --ddi=CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f.ddi</div><div>    # 1 "testFortranCompiler.f"</div><div>    # 2 "testFortranCompiler.f"</div><div>            PROGRAM TESTFortran</div><div>            PRINT *, 'Hello'</div><div>            END</div><div>      </div><div>    CMake Error: -E cmake_ninja_depends failed to open CMakeFiles/cmTC_3bdf7.dir/testFortranCompiler.f-pp.f</div><div>    ninja: build stopped: subcommand failed.</div></div><div><br></div><div>the fortran compiler does work if you remove the -E flag from the the compilation command.</div><div><br></div><div>Is this an issue something that can get some attention?</div><div><br></div><div>Best,</div><div>Owen</div></div></div></div>