[cmake-developers] VS2010 fortran composer

Bill Hoffman bill.hoffman at kitware.com
Wed Mar 9 15:01:38 EST 2011


On 3/9/2011 1:49 PM, Biddiscombe, John A. wrote:
> *Thanks*
>
> **
>
> *It’s a bit of a hack, but testing for the target name and overriding
> the output path seems to work.*
>
> *This gets me past the trycompile step so now projects are being
> generated from scratch.*
>
> **
>
> *if (this->Name=="cmTryCompileExec") {*
>
> *std::string path =
> cmsys::SystemTools::GetFilenamePath(this->PathToVcxproj);*
>
> *(*this->BuildFileStream ) << " OutputFile=\"" *
>
> *<< cmsys::SystemTools::ConvertToWindowsOutputPath(path.c_str()).c_str() *
>
> *<< "\\" << this->Name << ".exe\"/>\n";*
>
> *}*
>
> *else {*
>
> *(*this->BuildFileStream ) << "/>\n";*
>
> *}*
>
> **
>
> *I’ll stick with this for now - if there’s a better way I’ll no doubt
> find out eventually ...*
>

That seems a bit crazy, and other stuff will break for you and other 
try-compile stuff.   There must be a way to change this all the time. 
We want it to be consistent with the C/C++ targets in the output path. 
It also has to match CMAKE_INTDIR, or tons of stuff will not work.

Are you doing this in a public git repo somewhere?

-Bill



More information about the cmake-developers mailing list