get_std_cmake_args delegates to CMakePackage._std_args fixes #2665 (#2805)

This commit is contained in:
Massimiliano Culpo
2017-01-15 11:34:15 +01:00
committed by Todd Gamblin
parent 957cb968c6
commit 436f6a4ab6
3 changed files with 55 additions and 14 deletions

View File

@@ -32,15 +32,13 @@ def check(condition, msg):
raise InstallError(msg)
class CmakeClient(Package):
class CmakeClient(CMakePackage):
"""A dumy package that uses cmake."""
homepage = 'https://www.example.com'
url = 'https://www.example.com/cmake-client-1.0.tar.gz'
version('1.0', '4cb3ff35b2472aae70f542116d616e63')
depends_on('cmake', type='build')
def setup_environment(self, spack_env, run_env):
spack_cc # Ensure spack module-scope variable is avaiabl
check(from_cmake == "from_cmake",
@@ -68,6 +66,11 @@ def setup_dependent_package(self, module, dspec):
"link arg on dependency spec not readable from "
"setup_dependent_package.")
def cmake(self, spec, prefix):
pass
build = cmake
def install(self, spec, prefix):
# check that cmake is in the global scope.
global cmake