Seems to work correctly from my tests:

 

CMakeLists.txt:

cmake_minimum_required (VERSION 2.8)

 

project(test CXX)

message( STATUS "CMAKE_GENERATOR: ${CMAKE_GENERATOR}")

message( STATUS "CMAKE_CL_64: ${CMAKE_CL_64}")

 

 

 

c:\dev2\Builds\test\x64>cmake -G "Visual Studio 8 2005" ../.

-- Check for working CXX compiler using: Visual Studio 8 2005

-- Check for working CXX compiler using: Visual Studio 8 2005 -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- CMAKE_GENERATOR: Visual Studio 8 2005

-- CMAKE_CL_64: 0

-- Configuring done

-- Generating done

-- Build files have been written to: C:/dev2/Builds/test/x64

 

 

c:\dev2\Builds\test\x86>cmake -G "Visual Studio 8 2005 Win64" ../.

-- Check for working CXX compiler using: Visual Studio 8 2005 Win64

-- Check for working CXX compiler using: Visual Studio 8 2005 Win64 --
works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- CMAKE_GENERATOR: Visual Studio 8 2005 Win64

-- CMAKE_CL_64: 1

-- Configuring done

-- Generating done

-- Build files have been written to: C:/dev2/Builds/test/x86

 

 

 

 

Aaron C. Meadows 

 

-----Original Message-----
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of Rolf Eike Beer
Sent: Friday, October 08, 2010 11:33 AM
To: cmake@cmake.org
Subject: Re: [CMake] CMake Visual Studio 64bit flag?

 

Am Friday 08 October 2010 schrieb aaron.mead...@thomsonreuters.com:

> Is this not sufficient: (from "Variables That Describe the System")

> 

> CMAKE_CL_64: Using the 64 bit compiler from Microsoft

> 

> Set to true when using the 64 bit cl compiler from Microsoft.

> 

> This is what I'm intending on using, so if this won't work, I'll need
to

> know...

 

IIRC that doesn't work if you use the Studio generator (i.e. not
Makefiles). So 

this needs to be something like "if (CMAKE_CL_64 or CMAKE_GENERATOR
MATCHES 

Win64)"

 

Eike



This email was sent to you by Thomson Reuters, the global news and information 
company.
Any views expressed in this message are those of the individual sender, except 
where the sender specifically states them to be the views of Thomson Reuters.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to