Tips on using the Intel® C++ Compiler with Microsoft* Visual Studio Team Foundation Server*, Visual SourceSafe* or Perforce*

Table of Content

This article may apply to other Source Code Control software as well.

The Intel® C++ Compiler for Windows is integrated into Microsoft* Visual Studio* through the Visual Studio Industry Partner (VSIP) interfaces. If the Source Code Control software you are using is integrated into and works with Visual Studio, it should work with the Intel C++ Compiler within Visual Studio as well.

Within Visual Studio when a file is being modified, you maybe asked to check out it from your Source Code Control software depending on your setting in the Tools->Option dialog. Same applies when the .sln file is being modified. In order to use the Intel C++ Compiler for a project, you need to select “Use Intel C++” from Project menu. This action will cause the .sln file to be modified so you maybe asked to check-out the .sln file. A new .icproj file to be created for each project that uses Intel C++ Compiler. If you’d like to set the project back to Visual C++, you need to select “Use Visual C++” from Project menu. The .sln will be updated again.

The Intel C++ Compiler Integration saves the specific options for a project into a file with the same name as your project name, but with extension .icproj for every project that uses Intel C++ compiler to build. So you should add this .icproj file to your SCC database manually.

When using the Visual Studio Team Foundation Server or Visual SourceSafe it adds another file with the same name as your project name but with extension .icproj.vspscc. So this file should be added to your Team Foundation Server database manually as well.

The following explains the steps you will need to take when using Intel C++ Compiler with Visual Studio Team Foundation Server or Visual SourceSafe. The scenarios assume that the solution is under Source Code Control.

Using the Intel® C++ Compiler with Visual Studio Team Foundation Server*

When setting a project to use Intel® C++ compiler

Within Visual Studio IDE when you set the project or solution to use Intel C++ compiler, besides the .sln file will be checked out and modified, a .icproj file and a .icproj.vspscc file will be created for each project that is changed to use Intel C++ compiler.

The following steps show you how to add those additional files to the Team Foundation Server.

  1. Open Visual Studio with Team Foundation Server client
  2. Open Team Explorer window from “View->Team Explorer
  3. In the Team Explorer window, select your server, expand your project, choose “Source Control” and press [Enter] to open the Source Control Explorer dialog
  4. TFS_TeamExplorer.jpg

  5. In the Source Control Explorer, choose your solution and project (for example, “TFSandICPPex” in the dialog box shown below)
  6. TFS_SourceControlExplorer.jpg

     

  7. Click [Add files] on the Tool Box or use File -> Source Control -> Add to Source Control…
  8. TFS_Add.jpg

  9. In the Add to Source Control dialog, click [Add Files…] button, and add files with the same name as your project name but with extensions .icproj and .icproj.vspscc (located in the same folder where your .vcproj file is saved). Press [OK] to add the files.
  10. Now you can work with your solution as usual.

When setting a project to use Visual C++* compiler

Within Visual Studio IDE when you set the project or solution back to use Visual C++ Compiler, the .sln file will be checked out and modified, please follow the steps below to removed the additional files (a .icproj file and a .icproj.vspscc file for each project) from the Team Foundation Server.

  1. Follow steps 1) through 4) above.
  2. Select files with the same name as your project name, but with extensions .icproj and .icproj.vspscc; then click [Delete] button to delete these files from the database.
  3. You can now work with your solution as usual.

Using the Intel® C++ Compiler with Visual SourceSafe*

When your SCC is Visual SourceSafe, when you set a project to use Intel C++ Compiler or Visual C++ Compiler, please follow the steps below to add or remove additional files.

When setting a project to use Intel® C++ compiler

