[CMake] cmake do not read my ifort compiler fllags

pellegrini pellegrini at ill.fr
Wed Sep 29 06:02:16 EDT 2010


Hello everybody,

I would like to set my own compiler flags to compile a library using 
intel fortran compiler.

To do so, I created in my Src/ directory a 
"Compiler/Intel-Fortran.cmake" file that contains my preferences such as:

SET(CMAKE_BUILD_TYPE_INIT Release)
SET(CMAKE_Fortran_FLAGS_INIT "")
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full /check /traceback /nologo")
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /nologo /Qvec-report0")
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "/O2 /nologo /Qvec-report0")
SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /nologo /traceback 
/debug:full")
SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
SET(CMAKE_Fortran_VERBOSE_FLAG "-v")

but, when running cmake and then nmake, the compiler flags used are not 
the ones I set but the default ones. I do not
understand because I used to do the same with g95 and it worked 
perfectly. By the way, the flags used seem to be the ones
set in the  "Modules/Platform/Windows-ifort.cmake" cmake distribution, 
as if that file was parsed instead of mine !

would you have any idea ?

thanks

Eric




-- 
Eric Pellegrini
Calcul Scientifique
Insitut Laue-Langevin
Grenoble, France



More information about the CMake mailing list