Skip to content

Commit

Permalink
Debug flag subordinate to any CMAKE_BUILD_TYPE
Browse files Browse the repository at this point in the history
In practice the debug flag is being left defaulted to None but was still
overriding the build type
  • Loading branch information
thomasgoodfellow committed Apr 19, 2024
1 parent 3a2132f commit ca0ec66
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions seal5/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ def cmake(src, *args, debug: Optional[bool] = None, use_ninja: Optional[bool] =
if isinstance(cwd, Path):
cwd = str(cwd.resolve())
extraArgs = []
if debug is not None:
buildType = "Debug" if debug else "Release"
if not any("CMAKE_BUILD_TYPE" in x for x in args):
if debug is not None:
buildType = "Debug" if debug else "Release"
extraArgs.append("-DCMAKE_BUILD_TYPE=" + buildType)
if use_ninja:
extraArgs.append("-GNinja")
Expand Down

0 comments on commit ca0ec66

Please sign in to comment.