Hi,

I am trying to control the flow of my program based on the value of a cmake 
variable called CMAKE_SIZEOF_VOID_P.

To start off, I wanted to just see what value this variable took under multiple 
different configurations, by issuing the following command in my cmakelists.txt 
file:

message(${CMAKE_SIZEOF_VOID_P})

This works perfectly. However, whenever I try to run the above command on my 
*.cmake file, I get no value returned to me (it just throws an error).

It is important that I am able to access the value of this variable in my 
*.cmake file, as that will help me decide what flags and other parameters to 
pass in to the compiler. All I really need is a way to determine whether cmake 
is running a x64 compile or a 32 bit compile, so if there is any other variable 
(other than this one, since it is not defined in *.cmake files) that will give 
me this, then that would also work for my purposes.

Any help would greatly be appreciated.

Thanks,
Hashim

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.
--

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