> I have done the same thing myself, using size of INT instead of P which is > of course following the exact same logic. > After attempting several strategies I found this one to be the safest way > to detect 32/64bit systems, so I recommend using SIZEOF as well.
sizeof(int) is 4 on basically all systems I have ever seen (ignoring those 16bit machines of 286 areas or things like that) so this test is basically useless. Also testing for sizeof(long) will get you into trouble as this 8 for Un*x64 but 4 for Win64. The best way is usually sizeof(void*) even if there are programming model where you would get a 32 bit pointer even in a 64 bit executable but those have to be explicitely enabled and are barely ever used from my experience. Eike _______________________________________________ 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
