svn commit: r555435 - in head/math/dbcsr: . files
Yuri Victorovich
yuri at FreeBSD.org
Sun Nov 15 21:49:37 UTC 2020
Author: yuri
Date: Sun Nov 15 21:49:36 2020
New Revision: 555435
URL: https://svnweb.freebsd.org/changeset/ports/555435
Log:
math/dbcsr: Fixm build with gcc-10
1. Patch cmake scripts to respect the cmake variable CMAKE_Fortran_FLAGS set by the user
2. In case of gcc10+ add -fallow-argument-mismatch to this variable, and also add ${FFLAGS}
3. Otherwise just add ${FFLAGS}
PR: 246700
Added:
head/math/dbcsr/files/patch-cmake_CompilerConfiguration.cmake (contents, props changed)
Modified:
head/math/dbcsr/Makefile
Modified: head/math/dbcsr/Makefile
==============================================================================
--- head/math/dbcsr/Makefile Sun Nov 15 20:53:09 2020 (r555434)
+++ head/math/dbcsr/Makefile Sun Nov 15 21:49:36 2020 (r555435)
@@ -23,6 +23,7 @@ USE_LDCONFIG= yes
LDFLAGS+= -lopenblas
CMAKE_ON= BUILD_SHARED_LIBS
+CMAKE_OFF= BUILD_TESTING
CMAKE_ARGS= -DBLA_VENDOR:STRING="OpenBLAS"
TEST_TARGET= test # tests hang: https://github.com/cp2k/dbcsr/issues/72
@@ -39,10 +40,18 @@ OPENMP_CMAKE_BOOL= USE_OPENMP
C_API_DESC= Build the C API library
C_API_CMAKE_BOOL= WITH_C_API
+.include <bsd.port.pre.mk>
+
+. if ${GCC_DEFAULT} >= 10
+CMAKE_ARGS+= -DCMAKE_Fortran_FLAGS="${FFLAGS} -fallow-argument-mismatch" # -fallow-argument-mismatch is a workaround of https://github.com/cp2k/dbcsr/issues/387 for gcc10+
+. else
+CMAKE_ARGS+= -DCMAKE_Fortran_FLAGS="${FFLAGS}"
+. endif
+
do-test: # tests are broken: https://github.com/cp2k/dbcsr/issues/150
@cd ${BUILD_WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_TESTING:BOOL=ON ${CMAKE_SOURCE_PATH} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Added: head/math/dbcsr/files/patch-cmake_CompilerConfiguration.cmake
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/dbcsr/files/patch-cmake_CompilerConfiguration.cmake Sun Nov 15 21:49:36 2020 (r555435)
@@ -0,0 +1,11 @@
+Same change as https://github.com/cp2k/dbcsr/pull/388 PR for the current master branch.
+
+--- cmake/CompilerConfiguration.cmake.orig 2020-11-15 21:12:10 UTC
++++ cmake/CompilerConfiguration.cmake
+@@ -1,5 +1,5 @@
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+- set(CMAKE_Fortran_FLAGS "-ffree-form -ffree-line-length-none -std=f2008ts")
++ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-form -ffree-line-length-none -std=f2008ts")
+ set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -funroll-loops")
+ set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb")
+ set(CMAKE_Fortran_FLAGS_COVERAGE "-O0 -fprofile-arcs -ftest-coverage")
More information about the svn-ports-all
mailing list