Skip to content

Compilation with Intel oneAPI: Many warnings #244

Open

Description

@MarDiehl

When installing boost with Intel oneAPI using the recommended way (bootstrap), the compiler gives the following warning

These options as listed are not supported.
For more information, use '-qnextgen-diag'.
option list: 
	-ip
	-wd177,780,2196,1782,193,304,981,1418,411,734,279

This is defined here:

<toolset>intel-linux:<cxxflags>"-wd177,780,2196,1782,193,304,981,1418,411,734,279"

For CMake, this is not an issue because the new, LLVM-based compiler identifies as IntelLLVM, not Intel (https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html) and, hence, the options are not added here:

if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")

Activity

  1. Lastique commented on Feb 22, 2025

    @Lastique
    Member

    As far as I can see, Boost.Build does not discriminate between the legacy Intel compiler and the newer LLVM-based one - both are identified as intel-linux (on Linux platform). So there is no way I could add these flags for the legacy compiler but not the newer one.

    I can see you've already created an issue for b2 to support the new compiler. Until that issue is resolved, there's nothing I can do in Boost.Log.

    In the meantime, you can patch your local Boost by removing the compiler options that don't work.

  2. MarDiehl commented on Feb 22, 2025

    @MarDiehl
    Author

    yes, unfortunately the PR at b2 is stuck because there is no test setup for Intel compilers.

    As far as I see, the flags specific to boost.log only disable warnings. So my suggestion would be to simply remove them to reverse the behavior: Instead of showing warnings for new compiler versions, show (other) warnings for old compiler versions. Unfortunately, one would still get the warning about -ip which is caused by b2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions