summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-08-16 12:25:37 -0500
committerGitHub <noreply@github.com>2017-08-16 12:25:37 -0500
commit11b3ce27b7dbd76014955f36f8d6097498bf58be (patch)
treec6585fa2d96aee9e920fe30bc97ccc7f3c3101c5 /var
parentdb657d938d38775e4364a6917cc78cb9cdb0b133 (diff)
downloadspack-11b3ce27b7dbd76014955f36f8d6097498bf58be.tar.gz
spack-11b3ce27b7dbd76014955f36f8d6097498bf58be.tar.bz2
spack-11b3ce27b7dbd76014955f36f8d6097498bf58be.tar.xz
spack-11b3ce27b7dbd76014955f36f8d6097498bf58be.zip
Add better generator support to CMakePackage (#4988)
* Add better generator support to CMakePackage * List valid CMake generators on error
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/archer/package.py14
-rw-r--r--var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py15
2 files changed, 6 insertions, 23 deletions
diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py
index 0883191277..f5e4fbf8c1 100644
--- a/var/spack/repos/builtin/packages/archer/package.py
+++ b/var/spack/repos/builtin/packages/archer/package.py
@@ -36,22 +36,14 @@ class Archer(CMakePackage):
depends_on('cmake@3.4.3:', type='build')
depends_on('llvm')
- depends_on('ninja', type='build')
+ depends_on('ninja@1.5:', type='build')
depends_on('llvm-openmp-ompt')
+ generator = 'Ninja'
+
def cmake_args(self):
return [
- '-G', 'Ninja',
'-DCMAKE_C_COMPILER=clang',
'-DCMAKE_CXX_COMPILER=clang++',
'-DOMP_PREFIX:PATH=%s' % self.spec['llvm-openmp-ompt'].prefix,
]
-
- # TODO: Add better ninja support to CMakePackage
- def build(self, spec, prefix):
- with working_dir(self.build_directory):
- ninja()
-
- def install(self, spec, prefix):
- with working_dir(self.build_directory):
- ninja('install')
diff --git a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
index 8039ec1717..edbd9f04e1 100644
--- a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
+++ b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
@@ -44,24 +44,15 @@ class LlvmOpenmpOmpt(CMakePackage):
depends_on('cmake@2.8:', type='build')
depends_on('llvm')
- depends_on('ninja', type='build')
+ depends_on('ninja@1.5:', type='build')
+
+ generator = 'Ninja'
def cmake_args(self):
return [
- '-G', 'Ninja',
'-DCMAKE_C_COMPILER=clang',
'-DCMAKE_CXX_COMPILER=clang++',
- '-DCMAKE_BUILD_TYPE=Release',
'-DLIBOMP_OMPT_SUPPORT=on',
'-DLIBOMP_OMPT_BLAME=on',
'-DLIBOMP_OMPT_TRACE=on'
]
-
- # TODO: Add better ninja support to CMakePackage
- def build(self, spec, prefix):
- with working_dir(self.build_directory):
- ninja()
-
- def install(self, spec, prefix):
- with working_dir(self.build_directory):
- ninja('install')