View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015156 | CMake | CMake | public | 2014-09-14 08:33 | 2015-03-02 08:57 | ||||
Reporter | Meng-Yuan Huang | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux | OS | CentOS | OS Version | 6.5 x64 | ||||
Product Version | CMake 2.8.12 | ||||||||
Target Version | CMake 3.1 | Fixed in Version | CMake 3.1 | ||||||
Summary | 0015156: Sometime, CMake can't find clang/clang++ | ||||||||
Description | I have a CMake C++ project, test. I want to build it by clang/clang++ on CentOS 6.5. I run cmake by this command line: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ . Unfortunately, sometime, cmake said it can't find clang/clang++. Strangely, if I run the command line again, it becomes to able to find them. Strangely again, if run the command line again, it becomes to not able to find them. ... If cmake can find clang/clang++, then running make will invoke clang/clang++. Otherwise, if cmake can't find clang/clang++, then running make will invoke gcc/g++. I recorded a video to show the problem: http://1drv.ms/1uwXVek [^] Please fix this problem. CMake 3.0.2 also has a similar but different problem as 2.8.12. | ||||||||
Steps To Reproduce | 1. Download the attached test project, test.tar.gz and extract it. 2. Run cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ . for several times and inspect the cmake output messages. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | test.tar.gz [^] (26,051 bytes) 2014-09-14 08:33 | ||||||||
Relationships | |
Relationships |
Notes | |
(0036793) Brad King (manager) 2014-09-15 09:47 |
Please try either: cmake -DCMAKE_C_COMPILER=/full/path/to/bin/clang -DCMAKE_CXX_COMPILER=/full/path/to/bin/clang++ . or CC=clang CXX=clang++ cmake . in a fresh tree. |
(0036794) Meng-Yuan Huang (reporter) 2014-09-15 09:54 |
Hi Brad King, Thanks. I know using absolute paths to clang and clang++ can work around the problem. However, I want to know whether this problem be fixed. |
(0036796) Brad King (manager) 2014-09-15 10:09 |
I think this may have been fixed since 3.0. Please try a version from the Git 'master' branch or a nightly binary: http://www.cmake.org/files/dev/?C=M;O=D [^] |
(0036798) Brad King (manager) 2014-09-15 10:11 |
Re 0015156:0036796: IIRC, the fix was here: cmGlobalGenerator: Do not re-add CMAKE_<LANG>_COMPILER http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=731427a6 [^] |
(0036811) Meng-Yuan Huang (reporter) 2014-09-15 20:09 |
Hi Brad King, Thanks. I confirmed ver. 3.0.20140911-g5cbab solves this problem. However, ver. 3.0.2 surely has a similar but different problem. |
(0036814) Brad King (manager) 2014-09-16 08:37 |
Re 0015156:0036811: Thanks for testing. The fix will be in the 3.1 release. For older versions please use one of the methods suggested in 0015156:0036793. |
(0038124) Robert Maynard (manager) 2015-03-02 08:57 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-09-14 08:33 | Meng-Yuan Huang | New Issue | |
2014-09-14 08:33 | Meng-Yuan Huang | File Added: test.tar.gz | |
2014-09-15 09:47 | Brad King | Note Added: 0036793 | |
2014-09-15 09:54 | Meng-Yuan Huang | Note Added: 0036794 | |
2014-09-15 10:09 | Brad King | Note Added: 0036796 | |
2014-09-15 10:11 | Brad King | Note Added: 0036798 | |
2014-09-15 20:09 | Meng-Yuan Huang | Note Added: 0036811 | |
2014-09-16 08:37 | Brad King | Note Added: 0036814 | |
2014-09-16 08:37 | Brad King | Status | new => resolved |
2014-09-16 08:37 | Brad King | Resolution | open => fixed |
2014-09-16 08:37 | Brad King | Fixed in Version | => CMake 3.1 |
2014-09-16 08:37 | Brad King | Target Version | => CMake 3.1 |
2015-03-02 08:57 | Robert Maynard | Note Added: 0038124 | |
2015-03-02 08:57 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |