MantisBT - CMake
View Issue Details
0014686CMakeCMakepublic2014-01-07 19:412014-06-02 08:38
azdagron 
Brad King 
normalfeaturealways
closedfixed 
WindowsWindows 76.1.7601
CMake 2.8.12 
CMake 3.0CMake 3.0 
0014686: FindBoost.cmake does not provide a way to use libraries built by boost with the runtime-debugging=off bjam parameter
FindBoost.cmake unconditionally adds the "g" portion to the debug ABI tag indicating that it wants the versions of the libraries using the debug runtime. When bjam is provided the runtime-debugging=off command-line option, the release version of the runtime is used instead
1) bjam link=static runtime-link=shared runtime-debugging=off (produces a binary on windows with no "-*g-" in the name, e.g. libboost_date_time-vc110-mt-d-1_55.lib)
2) use FindBoost as follows:
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.55.0 REQUIRED COMPONENTS date_time)

I propose the inclusion of a Boost_USE_RUNTIME_DEBUGGING option to mirror that provided to bjam with conditionally skips the addition of "g" to the debug ABI tag:

+if(Boost_USE_RUNTIME_DEBUGGING)
  if(WIN32)
    if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
            OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
      set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
    endif()
  endif()
+endif()
No tags attached.
Issue History
2014-01-07 19:41azdagronNew Issue
2014-01-07 19:44azdagronNote Added: 0034912
2014-01-08 09:12Brad KingDescription Updatedbug_revision_view_page.php?rev_id=1358#r1358
2014-01-08 09:12Brad KingSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1360#r1360
2014-01-08 09:12Brad KingAdditional Information Updatedbug_revision_view_page.php?rev_id=1362#r1362
2014-01-08 09:14Brad KingNote Added: 0034914
2014-01-08 11:19azdagronNote Added: 0034915
2014-01-08 11:35Brad KingNote Added: 0034916
2014-01-09 10:09Brad KingAssigned To => Brad King
2014-01-09 10:09Brad KingStatusnew => resolved
2014-01-09 10:09Brad KingResolutionopen => fixed
2014-01-09 10:09Brad KingFixed in Version => CMake 3.0
2014-01-09 10:09Brad KingTarget Version => CMake 3.0
2014-06-02 08:38Robert MaynardNote Added: 0036072
2014-06-02 08:38Robert MaynardStatusresolved => closed

Notes
(0034912)
azdagron   
2014-01-07 19:44   
Oops, i meant "g" instead of "d" in the ABI tag name.
(0034914)
Brad King   
2014-01-08 09:14   
I fixed the description to use "g" instead of "d". Please read back through it to make sure it is now correct.

The proposed

 +if(Boost_USE_RUNTIME_DEBUGGING)

option will need to be on by default to avoid changing existing behavior.
(0034915)
azdagron   
2014-01-08 11:19   
Looks good, thanks for updating it.

I agree that it should be on-by-default.
(0034916)
Brad King   
2014-01-08 11:35   
I added an option with a name more consistent with existing options:

 FindBoost: Add Boost_USE_DEBUG_RUNTIME option
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d729899a [^]

Due to documentation reformatting since 2.8.12 the help text may conflict.
(0036072)
Robert Maynard   
2014-06-02 08:38   
Closing resolved issues that have not been updated in more than 4 months.