summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 9aec580..43d6e77 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 f88f57e..ec11b6c 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 1f714d9..86d65bd 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 0000000..104e3dc
--- /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 0000000..1d8c92a
--- /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 bc775e9..00ee7e1 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
{