[cmake-developers] Incomplete gfortran library link command sometimes mysteriously occurs with MinGW/MSYS on Wine-1.5.15 platform

Brad King brad.king at kitware.com
Thu Oct 25 15:14:24 EDT 2012


On 10/25/2012 02:20 PM, Alan W. Irwin wrote:
> bash.exe-3.1$ /z/home/wine/newstart/cmake-2.8.9-win32-x86/bin/cmake.exe -P info.cmake
> bash.exe-3.1$ /z/home/wine/newstart/bootstrap_cmake/install_4.7.0/bin/cmake.exe -P info.cmake
> -- [INFO:compiler[GNU]INFO:platform[]]
> 
> So these results show a clear difference between the two CMake
> versions on Wine-1.5.15

Great.  Note that on a native Windows machine the output of the first
one works.  It breaks only under Wine.  Please try it also in directory

 good_build_dir/CMakeFiles/CompilerIdC

There should be "a.exe" in that directory also.  Try the info.cmake
there with both CMake builds.  What are the outputs?

> Now that we have a clear fundamental difference between the two cmake
> versions can you simplify the test case a lot more? I am thinking along
> the lines of a simple C++ test programme (with one version compiled
> there and one version compiled here) that attempts to do the same
> thing as above.

I think file(STRINGS) may run correctly for the C compiler's "a.exe"
because it does find the compiler id.  It may depend on the content
of the input file.  That is what the above test will reveal.

> Note also, that whatever the issue is, it does not occur for the
> command generated by CMake to link C libraries.

The link line generation for Fortran fails because CMake does not
identify the Fortran compiler due to the file(STRINGS) problem.
It does identify the C compiler so linking works.

-Brad



More information about the cmake-developers mailing list