diff options
9 files changed, 20 insertions, 23 deletions
diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index 4435a995fc..240c8a8b18 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -24,6 +24,7 @@ ############################################################################## import inspect +import os import platform import spack.build_environment @@ -84,9 +85,12 @@ class CMakePackage(PackageBase): @property def root_cmakelists_dir(self): - """Returns the location of the root CMakeLists.txt + """The relative path to the directory containing CMakeLists.txt - :return: directory containing the root CMakeLists.txt + This path is relative to the root of the extracted tarball, + not to the ``build_directory``. Defaults to the current directory. + + :return: directory containing CMakeLists.txt """ return self.stage.source_path @@ -143,8 +147,9 @@ class CMakePackage(PackageBase): def cmake(self, spec, prefix): """Runs ``cmake`` in the build directory""" - options = [self.root_cmakelists_dir] + self.std_cmake_args + \ - self.cmake_args() + options = [os.path.abspath(self.root_cmakelists_dir)] + options += self.std_cmake_args + options += self.cmake_args() with working_dir(self.build_directory, create=True): inspect.getmodule(self).cmake(*options) diff --git a/var/spack/repos/builtin/packages/bcl2fastq2/package.py b/var/spack/repos/builtin/packages/bcl2fastq2/package.py index 1a7fff360c..7af1815757 100644 --- a/var/spack/repos/builtin/packages/bcl2fastq2/package.py +++ b/var/spack/repos/builtin/packages/bcl2fastq2/package.py @@ -59,7 +59,7 @@ class Bcl2fastq2(Package): # libexslt bits. patch('cxxConfigure-cmake.patch') - root_cmakelists_dir = '../src' + root_cmakelists_dir = 'src' def url_for_version(self, version): url = "https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v{0}-tar.zip" diff --git a/var/spack/repos/builtin/packages/clfft/package.py b/var/spack/repos/builtin/packages/clfft/package.py index 271d5c389a..5a03a3b07f 100644 --- a/var/spack/repos/builtin/packages/clfft/package.py +++ b/var/spack/repos/builtin/packages/clfft/package.py @@ -31,10 +31,6 @@ class Clfft(CMakePackage): homepage = "https://github.com/clMathLibraries/clFFT" url = "https://github.com/clMathLibraries/clFFT/archive/v2.12.2.tar.gz" - @property - def root_cmakelists_dir(self): - return join_path(self.stage.source_path, 'src') - version('2.12.2', '9104d85f9f2f3c58dd8efc0e4b06496f') variant('client', default=True, @@ -43,6 +39,8 @@ class Clfft(CMakePackage): depends_on('opencl@1.2:') depends_on('boost@1.33.0:', when='+client') + root_cmakelists_dir = 'src' + def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/clhep/package.py b/var/spack/repos/builtin/packages/clhep/package.py index 4d8fd14f3b..e9bf85c97f 100644 --- a/var/spack/repos/builtin/packages/clhep/package.py +++ b/var/spack/repos/builtin/packages/clhep/package.py @@ -63,7 +63,7 @@ class Clhep(CMakePackage): '%s/%s/CLHEP/CMakeLists.txt' % (self.stage.path, self.spec.version)) - root_cmakelists_dir = '../CLHEP' + root_cmakelists_dir = 'CLHEP' def build_type(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/cpprestsdk/package.py b/var/spack/repos/builtin/packages/cpprestsdk/package.py index 6cb378a2f3..b5d96ff480 100644 --- a/var/spack/repos/builtin/packages/cpprestsdk/package.py +++ b/var/spack/repos/builtin/packages/cpprestsdk/package.py @@ -38,4 +38,4 @@ class Cpprestsdk(CMakePackage): depends_on('boost') - root_cmakelists_dir = '../Release' + root_cmakelists_dir = 'Release' diff --git a/var/spack/repos/builtin/packages/isaac-server/package.py b/var/spack/repos/builtin/packages/isaac-server/package.py index c13a1d8aec..baa79cf673 100644 --- a/var/spack/repos/builtin/packages/isaac-server/package.py +++ b/var/spack/repos/builtin/packages/isaac-server/package.py @@ -31,10 +31,6 @@ class IsaacServer(CMakePackage): homepage = "http://computationalradiationphysics.github.io/isaac/" url = "https://github.com/ComputationalRadiationPhysics/isaac/archive/v1.3.0.tar.gz" - @property - def root_cmakelists_dir(self): - return join_path(self.stage.source_path, 'server') - version('develop', branch='dev', git='https://github.com/ComputationalRadiationPhysics/isaac.git') version('master', branch='master', @@ -51,3 +47,5 @@ class IsaacServer(CMakePackage): depends_on('boost@1.56:', type='link') depends_on('libwebsockets@2.1.1:', type='link') # depends_on('gstreamer@1.0', when='+gstreamer') + + root_cmakelists_dir = 'server' diff --git a/var/spack/repos/builtin/packages/isaac/package.py b/var/spack/repos/builtin/packages/isaac/package.py index 33546d19b0..a06a782e46 100644 --- a/var/spack/repos/builtin/packages/isaac/package.py +++ b/var/spack/repos/builtin/packages/isaac/package.py @@ -31,10 +31,6 @@ class Isaac(CMakePackage): homepage = "http://computationalradiationphysics.github.io/isaac/" url = "https://github.com/ComputationalRadiationPhysics/isaac/archive/v1.3.0.tar.gz" - @property - def root_cmakelists_dir(self): - return join_path(self.stage.source_path, 'lib') - version('develop', branch='dev', git='https://github.com/ComputationalRadiationPhysics/isaac.git') version('master', branch='master', @@ -55,3 +51,5 @@ class Isaac(CMakePackage): # depends_on('alpaka', when='+alpaka') depends_on('icet', type='link') depends_on('mpi', type='link') + + root_cmakelists_dir = 'lib' diff --git a/var/spack/repos/builtin/packages/quinoa/package.py b/var/spack/repos/builtin/packages/quinoa/package.py index e65d347759..eb41bb8b37 100644 --- a/var/spack/repos/builtin/packages/quinoa/package.py +++ b/var/spack/repos/builtin/packages/quinoa/package.py @@ -55,7 +55,7 @@ class Quinoa(CMakePackage): depends_on("pstreams") depends_on("pegtl") - root_cmakelists_dir = '../src' + root_cmakelists_dir = 'src' def build_type(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/spades/package.py b/var/spack/repos/builtin/packages/spades/package.py index c7e4469f5e..443436d3ae 100644 --- a/var/spack/repos/builtin/packages/spades/package.py +++ b/var/spack/repos/builtin/packages/spades/package.py @@ -40,6 +40,4 @@ class Spades(CMakePackage): conflicts('%gcc@7.1.0:') - @property - def root_cmakelists_dir(self): - return join_path(self.stage.source_path, 'src') + root_cmakelists_dir = 'src' |