Skip to content

Commit

Permalink
Merge pull request #3 from SRombauts/master
Browse files Browse the repository at this point in the history
Update SQLiteCPP
  • Loading branch information
worktycho committed May 28, 2015
2 parents 56ec1c8 + 16be0dc commit 49679e7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ else (MSVC)
set(CPPCHECK_ARG_TEMPLATE "--template=gcc")
if (CMAKE_COMPILER_IS_GNUCXX)
# 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)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# Clang flags
Expand Down Expand Up @@ -211,11 +212,12 @@ endif (SQLITECPP_BUILD_EXAMPLES)

option(SQLITECPP_BUILD_TESTS "Build and run tests." OFF)
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)
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)

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

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ ln -s ../examples examples
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

Under Linux, if you get muliple linker errors like "undefined reference to sqlite3_xxx",
Expand Down
11 changes: 8 additions & 3 deletions cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,13 @@ def Error(filename, linenum, category, confidence, message):
if _ShouldPrintError(category, confidence, linenum):
_cpplint_state.IncrementErrorCount(category)
if _cpplint_state.output_format == 'vs7':
sys.stderr.write('%s(%s): %s [%s] [%d]\n' % (
filename, linenum, message, category, confidence))
# SRombauts:
if confidence == 5:
sys.stderr.write('%s(%s): error: %s [%s] [%d]\n' % (
filename, linenum, message, category, confidence))
else: # confidence == [0-4]
sys.stderr.write('%s(%s): warning: %s [%s] [%d]\n' % (
filename, linenum, message, category, confidence))
elif _cpplint_state.output_format == 'eclipse':
# SRombauts:
if confidence == 5:
Expand All @@ -1002,7 +1007,7 @@ def Error(filename, linenum, category, confidence, message):
elif confidence == 4:
sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % (
filename, linenum, message, category, confidence))
else:
else: # confidence == [0-3]
sys.stderr.write('%s:%s: note: %s [%s] [%d]\n' % (
filename, linenum, message, category, confidence))
else:
Expand Down
2 changes: 1 addition & 1 deletion googletest
Submodule googletest updated from 465055 to 23574b
2 changes: 1 addition & 1 deletion include/SQLiteCpp/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Exception : public std::runtime_error
#endif

// Detect whether the compiler supports C++11 noexcept exception specifications.
#if (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 7 ) && defined(__GXX_EXPERIMENTAL_CXX0X__))
#if (defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
// GCC 4.7 and following have noexcept
#elif defined(__clang__) && __has_feature(cxx_noexcept)
// Clang 3.0 and above have noexcept
Expand Down

0 comments on commit 49679e7

Please sign in to comment.