From d2ef5145699f2d96452195fc888bf2bf7cce614a Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Sat, 8 Jan 2022 19:22:02 +0100 Subject: [PATCH] Disable building cracker with MSVC It uses OpenMP features MSVC doesn't support. --- CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59ed2ffb7..9352152ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -526,12 +526,14 @@ if (BUILD_MISC_TESTS) other/fun/save-generator.c) target_link_modules(save-generator toxcore misc_tools) - add_executable(cracker - other/fun/cracker.c) - target_link_modules(cracker ${LIBSODIUM_LIBRARIES}) - find_package(OpenMP) - if(OpenMP_C_FOUND) - target_link_libraries(cracker OpenMP::OpenMP_C) + if(NOT MSVC) + add_executable(cracker + other/fun/cracker.c) + target_link_modules(cracker ${LIBSODIUM_LIBRARIES}) + find_package(OpenMP) + if(OpenMP_C_FOUND) + target_link_libraries(cracker OpenMP::OpenMP_C) + endif() endif() add_executable(afl_toxsave