← Back to team overview

hugin-devs team mailing list archive

[Bug 1165857] Re: SET(Boost_USE_STATIC_RUNTIME ON) should be set in CMakeLists.txt File

 

>At the moment the behaviour of the boost CMAKE part for hugin 
>is in an undefined state hugin.

In CMake a not defined variable is considers as false. So this is not an
undefined state ;-)

Thanks for the patch. It affects only the debug libs, so it is not back
ported to 2013.0 branch. I committed already the patch to the default
branch.

** Changed in: hugin
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/1165857

Title:
  SET(Boost_USE_STATIC_RUNTIME ON) should be set in CMakeLists.txt File

Status in Hugin - Panorama Tools GUI:
  Fix Committed

Bug description:
  At the moment the behaviour of the boost CMAKE part for hugin is in an undefined state hugin.
  As described in the comments of the FindBoost.cmake Module the Variable Boost_USE_STATIC_RUNTIME should be set to prevent this.  SET(Boost_USE_STATIC_RUNTIME OFF) and SET(Boost_USE_STATIC_RUNTIME ON) should be added to CMakeLists.txt after line 256 and 261 of rev 2577057a1bb0 (see below and attached patch).
  In my case the missing line prevented cmake to find and accept the debug versions of the boost libraries. 
  If you grant me commit right I can also commit the fix myself.
  Cheers
  Philipp

  IF(WIN32)
    IF(${HUGIN_SHARED})
      SET(Boost_USE_STATIC_LIBS OFF
      SET(Boost_USE_STATIC_RUNTIME OFF)
      # ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)
      # ADD_DEFINITIONS(-D_DLL)
      ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
    ELSE(${HUGIN_SHARED})
      SET(Boost_USE_STATIC_LIBS ON)
      SET(Boost_USE_STATIC_RUNTIME ON)
    ENDIF(${HUGIN_SHARED})
    # If BOOST_ROOT was defined in the environment, use it. 
    if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") 
      set(BOOST_ROOT $ENV{BOOST_ROOT}) 
    else(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") 
      set(BOOST_ROOT ${SOURCE_BASE_DIR}/boost${Boost_root_suffix}) 
     endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") 
  ENDIF(WIN32)

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/1165857/+subscriptions


References