Skip to content

CMAKE_CXX_FLAGS_xxx broken with Intel on MSVC #605

@maartendb

Description

@maartendb

The CMakeLists.txt overwrites the CMAKE_CXX_FLAGS_xxx (line 174) when using Intel on MSVC. As a result, the Debug configuration will be using /MD instead of /MDd and cause linking errors with binaries compiled with /MDd.

These two solutions will work:

  • append instead of overwrite the flags (e.g set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG -g")
  • put these four set(CMAKE_CXX_FLAGS_xxxx ....) lines inside an if(NOT WIN32) block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions