Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] Issues with Intel C++
From: Justin Holewinski (shawmishrak_at_[hidden])
Date: 2009-10-07 22:21:16


On Wed, Oct 7, 2009 at 9:55 PM, Philip Lowman <philip_at_[hidden]> wrote:

> On Wed, Oct 7, 2009 at 11:12 AM, Justin Holewinski <shawmishrak_at_[hidden]>wrote:
>
>>
>> I am trying to compile Boost 1.40 with the Intel C++ Compiler, Version
>> 11.1, using CMake and I've encountered two issues so far.
>>
>>
>> First, on Windows, the Intel C++ Compiler follows Microsoft's naming
>> convention. The compiler executable is icl.exe, not icc.exe or icpc.exe.
>> Hence, the BoostConfig.cmake script fails to detect the Intel compiler on
>> Windows because it tries to match the compiler name against icpc.exe. The
>> fix is trivial. In BoostConfig.cmake, add an additional conditional on line
>> 89:
>>
>> elseif(CMAKE_CXX_COMPILER MATCHES "/icpc$" OR CMAKE_CXX_COMPILER MATCHES
>> "/icpc.exe$" OR CMAKE_CXX_COMPILER MATCHES "/icl.exe$")
>>
>> I'm not sure what impact this has on the build process other than applying
>> the 'intel' branding to the generated libraries instead of 'unknown'.
>>
>
> Hi,
>
> I can fix this in CVS, but might have a slightly better way. Can you tell
> me what the value of CMAKE_CXX_COMPILER_ID is on Intel C++?
>

For my installation, it appears to be "Intel". At least that's the value I
get if I add MESSAGE("${CMAKE_CXX_COMPILER_ID}") to the end of the root
CMakeLists.txt file for Boost.

>
>>
>>
>> Second, the handling of inter-library dependencies appears to be broken
>> (when using Intel C++), particularly the dependency between
>> Boost.Wserialization and Boost.Serialization. A different error is issued
>> for different platforms.
>>
>>
>> Windows:
>>
>> When building shared libraries, the Boost.Wserialization library attempts
>> to link to the shared-library version of Boost.Serialization. The link
>> library is assumed to be in lib/ (as per Unix conventions), but link
>> libraries for shared DLLs on Windows are placed in bin/. This results in a
>> CMake dependency error:
>>
>> NMAKE : fatal error U1073: don't know how to make
>> 'lib\boost_serialization-intel-mt-1.40.lib'
>>
>> The correct dependency is instead
>> 'bin\boost_serialization-intel-mt-1.40.lib'.
>>
>
> This is the second time today I've heard of people placing import libraries
> in bin folders. Any reason why this is happening?
>
> You could look into the Boost preprocessor definitions that disable auto
> linking and rely instead on CMake's target_link_libraries(). See the
> FindBoost docs for more information.
>
>
I have no idea why this is happening. When using the Visual Studio toolset,
the dynamic-link libraries are placed in bin/ and the import libraries are
placed in lib/, like you would expect. Why this is not the case when using
the Intel compiler, I have no idea. Perhaps there are a different set of
command-line switches that are needed to set to the output directory of the
import libraries. I'll continue to look into it and let you know if I find
something.

Thanks,

Justin Holewinski

> --
> Philip Lowman
>
> _______________________________________________
> Boost-cmake mailing list
> Boost-cmake_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-cmake
>
>

-- 
Thanks,
Justin Holewinski


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk