@@ -84,6 +84,23 @@ file(GLOB_RECURSE LIBRAPID_SOURCES
84
84
"${CMAKE_CURRENT_SOURCE_DIR} /librapid/cxxblas/*.cxx" # Source files
85
85
)
86
86
87
+ # Extract system information
88
+ set (IS_LINUX OFF )
89
+ set (IS_MACOS OFF )
90
+ set (IS_WINDOWS OFF )
91
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
92
+ set (IS_LINUX ON )
93
+ endif ()
94
+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
95
+ set (IS_MACOS ON )
96
+ endif ()
97
+ if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
98
+ set (IS_WINDOWS ON )
99
+
100
+ # Disable shared libraries, since they just cause problems on Windows
101
+ set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries" FORCE)
102
+ endif ()
103
+
87
104
if (${SKBUILD} )
88
105
message (STATUS "[ LIBRAPID ] Building for Python" )
89
106
set (module_name "_librapid" )
@@ -164,6 +181,10 @@ if (${SKBUILD})
164
181
${PYTHON_SOURCES}
165
182
)
166
183
184
+ if (MSVC )
185
+ target_compile_options (${module_name} PUBLIC /Zm200)
186
+ endif ()
187
+
167
188
target_compile_definitions (${module_name} PUBLIC
168
189
LIBRAPID_PYTHON
169
190
WIN32_LEAN_AND_MEAN
@@ -189,23 +210,6 @@ if (LIBRAPID_USE_PRECOMPILED_HEADER)
189
210
target_precompile_headers(${module_name} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR} /librapid/include/librapid/core/librapidPch.hpp" )
190
211
endif ()
191
212
192
- # Extract system information
193
- set (IS_LINUX OFF )
194
- set (IS_MACOS OFF )
195
- set (IS_WINDOWS OFF )
196
- if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
197
- set (IS_LINUX ON )
198
- endif ()
199
- if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
200
- set (IS_MACOS ON )
201
- endif ()
202
- if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
203
- set (IS_WINDOWS ON )
204
-
205
- # Disable shared libraries, since they just cause problems on Windows
206
- set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries" FORCE)
207
- endif ()
208
-
209
213
if (MINGW)
210
214
message (FATAL_ERROR "LibRapid does not compile with MinGW. Please use MSVC or Clang instead." )
211
215
endif ()
0 commit comments