mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-02-06 21:59:31 -06:00
Add headers to sources to enable file browsing in IDEs
By adding headers to sources of targets, CMake adds them to list of project files generated for IDEs. This is non-intrusive trick, which does not affect targets compilation.
This commit is contained in:
@@ -33,7 +33,9 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
|
||||
endif ()
|
||||
|
||||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||
set(include_dir "${PROJECT_SOURCE_DIR}/include")
|
||||
file(GLOB_RECURSE sqlpp_headers ${include_dir}/*.h)
|
||||
include_directories(${include_dir})
|
||||
add_subdirectory(tests)
|
||||
|
||||
install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/sqlpp11" DESTINATION include)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
macro (build_and_run arg)
|
||||
add_executable(${arg} ${arg}.cpp)
|
||||
# Add headers to sources to enable file browsing in IDEs
|
||||
add_executable(${arg} ${arg}.cpp ${sqlpp_headers})
|
||||
add_test(${arg} ${arg})
|
||||
endmacro ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user