Skip to content

Commit

Permalink
refactor: test for intel oneapi env vars (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli authored Dec 8, 2022
1 parent 2519822 commit bb8ad0f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pymake/pymake_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,9 +1165,11 @@ def _create_win_batch(
# open the batch file
f = open(batchfile, "w")

# write the compilervars batch command to batchfile
line = "call " + intel_setvars + "\n"
f.write(line)
# only write the compilervars batch command to batchfile if env vars aren't already configured
# https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-development-environment-setup/use-the-setvars-script-with-windows.html
if os.environ.get("SETVARS_COMPLETED") != "1":
line = "call " + intel_setvars + "\n"
f.write(line)

# assume that header files may be in other folders, so make a list
searchdir = []
Expand Down

0 comments on commit bb8ad0f

Please sign in to comment.