Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2019-08-01 17:03:52 +0300
committertamasmeszaros <meszaros.q@gmail.com>2019-08-01 17:03:52 +0300
commit7d25d8c677cc0edbba469e2a54658ed9468efa60 (patch)
tree9597677d64fa92fa534c62eab627699f044d4f8c /cmake/modules
parentec9117cc06e5b268d5c5b1170312c922fe3e892b (diff)
Can build with (original llvm) clang-cl on windows
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/PrecompiledHeader.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/modules/PrecompiledHeader.cmake b/cmake/modules/PrecompiledHeader.cmake
index e46302144..2f62a7dbe 100644
--- a/cmake/modules/PrecompiledHeader.cmake
+++ b/cmake/modules/PrecompiledHeader.cmake
@@ -105,6 +105,9 @@ function(add_precompiled_header _target _input)
cmake_parse_arguments(_PCH "FORCEINCLUDE" "SOURCE_CXX;SOURCE_C" "" ${ARGN})
get_filename_component(_input_we ${_input} NAME_WE)
+ get_filename_component(_input_full ${_input} ABSOLUTE)
+ file(TO_NATIVE_PATH "${_input_full}" _input_fullpath)
+
if(NOT _PCH_SOURCE_CXX)
set(_PCH_SOURCE_CXX "${_input_we}.cpp")
endif()
@@ -138,16 +141,16 @@ function(add_precompiled_header _target _input)
set_source_files_properties("${_source}" PROPERTIES OBJECT_OUTPUTS "${_pch_c_pch}")
else()
if(_source MATCHES \\.\(cpp|cxx|cc\)$)
- set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_cxx_pch}\" \"/Yu${_input}\"")
+ set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_cxx_pch}\" \"/Yu${_input_fullpath}\"")
set(_pch_source_cxx_needed TRUE)
set_source_files_properties("${_source}" PROPERTIES OBJECT_DEPENDS "${_pch_cxx_pch}")
else()
- set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_c_pch}\" \"/Yu${_input}\"")
+ set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_c_pch}\" \"/Yu${_input_fullpath}\"")
set(_pch_source_c_needed TRUE)
set_source_files_properties("${_source}" PROPERTIES OBJECT_DEPENDS "${_pch_c_pch}")
endif()
if(_PCH_FORCEINCLUDE)
- set(_pch_compile_flags "${_pch_compile_flags} /FI${_input}")
+ set(_pch_compile_flags "${_pch_compile_flags} /FI${_input_fullpath}")
endif(_PCH_FORCEINCLUDE)
endif()