<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    My problem (the error) already occurs in the toolchain file, this
    means before the CMakeLists.txt is read. So far it is total
    independent of the entries in the CMakeLists.txt!<br>
    <br>
    I have added the line:<br>
    message ("Mein CMakeLists.txt File")<br>
    in top of my CMakeLists.txt and would assume that there is an output
    on the console with the string, but it isn't.<br>
    <br>
    The output is stopped while parsing the toolchain file and
    determining the compiler.<br>
    <br>
    On 19.09.11 15:26, Benjamin Ruard wrote:
    <blockquote cite="mid:1316438809.1752.68.camel@benjamin-ganesh"
      type="cite">
      <pre wrap="">You can use the following commands to know what are compilers used in
the CMakeLists.txt:

message("C compiler: " ${CMAKE_C_COMPILER})
message("C++ compiler: " ${CMAKE_CXX_COMPILER})

Moreover, you can set them:

set(CMAKE_CXX_COMPILER ...)

regards

Benjamin JEANTY-RUARD

Le lundi 19 septembre 2011 à 14:44 +0200, Martin Kupke a écrit :
</pre>
      <blockquote type="cite">
        <pre wrap="">I'm using CMake in version 2.8.5 and just want to cross compile with a 
decicated Compiler / Linker set on my Windows machine. Of course I've 
read the FAQ and the Tutorial, afterwards I started trying to use CMake 
on a DOS (cmd.exe) command line interface with CMakeLists.txt and a 
toolchain file. After all tests failed to get CMake work in the Win32 
environment, I tried it in my private Linux (Debian Squeeze) and the 
same procedure is successful. In Linux environment it works as 
described, in Win32 not.

My PC has installed Windows XP including SP3.
CMake version 2.8.5 is installed.
My development path contains a CMakeLists.txt and a toolchain_ppc.cmake 
file, because I want to compile on my WinXP code for an embedded 
hardware using a PPC processor.
The toolchain_ppc.cmake file contains the following settings:
set (CMAKE_GENERATOR "NMake Makefiles")
set (CMAKE_SYSTEM_NAME "Generic")
set (CMAKE_C_COMPILER "dcc.exe")
set (CMAKE_SYSTEM_PROCESSOR "ppc")

if(CMAKE_CROSSCOMPILING)
message("Cross Compiling")
endif(CMAKE_CROSSCOMPILING)

set(CMAKE_C_COMPILER "C:/WindRiver/diab/5.9.0.0/WIN32/bin/dcc.exe")
set(CMAKE_C_FLAGS "-tPPCVLEEN:simple")

In my build environment I created an empty folder output and in the 
command line interface (console / cmd.exe) I'm calling the cmake tool:
D:\novero\Discovery\impl\target\CarIF_Appl\output&gt;cmake -D 
CMAKE_TOOLCHAIN_FILE="..\toolchain_ppc.cmake" ..
The output of the cmake tool always is:
-- Building for: Visual Studio 10
Cross Compiling

As you can see my message "Cross Compiling" is shown, this introduces 
that cmake is using the "CMAKE_CROSSCOMPILING" flag. But why the hell is 
there always the output "-- Building for: Visual Studio 10"?
I don't wan't to use anything from / for Visual Studio 10.

The CMakeOutput.log contains the following lines:
The target system is: Generic -  - ppc
The host system is: Windows - 5.1 - x86
Compiling the C compiler identification source file "CMakeCCompilerId.c" 
succeeded.
Compiler: C:/WindRiver/diab/5.9.0.0/WIN32/bin/dcc.exe
Build flags: -tPPCVLEEN:simple
Id flags:

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" 
produced "a.out"

Compiling the C compiler identification source file "CMakeCCompilerId.c" 
succeeded.
Compiler: C:/WindRiver/diab/5.9.0.0/WIN32/bin/dcc.exe
Build flags: -tPPCVLEEN:simple
Id flags: -c

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" 
produced "CMakeCCompilerId.o"

Compiling the CXX compiler identification source file 
"CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/WindRiver/diab/5.9.0.0/WIN32/bin/dcc.exe
Build flags: -tPPCVLEEN:simple
Id flags:

The output was:
0


Compilation of the CXX compiler identification source 
"CMakeCXXCompilerId.cpp" produced "a.out"

Compiling the CXX compiler identification source file 
"CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/WindRiver/diab/5.9.0.0/WIN32/bin/dcc.exe
Build flags: -tPPCVLEEN:simple
Id flags: -c

The output was:
0


Compilation of the CXX compiler identification source 
"CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"

Determining if the C compiler works passed with the following output:
Change Dir: 
D:/novero/Discovery/impl/target/CarIF_Appl/output/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\devenv.com 
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.

1&gt;------ Build started: Project: cmTryCompileExec, Configuration: Debug 
Win32 ------

1&gt;  testCCompiler.c

1&gt;C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): 
warning MSB8012: 
TargetPath(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec) 
does not match the Linker's OutputFile property value 
(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe). 
This may cause your project to build incorrectly. To correct this, 
please make sure that $(OutDir), $(TargetName) and $(TargetExt) property 
values match the value specified in %(Link.OutputFile).

1&gt;  cmTryCompileExec.vcxproj -&gt; 
D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========



Detecting C compiler ABI info compiled with the following output:
Change Dir: 
D:/novero/Discovery/impl/target/CarIF_Appl/output/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\devenv.com 
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.

1&gt;------ Build started: Project: cmTryCompileExec, Configuration: Debug 
Win32 ------

1&gt;  CMakeCCompilerABI.c

1&gt;C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): 
warning MSB8012: 
TargetPath(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec) 
does not match the Linker's OutputFile property value 
(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe). 
This may cause your project to build incorrectly. To correct this, 
please make sure that $(OutDir), $(TargetName) and $(TargetExt) property 
values match the value specified in %(Link.OutputFile).

