MantisBT - CMake
View Issue Details
0015999CMakeCMakepublic2016-03-02 04:102016-06-10 14:21
Antonio 
Brad King 
normalminoralways
closedfixed 
x64Windows7
CMake 3.4.1 
CMake 3.6CMake 3.6 
0015999: CMake will crash if project command is used in the toolchain file
If the "project" command is used in a toolchain file, cmake crashes (also cmake-gui crashes consequently).

Found out while trying to use:
find_package(LLVM REQUIRED CONFIG)
in a toolchain file, and incurred in this problem:
http://stackoverflow.com/questions/12264299/cmake-on-linux-target-platform-does-not-support-dynamic-linking [^]
Extremely easy, simply configure a project with a toolchain containing:
project(xxx)

In the attachment a dummy project which allows to reproduce the problem. Also the build directory (output before the crash) is included.
No tags attached.
zip test.zip (2,122) 2016-03-02 04:10
https://public.kitware.com/Bug/file/5637/test.zip
Issue History
2016-03-02 04:10AntonioNew Issue
2016-03-02 04:10AntonioFile Added: test.zip
2016-03-07 14:08Brad KingNote Added: 0040642
2016-03-07 14:08Brad KingAssigned To => Brad King
2016-03-07 14:08Brad KingStatusnew => resolved
2016-03-07 14:08Brad KingResolutionopen => fixed
2016-03-07 14:08Brad KingFixed in Version => CMake 3.6
2016-03-07 14:08Brad KingTarget Version => CMake 3.6
2016-03-07 14:10Brad KingNote Added: 0040643
2016-06-10 14:21Kitware RobotNote Added: 0041235
2016-06-10 14:21Kitware RobotStatusresolved => closed

Notes
(0040642)
Brad King   
2016-03-07 14:08   
Thanks. This should fix it:

 Diagnose recursive project/enable_language without crashing
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72e0dc58 [^]

(0040643)
Brad King   
2016-03-07 14:10   
FYI, a toolchain file is meant to set machine-local information. It shouldn't need to find anything.
(0041235)
Kitware Robot   
2016-06-10 14:21   
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.