Skip to content

Commit

Permalink
fix defaults for mingw builds
Browse files Browse the repository at this point in the history
* we have to set BOOST_USE_WINDOWS_H=1 because of this bug: http://stackoverflow.com/questions/18134148
* remove '/EHsc' and '/FORCE' when compiling with mingw instead of msvc
  • Loading branch information
totaam committed Jan 15, 2024
1 parent 82f827c commit 2604ff4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions aksetup_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,9 @@ def set_up_shipped_boost_if_requested(project_name, conf, source_path=None,
"boost": "%sboost" % project_name,
}

if os.environ.get("MINGW_CHOST"):
defines["BOOST_USE_WINDOWS_H"] = 1

if boost_chrono is False:
defines["BOOST_THREAD_DONT_USE_CHRONO"] = 1
elif boost_chrono == "header_only":
Expand Down
1 change: 0 additions & 1 deletion bpl-subset
Submodule bpl-subset deleted from 7bf979
1 change: 0 additions & 1 deletion pycuda/compyte
Submodule compyte deleted from d4549d
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ def get_config_schema():
# https://github.com/inducer/pycuda/issues/113
lib64 = "lib/x64"

cxxflags_default.extend(["/EHsc"])
ldflags_default.extend(["/FORCE"])
import os
if not os.environ.get("MINGW_CHOST"):
cxxflags_default.extend(["/EHsc"])
ldflags_default.extend(["/FORCE"])

elif "darwin" in sys.platform:
import glob

Expand Down

0 comments on commit 2604ff4

Please sign in to comment.