Preventing jsoncpp from building tests (#11948)

* Preventing jsoncpp from building tests
jsoncpp: making -DJSONCPP_WITH_TESTS=OFF conditioned by self.run_tests
This commit is contained in:
Matthieu Dorier 2019-07-31 18:18:25 +01:00 committed by Greg Becker
parent 4ea5e177cd
commit 65a1db87f8

View file

@ -26,4 +26,9 @@ class Jsoncpp(CMakePackage):
depends_on('python', type='test') depends_on('python', type='test')
def cmake_args(self): def cmake_args(self):
return ['-DBUILD_SHARED_LIBS=ON'] args = ['-DBUILD_SHARED_LIBS=ON']
if self.run_tests:
args.append('-DJSONCPP_WITH_TESTS=ON')
else:
args.append('-DJSONCPP_WITH_TESTS=OFF')
return args