From d96d84328748f48b10ded4bcc7933e91e4d9a850 Mon Sep 17 00:00:00 2001 From: Vlad Gheorghiu Date: Tue, 28 Nov 2023 15:06:19 -0500 Subject: [PATCH] windows fix --- CMakeLists.txt | 11 ++--------- cmake/staq_windows.cmake | 9 +++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 cmake/staq_windows.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index a7b721a..7282eb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,15 +22,8 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") add_compile_options("-stdlib=libc++") endif () -#### Windows issues with Microsoft Visual Studio -if (MSVC) - include_directories(SYSTEM libs/third_party/pthreadwin32) - add_compile_options(-bigobj) - add_compile_definitions(NOMINMAX) - if (MSVC_VERSION GREATER_EQUAL 1914) - add_compile_options("/Zc:__cplusplus") - endif () -endif () +#### Windows issues +include(cmake/staq_windows.cmake) #### MinGW or Cygwin have issues with object files that are too large if (MINGW OR CYGWIN) diff --git a/cmake/staq_windows.cmake b/cmake/staq_windows.cmake new file mode 100644 index 0000000..1d1466a --- /dev/null +++ b/cmake/staq_windows.cmake @@ -0,0 +1,9 @@ +#### Windows issues with Microsoft Visual Studio +if (MSVC) + include_directories(SYSTEM libs/third_party/pthreadwin32) + add_compile_options(-bigobj) + add_compile_definitions(NOMINMAX) + if (MSVC_VERSION GREATER_EQUAL 1914) + add_compile_options("/Zc:__cplusplus") + endif () +endif ()