summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-09-17 15:55:17 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-09-17 15:55:17 -0400
commit4ee1ee1bd0d6b19feb5846bfeccdc39a90d52ac8 (patch)
tree911ac1b075af9be769d8999e61dec635b1257f4c
parentf9391ab2916755b319dff4dd11282425b2c076cc (diff)
downloadcmake-4ee1ee1bd0d6b19feb5846bfeccdc39a90d52ac8.tar.gz
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
-rw-r--r--CMakeLists.txt4
-rw-r--r--Modules/CMakeCCompilerId.c3
-rw-r--r--Modules/CMakeCXXCompilerId.cpp3
-rw-r--r--Modules/Platform/Linux-PGI-C.cmake5
-rw-r--r--Modules/Platform/Linux-PGI-CXX.cmake4
-rw-r--r--Source/kwsys/Directory.cxx9
6 files changed, 26 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9aec580fba..43d6e77c4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -406,9 +406,9 @@ CMAKE_BUILD_UTILITIES()
IF(BUILD_CursesDialog)
GET_FILENAME_COMPONENT(_CURSES_DIR "${CURSES_LIBRARY}" PATH)
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)
- 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)
# The same might be true on other systems for other libraries if
diff --git a/Modules/CMakeCCompilerId.c b/Modules/CMakeCCompilerId.c
index f88f57e0f7..ec11b6c1b1 100644
--- a/Modules/CMakeCCompilerId.c
+++ b/Modules/CMakeCCompilerId.c
@@ -27,6 +27,9 @@
#elif defined(__IBMC__)
# define COMPILER_ID "VisualAge"
+#elif defined(__PGI)
+# define COMPILER_ID "PGI"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/CMakeCXXCompilerId.cpp b/Modules/CMakeCXXCompilerId.cpp
index 1f714d9536..86d65bde6d 100644
--- a/Modules/CMakeCXXCompilerId.cpp
+++ b/Modules/CMakeCXXCompilerId.cpp
@@ -29,6 +29,9 @@
#elif defined(__IBMCPP__)
# define COMPILER_ID "VisualAge"
+#elif defined(__PGI)
+# define COMPILER_ID "PGI"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/Platform/Linux-PGI-C.cmake b/Modules/Platform/Linux-PGI-C.cmake
new file mode 100644
index 0000000000..104e3dcca7
--- /dev/null
+++ b/Modules/Platform/Linux-PGI-C.cmake
@@ -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>")
+
diff --git a/Modules/Platform/Linux-PGI-CXX.cmake b/Modules/Platform/Linux-PGI-CXX.cmake
new file mode 100644
index 0000000000..1d8c92a3f5
--- /dev/null
+++ b/Modules/Platform/Linux-PGI-CXX.cmake
@@ -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>")
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx
index bc775e9441..00ee7e1ed7 100644
--- a/Source/kwsys/Directory.cxx
+++ b/Source/kwsys/Directory.cxx
@@ -193,6 +193,15 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const char* name)
#include <sys/types.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
{