MantisBT - CMake
View Issue Details
0008398CMakeCMakepublic2009-01-19 10:232009-02-23 22:44
Torsten Maehne 
Philip Lowman 
normalminoralways
closedfixed 
CMake-2-6 
CMake-2-6 
0008398: FindBoost.cmake requires C language support to be activated to detect GNU C++ compiler
FindBoost.cmake in CMake 2.6.2 (and CVS) uses CMAKE_COMPILER_IS_GNUCC to detect, if it uses the GNU C++ compiler. This works as long as the C language support is actived through the project (PROJECT_NAME CXX C) command. However, if only C++ support is activated, it wrongly assumes on the Unix platform to use the Intel C++ compiler and thus fails to find the different component libraries. Therefore CMAKE_COMPILER_IS_GNUCXX should be used.
No tags attached.
Issue History
2009-01-19 10:23Torsten MaehneNew Issue
2009-01-19 18:08Bill HoffmanNote Added: 0014622
2009-01-19 18:08Bill HoffmanStatusnew => assigned
2009-01-19 18:08Bill HoffmanAssigned To => Philip Lowman
2009-01-19 19:32Philip LowmanNote Added: 0014629
2009-01-19 19:32Philip LowmanStatusassigned => resolved
2009-01-19 19:32Philip LowmanResolutionopen => fixed
2009-01-19 21:24Philip LowmanNote Added: 0014639
2009-01-19 21:24Philip LowmanStatusresolved => feedback
2009-01-19 21:24Philip LowmanResolutionfixed => reopened
2009-01-19 21:26Philip LowmanStatusfeedback => resolved
2009-01-19 21:26Philip LowmanResolutionreopened => fixed
2009-02-23 22:44Philip LowmanNote Added: 0015309
2009-02-23 22:44Philip LowmanStatusresolved => closed
2009-02-23 22:44Philip LowmanFixed in Version => CMake-2-6

Notes
(0014622)
Bill Hoffman   
2009-01-19 18:08   
It should use the CXX version of that variable...
(0014629)
Philip Lowman   
2009-01-19 19:32   
I've changed it to CMAKE_COMPILER_IS_GNUCXX as it should be.

lowman@locke:~/cvs/CMake_write/Modules$ cvs commit FindBoost.cmake
Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindBoost.cmake,v <-- FindBoost.cmake
new revision: 1.29; previous revision: 1.28

Please take note that extremely recent CVS versions of FindBoost shouldn't fall victim to this bug however as I removed the hacky conditional that assumes Intel C++ if GCC is not being used sometime over this past weekend. Now the code has a special conditional for Intel.

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

I'm downloading the non-commercial version of Intel C++ compiler to fix the "-il" issue. Apparently newer boost builds encode the version of the Intel Linux compiler into the library name, just like GCC. They don't do this for Intel Windows however.
(0014639)
Philip Lowman   
2009-01-19 21:24   
Some clarification about my comment on "-il" can be found at Issue 0008395.
(0015309)
Philip Lowman   
2009-02-23 22:44   
Fix available in 2.6.3