Merge branch 'master' into relocatable-pkgconfig-fix
This commit is contained in:
		@@ -34,7 +34,8 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}.
 | 
					# TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
 | 
					if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
 | 
				
			||||||
    if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi
 | 
					    if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -352,7 +352,7 @@ function(install_project)
 | 
				
			|||||||
        get_target_property(t_pdb_name_debug ${t} COMPILE_PDB_NAME_DEBUG)
 | 
					        get_target_property(t_pdb_name_debug ${t} COMPILE_PDB_NAME_DEBUG)
 | 
				
			||||||
        get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY)
 | 
					        get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY)
 | 
				
			||||||
        install(FILES
 | 
					        install(FILES
 | 
				
			||||||
          "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<IF:$<CONFIG:Debug>,${t_pdb_name_debug},${t_pdb_name}>.pdb"
 | 
					          "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$<CONFIG:Debug>:${t_pdb_name_debug}>$<$<NOT:$<CONFIG:Debug>>:${t_pdb_name}>.pdb"
 | 
				
			||||||
          DESTINATION ${CMAKE_INSTALL_LIBDIR}
 | 
					          DESTINATION ${CMAKE_INSTALL_LIBDIR}
 | 
				
			||||||
          OPTIONAL)
 | 
					          OPTIONAL)
 | 
				
			||||||
      endforeach()
 | 
					      endforeach()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -66,6 +66,8 @@
 | 
				
			|||||||
# else
 | 
					# else
 | 
				
			||||||
#  define GTEST_OS_WINDOWS_DESKTOP 1
 | 
					#  define GTEST_OS_WINDOWS_DESKTOP 1
 | 
				
			||||||
# endif  // _WIN32_WCE
 | 
					# endif  // _WIN32_WCE
 | 
				
			||||||
 | 
					#elif defined __OS2__
 | 
				
			||||||
 | 
					# define GTEST_OS_OS2 1
 | 
				
			||||||
#elif defined __APPLE__
 | 
					#elif defined __APPLE__
 | 
				
			||||||
# define GTEST_OS_MAC 1
 | 
					# define GTEST_OS_MAC 1
 | 
				
			||||||
# if TARGET_OS_IPHONE
 | 
					# if TARGET_OS_IPHONE
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -129,6 +129,7 @@
 | 
				
			|||||||
//   GTEST_OS_NACL     - Google Native Client (NaCl)
 | 
					//   GTEST_OS_NACL     - Google Native Client (NaCl)
 | 
				
			||||||
//   GTEST_OS_NETBSD   - NetBSD
 | 
					//   GTEST_OS_NETBSD   - NetBSD
 | 
				
			||||||
//   GTEST_OS_OPENBSD  - OpenBSD
 | 
					//   GTEST_OS_OPENBSD  - OpenBSD
 | 
				
			||||||
 | 
					//   GTEST_OS_OS2      - OS/2
 | 
				
			||||||
//   GTEST_OS_QNX      - QNX
 | 
					//   GTEST_OS_QNX      - QNX
 | 
				
			||||||
//   GTEST_OS_SOLARIS  - Sun Solaris
 | 
					//   GTEST_OS_SOLARIS  - Sun Solaris
 | 
				
			||||||
//   GTEST_OS_SYMBIAN  - Symbian
 | 
					//   GTEST_OS_SYMBIAN  - Symbian
 | 
				
			||||||
@@ -681,7 +682,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Determines whether the system compiler uses UTF-16 for encoding wide strings.
 | 
					// Determines whether the system compiler uses UTF-16 for encoding wide strings.
 | 
				
			||||||
#define GTEST_WIDE_STRING_USES_UTF16_ \
 | 
					#define GTEST_WIDE_STRING_USES_UTF16_ \
 | 
				
			||||||
    (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
 | 
					    (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || \
 | 
				
			||||||
 | 
					     GTEST_OS_AIX || GTEST_OS_OS2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Determines whether test results can be streamed to a socket.
 | 
					// Determines whether test results can be streamed to a socket.
 | 
				
			||||||
#if GTEST_OS_LINUX
 | 
					#if GTEST_OS_LINUX
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,6 +41,9 @@
 | 
				
			|||||||
# include <io.h>
 | 
					# include <io.h>
 | 
				
			||||||
# include <sys/stat.h>
 | 
					# include <sys/stat.h>
 | 
				
			||||||
# include <map>  // Used in ThreadLocal.
 | 
					# include <map>  // Used in ThreadLocal.
 | 
				
			||||||
 | 
					# ifdef _MSC_VER
 | 
				
			||||||
 | 
					#  include <crtdbg.h>
 | 
				
			||||||
 | 
					# endif  // _MSC_VER
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
# include <unistd.h>
 | 
					# include <unistd.h>
 | 
				
			||||||
#endif  // GTEST_OS_WINDOWS
 | 
					#endif  // GTEST_OS_WINDOWS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -348,7 +348,7 @@ void PrintTo(const wchar_t* s, ostream* os) {
 | 
				
			|||||||
    *os << "NULL";
 | 
					    *os << "NULL";
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    *os << ImplicitCast_<const void*>(s) << " pointing to ";
 | 
					    *os << ImplicitCast_<const void*>(s) << " pointing to ";
 | 
				
			||||||
    PrintCharsAsStringTo(s, std::wcslen(s), os);
 | 
					    PrintCharsAsStringTo(s, wcslen(s), os);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif  // wchar_t is native
 | 
					#endif  // wchar_t is native
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -445,7 +445,7 @@ static ::std::vector<std::string> g_argvs;
 | 
				
			|||||||
FilePath GetCurrentExecutableName() {
 | 
					FilePath GetCurrentExecutableName() {
 | 
				
			||||||
  FilePath result;
 | 
					  FilePath result;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if GTEST_OS_WINDOWS
 | 
					#if GTEST_OS_WINDOWS || GTEST_OS_OS2
 | 
				
			||||||
  result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe"));
 | 
					  result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe"));
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  result.Set(FilePath(GetArgvs()[0]));
 | 
					  result.Set(FilePath(GetArgvs()[0]));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,7 +80,7 @@ TEST(GetCurrentDirTest, ReturnsCurrentDir) {
 | 
				
			|||||||
  const FilePath cwd = FilePath::GetCurrentDir();
 | 
					  const FilePath cwd = FilePath::GetCurrentDir();
 | 
				
			||||||
  posix::ChDir(original_dir.c_str());
 | 
					  posix::ChDir(original_dir.c_str());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# if GTEST_OS_WINDOWS
 | 
					# if GTEST_OS_WINDOWS || GTEST_OS_OS2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Skips the ":".
 | 
					  // Skips the ":".
 | 
				
			||||||
  const char* const cwd_without_drive = strchr(cwd.c_str(), ':');
 | 
					  const char* const cwd_without_drive = strchr(cwd.c_str(), ':');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -102,6 +102,12 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
 | 
				
			|||||||
      _strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
 | 
					      _strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
 | 
				
			||||||
      _strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
 | 
					      _strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
 | 
				
			||||||
      _strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
 | 
					      _strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
 | 
				
			||||||
 | 
					#elif GTEST_OS_OS2
 | 
				
			||||||
 | 
					  const bool success =
 | 
				
			||||||
 | 
					      strcasecmp("googletest-options-test", exe_str.c_str()) == 0 ||
 | 
				
			||||||
 | 
					      strcasecmp("gtest-options-ex_test", exe_str.c_str()) == 0 ||
 | 
				
			||||||
 | 
					      strcasecmp("gtest_all_test", exe_str.c_str()) == 0 ||
 | 
				
			||||||
 | 
					      strcasecmp("gtest_dll_test", exe_str.c_str()) == 0;
 | 
				
			||||||
#elif GTEST_OS_FUCHSIA
 | 
					#elif GTEST_OS_FUCHSIA
 | 
				
			||||||
  const bool success = exe_str == "app";
 | 
					  const bool success = exe_str == "app";
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -67,43 +67,7 @@ using ::testing::internal::UnitTestOptions;
 | 
				
			|||||||
// EXPECT_THAT() and the matchers know how to print tuples.
 | 
					// EXPECT_THAT() and the matchers know how to print tuples.
 | 
				
			||||||
template <typename T>
 | 
					template <typename T>
 | 
				
			||||||
::std::string PrintValue(const T& value) {
 | 
					::std::string PrintValue(const T& value) {
 | 
				
			||||||
  ::std::stringstream stream;
 | 
					  return testing::PrintToString(value);
 | 
				
			||||||
  stream << value;
 | 
					 | 
				
			||||||
  return stream.str();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// These overloads allow printing tuples in our tests.  We cannot
 | 
					 | 
				
			||||||
// define an operator<< for tuples, as that definition needs to be in
 | 
					 | 
				
			||||||
// the std namespace in order to be picked up by Google Test via
 | 
					 | 
				
			||||||
// Argument-Dependent Lookup, yet defining anything in the std
 | 
					 | 
				
			||||||
// namespace in non-STL code is undefined behavior.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
template <typename T1, typename T2>
 | 
					 | 
				
			||||||
::std::string PrintValue(const std::tuple<T1, T2>& value) {
 | 
					 | 
				
			||||||
  ::std::stringstream stream;
 | 
					 | 
				
			||||||
  stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ")";
 | 
					 | 
				
			||||||
  return stream.str();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
template <typename T1, typename T2, typename T3>
 | 
					 | 
				
			||||||
::std::string PrintValue(const std::tuple<T1, T2, T3>& value) {
 | 
					 | 
				
			||||||
  ::std::stringstream stream;
 | 
					 | 
				
			||||||
  stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ", "
 | 
					 | 
				
			||||||
         << std::get<2>(value) << ")";
 | 
					 | 
				
			||||||
  return stream.str();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
 | 
					 | 
				
			||||||
          typename T6, typename T7, typename T8, typename T9, typename T10>
 | 
					 | 
				
			||||||
::std::string PrintValue(
 | 
					 | 
				
			||||||
    const std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& value) {
 | 
					 | 
				
			||||||
  ::std::stringstream stream;
 | 
					 | 
				
			||||||
  stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ", "
 | 
					 | 
				
			||||||
         << std::get<2>(value) << ", " << std::get<3>(value) << ", "
 | 
					 | 
				
			||||||
         << std::get<4>(value) << ", " << std::get<5>(value) << ", "
 | 
					 | 
				
			||||||
         << std::get<6>(value) << ", " << std::get<7>(value) << ", "
 | 
					 | 
				
			||||||
         << std::get<8>(value) << ", " << std::get<9>(value) << ")";
 | 
					 | 
				
			||||||
  return stream.str();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Verifies that a sequence generated by the generator and accessed
 | 
					// Verifies that a sequence generated by the generator and accessed
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,6 +36,7 @@ import sys
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
IS_WINDOWS = os.name == 'nt'
 | 
					IS_WINDOWS = os.name == 'nt'
 | 
				
			||||||
IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0]
 | 
					IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0]
 | 
				
			||||||
 | 
					IS_OS2 = os.name == 'os2'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import atexit
 | 
					import atexit
 | 
				
			||||||
import shutil
 | 
					import shutil
 | 
				
			||||||
@@ -164,7 +165,7 @@ def GetTestExecutablePath(executable_name, build_dir=None):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  path = os.path.abspath(os.path.join(build_dir or GetBuildDir(),
 | 
					  path = os.path.abspath(os.path.join(build_dir or GetBuildDir(),
 | 
				
			||||||
                                      executable_name))
 | 
					                                      executable_name))
 | 
				
			||||||
  if (IS_WINDOWS or IS_CYGWIN) and not path.endswith('.exe'):
 | 
					  if (IS_WINDOWS or IS_CYGWIN or IS_OS2) and not path.endswith('.exe'):
 | 
				
			||||||
    path += '.exe'
 | 
					    path += '.exe'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if not os.path.exists(path):
 | 
					  if not os.path.exists(path):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user