swsf-bruteforce/CMakeLists.txt

44 lines
1005 B
CMake

cmake_minimum_required(VERSION 3.14)
project(swsf_bruteforce
LANGUAGES C CXX
)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(Policies)
include(ProjectFuncs)
# required system dependencies
find_package(Threads REQUIRED)
find_package(Boost REQUIRED)
# default linker
if(NOT SSXTOOLS_LINKER AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(SSXTOOLS_LINKER "lld")
elseif(NOT SSXTOOLS_LINKER)
set(SSXTOOLS_LINKER "bfd")
endif()
include(FetchContent)
ssxtools_set_alternate_linker()
add_executable(swsf_scramble
src/asio_impl.cpp
src/main.cpp
)
target_compile_definitions(swsf_scramble PRIVATE
#-DBOOST_ASIO_HAS_IO_URING=1
# We compile Asio in another TU
-DBOOST_ASIO_SEPARATE_COMPILATION=1
-DBOOST_ASIO_NO_DEPRECATED=1
-DBOOST_ASIO_DISABLE_BOOST_ARRAY=1
-DBOOST_ASIO_DISABLE_BOOST_BIND=1
)
target_compile_features(swsf_scramble PRIVATE cxx_std_20)
target_include_directories(swsf_scramble PRIVATE ${PROJECT_SOURCE_DIR}/src)
ssxtools_target(swsf_scramble)