9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-09 06:53:38 +01:00

Make qp take into account all LIB files of modules
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Anthony Scemama 2022-12-01 16:49:53 +01:00
parent f8b7ad5516
commit cc0f226979

View File

@ -103,14 +103,15 @@ def ninja_create_env_variable(pwd_config_file):
for flag in ["FC", "FCFLAGS", "IRPF90", "IRPF90_FLAGS"]: for flag in ["FC", "FCFLAGS", "IRPF90", "IRPF90_FLAGS"]:
str_ = "{0} = {1}".format(flag, get_compilation_option(pwd_config_file, str_ = "{0} = {1}".format(flag, get_compilation_option(pwd_config_file,
flag)) flag))
includefile = flag for directory in [real_join(QP_SRC, m) for m in sorted(os.listdir(QP_SRC))]:
try: includefile = real_join(directory, flag)
content = "" try:
with open(includefile,'r') as f: content = ""
content = f.read() with open(includefile,'r') as f:
str_ += " "+content content = f.read()
except IOError: str_ += " "+content
pass except IOError:
pass
l_string.append(str_) l_string.append(str_)
@ -120,14 +121,15 @@ def ninja_create_env_variable(pwd_config_file):
str_lib = " ".join([lib_lapack, EZFIO_LIB, ZMQ_LIB, LIB, lib_usr]) str_lib = " ".join([lib_lapack, EZFIO_LIB, ZMQ_LIB, LIB, lib_usr])
# Read all LIB files in modules # Read all LIB files in modules
libfile = "LIB" for directory in [real_join(QP_SRC, m) for m in sorted(os.listdir(QP_SRC))]:
try: libfile = real_join(directory, "LIB")
content = "" try:
with open(libfile,'r') as f: content = ""
content = f.read() with open(libfile,'r') as f:
str_lib += " "+content content = f.read()
except IOError: str_lib += " "+content
pass except IOError:
pass
l_string.append("LIB = {0} ".format(str_lib)) l_string.append("LIB = {0} ".format(str_lib))