mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Added possible LIB file
This commit is contained in:
parent
7a4a524574
commit
ce868eab0a
@ -99,9 +99,20 @@ def ninja_create_env_variable(pwd_config_file):
|
|||||||
l_string = ["builddir = {0}".format(os.path.dirname(ROOT_BUILD_NINJA)),
|
l_string = ["builddir = {0}".format(os.path.dirname(ROOT_BUILD_NINJA)),
|
||||||
""]
|
""]
|
||||||
|
|
||||||
|
|
||||||
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))
|
||||||
|
for directory in [real_join(QP_SRC, m) for m in sorted(os.listdir(QP_SRC))]:
|
||||||
|
includefile = real_join(directory, flag)
|
||||||
|
try:
|
||||||
|
content = ""
|
||||||
|
with open(includefile,'r') as f:
|
||||||
|
content = f.read()
|
||||||
|
str_ += " "+content
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
|
||||||
l_string.append(str_)
|
l_string.append(str_)
|
||||||
|
|
||||||
lib_lapack = get_compilation_option(pwd_config_file, "LAPACK_LIB")
|
lib_lapack = get_compilation_option(pwd_config_file, "LAPACK_LIB")
|
||||||
@ -110,17 +121,20 @@ 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().replace('\n','')
|
||||||
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))
|
||||||
|
|
||||||
|
|
||||||
|
l_string.append("CONFIG_FILE = {0}".format(pwd_config_file))
|
||||||
l_string.append("")
|
l_string.append("")
|
||||||
|
|
||||||
return l_string
|
return l_string
|
||||||
|
Loading…
Reference in New Issue
Block a user