On 21/06/17 11:17, Roger Leigh wrote:


On 21/06/17 10:46, Vitaly Prapirny wrote:
Roger Leigh wrote on 21/06/2017 12:20:
On 21/06/17 08:48, Vitaly Prapirny wrote:
I've got an error while running cmake with "Borland Makefiles" generator and Borland C++ Builder 5 compiler. Is BCB5 still supported?

It's not a combination I've personally tested, but I can't see any evidence that it shouldn't work.

What are the errors you are seeing? Maybe it just needs a few minor tweaks to our cmake logic.
I've attached log files to the https://issues.apache.org/jira/browse/XERCESC-2077

Thanks. This was a problem with the int type check fallbacks. Please see the attached patch or this github branch: https://github.com/rleigh-codelibre/xerces-c/tree/cmake-int-fallback

Sorry, too hasty.  Please try this revised patch which actually works.


Roger
>From 294248062d2f2843895c1a62599ebbef4f4e0985 Mon Sep 17 00:00:00 2001
From: Roger Leigh <rle...@codelibre.net>
Date: Wed, 21 Jun 2017 11:12:17 +0100
Subject: [PATCH] cmake: XercesIntTypes: Correct signed types and variable
 names

---
 cmake/XercesIntTypes.cmake | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/cmake/XercesIntTypes.cmake b/cmake/XercesIntTypes.cmake
index 3390febf7..c840b0010 100644
--- a/cmake/XercesIntTypes.cmake
+++ b/cmake/XercesIntTypes.cmake
@@ -70,13 +70,13 @@ else()
 endif()
 
 # Check type sizes
-check_type_size("short"              SIZEOF_SHORT)
+check_type_size("signed short"       SIZEOF_SHORT)
 check_type_size("unsigned short"     SIZEOF_UNSIGNED_SHORT)
-check_type_size("int"                SIZEOF_INT)
+check_type_size("signed int"         SIZEOF_INT)
 check_type_size("unsigned int"       SIZEOF_UNSIGNED_INT)
-check_type_size("long"               SIZEOF_LONG)
+check_type_size("signed long"        SIZEOF_LONG)
 check_type_size("unsigned long"      SIZEOF_UNSIGNED_LONG)
-check_type_size("long long"          SIZEOF_LONG_LONG)
+check_type_size("signed long long"   SIZEOF_LONG_LONG)
 check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
 check_type_size("__int64"            SIZEOF___INT64)
 check_type_size("unsigned __int64"   SIZEOF_UNSIGNED__INT64)
@@ -100,7 +100,7 @@ if(HAVE_CSTDINT OR HAVE_STDINT_H OR HAVE_INTTYPES_H)
   set(XERCES_U64BIT_INT "uint64_t")
 else()
   # Fallback to basic language types
-  if(SIZEOF_SIGNED_SHORT EQUAL 2)
+  if(SIZEOF_SHORT EQUAL 2)
     set(XERCES_S16BIT_INT "signed short")
   elseif(SIZEOF_INT EQUAL 2)
     set(XERCES_S16BIT_INT "int")
@@ -116,9 +116,9 @@ else()
     message(FATAL_ERROR "Couldn't find an unsigned 16-bit type")
   endif()
 
-  if(SIZEOF_SIGNED_INT EQUAL 4)
+  if(SIZEOF_INT EQUAL 4)
     set(XERCES_S32BIT_INT "signed int")
-  elseif(SIZEOF_SIGNED_LONG EQUAL 4)
+  elseif(SIZEOF_LONG EQUAL 4)
     set(XERCES_S32BIT_INT "signed long")
   else()
     message(FATAL_ERROR "Couldn't find a signed 32-bit type")
@@ -133,11 +133,11 @@ else()
   endif()
 
   if(SIZEOF_INT EQUAL 8)
-    set(XERCES_S64BIT_INT "int")
+    set(XERCES_S64BIT_INT "signed int")
   elseif(SIZEOF_LONG EQUAL 8)
-    set(XERCES_S64BIT_INT "long")
+    set(XERCES_S64BIT_INT "signed long")
   elseif(SIZEOF_LONG_LONG EQUAL 8)
-    set(XERCES_S64BIT_INT "long long")
+    set(XERCES_S64BIT_INT "signed long long")
   elseif(SIZEOF___INT64 EQUAL 8)
     set(XERCES_S64BIT_INT "__int64")
   else()
-- 
2.13.1


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to