mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-20 00:57:13 +02:00
.github
bin
module
vendor
CPR
CivetWeb
ConcurrentQueue
DPP
Fmt
doc
include
src
support
test
add-subdirectory-test
compile-error-test
cuda-test
find-package-test
fuzzing
gtest
gmock
gtest
CMakeLists.txt
gmock-gtest-all.cc
static-export-test
CMakeLists.txt
args-test.cc
assert-test.cc
chrono-test.cc
color-test.cc
compile-test.cc
core-test.cc
enforce-checks-test.cc
format
format-impl-test.cc
format-test.cc
gtest-extra-test.cc
gtest-extra.cc
gtest-extra.h
header-only-test.cc
mock-allocator.h
module-test.cc
os-test.cc
ostream-test.cc
posix-mock-test.cc
posix-mock.h
printf-test.cc
ranges-test.cc
scan-test.cc
scan.h
std-format-test.cc
test-assert.h
test-main.cc
unicode-test.cc
util.cc
util.h
xchar-test.cc
CMakeLists.txt
CONTRIBUTING.md
ChangeLog.rst
LICENSE.rst
README.rst
MaxmindDB
POCO
PUGIXML
SAJSON
SimpleIni
Squirrel
TinyDir
UTF8
ZMQ
xxHash
CMakeLists.txt
.gitignore
.gitmodules
CMakeLists.txt
LICENSE
README.md
32 lines
1.2 KiB
CMake
32 lines
1.2 KiB
CMake
#------------------------------------------------------------------------------
|
|
# Build the google test library
|
|
|
|
# We compile Google Test ourselves instead of using pre-compiled libraries.
|
|
# See the Google Test FAQ "Why is it not recommended to install a
|
|
# pre-compiled copy of Google Test (for example, into /usr/local)?"
|
|
# at http://code.google.com/p/googletest/wiki/FAQ for more details.
|
|
add_library(gtest STATIC
|
|
gmock-gtest-all.cc gmock/gmock.h gtest/gtest.h gtest/gtest-spi.h)
|
|
target_compile_definitions(gtest PUBLIC GTEST_HAS_STD_WSTRING=1)
|
|
target_include_directories(gtest SYSTEM PUBLIC .)
|
|
|
|
find_package(Threads)
|
|
if (Threads_FOUND)
|
|
target_link_libraries(gtest ${CMAKE_THREAD_LIBS_INIT})
|
|
else ()
|
|
target_compile_definitions(gtest PUBLIC GTEST_HAS_PTHREAD=0)
|
|
endif ()
|
|
|
|
if (MSVC)
|
|
# Disable MSVC warnings of _CRT_INSECURE_DEPRECATE functions.
|
|
target_compile_definitions(gtest PRIVATE _CRT_SECURE_NO_WARNINGS)
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
# Disable MSVC warnings of POSIX functions.
|
|
target_compile_options(gtest PUBLIC -Wno-deprecated-declarations)
|
|
endif ()
|
|
endif ()
|
|
|
|
# Silence MSVC tr1 deprecation warning in gmock.
|
|
target_compile_definitions(gtest
|
|
PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1)
|