Merge 2aa1e7cc67
into c00fd25b71
This commit is contained in:
commit
b85ae732e9
@ -3,6 +3,7 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
cmake_policy(SET CMP0129 NEW)
|
||||
project(googletest-distribution)
|
||||
set(GOOGLETEST_VERSION 1.16.0)
|
||||
|
||||
|
@ -37,6 +37,7 @@ endif()
|
||||
# ${gmock_BINARY_DIR}.
|
||||
# Language "C" is required for find_package(Threads).
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_policy(SET CMP0129 NEW)
|
||||
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
|
||||
|
||||
if (COMMAND set_up_hermetic_build)
|
||||
|
@ -47,6 +47,7 @@ endif()
|
||||
# Project version.
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_policy(SET CMP0129 NEW)
|
||||
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
|
||||
|
||||
if (COMMAND set_up_hermetic_build)
|
||||
|
@ -102,9 +102,11 @@ macro(config_compiler_and_linker)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
|
||||
set(cxx_base_flags "${cxx_base_flags} -Wno-implicit-float-size-conversion -ffp-model=precise")
|
||||
endif()
|
||||
elseif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(cxx_base_flags "-Wall -Wshadow -Wundef")
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
|
||||
CMAKE_CXX_COMPILER_ID STREQUAL "LCC")
|
||||
set(cxx_base_flags "-Wall -Wundef")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
|
||||
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
|
||||
set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else")
|
||||
endif()
|
||||
set(cxx_exception_flags "-fexceptions")
|
||||
@ -115,6 +117,11 @@ macro(config_compiler_and_linker)
|
||||
set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
|
||||
set(cxx_strict_flags
|
||||
"-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "LCC")
|
||||
set(cxx_base_flags "${cxx_base_flags} -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function")
|
||||
else()
|
||||
set(cxx_base_flags "${cxx_base_flags} -Wshadow")
|
||||
endif()
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
||||
set(cxx_exception_flags "-features=except")
|
||||
# Sun Pro doesn't provide macros to indicate whether exceptions and
|
||||
|
@ -897,7 +897,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
// Ask the compiler not to perform tail call optimization inside
|
||||
// the marked function.
|
||||
#define GTEST_NO_TAIL_CALL_ __attribute__((disable_tail_calls))
|
||||
#elif defined(__GNUC__) && !defined(__NVCOMPILER)
|
||||
#elif defined(__GNUC__) && !defined(__EDG__)
|
||||
#define GTEST_NO_TAIL_CALL_ \
|
||||
__attribute__((optimize("no-optimize-sibling-calls")))
|
||||
#else
|
||||
|
@ -74,7 +74,7 @@ TypedTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\.
|
||||
TypedTest/1\. # TypeParam = int\s*\*( __ptr64)?
|
||||
TestA
|
||||
TestB
|
||||
TypedTest/2\. # TypeParam = .*MyArray<bool,\s*42>
|
||||
TypedTest/2\. # TypeParam = .*MyArray<bool,\s*(\(int\))?42>
|
||||
TestA
|
||||
TestB
|
||||
My/TypeParamTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\.
|
||||
@ -83,7 +83,7 @@ My/TypeParamTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\.
|
||||
My/TypeParamTest/1\. # TypeParam = int\s*\*( __ptr64)?
|
||||
TestA
|
||||
TestB
|
||||
My/TypeParamTest/2\. # TypeParam = .*MyArray<bool,\s*42>
|
||||
My/TypeParamTest/2\. # TypeParam = .*MyArray<bool,\s*(\(int\))?42>
|
||||
TestA
|
||||
TestB
|
||||
MyInstantiation/ValueParamTest\.
|
||||
|
@ -720,6 +720,7 @@ class TypedTestNames {
|
||||
return std::string("char") + ::testing::PrintToString(i);
|
||||
if (std::is_same<T, int>::value)
|
||||
return std::string("int") + ::testing::PrintToString(i);
|
||||
return std::string("unknown");
|
||||
}
|
||||
};
|
||||
|
||||
@ -755,6 +756,7 @@ class TypedTestPNames {
|
||||
if (std::is_same<T, unsigned int>::value) {
|
||||
return std::string("unsignedInt") + ::testing::PrintToString(i);
|
||||
}
|
||||
return std::string("unknown");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -172,6 +172,7 @@ class TypedTestNames {
|
||||
if (std::is_same<T, int>::value) {
|
||||
return std::string("int") + ::testing::PrintToString(i);
|
||||
}
|
||||
return std::string("unknown");
|
||||
}
|
||||
};
|
||||
|
||||
@ -320,6 +321,7 @@ class TypeParametrizedTestNames {
|
||||
if (std::is_same<T, int>::value) {
|
||||
return std::string("parInt") + ::testing::PrintToString(i);
|
||||
}
|
||||
return std::string("unknown");
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user