1

Since there is a bug in Intel C++ compiler 2019 (up to update 5 at least) that prevent using weak_ptr without corrupting its parent shared_ptr (see this link) in 64-bit/Debug, I'm wondering whether or not it is possible to use Intel 2018 (previous version) with VS 2019.

At present time, we have no issue with Intel C++ 2018 in conjunction with VS2015. We want to upgrade to VS2019 but we would like to still use Intel 2018, which has no official integration to VS2019. Does someone know how to bypass this? Registery keys? Batch files? Any help would be greatly appreciated!

Thanks!

dom_beau
  • 131

1 Answers1

2

Microsoft says in the article CMakeSettings.json:

The cmakesettings.json file contains information that specifies how Visual Studio should interact with CMake to build a project for a specified platform. The file stores information such as environment variables or arguments for the cmake.exe environment. You can edit directly or use the CMake Settings editor (Visual Studio 2019 and later).

The claim above is that Visual Studio 2019 can run any environment at all, even compile and run Linux programs, once it is correctly setup.

Instructions are given in the Intel Developer Zone article Using Intel C++ compiler with Visual Studio 2017/2019 cmake: >

How to use Intel C++ compiler with VS2017/VS219 CMake "open folder" workflow, I give example for VS2019 and Intel C++ compiler update 4:

  1. Create vs2019.cmd with the following text:

    call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\bin\ipsxe-comp-vars.bat"
    

    intel64 vs2019 start "VS2019" /B "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe"

  2. . Click on vs2019.cmd.

  3. In VS2019 edit your CMakeSettings.json config file, add the following (for Release configuration):

    {
      "name": "x64-IntelEnv-Release",
      "description": "Start visual studio from Intel C++ compiler environment cmd window",
      "generator": "Ninja",
      "configurationType": "Release",
      "buildRoot": "${workspaceRoot}\\..\\cmake-build\\${name}",
      "installRoot": "${workspaceRoot}\\..\\cmake-install\\${name}",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": "",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "variables": [
        {
          "name": "CMAKE_CXX_COMPILER",
          "value": "icl.exe",
          "type": "FILEPATH"
        },
        {
          "name": "CMAKE_C_COMPILER",
          "value": "icl.exe",
          "type": "FILEPATH"
        }
      ]
    }
    
  4. Select "x64-IntelEnv-Release" in "Configurations" dropbox. Build.

(This is as far as I can go, never having done the above.)

harrymc
  • 498,455