|
97 | 97 | ] |
98 | 98 | # modes to handle CPP header search paths |
99 | 99 | # see: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html |
100 | | -CPP_HEADERS_SEARCH_PATH_FLAGS = "CPPFLAGS" |
101 | | -CPP_HEADERS_SEARCH_PATH_CPATH = "CPATH" |
102 | | -CPP_HEADERS_SEARCH_PATH_INCLUDE = "INCLUDE_PATHS" |
103 | | -CPP_HEADERS_SEARCH_PATHS = { |
104 | | - CPP_HEADERS_SEARCH_PATH_FLAGS: ["CPPFLAGS"], |
105 | | - CPP_HEADERS_SEARCH_PATH_CPATH: ["CPATH"], |
106 | | - CPP_HEADERS_SEARCH_PATH_INCLUDE: ["C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", "OBJC_INCLUDE_PATH"], |
| 100 | +SEARCH_PATH_CPP_HEADERS_FLAGS = "CPPFLAGS" |
| 101 | +SEARCH_PATH_CPP_HEADERS_CPATH = "CPATH" |
| 102 | +SEARCH_PATH_CPP_HEADERS_INCLUDE = "INCLUDE_PATHS" |
| 103 | +SEARCH_PATH_CPP_HEADERS = { |
| 104 | + SEARCH_PATH_CPP_HEADERS_FLAGS: ["CPPFLAGS"], |
| 105 | + SEARCH_PATH_CPP_HEADERS_CPATH: ["CPATH"], |
| 106 | + SEARCH_PATH_CPP_HEADERS_INCLUDE: ["C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", "OBJC_INCLUDE_PATH"], |
107 | 107 | } |
108 | | -DEFAULT_CPP_HEADERS_SEARCH_PATH = CPP_HEADERS_SEARCH_PATH_FLAGS |
| 108 | +DEFAULT_SEARCH_PATH_CPP_HEADERS = SEARCH_PATH_CPP_HEADERS_FLAGS |
109 | 109 |
|
110 | 110 |
|
111 | 111 | def is_system_toolchain(tc_name): |
@@ -1090,26 +1090,26 @@ def _add_dependency_cpp_headers(self, dep_root, extra_dirs=None): |
1090 | 1090 | header_dirs.extend(extra_dirs) |
1091 | 1091 | header_dirs = set(header_dirs) # remove duplicates |
1092 | 1092 |
|
1093 | | - # mode of operation is defined by cpp-headers-search-path option |
| 1093 | + # mode of operation is defined by search-path-cpp-headers option |
1094 | 1094 | # toolchain option has precedence over build option |
1095 | | - cpp_headers_mode = DEFAULT_CPP_HEADERS_SEARCH_PATH |
1096 | | - tc_opt = self.options.option("cpp-headers-search-path") |
| 1095 | + cpp_headers_mode = DEFAULT_SEARCH_PATH_CPP_HEADERS |
| 1096 | + tc_opt = self.options.option("search-path-cpp-headers") |
1097 | 1097 | if tc_opt is not None: |
1098 | | - self.log.debug("cpp-headers-search-path set by toolchain option: %s", cpp_headers_mode) |
| 1098 | + self.log.debug("search-path-cpp-headers set by toolchain option: %s", cpp_headers_mode) |
1099 | 1099 | cpp_headers_mode = tc_opt |
1100 | 1100 | else: |
1101 | | - build_opt = build_option("cpp_headers_search_path") |
| 1101 | + build_opt = build_option("search_path_cpp_headers") |
1102 | 1102 | if build_opt is not None: |
1103 | | - self.log.debug("cpp-headers-search-path set by build option: %s", cpp_headers_mode) |
| 1103 | + self.log.debug("search-path-cpp-headers set by build option: %s", cpp_headers_mode) |
1104 | 1104 | cpp_headers_mode = build_opt |
1105 | 1105 |
|
1106 | | - if cpp_headers_mode not in CPP_HEADERS_SEARCH_PATHS: |
| 1106 | + if cpp_headers_mode not in SEARCH_PATH_CPP_HEADERS: |
1107 | 1107 | raise EasyBuildError( |
1108 | | - "Unknown value selected for option cpp-headers-search-path. Choose one of: %s", |
1109 | | - ", ".join(CPP_HEADERS_SEARCH_PATHS) |
| 1108 | + "Unknown value selected for option search-path-cpp-headers. Choose one of: %s", |
| 1109 | + ", ".join(SEARCH_PATH_CPP_HEADERS) |
1110 | 1110 | ) |
1111 | 1111 |
|
1112 | | - for env_var in CPP_HEADERS_SEARCH_PATHS[cpp_headers_mode]: |
| 1112 | + for env_var in SEARCH_PATH_CPP_HEADERS[cpp_headers_mode]: |
1113 | 1113 | self.log.debug("Adding header paths to toolchain variable '%s': %s", env_var, dep_root) |
1114 | 1114 | self.variables.append_subdirs(env_var, dep_root, subdirs=header_dirs) |
1115 | 1115 |
|
|
0 commit comments