diff --git a/aksetup_helper.py b/aksetup_helper.py index 8c9bcec5..784ef3b7 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -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": diff --git a/setup.py b/setup.py index fa45fa2d..3a4c388a 100644 --- a/setup.py +++ b/setup.py @@ -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