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:
parent
4ea5e177cd
commit
65a1db87f8
1 changed files with 6 additions and 1 deletions
|
@ -26,4 +26,9 @@ class Jsoncpp(CMakePackage):
|
|||
depends_on('python', type='test')
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue