Notes |
|
(0011594)
|
Bill Hoffman
|
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
|
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
|
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
|
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
|
2008-04-30 11:27
|
|
What generator are you using? Nmake or IDE? |
|
|
(0011612)
|
Nils Gladitz
|
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
|
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
|
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
|
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
|
2009-01-15 01:39
|
|
Is "-il" in FindBoost a typo or correct? "-iw" is referenced above in this bug report. |
|
|
(0014568)
|
Nils Gladitz
|
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
|
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
|
2009-02-23 22:48
|
|
|
|
(0022363)
|
Brad King
|
2010-09-27 09:55
|
|
This as accidentally reopened. Closing again. |
|