<commit_before>From b1db89598b72bf550e43d1b21c06a36214ce0f79 Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
Date: Fri, 18 Sep 2020 15:15:34 +0200
Subject: [PATCH] Try using CMAKE_GENERATOR_PLATFORM

---
 setup.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/setup.py b/setup.py
index 57c7868..d0b2781 100644
--- a/setup.py
+++ b/setup.py
@@ -68,15 +68,11 @@ class CMakeBuild(setuptools.command.build_ext.build_ext):
                 "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE",
             ]
             if sys.maxsize > 2**32:
-                cmake_args += ["-A", "x64"]
-            build_args += ["--", "/m"]
+                cmake_args += ["-DCMAKE_GENERATOR_PLATFORM=x64"]
         else:
             cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg]
 
-        if platform.system() == "Windows":
-            build_args += ["/m"]
-        else:
-            build_args += ["-j", str(multiprocessing.cpu_count())]
+        build_args += ["-j", str(multiprocessing.cpu_count())]
 
         if not os.path.exists(self.build_temp):
              os.makedirs(self.build_temp)
-- 
2.28.0
<commit_msg>Check for CMAKE_GENERATOR environment variable<commit_after>From b9f5d2dca13b42fe931a4a0067483126d0b310a3 Mon Sep 17 00:00:00 2001
From: <NAME> <<EMAIL>>
Date: Fri, 18 Sep 2020 15:28:34 +0200
Subject: [PATCH] Check for CMAKE_GENERATOR environment variable

---
 setup.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/setup.py b/setup.py
index 57c7868..5601de0 100644
--- a/setup.py
+++ b/setup.py
@@ -67,15 +67,12 @@ class CMakeBuild(setuptools.command.build_ext.build_ext):
                 "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{0}={1}".format(cfg.upper(), extdir),
                 "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE",
             ]
-            if sys.maxsize > 2**32:
+            if sys.maxsize > 2**32 and os.environ.get("CMAKE_GENERATOR") != "NMake Makefiles":
                 cmake_args += ["-A", "x64"]
-            build_args += ["--", "/m"]
         else:
             cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg]
 
-        if platform.system() == "Windows":
-            build_args += ["/m"]
-        else:
+        if platform.system() != "Windows":
             build_args += ["-j", str(multiprocessing.cpu_count())]
 
         if not os.path.exists(self.build_temp):
-- 
2.28.0

{'fraction_non_alphanumeric': 0.16482582837723025, 'fraction_numerical': 0.08113848768054376, 'mean_word_length': 2.3547008547008548, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3087961', 'n_tokens_mistral': 983, 'n_tokens_neox': 834, 'n_words': 164}