diff --git a/CMakeLists.txt b/CMakeLists.txt index a31fbbc7..b1116b7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index 0b8d6ebe..7e3020ed 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/test_constraints/CMakeLists.txt b/test_constraints/CMakeLists.txt index 61634af7..2281b371 100644 --- a/test_constraints/CMakeLists.txt +++ b/test_constraints/CMakeLists.txt @@ -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) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6582425b..86462e61 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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)