Commit 948272d4 authored by Remi Perenon's avatar Remi Perenon

Adding HEAP_ARRAYS option and use it for cmake ifort on Windows

parent 9871d079
Pipeline #7937 passed with stages
in 13 minutes and 53 seconds
......@@ -6,7 +6,7 @@ mkdir build_%compiler%
cd build_%compiler%
if %compiler% neq gfortran (
cmake -G "NMake Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Debug -D CMAKE_Fortran_COMPILER=%compiler% -D USE_HDF=ON -D HDF5_INCLUDE_PATH=%HDF5_INCLUDE_PATH% -D HDF5_LIBRARY_PATH=%HDF5_LIBRARY_PATH% ..
cmake -G "NMake Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Debug -D CMAKE_Fortran_COMPILER=%compiler% -D HEAP_ARRAYS=ON -D USE_HDF=ON -D HDF5_INCLUDE_PATH=%HDF5_INCLUDE_PATH% -D HDF5_LIBRARY_PATH=%HDF5_LIBRARY_PATH% ..
) else (
cmake -G "MinGW Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Debug -D CMAKE_Fortran_COMPILER=%compiler% -D USE_HDF=OFF -D HDF5_INCLUDE_PATH=%HDF5_INCLUDE_PATH% -D HDF5_LIBRARY_PATH=%HDF5_LIBRARY_PATH% ..
)
......
......@@ -5,6 +5,6 @@ rmdir build_release /s /q
mkdir build_release
cd build_release
cmake -G "NMake Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_Fortran_COMPILER=ifort -D USE_HDF=ON -D HDF5_INCLUDE_PATH=%HDF5_INCLUDE_PATH% -D HDF5_LIBRARY_PATH=%HDF5_LIBRARY_PATH% ..
cmake -G "NMake Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_Fortran_COMPILER=ifort -D HEAP_ARRAYS=ON -D USE_HDF=ON -D HDF5_INCLUDE_PATH=%HDF5_INCLUDE_PATH% -D HDF5_LIBRARY_PATH=%HDF5_LIBRARY_PATH% ..
cmake --build .
ctest
\ No newline at end of file
......@@ -10,7 +10,7 @@ option(USE_HDF "Build crysfml and wcrysfml library" OFF)
option(GUI "Build crysfml and wcrysfml library" OFF)
option(ARCH32 "32 or 64 bit architecture" ON)
option(CRYSFML08 "Build CrysFML08" OFF)
option(HEAP_ARRAYS "Put arrays in heap instead of stack (only for Windows ifort)" OFF)
option(PROG_EX "Build the Program Examples" ON)
if(DEFINED CMAKE_Fortran_COMPILER)
......
......@@ -9,14 +9,21 @@ macro(set_compiler_flags)
if(WIN32)
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_Fortran_FLAGS_DEBUG "/debug:full /traceback /nologo /fpp /Qopt-report=0")
# set(CMAKE_Fortran_FLAGS_DEBUG "/debug:full /traceback /nologo")
if (HEAP_ARRAYS)
set(CMAKE_Fortran_FLAGS_DEBUG "/debug:full /traceback /nologo /fpp /Qopt-report=0 /heap-arrays")
else()
set(CMAKE_Fortran_FLAGS_DEBUG "/debug:full /traceback /nologo /fpp /Qopt-report=0")
endif()
set(OPT_FLAGS0 "/O0 /check:noarg_temp_created ")
set(OPT_FLAGS "/Od /check:noarg_temp_created ")
set(OPT_FLAGS1 "/Od /check:noarg_temp_created ")
set(OPT_FLAGS2 "/Od /check:noarg_temp_created ")
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_Fortran_FLAGS_RELEASE "/Qopt-report=0 /nologo")
if (HEAP_ARRAYS)
set(CMAKE_Fortran_FLAGS_RELEASE "/Qopt-report=0 /nologo /heap-arrays")
else()
set(CMAKE_Fortran_FLAGS_RELEASE "/Qopt-report=0 /nologo")
endif()
set(OPT_FLAGS0 "/O0")
set(OPT_FLAGS "/O2 /Qparallel")
set(OPT_FLAGS1 "/Od")
......
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