[CMake] CMAKE_SIZEOF_VOID_P question
Thomas Nilefalk
thomas at junovagen.se
Fri Apr 14 16:33:13 EDT 2017
Den 2017-04-14 kl. 21:27, skrev Chuck Atkins:
> Hi Thomas,
>
> According to the documentation CMAKE_SIZEOF_VOID_P it is
> determined by running the compiler. However it seems that it is
> not using pertinent flags from the configuration, in particular
> CMAKE_C_FLAGS and CMAKE_CXX_FLAGS.
>
>
> It is but the results from type size checking get saved in cache
> variables so when run a second time, even though specifying extra
> CMAKE_CXX_FLAGS, the CMAKE_SIZEOF_VOID_P variable already exists in
> cache so it's not checked again. If you clear your build directory
> before each invocation of CMake then you should see it switch between
> 4 and 8 as expected.
>
Right, it does. Thanks. The inconsistencies of when something changes
and when it doesn't, bit me again...
Next question is then why doesn't GNUInstallDirs set
CMAKE_INSTALL_LIBDIR as I expect on Ubuntu for the example I gave?
I am expecting to see either lib64/lib (for 64/32 bit) or a triplet for
(32-bit). Now it's always 'lib'.
/Thomas
> ----------
> Chuck Atkins
> Staff R&D Engineer, Scientific Computing
> Kitware, Inc.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170414/80f4df5f/attachment.html>
More information about the CMake
mailing list