[CMake] cmake do not read my ifort compiler fllags - correct version

pellegrini pellegrini at ill.fr
Wed Sep 29 06:06:14 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 ! However, when I put a 
message("hello") inside my file, it appears when building the cmake files.

would you have any idea ?

thanks

Eric




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

_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

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



More information about the CMake mailing list