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)
pull/825/head
Brad House 4 months ago
parent 5f855b89f1
commit 2a65901744
  1. 3
      src/tools/CMakeLists.txt

@ -32,6 +32,9 @@ IF (CARES_BUILD_TOOLS)
# Build adig # Build adig
ADD_EXECUTABLE (adig adig.c ${SAMPLESOURCES}) 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 TARGET_INCLUDE_DIRECTORIES (adig
PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>" PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>" "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"

Loading…
Cancel
Save