> -----Original Message----- > From: Clinton Stimpson [mailto:[email protected]] > Sent: Monday, October 15, 2012 1:41 PM > To: [email protected] > Cc: John Drescher; Gregory Peele ARA/VHD > Subject: Re: [CMake] cmake on Windows x64 > > On Monday, October 15, 2012 01:37:42 PM John Drescher wrote: > > > Having CMAKE_SYSTEM_PROCESSOR be "x86" for a 64-bit build is very > > > inconvenient when detecting machine-dependent compiler flags, > > > constructing directory names for outputs based on configuration, > > > configuring third party search directories, etc. It's always > > > possible to work around (among other things, one can consult the > > > generator string for Visual Studio builds, though not for MinGW > > > builds) but that doesn't mean it shouldn't be better behaved - it's > > > entirely reasonable to assume that CMAKE_SYSTEM_PROCESSOR should be > > > the target processor for the build, especially so that you can have > > > similar behavior on Windows, Linux, and Mac. Though as previously > > > discussed I also have the opposite problem on Linux when compiling > for 32-bit CPU on 64-bit OS. > > I see. I have always compared the size of the pointer for this.. > > > > John > > Same here, I use CMAKE_CXX_SIZEOF_DATA_PTR if I need to know that info > in a CMakeLists.txt file. > > Clint
Hm, I didn't think of that since I've never seen or used that CMake variable. That would solve the issue for X86 vs. AMD64 native compiles, and I'm not worried about cross-compiles. Thanks for that idea, it will simplify my build logic. Gregory Peele, Jr. Staff Software Engineer Virtual Heroes - Orlando Applied Research Associates, Inc. +1 (407) 823-9121 x 840013 -- 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
