- Fixed building of re2c on Linux. (It was never used in Linux builds before, was it?)

SVN r1086 (trunk)
This commit is contained in:
Randy Heit 2008-07-23 20:36:36 +00:00
parent 47d8a41540
commit 59735a261d
2 changed files with 68 additions and 2 deletions

View file

@ -1,5 +1,30 @@
cmake_minimum_required( VERSION 2.6 )
project( re2c )
cmake_minimum_required( VERSION 2.4 )
include( CheckIncludeFiles )
include( CheckFunctionExists )
include( CheckTypeSize )
set( PACKAGE_NAME re2c )
set( PACKAGE_TARNAME re2c )
set( PACKAGE_VERSION 0.12.3 )
set( PACKAGE_STRING "re2c 0.12.3" )
set( PACKAGE_BUGREPORT "re2c-general@lists.sourceforge.net" )
set( PACKAGE ${PACKAGE_NAME} )
set( VERSION ${PACKAGE_VERSION} )
CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H )
CHECK_FUNCTION_EXISTS( strdup HAVE_STRDUP )
CHECK_FUNCTION_EXISTS( strndup HAVE_STRNDUP )
CHECK_TYPE_SIZE( char SIZEOF_CHAR )
CHECK_TYPE_SIZE( short SIZEOF_SHORT )
CHECK_TYPE_SIZE( int SIZEOF_INT )
CHECK_TYPE_SIZE( long SIZEOF_LONG )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h )
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
add_definitions( -DHAVE_CONFIG_H )
add_executable( re2c
actions.cc

41
tools/re2c/config.h.in Normal file
View file

@ -0,0 +1,41 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the `strdup' function. */
#cmakedefine HAVE_STRDUP
/* Define to 1 if you have the `strndup' function. */
#cmakedefine HAVE_STRNDUP
/* Name of package */
#cmakedefine PACKAGE "@PACKAGE_NAME@"
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
/* The size of `char', as computed by sizeof. */
#define SIZEOF_CHAR @SIZEOF_CHAR@
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT @SIZEOF_INT@
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG @SIZEOF_LONG@
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT @SIZEOF_SHORT@
/* Version number of package */
#define VERSION "@PACKAGE_VERSION@"