[CMake] intel fortran compiler 10: KPIC flag not supported

wim van hoydonck wim.van.hoydonck at gmail.com
Sun Sep 2 09:19:45 EDT 2007


Hi there,

In file cmake/Modules/Platform/Linux-ifort.cmake, the second line sets
CMAKE_SHARED_LIBRARY_Fortran_FLAGS to -KPIC.

This doesn't work for intel fortran compiler version 10. (ifort
(IFORT) 10.0 20070426) since the option '-K' is not supported any
more:

ifort: command line remark #10148: option '-K' not supported


Could that second line be changed from:

SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")

to

SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC")

which AFAIK works for all versions prior to 10 of the intel fortran compiler?


Kind regards,

Wim


More information about the CMake mailing list