cmake: map RelWithDebInfo and MinSizeRel configurations to Release#9656
cmake: map RelWithDebInfo and MinSizeRel configurations to Release#9656opencv-pushbot merged 1 commit intoopencv:masterfrom
Conversation
|
@bblanchon, thanks, that's a nice feature! @alalek, could you review it, please? Is it compatible with all the CMake versions that we support? |
|
@vpisarev |
|
Thank you! Looks good to me 👍 |
|
It looks like a MSVC condition is necessary after all. On my machine with Ubuntu 16.04 and OpenCV 3.3.1 the changes of @bblanchon cause compile errors , when my build target is set to DebWithRelInfo.
If I build my project as Debug or Release it compiles. If I remove the changes from the pull request, it will also compile for RelWithDebInfo. I don't know if it is relevant, but It seems like there are no Imported Configurations available. I have added this to OpenCVConfig.cmake:
Then CMake will output: "IMPORTED_CONFIGURATIONS NONE" But shouldn't the MAP_IMPORTED_CONFIG_ property be ignored in this case? |
|
@TobiasLangnerFUB The latest discussion is here: #10105 |
|
I have seen that issue, but it doesn't fit my scenario. I haven't build OpenCV on my own, but use the opencv3 package for ROS Kinetic. The website http://wiki.ros.org/opencv3 lists the changes they have made to the CMake configuration. It doesn't look like it was built as RelWithDebInfo. |
resolves #5564
This Pull Request allows a user to compile her project with configurations RelWithDebInfo and MinSizeRel.
It was previously not possible as CMake was incorrectly linking with the Debug version of the library when using RelWithDebInfo or MinSizeRel.
See #9161 (comment) for initial motivation.
@alalek, I didn't added a condition on
MSVC, as this feature is not specific to Visual Studio.Note that, this is not the same as #6496 because this Pull Request doesn't add new configurations to OpenCV, it only allows all configuration in the user's project.