Within Visual Studio IDE when you set the project or solution to use Intel C++ Compiler, besides the .sln file will be checked out and modified, a .icproj file and .icproj.vspscc file will be created for each project that is changed to use Intel C++ Compiler. Please follow the steps below to make sure those additional .icproj and .icproj.vspscc files are added to the Visual SourceSafe.

  1. When you select “Use Intel C++” from the pop-up menu or Project menu, you’ll get a dialog “Source Control” and select [OK].

    SCC_msg.jpg

  2. Then you’ll see another dialog “Source Control – Unable to Access Database, select “Temporarily work uncontrolled and click [OK].

    VSS_Control.jpg

  3. Now open Visual SourceSafe Explorer from File -> Source Control -> Launch Microsoft Visual SourceSafe and select your project (for example, “TFSandICPPex” in the dialog box shown below)

    VSS_Explorer.jpg

  4. Select File -> Add Files…. to add the file with the same name as your project name but with extension .icproj (located in your project folder).

    Note: If this is your second update (that is, your project was updated to use Intel® C++ compiler, then updated againto use Visual C++ compiler, and then updated to Intel C++ compiler again), the following message box may display:

    VSS_AlreadyExist_icproj.jpg

    It is recommended that you choose No. If you choose No, the deleted file will not be recovered. The newly created file will be added to database.

  5. In Visual Studio, save and close your solution.
  6. Make changes in the file MSSCCPRJ.SCC:
    1. Open the file MSSCCPRJ.SCC with Notepad located in this project folder (Note: you may find the same file in other folders, but be sure to open the one from the project folder that just got upgraded to use Intel® C++ Compiler). The contents of the file “MSSCCPRJ.SCC” looks like following:
      SCC = This is a Source Code Control file

      [VSSandICPPex.vcproj]
      SCC_Aux_Path = "C:\user\VSS_DB"
      SCC_Project_Name = "$/VSSandICPPex.root/VSSandICPPex/VSSandICPPex", NDAAAAAA

    2.  

    3. In Notepad, add following lines in red color: (note: the only difference is the “.icproj” in the new section.)
      SCC = This is a Source Code Control file

      [VSSandICPPex.vcproj]
      SCC_Aux_Path = "C:\user\VSS_DB"
      SCC_Project_Name = "$/VSSandICPPex.root/VSSandICPPex/VSSandICPPex", NDAAAAAA

      [VSSandICPPex.icproj]
      SCC_Aux_Path = "C:\user\VSS_DB"
      SCC_Project_Name = "$/VSSandICPPex.root/VSSandICPPex/VSSandICPPex", NDAAAAAA

    4. In Notepad, “Save and Close” the file
    5.  

  7.  

  8. In Visual Studio, open your solution again.
  9. Open Visual SourceSafe Explorer and choose your project
  10. Choose File -> Add Files… and add afile with extension .icproj.vspscc and the same name as your project name,located in your project folder.

    Note: If this is your second update(that is, your project was updated to use Intel C++ compiler, then updated againto use Visual C++ compiler, and then updated to Intel C++ compiler again), the following message box may display:

    VSS_AlreadyExist_vspscc.jpg

    Select [No]to add the newly created file.

  11. You can now work with your solution as usual.
  12.  

When setting a project to use Visual C++ compiler

In Visual Studio after you select “Use Visual C++” from the project pop-up menu or Project menu, please follow the steps below to remove the .icproj file and the .icproj.vspscc from Visual SourceSafe.

  1. In Visual Studio, open Visual SourceSafe Explorer and choose your project
  2. Select files with the same name as your project name and extensions .icproj and .icproj.vspscc and delete these files from the database using the [Delete] button.
  3. Close your solution.
  4. Modify the file “MSSCCPRJ.SCC” with Notepad:
    1. Open the file “MSSCCPRJ.SCC” which is located in your project folder
      (Note: you may find the same file in other folders, but be sure to open the one from the project folder that just got upgraded to use Visual C++ compiler). The contents of the file should look similar to the following:
      SCC = This is a Source Code Control file

      [VSSandICPPex.vcproj]
      SCC_Aux_Path = "C:\user\VSS_DB"
      SCC_Project_Name = "$/VSSandICPPex.root/VSSandICPPex/VSSandICPPex", BEAAAAAA

    2. [VSSandICPPex.icproj]
      SCC_Aux_Path = "C:\user\VSS_DB"
      SCC_Project_Name = "$/VSSandICPPex.root/VSSandICPPex/VSSandICPPex", BEAAAAAA

    3. In the opened file, delete the lines similar to lines above, beginning from [your_project_name.icproj] string. Your results should look similar to the following:
      SCC = This is a Source Code Control file

      [VSSandICPPex.vcproj]
      SCC_Aux_Path = "C:\user\VSS_DB"
      SCC_Project_Name = "$/VSSandICPPex.root/ VSSandICPPex/VSSandICPPex", BEAAAAAA

    4. Save and Close the file with Notepad.

     

  5. Open your solution again and you can now work with your solution as usual.

 

Using the Intel® C++ Compiler with Perforce*

When your SCC is Perforce, when you set a project to use Intel C++ Compiler, please follow the steps below to add additional binding information.

When setting a project to use Intel® C++ compiler

Within Visual Studio IDE when you set the project or solution to use Intel C++ Compiler, besides the .sln file will be checked out and modified, an .icproj file and .icproj.vspscc files will be created for each project that is changed to use Intel C++ Compiler. Please follow the steps below to make sure this additional .icproj file are bound to the Perforce.

  1. When you select "Use Intel C++" from the pop-up menu or Project menu, you'll get a dialog "Source Control" and select [OK].

    PF_SourceControl.JPG

  2. Then you’ll see another dialog “Source Control – Unable to Access Database”, select “Temporarily work uncontrolled” and click [OK].

    PF_AccessDlg.JPG

  3. Now click File -> Source Control -> Change Source Control… and select all updated projects that are not connected (not under Source Control) (for example, “dif_dir” and “sing_dir” in the dialog boxes shown below).

    PF_ChangeSourceControl.JPG

    PF_ChangeSourceControl-2.JPG

  4. Click [Bind] button and than [OK] (don't worry about the invalid status).
  5. In the appeared Source Control dialog box click [Continue with these bindings], as shown below.

    PF_ContinueWith.JPG

  6. If Check out for Edit dialog box appears, please check out required files.
  7. In the appeared Source Control message box click [OK].

    PF_SourceControlBind.JPG

  8. In the next Source Control dialog box choose "Protect these files against unwanted overwrites" and click [OK].

    PF_OverWrite.JPG

Now you can check in your solution and work with it as usual.

For more complete information about compiler optimizations, see our Optimization Notice.