[CMake] CMake 2.8.2 with WindRiver diab compiler dcc.exe/dplus.exe on WinXP: CMake Error: Could not COPY_FILE. while detecting compiler ABI

Brad King brad.king at kitware.com
Fri Sep 17 08:37:26 EDT 2010


On 09/17/2010 03:35 AM, Molsen, Hannes wrote:
> In CMakeTestCCompiler.cmake I found a flag called "CMAKE_C_COMPILER_FORCED".

This is meant to be set by cross compiling toolchain files that explicitly
set the compiler ABI information.  It is not set by --debug-trycompile.

> So I still want to get the ABI detection working correctly.

Normally the try_compile command deletes the small test project it creates.
It has a COPY_FILE option to first copy the built executable to some other
place before deleting the test build tree.  The --debug-trycompile option
tells it to not delete the test tree.

For some reason the ABI detection test build is not succeeding.  The errors
should be in CMakeError.log or CMakeOutput.log.  When --debug-trycompile
is off the executable simply doesn't exist and cannot be copied.  When it
is on then the executable from a *previous* try_compile happens to still
exist as it was not overwritten or deleted by the failed build.  Then the
COPY_FILE succeeds but is actually copying the wrong file.

The root of the problem is that this toolchain fails to build the test
executable.  Try building "CMakeCCompilerABI.c" from the CMake Modules
directory by hand using this compiler.

-Brad


More information about the CMake mailing list