0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

boost.preprocessor hack & some cosmetic fixes

This commit is contained in:
niXman 2015-01-31 16:05:53 +02:00
parent 504bf961a6
commit df0429058c
3 changed files with 18 additions and 6 deletions

View File

@ -15,11 +15,17 @@ notifications:
before_install: before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update - sudo apt-get update
- if [ "$CXX" = "g++" ]; then sudo apt-get install g++-4.8; fi - if [ "$CXX" = "g++" ]; then sudo apt-get install g++-4.8 libboost-dev-all; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
install: install:
- git clone https://github.com/boostorg/preprocessor.git
- cd preprocessor
- git checkout tags/boost-1.50.0
- cp -rf include/boost/* /usr/include/boost/
- ls -l /usr/include/boost/preprocessor/tuple
- sed 's|104600|105000|' -i /usr/include/boost/version.hpp
- "mkdir -p $TRAVIS_BUILD_DIR/build/scripts" - "mkdir -p $TRAVIS_BUILD_DIR/build/scripts"
- "cd $TRAVIS_BUILD_DIR/build/scripts" - "cd $TRAVIS_BUILD_DIR/build/scripts"
- "cmake $TRAVIS_BUILD_DIR" - "cmake $TRAVIS_BUILD_DIR"

View File

@ -11,7 +11,7 @@ build(insert)
build(update) build(update)
build(remove) build(remove)
build(select) build(select)
find_package(Boost 1.54) find_package(Boost 1.50)
if(Boost_FOUND) if(Boost_FOUND)
MESSAGE(${Boost_INCLUDE_DIRS}) MESSAGE(${Boost_INCLUDE_DIRS})
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})

View File

@ -26,11 +26,17 @@
#if 0 // syntax example #if 0 // syntax example
SQLPP_DECLARE_TABLE( SQLPP_DECLARE_TABLE(
(table, DROP_IF_EXISTS, CREATE_IF_NOT_EXISTS, ENGINE("InnoDB"), CHARACTER_SET("utf-8"), COMMENT("table comments")) (table, \
SQLPP_DROP_IF_EXISTS \
,SQLPP_CREATE_IF_NOT_EXISTS \
,SQLPP_ENGINE("InnoDB") \
,SQLPP_CHARACTER_SET("utf-8") \
,SQLPP_COMMENT("table comments") \
)
, ,
(id, int, NOT_NULL, PRIMARY_KEY, AUTO_INCREMENT) (id, int, SQLPP_NOT_NULL, SQLPP_PRIMARY_KEY, SQLPP_AUTO_INCREMENT)
(name, varchar(64), NOT_NULL, INDEX("name_index"), DEFAULT("any name")) (name, varchar(64), SQLPP_NOT_NULL, SQLPP_INDEX("name_index"), SQLPP_DEFAULT("any name"))
(age, int, NOT_NULL, INDEX("age_index"), UNIQUE, COMMENT("some comments")) (age, int, SQLPP_NOT_NULL, SQLPP_INDEX("age_index"), SQLPP_UNIQUE, SQLPP_COMMENT("some comments"))
) )
#endif #endif