-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Building on windows with cmake > ninja > clang (> msvc) leads to the duplicate generation error
cmake-build-debug> cmake -G Ninja ..
-- The C compiler identification is Clang 10.0.0 with GNU-like command-line
-- The CXX compiler identification is Clang 10.0.0 with GNU-like command-line
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/LLVM/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
[...]
-- CMAKE_INSTALL_LIBDIR: lib
-- ZSTD_LEGACY_SUPPORT not defined!
-- ZSTD_MULTITHREAD_SUPPORT is enabled
-- Configuring done
-- Generating done
CMake Error:
Running
'C:/STANDALONE-BINARIES/ninja.exe' '-C' 'cmake-build-debug' '-t' 'cleandead'
failed with:
ninja: error: build.ninja:6103: multiple rules generate libs/zstd/build/cmake/lib/zstd.lib [-w dupbuild=err]
CMake Error:
Running
'C:/STANDALONE-BINARIES/ninja.exe' '-C' 'cmake-build-debug' '-t' 'recompact'
failed with:
ninja: error: build.ninja:6103: multiple rules generate libs/zstd/build/cmake/lib/zstd.lib [-w dupbuild=err]
CMake Generate step failed. Build files cannot be regenerated correctly.
CMakeLists.txt
[...]
add_subdirectory(libs/zstd/build/cmake)
target_link_libraries(${TargetName} PRIVATE libzstd_static)
Reactions are currently unavailable