Precompiled headers on Visual Studio & GCC, with the highest hopes

that it will not break the build server.
This commit is contained in:
bubnikv 2018-10-29 16:01:26 +01:00
parent 35d984b812
commit 5377304b0c
8 changed files with 652 additions and 119 deletions

View file

@ -1,9 +1,13 @@
project(libslic3r)
cmake_minimum_required(VERSION 2.6)
include(PrecompiledHeader)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libslic3r_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h @ONLY)
add_library(libslic3r STATIC
pchheader.cpp
pchheader.hpp
BoundingBox.cpp
BoundingBox.hpp
BridgeDetector.cpp
@ -151,6 +155,8 @@ add_library(libslic3r STATIC
Utils.hpp
)
add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE)
target_compile_definitions(libslic3r PUBLIC -DUSE_TBB ${PNG_DEFINITIONS})
target_include_directories(libslic3r PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${LIBNEST2D_INCLUDES} ${PNG_INCLUDE_DIRS})
target_link_libraries(libslic3r

View file

@ -0,0 +1 @@
#include "pchheader.hpp"

122
src/libslic3r/pchheader.hpp Normal file
View file

@ -0,0 +1,122 @@
#ifdef WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#endif
#include <float.h>
#include <math.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <atomic>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iostream>
#include <istream>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <numeric>
#include <ostream>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <string>
#include <thread>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/erase.hpp>
#include <boost/algorithm/string/find.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/bind.hpp>
#include <boost/config.hpp>
#include <boost/config/warning_disable.hpp>
#include <boost/date_time/local_time/local_time.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/index/rtree.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/locale.hpp>
#include <boost/log/core.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/trivial.hpp>
#include <boost/multi_array.hpp>
#include <boost/nowide/cenv.hpp>
#include <boost/nowide/convert.hpp>
#include <boost/nowide/cstdio.hpp>
#include <boost/nowide/cstdlib.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/nowide/integration/filesystem.hpp>
#include <boost/nowide/iostream.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/thread.hpp>
#include <boost/version.hpp>
#include <tbb/atomic.h>
#include <tbb/parallel_for.h>
#include <tbb/spin_mutex.h>
#include <tbb/mutex.h>
#include <tbb/task_group.h>
#include <tbb/task_scheduler_init.h>
#include <Eigen/Dense>
#include <Eigen/Geometry>
#include "BoundingBox.hpp"
#include "ClipperUtils.hpp"
#include "Config.hpp"
#include "I18N.hpp"
#include "MultiPoint.hpp"
#include "Point.hpp"
#include "Polygon.hpp"
#include "Polyline.hpp"
#include "SVG.hpp"
#include "libslic3r.h"
#include "libslic3r_version.h"
#include "clipper.hpp"
#include <Shiny/Shiny.h>
#include <admesh/stl.h>

View file

@ -1,122 +1,130 @@
project(libslic3r_gui)
cmake_minimum_required(VERSION 2.6)
include(PrecompiledHeader)
add_library(libslic3r_gui STATIC
${LIBDIR}/slic3r/GUI/AboutDialog.cpp
${LIBDIR}/slic3r/GUI/AboutDialog.hpp
${LIBDIR}/slic3r/GUI/SysInfoDialog.cpp
${LIBDIR}/slic3r/GUI/SysInfoDialog.hpp
${LIBDIR}/slic3r/GUI/AppConfig.cpp
${LIBDIR}/slic3r/GUI/AppConfig.hpp
${LIBDIR}/slic3r/GUI/BackgroundSlicingProcess.cpp
${LIBDIR}/slic3r/GUI/BackgroundSlicingProcess.hpp
${LIBDIR}/slic3r/GUI/BitmapCache.cpp
${LIBDIR}/slic3r/GUI/BitmapCache.hpp
${LIBDIR}/slic3r/GUI/ConfigSnapshotDialog.cpp
${LIBDIR}/slic3r/GUI/ConfigSnapshotDialog.hpp
${LIBDIR}/slic3r/GUI/3DScene.cpp
${LIBDIR}/slic3r/GUI/3DScene.hpp
${LIBDIR}/slic3r/GUI/GLShader.cpp
${LIBDIR}/slic3r/GUI/GLShader.hpp
${LIBDIR}/slic3r/GUI/GLCanvas3D.hpp
${LIBDIR}/slic3r/GUI/GLCanvas3D.cpp
${LIBDIR}/slic3r/GUI/GLCanvas3DManager.hpp
${LIBDIR}/slic3r/GUI/GLCanvas3DManager.cpp
${LIBDIR}/slic3r/GUI/GLGizmo.hpp
${LIBDIR}/slic3r/GUI/GLGizmo.cpp
${LIBDIR}/slic3r/GUI/GLTexture.hpp
${LIBDIR}/slic3r/GUI/GLTexture.cpp
${LIBDIR}/slic3r/GUI/GLToolbar.hpp
${LIBDIR}/slic3r/GUI/GLToolbar.cpp
${LIBDIR}/slic3r/GUI/Preferences.cpp
${LIBDIR}/slic3r/GUI/Preferences.hpp
${LIBDIR}/slic3r/GUI/Preset.cpp
${LIBDIR}/slic3r/GUI/Preset.hpp
${LIBDIR}/slic3r/GUI/PresetBundle.cpp
${LIBDIR}/slic3r/GUI/PresetBundle.hpp
${LIBDIR}/slic3r/GUI/PresetHints.cpp
${LIBDIR}/slic3r/GUI/PresetHints.hpp
${LIBDIR}/slic3r/GUI/GUI.cpp
${LIBDIR}/slic3r/GUI/GUI.hpp
${LIBDIR}/slic3r/GUI/GUI_Preview.cpp
${LIBDIR}/slic3r/GUI/GUI_Preview.hpp
${LIBDIR}/slic3r/GUI/GUI_PreviewIface.cpp
${LIBDIR}/slic3r/GUI/GUI_PreviewIface.hpp
${LIBDIR}/slic3r/GUI/GUI_App.cpp
${LIBDIR}/slic3r/GUI/GUI_App.hpp
${LIBDIR}/slic3r/GUI/GUI_Utils.cpp
${LIBDIR}/slic3r/GUI/GUI_Utils.hpp
${LIBDIR}/slic3r/GUI/MainFrame.cpp
${LIBDIR}/slic3r/GUI/MainFrame.hpp
${LIBDIR}/slic3r/GUI/Plater.cpp
${LIBDIR}/slic3r/GUI/Plater.hpp
${LIBDIR}/slic3r/GUI/GUI_ObjectList.cpp
${LIBDIR}/slic3r/GUI/GUI_ObjectList.hpp
${LIBDIR}/slic3r/GUI/GUI_ObjectManipulation.cpp
${LIBDIR}/slic3r/GUI/GUI_ObjectManipulation.hpp
${LIBDIR}/slic3r/GUI/LambdaObjectDialog.cpp
${LIBDIR}/slic3r/GUI/LambdaObjectDialog.hpp
${LIBDIR}/slic3r/GUI/Tab.cpp
${LIBDIR}/slic3r/GUI/Tab.hpp
${LIBDIR}/slic3r/GUI/TabIface.cpp
${LIBDIR}/slic3r/GUI/TabIface.hpp
${LIBDIR}/slic3r/GUI/Field.cpp
${LIBDIR}/slic3r/GUI/Field.hpp
${LIBDIR}/slic3r/GUI/OptionsGroup.cpp
${LIBDIR}/slic3r/GUI/OptionsGroup.hpp
${LIBDIR}/slic3r/GUI/BedShapeDialog.cpp
${LIBDIR}/slic3r/GUI/BedShapeDialog.hpp
${LIBDIR}/slic3r/GUI/2DBed.cpp
${LIBDIR}/slic3r/GUI/2DBed.hpp
${LIBDIR}/slic3r/GUI/wxExtensions.cpp
${LIBDIR}/slic3r/GUI/wxExtensions.hpp
${LIBDIR}/slic3r/GUI/WipeTowerDialog.cpp
${LIBDIR}/slic3r/GUI/WipeTowerDialog.hpp
${LIBDIR}/slic3r/GUI/RammingChart.cpp
${LIBDIR}/slic3r/GUI/RammingChart.hpp
${LIBDIR}/slic3r/GUI/BonjourDialog.cpp
${LIBDIR}/slic3r/GUI/BonjourDialog.hpp
${LIBDIR}/slic3r/GUI/ButtonsDescription.cpp
${LIBDIR}/slic3r/GUI/ButtonsDescription.hpp
${LIBDIR}/slic3r/Config/Snapshot.cpp
${LIBDIR}/slic3r/Config/Snapshot.hpp
${LIBDIR}/slic3r/Config/Version.cpp
${LIBDIR}/slic3r/Config/Version.hpp
${LIBDIR}/slic3r/Utils/ASCIIFolding.cpp
${LIBDIR}/slic3r/Utils/ASCIIFolding.hpp
${LIBDIR}/slic3r/Utils/Serial.cpp
${LIBDIR}/slic3r/Utils/Serial.hpp
${LIBDIR}/slic3r/GUI/ConfigWizard.cpp
${LIBDIR}/slic3r/GUI/ConfigWizard.hpp
${LIBDIR}/slic3r/GUI/MsgDialog.cpp
${LIBDIR}/slic3r/GUI/MsgDialog.hpp
${LIBDIR}/slic3r/GUI/UpdateDialogs.cpp
${LIBDIR}/slic3r/GUI/UpdateDialogs.hpp
${LIBDIR}/slic3r/GUI/FirmwareDialog.cpp
${LIBDIR}/slic3r/GUI/FirmwareDialog.hpp
${LIBDIR}/slic3r/GUI/ProgressIndicator.hpp
${LIBDIR}/slic3r/GUI/ProgressStatusBar.hpp
${LIBDIR}/slic3r/GUI/ProgressStatusBar.cpp
${LIBDIR}/slic3r/Utils/Http.cpp
${LIBDIR}/slic3r/Utils/Http.hpp
${LIBDIR}/slic3r/Utils/FixModelByWin10.cpp
${LIBDIR}/slic3r/Utils/FixModelByWin10.hpp
${LIBDIR}/slic3r/Utils/PrintHostSendDialog.cpp
${LIBDIR}/slic3r/Utils/PrintHostSendDialog.hpp
${LIBDIR}/slic3r/Utils/OctoPrint.cpp
${LIBDIR}/slic3r/Utils/OctoPrint.hpp
${LIBDIR}/slic3r/Utils/Duet.cpp
${LIBDIR}/slic3r/Utils/Duet.hpp
${LIBDIR}/slic3r/Utils/PrintHost.cpp
${LIBDIR}/slic3r/Utils/PrintHost.hpp
${LIBDIR}/slic3r/Utils/Bonjour.cpp
${LIBDIR}/slic3r/Utils/Bonjour.hpp
${LIBDIR}/slic3r/Utils/PresetUpdater.cpp
${LIBDIR}/slic3r/Utils/PresetUpdater.hpp
${LIBDIR}/slic3r/Utils/Time.cpp
${LIBDIR}/slic3r/Utils/Time.hpp
${LIBDIR}/slic3r/Utils/HexFile.cpp
${LIBDIR}/slic3r/Utils/HexFile.hpp
${LIBDIR}/slic3r/AppController.hpp
${LIBDIR}/slic3r/AppController.cpp
${LIBDIR}/slic3r/AppControllerWx.cpp
pchheader.cpp
pchheader.hpp
GUI/AboutDialog.cpp
GUI/AboutDialog.hpp
GUI/SysInfoDialog.cpp
GUI/SysInfoDialog.hpp
GUI/AppConfig.cpp
GUI/AppConfig.hpp
GUI/BackgroundSlicingProcess.cpp
GUI/BackgroundSlicingProcess.hpp
GUI/BitmapCache.cpp
GUI/BitmapCache.hpp
GUI/ConfigSnapshotDialog.cpp
GUI/ConfigSnapshotDialog.hpp
GUI/3DScene.cpp
GUI/3DScene.hpp
GUI/GLShader.cpp
GUI/GLShader.hpp
GUI/GLCanvas3D.hpp
GUI/GLCanvas3D.cpp
GUI/GLCanvas3DManager.hpp
GUI/GLCanvas3DManager.cpp
GUI/GLGizmo.hpp
GUI/GLGizmo.cpp
GUI/GLTexture.hpp
GUI/GLTexture.cpp
GUI/GLToolbar.hpp
GUI/GLToolbar.cpp
GUI/Preferences.cpp
GUI/Preferences.hpp
GUI/Preset.cpp
GUI/Preset.hpp
GUI/PresetBundle.cpp
GUI/PresetBundle.hpp
GUI/PresetHints.cpp
GUI/PresetHints.hpp
GUI/GUI.cpp
GUI/GUI.hpp
GUI/GUI_Preview.cpp
GUI/GUI_Preview.hpp
GUI/GUI_PreviewIface.cpp
GUI/GUI_PreviewIface.hpp
GUI/GUI_App.cpp
GUI/GUI_App.hpp
GUI/GUI_Utils.cpp
GUI/GUI_Utils.hpp
GUI/MainFrame.cpp
GUI/MainFrame.hpp
GUI/Plater.cpp
GUI/Plater.hpp
GUI/GUI_ObjectList.cpp
GUI/GUI_ObjectList.hpp
GUI/GUI_ObjectManipulation.cpp
GUI/GUI_ObjectManipulation.hpp
GUI/LambdaObjectDialog.cpp
GUI/LambdaObjectDialog.hpp
GUI/Tab.cpp
GUI/Tab.hpp
GUI/TabIface.cpp
GUI/TabIface.hpp
GUI/Field.cpp
GUI/Field.hpp
GUI/OptionsGroup.cpp
GUI/OptionsGroup.hpp
GUI/BedShapeDialog.cpp
GUI/BedShapeDialog.hpp
GUI/2DBed.cpp
GUI/2DBed.hpp
GUI/wxExtensions.cpp
GUI/wxExtensions.hpp
GUI/WipeTowerDialog.cpp
GUI/WipeTowerDialog.hpp
GUI/RammingChart.cpp
GUI/RammingChart.hpp
GUI/BonjourDialog.cpp
GUI/BonjourDialog.hpp
GUI/ButtonsDescription.cpp
GUI/ButtonsDescription.hpp
Config/Snapshot.cpp
Config/Snapshot.hpp
Config/Version.cpp
Config/Version.hpp
Utils/ASCIIFolding.cpp
Utils/ASCIIFolding.hpp
Utils/Serial.cpp
Utils/Serial.hpp
GUI/ConfigWizard.cpp
GUI/ConfigWizard.hpp
GUI/MsgDialog.cpp
GUI/MsgDialog.hpp
GUI/UpdateDialogs.cpp
GUI/UpdateDialogs.hpp
GUI/FirmwareDialog.cpp
GUI/FirmwareDialog.hpp
GUI/ProgressIndicator.hpp
GUI/ProgressStatusBar.hpp
GUI/ProgressStatusBar.cpp
Utils/Http.cpp
Utils/Http.hpp
Utils/FixModelByWin10.cpp
Utils/FixModelByWin10.hpp
Utils/PrintHostSendDialog.cpp
Utils/PrintHostSendDialog.hpp
Utils/OctoPrint.cpp
Utils/OctoPrint.hpp
Utils/Duet.cpp
Utils/Duet.hpp
Utils/PrintHost.cpp
Utils/PrintHost.hpp
Utils/Bonjour.cpp
Utils/Bonjour.hpp
Utils/PresetUpdater.cpp
Utils/PresetUpdater.hpp
Utils/Time.cpp
Utils/Time.hpp
Utils/HexFile.cpp
Utils/HexFile.hpp
AppController.hpp
AppController.cpp
AppControllerWx.cpp
)
target_link_libraries(libslic3r_gui libslic3r avrdude)
add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE)

