forked from pool/cmake
Accepting request 440807 from home:alarrosa:branches:devel:tools:building
- Do not mix tabs and spaces in cmake.prov OBS-URL: https://build.opensuse.org/request/show/440807 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=277
This commit is contained in:
parent
26a5163b02
commit
60f21c96d9
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 18 09:30:47 UTC 2016 - alarrosa@suse.com
|
||||
|
||||
- Do not mix tabs and spaces in cmake.prov
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 16 14:30:02 UTC 2016 - foss@grueninger.de
|
||||
|
||||
|
14
cmake.prov
14
cmake.prov
@ -32,8 +32,8 @@ class CMakeParser:
|
||||
paths = map(lambda x: x.rstrip(), filelist.readlines())
|
||||
for path in paths:
|
||||
for (modulePath, cmakeModule, lowercase) in self.parseCmakeModuleConfig(path):
|
||||
version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase)
|
||||
|
||||
version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase)
|
||||
|
||||
if version:
|
||||
print("cmake(%s) = %s" % (cmakeModule, version))
|
||||
else:
|
||||
@ -46,15 +46,15 @@ class CMakeParser:
|
||||
|
||||
result = []
|
||||
for configFile in glob.glob("%s/*Config.cmake" % modulePath):
|
||||
moduleName = configFile[len(modulePath) + 1:-len("Config.cmake")]
|
||||
result.append( (modulePath, moduleName, False) )
|
||||
moduleName = configFile[len(modulePath) + 1:-len("Config.cmake")]
|
||||
result.append( (modulePath, moduleName, False) )
|
||||
|
||||
for configFile in glob.glob("%s/*-config.cmake" % modulePath):
|
||||
moduleName = configFile[len(modulePath) + 1:-len("-config.cmake")]
|
||||
moduleName = configFile[len(modulePath) + 1:-len("-config.cmake")]
|
||||
if (modulePath, moduleName, False) not in result:
|
||||
result.append( (modulePath, moduleName, True) )
|
||||
result.append( (modulePath, moduleName, True) )
|
||||
|
||||
return result
|
||||
return result
|
||||
|
||||
def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase):
|
||||
versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule)
|
||||
|
Loading…
Reference in New Issue
Block a user