CMakePackage: allow custom CMAKE_PREFIX_PATH entries (#32547)
* define `cmake_prefix_paths` property for packages add to CMake arguments via CMakePackage Co-authored-by: Robert Underwood <runderwood@anl.gov>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class DefineCmakePrefixPaths(Package):
|
||||
"""Package that defines cmake_prefix_paths"""
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/definecmakeprefixpaths-1.0.tar.gz"
|
||||
|
||||
version("1.0", "0123456789abcdef0123456789abcdef")
|
||||
|
||||
@property
|
||||
def cmake_prefix_paths(self):
|
||||
paths = [self.prefix.test]
|
||||
return paths
|
||||
@@ -0,0 +1,17 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class DependsOnDefineCmakePrefixPaths(Package):
|
||||
"""Package that defines cmake_prefix_paths"""
|
||||
|
||||
homepage = "http://www.example.com"
|
||||
url = "http://www.example.com/dependsonefinecmakeprefixpaths-1.0.tar.gz"
|
||||
|
||||
version("1.0", "0123456789abcdef0123456789abcdef")
|
||||
|
||||
depends_on("define-cmake-prefix-paths")
|
||||
Reference in New Issue
Block a user