[oneapi]: make headers match oneapi vars.sh (#42614)
* [oneapi]: make headers match oneapi vars.sh * update * update
This commit is contained in:
parent
fae6d3780f
commit
2c67571726
@ -179,16 +179,24 @@ class IntelOneApiLibraryPackage(IntelOneApiPackage):
|
||||
|
||||
"""
|
||||
|
||||
# find_headers uses heuristics to determine the include directory
|
||||
# that does not work for oneapi packages. Use explicit directories
|
||||
# instead.
|
||||
def header_directories(self, dirs):
|
||||
h = HeaderList([])
|
||||
h.directories = dirs
|
||||
# trilinos passes the directories to cmake, and cmake requires
|
||||
# that the directory exists
|
||||
for dir in dirs:
|
||||
if not isdir(dir):
|
||||
raise RuntimeError(f"{dir} does not exist")
|
||||
return h
|
||||
|
||||
@property
|
||||
def headers(self):
|
||||
return self.header_directories(
|
||||
[self.component_prefix.include, self.component_prefix.include.join(self.component_dir)]
|
||||
)
|
||||
# This should match the directories added to CPATH by
|
||||
# env/vars.sh for the component
|
||||
return self.header_directories([self.component_prefix.include])
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
|
@ -117,3 +117,14 @@ def v2_layout_versions(self):
|
||||
@property
|
||||
def component_dir(self):
|
||||
return "dal"
|
||||
|
||||
@property
|
||||
def headers(self):
|
||||
# This should match the directories added to CPATH by
|
||||
# env/vars.sh for the component
|
||||
if self.v2_layout:
|
||||
dirs = [self.component_prefix.include, self.component_prefix.include.dal]
|
||||
else:
|
||||
dirs = [self.component_prefix.include]
|
||||
|
||||
return self.header_directories(dirs)
|
||||
|
@ -123,7 +123,14 @@ def __target(self):
|
||||
|
||||
@property
|
||||
def headers(self):
|
||||
return find_headers("dnnl", self.__target().include)
|
||||
# This should match the directories added to CPATH by
|
||||
# env/vars.sh for the component
|
||||
if self.v2_layout:
|
||||
dirs = [self.component_prefix.include]
|
||||
else:
|
||||
dirs = [self.component_prefix.cpu_dpcpp_gpu_dpcpp.include]
|
||||
|
||||
return self.header_directories(dirs)
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
|
@ -93,6 +93,11 @@ def component_dir(self):
|
||||
|
||||
@property
|
||||
def headers(self):
|
||||
return self.header_directories(
|
||||
[self.component_prefix.include, self.component_prefix.linux.include]
|
||||
)
|
||||
# This should match the directories added to CPATH by
|
||||
# env/vars.sh for the component
|
||||
if self.v2_layout:
|
||||
dirs = [self.component_prefix.include]
|
||||
else:
|
||||
dirs = [self.component_prefix.linux.include]
|
||||
|
||||
return self.header_directories(dirs)
|
||||
|
@ -167,12 +167,6 @@ def setup_dependent_build_environment(self, env, dependent_spec):
|
||||
|
||||
env.set("I_MPI_ROOT", self.component_prefix)
|
||||
|
||||
@property
|
||||
def headers(self):
|
||||
return self.header_directories(
|
||||
[self.component_prefix.include, self.component_prefix.include.ilp64]
|
||||
)
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
libs = []
|
||||
|
Loading…
Reference in New Issue
Block a user