MantisBT - CMake
View Issue Details
0008395CMakeModulespublic2009-01-18 17:362009-02-23 22:47
Philip Lowman 
Philip Lowman 
lowtweakalways
closedwon't fix 
CMake-2-6 
CMake-2-6 
0008395: FindBoost.cmake may not always autodetect compiler tag for Intel C++ / Linux properly
At some point in the past Boost started adding versioning information to libraries built with Intel C++ compiler on Linux. The existing FindBoost.cmake does not include support for detecting this.
No tags attached.
Issue History
2009-01-18 17:36Philip LowmanNew Issue
2009-01-18 17:39Philip LowmanStatusnew => assigned
2009-01-18 17:39Philip LowmanAssigned To => Philip Lowman
2009-01-19 21:21Philip LowmanNote Added: 0014638
2009-01-19 21:21Philip LowmanReproducibilityhave not tried => always
2009-01-19 21:21Philip LowmanStatusassigned => resolved
2009-01-19 21:21Philip LowmanResolutionopen => won't fix
2009-01-19 21:21Philip LowmanProduct Version => CMake-2-6
2009-01-19 21:21Philip LowmanSummaryFindBoost.cmake may not always autodetect compiler tag for Intel C++ / Linux => FindBoost.cmake may not always autodetect compiler tag for Intel C++ / Linux properly
2009-02-23 22:47Philip LowmanNote Added: 0015310
2009-02-23 22:47Philip LowmanStatusresolved => closed
2009-02-23 22:47Philip LowmanFixed in Version => CMake-2-6

Notes
(0014638)
Philip Lowman   
2009-01-19 21:21   
It appears that the encoding of the Linux Intel C++ compiler version number into the Boost library filename depends on how you build boost with bjam.

bjam toolset=intel-11.0 =>
   libboost_program_options-il110-mt-1_37.so
bjam toolset=intel =>
   libboost_program_options-il-mt-1_37.so

Since this isn't as clear cut as the GCC encoding (which seems to be something of a default when building Boost) I'm going to leave the default as "-il" and let the user override Boost_COMPILER as necessary. Ideally we would be able to search multiple compiler flags but this isn't possible at the moment.

Should someone need to autodetect the majorminor version number of ICC they can use the same code that calls gcc -dumpversion to get the proper value to insert into Boost_COMPILER (i.e. -il110 or -il90 etc.)
(0015310)
Philip Lowman   
2009-02-23 22:47   
Some additional support was added to FindBoost as released in CMake 2.6.3 to help with picking the right suffix. It still might get it wrong however depending on how Boost is built. If you have problems, use Boost_COMPILER to override.

    elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl"
        OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
      if(WIN32)
        set (_boost_COMPILER "-iw")
      else()
        set (_boost_COMPILER "-il")
      endif()