refactor
This commit is contained in:
		| @@ -1,107 +1,23 @@ | ||||
| add_executable(bdiff  | ||||
|   examples/bdiff.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
| function(add_example_executable name) | ||||
|   add_executable(${name}  | ||||
|     examples/${name}.cpp | ||||
|     examples/common.cpp | ||||
|   ) | ||||
|  | ||||
| target_include_directories(bdiff BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|   target_include_directories(${name} BEFORE PRIVATE | ||||
|     ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
|   ) | ||||
| endfunction() | ||||
|  | ||||
| add_executable(fpatch  | ||||
|   examples/fpatch.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(fpatch BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(intdiff  | ||||
|   examples/intdiff.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(intdiff BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(intdiff3 | ||||
|   examples/intdiff3.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(intdiff3 BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(patch | ||||
|   examples/patch.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(patch BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(st2ses | ||||
|   examples/st2ses.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(st2ses BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(strdiff | ||||
|   examples/strdiff.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(strdiff BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(strdiff3 | ||||
|   examples/strdiff3.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(strdiff3 BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(strdiff_cp | ||||
|   examples/strdiff_cp.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(strdiff_cp BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(strdiff_storage | ||||
|   examples/strdiff_storage.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(strdiff_storage BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(unidiff | ||||
|   examples/unidiff.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(unidiff BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
|  | ||||
| add_executable(unistrdiff | ||||
|   examples/unistrdiff.cpp | ||||
|   examples/common.cpp | ||||
| ) | ||||
|  | ||||
| target_include_directories(unistrdiff BEFORE PRIVATE | ||||
|   ${CMAKE_CURRENT_SOURCE_DIR}/examples | ||||
| ) | ||||
| add_example_executable(bdiff) | ||||
| add_example_executable(fpatch) | ||||
| add_example_executable(intdiff) | ||||
| add_example_executable(intdiff3) | ||||
| add_example_executable(patch) | ||||
| add_example_executable(st2ses) | ||||
| add_example_executable(strdiff) | ||||
| add_example_executable(strdiff3) | ||||
| add_example_executable(strdiff_cp) | ||||
| add_example_executable(strdiff_storage) | ||||
| add_example_executable(unidiff) | ||||
| add_example_executable(unistrdiff) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user