ENH: add support for the Portland Compiler to CMake, can build cmake and the tests pass (except the wrapping tests, which fail to link to the g++-compiled Qt)

Alex
This commit is contained in:
Alexander Neundorf 2007-09-17 15:55:17 -04:00
parent f9391ab291
commit 4ee1ee1bd0
6 changed files with 26 additions and 2 deletions

View File

@ -406,9 +406,9 @@ CMAKE_BUILD_UTILITIES()
IF(BUILD_CursesDialog) IF(BUILD_CursesDialog)
GET_FILENAME_COMPONENT(_CURSES_DIR "${CURSES_LIBRARY}" PATH) GET_FILENAME_COMPONENT(_CURSES_DIR "${CURSES_LIBRARY}" PATH)
SET(CURSES_NEED_RPATH FALSE) SET(CURSES_NEED_RPATH FALSE)
IF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib") IF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64")
SET(CURSES_NEED_RPATH TRUE) SET(CURSES_NEED_RPATH TRUE)
ENDIF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib") ENDIF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64")
ENDIF(BUILD_CursesDialog) ENDIF(BUILD_CursesDialog)
# The same might be true on other systems for other libraries if # The same might be true on other systems for other libraries if

View File

@ -27,6 +27,9 @@
#elif defined(__IBMC__) #elif defined(__IBMC__)
# define COMPILER_ID "VisualAge" # define COMPILER_ID "VisualAge"
#elif defined(__PGI)
# define COMPILER_ID "PGI"
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define COMPILER_ID "GNU" # define COMPILER_ID "GNU"

View File

@ -29,6 +29,9 @@
#elif defined(__IBMCPP__) #elif defined(__IBMCPP__)
# define COMPILER_ID "VisualAge" # define COMPILER_ID "VisualAge"
#elif defined(__PGI)
# define COMPILER_ID "PGI"
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define COMPILER_ID "GNU" # define COMPILER_ID "GNU"

View File

@ -0,0 +1,5 @@
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

View File

@ -0,0 +1,4 @@
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

View File

@ -193,6 +193,15 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const char* name)
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
/* There is a problem with the Portland compiler, large file
support and glibc/Linux system headers:
http://www.pgroup.com/userforum/viewtopic.php?
p=1992&sid=f16167f51964f1a68fe5041b8eb213b6
*/
#if defined(__PGI) && defined(__USE_FILE_OFFSET64)
# define dirent dirent64
#endif
namespace KWSYS_NAMESPACE namespace KWSYS_NAMESPACE
{ {