[CMake] Cmake 3.1 generated projects for VS2010+ifort12.1, compiler can't recognize $(Configuration)
Fenjuan Hu
fenjuan at bios.au.dk
Tue Nov 4 05:48:41 EST 2014
Hi all
I am using Cmake3.1, and want to generate a Fortran project on Visual Studio 2010. And I have ifort 12.1 installed on my computer. After generated the project, when I build them, I got error:
Error 1 fatal error LNK1181: cannot open input file 'C:\MODELS\build\fabm\0d\models\bb\bb.dir\\filter_feeder.obj' LINK
The Filter_feeder.obj file is under path 'C:\MODELS\build\fabm\0d\models\bb\bb.dir\Release\filter_feeder.obj'
While in Fortran project file, it tells Visual studio to look for 'C:\MODELS\build\fabm\0d\models\bb\bb.dir\($Configuration)\filter_feeder.obj
And apparently, my platform(VS2010 + ifort 12.1) can't recognize "($Configuration)" during compilation.
It is said it's due to the Visual Studio has changed environment variable ($ConfigurationName) to ($Configuration) from VS2008 to VS2010. Then I replaced all ($Configuration) by ($ConfigurationName) in the vfproj file, the compilation worked.
And by the way, we have several people work on the same project, and two of my colleague using VS2010 and ifort worked perfectly with this CMake generating system. Their settings on my colleague's are:
VS2010, version 10.0.40219.1 SP1Rel
Intel Visual Fortran Composer XE 2013 Update 1, version 13.0.1.119
And
VS2010, version 10.0.40219.1 SP1Rel
Intel Visual Fortran Composer XE 2013 Update 1, version 13.0.1.119
And mine is :
VS2010, version 10.0.40219.1 SP1Rel
Intel Visual Fortran Composer XE 2013 Update 1, version 12.1.3534
So the only difference was the versions of ifort compiler. My version is a little old.
So can CMake take this into consideration when generating project files for Fortran?
Best regards
Fen
======================================================================
Fenjuan Hu
Joint Ph.D student of Southern Denmark University and Aarhus University
Adr.: Department of Bioscience, Aarhus University,Vejlsøvej 25, 8600 Silkeborg, Denmark
Contact info: fenjuan at bios.au.dk<mailto:fenjuan at bios.au.dk>
Contact info: fenjuan at biology.sdu.dk<mailto:fenjuan at biology.sdu.dk>
Mobile: +45 52640478
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141104/cda2738b/attachment-0001.html>
More information about the CMake
mailing list