View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014910CMakeCMakepublic2014-05-07 05:032016-06-10 14:31
Reportershricco 
Assigned ToKitware Robot 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformX64OSWindowsOS Version7
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0014910: CMake ignores CMAKE_TOOLCHAIN_FILE even without existing cache file
DescriptionI currently need cmake for cross compiling purposes. I have to support several Toolchains so I created several Toolchain files to use later in command line with the -DCMAKE_TOOLCHAIN_FILE flag. The flag is always ignored when using cmake.exe. Even if there is no cache file there. I also tried it on os x and it works fine there (same version). So it must be a windows related bug. I doubted myself at some point and decided then to try it with an older release of cmake. With version 2.8.4 everything works as expected. I also tried the cmake-gui (2.8.12.2). If choose a Toolchainfile there it is used as expected, but set compiler flags within the CMakeList.txt are ignored. Besides that, I don't want to use the gui due to automation purposes.
Steps To ReproduceExtract the binary from tar.gz for windows on 64Bit System. run cmake.exe -DCMAKE_TOOLCHAIN_FILE=foo.cmake .\ and it always uses the default compiler. I am not even getting an error for not finding the given toolchain file.

Also try it with cmake.exe -DCMAKE_TOOLCHAIN_FILE=existingFile.cmake .\ same here. This time with existing file.
Additional InformationI have Visual Studio 2010 Express installed and Windows SDK 7.1 for 64Bit compilation.

Target System are embedded systems so the CMAKE_SYSTEM_NAME is Generic
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0035834)
Brad King (manager)
2014-05-07 08:46

What generator are you using? The toolchain file approach does not work with the "Visual Studio" generators. Try using a Makefile generator.
(0042546)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-05-07 05:03 shricco New Issue
2014-05-07 08:46 Brad King Note Added: 0035834
2016-06-10 14:29 Kitware Robot Note Added: 0042546
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team