mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 04:47:18 +08:00
Merge tag '0.28' into develop
CppCon-Release: - fixed bugs found during preparation for the talk - added examples for the talk - aggregator functions cannot be used in where() anymore (thanks to Arthur O'Dwyer for finding that in the open content session) - fixed serialization of dynamic query elements (the separator was missing, thanks to Paul Körbitz for finding that) - several minor cleanups
This commit is contained in:
commit
236b367231
@ -38,8 +38,8 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
endif ()
|
||||
|
||||
set(include_dir "${PROJECT_SOURCE_DIR}/include")
|
||||
file(GLOB_RECURSE sqlpp_headers ${include_dir}/*.h)
|
||||
include_directories(${include_dir})
|
||||
file(GLOB_RECURSE sqlpp_headers "${include_dir}/*.h")
|
||||
include_directories("${include_dir}")
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(test_constraints)
|
||||
add_subdirectory(examples)
|
||||
|
@ -5,9 +5,11 @@ A type safe embedded domain specific language for SQL queries and results in C++
|
||||
|
||||
Extensive documentation is found in the wiki, https://github.com/rbock/sqlpp11/wiki
|
||||
|
||||
Upcoming talks at
|
||||
Upcoming talks/workshops) at
|
||||
* CppCon (Bellevue, Washington, USA): http://cppcon.org
|
||||
* 2014-09-11: http://sched.co/1r4lue3
|
||||
* 2014-09-08: http://sched.co/1qhngYK (Workshop Part 1)
|
||||
* 2014-09-11: http://sched.co/1r4lue3 (Talk)
|
||||
* 2014-09-12: http://sched.co/Wi8aWM (Workshop Part 2)
|
||||
* MeetingC++ (Berlin, Germany): http://meetingcpp.com/index.php/mcpp2014.html
|
||||
* 2014-12-05:http://meetingcpp.com/index.php/tv14/items/4.html
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
include_directories(${CMAKE_SOURCE_DIR}/tests)
|
||||
include_directories("${CMAKE_SOURCE_DIR}/tests")
|
||||
|
||||
add_custom_target(test_sqlpp_constraints COMMAND true)
|
||||
|
||||
function(test_constraint name pattern)
|
||||
|
||||
add_executable(
|
||||
${name}
|
||||
"${name}"
|
||||
EXCLUDE_FROM_ALL
|
||||
${name}.cpp
|
||||
"${name}.cpp"
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${name}.out
|
||||
COMMAND ${CMAKE_MAKE_PROGRAM} ${name} > ${CMAKE_CURRENT_BINARY_DIR}/${name}.out 2>&1 || true
|
||||
COMMAND grep ${pattern} ${CMAKE_CURRENT_BINARY_DIR}/${name}.out > /dev/null
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp
|
||||
add_custom_command(OUTPUT "${name}.out"
|
||||
COMMAND "${CMAKE_MAKE_PROGRAM}" "${name}" > "${CMAKE_CURRENT_BINARY_DIR}/${name}.out" 2>&1 || true
|
||||
COMMAND grep "${pattern}" "${CMAKE_CURRENT_BINARY_DIR}/${name}.out" > /dev/null
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp"
|
||||
COMMENT "${name}"
|
||||
)
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(test_${name} DEPENDS ${name}.out COMMAND true)
|
||||
add_custom_target("test_${name}" DEPENDS "${name}.out" COMMAND true)
|
||||
|
||||
|
||||
add_dependencies(test_sqlpp_constraints test_${name})
|
||||
add_dependencies(test_sqlpp_constraints "test_${name}")
|
||||
|
||||
endfunction(test_constraint)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
macro (build_and_run arg)
|
||||
# Add headers to sources to enable file browsing in IDEs
|
||||
include_directories(${CMAKE_BINARY_DIR}/tests)
|
||||
add_executable(${arg} ${arg}.cpp ${sqlpp_headers} ${CMAKE_CURRENT_LIST_DIR}/Sample.h)
|
||||
add_test(${arg} ${arg})
|
||||
include_directories("${CMAKE_BINARY_DIR}/tests")
|
||||
add_executable("${arg}" "${arg}.cpp" ${sqlpp_headers} "${CMAKE_CURRENT_LIST_DIR}/Sample.h")
|
||||
add_test("${arg}" "${arg}")
|
||||
endmacro ()
|
||||
|
||||
build_and_run(BooleanExpressionTest)
|
||||
@ -21,8 +21,7 @@ build_and_run(ResultTest)
|
||||
# if you want to use the generator, you can do something like this:
|
||||
#find_package(PythonInterp REQUIRED)
|
||||
#add_custom_command(
|
||||
# OUTPUT ${CMAKE_CURRENT_LIST_DIR}/Sample.h
|
||||
# COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/ddl2cpp ${CMAKE_CURRENT_LIST_DIR}/sample.sql Sample test
|
||||
# DEPENDS ${CMAKE_CURRENT_LIST_DIR}/sample.sql
|
||||
# )
|
||||
|
||||
# OUTPUT "${CMAKE_CURRENT_LIST_DIR}/Sample.h"
|
||||
# COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/scripts/ddl2cpp" "${CMAKE_CURRENT_LIST_DIR}/sample.sql" Sample test
|
||||
# DEPENDS "${CMAKE_CURRENT_LIST_DIR}/sample.sql"
|
||||
# VERBATIM)
|
||||
|
Loading…
Reference in New Issue
Block a user