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 PROJECT_LINKER AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(PROJECT_LINKER "lld") elseif(NOT PROJECT_LINKER) set(PROJECT_LINKER "bfd") endif() include(FetchContent) project_set_alternate_linker() add_executable(swsf_bruteforce src/asio_impl.cpp src/main.cpp ) target_compile_definitions(swsf_bruteforce PRIVATE # We compile Asio in a separate TU (src/asio_impl.cpp) -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_bruteforce PRIVATE cxx_std_20) target_include_directories(swsf_bruteforce PRIVATE ${PROJECT_SOURCE_DIR}/src) project_target(swsf_bruteforce)