From 0290b2aaff20f6c3f80b29d382e21e5dd39a08eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 18 Oct 2010 13:56:19 +0200 Subject: mkspecs: Refactor precompiled-header configuration out of gcc-base(-mac) Preparation for introducing Clang-style precompiled-header support. Reviewed-by: Marius Storm-Olsen --- mkspecs/common/g++-mac.conf | 5 +++++ mkspecs/common/g++.conf | 5 +++++ mkspecs/common/gcc-base-mac.conf | 5 ----- mkspecs/common/gcc-base.conf | 5 ----- mkspecs/common/llvm.conf | 5 +++++ mkspecs/macx-llvm/qmake.conf | 5 +++++ 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/mkspecs/common/g++-mac.conf b/mkspecs/common/g++-mac.conf index 1b8ec6e..bcfd9aa 100644 --- a/mkspecs/common/g++-mac.conf +++ b/mkspecs/common/g++-mac.conf @@ -25,3 +25,8 @@ QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 QMAKE_LFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 QMAKE_LFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 + +QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf index cb82180..d73b38f 100644 --- a/mkspecs/common/g++.conf +++ b/mkspecs/common/g++.conf @@ -16,3 +16,8 @@ QMAKE_LINK_C = $$QMAKE_CC QMAKE_LINK_C_SHLIB = $$QMAKE_CC QMAKE_PCH_OUTPUT_EXT = .gch + +QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE} +QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/common/gcc-base-mac.conf b/mkspecs/common/gcc-base-mac.conf index b65cc5e..5c9a8a1 100644 --- a/mkspecs/common/gcc-base-mac.conf +++ b/mkspecs/common/gcc-base-mac.conf @@ -41,8 +41,3 @@ QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE} - -QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf index 2afe9d6..41280c6 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -44,8 +44,6 @@ QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} isEmpty(QMAKE_CXX): QMAKE_CXX = g++ @@ -59,9 +57,6 @@ QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden -QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} - -QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE QMAKE_LINK = $$QMAKE_CXX QMAKE_LINK_SHLIB = $$QMAKE_CXX diff --git a/mkspecs/common/llvm.conf b/mkspecs/common/llvm.conf index 4e54703..3d66357 100644 --- a/mkspecs/common/llvm.conf +++ b/mkspecs/common/llvm.conf @@ -6,3 +6,8 @@ QMAKE_CC = llvm-gcc QMAKE_CXX = llvm-g++ QMAKE_PCH_OUTPUT_EXT = .gch + +QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE} +QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE \ No newline at end of file diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf index 0064fb0..95c2b28 100644 --- a/mkspecs/macx-llvm/qmake.conf +++ b/mkspecs/macx-llvm/qmake.conf @@ -17,4 +17,9 @@ include(../common/mac.conf) include(../common/llvm.conf) include(../common/gcc-base-mac.conf) +QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + load(qt_config) -- cgit v0.12