Build: Add a flag to disable PCH
This commit is contained in:
parent
04c0b59bc6
commit
6db40feace
@ -27,6 +27,7 @@ option(SLIC3R_GUI "Compile Slic3r with GUI components (OpenGL, wxWidgets)"
|
|||||||
option(SLIC3R_FHS "Assume Slic3r is to be installed in a FHS directory structure" 0)
|
option(SLIC3R_FHS "Assume Slic3r is to be installed in a FHS directory structure" 0)
|
||||||
option(SLIC3R_WX_STABLE "Build against wxWidgets stable (3.0) as oppsed to dev (3.1) on Linux" 0)
|
option(SLIC3R_WX_STABLE "Build against wxWidgets stable (3.0) as oppsed to dev (3.1) on Linux" 0)
|
||||||
option(SLIC3R_PROFILE "Compile Slic3r with an invasive Shiny profiler" 0)
|
option(SLIC3R_PROFILE "Compile Slic3r with an invasive Shiny profiler" 0)
|
||||||
|
option(SLIC3R_PCH "Use precompiled headers" 1)
|
||||||
option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1)
|
option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1)
|
||||||
option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1)
|
option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1)
|
||||||
option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0)
|
option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0)
|
||||||
@ -37,6 +38,15 @@ option(SLIC3R_SYNTAXONLY "Only perform source code correctness checking,
|
|||||||
option(SLIC3R_BUILD_SANDBOXES "Build development sandboxes" OFF)
|
option(SLIC3R_BUILD_SANDBOXES "Build development sandboxes" OFF)
|
||||||
option(SLIC3R_BUILD_TESTS "Build unit tests" OFF)
|
option(SLIC3R_BUILD_TESTS "Build unit tests" OFF)
|
||||||
|
|
||||||
|
# Print out the SLIC3R_* cache options
|
||||||
|
get_cmake_property(_cache_vars CACHE_VARIABLES)
|
||||||
|
list (SORT _cache_vars)
|
||||||
|
foreach (_cache_var ${_cache_vars})
|
||||||
|
if("${_cache_var}" MATCHES "^SLIC3R_")
|
||||||
|
message(STATUS "${_cache_var}: ${${_cache_var}}")
|
||||||
|
endif ()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
if (SLIC3R_MSVC_COMPILE_PARALLEL)
|
if (SLIC3R_MSVC_COMPILE_PARALLEL)
|
||||||
add_compile_options(/MP)
|
add_compile_options(/MP)
|
||||||
@ -46,7 +56,6 @@ if (MSVC)
|
|||||||
add_compile_options(-bigobj -Zm316)
|
add_compile_options(-bigobj -Zm316)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
# Display and check CMAKE_PREFIX_PATH
|
# Display and check CMAKE_PREFIX_PATH
|
||||||
message(STATUS "SLIC3R_STATIC: ${SLIC3R_STATIC}")
|
message(STATUS "SLIC3R_STATIC: ${SLIC3R_STATIC}")
|
||||||
if (NOT "${CMAKE_PREFIX_PATH}" STREQUAL "")
|
if (NOT "${CMAKE_PREFIX_PATH}" STREQUAL "")
|
||||||
@ -65,8 +74,6 @@ foreach (DIR ${PREFIX_PATH_CHECK})
|
|||||||
endif ()
|
endif ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
message(STATUS "SLIC3R_FHS: ${SLIC3R_FHS}")
|
|
||||||
|
|
||||||
# Add our own cmake module path.
|
# Add our own cmake module path.
|
||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/)
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/)
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ add_library(libslic3r STATIC
|
|||||||
SLA/SLASpatIndex.hpp
|
SLA/SLASpatIndex.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT SLIC3R_SYNTAXONLY)
|
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
|
||||||
add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE)
|
add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -128,6 +128,6 @@ add_library(libslic3r_gui STATIC
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(libslic3r_gui libslic3r avrdude imgui)
|
target_link_libraries(libslic3r_gui libslic3r avrdude imgui)
|
||||||
if (NOT SLIC3R_SYNTAXONLY)
|
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
|
||||||
add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE)
|
add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE)
|
||||||
endif ()
|
endif ()
|
||||||
|
Loading…
Reference in New Issue
Block a user