TRILABS-21 add toolchain related info and files

This commit is contained in:
Allen Byrne 2018-10-04 11:40:33 -05:00
parent 284cb8ffc0
commit 2a95ab5acb
3 changed files with 37 additions and 2 deletions

View File

@ -96,3 +96,8 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
#############################################################################################
### use a toolchain file
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/intel.cmake")
#############################################################################################

View File

@ -1,8 +1,10 @@
# Uncomment the following to use cross-compiling
#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")
# the following is used if cross-compiling
set(PRESET_PRINTF_LL "l")

View File

@ -324,6 +324,34 @@ IV. Further considerations
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release ..
6. CMake uses a toolchain of utilities to compile, link libraries and
create archives, and other tasks to drive the build. The toolchain
utilities available are determined by the languages enabled. In normal
builds, CMake automatically determines the toolchain for host builds
based on system introspection and defaults. In cross-compiling
scenarios, a toolchain file may be specified with information about
compiler and utility paths.
Variables and Properties
Several variables relate to the language components of a toolchain which
are enabled. CMAKE_<LANG>_COMPILER is the full path to the compiler used
for <LANG>. CMAKE_<LANG>_COMPILER_ID is the identifier used by CMake for
the compiler and CMAKE_<LANG>_COMPILER_VERSION is the version of the compiler.
The CMAKE_<LANG>_FLAGS variables and the configuration-specific equivalents
contain flags that will be added to the compile command when compiling a
file of a particular language.
As the linker is invoked by the compiler driver, CMake needs a way to
determine which compiler to use to invoke the linker. This is calculated
by the LANGUAGE of source files in the target, and in the case of static
libraries, the language of the dependent libraries. The choice CMake makes
may be overridden with the LINKER_LANGUAGE target property.
See the CMake help for more information on using toolchain files.
To use a toolchain file with the supplied cmake scripts, see the
HDF5options.cmake file under the toolchain section.
Notes: CMake and HDF5
1. Using CMake for building and using HDF5 is under active development.