Skip to content

Commit

Permalink
tests: set cmake platform via environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jornbr committed Jul 16, 2024
1 parent 2dd5b44 commit f89b743
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util/developers/run_all_testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ def cmake(
shutil.rmtree(build_dir)
os.mkdir(build_dir)

cmake_env = dict(os.environ)
if os.name == "nt":
x64 = sys.maxsize > 2**32
cmake_arguments = ["-A", "x64" if x64 else "Win32"] + cmake_arguments
cmake_env["CMAKE_GENERATOR_PLATFORM"] = "x64" if x64 else "Win32"

previous_cache = os.path.join(source_dir, "CMakeCache.txt")
if os.path.isfile(previous_cache):
Expand All @@ -124,6 +125,7 @@ def cmake(
f"{phase}/configure",
[cmake_path, source_dir] + cmake_arguments,
cwd=build_dir,
env=cmake_env,
)
except EnvironmentError as e:
if e.errno != errno.ENOENT:
Expand Down

0 comments on commit f89b743

Please sign in to comment.