2021-12-19 14:50:40 +00:00
|
|
|
cmake_minimum_required(VERSION 3.12.0)
|
|
|
|
|
|
|
|
cmake_policy(SET CMP0054 NEW)
|
2022-02-02 21:25:41 +00:00
|
|
|
set(SKBUILD_LINK_LIBRARIES_KEYWORD PRIVATE)
|
2021-12-19 14:50:40 +00:00
|
|
|
|
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
|
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
project(rapidfuzz LANGUAGES C CXX)
|
|
|
|
|
2022-01-22 23:48:26 +00:00
|
|
|
if (MSVC)
|
|
|
|
add_compile_options(/W4)
|
|
|
|
else()
|
|
|
|
add_compile_options(-Wall -Wextra -pedantic)
|
|
|
|
endif()
|
|
|
|
|
2021-12-19 14:50:40 +00:00
|
|
|
find_package(NumPy REQUIRED)
|
|
|
|
find_package(PythonExtensions REQUIRED)
|
|
|
|
find_package(Python COMPONENTS Interpreter Development)
|
|
|
|
|
2022-01-17 15:53:11 +00:00
|
|
|
set(RF_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
set(TF_BUILD_CUDA OFF CACHE BOOL "Enables build of CUDA code")
|
|
|
|
set(TF_BUILD_TESTS OFF CACHE BOOL "Enables build of tests")
|
|
|
|
set(TF_BUILD_EXAMPLES OFF CACHE BOOL "Enables build of examples")
|
|
|
|
add_subdirectory(extern/taskflow)
|
|
|
|
add_subdirectory(extern/rapidfuzz-cpp)
|
2022-01-22 23:48:26 +00:00
|
|
|
add_subdirectory(extern/jarowinkler-cpp)
|
2022-01-06 22:37:58 +00:00
|
|
|
|
2022-01-06 23:38:28 +00:00
|
|
|
add_subdirectory(src/cython)
|
2022-01-12 20:08:06 +00:00
|
|
|
add_subdirectory(src/cython/distance)
|