From eaaddcc9e5d9b717f4ae0ac4ee8dc6aa28fab133 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Jan 2019 14:39:31 -0600 Subject: Add PGI toolchain --- MANIFEST | 1 + config/toolchain/PGI.cmake | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 config/toolchain/PGI.cmake diff --git a/MANIFEST b/MANIFEST index a086a06..7ea34e4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3192,6 +3192,7 @@ ./config/toolchain/crayle.cmake ./config/toolchain/GCC.cmake ./config/toolchain/intel.cmake +./config/toolchain/PGI.cmake ./config/cmake/cacheinit.cmake ./config/cmake/CMakeFindJavaCommon.cmake diff --git a/config/toolchain/PGI.cmake b/config/toolchain/PGI.cmake new file mode 100644 index 0000000..9710d22 --- /dev/null +++ b/config/toolchain/PGI.cmake @@ -0,0 +1,10 @@ +# Uncomment the following to use cross-compiling +#set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_COMPILER_VENDOR "PGI") + +set(CMAKE_C_COMPILER pgcc) +set(CMAKE_CXX_COMPILER pgc++) +set(CMAKE_Fortran_COMPILER pgf90) + +# the following is used if cross-compiling +set(CMAKE_CROSSCOMPILING_EMULATOR "") -- cgit v0.12 From 6f6d0921c0592c202bae15dab1b05c921aef0043 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 2 Jan 2019 17:07:37 -0600 Subject: Use c99 standard cmake variable --- config/cmake/HDFCompilerFlags.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 93ebc3c..0a39568 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -9,16 +9,16 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED TRUE) message (STATUS "Warnings Configuration:") +set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}") #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") - if (NOT CYGWIN) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") - endif () if (${HDF_CFG_NAME} MATCHES "Debug") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common") -- cgit v0.12 From 9d0c66c7cb36fafa229160a079ce07488a115e82 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 3 Jan 2019 09:33:55 -0600 Subject: Update toolchain comment --- config/toolchain/GCC.cmake | 3 ++- config/toolchain/PGI.cmake | 1 + config/toolchain/intel.cmake | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/toolchain/GCC.cmake b/config/toolchain/GCC.cmake index ddb1641..c41d0ca 100644 --- a/config/toolchain/GCC.cmake +++ b/config/toolchain/GCC.cmake @@ -1,5 +1,6 @@ -# Uncomment the following to use cross-compiling +# Uncomment the following line and the correct system name to use cross-compiling #set(CMAKE_SYSTEM_NAME Linux) + set(CMAKE_COMPILER_VENDOR "GCC") set(CMAKE_C_COMPILER cc) diff --git a/config/toolchain/PGI.cmake b/config/toolchain/PGI.cmake index 9710d22..ec58cbb 100644 --- a/config/toolchain/PGI.cmake +++ b/config/toolchain/PGI.cmake @@ -1,5 +1,6 @@ # Uncomment the following to use cross-compiling #set(CMAKE_SYSTEM_NAME Linux) + set(CMAKE_COMPILER_VENDOR "PGI") set(CMAKE_C_COMPILER pgcc) diff --git a/config/toolchain/intel.cmake b/config/toolchain/intel.cmake index f1a5734..97f6a64 100644 --- a/config/toolchain/intel.cmake +++ b/config/toolchain/intel.cmake @@ -1,5 +1,6 @@ # Uncomment the following to use cross-compiling #set(CMAKE_SYSTEM_NAME Linux) + set(CMAKE_COMPILER_VENDOR "intel") set(CMAKE_C_COMPILER icc) -- cgit v0.12 From f4516d40feb7ea696e228253bc64a94f55296cbb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 3 Jan 2019 09:36:00 -0600 Subject: Fix comment --- config/toolchain/crayle.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/toolchain/crayle.cmake b/config/toolchain/crayle.cmake index a83147b..47d8afc 100644 --- a/config/toolchain/crayle.cmake +++ b/config/toolchain/crayle.cmake @@ -1,5 +1,6 @@ -# Uncomment the following to use cross-compiling +# The following line will use cross-compiling set(CMAKE_SYSTEM_NAME Linux) + set(CMAKE_COMPILER_VENDOR "CrayLinuxEnvironment") set(CMAKE_C_COMPILER cc) -- cgit v0.12