Uilian Ries 373a01c989
build: Allow using new C++ standards when building (#426)
* Require C++11 as minimal standard

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Link to thread when needed

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* public thread target

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Fix typo with target_compile_features

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Joan Marcè i Igual <jmigual@users.noreply.github.com>
2024-05-29 17:59:10 +02:00

15 lines
366 B
CMake

include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.3.2
)
FetchContent_MakeAvailable(Catch2)
find_package(Threads REQUIRED)
add_executable(sio_test sio_test.cpp)
target_link_libraries(sio_test PRIVATE Catch2::Catch2WithMain sioclient Threads::Threads)
add_test(sioclient_test sio_test)