View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006926CMakeModulespublic2008-04-30 07:572010-09-27 09:55
ReporterNils Gladitz 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in VersionCMake-2-6 
Summary0006926: FindBoost.cmake does not find/set Boost_LIBRARY_DIRS on windows when using intel c++
DescriptionI'm guessing Boost_LIBRARY_DIRS is not set because the
_boost_COMPILER is not set to "-iw" when using the intel c++ compiler (icl.exe)

I used the new FindBoost.cmake script included with CMake 2.6.0 RC9
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0011594)
Bill Hoffman (manager)
2008-04-30 08:57

I am not sure why the compiler would make a difference with the find stuff. It pretty much just finds stuff. Where is your boost installed?
(0011596)
Nils Gladitz (developer)
2008-04-30 09:11
edited on: 2008-04-30 09:12

Boost libraries are named depending on the compiler used to build them.
e.g. one of my intel build c++ libraries is called "libboost_filesystem-iw-mt-1_35.lib".
The "-iw" indicates that Intel c++ was used to build the library.

The new FindBoost.cmake script knows that and appends e.g. "-vc80" when using MSVC80.
But it does not know about the Windows Intel C++ compiler yet and therefore does not look for the right libraries.
I think the library locations are also used to deduce Boost_LIBRARY_DIRS.

My Boost is installed in a non standard location but I used the BOOST_ROOT environment variable to point to it.
The script sets Boost_INCLUDE_DIRS correctly.

(0011597)
Bill Hoffman (manager)
2008-04-30 09:16

Can you try adding
 IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
    SET (_boost_COMPILER "-iw")
 ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")

And let me know if it works for you then?
(0011600)
Nils Gladitz (developer)
2008-04-30 10:12

CMAKE_CXX_COMPILER_ID seems to be empty;
part of the output from "cmake --system-information" is:

CMAKE_CXX_COMPILER "C:/Programme/Intel/Compiler/C++/10.1.013/IA32/Bin/icl.exe"
CMAKE_CXX_COMPILER_ABI ""
CMAKE_CXX_COMPILER_ARG1 ""
CMAKE_CXX_COMPILER_ENV_VAR "CXX"
CMAKE_CXX_COMPILER_ID ""
CMAKE_CXX_COMPILER_ID_RUN "1"
CMAKE_CXX_COMPILER_INIT "C:\Programme\Intel\Compiler\C++\10.1.013\IA32\Bin\icl.exe"
CMAKE_CXX_COMPILER_LIST "C:\Programme\Intel\Compiler\C++\10.1.013\IA32\Bin\icl.exe"
CMAKE_CXX_COMPILER_LOADED "1"
CMAKE_CXX_COMPILER_WORKS "1"

SET (_boost_COMPILER "-iw") by itself does seem to solve detection for me though
(0011610)
Bill Hoffman (manager)
2008-04-30 11:27

What generator are you using? Nmake or IDE?
(0011612)
Nils Gladitz (developer)
2008-04-30 11:34

I used the Visual Studio 2005 generator (with CC and CXX set to icc).
Afterwards I convert the generated Visual Studio C++ Projects (vcproj) to Intel C++ Projects (icproj).
(0011625)
Brad King (manager)
2008-04-30 16:10

The compiler id is not being detected because of some code in Modules/CMakeDetermineCXXCompiler.cmake:

  IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
    SET(CMAKE_CXX_COMPILER_ID_RUN 1)
    SET(CMAKE_CXX_PLATFORM_ID "Windows")

    # TODO: Set the compiler id. It is probably MSVC but
    # the user may be using an integrated Intel compiler.
    # SET(CMAKE_CXX_COMPILER_ID "MSVC")
  ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")

The compiler id test normally builds a small executable by just running the compiler and giving it a source file. The source uses the preprocessor to detect the compiler. In the case of the IDE generator the environment may not be setup to allow the compiler to run (and the compiler name may not even be known). Therefore I left out the compiler id stuff.

The CMAKE_CXX_COMPILER_ID variable is meant for private use by cmake, and documented as such (see cmake --help-variables):

  CMAKE_<LANG>_COMPILER_ID
       An internal variable subject to change.

       This is used in determining the compiler and is subject to change.

I'm sure people will use the variable anyway so we may eventually make the variable public, but currently that is unofficial.

