[CMake] Where are object files located, and how do I change the default extension?

Alexander Neundorf a.neundorf-work at gmx.net
Thu Mar 26 17:07:34 EDT 2009


On Thursday 26 March 2009, Carlson Daniel wrote:
> I have now created a toolchain file which looks like this
> (c:\temp\cmake\TC_diab.cmake):
>
> set(CMAKE_MODULE_PATH "c:/temp/cmake/Modules" ${CMAKE_MODULE_PATH})
> set(CMAKE_SYSTEM_NAME Generic)
> set(CMAKE_C_COMPILER "C:/DIAB/5.6.0.0/WIN32/bin/dcc.exe")
> set(CMAKE_SYSTEM_PROCESSOR "MPC5566")
>
> The compiler demands a target processor so to be able to perform the
> "compiler test" during the compiler identification I had to add a platform
> file (c:\temp\cmake\Modules\Platform\generic-dcc-MPC5566.cmake):
>
> set(CMAKE_C_FLAGS_INIT "-tPPCE200Z6NEG")
>
> Now, when I run Cmake on this very simple CmakeLists.txt
>
> cmake_minimum_required(VERSION 2.6.0)
> project(Foo C)
>
> I get the following error:
>
> -- The C compiler identification is unknown
> -- Check for working C compiler: C:/DIAB/5.6.0.0/WIN32/bin/dcc.exe
> -- Check for working C compiler: C:/DIAB/5.6.0.0/WIN32/bin/dcc.exe -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Configuring done
> You have changed variables that require your cache to be deleted.
> Configure will be re-run and you may have to reset some variables.
> The following variables have changed:
> CMAKE_C_COMPILER= C:/Scania/ProgramsForBuild/MinGW/5.1.4/bin/gcc.exe
>
> -- The C compiler identification is GNU
> -- Check for working C compiler: C:/MinGW/5.1.4/bin/gcc.exe
> -- Check for working C compiler: C:/MinGW/5.1.4/bin/gcc.exe -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Configuring done
> -- Generating done
> -- Build files have been written to:
> Z:/ssscde-vsd-ne-sw/eec3/02/output/make
>
> What have I done wrong? What variable have I changed?

Did you add the toolchain file to an existing build tree ?
At least the output says first:
-- Check for working C compiler: C:/DIAB/5.6.0.0/WIN32/bin/dcc.exe
and later on:
CMAKE_C_COMPILER= C:/Scania/ProgramsForBuild/MinGW/5.1.4/bin/gcc.exe


Also, please apply the attached patch to your cmake, then it should say 
"The C compiler identification is Diab"
With this you can then add files which set variables specific for your 
compiler in files like Generic-Diab-C.cmake and Generic-Diab-CXX.cmake

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diab-compiler-id.patch
Type: text/x-diff
Size: 1167 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090326/fce0780c/attachment.patch>


More information about the CMake mailing list