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

30 lines
836 B
CMake
Raw Normal View History

2014-09-06 10:18:15 +08:00
macro (build arg)
# Add headers to sources to enable file browsing in IDEs
2015-03-09 01:36:42 +08:00
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../tests")
add_executable("Sqlpp11Example${arg}" "${arg}.cpp" ${sqlpp_headers} "${CMAKE_CURRENT_SOURCE_DIR}/../tests/MockDb.h" "${CMAKE_CURRENT_LIST_DIR}/Sample.h")
2015-03-06 01:01:27 +08:00
add_test("${arg}" "Sqlpp11Example${arg}")
2014-09-06 10:18:15 +08:00
endmacro ()
#build(sample)
build(insert)
build(update)
build(remove)
build(select)
find_package(Boost 1.50)
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
# )