From dbc56bf84bfa3fe27146b56f468a736941892dcc Mon Sep 17 00:00:00 2001 From: shiqian Date: Fri, 25 Jul 2008 00:54:56 +0000 Subject: Adds an Xcode project for building gtest. By Preston Jackson. --- xcode/Config/DebugProject.xcconfig | 30 +++++++++++++++++++++++++ xcode/Config/FrameworkTarget.xcconfig | 17 +++++++++++++++ xcode/Config/General.xcconfig | 41 +++++++++++++++++++++++++++++++++++ xcode/Config/ReleaseProject.xcconfig | 32 +++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 xcode/Config/DebugProject.xcconfig create mode 100644 xcode/Config/FrameworkTarget.xcconfig create mode 100644 xcode/Config/General.xcconfig create mode 100644 xcode/Config/ReleaseProject.xcconfig (limited to 'xcode/Config') diff --git a/xcode/Config/DebugProject.xcconfig b/xcode/Config/DebugProject.xcconfig new file mode 100644 index 00000000..3d68157d --- /dev/null +++ b/xcode/Config/DebugProject.xcconfig @@ -0,0 +1,30 @@ +// +// DebugProject.xcconfig +// +// These are Debug Configuration project settings for the gtest framework and +// examples. It is set in the "Based On:" dropdown in the "Project" info +// dialog. +// This file is based on the Xcode Configuration files in: +// http://code.google.com/p/google-toolbox-for-mac/ +// + +#include "General.xcconfig" + +// No optimization +GCC_OPTIMIZATION_LEVEL = 0 + +// Deployment postprocessing is what triggers Xcode to strip, turn it off +DEPLOYMENT_POSTPROCESSING = NO + +// Dead code stripping off +DEAD_CODE_STRIPPING = NO + +// Debug symbols should be on obviously +GCC_GENERATE_DEBUGGING_SYMBOLS = YES + +// Define the DEBUG macro in all debug builds +OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 + +// These are turned off to avoid STL incompatibilities with client code +// // Turns on special C++ STL checks to "encourage" good STL use +// GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS diff --git a/xcode/Config/FrameworkTarget.xcconfig b/xcode/Config/FrameworkTarget.xcconfig new file mode 100644 index 00000000..3deadcdb --- /dev/null +++ b/xcode/Config/FrameworkTarget.xcconfig @@ -0,0 +1,17 @@ +// +// FrameworkTarget.xcconfig +// +// These are Framework target settings for the gtest framework and examples. It +// is set in the "Based On:" dropdown in the "Target" info dialog. +// This file is based on the Xcode Configuration files in: +// http://code.google.com/p/google-toolbox-for-mac/ +// + +// Dynamic libs need to be position independent +GCC_DYNAMIC_NO_PIC = NO + +// Dynamic libs should not have their external symbols stripped. +STRIP_STYLE = non-global + +// Installation Directory +INSTALL_PATH = @loader_path/../Frameworks diff --git a/xcode/Config/General.xcconfig b/xcode/Config/General.xcconfig new file mode 100644 index 00000000..9fcada16 --- /dev/null +++ b/xcode/Config/General.xcconfig @@ -0,0 +1,41 @@ +// +// General.xcconfig +// +// These are General configuration settings for the gtest framework and +// examples. +// This file is based on the Xcode Configuration files in: +// http://code.google.com/p/google-toolbox-for-mac/ +// + +// Build for PPC and Intel, 32- and 64-bit +ARCHS = i386 x86_64 ppc ppc64 + +// Zerolink prevents link warnings so turn it off +ZERO_LINK = NO + +// Prebinding considered unhelpful in 10.3 and later +PREBINDING = NO + +// Strictest warning policy +WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare + +// Work around Xcode bugs by using external strip. See: +// http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html +SEPARATE_STRIP = YES + +// Force C99 dialect +GCC_C_LANGUAGE_STANDARD = c99 + +// not sure why apple defaults this on, but it's pretty risky +ALWAYS_SEARCH_USER_PATHS = NO + +// Turn on position dependent code for most cases (overridden where appropriate) +GCC_DYNAMIC_NO_PIC = YES + +// Default SDK and minimum OS version is 10.4 +SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk +MACOSX_DEPLOYMENT_TARGET = 10.4 +GCC_VERSION = 4.0 + +// VERSIONING BUILD SETTINGS (used in Info.plist) +GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc. diff --git a/xcode/Config/ReleaseProject.xcconfig b/xcode/Config/ReleaseProject.xcconfig new file mode 100644 index 00000000..5349f0a0 --- /dev/null +++ b/xcode/Config/ReleaseProject.xcconfig @@ -0,0 +1,32 @@ +// +// ReleaseProject.xcconfig +// +// These are Release Configuration project settings for the gtest framework +// and examples. It is set in the "Based On:" dropdown in the "Project" info +// dialog. +// This file is based on the Xcode Configuration files in: +// http://code.google.com/p/google-toolbox-for-mac/ +// + +#include "General.xcconfig" + +// subconfig/Release.xcconfig + +// Optimize for space and size (Apple recommendation) +GCC_OPTIMIZATION_LEVEL = s + +// Deploment postprocessing is what triggers Xcode to strip +DEPLOYMENT_POSTPROCESSING = YES + +// No symbols +GCC_GENERATE_DEBUGGING_SYMBOLS = NO + +// Dead code strip does not affect ObjC code but can help for C +DEAD_CODE_STRIPPING = YES + +// NDEBUG is used by things like assert.h, so define it for general compat. +// ASSERT going away in release tends to create unused vars. +OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable + +// When we strip we want to strip all symbols in release, but save externals. +STRIP_STYLE = all -- cgit v1.2.3 From 980926a9ed432f490191b109f6aac257de737e51 Mon Sep 17 00:00:00 2001 From: "preston.jackson" Date: Wed, 8 Oct 2008 20:24:37 +0000 Subject: Adding tests to Xcode project --- xcode/Config/InternalTestTarget.xcconfig | 8 ++++++++ xcode/Config/TestTarget.xcconfig | 7 +++++++ 2 files changed, 15 insertions(+) create mode 100644 xcode/Config/InternalTestTarget.xcconfig create mode 100644 xcode/Config/TestTarget.xcconfig (limited to 'xcode/Config') diff --git a/xcode/Config/InternalTestTarget.xcconfig b/xcode/Config/InternalTestTarget.xcconfig new file mode 100644 index 00000000..eff0894d --- /dev/null +++ b/xcode/Config/InternalTestTarget.xcconfig @@ -0,0 +1,8 @@ +// +// InternalTestTarget.xcconfig +// +// These are Test target settings for the gtest framework and examples. It +// is set in the "Based On:" dropdown in the "Target" info dialog. + +PRODUCT_NAME = $(TARGET_NAME) +HEADER_SEARCH_PATHS = "../" \ No newline at end of file diff --git a/xcode/Config/TestTarget.xcconfig b/xcode/Config/TestTarget.xcconfig new file mode 100644 index 00000000..bdf6a76b --- /dev/null +++ b/xcode/Config/TestTarget.xcconfig @@ -0,0 +1,7 @@ +// +// TestTarget.xcconfig +// +// These are Test target settings for the gtest framework and examples. It +// is set in the "Based On:" dropdown in the "Target" info dialog. + +PRODUCT_NAME = $(TARGET_NAME) -- cgit v1.2.3 From 3d7042176307f0d7700a3640f3b3bcc8790b8fcd Mon Sep 17 00:00:00 2001 From: vladlosev Date: Thu, 20 Nov 2008 01:40:35 +0000 Subject: Value-parameterized tests and many bugfixes --- xcode/Config/InternalTestTarget.xcconfig | 2 +- xcode/Config/TestTarget.xcconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'xcode/Config') diff --git a/xcode/Config/InternalTestTarget.xcconfig b/xcode/Config/InternalTestTarget.xcconfig index eff0894d..c50fd9c5 100644 --- a/xcode/Config/InternalTestTarget.xcconfig +++ b/xcode/Config/InternalTestTarget.xcconfig @@ -5,4 +5,4 @@ // is set in the "Based On:" dropdown in the "Target" info dialog. PRODUCT_NAME = $(TARGET_NAME) -HEADER_SEARCH_PATHS = "../" \ No newline at end of file +HEADER_SEARCH_PATHS = ../ ../include diff --git a/xcode/Config/TestTarget.xcconfig b/xcode/Config/TestTarget.xcconfig index bdf6a76b..e6652ba8 100644 --- a/xcode/Config/TestTarget.xcconfig +++ b/xcode/Config/TestTarget.xcconfig @@ -5,3 +5,4 @@ // is set in the "Based On:" dropdown in the "Target" info dialog. PRODUCT_NAME = $(TARGET_NAME) +HEADER_SEARCH_PATHS = ../include -- cgit v1.2.3 From 3e93606333e03534923b25cc01f0723501b11231 Mon Sep 17 00:00:00 2001 From: "preston.a.jackson" Date: Fri, 21 Nov 2008 22:17:45 +0000 Subject: oops forgot the config file --- xcode/Config/InternalPythonTestTarget.xcconfig | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 xcode/Config/InternalPythonTestTarget.xcconfig (limited to 'xcode/Config') diff --git a/xcode/Config/InternalPythonTestTarget.xcconfig b/xcode/Config/InternalPythonTestTarget.xcconfig new file mode 100644 index 00000000..e0044453 --- /dev/null +++ b/xcode/Config/InternalPythonTestTarget.xcconfig @@ -0,0 +1,8 @@ +// +// InternalPythonTestTarget.xcconfig +// +// These are Test target settings for the gtest framework and examples. It +// is set in the "Based On:" dropdown in the "Target" info dialog. + +PRODUCT_NAME = $(TARGET_NAME)_ +HEADER_SEARCH_PATHS = ../ ../include -- cgit v1.2.3 From 6149876141b4a5d16d1481835bf5519618183980 Mon Sep 17 00:00:00 2001 From: "preston.a.jackson" Date: Fri, 21 Aug 2009 14:00:34 +0000 Subject: Cleaning up gtest.xcode. Removing old tests, using gtest-all.cc, adding a static libgtest.a and a static libgtest_main.a, fixing the sample code to work with changes. --- xcode/Config/InternalPythonTestTarget.xcconfig | 8 -------- xcode/Config/InternalTestTarget.xcconfig | 8 -------- xcode/Config/StaticLibraryTarget.xcconfig | 15 +++++++++++++++ 3 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 xcode/Config/InternalPythonTestTarget.xcconfig delete mode 100644 xcode/Config/InternalTestTarget.xcconfig create mode 100644 xcode/Config/StaticLibraryTarget.xcconfig (limited to 'xcode/Config') diff --git a/xcode/Config/InternalPythonTestTarget.xcconfig b/xcode/Config/InternalPythonTestTarget.xcconfig deleted file mode 100644 index e0044453..00000000 --- a/xcode/Config/InternalPythonTestTarget.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -// -// InternalPythonTestTarget.xcconfig -// -// These are Test target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. - -PRODUCT_NAME = $(TARGET_NAME)_ -HEADER_SEARCH_PATHS = ../ ../include diff --git a/xcode/Config/InternalTestTarget.xcconfig b/xcode/Config/InternalTestTarget.xcconfig deleted file mode 100644 index c50fd9c5..00000000 --- a/xcode/Config/InternalTestTarget.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -// -// InternalTestTarget.xcconfig -// -// These are Test target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. - -PRODUCT_NAME = $(TARGET_NAME) -HEADER_SEARCH_PATHS = ../ ../include diff --git a/xcode/Config/StaticLibraryTarget.xcconfig b/xcode/Config/StaticLibraryTarget.xcconfig new file mode 100644 index 00000000..67f840ad --- /dev/null +++ b/xcode/Config/StaticLibraryTarget.xcconfig @@ -0,0 +1,15 @@ +// +// StaticLibraryTarget.xcconfig +// +// These are static library target settings for libgtest.a. It +// is set in the "Based On:" dropdown in the "Target" info dialog. +// This file is based on the Xcode Configuration files in: +// http://code.google.com/p/google-toolbox-for-mac/ +// + +// Static libs can be included in bundles so make them position independent +GCC_DYNAMIC_NO_PIC = NO + +// Static libs should not have their internal globals or external symbols +// stripped. +STRIP_STYLE = debugging -- cgit v1.2.3 From cb2b1640b277dd9ba2f411cc830682f28bfdaa45 Mon Sep 17 00:00:00 2001 From: "preston.a.jackson" Date: Fri, 28 Aug 2009 22:11:18 +0000 Subject: Updating for Snow Leopard. Cleaning up the sample code. Updating the README with instructions for installation from the command line. --- xcode/Config/FrameworkTarget.xcconfig | 4 ++-- xcode/Config/StaticLibraryTarget.xcconfig | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'xcode/Config') diff --git a/xcode/Config/FrameworkTarget.xcconfig b/xcode/Config/FrameworkTarget.xcconfig index 3deadcdb..357b1c8f 100644 --- a/xcode/Config/FrameworkTarget.xcconfig +++ b/xcode/Config/FrameworkTarget.xcconfig @@ -13,5 +13,5 @@ GCC_DYNAMIC_NO_PIC = NO // Dynamic libs should not have their external symbols stripped. STRIP_STYLE = non-global -// Installation Directory -INSTALL_PATH = @loader_path/../Frameworks +// Let the user install by specifying the $DSTROOT with xcodebuild +SKIP_INSTALL = NO diff --git a/xcode/Config/StaticLibraryTarget.xcconfig b/xcode/Config/StaticLibraryTarget.xcconfig index 67f840ad..3922fa51 100644 --- a/xcode/Config/StaticLibraryTarget.xcconfig +++ b/xcode/Config/StaticLibraryTarget.xcconfig @@ -13,3 +13,6 @@ GCC_DYNAMIC_NO_PIC = NO // Static libs should not have their internal globals or external symbols // stripped. STRIP_STYLE = debugging + +// Let the user install by specifying the $DSTROOT with xcodebuild +SKIP_INSTALL = NO -- cgit v1.2.3 From d56773b492b7b675d5c547baab815289a7815bdd Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Wed, 16 Dec 2009 19:54:05 +0000 Subject: Turns on -Wshadow (by Preston Jackson). --- xcode/Config/General.xcconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xcode/Config') diff --git a/xcode/Config/General.xcconfig b/xcode/Config/General.xcconfig index 9fcada16..f23e3222 100644 --- a/xcode/Config/General.xcconfig +++ b/xcode/Config/General.xcconfig @@ -17,7 +17,7 @@ ZERO_LINK = NO PREBINDING = NO // Strictest warning policy -WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare +WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow // Work around Xcode bugs by using external strip. See: // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html -- cgit v1.2.3