[CMake] 3.1 can't link my MinGW executables any more.

Brad King brad.king at kitware.com
Mon Dec 1 13:59:03 EST 2014


On 12/01/2014 01:37 PM, Bill Somerville wrote:
> I'm trying to debug this issue but the 3.1.0-rc2 use of linker response 
> files is a PITA because they are created as temporary files and gone 
> before I can look into them.
> 
> Is there for flag I can set to stop them being used so I can see the 
> whole link line?

There are two sources of response files involved.  One is generated
by CMake (linklibs.rsp), and the other is generated by gfortran.
The former is persistent, the latter is temporary and CMake can do
nothing about it.

However, in this particular case the ABI detection build is done
in a temporary directory and wiped out when finished, just like
most other try_compile calls.  Therefore even the files holding
flags not in response files are gone too.  In order to keep them
around one may use --debug-trycompile, but it is a bit tricky to
do because some of the files will still be overwritten by checks
after the one in question.

Anyway, see my sibling response for an explanation of the underlying
problem and the fix.

Thanks,
-Brad



More information about the CMake mailing list