@@ -409,6 +409,9 @@ def configure_common(self):
409409 options ['LIBINTLIB' ] = '%s/lib' % libint
410410 options ['LIBS' ] += ' %s -lstdc++ %s' % (libint_libs , libint_wrapper )
411411
412+ # add Libint include dir to $FCFLAGS
413+ options ['FCFLAGS' ] += ' -I' + os .path .join (libint , 'include' )
414+
412415 else :
413416 # throw a warning, since CP2K without Libint doesn't make much sense
414417 self .log .warning ("Libint module not loaded, so building without Libint support" )
@@ -618,19 +621,20 @@ def build_step(self):
618621 -build_and_install
619622 """
620623
621- makefiles = os .path .join (self .cfg ['start_dir' ], 'makefiles' )
622- change_dir (makefiles )
624+ if LooseVersion (self .version ) < LooseVersion ('7.0' ):
625+ makefiles = os .path .join (self .cfg ['start_dir' ], 'makefiles' )
626+ change_dir (makefiles )
623627
624- # modify makefile for parallel build
625- parallel = self .cfg ['parallel' ]
626- if parallel :
628+ # modify makefile for parallel build
629+ parallel = self .cfg ['parallel' ]
630+ if parallel :
627631
628- try :
629- for line in fileinput .input ('Makefile' , inplace = 1 , backup = '.orig.patchictce' ):
630- line = re .sub (r"^PMAKE\s*=.*$" , "PMAKE\t = $(SMAKE) -j %s" % parallel , line )
631- sys .stdout .write (line )
632- except IOError as err :
633- raise EasyBuildError ("Can't modify/write Makefile in %s: %s" , makefiles , err )
632+ try :
633+ for line in fileinput .input ('Makefile' , inplace = 1 , backup = '.orig.patchictce' ):
634+ line = re .sub (r"^PMAKE\s*=.*$" , "PMAKE\t = $(SMAKE) -j %s" % parallel , line )
635+ sys .stdout .write (line )
636+ except IOError as err :
637+ raise EasyBuildError ("Can't modify/write Makefile in %s: %s" , makefiles , err )
634638
635639 # update make options with MAKE
636640 self .cfg .update ('buildopts' , 'MAKE="make -j %s"' % self .cfg ['parallel' ])
0 commit comments