I suggest just using

  if("${CMAKE_CXX_COMPILER}" MATCHES "icl")
(0011626)
Brad King (manager)
2008-04-30 16:12

Please submit a separate issue requesting support for direct generation of Intel C++ (.icproj) projects. Having more direct support for that IDE would allow us to set the compiler id for it.
(0014559)
Philip Lowman (developer)
2009-01-15 01:37

Has the FindBoost issue been resolved here? I'm hoping this code which is currently in FindBoost does the trick?

      IF (NOT CMAKE_COMPILER_IS_GNUCC)
        # We assume that we have the Intel compiler.
        SET (_boost_COMPILER "-il")

Also you can now set the variable Boost_COMPILER if the autodetection code isn't working for you (as of version 1.16 of the FindBoost.cmake in CVS)

http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/?root=CMake [^]
(0014560)
Philip Lowman (developer)
2009-01-15 01:39

Is "-il" in FindBoost a typo or correct? "-iw" is referenced above in this bug report.
(0014568)
Nils Gladitz (developer)
2009-01-15 03:19

I'm guessing -il is for the intel compiler on linux while -iw is for the intel compiler on windows.
So the issue (as far as I can tell) has not yet been resolved.
(0014607)
Philip Lowman (developer)
2009-01-18 17:39

This should be fixed in latest CVS. I believe "-iw" should autodetect properly now?

I can't guarantee -il will autodetect properly as apparently at some point in the past Boost added version encoding for "-il" (Linux) but not "-iw" (Windows).

Supporting "-il..." properly will take some more investigation (would need output from the equivalent of -dumpversion). I've opened a separate issue for this here just so it's not lost.
http://public.kitware.com/Bug/view.php?id=8395 [^]
(0015311)
Philip Lowman (developer)
2009-02-23 22:48

Fix available in 2.6.3
(0022363)
Brad King (manager)
2010-09-27 09:55

This as accidentally reopened. Closing again.

 Issue History
Date Modified Username Field Change
2008-04-30 07:57 Nils Gladitz New Issue
2008-04-30 08:57 Bill Hoffman Note Added: 0011594
2008-04-30 09:11 Nils Gladitz Note Added: 0011596
2008-04-30 09:12 Nils Gladitz Note Edited: 0011596
2008-04-30 09:13 Bill Hoffman Status new => assigned
2008-04-30 09:13 Bill Hoffman Assigned To => Douglas Gregor
2008-04-30 09:16 Bill Hoffman Note Added: 0011597
2008-04-30 10:12 Nils Gladitz Note Added: 0011600
2008-04-30 11:27 Bill Hoffman Note Added: 0011610
2008-04-30 11:34 Nils Gladitz Note Added: 0011612
2008-04-30 11:47 Bill Hoffman Assigned To Douglas Gregor => Bill Hoffman
2008-04-30 16:10 Brad King Note Added: 0011625
2008-04-30 16:12 Brad King Note Added: 0011626
2008-09-11 12:54 Bill Hoffman Assigned To Bill Hoffman => Douglas Gregor
2009-01-10 09:42 Alex Neundorf Category CMake => Modules
2009-01-15 01:37 Philip Lowman Note Added: 0014559
2009-01-15 01:39 Philip Lowman Note Added: 0014560
2009-01-15 03:19 Nils Gladitz Note Added: 0014568
2009-01-18 17:39 Philip Lowman Note Added: 0014607
2009-01-18 17:39 Philip Lowman Assigned To Douglas Gregor => Philip Lowman
2009-01-18 17:39 Philip Lowman Status assigned => resolved
2009-01-18 17:39 Philip Lowman Resolution open => fixed
2009-02-23 22:48 Philip Lowman Note Added: 0015311
2009-02-23 22:48 Philip Lowman Status resolved => closed
2009-02-23 22:48 Philip Lowman Fixed in Version => CMake-2-6
2010-09-26 17:07 Bill Hoffman Status closed => assigned
2010-09-26 17:07 Bill Hoffman Assigned To Philip Lowman => Brad King
2010-09-27 09:55 Brad King Note Added: 0022363
2010-09-27 09:55 Brad King Status assigned => closed


Copyright © 2000 - 2018 MantisBT Team