2014-09-06 10:18:15 +08:00
|
|
|
|
|
|
|
macro (build arg)
|
|
|
|
# Add headers to sources to enable file browsing in IDEs
|
2014-09-06 12:18:18 +08:00
|
|
|
include_directories("${CMAKE_SOURCE_DIR}/tests")
|
2014-09-06 10:18:15 +08:00
|
|
|
add_executable("Sqlpp11Example${arg}" "${arg}.cpp" ${sqlpp_headers} "${CMAKE_SOURCE_DIR}/tests/MockDb.h" "${CMAKE_CURRENT_LIST_DIR}/Sample.h")
|
|
|
|
add_test("${arg}" "${arg}")
|
|
|
|
endmacro ()
|
|
|
|
|
|
|
|
#build(sample)
|
|
|
|
build(insert)
|
|
|
|
build(update)
|
|
|
|
build(remove)
|
|
|
|
build(select)
|
2015-01-31 23:47:59 +08:00
|
|
|
find_package(Boost 1.50)
|
2015-01-30 06:32:03 +08:00
|
|
|
if(Boost_FOUND)
|
|
|
|
MESSAGE(${Boost_INCLUDE_DIRS})
|
|
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
|
|
build(ppgen)
|
|
|
|
endif()
|
|
|
|
|
2014-09-06 10:18:15 +08:00
|
|
|
|
|
|
|
#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
|
|
|
|
# )
|
|
|
|
|