[Insight-users] openjpeg bool problem with fix

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Jul 27 13:31:55 EDT 2006


The openjpeg header file seems to do some weird things with bool,  
true, false definitions. It has a HAVE_STD_BOOL_H flag but is not  
checked by cmake. I was getting some problems with these definitions  
on an optimized version on my apple (gcc4, G5). I just added a  
configure file to check for this header. This seems like the correct  
way to deal with the problem. I am not sure if this is more apple  
wackyness or what. Perhaps this can be checked it? Probably needs a  
few comments added, but I wanted to keep the diff simple.


Index: Utilities/openjpeg/CMakeLists.txt
===================================================================
RCS file: /cvsroot/Insight/Insight/Utilities/openjpeg/CMakeLists.txt,v
retrieving revision 1.8
diff -r1.8 CMakeLists.txt
24a25,30
 >
 > CHECK_INCLUDE_FILES("stdbool.h" HAVE_STDBOOL_H)
 > CONFIGURE_FILE(${ITKOpenJPEG_SOURCE_DIR}/openjpeg_config.h.in
 >   ${ITKOpenJPEG_BINARY_DIR}/openjpeg_config.h)
 > INCLUDE_DIRECTORIES(${ITKOpenJPEG_BINARY_DIR})
 >
Index: Utilities/openjpeg/openjpeg.h
===================================================================
RCS file: /cvsroot/Insight/Insight/Utilities/openjpeg/openjpeg.h,v
retrieving revision 1.5
diff -r1.5 openjpeg.h
32c32
<
---
 > #include "openjpeg_config.h"
cvs diff: Diffing Utilities/gdcm/src
Index: Utilities/gdcm/src/CMakeLists.txt
===================================================================
RCS file: /cvsroot/Insight/Insight/Utilities/gdcm/src/CMakeLists.txt,v
retrieving revision 1.17
diff -r1.17 CMakeLists.txt
9a10
 >   ${ITKOpenJPEG_BINARY_DIR}


I also added this file too.
/Insight blowek1$ cat Utilities/openjpeg/openjpeg_config.h.in

/* system support for <stdbool.h> */
#cmakedefine HAVE_STDBOOL_H

Thanks,
Brad

========================================================
Bradley Lowekamp
Management Systems Designers Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060727/081e5070/attachment.html


More information about the Insight-users mailing list