refactor
This commit is contained in:
parent
58419fd545
commit
5d99bb9142
@ -2,6 +2,7 @@ bdiff
|
|||||||
cmake_current_source_dir
|
cmake_current_source_dir
|
||||||
dhave_unistd_h
|
dhave_unistd_h
|
||||||
dhave_unistd_h
|
dhave_unistd_h
|
||||||
|
endfunction
|
||||||
fpatch
|
fpatch
|
||||||
have_unistd_h
|
have_unistd_h
|
||||||
intdiff
|
intdiff
|
||||||
|
@ -1,107 +1,23 @@
|
|||||||
add_executable(bdiff
|
function(add_example_executable name)
|
||||||
examples/bdiff.cpp
|
add_executable(${name}
|
||||||
examples/common.cpp
|
examples/${name}.cpp
|
||||||
)
|
examples/common.cpp
|
||||||
|
)
|
||||||
|
|
||||||
target_include_directories(bdiff BEFORE PRIVATE
|
target_include_directories(${name} BEFORE PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples
|
${CMAKE_CURRENT_SOURCE_DIR}/examples
|
||||||
)
|
)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
add_executable(fpatch
|
add_example_executable(bdiff)
|
||||||
examples/fpatch.cpp
|
add_example_executable(fpatch)
|
||||||
examples/common.cpp
|
add_example_executable(intdiff)
|
||||||
)
|
add_example_executable(intdiff3)
|
||||||
|
add_example_executable(patch)
|
||||||
target_include_directories(fpatch BEFORE PRIVATE
|
add_example_executable(st2ses)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples
|
add_example_executable(strdiff)
|
||||||
)
|
add_example_executable(strdiff3)
|
||||||
|
add_example_executable(strdiff_cp)
|
||||||
add_executable(intdiff
|
add_example_executable(strdiff_storage)
|
||||||
examples/intdiff.cpp
|
add_example_executable(unidiff)
|
||||||
examples/common.cpp
|
add_example_executable(unistrdiff)
|
||||||
)
|
|
||||||
|
|
||||||
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
|
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user