Skip to content

Commit 324c79c

Browse files
committed
avoid warning about search-path-cpp-headers returning none
1 parent a110459 commit 324c79c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

easybuild/tools/toolchain/toolchain.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,12 +1093,11 @@ def _add_dependency_cpp_headers(self, dep_root, extra_dirs=None):
10931093
# mode of operation is defined by search-path-cpp-headers option
10941094
# toolchain option has precedence over build option
10951095
cpp_headers_mode = DEFAULT_SEARCH_PATH_CPP_HEADERS
1096-
tc_opt = self.options.option("search-path-cpp-headers")
10971096
build_opt = build_option("search_path_cpp_headers")
1098-
if tc_opt:
1099-
cpp_headers_mode = tc_opt
1097+
if self.options.get("search-path-cpp-headers") is not None:
1098+
cpp_headers_mode = self.options.option("search-path-cpp-headers")
11001099
self.log.debug("search-path-cpp-headers set by toolchain option: %s", cpp_headers_mode)
1101-
elif build_opt:
1100+
elif build_opt is not None:
11021101
cpp_headers_mode = build_opt
11031102
self.log.debug("search-path-cpp-headers set by build option: %s", cpp_headers_mode)
11041103

0 commit comments

Comments
 (0)