summarylogtreecommitdiffstats
path: root/Flags-for-precompiled-header-and-MOC.patch
diff options
context:
space:
mode:
authorHexchain Tong2017-02-04 12:17:38 +0800
committerHexchain Tong2017-02-04 12:17:38 +0800
commita431a190966143900ebbad803cb6cc6e5895f2c6 (patch)
tree0ddc3c680901ac62108002236f3dd275aed386ce /Flags-for-precompiled-header-and-MOC.patch
downloadaur-a431a190966143900ebbad803cb6cc6e5895f2c6.tar.gz
newpkg
Diffstat (limited to 'Flags-for-precompiled-header-and-MOC.patch')
-rw-r--r--Flags-for-precompiled-header-and-MOC.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/Flags-for-precompiled-header-and-MOC.patch b/Flags-for-precompiled-header-and-MOC.patch
new file mode 100644
index 000000000000..558d0fbed0e8
--- /dev/null
+++ b/Flags-for-precompiled-header-and-MOC.patch
@@ -0,0 +1,44 @@
+Description: Specify preprocessor and compiler flags for precompiled header and Qt object files
+Author: Nicholas Guriev <guriev-ns@ya.ru>
+Last-Update: 2017-01-26
+
+diff --git a/Telegram/gyp/qt.gypi b/Telegram/gyp/qt.gypi
+index 24ededb..0cfd178 100644
+--- a/Telegram/gyp/qt.gypi
++++ b/Telegram/gyp/qt.gypi
+@@ -241,11 +231,12 @@
+ '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
+ ],
+ 'action': [
+- '<(qt_loc)/bin/moc<(exe_ext)',
++ '/usr/bin/moc',
+
+ # Silence "Note: No relevant classes found. No output generated."
+ '--no-notes',
+
++ '<!@(echo $CPPFLAGS | grep -Po "[-]([IDU]\s*\S*|E)")',
+ '<!@(python -c "for s in \'<@(_defines)\'.split(\' \'): print(\'-D\' + s)")',
+ # '<!@(python -c "for s in \'<@(_include_dirs)\'.split(\' \'): print(\'-I\' + s)")',
+ '<(RULE_INPUT_PATH)',
+diff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake
+index fc189e4..30becec 100644
+--- a/Telegram/gyp/PrecompiledHeader.cmake
++++ b/Telegram/gyp/PrecompiledHeader.cmake
+@@ -112,7 +112,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}" "$(C_DEFINES)" "$(C_INCLUDES)" "$(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 +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} -x c++-header -o "${_output_cxx}" -c "${_pchfile}"
++ COMMAND "${CMAKE_CXX_COMPILER}" "$(CXX_DEFINES)" "$(CXX_INCLUDES)" "$(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++)")