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)
v1.31
Brad House 5 months ago
parent 6bef3ec50a
commit 493a2a57f0
  1. 3
      src/tools/CMakeLists.txt

@ -32,6 +32,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 "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"

Loading…
Cancel
Save