[CMake] CMake Visual Studio 64bit flag?
aaron.meadows at thomsonreuters.com
aaron.meadows at thomsonreuters.com
Fri Oct 8 12:50:06 EDT 2010
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-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
Of Rolf Eike Beer
Sent: Friday, October 08, 2010 11:33 AM
To: cmake at cmake.org
Subject: Re: [CMake] CMake Visual Studio 64bit flag?
Am Friday 08 October 2010 schrieb aaron.meadows at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101008/29860227/attachment-0001.htm>
More information about the CMake
mailing list