View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013896 | CMake | CMake | public | 2013-02-07 12:33 | 2013-07-01 09:35 | ||||
Reporter | Leszek Swirski | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | MSVC | OS | Windows | OS Version | 7 | ||||
Product Version | CMake 2.8.10.2 | ||||||||
Target Version | CMake 2.8.11 | Fixed in Version | CMake 2.8.11 | ||||||
Summary | 0013896: CMAKE_CL_64 incorrectly set for CXX projects | ||||||||
Description | CMAKE_CL_64 only checks the value of MSVC_C_ARCHITECTURE_ID, not MSVC_CXX_ARCHITECTURE_ID. This means that CXX only projects [projects defined as project(x CXX)] and CXX-first projects [projects defined as project(x CXX C) rather than project(x C CXX)] do not correctly set CMAKE_CL_64 = 1 when MSVC_CXX_ARCHITECTURE_ID = x64 | ||||||||
Steps To Reproduce | Using a Visual Studio x64 command shell, running cmake on: -- CMakeLists.txt project(test CXX) message("MSVC_CXX_ARCHITECTURE_ID = ${MSVC_CXX_ARCHITECTURE_ID}") message("CMAKE_CL_64 = ${CMAKE_CL_64}") prints: MSVC_CXX_ARCHITECTURE_ID = x64 CMAKE_CL_64 = 0 and -- CMakeLists.txt project(test CXX C) message("MSVC_C_ARCHITECTURE_ID = ${MSVC_C_ARCHITECTURE_ID}") message("MSVC_CXX_ARCHITECTURE_ID = ${MSVC_CXX_ARCHITECTURE_ID}") message("CMAKE_CL_64 = ${CMAKE_CL_64}") prints: MSVC_C_ARCHITECTURE_ID = x64 MSVC_CXX_ARCHITECTURE_ID = x64 CMAKE_CL_64 = 0 while the following -- CMakeLists.txt project(test C CXX) message("MSVC_C_ARCHITECTURE_ID = ${MSVC_C_ARCHITECTURE_ID}") message("MSVC_CXX_ARCHITECTURE_ID = ${MSVC_CXX_ARCHITECTURE_ID}") message("CMAKE_CL_64 = ${CMAKE_CL_64}") prints: MSVC_C_ARCHITECTURE_ID = x64 MSVC_CXX_ARCHITECTURE_ID = x64 CMAKE_CL_64 = 1 | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0032211) Brad King (manager) 2013-02-07 14:53 |
Try this patch: diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 3a38d8f..f9df6d8 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -107,7 +107,7 @@ if(NOT MSVC_VERSION) endif() endif() -if(MSVC_C_ARCHITECTURE_ID MATCHES 64) +if(MSVC_C_ARCHITECTURE_ID MATCHES 64 OR MSVC_CXX_ARCHITECTURE_ID MATCHES 64) set(CMAKE_CL_64 1) else() set(CMAKE_CL_64 0) |
(0032212) Leszek Swirski (reporter) 2013-02-07 14:54 |
That's exactly the fix I actually applied on my machine, and it works. |
(0032214) Brad King (manager) 2013-02-07 15:06 |
Applied, thanks: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe664b5d [^] |
(0033414) Robert Maynard (manager) 2013-07-01 09:35 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-02-07 12:33 | Leszek Swirski | New Issue | |
2013-02-07 14:53 | Brad King | Note Added: 0032211 | |
2013-02-07 14:54 | Leszek Swirski | Note Added: 0032212 | |
2013-02-07 15:06 | Brad King | Note Added: 0032214 | |
2013-02-07 15:06 | Brad King | Assigned To | => Brad King |
2013-02-07 15:06 | Brad King | Status | new => resolved |
2013-02-07 15:06 | Brad King | Resolution | open => fixed |
2013-02-07 15:06 | Brad King | Fixed in Version | => CMake 2.8.11 |
2013-02-07 15:06 | Brad King | Target Version | => CMake 2.8.11 |
2013-07-01 09:35 | Robert Maynard | Note Added: 0033414 | |
2013-07-01 09:35 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |