[CMake] cmake 3.0 not working on windows (mantis #14910)

Dawson, Matt matt.dawson at thermofisher.com
Fri Aug 8 12:31:03 EDT 2014


Ok I spent the last hour trying to put together a reproducible example and found that I had way overstated things. I'm trying to
Use cmake with the Texas Instruments Arm Compiler (Code Composer 5.5). I'm using windows 7 x64.  I'm putting together a custom compiler support package.  I know that there is  support for a "TI" compiler
In cmake but I could not get it to work because the compiler id test always craps out.


Below is my custom tool chain file.

include("CMakeForceCompiler")

set(CMAKE_SYSTEM_NAME "Generic")
#set(CMAKE_SYSTEM_VERSION "1.0")
#set(CMAKE_SYSTEM_PROCESSOR "C6000")

set(CMAKE_FIND_ROOT_PATH  "C:/ti/ccsv5/tools/compiler/arm_5.1.1" )

CMAKE_FORCE_C_COMPILER("armcl" "TI")
CMAKE_FORCE_CXX_COMPILER("armcl" "TI")

message( STATUS, "hello from toolchain ${CMAKE_C_COMPILER_ID}")

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM    NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE    BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY    ONLY)

When I run this under 3.0 using the command line

cmake   -G "MinGW Makefiles"  -DCMAKE_MODULE_PATH="../my_modules" -DCMAKE_TOOLCHAIN_FILE="../my_toolchain.cmake" ../src

I get the following error output


  The CMAKE_C_COMPILER:

    armcl

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.



Under 2.8.4 this same toolchain file works fine. I've attached a zip file with the example. There is a build directory with 3.0 output (bld3_0) and and 2.8 output (bld2_8). They
Have text files of captured stdout and stderr for each run. I have my own version of "TI-CXX.cmake" which I have put in  a custom modules subdirectory. I tried to reproduce this problem
With MinGW but could not. I copied the "GNU-C.cmake" compiler setup script into my Compiler directory had a CMAKE_FORCE_COMPILER(c++ "GNU") in my toolchain file. Everything worked just find under 3.0. I suspect that cmake has a lot of logic for auto-finding the mingw compiler.





Matt Dawson

From: Nils Gladitz [mailto:nilsgladitz at gmail.com]
Sent: Friday, August 08, 2014 9:06 AM
To: Dawson, Matt; cmake at cmake.org<mailto:cmake at cmake.org>
Subject: Re: [CMake] cmake 3.0 not working on windows (mantis #14910)

On 08.08.2014 15:11, Dawson, Matt wrote:
I had a lot of difficulty getting cmake 3.0 to work under windows. I noticed that there is a bug (mantis #14910) which describes the problem. I had to fall back to 12.8.4 to get things to work.  This was reported back in may. Will this be fixed anytime soon. Its kind of a show stopper bug and will probably drive away first time windows users  like me.


Can you elaborate what exactly isn't working and which generator you are trying to use?
"0014910: CMake ignores CMAKE_TOOLCHAIN_FILE even without existing cache file" doesn't seem to have been confirmed and there seems to be missing feedback (see the note under it).
If one of the visual studio generators has been used this would be expected behavior (in both 2.8.x and 3.0).

For the issue to be analyzed or even fixed it has to be reproduced first.

Nils
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140808/1f8fafeb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_example.zip
Type: application/x-zip-compressed
Size: 24908 bytes
Desc: bug_example.zip
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140808/1f8fafeb/attachment-0001.bin>


More information about the CMake mailing list