Question about VFCustomBuildTool

Question about VFCustomBuildTool


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:

<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
endlocal &amp; call :cmErrorLevel %errorlevel% &amp; goto :cmDone
exit /b %1
if %errorlevel% neq 0 goto :VCEnd" Description="Generating hello.f90" Outputs="D:foobuild-vshello.f90" AdditionalDependencies="D:foom4subhello.m4;"/>

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

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

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.

1 contribution / 0 nouveau(x)
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.