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.24
Brad House 4 months ago
parent dcb6c60300
commit 3d6aa0356a
  1. 3
      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 "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"

Loading…
Cancel
Save