Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Question about VFCustomBuildTool

Hansom_B_
Beginner
628 Views

Hi,


I'm trying to use CMake (version 2.8.10) for a Fortran project with Visual Studio 10 and Intel Visual Fortran Composer XE 2011. But the generated .vfproj file seems to have bugs.

Below is the snippet in question:

[plain]

<Tool Name="VFCustomBuildTool" CommandLine="setlocal
m4 D:/foo/m4/sub/hello.m4 &gt; D:/foo/build-vs/hello.f90
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal &amp; call :cmErrorLevel %errorlevel% &amp; goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd" Description="Generating hello.f90" Outputs="D:\foo\build-vs\hello.f90" AdditionalDependencies="D:\foo\m4\sub\hello.m4;"/>

[/plain]

Obviously the tag "VCEnd" is missing. So I modify the code to

[plain]

...
if %errorlevel% neq 0 goto :VCEnd
:VCEnd
endlocal" Description="
...

[/plain]

When building, Visual Studio prompts:

>Generating hello.f90
>Project : error PRJ0019: A tool returned an error code from "Generating hello.f90"

I checked that the file "D:/foo/build-vs/hello.f90" is correctly generated, so the command "m4 D:/foo/m4/sub/hello.m4 &gt; D:/foo/build-vs/hello.f90" has been executed properly and should return 0. How is the prompted "an error code" returned? I found little information on .vfproj file/ VFCustomBuildTool specification either in Intel Visual Fortran manual  or on Internet. So I cannot figure out how to resolve this problem. Any suggestions? Thanks in advance.

0 Kudos
0 Replies
Reply