mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 17:56:13 -04:00
Update googletest to latest, and deactivate certain class of warnings for its compilation
This commit is contained in:
parent
b7a3910579
commit
9bb0aed805
@ -42,6 +42,7 @@ else (MSVC)
|
|||||||
set(CPPCHECK_ARG_TEMPLATE "--template=gcc")
|
set(CPPCHECK_ARG_TEMPLATE "--template=gcc")
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
# GCC flags
|
# GCC flags
|
||||||
|
#add_compile_options() is not supported with CMake 2.8.7 of Ubuntu 12.04 on Travis-CI
|
||||||
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)
|
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)
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
# Clang flags
|
# Clang flags
|
||||||
@ -211,11 +212,12 @@ endif (SQLITECPP_BUILD_EXAMPLES)
|
|||||||
|
|
||||||
option(SQLITECPP_BUILD_TESTS "Build and run tests." OFF)
|
option(SQLITECPP_BUILD_TESTS "Build and run tests." OFF)
|
||||||
if (SQLITECPP_BUILD_TESTS)
|
if (SQLITECPP_BUILD_TESTS)
|
||||||
# add the subdirectory containing the CMakeLists.txt for the gtest library
|
# deactivate some warnings for compiling the gtest library
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
add_definitions(-Wno-variadic-macros -Wno-long-long -Wno-conversion -Wno-switch-enum)
|
add_definitions(-Wno-variadic-macros -Wno-long-long -Wno-switch-enum -Wno-float-equal -Wno-conversion-null -Wno-switch-default -Wno-pedantic)
|
||||||
endif (NOT MSVC)
|
endif (NOT MSVC)
|
||||||
|
|
||||||
|
# add the subdirectory containing the CMakeLists.txt for the gtest library
|
||||||
add_subdirectory(googletest)
|
add_subdirectory(googletest)
|
||||||
include_directories("${PROJECT_SOURCE_DIR}/googletest/include")
|
include_directories("${PROJECT_SOURCE_DIR}/googletest/include")
|
||||||
|
|
||||||
|
@ -104,6 +104,10 @@ ln -s ../examples examples
|
|||||||
ctest . # make test
|
ctest . # make test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### CMake options
|
||||||
|
|
||||||
|
* For more options on customizing the build, see the [CMakeLists.txt](https://github.com/SRombauts/SQLiteCpp/blob/master/CMakeLists.txt) file.
|
||||||
|
|
||||||
#### Troubleshooting
|
#### Troubleshooting
|
||||||
|
|
||||||
Under Linux, if you get muliple linker errors like "undefined reference to sqlite3_xxx",
|
Under Linux, if you get muliple linker errors like "undefined reference to sqlite3_xxx",
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 4650552ff637bb44ecf7784060091cbed3252211
|
Subproject commit 23574bf2333f834ff665f894c97bef8a5b33a0a9
|
Loading…
x
Reference in New Issue
Block a user