← All tasks
cppNeargye/magic_enum #242Not a task: already works

The `magic_enumConfigVersion.cmake` file is being generated in a different folder than `magic_enumConfig.cmake`

envgap__Neargye__magic_enum-242

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

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

03 / ORIGINAL ISSUE TEXT

Neargye/magic_enum #242 · read the original issue
... Consequently the variable `magic_enum_VERSION` is empty.



On Ubuntu 22.10:



- Installing:

```bash

mkdir build

cd build

cmake .. -DCMAKE_INSTALL_PREFIX="/opt/magic_enum" -DMAGIC_ENUM_OPT_INSTALL=TRUE -DMAGIC_ENUM_OPT_BUILD_TESTS=FALSE

make -j$(nproc)

make install

```



- Generated files visualization:

```bash

magic_enum/

├── include

│   ├── magic_enum_containers.hpp

│   ├── magic_enum_format.hpp

│   ├── magic_enum_fuse.hpp

│   ├── magic_enum.hpp

│   └── magic_enum_switch.hpp

├── lib

│   ├── cmake

│   │   ├── magic_enum

│   │   │   └── magic_enumConfig.cmake

│   │   └── magic_enumConfigVersion.cmake # seems to be wrong

│   └── pkgconfig

│       └── magic_enum.pc

└── share

    └── magic_enum

        └── package.xml

```



- Inside another CMake project:

```CMake

find_package(magic_enum CONFIG REQUIRED HINTS "/opt/magic_enum")



message(STATUS "Using magic_enum: ${magic_enum_VERSION}") # empty

```



I moved the file `magic_enumConfigVersion.cmake` manually after installation and it seemed to work:



```bash

magic_enum/

├── include

│   ├── magic_enum_containers.hpp

│   ├── magic_enum_format.hpp

│   ├── magic_enum_fuse.hpp

│   ├── magic_enum.hpp

│   └── magic_enum_switch.hpp

├── lib

│   ├── cmake

│   │   └── magic_enum

│   │       ├── magic_enumConfig.cmake

│   │       └── magic_enumConfigVersion.cmake

│   └── pkgconfig

│       └── magic_enum.pc

└── share

    └── magic_enum

        └── package.xml

```
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
[]