Skip to content

Commit 9bb0aed

Browse files
committed
Update googletest to latest, and deactivate certain class of warnings for its compilation
1 parent b7a3910 commit 9bb0aed

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ else (MSVC)
4242
set(CPPCHECK_ARG_TEMPLATE "--template=gcc")
4343
if (CMAKE_COMPILER_IS_GNUCXX)
4444
# GCC flags
45+
#add_compile_options() is not supported with CMake 2.8.7 of Ubuntu 12.04 on Travis-CI
4546
add_definitions(-rdynamic -fstack-protector-all -Wall -Wextra -pedantic -Wformat-security -Winit-self -Wswitch-default -Wswitch-enum -Wfloat-equal -Wshadow -Wcast-qual -Wconversion -Wlogical-op -Winline)
4647
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
4748
# Clang flags
@@ -211,11 +212,12 @@ endif (SQLITECPP_BUILD_EXAMPLES)
211212

212213
option(SQLITECPP_BUILD_TESTS "Build and run tests." OFF)
213214
if (SQLITECPP_BUILD_TESTS)
214-
# add the subdirectory containing the CMakeLists.txt for the gtest library
215+
# deactivate some warnings for compiling the gtest library
215216
if (NOT MSVC)
216-
add_definitions(-Wno-variadic-macros -Wno-long-long -Wno-conversion -Wno-switch-enum)
217+
add_definitions(-Wno-variadic-macros -Wno-long-long -Wno-switch-enum -Wno-float-equal -Wno-conversion-null -Wno-switch-default -Wno-pedantic)
217218
endif (NOT MSVC)
218219

220+
# add the subdirectory containing the CMakeLists.txt for the gtest library
219221
add_subdirectory(googletest)
220222
include_directories("${PROJECT_SOURCE_DIR}/googletest/include")
221223

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ ln -s ../examples examples
104104
ctest . # make test
105105
```
106106

107+
#### CMake options
108+
109+
* For more options on customizing the build, see the [CMakeLists.txt](https://github.com/SRombauts/SQLiteCpp/blob/master/CMakeLists.txt) file.
110+
107111
#### Troubleshooting
108112

109113
Under Linux, if you get muliple linker errors like "undefined reference to sqlite3_xxx",

googletest

Submodule googletest updated from 4650552 to 23574bf

0 commit comments

Comments
 (0)