MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0015364 | CMake | CMake | public | 2015-01-22 07:55 | 2016-03-07 09:12 | |||||
Reporter | Gunther Laure | |||||||||
Assigned To | Brad King | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | CMake 3.1 | |||||||||
Target Version | CMake 3.3 | Fixed in Version | CMake 3.3 | |||||||
Summary | 0015364: FindBoost.cmake does not find debug libraries if they are located in a different directory than the release libraries | |||||||||
Description | FindBoost.cmake does not find debug libraries if they are located in a different directory than the release libraries. Assume following boost lib dir layout: lib/shared/Debug lib/shared/Release lib/static/Debug lib/static/Release lib64/shared/Debug lib64/shared/Release lib64/static/Debug lib64/static/Release For previous cmake version we changed changed the CMAKE_LIBRARY_PATH (depending on x86,x64,Release,Debug) so that FindBoost did find the correct libraries. The current version of FindBoost.cmake assumes that Debug and Release have to be in the same directoy. This is done in the macro _Boost_FIND_LIBRARY (line 323-325): # If Boost_LIBRARY_DIR is known then search only there. if(Boost_LIBRARY_DIR) set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH) endif() Commenting/Removing these lines restores the previous behaviour and Release and Debug libraries are found again. | |||||||||
Steps To Reproduce | create a directory structure like that: lib/Debug lib/Release and put valid boost libs in there: lib/Debug/boost_system-vc120-mt-gd-1_55.lib lib/Release/boost_system-vc120-mt-1_55.lib With CMAKE_LIBRARY_PATH set to both directories and the current version of cmake (3.1) find_package(Boost REQUIRED COMPONENTS system ) will result in: Boost_SYSTEM_LIBRARY = lib/Release/boost_system-vc120-mt-1_55.lib with the lines 323 to 325 commented in FindBoost.cmake it will find both libs: Boost_SYSTEM_LIBRARY = optimized;lib/Release/boost_system-vc120-mt-1_55.lib;debug;lib/Debug/boost_system-vc120-mt-gd-1_55.lib (absolute path removed manually) | |||||||||
Additional Information | If this is only an issue for us, we could workaround the problem with a customized FindBoost.cmake file in our environment. | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | FindBoost.cmake (55,192) 2015-01-23 03:09 https://public.kitware.com/Bug/file/5357/FindBoost.cmake 98bf613c+0001-FindBoost-Separate-search-for-debug-and-release-libraries.patch (7,729) 2015-01-23 08:43 https://public.kitware.com/Bug/file/5358/98bf613c%2B0001-FindBoost-Separate-search-for-debug-and-release-libraries.patch 0001-FindBoost-Separate-search-for-debug-and-release-libr.patch (8,189) 2015-01-26 07:51 https://public.kitware.com/Bug/file/5364/0001-FindBoost-Separate-search-for-debug-and-release-libr.patch 0002-FindBoost-Separate-search-for-debug-and-release-libr.patch (10,596) 2015-01-26 12:17 https://public.kitware.com/Bug/file/5365/0002-FindBoost-Separate-search-for-debug-and-release-libr.patch v2-0001-FindBoost-Search-for-debug-and-release-libraries-sep.patch (11,618) 2015-02-03 14:17 https://public.kitware.com/Bug/file/5371/v2-0001-FindBoost-Search-for-debug-and-release-libraries-sep.patch | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2015-01-22 07:55 | Gunther Laure | New Issue | ||||||||
2015-01-22 09:11 | Brad King | Note Added: 0037770 | ||||||||
2015-01-22 09:28 | Gunther Laure | Note Added: 0037771 | ||||||||
2015-01-22 09:28 | Gunther Laure | Note Edited: 0037771 | bug_revision_view_page.php?bugnote_id=37771#r1684 | |||||||
2015-01-22 09:44 | Brad King | Note Added: 0037772 | ||||||||
2015-01-22 10:04 | Ben Boeckel | Note Added: 0037773 | ||||||||
2015-01-22 10:15 | Gunther Laure | Note Added: 0037774 | ||||||||
2015-01-22 10:56 | Ben Boeckel | Note Added: 0037775 | ||||||||
2015-01-23 03:09 | Gunther Laure | File Added: FindBoost.cmake | ||||||||
2015-01-23 03:09 | Gunther Laure | Note Added: 0037783 | ||||||||
2015-01-23 08:43 | Brad King | File Added: 98bf613c+0001-FindBoost-Separate-search-for-debug-and-release-libraries.patch | ||||||||
2015-01-23 08:45 | Brad King | Note Added: 0037785 | ||||||||
2015-01-23 08:51 | Brad King | Note Added: 0037786 | ||||||||
2015-01-26 07:51 | Gunther Laure | File Added: 0001-FindBoost-Separate-search-for-debug-and-release-libr.patch | ||||||||
2015-01-26 07:56 | Gunther Laure | Note Added: 0037806 | ||||||||
2015-01-26 11:04 | Brad King | Note Added: 0037814 | ||||||||
2015-01-26 11:31 | Gunther Laure | Note Added: 0037816 | ||||||||
2015-01-26 12:17 | Gunther Laure | File Added: 0002-FindBoost-Separate-search-for-debug-and-release-libr.patch | ||||||||
2015-01-26 12:20 | Gunther Laure | Note Added: 0037817 | ||||||||
2015-02-03 14:17 | Brad King | File Added: v2-0001-FindBoost-Search-for-debug-and-release-libraries-sep.patch | ||||||||
2015-02-03 14:19 | Brad King | Note Added: 0037894 | ||||||||
2015-02-04 02:53 | Gunther Laure | Note Added: 0037902 | ||||||||
2015-02-05 10:55 | Brad King | Note Added: 0037924 | ||||||||
2015-02-05 10:55 | Brad King | Assigned To | => Brad King | |||||||
2015-02-05 10:55 | Brad King | Status | new => resolved | |||||||
2015-02-05 10:55 | Brad King | Resolution | open => fixed | |||||||
2015-02-05 10:55 | Brad King | Fixed in Version | => CMake 3.3 | |||||||
2015-02-05 10:55 | Brad King | Target Version | => CMake 3.3 | |||||||
2015-02-05 10:55 | Brad King | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=1697#r1697 | |||||||
2015-10-08 13:06 | Brad King | Relationship added | has duplicate 0015778 | |||||||
2016-03-07 09:12 | Robert Maynard | Note Added: 0040607 | ||||||||
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|