summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-10-04 15:42:44 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-10-04 15:42:44 (GMT)
commit284cb8ffc06e39d16fe0e436beff7587be54ed50 (patch)
tree532adc3124395feb32f41d79d501a730fc6dd5d2
parentc5256dcd9d8a20f08e2e4a73f1c9b4be71abe0a9 (diff)
downloadhdf5-284cb8ffc06e39d16fe0e436beff7587be54ed50.zip
hdf5-284cb8ffc06e39d16fe0e436beff7587be54ed50.tar.gz
hdf5-284cb8ffc06e39d16fe0e436beff7587be54ed50.tar.bz2
TRILABS-21 Add intel compiler support
-rw-r--r--MANIFEST2
-rw-r--r--config/cmake/HDF5UseFortran.cmake6
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake9
-rw-r--r--config/intel.cmake8
4 files changed, 24 insertions, 1 deletions
diff --git a/MANIFEST b/MANIFEST
index 117c531..317e156 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3148,6 +3148,8 @@
./java/lib/ext/slf4j-simple-1.7.25.jar
# CMake-specific Files
+./config/intel.cmake
+
./config/cmake/cacheinit.cmake
./config/cmake/CMakeFindJavaCommon.cmake
./config/cmake/ConversionTests.c
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 1766ac8..e260f0c 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -33,7 +33,11 @@ endif ()
#-----------------------------------------------------------------------------
macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR RETURN_VAR)
#
-# if (NOT DEFINED ${RUN_RESULT_VAR})
+# if (CMAKE_CROSSCOMPILING)
+# set (${OUTPUT_VAR} ${PRESET_${FUNCTION_NAME}})
+# message (STATUS "Detecting Fortran ${FUNCTION_NAME}: force ${OUTPUT_VAR}")
+# set(${RETURN_VAR} ${OUTPUT_VAR})
+# else ()
message (STATUS "Detecting Fortran ${FUNCTION_NAME}")
if (CMAKE_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index 54e408b..8a37af3 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -30,6 +30,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
elseif (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (JPEG
@@ -47,6 +48,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (JPEG
@@ -64,6 +66,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
endif ()
externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR)
@@ -121,6 +124,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
elseif (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (SZIP
@@ -139,6 +143,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (SZIP
@@ -157,6 +162,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
endif ()
externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
@@ -213,6 +219,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
elseif (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (ZLIB
@@ -230,6 +237,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (ZLIB
@@ -247,6 +255,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
)
endif ()
externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR)
diff --git a/config/intel.cmake b/config/intel.cmake
new file mode 100644
index 0000000..ee16a0f
--- /dev/null
+++ b/config/intel.cmake
@@ -0,0 +1,8 @@
+#set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_COMPILER_VENDOR "intel")
+
+set(CMAKE_C_COMPILER icc)
+set(CMAKE_CXX_COMPILER icpc)
+set(CMAKE_Fortran_COMPILER ifort)
+
+set(PRESET_PRINTF_LL "ll")