diff options
44 files changed, 169 insertions, 157 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 53f558e..9028e8e 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -32,7 +32,7 @@ # _CMAKE_TOOLCHAIN_PREFIX IF(NOT CMAKE_C_COMPILER) - SET(CMAKE_CXX_COMPILER_INIT NOTFOUND) + SET(CMAKE_C_COMPILER_INIT NOTFOUND) # prefer the environment variable CC IF($ENV{CC} MATCHES ".+") diff --git a/Modules/FindArmadillo.cmake b/Modules/FindArmadillo.cmake index 50eb787..84ed3ca 100644 --- a/Modules/FindArmadillo.cmake +++ b/Modules/FindArmadillo.cmake @@ -74,7 +74,7 @@ endif (ARMADILLO_INCLUDE_DIR) #====================== -# Checks 'RECQUIRED', 'QUIET' and versions. +# Checks 'REQUIRED', 'QUIET' and versions. include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Armadillo REQUIRED_VARS ARMADILLO_LIBRARY ARMADILLO_INCLUDE_DIR diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 9f8d575..56a92c1 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -540,7 +540,7 @@ set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE}) macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc) if(CMAKE_SIZEOF_VOID_P EQUAL 8) - # CUDA 3.2+ on Windows moved the library directoryies, so we need the new + # CUDA 3.2+ on Windows moved the library directories, so we need the new # and old paths. set(_cuda_64bit_lib_dir "lib/x64" "lib64" ) endif() diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake index 0e21284..4a0fbe0 100644 --- a/Modules/FindDevIL.cmake +++ b/Modules/FindDevIL.cmake @@ -2,11 +2,22 @@ # http://openil.sourceforge.net/ # # This module sets: -# IL_LIBRARIES the name of the IL library. These include the full path to the core DevIL library. This one has to be linked into the application. -# ILU_LIBRARIES the name of the ILU library. Again, the full path. This library is for filters and effects, not actual loading. It doesn't have to be linked if the functionality it provides is not used. -# ILUT_LIBRARIES the name of the ILUT library. Full path. This part of the library interfaces with OpenGL. It is not strictly needed in applications. -# IL_INCLUDE_DIR where to find the il.h, ilu.h and ilut.h files. -# IL_FOUND this is set to TRUE if all the above variables were set. This will be set to false if ILU or ILUT are not found, even if they are not needed. In most systems, if one library is found all the others are as well. That's the way the DevIL developers release it. +# IL_LIBRARIES - the name of the IL library. These include the full path to +# the core DevIL library. This one has to be linked into the +# application. +# ILU_LIBRARIES - the name of the ILU library. Again, the full path. This +# library is for filters and effects, not actual loading. It +# doesn't have to be linked if the functionality it provides +# is not used. +# ILUT_LIBRARIES - the name of the ILUT library. Full path. This part of the +# library interfaces with OpenGL. It is not strictly needed +# in applications. +# IL_INCLUDE_DIR - where to find the il.h, ilu.h and ilut.h files. +# IL_FOUND - this is set to TRUE if all the above variables were set. +# This will be set to false if ILU or ILUT are not found, +# even if they are not needed. In most systems, if one +# library is found all the others are as well. That's the +# way the DevIL developers release it. #============================================================================= # Copyright 2008-2009 Kitware, Inc. diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index bb18a2e..bdea95b 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -79,18 +79,14 @@ SET(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the # Search only if the location is not already known. IF(NOT FLTK_DIR) # Get the system search path as a list. - IF(UNIX) - STRING(REGEX MATCHALL "[^:]+" FLTK_DIR_SEARCH1 "$ENV{PATH}") - ELSE(UNIX) - STRING(REGEX REPLACE "\\\\" "/" FLTK_DIR_SEARCH1 "$ENV{PATH}") - ENDIF(UNIX) - STRING(REGEX REPLACE "/;" ";" FLTK_DIR_SEARCH2 ${FLTK_DIR_SEARCH1}) + FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK_DIR_SEARCH2) # Construct a set of paths relative to the system search path. SET(FLTK_DIR_SEARCH "") FOREACH(dir ${FLTK_DIR_SEARCH2}) SET(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk") ENDFOREACH(dir) + STRING(REPLACE "//" "/" FLTK_DIR_SEARCH "${FLTK_DIR_SEARCH}") # # Look for an installation or build tree. @@ -105,8 +101,6 @@ IF(NOT FLTK_DIR) # Look in standard UNIX install locations. /usr/local/lib/fltk /usr/lib/fltk - /usr/local/include - /usr/include /usr/local/fltk /usr/X11R6/include diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake index 436e280..9164745 100644 --- a/Modules/FindFLTK2.cmake +++ b/Modules/FindFLTK2.cmake @@ -59,18 +59,14 @@ SET(FLTK2_DIR_STRING "directory containing FLTK2Config.cmake. This is either th # Search only if the location is not already known. IF(NOT FLTK2_DIR) # Get the system search path as a list. - IF(UNIX) - STRING(REGEX MATCHALL "[^:]+" FLTK2_DIR_SEARCH1 "$ENV{PATH}") - ELSE(UNIX) - STRING(REGEX REPLACE "\\\\" "/" FLTK2_DIR_SEARCH1 "$ENV{PATH}") - ENDIF(UNIX) - STRING(REGEX REPLACE "/;" ";" FLTK2_DIR_SEARCH2 ${FLTK2_DIR_SEARCH1}) + FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK2_DIR_SEARCH2) # Construct a set of paths relative to the system search path. SET(FLTK2_DIR_SEARCH "") FOREACH(dir ${FLTK2_DIR_SEARCH2}) SET(FLTK2_DIR_SEARCH ${FLTK2_DIR_SEARCH} "${dir}/../lib/fltk") ENDFOREACH(dir) + STRING(REPLACE "//" "/" FLTK2_DIR_SEARCH "${FLTK2_DIR_SEARCH}") # # Look for an installation or build tree. @@ -85,8 +81,6 @@ IF(NOT FLTK2_DIR) # Look in standard UNIX install locations. /usr/local/lib/fltk2 /usr/lib/fltk2 - /usr/local/include - /usr/include /usr/local/fltk2 /usr/X11R6/include @@ -193,8 +187,6 @@ IF(FLTK2_DIR) ENDIF(FLTK2_FLUID_EXECUTABLE) SET(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH} - /usr/local/include - /usr/include /usr/local/fltk2 /usr/X11R6/include ) @@ -202,8 +194,6 @@ IF(FLTK2_DIR) FIND_PATH(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH}) SET(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH} - /usr/lib - /usr/local/lib /usr/local/fltk2/lib /usr/X11R6/lib ${FLTK2_INCLUDE_DIR}/lib diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake index ee8b84e..9a5cc17 100644 --- a/Modules/FindLua50.cmake +++ b/Modules/FindLua50.cmake @@ -31,8 +31,6 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw # Fink /opt/local # DarwinPorts /opt/csw # Blastwave @@ -47,8 +45,6 @@ FIND_LIBRARY(LUA_LIBRARY_lua PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw @@ -67,8 +63,6 @@ ELSE(${LUA_LIBRARY_lua} MATCHES "framework") $ENV{LUA_DIR} PATH_SUFFIXES lib64 lib PATHS - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake index b67dd4c..e111d36 100644 --- a/Modules/FindLua51.cmake +++ b/Modules/FindLua51.cmake @@ -32,8 +32,6 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw # Fink /opt/local # DarwinPorts /opt/csw # Blastwave @@ -48,8 +46,6 @@ FIND_LIBRARY(LUA_LIBRARY PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake index bcba6e2..cb3ce48 100644 --- a/Modules/FindOpenAL.cmake +++ b/Modules/FindOpenAL.cmake @@ -68,8 +68,6 @@ FIND_PATH(OPENAL_INCLUDE_DIR al.h PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw # Fink /opt/local # DarwinPorts /opt/csw # Blastwave @@ -85,8 +83,6 @@ FIND_LIBRARY(OPENAL_LIBRARY PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake index 80dfd51..2e3ac14 100644 --- a/Modules/FindPhysFS.cmake +++ b/Modules/FindPhysFS.cmake @@ -30,8 +30,6 @@ FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw # Fink /opt/local # DarwinPorts /opt/csw # Blastwave @@ -46,8 +44,6 @@ FIND_LIBRARY(PHYSFS_LIBRARY PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake index 39a9436..26c804a 100644 --- a/Modules/FindProducer.cmake +++ b/Modules/FindProducer.cmake @@ -51,8 +51,6 @@ FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local/include - /usr/include /sw/include # Fink /opt/local/include # DarwinPorts /opt/csw/include # Blastwave @@ -69,8 +67,6 @@ FIND_LIBRARY(PRODUCER_LIBRARY $ENV{OSGDIR} PATH_SUFFIXES lib64 lib PATHS - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 391797e..2f1708d 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -102,15 +102,28 @@ # accompanying header file foo.h. # If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro. # +# You should have a look on the AUTOMOC property for targets to achieve the same results. +# # macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) -# create a the interface header and implementation files with the +# Create a the interface header and implementation files with the # given basename from the given interface xml file and add it to -# the list of sources +# the list of sources. +# +# You can pass additional parameters to the qdbusxml2cpp call by setting +# properties on the input file: +# +# INCLUDE the given file will be included in the generate interface header +# +# CLASSNAME the generated class is named accordingly +# +# NO_NAMESPACE the generated class is not wrapped in a namespace # # macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) -# create the interface header and implementation files -# for all listed interface xml files -# the name will be automatically determined from the name of the xml file +# Create the interface header and implementation files +# for all listed interface xml files. +# The basename will be automatically determined from the name of the xml file. +# +# The source file properties described for QT4_ADD_DBUS_INTERFACE also apply here. # # macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname]) # create a dbus adaptor (header and implementation file) from the xml file @@ -217,7 +230,7 @@ # QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) # QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) # QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" -# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus" +# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus" # QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner" # QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner" # QT_QTGUI_INCLUDE_DIR Path to "include/QtGui" diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake index 9a130fa..f215bda 100644 --- a/Modules/FindSDL_image.cmake +++ b/Modules/FindSDL_image.cmake @@ -39,8 +39,6 @@ FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h /usr/local/include/SDL11 # FreeBSD ports /usr/include/SDL12 /usr/include/SDL11 - /usr/local/include - /usr/include /sw/include/SDL # Fink /sw/include /opt/local/include/SDL # DarwinPorts @@ -60,8 +58,6 @@ FIND_LIBRARY(SDLIMAGE_LIBRARY PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake index ce1ae9e..7cc1a6b 100644 --- a/Modules/FindSDL_mixer.cmake +++ b/Modules/FindSDL_mixer.cmake @@ -39,8 +39,6 @@ FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h /usr/local/include/SDL11 # FreeBSD ports /usr/include/SDL12 /usr/include/SDL11 - /usr/local/include - /usr/include /sw/include/SDL # Fink /sw/include /opt/local/include/SDL # DarwinPorts @@ -60,8 +58,6 @@ FIND_LIBRARY(SDLMIXER_LIBRARY PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake index b5ada54..ca1de79 100644 --- a/Modules/FindSDL_net.cmake +++ b/Modules/FindSDL_net.cmake @@ -39,8 +39,6 @@ FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h /usr/local/include/SDL11 # FreeBSD ports /usr/include/SDL12 /usr/include/SDL11 - /usr/local/include - /usr/include /sw/include/SDL # Fink /sw/include /opt/local/include/SDL # DarwinPorts @@ -59,8 +57,6 @@ FIND_LIBRARY(SDLNET_LIBRARY PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index 8edf6ca..35294a5 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -86,8 +86,6 @@ FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h /usr/local/include/SDL11 # FreeBSD ports /usr/include/SDL12 /usr/include/SDL11 - /usr/local/include - /usr/include /sw/include/SDL # Fink /sw/include /opt/local/include/SDL # DarwinPorts @@ -106,8 +104,6 @@ FIND_LIBRARY(SDL_SOUND_LIBRARY $ENV{SDLDIR}/lib $ENV{SDLDIR} PATHS - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -222,8 +218,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -245,8 +239,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -271,8 +263,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -293,8 +283,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -317,8 +305,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -341,8 +327,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -368,8 +352,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib @@ -395,8 +377,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) $ENV{SDLSOUNDDIR} $ENV{SDLDIR}/lib $ENV{SDLDIR} - /usr/local/lib - /usr/lib /sw/lib /opt/local/lib /opt/csw/lib diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake index 3d07ab7..184b6c3 100644 --- a/Modules/FindSDL_ttf.cmake +++ b/Modules/FindSDL_ttf.cmake @@ -39,8 +39,6 @@ FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h /usr/local/include/SDL11 # FreeBSD ports /usr/include/SDL12 /usr/include/SDL11 - /usr/local/include - /usr/include /sw/include/SDL # Fink /sw/include /opt/local/include/SDL # DarwinPorts @@ -59,8 +57,6 @@ FIND_LIBRARY(SDLTTF_LIBRARY PATHS ~/Library/Frameworks /Library/Frameworks - /usr/local - /usr /sw /opt/local /opt/csw diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake index b0b6b2f..48d195a 100644 --- a/Modules/FindSquish.cmake +++ b/Modules/FindSquish.cmake @@ -43,18 +43,14 @@ SET(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.") # Search only if the location is not already known. IF(NOT SQUISH_INSTALL_DIR) # Get the system search path as a list. - IF(UNIX) - STRING(REGEX MATCHALL "[^:]+" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}") - ELSE(UNIX) - STRING(REGEX REPLACE "\\\\" "/" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}") - ENDIF(UNIX) - STRING(REGEX REPLACE "/;" ";" SQUISH_INSTALL_DIR_SEARCH2 ${SQUISH_INSTALL_DIR_SEARCH1}) + FILE(TO_CMAKE_PATH "$ENV{PATH}" SQUISH_INSTALL_DIR_SEARCH2) # Construct a set of paths relative to the system search path. SET(SQUISH_INSTALL_DIR_SEARCH "") FOREACH(dir ${SQUISH_INSTALL_DIR_SEARCH2}) SET(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk") ENDFOREACH(dir) + STRING(REPLACE "//" "/" SQUISH_INSTALL_DIR_SEARCH "${SQUISH_INSTALL_DIR_SEARCH}") # Look for an installation FIND_PATH(SQUISH_INSTALL_DIR bin/squishrunner diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index f2c776f..7f6d3a7 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -82,8 +82,6 @@ SET(TCLTK_POSSIBLE_LIB_PATHS "${TK_LIBRARY_PATH}" "${TCL_TCLSH_PATH_PARENT}/lib" "${TK_WISH_PATH_PARENT}/lib" - /usr/lib - /usr/local/lib ) IF(WIN32) @@ -162,8 +160,6 @@ SET(TCLTK_POSSIBLE_INCLUDE_PATHS ${TK_FRAMEWORK_INCLUDES} "${TCL_TCLSH_PATH_PARENT}/include" "${TK_WISH_PATH_PARENT}/include" - /usr/include - /usr/local/include /usr/include/tcl${TK_LIBRARY_VERSION} /usr/include/tcl${TCL_LIBRARY_VERSION} /usr/include/tcl8.6 diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake index 4db2716..79d14ae 100644 --- a/Modules/FindTclStub.cmake +++ b/Modules/FindTclStub.cmake @@ -66,8 +66,6 @@ SET(TCLTK_POSSIBLE_LIB_PATHS "${TK_LIBRARY_PATH}" "${TCL_TCLSH_PATH_PARENT}/lib" "${TK_WISH_PATH_PARENT}/lib" - /usr/lib - /usr/local/lib ) IF(WIN32) diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake index f55cf00..dfb28ff 100644 --- a/Modules/FindwxWindows.cmake +++ b/Modules/FindwxWindows.cmake @@ -139,7 +139,7 @@ IF(WIN32_STYLE_FIND) ## find libs for combination of static/shared with release/debug ## be careful if you add something here, ## avoid mixing of headers and libs of different wx versions, - ## there may be multiple WX version s installed. + ## there may be multiple WX versions installed. SET (WXWINDOWS_POSSIBLE_LIB_PATHS "${WXWINDOWS_ROOT_DIR}/lib" ) diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index f867bc5..68f3c80 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -220,9 +220,9 @@ ENDMACRO (QT4_ADD_RESOURCES) MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE) - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) - SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) - SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h") + SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp") + SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc") GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE) IF(_nonamespace) @@ -241,16 +241,16 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) SET(_params ${_params} -i ${_include}) ENDIF(_include) - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}" COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile} DEPENDS ${_infile} VERBATIM) - SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE) - QT4_GENERATE_MOC(${_header} ${_moc}) + QT4_GENERATE_MOC("${_header}" "${_moc}") - SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) - MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}") + MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}") ENDMACRO(QT4_ADD_DBUS_INTERFACE) @@ -258,9 +258,10 @@ ENDMACRO(QT4_ADD_DBUS_INTERFACE) MACRO(QT4_ADD_DBUS_INTERFACES _sources) FOREACH (_current_FILE ${ARGN}) GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME) # get the part before the ".xml" suffix - STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE}) STRING(TOLOWER ${_basename} _basename) + STRING(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename}) QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface) ENDFOREACH (_current_FILE) ENDMACRO(QT4_ADD_DBUS_INTERFACES) @@ -305,27 +306,27 @@ MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional ENDIF (_optionalBasename) SET(_optionalClassName "${ARGV5}") - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) - SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) - SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h") + SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp") + SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc") IF(_optionalClassName) - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}" COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} DEPENDS ${_infile} VERBATIM ) ELSE(_optionalClassName) - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}" COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile} DEPENDS ${_infile} VERBATIM ) ENDIF(_optionalClassName) - QT4_GENERATE_MOC(${_header} ${_moc}) - SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) - MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + QT4_GENERATE_MOC("${_header}" "${_moc}") + SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE) + MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}") - SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) + LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}") ENDMACRO(QT4_ADD_DBUS_ADAPTOR) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index fb88d24..7feb0d7 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_PATCH 8) -SET(CMake_VERSION_TWEAK 20120620) +SET(CMake_VERSION_TWEAK 20120709) #SET(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index 36302df..381c70c 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/Source/CTest/cmCTestBZR.cxx @@ -128,13 +128,12 @@ class cmCTestBZR::RevnoParser: public cmCTestVC::LineParser { public: RevnoParser(cmCTestBZR* bzr, const char* prefix, std::string& rev): - BZR(bzr), Rev(rev) + Rev(rev) { this->SetLog(&bzr->Log, prefix); this->RegexRevno.compile("^([0-9]+)$"); } private: - cmCTestBZR* BZR; std::string& Rev; cmsys::RegularExpression RegexRevno; virtual bool ProcessLine() diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index c3989c0..8014c41 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -701,13 +701,22 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand( *this->CompileCommandsStream << "," << std::endl; } + std::string sourceFileName = sourceFile; + if (!cmSystemTools::FileIsFullPath(sourceFileName.c_str())) + { + sourceFileName = cmSystemTools::CollapseFullPath( + sourceFileName.c_str(), + this->GetCMakeInstance()->GetHomeOutputDirectory()); + } + + *this->CompileCommandsStream << "\n{\n" << " \"directory\": \"" << cmGlobalGenerator::EscapeJSON(buildFileDir) << "\",\n" << " \"command\": \"" << cmGlobalGenerator::EscapeJSON(commandLine) << "\",\n" << " \"file\": \"" - << cmGlobalGenerator::EscapeJSON(sourceFile) << "\"\n" + << cmGlobalGenerator::EscapeJSON(sourceFileName) << "\"\n" << "}"; } diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index bf9fd9e..76e622e 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -85,7 +85,10 @@ public: "with which the install rule is associated, such as \"runtime\" or " "\"development\". During component-specific installation only " "install rules associated with the given component name will be " - "executed. During a full installation all components are installed.\n" + "executed. During a full installation all components are installed." + " If COMPONENT is not provided a default component \"Unspecified\" is" + " created. The default component name may be controlled with the " + "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME variable.\n" "The RENAME argument specifies a name for an installed file that " "may be different from the original file. Renaming is allowed only " "when a single file is installed by the command.\n" diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 46c92cb..0cfb36b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2865,10 +2865,13 @@ cmLocalGenerator bool replaceExt = this->NeedBackwardsCompatibility(2, 4); if(!replaceExt) { - std::string repVar = "CMAKE_"; - repVar += source.GetLanguage(); - repVar += "_OUTPUT_EXTENSION_REPLACE"; - replaceExt = this->Makefile->IsOn(repVar.c_str()); + if(const char* lang = source.GetLanguage()) + { + std::string repVar = "CMAKE_"; + repVar += lang; + repVar += "_OUTPUT_EXTENSION_REPLACE"; + replaceExt = this->Makefile->IsOn(repVar.c_str()); + } } // Remove the source extension if it is to be replaced. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a60896f..7b6c450 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2203,8 +2203,12 @@ bool cmMakefile::PlatformIs64Bit() const const char* cmMakefile::GetSONameFlag(const char* language) const { - std::string name = "CMAKE_SHARED_LIBRARY_SONAME_"; - name += language; + std::string name = "CMAKE_SHARED_LIBRARY_SONAME"; + if(language) + { + name += "_"; + name += language; + } name += "_FLAG"; return GetDefinition(name.c_str()); } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index df89275..16e3e02 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1416,10 +1416,9 @@ class cmMakefileTargetGeneratorObjectStrings { public: cmMakefileTargetGeneratorObjectStrings(std::vector<std::string>& strings, - cmMakefile* mf, cmLocalUnixMakefileGenerator3* lg, std::string::size_type limit): - Strings(strings), Makefile(mf), LocalGenerator(lg), LengthLimit(limit) + Strings(strings), LocalGenerator(lg), LengthLimit(limit) { this->Space = ""; } @@ -1454,7 +1453,6 @@ public: } private: std::vector<std::string>& Strings; - cmMakefile* Makefile; cmLocalUnixMakefileGenerator3* LocalGenerator; std::string::size_type LengthLimit; std::string CurrentString; @@ -1469,7 +1467,7 @@ cmMakefileTargetGenerator std::string::size_type limit) { cmMakefileTargetGeneratorObjectStrings - helper(objStrings, this->Makefile, this->LocalGenerator, limit); + helper(objStrings, this->LocalGenerator, limit); for(std::vector<std::string>::const_iterator i = this->Objects.begin(); i != this->Objects.end(); ++i) { diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 6157931..4758989 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -534,9 +534,21 @@ cmNinjaTargetGenerator cmLocalGenerator::RuleVariables compileObjectVars; std::string lang = language; compileObjectVars.Language = lang.c_str(); - std::string escapedSourceFileName = + + std::string escapedSourceFileName = sourceFileName; + + if (!cmSystemTools::FileIsFullPath(sourceFileName.c_str())) + { + escapedSourceFileName = cmSystemTools::CollapseFullPath( + escapedSourceFileName.c_str(), + this->GetGlobalGenerator()->GetCMakeInstance()-> + GetHomeOutputDirectory()); + } + + escapedSourceFileName = this->LocalGenerator->ConvertToOutputFormat( - sourceFileName.c_str(), cmLocalGenerator::SHELL); + escapedSourceFileName.c_str(), cmLocalGenerator::SHELL); + compileObjectVars.Source = escapedSourceFileName.c_str(); compileObjectVars.Object = objectFileName.c_str(); compileObjectVars.Flags = vars["FLAGS"].c_str(); diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 775a4eb..96a75de 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -48,7 +48,6 @@ private: std::vector<std::string> OrderedDirectories; - bool OrderedDirectoriesComputed; std::vector<cmOrderDirectoriesConstraint*> ConstraintEntries; std::vector<cmOrderDirectoriesConstraint*> ImplicitDirEntries; std::vector<std::string> UserDirectories; diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt index ad27e57..456e496 100644 --- a/Tests/Assembler/CMakeLists.txt +++ b/Tests/Assembler/CMakeLists.txt @@ -23,6 +23,7 @@ endif("${CMAKE_GENERATOR}" MATCHES "Makefile") if(SRCS) + set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}") enable_language(ASM OPTIONAL) else(SRCS) message(STATUS "No assembler enabled, using C") diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 434cbee..dc1ce24 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -63,12 +63,12 @@ private: void ParseString() { - this->String.clear(); + this->String = ""; if(!Expect('"')) return; while (!Expect('"')) { Expect('\\'); - this->String.push_back(C); + this->String.append(1,C); Next(); } } diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index 793b987..eb9f987 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -91,6 +91,9 @@ run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} add . ) run_child(WORKING_DIRECTORY ${TOP}/import + COMMAND ${GIT} config core.safecrlf false + ) +run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} submodule add ${MOD_REPO} module ) run_child(WORKING_DIRECTORY ${TOP}/import diff --git a/Tests/FindPackageModeMakefileTest/Makefile.in b/Tests/FindPackageModeMakefileTest/Makefile.in index 073d82e..f647901 100644 --- a/Tests/FindPackageModeMakefileTest/Makefile.in +++ b/Tests/FindPackageModeMakefileTest/Makefile.in @@ -1,10 +1,29 @@ +CMAKE = "@cmakeExecutable@" +CMAKE_CURRENT_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@" +CMAKE_CXX_COMPILER = "@CMAKE_CXX_COMPILER@" +CMAKE_CXX_COMPILER_ID = "@CMAKE_CXX_COMPILER_ID@" + +CMAKE_FOO = $(CMAKE) --find-package -DCMAKE_MODULE_PATH=$(CMAKE_CURRENT_BINARY_DIR) -DNAME=Foo -DLANGUAGE=CXX -DCOMPILER_ID=$(CMAKE_CXX_COMPILER_ID) + +tmp = tmp.txt + all: clean pngtest main.o: main.cpp - "@CMAKE_CXX_COMPILER@" $(CXXFLAGS) -c $(shell "@cmakeExecutable@" --find-package -DCMAKE_MODULE_PATH="@CMAKE_CURRENT_BINARY_DIR@" -DNAME=Foo -DLANGUAGE=CXX -DCOMPILER_ID=@CMAKE_CXX_COMPILER_ID@ -DMODE=COMPILE) main.cpp + @$(CMAKE_FOO) -DMODE=COMPILE >$(tmp) + @foo="`cat $(tmp)`"; \ + printf '"%s" %s %s -c main.cpp\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$$foo" >$(tmp) + @cat $(tmp) + @sh $(tmp) + @rm -f $(tmp) pngtest: main.o - "@CMAKE_CXX_COMPILER@" $(LDFLAGS) -o pngtest main.o $(shell "@cmakeExecutable@" --find-package -DCMAKE_MODULE_PATH="@CMAKE_CURRENT_BINARY_DIR@" -DNAME=Foo -DLANGUAGE=CXX -DCOMPILER_ID=@CMAKE_CXX_COMPILER_ID@ -DMODE=LINK) + @$(CMAKE_FOO) -DMODE=LINK >$(tmp) + @foo="`cat $(tmp)`"; \ + printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp) + @cat $(tmp) + @sh $(tmp) + @rm -f $(tmp) clean: - rm -f *.o pngtest + rm -f $(tmp) *.o pngtest diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 1c6db39..23fc086 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -45,6 +45,7 @@ macro(add_RunCMake_test test) ) endmacro() +add_RunCMake_test(Languages) add_RunCMake_test(ObjectLibrary) add_RunCMake_test(build_command) diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt new file mode 100644 index 0000000..e8db6b0 --- /dev/null +++ b/Tests/RunCMake/Languages/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Languages/NoLangSHARED-result.txt b/Tests/RunCMake/Languages/NoLangSHARED-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Languages/NoLangSHARED-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Languages/NoLangSHARED-stderr.txt b/Tests/RunCMake/Languages/NoLangSHARED-stderr.txt new file mode 100644 index 0000000..3f93cf8 --- /dev/null +++ b/Tests/RunCMake/Languages/NoLangSHARED-stderr.txt @@ -0,0 +1 @@ +CMake Error: CMake can not determine linker language for target:NoLang diff --git a/Tests/RunCMake/Languages/NoLangSHARED.cmake b/Tests/RunCMake/Languages/NoLangSHARED.cmake new file mode 100644 index 0000000..de6adf7 --- /dev/null +++ b/Tests/RunCMake/Languages/NoLangSHARED.cmake @@ -0,0 +1 @@ +add_library(NoLang SHARED foo.nolang) diff --git a/Tests/RunCMake/Languages/RunCMakeTest.cmake b/Tests/RunCMake/Languages/RunCMakeTest.cmake new file mode 100644 index 0000000..a99548f --- /dev/null +++ b/Tests/RunCMake/Languages/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(NoLangSHARED) diff --git a/Tests/RunCMake/Languages/foo.nolang b/Tests/RunCMake/Languages/foo.nolang new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/Languages/foo.nolang diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in index e85a1c5..060a520 100644 --- a/Utilities/KWIML/ABI.h.in +++ b/Utilities/KWIML/ABI.h.in @@ -156,6 +156,8 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined. # define @KWIML@_ABI_CHAR_IS_UNSIGNED 1 # elif defined(__BORLANDC__) /* Borland default */ # define @KWIML@_ABI_CHAR_IS_SIGNED 1 +# elif defined(__hpux) /* Old HP: no __HP_cc/__HP_aCC/__GNUC__ above */ +# define @KWIML@_ABI_CHAR_IS_SIGNED 1 /* (unless +uc) */ # endif #endif #if !defined(@KWIML@_ABI_CHAR_IS_UNSIGNED) && !defined(@KWIML@_ABI_CHAR_IS_SIGNED) \ @@ -251,6 +253,8 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined. # else # define @KWIML@_ABI_SIZEOF_LONG_LONG 0 # endif +# elif defined(__hpux) && !defined(__GNUC__) /* Old HP: no __HP_cc/__HP_aCC above */ +# define @KWIML@_ABI_SIZEOF_LONG_LONG 8 # endif #endif #if !defined(@KWIML@_ABI_SIZEOF_LONG_LONG) && !defined(@KWIML@_ABI_NO_ERROR_LONG_LONG) diff --git a/Utilities/KWIML/INT.h.in b/Utilities/KWIML/INT.h.in index d40edcd..d2eda63 100644 --- a/Utilities/KWIML/INT.h.in +++ b/Utilities/KWIML/INT.h.in @@ -91,10 +91,11 @@ An includer may test the following macros after inclusion: Some compilers define integer format macros incorrectly for their own formatted print/scan implementations. - @KWIML@_INT_BROKEN_INT64_C = macro INT64_C is incorrect if defined - @KWIML@_INT_BROKEN_UINT64_C = macro UINT64_C is incorrect if defined + @KWIML@_INT_BROKEN_INT#_C = macro INT#_C is incorrect if defined + @KWIML@_INT_BROKEN_UINT#_C = macro UINT#_C is incorrect if defined Some compilers define integer constant macros incorrectly and - cannot handle literals as large as the integer type. + cannot handle literals as large as the integer type or even + produce bad preprocessor syntax. @KWIML@_INT_BROKEN_INT8_T = type 'int8_t' is available but incorrect Some compilers have a flag to make 'char' (un)signed but do not account @@ -259,8 +260,6 @@ An includer may test the following macros after inclusion: # endif #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) # define @KWIML@_INT__NO_SCN8 -#elif defined(__HP_cc) || defined(__HP_aCC) -# define @KWIML@_INT__NO_SCN8 #elif defined(__BORLANDC__) # define @KWIML@_INT__NO_SCN8 # define @KWIML@_INT__NO_SCN64 @@ -268,6 +267,8 @@ An includer may test the following macros after inclusion: # define @KWIML@_INT__NO_SCN8 #elif defined(__WATCOMC__) # define @KWIML@_INT__NO_SCN8 +# elif defined(__hpux) /* HP runtime lacks support (any compiler) */ +# define @KWIML@_INT__NO_SCN8 #endif /* 8-bit d, i */ @@ -341,12 +342,12 @@ An includer may test the following macros after inclusion: #endif /* 8-bit constants */ -#if defined(INT8_C) +#if defined(INT8_C) && !defined(@KWIML@_INT_BROKEN_INT8_C) # define @KWIML@_INT_INT8_C(c) INT8_C(c) #else # define @KWIML@_INT_INT8_C(c) c #endif -#if defined(UINT8_C) +#if defined(UINT8_C) && !defined(@KWIML@_INT_BROKEN_UINT8_C) # define @KWIML@_INT_UINT8_C(c) UINT8_C(c) #else # define @KWIML@_INT_UINT8_C(c) c ## u @@ -435,12 +436,12 @@ An includer may test the following macros after inclusion: #endif /* 16-bit constants */ -#if defined(INT16_C) +#if defined(INT16_C) && !defined(@KWIML@_INT_BROKEN_INT16_C) # define @KWIML@_INT_INT16_C(c) INT16_C(c) #else # define @KWIML@_INT_INT16_C(c) c #endif -#if defined(UINT16_C) +#if defined(UINT16_C) && !defined(@KWIML@_INT_BROKEN_UINT16_C) # define @KWIML@_INT_UINT16_C(c) UINT16_C(c) #else # define @KWIML@_INT_UINT16_C(c) c ## u @@ -528,13 +529,19 @@ An includer may test the following macros after inclusion: # define @KWIML@_INT_PRIX32 "X" #endif +#if defined(__hpux) && defined(__GNUC__) && !defined(__LP64__) \ + && defined(__CONCAT__) && defined(__CONCAT_U__) + /* Some HPs define UINT32_C incorrectly and break GNU. */ +# define @KWIML@_INT_BROKEN_UINT32_C +#endif + /* 32-bit constants */ -#if defined(INT32_C) +#if defined(INT32_C) && !defined(@KWIML@_INT_BROKEN_INT32_C) # define @KWIML@_INT_INT32_C(c) INT32_C(c) #else # define @KWIML@_INT_INT32_C(c) c #endif -#if defined(UINT32_C) +#if defined(UINT32_C) && !defined(@KWIML@_INT_BROKEN_UINT32_C) # define @KWIML@_INT_UINT32_C(c) UINT32_C(c) #else # define @KWIML@_INT_UINT32_C(c) c ## u |