xo-indentlog: streamline build for examples
This commit is contained in:
parent
89fd44467f
commit
25039f88e8
7 changed files with 42 additions and 25 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
# emacs projectile config
|
||||
.projectile
|
||||
# symlink to ${my_build_directory}/compile_commands.json to make LSP work
|
||||
compile_commands.json
|
||||
# lsp keeps state here
|
||||
|
|
|
|||
|
|
@ -7,19 +7,15 @@ project(indentlog VERSION 1.0)
|
|||
include(GNUInstallDirs)
|
||||
include(cmake/xo-bootstrap-macros.cmake)
|
||||
|
||||
xo_cxx_toplevel_options2()
|
||||
xo_cxx_toplevel_options3()
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# cmake -DCMAKE_BUILD_TYPE=debug
|
||||
xo_toplevel_debug_config2()
|
||||
# c++ settings
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# cmake -DCMAKE_BUILD_TYPE=asan
|
||||
xo_toplevel_asan_config2()
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# cmake -DCMAKE_BUILD_TYPE=coverage
|
||||
xo_toplevel_coverage_config2()
|
||||
# one-time project-specific c++ flags. usually empty
|
||||
#set(PROJECT_CXX_FLAGS "-Wstringop-overread")
|
||||
#set(PROJECT_CXX_FLAGS "-fconcepts-diagnostics-depth=2")
|
||||
add_definitions(${PROJECT_CXX_FLAGS})
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
|
|
@ -35,9 +31,18 @@ xo_install_library4(${SELF_LIB} ${PROJECT_NAME}Targets)
|
|||
xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# docs targets depend on all the other library/utest targets
|
||||
#
|
||||
#add_subdirectory(docs)
|
||||
|
||||
install(TARGETS hello DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex1 DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex2 DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex3 DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex4 DESTINATION bin/indentlog/example)
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
install(TARGETS hello DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex1 DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex2 DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex3 DESTINATION bin/indentlog/example)
|
||||
install(TARGETS indentlog_ex4 DESTINATION bin/indentlog/example)
|
||||
endif()
|
||||
|
||||
# end CMakeLists.txt
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
add_executable(indentlog_ex1 ex1.cpp)
|
||||
xo_include_options2(indentlog_ex1)
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
add_executable(indentlog_ex1 ex1.cpp)
|
||||
xo_include_options2(indentlog_ex1)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# NOTE: need target names to be globally unique within the xo umbrella
|
||||
|
||||
add_executable(indentlog_ex2 ex2.cpp)
|
||||
xo_include_options2(indentlog_ex2)
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
add_executable(indentlog_ex2 ex2.cpp)
|
||||
xo_include_options2(indentlog_ex2)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
add_executable(indentlog_ex3 ex3.cpp)
|
||||
xo_include_options2(indentlog_ex3)
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
add_executable(indentlog_ex3 ex3.cpp)
|
||||
xo_include_options2(indentlog_ex3)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
add_executable(indentlog_ex4 ex4.cpp)
|
||||
xo_include_options2(indentlog_ex4)
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
add_executable(indentlog_ex4 ex4.cpp)
|
||||
xo_include_options2(indentlog_ex4)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
add_executable(hello hello.cpp)
|
||||
xo_include_options2(hello)
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
add_executable(hello hello.cpp)
|
||||
xo_include_options2(hello)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue