When the testsuite is enabled, the "cmake_add_subdirectory" test adds a second copy of the project into the build configuration, and the project files are installed twice. This becomes super problematic when it tries to install a file from CMAKE_BINARY_DIR which is only available in CMAKE_CURRENT_BINARY_DIR and bombs out with the following error message: ``` [...] -- Installing: <DESTDIR>/usr/lib/cmake/nlohmann_json/nlohmann_jsonTargets.cmake CMake Error at test/cmake_add_subdirectory/nlohmann_json/cmake_install.cmake:73 (file): file INSTALL cannot find "......./nlohmann-json/builddir/test/cmake_add_subdirectory/nlohmann_json.pc": No such file or directory. Call Stack (most recent call first): test/cmake_add_subdirectory/cmake_install.cmake:47 (include) test/cmake_install.cmake:49 (include) cmake_install.cmake:94 (include) ```
| Name |
Last commit
|
Last update |
|---|---|---|
| .circleci | Loading commit data... | |
| .github | Loading commit data... | |
| benchmarks | Loading commit data... | |
| cmake | Loading commit data... | |
| doc | Loading commit data... | |
| include/nlohmann | Loading commit data... | |
| single_include/nlohmann | Loading commit data... | |
| test | Loading commit data... | |
| third_party | Loading commit data... | |
| .clang-format | Loading commit data... | |
| .clang-tidy | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CODE_OF_CONDUCT.md | Loading commit data... | |
| ChangeLog.md | Loading commit data... | |
| LICENSE.MIT | Loading commit data... | |
| Makefile | Loading commit data... | |
| README.md | Loading commit data... | |
| appveyor.yml | Loading commit data... | |
| meson.build | Loading commit data... | |
| nlohmann_json.natvis | Loading commit data... | |
| wsjcpp.yml | Loading commit data... |