35 lines
1.7 KiB
Diff
35 lines
1.7 KiB
Diff
--- Telegram/gyp/PrecompiledHeader.cmake
|
|
+++ Telegram/gyp/PrecompiledHeader.cmake
|
|
@@ -79,7 +79,6 @@ function(export_all_flags _filename _source_name_for_flags)
|
|
endfunction()
|
|
|
|
function(add_precompiled_header _target _input)
|
|
- if(CMAKE_COMPILER_IS_GNUCXX)
|
|
get_filename_component(_name ${_input} NAME)
|
|
set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
|
|
set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch")
|
|
@@ -112,7 +111,7 @@ function(add_precompiled_header _target _input)
|
|
set(_compiler_FLAGS "@${_pch_c_flags_file}")
|
|
add_custom_command(
|
|
OUTPUT "${_output_c}"
|
|
- COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} -x c-header -o "${_output_c}" -c "${_pchfile}"
|
|
+ COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} "$(C_FLAGS)" -x c-header -o "${_output_c}" -c "${_pchfile}"
|
|
DEPENDS "${_pchfile}" "${_pch_c_flags_file}"
|
|
IMPLICIT_DEPENDS C "${_pch_header}"
|
|
COMMENT "Precompiling ${_name} for ${_target} (C)")
|
|
@@ -123,7 +122,7 @@ function(add_precompiled_header _target _input)
|
|
set(_compiler_FLAGS "@${_pch_cpp_flags_file}")
|
|
add_custom_command(
|
|
OUTPUT "${_output_cxx}"
|
|
- COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} -x c++-header -o "${_output_cxx}" -c "${_pchfile}"
|
|
+ COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} "$(CXX_FLAGS)" -x c++-header -o "${_output_cxx}" -c "${_pchfile}"
|
|
DEPENDS "${_pchfile}" "${_pch_cpp_flags_file}"
|
|
IMPLICIT_DEPENDS CXX "${_pch_header}"
|
|
COMMENT "Precompiling ${_name} for ${_target} (C++)")
|
|
@@ -161,5 +160,4 @@ function(add_precompiled_header _target _input)
|
|
OBJECT_DEPENDS "${_object_depends}")
|
|
endif()
|
|
endforeach()
|
|
- endif(CMAKE_COMPILER_IS_GNUCXX)
|
|
endfunction()
|