mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
fix: SLIC3R_PCH=OFF now builds on Windows, allowing compiler caching (#15552)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "BlacklistedLibraryCheck.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/nowide/convert.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -665,6 +665,13 @@ if(SLIC3R_PROFILE)
|
||||
target_link_libraries(libslic3r PRIVATE Shiny)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
# Public, since BlacklistedLibraryCheck.hpp includes windows.h. Empty
|
||||
# WIN32_LEAN_AND_MEAN matches the sources that define it themselves; bare
|
||||
# NOMINMAX matches the one libigl already passes.
|
||||
target_compile_definitions(libslic3r PUBLIC "WIN32_LEAN_AND_MEAN=" "NOMINMAX")
|
||||
endif ()
|
||||
|
||||
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
|
||||
add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE)
|
||||
endif ()
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
explicit MultiPoint(const Points &_points) : points(_points) {}
|
||||
MultiPoint& operator=(const MultiPoint &other) { points = other.points; return *this; }
|
||||
MultiPoint& operator=(MultiPoint &&other) { points = std::move(other.points); return *this; }
|
||||
virtual ~MultiPoint() = default;
|
||||
void scale(double factor);
|
||||
void scale(double factor_x, double factor_y);
|
||||
void translate(double x, double y) { this->translate(Point(coord_t(x), coord_t(y))); }
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#ifdef _WIN32
|
||||
// Keep this first. A header below reaches boost/regex, whose w32_regex_traits
|
||||
// needs the Win32 types declared already.
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
#include "Config.hpp"
|
||||
#include "Exception.hpp"
|
||||
#include "Print.hpp"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <functional>
|
||||
#include <numeric>
|
||||
#include <optional>
|
||||
|
||||
#include <libslic3r/OpenVDBUtils.hpp>
|
||||
|
||||
Reference in New Issue
Block a user