[cmake-developers] CMake build error on Haiku

Rolf Eike Beer eike at sf-mail.de
Tue Jan 8 13:43:14 EST 2013


Recent CMake versions fail to build at Haiku:

[  0%] Building C object 
Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_ABI_C.c.o
In file included from 
/boot/home/cmake/Utilities/KWIML/test/test_ABI_C.c:13:
/boot/home/build/cmake/Utilities/cmIML/ABI.h:261: #error "Existence of 
'long long' unknown."
make[2]: *** 
[Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_ABI_C.c.o] Error 1
make[1]: *** [Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/all] Error 
2

This is because the default compiler (gcc 2.95) does not define things 
like __SIZEOF_LONG__ and __GNUC__ is not a case in the checks for the 
different compilers. It is checked e.g. for the signedness of char. This 
fixes this for me. I have not submitted it to the next branch because I 
assume this is another Kitware magic upstream tree:

diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in
index 7f4772a..a336a80 100644
--- a/Utilities/KWIML/ABI.h.in
+++ b/Utilities/KWIML/ABI.h.in
@@ -255,6 +255,8 @@ suppression macro @KWIML at _ABI_NO_VERIFY was 
defined.
  #  endif
  # elif defined(__hpux) && !defined(__GNUC__) /* Old HP: no 
__HP_cc/__HP_aCC above */
  #  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
+# elif defined(__GNUC__)
+#  define @KWIML at _ABI_SIZEOF_LONG_LONG 8
  # endif
  #endif
  #if !defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && 
!defined(@KWIML at _ABI_NO_ERROR_LONG_LONG)

Eike



More information about the cmake-developers mailing list