Different flags for compiling and linking with Fortran

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Different flags for compiling and linking with Fortran

xavier lacoste
Dear cmake users,

For some Fortran compiler we need to remove flags we added to CMAKE_Fortran_FLAGS_RELEASE to be able to link (options not recognized at link).

Do you have any idea of how to do so ?

A practical case is the xlf90 -cpp flag.
I have several .f90 files that need preprocessing so I require -cpp -qsuffix=cpp=f90 at compile time but it is not supported at link time.

If I use :
FFLAGS="-g -cpp -qxlf2003=POLYmorphic -qsuffix=cpp=f90 -qextname -qdirective='IBM*' -qport=typlssarg"
I get an error when CMake tries to build a fortran file with XLF :
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r  -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler "/opt/ibm/xlf/15.1.5/bin/xlf90_r" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: /home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp

  

  Run Build Command:/usr/bin/gmake "cmTryCompileExec3078717336/fast"

  gmake[1]: Entering directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'


  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3078717336.dir/build.make
  CMakeFiles/cmTryCompileExec3078717336.dir/build

  gmake[2]: Entering directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'


  /usr/bin/cmake -E cmake_progress_report
  /home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building Fortran object
  CMakeFiles/cmTryCompileExec3078717336.dir/testFortranCompiler.f.o

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -g -cpp -qxlf2003=POLYmorphic
  -qsuffix=cpp=f90 -qextname -qdirective='IBM*' -qport=typlssarg -c
  /home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp/testFortranCompiler.f
  -o CMakeFiles/cmTryCompileExec3078717336.dir/testFortranCompiler.f.o

  ** testfortran === End of Compilation 1 ===

  1501-510 Compilation successful for file testFortranCompiler.f.

  Linking Fortran executable cmTryCompileExec3078717336

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec3078717336.dir/link.txt --verbose=1

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -g -cpp -qxlf2003=POLYmorphic
  -qsuffix=cpp=f90 -qextname -qdirective='IBM*' -qport=typlssarg
  CMakeFiles/cmTryCompileExec3078717336.dir/testFortranCompiler.f.o -o
  cmTryCompileExec3078717336

  /opt/ibm/xlf/15.1.5/bin/.orig/xlf90_r: 1501-294 (S) No input file
  specified.  Please use -qhelp for more information.

  gmake[2]: *** [cmTryCompileExec3078717336] Error 249

  gmake[2]: Leaving directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'


  gmake[1]: *** [cmTryCompileExec3078717336/fast] Error 2

  gmake[1]: Leaving directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'

This is due to the preprocessing flags given at link time.
I could solve it by renaming all my .f90 into .F90 files but, with cray compiler, I have an other issue that also need to separate link and compile flags.

Regards,

Xavier LACOSTE

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Different flags for compiling and linking with Fortran

xavier lacoste
Dear Cmake Users,

I could reproduce this with a minimal CMakeLists.txt :

[lacoste@caimanp8 test]$ cat CMakeLists.txt
###############################################################################
#                                                                             #
# CMake proposal for SABL projects based on Python + libs in C/Fortran        #
#                                                                             #
###############################################################################

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)


PROJECT(TOTO)
ENABLE_LANGUAGE (C Fortran)


