Extend `CMAKE_SIZEOF_VOID_P` to work when only a C++ compiler is provided
https://github.com/SFML/SFML/actions/runs/6748785142/job/18347866816
Above is a link to a CI pipeline for a C++ project which only specifies CXX
as a language and thus only provides a C++ compiler during configuration. Use of CMAKE_SIZEOF_VOID_P
fails because it's trying to compile a .c file for which it cannot find a suitable compiler. Because of this limitation I have to provide a C compiler even though no C code is compiled in this project.
As far as I can tell there is no reason the size of void*
couldn't be checked with a C++ compiler. I'd appreciate it if CMAKE_SIZEOF_VOID_P
was extended to work in projects where CXX
is the only enabled language.
Edited by Chris Thrasher