<div dir="ltr">Hello Chuck,<div><br></div><div>Indeed I had an old 2.8.12.2 version I upgraded to 3.8.2 and get correct detection of xlc.</div><div>But still the same error with xlf linking with -fpp if I have FFLAGS="-fpp" :</div><div><br></div><div>[lacoste@caimanp8 test]$ cmake --version</div><div>cmake version 3.8.2</div><div><br></div><div>CMake suite maintained and supported by Kitware (<a href="http://kitware.com/cmake">kitware.com/cmake</a>).</div><div>[lacoste@caimanp8 test]$ module load xlc</div><div>[lacoste@caimanp8 test]$ module load xlf</div><div>[lacoste@caimanp8 test]$ FFLAGS="-cpp" cmake  .</div><div>-- The C compiler identification is XL 13.1.5</div><div>-- The CXX compiler identification is XL 13.1.5</div><div>-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r</div><div>-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r -- works</div><div>-- Detecting C compiler ABI info</div><div>-- Detecting C compiler ABI info - done</div><div>-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r</div><div>-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r -- works</div><div>-- Detecting CXX compiler ABI info</div><div>-- Detecting CXX compiler ABI info - done</div><div>-- The Fortran compiler identification is XL 15.1.5</div><div>-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r</div><div>-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r  -- broken</div><div>CMake Error at /home/lacoste/cmake/share/cmake-3.8/Modules/CMakeTestFortranCompiler.cmake:44 (message):</div><div>  The Fortran compiler "/opt/ibm/xlf/15.1.5/bin/xlf90_r" is not able to</div><div>  compile a simple test program.</div><div><br></div><div>  It fails with the following output:</div><div><br></div><div>   Change Dir: /home/lacoste/test/CMakeFiles/CMakeTmp</div><div><br></div><div>  </div><div><br></div><div>  Run Build Command:"/usr/bin/gmake" "cmTC_38cf1/fast"</div><div><br></div><div>  /usr/bin/gmake -f CMakeFiles/cmTC_38cf1.dir/build.make</div><div>  CMakeFiles/cmTC_38cf1.dir/build</div><div><br></div><div>  gmake[1]: Entering directory `/home/lacoste/test/CMakeFiles/CMakeTmp'</div><div><br></div><div>  Building Fortran object CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o</div><div><br></div><div>  /opt/ibm/xlf/15.1.5/bin/xlf90_r -cpp -qthreaded -qhalt=e -c</div><div>  /home/lacoste/test/CMakeFiles/CMakeTmp/testFortranCompiler.f -o</div><div>  CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o</div><div><br></div><div>  ** testfortran === End of Compilation 1 ===</div><div><br></div><div>  1501-510 Compilation successful for file testFortranCompiler.f.</div><div><br></div><div>  Linking Fortran executable cmTC_38cf1</div><div><br></div><div>  /home/lacoste/cmake/bin/cmake -E cmake_link_script</div><div>  CMakeFiles/cmTC_38cf1.dir/link.txt --verbose=1</div><div><br></div><div>  /opt/ibm/xlf/15.1.5/bin/xlf90_r -Wl,-export-dynamic -cpp -qthreaded</div><div>  -qhalt=e CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o -o cmTC_38cf1</div><div><br></div><div>  /opt/ibm/xlf/15.1.5/bin/.orig/xlf90_r: 1501-294 (S) No input file</div><div>  specified.  Please use -qhelp for more information.</div><div><br></div><div>  gmake[1]: *** [cmTC_38cf1] Error 249</div><div><br></div><div>  gmake[1]: Leaving directory `/home/lacoste/test/CMakeFiles/CMakeTmp'</div><div><br></div><div>  gmake: *** [cmTC_38cf1/fast] Error 2</div><div><br></div><div>  </div><div><br></div><div>  </div><div><br></div><div>  CMake will not be able to correctly generate this project.</div><div>Call Stack (most recent call first):</div><div>  CMakeLists.txt:11 (ENABLE_LANGUAGE)</div><div><br></div><div><br></div><div>-- Configuring incomplete, errors occurred!</div><div>See also "/home/lacoste/test/CMakeFiles/CMakeOutput.log".</div><div>See also "/home/lacoste/test/CMakeFiles/CMakeError.log".</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-15 15:06 GMT+02:00 Chuck Atkins <span dir="ltr"><<a href="mailto:chuck.atkins@kitware.com" target="_blank">chuck.atkins@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi Xavier,<br><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)</div></div></div></div></blockquote><div>... <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span class="">-- The C compiler identification is Clang 3.8.0</span><div><span class=""><div>-- The CXX compiler identification is Clang 3.8.0</div></span>... <br></div></div></div></blockquote><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>-- The Fortran compiler identification is XL</div></div></div></blockquote><br></span></div>What version of CMake are you using?  Give that the C and C++ compilers are detected as Clang then I suspect it's rather old.  They should also be detected as XL like the Fortran compiler.  Do you get the same XL Fortran errors using a new version of CMake?<br><br clear="all"></div><div class="gmail_extra"><div><div class="m_4384370167369220150gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">----------<br>Chuck Atkins<br>Staff R&D Engineer, Scientific Computing<br>Kitware, Inc.<br></div></div></div></div></div></div></div>
<br><br><br><br></div></div>
</blockquote></div><br></div>