[lacoste@caimanp8 test]$ FFLAGS="-cpp" cmake .
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r
-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r
-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The Fortran compiler identification is XL
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r  -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler "/opt/ibm/xlf/15.1.5/bin/xlf90_r" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: /home/lacoste/test/CMakeFiles/CMakeTmp

  

  Run Build Command:/usr/bin/gmake "cmTryCompileExec1053595571/fast"

  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec1053595571.dir/build.make
  CMakeFiles/cmTryCompileExec1053595571.dir/build

  gmake[1]: Entering directory `/home/lacoste/test/CMakeFiles/CMakeTmp'

  /usr/bin/cmake -E cmake_progress_report
  /home/lacoste/test/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building Fortran object
  CMakeFiles/cmTryCompileExec1053595571.dir/testFortranCompiler.f.o

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -cpp -qthreaded -qhalt=e -c
  /home/lacoste/test/CMakeFiles/CMakeTmp/testFortranCompiler.f -o
  CMakeFiles/cmTryCompileExec1053595571.dir/testFortranCompiler.f.o

  ** testfortran === End of Compilation 1 ===

  1501-510 Compilation successful for file testFortranCompiler.f.

  Linking Fortran executable cmTryCompileExec1053595571

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec1053595571.dir/link.txt --verbose=1

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -cpp -qthreaded -qhalt=e
  CMakeFiles/cmTryCompileExec1053595571.dir/testFortranCompiler.f.o -o
  cmTryCompileExec1053595571

  /opt/ibm/xlf/15.1.5/bin/.orig/xlf90_r: 1501-294 (S) No input file
  specified.  Please use -qhelp for more information.

  gmake[1]: *** [cmTryCompileExec1053595571] Error 249

  gmake[1]: Leaving directory `/home/lacoste/test/CMakeFiles/CMakeTmp'

  gmake: *** [cmTryCompileExec1053595571/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:11 (ENABLE_LANGUAGE)


-- Configuring incomplete, errors occurred!
See also "/home/lacoste/test/CMakeFiles/CMakeOutput.log".
See also "/home/lacoste/test/CMakeFiles/CMakeError.log".

Regards,

XL


2017-06-15 9:04 GMT+02:00 xavier lacoste <[hidden email]>:
Dear cmake users,

For some Fortran compiler we need to remove flags we added to CMAKE_Fortran_FLAGS_RELEASE to be able to link (options not recognized at link).

Do you have any idea of how to do so ?

A practical case is the xlf90 -cpp flag.
I have several .f90 files that need preprocessing so I require -cpp -qsuffix=cpp=f90 at compile time but it is not supported at link time.

If I use :
FFLAGS="-g -cpp -qxlf2003=POLYmorphic -qsuffix=cpp=f90 -qextname -qdirective='IBM*' -qport=typlssarg"
I get an error when CMake tries to build a fortran file with XLF :
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r  -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler "/opt/ibm/xlf/15.1.5/bin/xlf90_r" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: /home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp

  

  Run Build Command:/usr/bin/gmake "cmTryCompileExec3078717336/fast"

  gmake[1]: Entering directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'


  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3078717336.dir/build.make
  CMakeFiles/cmTryCompileExec3078717336.dir/build

  gmake[2]: Entering directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'


  /usr/bin/cmake -E cmake_progress_report
  /home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building Fortran object
  CMakeFiles/cmTryCompileExec3078717336.dir/testFortranCompiler.f.o

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -g -cpp -qxlf2003=POLYmorphic
  -qsuffix=cpp=f90 -qextname -qdirective='IBM*' -qport=typlssarg -c
  /home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp/testFortranCompiler.f
  -o CMakeFiles/cmTryCompileExec3078717336.dir/testFortranCompiler.f.o

  ** testfortran === End of Compilation 1 ===

  1501-510 Compilation successful for file testFortranCompiler.f.

  Linking Fortran executable cmTryCompileExec3078717336

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec3078717336.dir/link.txt --verbose=1

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -g -cpp -qxlf2003=POLYmorphic
  -qsuffix=cpp=f90 -qextname -qdirective='IBM*' -qport=typlssarg
  CMakeFiles/cmTryCompileExec3078717336.dir/testFortranCompiler.f.o -o
  cmTryCompileExec3078717336

  /opt/ibm/xlf/15.1.5/bin/.orig/xlf90_r: 1501-294 (S) No input file
  specified.  Please use -qhelp for more information.

  gmake[2]: *** [cmTryCompileExec3078717336] Error 249

  gmake[2]: Leaving directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'


  gmake[1]: *** [cmTryCompileExec3078717336/fast] Error 2

  gmake[1]: Leaving directory
  `/home/lacoste/sabl/build/ppc64le_LinuxRH7.3_xlfCommunity_spectrummpi10.1.0/CMakeFiles/CMakeTmp'

This is due to the preprocessing flags given at link time.
I could solve it by renaming all my .f90 into .F90 files but, with cray compiler, I have an other issue that also need to separate link and compile flags.

Regards,

Xavier LACOSTE


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Different flags for compiling and linking with Fortran

Chuck Atkins
Hi Xavier,

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
...
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
...
-- The Fortran compiler identification is XL

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?

----------
Chuck Atkins
Staff R&D Engineer, Scientific Computing
Kitware, Inc.





--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Different flags for compiling and linking with Fortran

xavier lacoste
Hello Chuck,

Indeed I had an old 2.8.12.2 version I upgraded to 3.8.2 and get correct detection of xlc.
But still the same error with xlf linking with -fpp if I have FFLAGS="-fpp" :

[lacoste@caimanp8 test]$ cmake --version
cmake version 3.8.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
[lacoste@caimanp8 test]$ module load xlc
[lacoste@caimanp8 test]$ module load xlf
[lacoste@caimanp8 test]$ FFLAGS="-cpp" cmake  .
-- The C compiler identification is XL 13.1.5
-- The CXX compiler identification is XL 13.1.5
-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r
-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r
-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The Fortran compiler identification is XL 15.1.5
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r  -- broken
CMake Error at /home/lacoste/cmake/share/cmake-3.8/Modules/CMakeTestFortranCompiler.cmake:44 (message):
  The Fortran compiler "/opt/ibm/xlf/15.1.5/bin/xlf90_r" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: /home/lacoste/test/CMakeFiles/CMakeTmp

  

  Run Build Command:"/usr/bin/gmake" "cmTC_38cf1/fast"

  /usr/bin/gmake -f CMakeFiles/cmTC_38cf1.dir/build.make
  CMakeFiles/cmTC_38cf1.dir/build

  gmake[1]: Entering directory `/home/lacoste/test/CMakeFiles/CMakeTmp'

  Building Fortran object CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -cpp -qthreaded -qhalt=e -c
  /home/lacoste/test/CMakeFiles/CMakeTmp/testFortranCompiler.f -o
  CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o

  ** testfortran === End of Compilation 1 ===

  1501-510 Compilation successful for file testFortranCompiler.f.

  Linking Fortran executable cmTC_38cf1

  /home/lacoste/cmake/bin/cmake -E cmake_link_script
  CMakeFiles/cmTC_38cf1.dir/link.txt --verbose=1

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -Wl,-export-dynamic -cpp -qthreaded
  -qhalt=e CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o -o cmTC_38cf1

  /opt/ibm/xlf/15.1.5/bin/.orig/xlf90_r: 1501-294 (S) No input file
  specified.  Please use -qhelp for more information.

  gmake[1]: *** [cmTC_38cf1] Error 249

  gmake[1]: Leaving directory `/home/lacoste/test/CMakeFiles/CMakeTmp'

  gmake: *** [cmTC_38cf1/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:11 (ENABLE_LANGUAGE)


-- Configuring incomplete, errors occurred!
See also "/home/lacoste/test/CMakeFiles/CMakeOutput.log".
See also "/home/lacoste/test/CMakeFiles/CMakeError.log".


2017-06-15 15:06 GMT+02:00 Chuck Atkins <[hidden email]>:
Hi Xavier,

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
...
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
...
-- The Fortran compiler identification is XL

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?

----------
Chuck Atkins
Staff R&D Engineer, Scientific Computing
Kitware, Inc.






--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Different flags for compiling and linking with Fortran

xavier lacoste
A solution was to append the options to COMPILE_FLAGS using set_file_source_property().


Le 15 juin 2017 15:29, "xavier lacoste" <[hidden email]> a écrit :
Hello Chuck,

Indeed I had an old 2.8.12.2 version I upgraded to 3.8.2 and get correct detection of xlc.
But still the same error with xlf linking with -fpp if I have FFLAGS="-fpp" :

[lacoste@caimanp8 test]$ cmake --version
cmake version 3.8.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
[lacoste@caimanp8 test]$ module load xlc
[lacoste@caimanp8 test]$ module load xlf
[lacoste@caimanp8 test]$ FFLAGS="-cpp" cmake  .
-- The C compiler identification is XL 13.1.5
-- The CXX compiler identification is XL 13.1.5
-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r
-- Check for working C compiler: /opt/ibm/xlC/13.1.5/bin/xlc_r -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r
-- Check for working CXX compiler: /opt/ibm/xlC/13.1.5/bin/xlC_r -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The Fortran compiler identification is XL 15.1.5
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r
-- Check for working Fortran compiler: /opt/ibm/xlf/15.1.5/bin/xlf90_r  -- broken
CMake Error at /home/lacoste/cmake/share/cmake-3.8/Modules/CMakeTestFortranCompiler.cmake:44 (message):
  The Fortran compiler "/opt/ibm/xlf/15.1.5/bin/xlf90_r" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: /home/lacoste/test/CMakeFiles/CMakeTmp

  

  Run Build Command:"/usr/bin/gmake" "cmTC_38cf1/fast"

  /usr/bin/gmake -f CMakeFiles/cmTC_38cf1.dir/build.make
  CMakeFiles/cmTC_38cf1.dir/build

  gmake[1]: Entering directory `/home/lacoste/test/CMakeFiles/CMakeTmp'

  Building Fortran object CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -cpp -qthreaded -qhalt=e -c
  /home/lacoste/test/CMakeFiles/CMakeTmp/testFortranCompiler.f -o
  CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o

  ** testfortran === End of Compilation 1 ===

  1501-510 Compilation successful for file testFortranCompiler.f.

  Linking Fortran executable cmTC_38cf1

  /home/lacoste/cmake/bin/cmake -E cmake_link_script
  CMakeFiles/cmTC_38cf1.dir/link.txt --verbose=1

  /opt/ibm/xlf/15.1.5/bin/xlf90_r -Wl,-export-dynamic -cpp -qthreaded
  -qhalt=e CMakeFiles/cmTC_38cf1.dir/testFortranCompiler.f.o -o cmTC_38cf1

  /opt/ibm/xlf/15.1.5/bin/.orig/xlf90_r: 1501-294 (S) No input file
  specified.  Please use -qhelp for more information.

  gmake[1]: *** [cmTC_38cf1] Error 249

  gmake[1]: Leaving directory `/home/lacoste/test/CMakeFiles/CMakeTmp'

  gmake: *** [cmTC_38cf1/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:11 (ENABLE_LANGUAGE)


-- Configuring incomplete, errors occurred!
See also "/home/lacoste/test/CMakeFiles/CMakeOutput.log".
See also "/home/lacoste/test/CMakeFiles/CMakeError.log".


2017-06-15 15:06 GMT+02:00 Chuck Atkins <[hidden email]>:
Hi Xavier,

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
...
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
...
-- The Fortran compiler identification is XL

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?

----------
Chuck Atkins
Staff R&D Engineer, Scientific Computing
Kitware, Inc.






--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...