Commit 8916b6da authored by Remi Perenon's avatar Remi Perenon

Documenting cmake

parent 8aafb52b
Pipeline #5608 passed with stage
in 6 minutes and 57 seconds
......@@ -8,6 +8,8 @@ cd build_%compiler%
if %compiler% neq gfortran (
cmake -G "NMake Makefiles" -D USE_HDF=ON -D CMAKE_Fortran_COMPILER=%compiler% ..
) else (
rem C++ and C compiles must be set. Also, a "trick" has been set on the build server to build with MinGW
rem See See http://hdf-forum.184993.n3.nabble.com/HDF5-and-MinGW-td3393676.html for more details about this "trick"
cmake -G "NMake Makefiles" -D USE_HDF=ON -D CMAKE_Fortran_COMPILER=%compiler% -D CMAKE_CXX_COMPILER=g++.exe -D CMAKE_C_COMPILER=gcc.exe -D MINGW_HDF_TRICK=1 ..
)
......
......@@ -77,9 +77,18 @@ cmake -G "NMake Makefiles" -D GUI=ON -D ARCH32=OFF -D CMAKE_Fortran_COMPILER_FO
Building CrysFML for use with HDF5
==================================
We should use the alternative CFML_ILL_Instrm_Data_Nexus.f90 instead of CFML_ILL_Instrm_Data.f90. This is done via pre-processor.
To help cmake finding dependencies (i.e HDF5, Boost, NeXuS and blosc), environment variables must be set
- CRYSFML_HDF5_DIR
- CRYSFML_BOOST_DIR
- CRYSFML_NEXUS_DIR
- CRYSFML_BLOSC_DIR
cmake -G "Unix Makefiles" -D CMAKE_Fortran_COMPILER=ifort -D USE_HDF=ON -D GUI=ON -D ARCH32=OFF -D CMAKE_INSTALL_PREFIX=$CRYSFML/ifort64HDF -D CRYSFML_PREFIX=LibC -D WCRYSFML_PREFIX=LibW ../../.
cmake -G "NMake Makefiles" -D CMAKE_Fortran_COMPILER=ifort -D CMAKE_BUILD_TYPE=Debug -D GUI=ON -D ARCH32=OFF -D CMAKE_INSTALL_PREFIX=C:\SXtalSoft\DistSXT\Windows\debug ..\..\.
Be aware hdf5 cannot be built with MinGW without a subtle trick.
See http://hdf-forum.184993.n3.nabble.com/HDF5-and-MinGW-td3393676.html
Example for SXTALSOFT on Windows
================================
Assure that CRYSMFL_LIB and WCRYSMFL_LIB are both set to the proper platform (64 bits or 32 bits), only 64 bits will be developed from now.
......
......@@ -61,6 +61,10 @@ Here are the instructions to run cmake in order to build the CrysFML library.
Useful CMake variables (case sensitive):
* USE_HDF: ON|OFF.
Default OFF
If ON, CrysFML will be able to read NeXuS input data files.
* GUI: ON|OFF.
Default OFF
If OFF, only CrysFML will be built.
......
......@@ -5,6 +5,8 @@
#cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
# A "trick" has been set on the build server to build with MinGW
# See See http://hdf-forum.184993.n3.nabble.com/HDF5-and-MinGW-td3393676.html for more details about this "trick"
if(MINGW_HDF_TRICK)
add_compile_options(-DMINGW_HDF_TRICK)
endif()
......@@ -31,10 +33,12 @@ install(TARGETS crysfml_cpp
#################################
# Boost
# Use proper "Findboost_cryfml.cmake"
find_package(boost_crysfml)
include_directories(${Boost_INCLUDE_DIR})
# HDF5
# Use proper "Findhdf5_cryfml.cmake"
find_package(hdf5_crysfml)
include_directories(${HDF5_INCLUDE_DIR})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment