fix compile error with the correct python path (#24936)
This commit is contained in:
parent
fdcd7f96e5
commit
7845939722
@ -43,6 +43,7 @@ def url_for_version(self, version):
|
|||||||
depends_on('nlohmann-json', type='link')
|
depends_on('nlohmann-json', type='link')
|
||||||
depends_on('msgpack-c', type='link')
|
depends_on('msgpack-c', type='link')
|
||||||
depends_on('half@1.12.0', type='link')
|
depends_on('half@1.12.0', type='link')
|
||||||
|
depends_on('python@3:', type='build')
|
||||||
depends_on('py-pybind11', type='build', when='@:4.0.0')
|
depends_on('py-pybind11', type='build', when='@:4.0.0')
|
||||||
depends_on('py-pybind11@2.6:', type='build', when='@4.1.0:')
|
depends_on('py-pybind11@2.6:', type='build', when='@4.1.0:')
|
||||||
|
|
||||||
@ -54,6 +55,17 @@ def url_for_version(self, version):
|
|||||||
depends_on('rocblas@' + ver, when='@' + ver)
|
depends_on('rocblas@' + ver, when='@' + ver)
|
||||||
depends_on('miopen-hip@' + ver, when='@' + ver)
|
depends_on('miopen-hip@' + ver, when='@' + ver)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cmake_python_hints(self):
|
||||||
|
"""Include the python include path to the
|
||||||
|
CMake based on current spec
|
||||||
|
"""
|
||||||
|
python_spec = self.spec['python']
|
||||||
|
include_dir = python_spec.package.get_python_inc()
|
||||||
|
return [
|
||||||
|
self.define('Python_INCLUDE_DIR', include_dir)
|
||||||
|
]
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
args = [
|
args = [
|
||||||
'-DCMAKE_CXX_COMPILER={0}/bin/clang++'
|
'-DCMAKE_CXX_COMPILER={0}/bin/clang++'
|
||||||
@ -63,4 +75,6 @@ def cmake_args(self):
|
|||||||
args.append('-DNLOHMANN_JSON_INCLUDE={0}'.format(
|
args.append('-DNLOHMANN_JSON_INCLUDE={0}'.format(
|
||||||
self.spec['nlohmann-json'].prefix.include))
|
self.spec['nlohmann-json'].prefix.include))
|
||||||
|
|
||||||
|
if self.spec['cmake'].satisfies('@3.16.0:'):
|
||||||
|
args += self.cmake_python_hints
|
||||||
return args
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user