diff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake index d56033842c..5d6830e963 100644 --- a/Telegram/gyp/PrecompiledHeader.cmake +++ b/Telegram/gyp/PrecompiledHeader.cmake @@ -75,7 +75,7 @@ function(export_all_flags _filename _source_name_for_flags) set(_compile_definitions "$<$:-D$\n>") set(_compile_flags "$<$:$\n>") set(_compile_options "$<$:$\n>") - file(GENERATE OUTPUT "${_filename}" CONTENT "${_source_name_for_flags}\n${_compile_definitions}${_include_directories}${_compile_flags}${_compile_options}\n") + file(GENERATE OUTPUT "${_filename}" CONTENT "${_compile_definitions}${_include_directories}${_compile_flags}${_compile_options}\n") endfunction() function(add_precompiled_header _target _input) @@ -123,7 +123,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} -std=gnu++1y -x c++-header -o "${_output_cxx}" -c "${_pchfile}" + COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_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++)") @@ -139,9 +139,9 @@ function(add_precompiled_header _target _input) endif() separate_arguments(_pch_compile_flags) if(_source MATCHES \\.\(cc|cxx|cpp\)$) - list(APPEND _pch_compile_flags -Winvalid-pch -include "${_pchfile}") + list(APPEND _pch_compile_flags -include "${_pchfile}") else() - list(APPEND _pch_compile_flags -Winvalid-pch "-I${_pch_binary_dir}") + list(APPEND _pch_compile_flags "-I${_pch_binary_dir}") endif() get_source_file_property(_object_depends "${_source}" OBJECT_DEPENDS) diff --git a/Telegram/gyp/settings_linux.gypi b/Telegram/gyp/settings_linux.gypi index a723ac9ea2..4cdf7a5ba7 100644 --- a/Telegram/gyp/settings_linux.gypi +++ b/Telegram/gyp/settings_linux.gypi @@ -64,12 +64,13 @@ 'QT_STATICPLUGIN', 'QT_PLUGIN', ], - 'cflags': [ + 'cflags_c': [ '<@(linux_common_flags)', + '-std=gnu11', ], 'cflags_cc': [ '<@(linux_common_flags)', - '-std=gnu++1y', + '-std=gnu++14', ], 'configurations': { 'Debug': {