-
Notifications
You must be signed in to change notification settings - Fork 429
Don't check bitness in CMakeLists.txt #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ryandesign, well in the CMakeLists.txt, the only check for compiler bitness, is -
And this result is ONLY used inside a
So you can see it is ONLY used to set There is NO check for No other use is made of this flag, and can not see how the cmake testing of `CMAKE_SIZEOF_VOID_P' would influence your OS X universal build? However, if it does somehow cause a problem, then I suppose I could move the test to inside the WIN32 AND MSVC block... but thinking more about this I am not even sure WIN64 need be defined, but would need to check more on that... But if you get a chance please re-check and advise, as we cetainly do not want to cause an OS X universal build problem... Tidy should compile and run everywhere ;=)) |
I saw the output |
@ryandesign, have now had time to check for the 'need' in a windows build... It seems there is NO need to check the architecture in windows either, so have removed the 'check' completely, and the cmake message output, to avoid confusion. It seems it was only there due to a cut-and-paste from another project when I created the initial CMakeList.txt file. Just for information, in windows, if there was a need to check 32 vs 64 bit, then the correct macro is Hope this closes this issue. Thanks for reporting... |
Great! Thank you. |
Hello, I am the maintainer of tidy in MacPorts. In Tidy 4.9.24 at least, your CMakeLists.txt attempts to determine whether the machine is 32-bit or 64-bit. Please don't do that in CMakeLists.txt because doing so there is not compatible with OS X universal builds, which are desirable. In a universal build, one runs cmake a single time, and then builds simultaneously for 32-bit and 64-bit (or simultaneously for PowerPC and Intel, or simultaneously for 3 or 4 combinations of these), so you cannot know at the time that cmake is run what the bitness (or endianness) is.
Instead, use preprocessor defines such as
__LP64__
in your code files if you need to differentiate between 32-bit and 64-bit.The text was updated successfully, but these errors were encountered: