The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13320 
====================================================================== 
Reported By:                Daniel R. Gomez
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13320
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-06-19 16:08 EDT
Last Modified:              2012-06-19 16:08 EDT
====================================================================== 
Summary:                    UINT32_C() et al. macro shenanigans break build on
HP-UX
Description: 
Bootstrapping CMake 2.8.8 on this HP-UX system fails with

[  1%] Building C object
Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_INT_C.c.o
cd /tmp/cmake-build/Utilities/KWIML/test && /opt/tg/bin/tg-gcc 
-DKWIML_NAMESPACE=cmIML -DKWIML_LANGUAGE_C -DKWIML_LANGUAGE_CXX -pipe -W -Wall
-Wcast-align -Wformat=2 -Wpointer-arith -Wundef -mpa-risc-2-0 -O3  -Wno-format
-I/tmp/cmake-build/Utilities/KWIML/test -I/tmp/cmake-build/Utilities    -o
CMakeFiles/cmIML_test.dir/test_INT_C.c.o   -c
/home/src/cmake-2.8.8/Utilities/KWIML/test/test_INT_C.c
In file included from
/home/src/cmake-2.8.8/Utilities/KWIML/test/test_INT_C.c:14:0:
/tmp/cmake-build/Utilities/KWIML/test/test_INT_format.h: In function
'test_INT_format':
/tmp/cmake-build/Utilities/KWIML/test/test_INT_format.h:195:1: error: pasting
")" and "l" does not give a valid preprocessing token
/tmp/cmake-build/Utilities/KWIML/test/test_INT_format.h:195:3: error: expected
',' or ';' before 'l'
gmake[2]: *** [Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_INT_C.c.o]
Error 1
gmake[2]: Leaving directory `/tmp/cmake-build'
gmake[1]: *** [Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/all] Error 2
gmake[1]: Leaving directory `/tmp/cmake-build'
gmake: *** [all] Error 2


The test_INT_format.h makes use of a symbol UINT32_C, and others like it. This
is defined in inttypes.h:

    $ gnu-grep -R UINT32_C /usr/include 
    /usr/include/inttypes.h:#define UINT32_C(__c)                   
__CONCAT_U__(__c)
    /usr/include/inttypes.h:#define UINT32_C(__c)                   
__CONCAT__(__CONCAT_U__(__c),l)
    /usr/include/inttypes.h:#  define UINT32_MAX     UINT32_C(4294967295)

>From what I can tell, this macro is being expanded before being passed as an
argument to TEST_C(). I'm not sure how to work around this.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-06-19 16:08 Daniel R. GomezNew Issue                                    
======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to