1
src/slic3r/pchheader.cpp Normal file
View file

@ -0,0 +1 @@
#include "pchheader.hpp"

180
src/slic3r/pchheader.hpp Normal file
View file

@ -0,0 +1,180 @@
#ifdef WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <Windows.h>
#endif
#include <float.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <algorithm>
#include <array>
#include <atomic>
#include <cassert>
#include <chrono>
#include <condition_variable>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <Eigen/Dense>
#include <exception>
#include <exception>
#include <fstream>
#include <functional>
#include <future>
#include <iostream>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <mutex>
#include <numeric>
#include <ostream>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <string>
#include <thread>
#include <unordered_map>
#include <utility>
#include <vector>
#include <boost/algorithm/clamp.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/any.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/endian/conversion.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/locale.hpp>
#include <boost/locale/encoding_utf.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/cenv.hpp>
#include <boost/nowide/convert.hpp>
#include <boost/nowide/cstdio.hpp>
#include <boost/nowide/fstream.hpp>
#include <boost/optional.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
#include <boost/system/error_code.hpp>
#include <tbb/parallel_for.h>
#include <tbb/spin_mutex.h>
#include <wx/app.h>
#include <wx/bitmap.h>
#include <wx/bmpbuttn.h>
#include <wx/bmpcbox.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/checklst.h>
#include <wx/choice.h>
#include <wx/choicebk.h>
#include <wx/clipbrd.h>
#include <wx/clrpicker.h>
#include <wx/collpane.h>
#include <wx/colordlg.h>
#include <wx/colour.h>
#include <wx/combo.h>
#include <wx/combobox.h>
#include <wx/dataview.h>
#include <wx/dc.h>
#include <wx/dcbuffer.h>
#include <wx/dcclient.h>
#include <wx/dcmemory.h>
#include <wx/debug.h>
#include <wx/dialog.h>
#include <wx/dir.h>
#include <wx/display.h>
#include <wx/dnd.h>
#include <wx/event.h>
#include <wx/filedlg.h>
#include <wx/filefn.h>
#include <wx/filepicker.h>
#include <wx/font.h>
#include <wx/frame.h>
#include <wx/gauge.h>
#include <wx/gdicmn.h>
// #include <wx/glcanvas.h>
// #include <wx/html/htmlwin.h>
// #include <wx/hyperlink.h>
#include <wx/icon.h>
#include <wx/image.h>
#include <wx/imaglist.h>
#include <wx/imagpng.h>
#include <wx/intl.h>
#include <wx/intl.h>
#include <wx/listctrl.h>
#include <wx/menu.h>
#include <wx/menuitem.h>
#include <wx/msgdlg.h>
#include <wx/mstream.h>
#include <wx/notebook.h>
#include <wx/numdlg.h>
#include <wx/numformatter.h>
#include <wx/panel.h>
#include <wx/platinfo.h>
#include <wx/progdlg.h>
#include <wx/rawbmp.h>
#include <wx/scrolwin.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/slider.h>
#include <wx/spinctrl.h>
#include <wx/statbmp.h>
#include <wx/statbox.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/statusbr.h>
#include <wx/stdpaths.h>
#include <wx/stdstream.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/timer.h>
#include <wx/tooltip.h>
#include <wx/toplevel.h>
#include <wx/treectrl.h>
#include <wx/wfstream.h>
#include <wx/window.h>
#include <wx/wupdlock.h>
#include <wx/wx.h>
#include <wx/wx.h>
#include <wx/wxprec.h>
#include <wx/zipstrm.h>
#include "libslic3r/Config.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/TriangleMesh.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/MultiPoint.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Polyline.hpp"
#include "libslic3r/BoundingBox.hpp"
#include "libslic3r/ClipperUtils.hpp"
#include "libslic3r/libslic3r.h"