cleverleaf: Add C++ link flags for Fujitsu. (#17308)

This commit is contained in:
Tomoki, Karatsu 2020-07-01 01:02:18 +09:00 committed by GitHub
parent c4c010c0bf
commit 0fd71d24ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,10 @@
--- spack-src/CMakeLists.txt.org 2020-06-29 14:38:00.737544597 +0900
+++ spack-src/CMakeLists.txt 2020-06-29 14:40:33.758297327 +0900
@@ -24,6 +24,6 @@
add_definitions(-DVERSION="git" -DHOST_NAME="cab")
-set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
+set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "--linkfortran")
add_subdirectory (src)

View File

@ -24,6 +24,10 @@ class Cleverleaf(CMakePackage):
depends_on('boost')
depends_on('cmake@3.1:', type='build')
# The Fujitsu compiler requires the '--linkfortran'
# option to combine C++ and Fortran programs.
patch('fujitsu_add_link_flags.patch', when='%fj')
def flag_handler(self, name, flags):
if self.spec.satisfies('%intel') and name in ['cppflags', 'cxxflags']:
flags.append(self.compiler.cxx11_flag)