Closed Arniiiii closed 1 month ago
Hi, Thanks for RP could you have time look at these problems https://github.com/Neargye/magic_enum/issues/377 https://github.com/Neargye/magic_enum/issues/318 and perhaps add them to the pr
Hi, Thanks for RP could you have time look at these problems #377 #318 and perhaps add them to the pr
I'll try at Saturday.
But from first look:
https://github.com/Neargye/magic_enum/issues/318 not sure it can be solved because I couldn't get such behaviour ah, I read badly. ok, seems feasible
https://github.com/Neargye/magic_enum/issues/377 seams feasible
Ok, now, with new commit we have:
magic_enum/magic_enum.hpp
.
add_subdirectory
version.include/magic_enum/magic_enum.hpp
to include/magic_enum.hpp
, or we got some problems. Though, I believe if you, @Neargye think that the option "main header + others in a folder" is better, maybe just placing it one directory above and fixing some #include
directives would be enough.#include <magic_enum/magic_enum.hpp>
includes = ["include/magic_enum"],
to includes = ["include"],
would be appropriate with the change./usr/local/
for pkgconfig-j4
it uses -j$(nproc)
.For what it's worth, I tested @Arniiiii 's branch, with these latest changes, and it worked for me. Looking forward to next release.
@Arniiiii Thanks for changes, all looks good. Include via <magic_enum/magic_enum.hpp> it's logical and understandable.
I'll still try to adjust the formatting to improve such moments https://github.com/Neargye/magic_enum/blob/a72a0536c716fdef4f029fb43e1fd7e7b3d9ac9b/CMakeLists.txt#L31
@Arniiiii Thanks for changes, all looks good. Include via <magic_enum/magic_enum.hpp> it's logical and understandable.
This change does make perfect sense (a subfolder rather than at the root if the include folder, and aligning the behaviour of an installed location with add_subdirectory) but please me mindful that changes like this disrupt users who were already using the library as they may need to change their source files.
This very change was accidentally introduced, then reverted in https://github.com/Neargye/magic_enum/issues/310#issuecomment-1808234766 - and now it's being brought back again.
Chiming in from Conan Center - we just package the version as is, so that's not a problem at all. But had to spend some additional time finding an authoritative answer as to how the header should be included. I would probably suggest making it very clear in the README what the #include should be, and perhaps add a comment to https://github.com/Neargye/magic_enum/issues/310, since the behaviour of a cmake install changed twice.
@jcar87 I agree, my bad. I will update the documentation to clarify.
What was the problem?
https://bugs.gentoo.org/933479 On Gentoo, a multilib library was looking for magic_enum's CMake config files, but couldn't find, because they are in ABI-dependant folder.
magic_enum's CMake script installs CMakeConfig related stuff to
/usr/lib64
or/usr/lib
. But:The pull request does following things:
/usr/share/magic_enum/cmake/...
and/usr/share/magic_enum/magic_enum.pc
..cmake-format
file. It's a file for usage ofcmake-format
program. The file specifies what style to use forCMakeLists.txt
and*.cmake
files. I haven't applied for all such files, since I've touched not all of them..gitignore