There also exists a
CMAKE_<LANG>_COMPILER_VERSION
in cmake, maybe that could be used as cmake level alternative to __VERSION__ (at cc level)
this cmake feature does not work 100% correctly because it detects
-- The C compiler identification is SunPro 5.15.0
where the version 5.15.0 is incorrect, but it is probably set to CMAKE_C_COMPILER_VERSION so extracted from the string "Sun C 5.15"
bash-4.4$ svn diff platforms/ Index: platforms/unix/vm/config.cmake =================================================================== --- platforms/unix/vm/config.cmake (revision 3775) +++ platforms/unix/vm/config.cmake (working copy) @@ -202,7 +202,7 @@
# sqUnixMain.c
-SET (VM_BUILD_STRING ""Unix built on "__DATE__ " "__TIME__" Compiler: "__VERSION__") +SET (VM_BUILD_STRING ""Unix built on "__DATE__ " "__TIME__" Compiler: ${CMAKE_C_COMPILER_VERSION}"")
CONFIG_DEFINE (VM_BUILD_STRING)
in any case, the squeakvm builds fine if I change the vm/config.cmake
./build/config.status:VM_BUILD_STRING="Unix built on "__DATE__ " "__TIME__" Compiler: 5.15.0"
It results in my case in
bash-4.4$ strings squeakvm | grep Unix Unix built on Mar 29 2020 16:46:30 Compiler: 5.15.0
However such a modification to vm/config.cmake would change VM_BUILD_STRING for virtually all platforms/builds ...
-- Sent from: http://forum.world.st/Squeak-VM-f104410.html