Skip to content

Commit 8cbb705

Browse files
committed
build option search_path_ccp_headers can be None in unit tests
1 parent 35db2f7 commit 8cbb705

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

easybuild/tools/toolchain/toolchain.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,11 +1094,12 @@ def _add_dependency_cpp_headers(self, dep_root, extra_dirs=None):
10941094
# toolchain option has precedence over build option
10951095
cpp_headers_mode = DEFAULT_SEARCH_PATH_CPP_HEADERS
10961096
tc_opt = self.options.option("search-path-cpp-headers")
1097+
build_opt = build_option("search_path_cpp_headers")
10971098
if tc_opt:
10981099
cpp_headers_mode = tc_opt
10991100
self.log.debug("search-path-cpp-headers set by toolchain option: %s", cpp_headers_mode)
1100-
else:
1101-
cpp_headers_mode = build_option("search_path_cpp_headers")
1101+
elif build_opt:
1102+
cpp_headers_mode = build_opt
11021103
self.log.debug("search-path-cpp-headers set by build option: %s", cpp_headers_mode)
11031104

11041105
if cpp_headers_mode not in SEARCH_PATH_CPP_HEADERS:

0 commit comments

Comments
 (0)