1&gt;  cmTryCompileExec.vcxproj -&gt; 
D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========



Determining if the CXX compiler works passed with the following output:
Change Dir: 
D:/novero/Discovery/impl/target/CarIF_Appl/output/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\devenv.com 
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.

1&gt;------ Build started: Project: cmTryCompileExec, Configuration: Debug 
Win32 ------

1&gt;  testCXXCompiler.cxx

1&gt;C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): 
warning MSB8012: 
TargetPath(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec) 
does not match the Linker's OutputFile property value 
(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe). 
This may cause your project to build incorrectly. To correct this, 
please make sure that $(OutDir), $(TargetName) and $(TargetExt) property 
values match the value specified in %(Link.OutputFile).

1&gt;  cmTryCompileExec.vcxproj -&gt; 
D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========



Detecting CXX compiler ABI info compiled with the following output:
Change Dir: 
D:/novero/Discovery/impl/target/CarIF_Appl/output/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\devenv.com 
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.

1&gt;------ Build started: Project: cmTryCompileExec, Configuration: Debug 
Win32 ------

1&gt;  CMakeCXXCompilerABI.cpp

1&gt;C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): 
warning MSB8012: 
TargetPath(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec) 
does not match the Linker's OutputFile property value 
(D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe). 
This may cause your project to build incorrectly. To correct this, 
please make sure that $(OutDir), $(TargetName) and $(TargetExt) property 
values match the value specified in %(Link.OutputFile).

1&gt;  cmTryCompileExec.vcxproj -&gt; 
D:\novero\Discovery\impl\target\CarIF_Appl\output\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


I just want to use a standard Assembler, C Compiler and Linker.
I don't need CXX (C++) in my build environment and even I don't need 
(want) any Visual Studio in my Cross Compilation.
The generator for CMake shall be "NMake Makefiles" so that the generated 
Makefile can be used with "NMake".

Hopefully you can help me out of this.


_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>
</pre>
      </blockquote>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <title></title>
      <br>
      <div class="moz-signature">
        <style><!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:KievitOT-Regular;
        panose-1:2 0 5 3 4 0 0 2 0 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
        <div class="Section1">
          <hr size="2" width="100%">
          <p class="MsoNormal"><b><span style="font-family:
                KievitOT-Regular; color: rgb(192, 0, 0);" lang="EN-CA">martin

                kupke<o:p></o:p></span></b></p>
          <p class="MsoNormal"> <span style="font-family:
              KievitOT-Regular; color: rgb(15, 36, 62);">can diagnostics
              engineer | senior software developer<o:p></o:p></span> </p>
          <p class="MsoNormal"><b><span style="font-family:
                KievitOT-Regular; color: rgb(192, 0, 0);">m</span></b><span
              style="font-family: KievitOT-Regular; color: rgb(192, 0,
              0);">:</span><span style="font-family: KievitOT-Regular;
              color: rgb(31, 73, 125);"> </span><span
              style="font-family: KievitOT-Regular; color: rgb(15, 36,
              62);">+49.151.5511.3632</span><span style="font-family:
              KievitOT-Regular; color: rgb(38, 38, 38);"> </span><span
              style="font-family: KievitOT-Regular; color: rgb(31, 73,
              125);">| </span><b><span style="font-family:
                KievitOT-Regular; color: rgb(192, 0, 0);">e</span></b><span
              style="font-family: KievitOT-Regular; color: rgb(192, 0,
              0);">:</span><span style="font-family: KievitOT-Regular;
              color: rgb(155, 37, 74);"> </span><span
              style="font-family: KievitOT-Regular; color: rgb(31, 73,
              125);"><a href="mailto:martin.kupke@novero.com"><span
                  style="color: blue;">martin.kupke@novero.com</span></a><o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:
              KievitOT-Regular; color: rgb(15, 36, 62);">skype:</span><span
              style="font-family: KievitOT-Regular; color: rgb(31, 73,
              125);">  </span><span style="font-family:
              KievitOT-Regular; color: rgb(15, 36, 62);">martin.kupke_novero 

            </span><span style="font-family: KievitOT-Regular; color:
              rgb(0, 32, 96);">| </span><span style="font-family:
              KievitOT-Regular; color: rgb(15, 36, 62);">w:</span><span
              style="font-family: KievitOT-Regular; color: rgb(31, 73,
              125);"> <a href="http://www.novero.com"><span
                  style="color: blue;">www.novero.com</span></a><br>
              <br>
            </span> <span style="font-family: KievitOT-Regular; color:
              rgb(192, 0, 0);"></span> <img
              src="cid:part1.02070404.01070304@novero.com" alt="novero
              GmbH"><br>
            <span style="font-family: KievitOT-Regular; color: rgb(15,
              36, 62);">meesmannstr.103 | 44807 Bochum | germany</span>
            <span style="font-family: KievitOT-Regular; color: rgb(31,
              73, 125);"><o:p></o:p></span></p>
          <p class="MsoNormal"> <span style="font-family:
              KievitOT-Regular; color: rgb(15, 36, 62);"><br>
              novero gmbh | parsevalstr. </span> <span
              style="font-family: KievitOT-Regular; color: rgb(15, 36,
              62);" lang="DE">7 a | 40468 düsseldorf | germany |
              amtsgericht düsseldorf | hrb 58283 |
              umsatzsteueridentifikationsnummer: de 814973142 |
              geschäftsführender gesellschafter: razvan olosu</span> <span
              style="font-family: KievitOT-Regular; color: rgb(31, 73,
              125);" lang="DE"><o:p></o:p></span> </p>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
      </div>
    </div>
  </body>
</html>