← All tasks
cppzeux/pugixml #344Not a task: already works

Multiple targets with the name libpugixml.a doesn't work with CMake+Ninja

envgap__zeux__pugixml-344

01 / FAILURE SIGNATURE

As reported upstream

ninja: error: build.ninja:388: multiple rules generate libpugixml.a [-w dupbuild=err]
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
5e64076af9691ce8100aedf7a61cb338f2596151
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

zeux/pugixml #344 · read the original issue
```

$ cmake -Bbuild -H. -GNinja

-- The CXX compiler identification is GNU 10.0.1

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ - works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Configuring done

-- Generating done

-- Build files have been written to: /home/jhasse/git/pugixml/build

$ ninja -Cbuild

ninja: Entering directory `build'

ninja: error: build.ninja:388: multiple rules generate libpugixml.a [-w dupbuild=err]

```



This is with CMake 3.17.1 and Ninja 1.10.0 and happens since https://github.com/zeux/pugixml/commit/2c24e90c238e5142edb389c2a9735a9c1bae9039.



I think it isn't save to have to targets with the same name?
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]