Skip to content

Commit 72c41a6

Browse files
committed
Use StrList instead of *FlagList
1 parent d90e38f commit 72c41a6

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

easybuild/tools/toolchain/constants.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
* Kenneth Hoste (Ghent University)
3232
"""
3333

34-
from easybuild.tools.toolchain.variables import CommandFlagList, CommaSharedLibs, CommaStaticLibs, FlagList
35-
from easybuild.tools.toolchain.variables import IncludePaths, LibraryList, LinkLibraryPaths, SearchPaths
36-
from easybuild.tools.variables import AbsPathList
34+
from easybuild.tools.toolchain.variables import CommaSharedLibs, CommaStaticLibs
35+
from easybuild.tools.toolchain.variables import IncludePaths, LibraryList, LinkLibraryPaths
36+
from easybuild.tools.variables import AbsPathList, StrList
3737

3838

3939
COMPILER_VARIABLES = [
@@ -53,10 +53,10 @@
5353
]
5454

5555
COMPILER_MAP_CLASS = {
56-
FlagList: [
56+
StrList: [
5757
('OPTFLAGS', 'Optimization flags'),
5858
('PRECFLAGS', 'FP precision flags'),
59-
] + COMPILER_FLAGS,
59+
] + COMPILER_FLAGS + COMPILER_VARIABLES,
6060
LibraryList: [
6161
('LIBS', 'Libraries'), # -l options to pass to the linker (C/C++/Fortran)
6262
('FLIBS', 'Fortran libraries'), # linker flags (e.g. -L and -l) for Fortran libraries
@@ -74,18 +74,15 @@
7474
('OBJC_INCLUDE_PATH', 'Location of Objective C header files'),
7575
('LIBRARY_PATH', 'Location of linker files'),
7676
],
77-
CommandFlagList: COMPILER_VARIABLES,
7877
}
7978

8079
CO_COMPILER_MAP_CLASS = {
81-
CommandFlagList: [
80+
StrList: [
8281
('CUDA_CC', 'CUDA C compiler command'),
8382
('CUDA_CXX', 'CUDA C++ compiler command'),
8483
('CUDA_F77', 'CUDA Fortran 77 compiler command'),
8584
('CUDA_F90', 'CUDA Fortran 90 compiler command'),
8685
('CUDA_FC', 'CUDA Fortran 77/90 compiler command'),
87-
],
88-
FlagList: [
8986
('CUDA_CFLAGS', 'CUDA C compiler flags'),
9087
('CUDA_CXXFLAGS', 'CUDA C++ compiler flags'),
9188
('CUDA_FCFLAGS', 'CUDA Fortran 77/90 compiler flags'),
@@ -110,7 +107,7 @@
110107
('MPI_LIB_DIR', 'MPI library directory'),
111108
('MPI_INC_DIR', 'MPI include directory'),
112109
],
113-
CommandFlagList: MPI_COMPILER_VARIABLES + SEQ_COMPILER_VARIABLES,
110+
StrList: MPI_COMPILER_VARIABLES + SEQ_COMPILER_VARIABLES,
114111
}
115112

116113
BLAS_MAP_CLASS = {

easybuild/tools/toolchain/toolchainvariables.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333

3434
from easybuild.tools.variables import Variables, join_map_class
3535
from easybuild.tools.toolchain.constants import ALL_MAP_CLASSES
36-
from easybuild.tools.toolchain.variables import LinkerFlagList, FlagList
36+
from easybuild.tools.toolchain.variables import LinkerFlagList
37+
from easybuild.tools.variables import StrList
3738

3839

3940
class ToolchainVariables(Variables):
@@ -42,7 +43,7 @@ class ToolchainVariables(Variables):
4243
in context of compilers (i.e. the generated string are e.g. compiler options or link flags)
4344
"""
4445
MAP_CLASS = join_map_class(ALL_MAP_CLASSES) # join_map_class strips explanation
45-
DEFAULT_CLASS = FlagList
46+
DEFAULT_CLASS = StrList
4647
LINKER_TOGGLE_START_STOP_GROUP = None
4748
LINKER_TOGGLE_STATIC_DYNAMIC = None
4849

0 commit comments

Comments
 (0)