diff options
author | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-07-08 21:32:17 (GMT) |
---|---|---|
committer | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-07-08 21:32:17 (GMT) |
commit | e4e9a8bd7d2dbbad62030c8f80513e3c81b32213 (patch) | |
tree | 08e242f8835e0688031e27305c5d58c24282f2e7 /include | |
parent | d201456903f3ecae1f7794edfab0d5678e642265 (diff) | |
download | googletest-e4e9a8bd7d2dbbad62030c8f80513e3c81b32213.zip googletest-e4e9a8bd7d2dbbad62030c8f80513e3c81b32213.tar.gz googletest-e4e9a8bd7d2dbbad62030c8f80513e3c81b32213.tar.bz2 |
Makes the autotools scripts work on Mac OS X. Also hopefully makes gtest compile on Windows CE.
Diffstat (limited to 'include')
-rw-r--r-- | include/gtest/gtest-message.h | 12 | ||||
-rw-r--r-- | include/gtest/gtest.h | 26 | ||||
-rw-r--r-- | include/gtest/internal/gtest-filepath.h | 12 | ||||
-rw-r--r-- | include/gtest/internal/gtest-internal.h | 23 | ||||
-rw-r--r-- | include/gtest/internal/gtest-port.h | 7 | ||||
-rw-r--r-- | include/gtest/internal/gtest-string.h | 12 |
6 files changed, 3 insertions, 89 deletions
diff --git a/include/gtest/gtest-message.h b/include/gtest/gtest-message.h index 746a168..b1d646f 100644 --- a/include/gtest/gtest-message.h +++ b/include/gtest/gtest-message.h @@ -46,20 +46,8 @@ #ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ #define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ -#if defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) -// When using Google Test on the Mac as a framework, all the includes will be -// in the framework headers folder along with gtest.h. -// Define GTEST_NOT_MAC_FRAMEWORK_MODE if you are building Google Test on -// the Mac and are not using it as a framework. -// More info on frameworks available here: -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ -// Concepts/WhatAreFrameworks.html. -#include "gtest-string.h" // NOLINT -#include "gtest-internal.h" // NOLINT -#else #include <gtest/internal/gtest-string.h> #include <gtest/internal/gtest-internal.h> -#endif // defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) namespace testing { diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h index 8e857c8..2464f72 100644 --- a/include/gtest/gtest.h +++ b/include/gtest/gtest.h @@ -62,26 +62,11 @@ // Windows proper with Visual C++ and MS C library (_MSC_VER && !_WIN32_WCE) and // Windows Mobile with Visual C++ and no C library (_WIN32_WCE). -#if defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) -// When using Google Test on the Mac as a framework, all the includes -// will be in the framework headers folder along with gtest.h. Define -// GTEST_NOT_MAC_FRAMEWORK_MODE if you are building Google Test on the -// Mac and are not using it as a framework. More info on frameworks -// available here: -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ -// Concepts/WhatAreFrameworks.html. -#include "gtest-death-test.h" // NOLINT -#include "gtest-internal.h" // NOLINT -#include "gtest-message.h" // NOLINT -#include "gtest-string.h" // NOLINT -#include "gtest_prod.h" // NOLINT -#else #include <gtest/internal/gtest-internal.h> #include <gtest/internal/gtest-string.h> #include <gtest/gtest-death-test.h> #include <gtest/gtest-message.h> #include <gtest/gtest_prod.h> -#endif // defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) // Depending on the platform, different string classes are available. // On Windows, ::std::string compiles only when exceptions are @@ -964,18 +949,7 @@ class AssertHelper { // Includes the auto-generated header that implements a family of // generic predicate assertion macros. -#if defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) -// When using Google Test on the Mac as a framework, all the includes will be -// in the framework headers folder along with gtest.h. -// Define GTEST_NOT_MAC_FRAMEWORK_MODE if you are building Google Test on -// the Mac and are not using it as a framework. -// More info on frameworks available here: -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ -// Concepts/WhatAreFrameworks.html. -#include "gtest_pred_impl.h" // NOLINT -#else #include <gtest/gtest_pred_impl.h> -#endif // defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) // Macros for testing equalities and inequalities. // diff --git a/include/gtest/internal/gtest-filepath.h b/include/gtest/internal/gtest-filepath.h index 6f63718..308a2c6 100644 --- a/include/gtest/internal/gtest-filepath.h +++ b/include/gtest/internal/gtest-filepath.h @@ -40,19 +40,7 @@ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ -#if defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) -// When using Google Test on the Mac as a framework, all the includes will be -// in the framework headers folder along with gtest.h. -// Define GTEST_NOT_MAC_FRAMEWORK_MODE if you are building Google Test on -// the Mac and are not using it as a framework. -// More info on frameworks available here: -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ -// Concepts/WhatAreFrameworks.html. -#include "gtest-string.h" // NOLINT -#else #include <gtest/internal/gtest-string.h> -#endif // defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) - namespace testing { namespace internal { diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h index 2be1b4a..0054bae 100644 --- a/include/gtest/internal/gtest-internal.h +++ b/include/gtest/internal/gtest-internal.h @@ -37,18 +37,7 @@ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ -#if defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) -// When using Google Test on the Mac as a framework, all the includes will be -// in the framework headers folder along with gtest.h. -// Define GTEST_NOT_MAC_FRAMEWORK_MODE if you are building Google Test on -// the Mac and are not using it as a framework. -// More info on frameworks available here: -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ -// Concepts/WhatAreFrameworks.html. -#include "gtest-port.h" // NOLINT -#else #include <gtest/internal/gtest-port.h> -#endif // defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) #ifdef GTEST_OS_LINUX #include <stdlib.h> @@ -60,20 +49,8 @@ #include <iomanip> // NOLINT #include <limits> // NOLINT -#if defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) -// When using Google Test on the Mac as a framework, all the includes will be -// in the framework headers folder along with gtest.h. -// Define GTEST_NOT_MAC_FRAMEWORK_MODE if you are building Google Test on -// the Mac and are not using it as a framework. -// More info on frameworks available here: -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ -// Concepts/WhatAreFrameworks.html. -#include "gtest-string.h" // NOLINT -#include "gtest-filepath.h" // NOLINT -#else #include <gtest/internal/gtest-string.h> #include <gtest/internal/gtest-filepath.h> -#endif // defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) // Due to C++ preprocessor weirdness, we need double indirection to // concatenate two tokens when one of them is __LINE__. Writing diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index d441b21..4ba6d55 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -124,8 +124,6 @@ // Int32FromGTestEnv() - parses an Int32 environment variable. // StringFromGTestEnv() - parses a string environment variable. -#include <sys/types.h> - #include <stdlib.h> #include <stdio.h> @@ -215,8 +213,9 @@ #if GTEST_HAS_STD_STRING && defined(GTEST_OS_LINUX) #define GTEST_HAS_DEATH_TEST // On some platforms, <regex.h> needs someone to define size_t, and -// won't compile if being #included first. Therefore it's important -// that we #include it after <sys/types.h>. +// won't compile otherwise. We can #include it here as we already +// included <stdlib.h>, which is guaranteed to define size_t through +// <stddef.h>. #include <regex.h> #include <vector> #include <fcntl.h> diff --git a/include/gtest/internal/gtest-string.h b/include/gtest/internal/gtest-string.h index 3d20c0f..b5a303f 100644 --- a/include/gtest/internal/gtest-string.h +++ b/include/gtest/internal/gtest-string.h @@ -42,19 +42,7 @@ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ #include <string.h> - -#if defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) -// When using Google Test on the Mac as a framework, all the includes will be -// in the framework headers folder along with gtest.h. -// Define GTEST_NOT_MAC_FRAMEWORK_MODE if you are building Google Test on -// the Mac and are not using it as a framework. -// More info on frameworks available here: -// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/ -// Concepts/WhatAreFrameworks.html. -#include "gtest-port.h" // NOLINT -#else #include <gtest/internal/gtest-port.h> -#endif // defined(__APPLE__) && !defined(GTEST_NOT_MAC_FRAMEWORK_MODE) namespace testing { namespace internal { |