Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Ported the Qt port to Cpp17 #153

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Duncan Cross <[email protected]> (Lua port)
Jan Weiß <[email protected]> (Objective C port)
Matthaeus G. Chajdas <[email protected]> (C# port)
Mike Slemmer <[email protected]> (C++ port)

Scott Aron Bloom <[email protected]> (C++11 port-remove Qt dependency)
32 changes: 32 additions & 0 deletions cpp17/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
cmake_minimum_required(VERSION 3.22)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)


SET( _PROJECT_NAME diff_match_patch_cpp17 )
project( ${_PROJECT_NAME} )
add_library(${_PROJECT_NAME}
STATIC
diff_match_patch.cpp
diff_match_patch.h
diff_match_patch_utils.cpp
diff_match_patch_utils.h
)

target_include_directories( ${_PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR} )
target_link_libraries( ${_PROJECT_NAME} )

SET( TEST_NAME "${_PROJECT_NAME}_test" )
project( ${TEST_NAME} )
add_executable( ${TEST_NAME} diff_match_patch_test.cpp diff_match_patch_test.h diff_match_patch_test_assertEquals.cpp)

target_include_directories( ${TEST_NAME} PUBLIC ${CMAKE_SOURCE_DIR})
if( USE_GTEST )
SET( GTEST_LIBS gtest gmock )
target_include_directories( ${_PROJECT_NAME} PUBLIC ${GOOGLETEST_ROOT_DIR}/googletest/include )
target_compile_definitions( ${_PROJECT_NAME} PUBLIC USE_GTEST )
target_compile_definitions( ${TEST_NAME} PUBLIC USE_GTEST )
endif()

target_link_libraries( diff_match_patch_cpp17_test ${_PROJECT_NAME} ${GTEST_LIBS})
add_test( ${TEST_NAME} ${TEST_NAME} )
Loading