View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013561 | CMake | CMake | public | 2012-09-28 02:17 | 2016-06-10 14:31 | ||||
Reporter | icando | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | Visual Studio 2012 | OS | Windows | OS Version | Any | ||||
Product Version | CMake 2.8.9 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0013561: CHECK_CXX_COMPILER_FLAGS is totally broken under newer version of Visual Studio | ||||||||
Description | On Windows platform, by default, CMake will add /INCREMENTAL:YES to the linker flag. This will trigger warning messages by the linker of MSVC, and CHECK_CXX_COMPILER_FLAGS will think the compiler doesn't accept the flag. So basically, CHECK_CXX_COMPILER_FLAGS will just return FAlSE for any flag, valid or invalid. Any scripts that relies on this check will just broken. | ||||||||
Steps To Reproduce | Just use any valid flag in CHECK_CXX_COMPILER_FLAGS on Windows platform and Visual Studio 2012. Earlier versions might also be broken because when I was searching in Google, I just found some people complaining about it for Visual Studio 2010 as well. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeLists.txt [^] (222 bytes) 2012-10-26 00:59 [Show Content]
CMakeError.log [^] (1,167 bytes) 2012-10-26 00:59 CMakeLists2.txt [^] (238 bytes) 2012-10-26 01:36 [Show Content] CMakeError2.log [^] (1,210 bytes) 2012-10-26 01:36 output.log [^] (1,017 bytes) 2012-10-26 01:38 | ||||||||
Relationships | |
Relationships |
Notes | |
(0031114) icando (reporter) 2012-09-29 12:19 |
Is this problem easy to fix? I just wonder if I could expect this being fixed soon (e.g. next version of CMake). |
(0031283) icando (reporter) 2012-10-19 12:02 |
Brad King, is it possible to assign to someone else who are more active? I found all recent tasks assigned to Bill Hoffman are not responsive. |
(0031288) Bill Hoffman (manager) 2012-10-22 10:01 |
Can you attache a CMakeError.log with this problem? |
(0031339) icando (reporter) 2012-10-26 01:48 |
Hi Bill Hoffman, Thanks for your response. I found I make some mistake claiming the things are broken under MSVC. Actually they are not. They are just broken under Intel compiler. Here is the full story: I tried to test if cmake can detect that the flags /Qstd=c++11 is supported by Intel compiler: E:\xx>set CC=icl E:\xx>set CXX=icl E:\xx>cmake . > output.log 2>&1 I've attached CMakeLists2.txt, CMakeError2.log and output.log. By looking at the error log I found /INCREMENTAL:YES breaks the flag detection so I randomly test some flag (unfortunately I picked /O1, which failed for totally different reasons) under MSVC. It was also broken, without looking into the error log this time, I mistakenly came to the conclusion that flag detection is also broken under MSVC. So my question is, is it sufficient to just set CXX and CC if I want to work under Intel compiler? So am I missing something, or the flag detection is not working under Intel compiler? Thanks. |
(0031345) Bill Hoffman (manager) 2012-10-26 16:37 |
So, yes setting CXX and CC is what you need to do, and in fact that seems to be working given your output.log. -- Check for working C compiler: D:/Program Files (x86)/Develop_Utilities/Intel/Composer XE 2013/bin/intel64/icl.exe -- Check for working C compiler: D:/Program Files (x86)/Develop_Utilities/Intel/Composer XE 2013/bin/intel64/icl.exe -- works -- Check for working CXX compiler: D:/Program Files (x86)/Develop_Utilities/Intel/Composer XE 2013/bin/intel64/icl.exe -- works And yes, the flag detection is broken with the intel compiler and /INCREMENTAL:YES. This looks like it is fixed already in Modules/Platform/Windows-cl.cmake, but not in Modules/Platform/Windows-Intel.cmake. See MSVC_INCREMENTAL_DEFAULT in the -cl.cmake file. Try to copy that stuff into your Windows-Intel.cmake file and see if that works for you. If it works, we can push it upstream. |
(0031349) icando (reporter) 2012-10-30 04:27 |
Hi Bill Hoffman, It works! There is only one place in Windows-Intel.cmake that involves /incremental:yes flag, and it works once I remove the ":yes" part. As for pushing a patch to upstream, can I leave the work to you? In Windows-cl.cmake it contains a bunch of logic of handling older/newer MSVC, and handling different build types. So it involves some work to clone the logic |
(0034212) icando (reporter) 2013-10-22 05:08 |
Fixed in master. |
(0042125) Kitware Robot (administrator) 2016-06-10 14:28 |
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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-09-28 02:17 | icando | New Issue | |
2012-09-28 08:25 | Brad King | Assigned To | => Bill Hoffman |
2012-09-28 08:25 | Brad King | Status | new => assigned |
2012-09-29 12:19 | icando | Note Added: 0031114 | |
2012-10-19 12:02 | icando | Note Added: 0031283 | |
2012-10-22 10:01 | Bill Hoffman | Note Added: 0031288 | |
2012-10-26 00:59 | icando | File Added: CMakeLists.txt | |
2012-10-26 00:59 | icando | File Added: CMakeError.log | |
2012-10-26 01:36 | icando | File Added: CMakeLists2.txt | |
2012-10-26 01:36 | icando | File Added: CMakeError2.log | |
2012-10-26 01:38 | icando | File Added: output.log | |
2012-10-26 01:48 | icando | Note Added: 0031339 | |
2012-10-26 16:37 | Bill Hoffman | Note Added: 0031345 | |
2012-10-30 04:27 | icando | Note Added: 0031349 | |
2013-10-22 05:08 | icando | Note Added: 0034212 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0042125 | |
2016-06-10 14:28 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |