diff options
Diffstat (limited to 'release_docs/INSTALL_CMake.txt')
-rw-r--r-- | release_docs/INSTALL_CMake.txt | 79 |
1 files changed, 77 insertions, 2 deletions
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 708e713..edd876a 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -12,6 +12,7 @@ Section IV: Further considerations Section V: Options for building HDF5 Libraries with CMake command line Section VI: CMake option defaults for HDF5 Section VII: User Defined Options for HDF5 Libraries with CMake +Section VIII: User Defined Compile Flags for HDF5 Libraries with CMake ************************************************************************ @@ -274,9 +275,14 @@ IV. Further considerations packages there. Add the following CMake options: -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include + -DZLIB_USE_EXTERNAL:BOOL=OFF -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include + -DSZIP_USE_EXTERNAL:BOOL=OFF where "some_location" is the full path to the extlibs folder. + Also the appropriate environment variable must be set; + set(ENV{ZLIB_ROOT} "some_location") + set(ENV{SZIP_ROOT} "some_location") B. Use source packages from an GIT server by adding the following CMake options: @@ -318,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. @@ -491,7 +525,7 @@ These five steps are described in detail below. Release and build the solution. 3.2.1 The external libraries (zlib and szip) can be configured - to allow building the libraries by downloading from an GIT repository. + to allow building the libraries by downloading from a GIT repository. The option is 'HDF5_ALLOW_EXTERNAL_SUPPORT'; by adding the following configuration option: -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT" @@ -508,7 +542,7 @@ These five steps are described in detail below. adding the following configuration option: -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ" - The options to control the SVN URL (config/cmake/cacheinit.cmake + The options to control the TGZ URL (config/cmake/cacheinit.cmake file) are: ZLIB_TGZ_NAME:STRING="zlib_src.ext" SZIP_TGZ_NAME:STRING="szip_src.ext" @@ -590,6 +624,7 @@ HDF5_BUILD_TOOLS "Build HDF5 Tools" ON ---------------- HDF5 Advanced Options --------------------- ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF +HDF5_EXTERNAL_LIB_PREFIX "Use prefix for custom library naming." "" HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF @@ -618,6 +653,8 @@ HDF_TEST_EXPRESS "Control testing framework (0-3)" HDF5_TEST_VFD "Execute tests with different VFDs" OFF HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF +HDF5_USE_110_API_DEFAULT "Use the HDF5 1.10.x API by default" OFF +HDF5_USE_112_API_DEFAULT "Use the HDF5 1.12.x API by default" ON HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON @@ -649,6 +686,20 @@ NOTE: flag is not available on windows and some modern linux systems will ignore the flag. + ---------------- Unsupported Library Options --------------------- + The threadsafe, C++ and Java interfaces are not compatible + with the HDF5_ENABLE_PARALLEL option. + Unless ALLOW_UNSUPPORTED has been specified, + the following options must be disabled: + HDF5_ENABLE_THREADSAFE, HDF5_BUILD_CPP_LIB, HDF5_BUILD_JAVA + + The high-level, C++, Fortran and Java interfaces are not compatible + with the HDF5_ENABLE_THREADSAFE option because the lock is not hoisted + into the higher-level API calls. + Unless ALLOW_UNSUPPORTED has been specified, + the following options must be disabled: + HDF5_BUILD_HL_LIB, HDF5_BUILD_CPP_LIB, HDF5_BUILD_FORTRAN, HDF5_BUILD_JAVA + ======================================================================== VII. User Defined Options for HDF5 Libraries with CMake @@ -663,6 +714,30 @@ Copy the contents of the file, both macro and option, into the UserMacros.cmake file. Then enable the option to the CMake configuration, build and test process. + +======================================================================== +VIII. User Defined Compile Flags for HDF5 Libraries with CMake +======================================================================== + +Custom compiler flags can be added by defining the CMAKE_C_FLAGS and +CMAKE_CXX_FLAGS variables. +Using a cmake script: + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") +Defined on the configure line: + cmake -G "Visual Studio 12 2013" -DCMAKE_C_FLAGS:STRING=-O2 .. + +Debug symbols are enabled with configuration selections Debug or RelWithDebInfo. +The difference between Debug and RelWithDebInfo configurations is that +RelWithDebInfo optimizes the code similar to Release. It produces fully optimized +code, but also creates the symbol table and the debug metadata to give the +debugger input to map the execution back to the original code. +RelwithDebInfo configuration should not affect the performance when the code +is run without a debugger attached. + +The HDF5_ENABLE_COVERAGE option will add "-g -O0 -fprofile-arcs -ftest-coverage" +to CMAKE_C_FLAGS. + + ======================================================================== For further assistance, send email to help@hdfgroup.org ======================================================================== |