Skip to content

Commit

Permalink
Change BdeBuildSystem search order (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rostislav Khlebnikov authored and GitHub Enterprise committed Aug 7, 2024
1 parent ef24207 commit 3e11fb5
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions bin/bbs_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,15 @@ def __init__(self, args):
)

# Find the bbs cmake modules
p = Path(self.refroot) if self.refroot else Path("/")
p = p / "opt" / "bb" / "share" / "cmake" / "BdeBuildSystem"
if p.is_dir():
self.bbs_module_path = p.resolve()
else:
p = Path(__file__).parent.parent / "BdeBuildSystem"
if p.is_dir():
self.bbs_module_path = p.resolve()
else:
p = Path(__file__).parent.parent / "BdeBuildSystem"
if not p.is_dir():
p = Path(self.refroot) if self.refroot else Path("/")
p = p / "opt" / "bb" / "share" / "cmake" / "BdeBuildSystem"
if not p.is_dir():
raise RuntimeError(
"Cannot find BdeBuildSystem cmake modules\n"
)
self.bbs_module_path = p.resolve()

# Get the compiler from UPLID
uplid = os.getenv("BDE_CMAKE_UPLID")
Expand Down Expand Up @@ -663,7 +660,7 @@ def configure(options):
host_platform = platform.system()

flags = ufid_to_cmake_flags(options.ufid) + [
"-DBdeBuildSystem_DIR:PATH=" + str(options.bbs_module_path),
"-DBdeBuildSystem_ROOT:PATH=" + str(options.bbs_module_path),
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
"-DBBS_BUILD_SYSTEM=ON",
"-DBBS_USE_WAFSTYLEOUT=" + ("ON" if options.wafstyleout else "OFF"),
Expand Down

0 comments on commit 3e11fb5

Please sign in to comment.