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)
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index ed5a7d7..11c2c31 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt
@@ -28,6 +28,9 @@ # 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}>"