Unable to build tests
- Dominant language
- C++
- Stars
- 4
- Forks
- 7
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 3
Description
### Environment: (where does this bug occur, have you tried other environments)
- Which branch: `main`
- Which version: `HEAD`
- Any specific OS or system where the issue occurs? no
- Any special versions of ROOT or Geant4? no
### Steps to reproduce: (give a step by step account of how to trigger the bug)
**Error 1:** `test/utils` subdirectory does not exist.
1. Insert `enable_testing()` between lines 64 & 65 of top `CMakeLists.txt` file to enable testing with cmake
2. Run `cmake -S . -B build -DCMAKE_INSTALL_PREFIX=~/ -DBUILD_TESTING=on` (where the install prefix is arbitrary)
**Error 2:** source directories appear to be unscoped.
1. Comment out the `add_subdirectory(utils)` command on line 73 of `test/CMakeLists.txt` (this is to ameliorate **Error 1**).
2. Rerun `cmake -S . -B build -DCMAKE_INSTALL_PREFIX=~/ -DBUILD_TESTING=on`
### Expected Result: (what do you expect when you execute the steps above)
The test executables should be built.
### Actual Result: (what do you get when you execute the steps above)
In the case of **Error 1**, the following output is produced
```
-- The CXX compiler identification is Clang 16.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:31 (find_package):
Could not find a configuration file for package "podio" that is compatible
with requested version "0.15".
The following configuration files were considered but not accepted:
/opt/local/lib/cmake/podio/podioConfig.cmake, version: 1.2.0
-- Found nlohmann_json: /opt/local/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.2", minimum required is "3.11.2")
-- Found Vdt: /opt/local/include (found version "0.4")
-- Found Python: /opt/local/bin/python3.12 (found version "3.12.5") found components: Interpreter
-- Found podio: /opt/local/lib/cmake/podio/podioConfig.cmake (Required is at least version "1.0")
-- Found podio: /opt/local/lib/cmake/podio/podioConfig.cmake
-- Found EDM4HEP: /opt/local/lib/cmake/EDM4HEP/EDM4HEPConfig.cmake (Required is at least version "0.10.3")
-- Could not find .clang-format file!
-- Skip formatting of generated code files.
-- Creating 'edm4eic' datamodel
PODIO Data Model
================
Used edm4eic.yaml to create 143 classes in /gpfs02/sphenix/user/danderson/test/edm4eic_test_repro/EDM4eic/build/
Read instructions in the README.md to run your first example!
CMake Warning at test/CMakeLists.txt:54 (find_package):
By not providing "FindHepPDT.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "HepPDT", but
CMake did not find one.
Could not find a package configuration file provided by "HepPDT" with any
of the following names:
HepPDTConfig.cmake
heppdt-config.cmake
Add the installation prefix of "HepPDT" to CMAKE_PREFIX_PATH or set
"HepPDT_DIR" to a directory containing one of the above files. If "HepPDT"
provides a separate development package or SDK, be sure it has been
installed.
CMake Error at test/CMakeLists.txt:73 (add_subdirectory):
add_subdirectory given source "utils" which is not an existing directory.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Doxygen not found; no documentation will be built.
-- Configuring incomplete, errors occurred!
```
While for **Error 2**, after commenting out the command on line 73 of `test/CMakeLists.txt`, the following output is produced:
```
-- The CXX compiler identification is Clang 16.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:31 (find_package):
Could not find a configuration file for package "podio" that is compatible
with requested version "0.15".
The following configuration files were considered but not accepted:
/opt/local/lib/cmake/podio/podioConfig.cmake, version: 1.2.0
-- Found nlohmann_json: /opt/local/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.2", minimum required is "3.11.2")
-- Found Vdt: /opt/local/include (found version "0.4")
-- Found Python: /opt/local/bin/python3.12 (found version "3.12.5") found components: Interpreter
-- Found podio: /opt/local/lib/cmake/podio/podioConfig.cmake (Required is at least version "1.0")
-- Found podio: /opt/local/lib/cmake/podio/podioConfig.cmake
-- Found EDM4HEP: /opt/local/lib/cmake/EDM4HEP/EDM4HEPConfig.cmake (Required is at least version "0.10.3")
-- Could not find .clang-format file!
-- Skip formatting of generated code files.
-- Creating 'edm4eic' datamodel
PODIO Data Model
================
Used edm4eic.yaml to create 143 classes in /gpfs02/sphenix/user/danderson/test/edm4eic_test_repro/EDM4eic/build/
Read instructions in the README.md to run your first example!
CMake Warning at test/CMakeLists.txt:54 (find_package):
By not providing "FindHepPDT.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "HepPDT", but
CMake did not find one.
Could not find a package configuration file provided by "HepPDT" with any
of the following names:
HepPDTConfig.cmake
heppdt-config.cmake
Add the installation prefix of "HepPDT" to CMAKE_PREFIX_PATH or set
"HepPDT_DIR" to a directory containing one of the above files. If "HepPDT"
provides a separate development package or SDK, be sure it has been
installed.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Doxygen not found; no documentation will be built.
-- Configuring done (4.5s)
CMake Error at test/CMakeLists.txt:20 (add_test):
Error evaluating generator expression:
$
No target "edm4hep"
CMake Error at test/CMakeLists.txt:26 (add_test):
Error evaluating generator expression:
$
No target "edm4hep"
CMake Error at test/CMakeLists.txt:36 (add_test):
Error evaluating generator expression:
$
No target "edm4hep"
CMake Error at test/CMakeLists.txt:42 (add_test):
Error evaluating generator expression:
$
No target "edm4hep"
CMake Error at test/CMakeLists.txt:68 (add_test):
Error evaluating generator expression:
$
No target "edm4hep"
-- Generating done (0.3s)
CMake Generate step failed. Build files cannot be regenerated correctly.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the top CMakeLists.txt and test/CMakeLists.txt, especially the enable_testing(), add_subdirectory(utils), and add_test() lines identified in the report. Run cmake -S . -B build -DCMAKE_INSTALL_PREFIX=~/ -DBUILD_TESTING=on and trace the missing test directory and edm4hep target errors. Done means configuration succeeds and the test executables are built.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100