-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues using corrade as a submodule and via CMake Package Manager #187
Comments
Having slept on it, I see you are overriding |
Hello! I think I know what's up. Problem 1This is set by default if you don't override This is the code that does it, plus some more background details: Lines 540 to 575 in ed451d5
And to override, it should be enough to set any of those variables. An empty value is the default, resetting the behavior to what you expect. OTOH for plugins to be found I still recommend that you keep the library location set the same way, for Corrade & Magnum at least, and then you can unset it after. So for example this: set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>/lib)
add_subdirectory(submodules/corrade EXCLUDE_FROM_ALL)
# And Magnum, Magnum Plugins etc.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "")
Funnily enough, my problem that led to setting this up, among other things, was an inverse of yours -- I have several hundreds of unit tests, placed in Problem 2The CPMAddPackage(NAME corrade
GITHUB_REPOSITORY mosra/corrade
GIT_TAG master
EXCLUDE_FROM_ALL YES
GIT_SHALLOW NO) # add this option In any case, it's a CMake warning, not a build-preventing error, it's just that the generated Hope this helps! By the way, thanks a lot for taking the time to set up the repo, that made everything a lot easier for me to verify. 👍 |
Heh, managed to send a reply at the exact time as you. |
It isn't odd -- as I'm saying, it's just a warning, not an error. Because for example you can have the repository downloaded as a ZIP file, at which point it'll have no Git history to query the version from. It'd be silly if the build required presence of full Git history just to generate a version header. If it fails to fetch version info, the generated |
In e7dd8d5 I tried to clarify the Git warning message to not make it look like it's a fatal error; similar change is being pushed to other repos as well. Unfortunately, Git itself saying Additionally, as of 24502d1, there's new documentation for using CPM, emphasising that one should disable That's I think all left to be done here, so closing as resolved. |
Hi,
I’m evaluating Magnum to see if I can use it for my project. I’ve hit two separate problems while trying to integrate it into my CMake set up. I’ve replicated the issues in a cut down git repo just using corrade. Please have a look.
Problem 1 is if I include corrade as a sub_directory, it sets the directory to place programs into as
build/bin/
, not where I originally wanted them. Seeing as I have 20 or so unit test programs all called 'unitTest', this causes problems.Problem 2 is if I include corrade in my project via the CPM package manager, it fails because it can’t parse the checkout tag as a year/month.
I can make a work around for 2 if you are happy for me to, but I’m not sure what is happening with Problem 1.
Any help appreciated.
Bruno
The text was updated successfully, but these errors were encountered: