Skip to content

Commit

Permalink
Merge pull request #126 from ax3l/print-verbose-cmake-config-fail
Browse files Browse the repository at this point in the history
Verbose: Print CMake Config Errors
  • Loading branch information
ax3l authored Nov 30, 2023
2 parents 47e1633 + 712eee8 commit 20d2be3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ def apply_args(self):
# CMake utilities #
#######################################################
def cmake_config( self, name, path, configOpts="", install = 0, env = None):
"Generate Cmake configuration"
"Generate CMake configuration"

self.log.outdent()
self.log.skip()
Expand Down Expand Up @@ -1163,20 +1163,26 @@ def cmake_config( self, name, path, configOpts="", install = 0, env = None):

# Check exit condition
if not rc == 0:
errstr = "\n \nERROR! Cmake configuration failed for " + name + " \n"
errstr = "\n \nERROR! CMake configuration failed for " + name + " \n"
errstr += "Check " + coutfile + " for more information."
self.log.fail(errstr)

if self.verbose > 0:
print(f"\nContent of {coutfile}:")
with open(f"{coutfile}") as f:
print(f.read())

sys.exit(errstr)

return builddir, installdir


def cmake_clean( self, name, path ):
"Clean Cmake build and install directories"
"Clean CMake build and install directories"

self.log.outdent()
self.log.skip()
self.log.bold("cleaning " + name + " Cmake directories...")
self.log.bold("cleaning " + name + " CMake directories...")
self.log.indent()

# Setup dir names
Expand All @@ -1193,7 +1199,7 @@ def cmake_clean( self, name, path ):
return

def cmake_build( self, name, target, path, opts = '', env = None, outfile = None ):
"Build target for a repo configured via cmake"
"Build target for a repo configured via CMake"

self.log.outdent()
self.log.skip()
Expand Down

0 comments on commit 20d2be3

Please sign in to comment.