From b8de4166f4558b389f8c1a3e720fb510d8c4eb01 Mon Sep 17 00:00:00 2001 From: Tero Frondelius Date: Thu, 17 Oct 2019 17:23:26 +0300 Subject: [PATCH 1/3] Adding compiler flags --- build_tarballs.jl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build_tarballs.jl b/build_tarballs.jl index 79e7247..83b7f95 100644 --- a/build_tarballs.jl +++ b/build_tarballs.jl @@ -3,7 +3,7 @@ using BinaryBuilder name = "umat_binaries" -version = v"0.5.0" +version = v"0.5.1" # Collection of sources required to build umat_binaries sources = [ @@ -34,8 +34,8 @@ script = raw""" cd $WORKSPACE/srcdir cat >CMakeLists.txt <CMakeLists.txt < Date: Thu, 17 Oct 2019 21:23:54 +0300 Subject: [PATCH 2/3] Make the name and version to be variables. --- build_tarballs.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build_tarballs.jl b/build_tarballs.jl index 83b7f95..2c9ee1a 100644 --- a/build_tarballs.jl +++ b/build_tarballs.jl @@ -30,7 +30,11 @@ sources = [ ] # Bash recipe for building across all platforms -script = raw""" +prefix_script = """ +export name=$name +export version=$version +""" +script = prefix_script * raw""" cd $WORKSPACE/srcdir cat >CMakeLists.txt < Date: Thu, 17 Oct 2019 21:57:45 +0300 Subject: [PATCH 3/3] Fixing flags --- build_tarballs.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_tarballs.jl b/build_tarballs.jl index 2c9ee1a..c20aac3 100644 --- a/build_tarballs.jl +++ b/build_tarballs.jl @@ -75,7 +75,6 @@ sed -i 's/CALL ROTSIG(/!CALL ROTSIG(/g' gurson_porous_plasticity.f90 if [[ ${nbits} == 64 ]]; then export OB=openblas64_ - export FF="-m64 -fdefault-integer-8" sed -i 's/call dgesv(/call dgesv_64(/g' gurson_porous_plasticity.f90 else export OB=openblas @@ -86,7 +85,7 @@ cmake_minimum_required(VERSION 3.5) project($name) set(VERSION $version) enable_language(Fortran) -set(CMAKE_Fortran_FLAGS "-fdefault-real-8 $FF") +set(CMAKE_Fortran_FLAGS "-fdefault-real-8 -fdefault-integer-8") add_library(gurson_porous_plasticity SHARED gurson_porous_plasticity.f90) target_link_libraries(gurson_porous_plasticity $OB) install(TARGETS gurson_porous_plasticity DESTINATION lib)