mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Fixed building of PCH using Clang compiler.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
parent
9a4fdb1530
commit
3d3d024878
1 changed files with 8 additions and 2 deletions
|
@ -81,7 +81,7 @@ function(export_all_flags _filename _source_name_for_flags)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(add_precompiled_header _target _input)
|
function(add_precompiled_header _target _input)
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
|
||||||
get_filename_component(_name ${_input} NAME)
|
get_filename_component(_name ${_input} NAME)
|
||||||
set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
|
set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
|
||||||
set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch")
|
set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch")
|
||||||
|
@ -163,5 +163,11 @@ function(add_precompiled_header _target _input)
|
||||||
OBJECT_DEPENDS "${_object_depends}")
|
OBJECT_DEPENDS "${_object_depends}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
|
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
|
if(NOT _PCH_FORCEINCLUDE)
|
||||||
|
set(_PCH_FORCEINCLUDE ON)
|
||||||
|
endif()
|
||||||
|
endif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
|
endif(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
Loading…
Add table
Reference in a new issue