From b222ddc5dfa1fa3e93aec8d9d8632e302c92631a Mon Sep 17 00:00:00 2001 From: Brad House Date: Mon, 22 Jul 2024 17:54:23 -0400 Subject: [PATCH] CMake MSVC Parallelizm issue: Don't build adig and ahost simultaneously Make ahost a dependency of adig to prevent issues with them both referencing ares_strcasecmp.c and ares_getopt.c. This appears to be a bug in the Cmake generator for MSVC project files. Fixes #796 Fix By: Brad House (@bradh352) --- src/tools/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index ed5a7d72..11c2c314 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -28,6 +28,9 @@ IF (CARES_BUILD_TOOLS) # Build adig ADD_EXECUTABLE (adig adig.c ${SAMPLESOURCES}) + # Don't build adig and ahost in parallel. This is to prevent a Windows MSVC + # build error due to them both using the same source files. + ADD_DEPENDENCIES(adig ahost) TARGET_INCLUDE_DIRECTORIES (adig PUBLIC "$" "$"