MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028701Open CASCADE[OCCT] OCCT:Configurationpublic2017-04-30 08:472017-07-17 10:07
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.2.0*Fixed in Version 
Summary0028701: Configuration - add support of VS 2017
DescriptionSince Visual Studio 2017 is now released, we need to support it for building OCCT.

There are two problems.

1. Deviating versions of Visual Studio and compiler

Previously, each new release of Visual Studio came with new version of VC++ compiler, and their versions matched each other. This is used by OCCT build system: the same id (VCVER, e.g. "vc10") is used to denote both. With VS 2017, this is not the case anymore: Visual Studio version is 15, but compuler version remains 14 (actuallt, 14.1).

There is one good point in that: compiler has the same major version as in VS 2015, and it uses the same run-time library, thus it is fully compatible with binaries built by VS 2015. This means that, we do not need to regenerate third-party libraries for use with VS 2017: the ones for 2015 can be reused.

However, we need to distinguish now version of Visual Studio (15) and compiler (14.1). It is logical to use id "vc15" for VS 2017, but binaries will be installed to sub-folder "vc14". This can be confusing and we need to think how to avoid this confusion.

2. Visual Studio does not define any more environment varuiable VS1xxCOMNTOOLS

That variable has been used by OCCT old build system (genproj etc.) to detect presence and location of Visual Studio. This is not working any more.

Now the recommended way is to use separate executable, vswhere.exe, which is open source (MIT license) and distributed through GitHub. Since VS 2017.2 it is promised to be installed in dedicated folder (see https://github.com/Microsoft/vswhere/wiki [^]) but until this happened, we would need to store vswhere.exe in OCCT Git...
Steps To ReproduceFix pushed to CR28701, please review
TagsNo tags attached.
Test case number
Attached Files

- Relationships
parent of 0028769verifiedbugmaster Unification of msvc.bat files. 

-  Notes
(0065661)
git (administrator)
2017-05-02 08:37

Branch CR28701 has been created by abv.

SHA-1: d1500f6aba43d59ed175e6c773b3f43fd7e52cb1


Detailed log of new commits:

Author: abv
Date: Tue May 2 08:36:49 2017 +0300

    0028701: Configuration - add support of VS 2017
    
    Added support of Visual Studio 2017 (15) in CMake build procedure.
    CMake 3.7.2 or above is required to generate projects for VS 2017.
    
    Since version of compiler and toolset remained at 14 (now they are 14.1), and they use the same run-time, the same third-party products as for VS 2015 (14) can be used.
    Also the name of the folder for installation of OCCT binaries in OCCT-standard layout (default on Windows) remains "vc14".
(0065676)
Timo (updater)
2017-05-02 14:30

Compiling with VS 2017 works with the patch.

Just the dversion Draw command says it is VC 13.1. So, this would have to be fixed.
(0065680)
abv (manager)
2017-05-02 15:39

Hello Timo, thank you for fast feedback!

In master the dversion command should report 14.1 correctly: this has been fixed by patch for 0028095, just before release of OCCT 7.1.0. I guess you are not on master and not even on OCCT 7.1, thus do not have that change. Can you please confirm that?
(0065681)
Timo (updater)
2017-05-02 16:37

Yes, I am on OCCT 7.0.
(0066113)
git (administrator)
2017-05-15 20:39

Branch CR28701 has been updated by abv.

SHA-1: 7a958f816a7ae1268ad8cbe1c59ad4114da75a6e


Detailed log of new commits:

Author: abv
Date: Mon May 15 18:18:39 2017 +0300

    0028701: Configuration - add support of VS 2017
    
    Support of Visual Studio 2017 is added in genproj generator and relevant environment, with format specifier "vc141".
    
    The syntax of the genproj command is revised:
    - UWP is considered as separate platform ("uwp" alternative to "wnt"), not part of IDE specification
    - Option "IDE" is renamed to "Format"
    - Obsolete name of local variable "aWokStation" is replaced by equivalent "theFormat"
    
    In environment scripts, additional variables are defined (derived from VCVER, see adm/vcver.bat):
    - VCLIB defines name of the subdirectory specific to VS version; it is the same as VCVER except that for VCVER=vc141 VCLIB=vc14 and for VCVER=141-uwp VCLIB=vc14-uwp
    - VCFMT is VCVER without optional suffix "-uwp"
    - VCPROP is "NativeDesktop" for normal builds or "Universal" for UWP builds
    
    Command genconf is amended to:
    - Detect presence of VS 2017 (separately for desktop and UWP)
    - Use only two first digits after "vc" in format specification for search of third-party libs
    - Have more space in user interface for VS specification
    
    Compiler warnings specific to VS 2017 are eliminated.
    
    All supported variants of VCVER variable are documented in dev guides / buiding / msvc

(0066114)
git (administrator)
2017-05-15 21:09

Branch CR28701_1 has been created by abv.

SHA-1: c951187c5a9a977f5618549a0f5104748b63e150


Detailed log of new commits:

Author: abv
Date: Tue May 2 08:36:49 2017 +0300

    0028701: Configuration - add support of VS 2017
    
    Added support of Visual Studio 2017 (15) in CMake build procedure.
    CMake 3.7.2 or above is required to generate projects for VS 2017.
    
    Since version of compiler and toolset remained at 14 (now they are 14.1), and they use the same run-time, the same third-party products as for VS 2015 (14) can be used.
    Also the name of the folder for installation of OCCT binaries in OCCT-standard layout (default on Windows) remains "vc14".
    
    Support of Visual Studio 2017 is added in genproj generator and relevant environment, with format specifier "vc141".
    
    The syntax of the genproj command is revised:
    - UWP is considered as separate platform ("uwp" alternative to "wnt"), not part of IDE specification
    - Option "IDE" is renamed to "Format"
    - Obsolete name of local variable "aWokStation" is replaced by equivalent "theFormat"
    
    In environment scripts, additional variables are defined (derived from VCVER, see adm/vcver.bat):
    - VCLIB defines name of the subdirectory specific to VS version; it is the same as VCVER except that for VCVER=vc141 VCLIB=vc14 and for VCVER=141-uwp VCLIB=vc14-uwp
    - VCFMT is VCVER without optional suffix "-uwp"
    - VCPROP is "NativeDesktop" for normal builds or "Universal" for UWP builds
    
    Command genconf is amended to:
    - Detect presence of VS 2017 (separately for desktop and UWP)
    - Use only two first digits after "vc" in format specification for search of third-party libs
    - Have more space in user interface for VS specification
    
    Compiler warnings specific to VS 2017 are eliminated.
    
    All supported variants of VCVER variable are documented in dev guides / buiding / msvc
(0066115)
kgv (developer)
2017-05-15 21:10

Please test the patch, including project generation by genproj.
(0066199)
bugmaster (administrator)
2017-05-17 14:33

Compilation by cmake:
http://jenkins-test-08.nnov.opencascade.com/view/CR28701_1_master/view/OCCT%20compile/ [^]

All are OK except one warning on Visual Studio:
http://jenkins-test-08.nnov.opencascade.com/view/CR28701_1_master/view/OCCT%20compile/job/CR28701_1_master-OCCT-Windows-32-VC14-opt-compile/2/warningsResult/ [^]

Compilation by genproj:

File vcver absent in the folder adm
(0066233)
git (administrator)
2017-05-18 08:12

Branch CR28701_1 has been updated by abv.

SHA-1: f8e827f8b6aa76316b0390ecc795a177d5d8facb


Detailed log of new commits:

Author: abv
Date: Thu May 18 08:12:07 2017 +0300

    // added missing file

(0066234)
git (administrator)
2017-05-18 08:47

Branch CR28701_1 has been updated forcibly by abv.

SHA-1: be55f0436f58448a9b7828be49c46e7a3eaf736b
(0066282)
git (administrator)
2017-05-18 15:57

Branch CR28701_1 has been updated forcibly by abv.

SHA-1: aab01f275cdcc324dd19914bd145c49d304b6c72
(0066283)
abv (manager)
2017-05-18 15:57

Corrections are pushed to CR28701_1, please check
(0066316)
git (administrator)
2017-05-19 13:43

Branch CR28701_1 has been updated forcibly by inv.

SHA-1: fcc70f55a888515004988f0446e82b51cefed524
(0066487)
git (administrator)
2017-05-23 17:14

Branch CR28701_710 has been created by kgv.

SHA-1: 27c27aff93799a79851b2c60024418cc274e03b8


Detailed log of new commits:

Author: abv
Date: Thu May 18 08:12:07 2017 +0300

    // added missing file, minor corrections

Author: abv
Date: Tue May 2 08:36:49 2017 +0300

    0028701: Configuration - add support of VS 2017
    
    Added support of Visual Studio 2017 (15) in CMake build procedure.
    CMake 3.7.2 or above is required to generate projects for VS 2017.
    
    Since version of compiler and toolset remained at 14 (now they are 14.1), and they use the same run-time, the same third-party products as for VS 2015 (14) can be used.
    Also the name of the folder for installation of OCCT binaries in OCCT-standard layout (default on Windows) remains "vc14".
    
    Support of Visual Studio 2017 is added in genproj generator and relevant environment, with format specifier "vc141".
    
    The syntax of the genproj command is revised:
    - UWP is considered as separate platform ("uwp" alternative to "wnt"), not part of IDE specification
    - Option "IDE" is renamed to "Format"
    - Obsolete name of local variable "aWokStation" is replaced by equivalent "theFormat"
    
    In environment scripts, additional variables are defined (derived from VCVER, see adm/vcver.bat):
    - VCLIB defines name of the subdirectory specific to VS version; it is the same as VCVER except that for VCVER=vc141 VCLIB=vc14 and for VCVER=141-uwp VCLIB=vc14-uwp
    - VCFMT is VCVER without optional suffix "-uwp"
    - VCPROP is "NativeDesktop" for normal builds or "Universal" for UWP builds
    
    Command genconf is amended to:
    - Detect presence of VS 2017 (separately for desktop and UWP)
    - Use only two first digits after "vc" in format specification for search of third-party libs
    - Have more space in user interface for VS specification
    
    Compiler warnings specific to VS 2017 are eliminated.
    
    All supported variants of VCVER variable are documented in dev guides / buiding / msvc
    
    # Conflicts:
    # adm/genproj.tcl
    # src/ViewerTest/ViewerTest.cxx
(0066489)
git (administrator)
2017-05-23 17:16

Branch CR28701_OCCT710 has been created by kgv.

SHA-1: 27c27aff93799a79851b2c60024418cc274e03b8


No new revisions were added by this update.
(0066490)
git (administrator)
2017-05-23 17:16

Branch CR28701_710 has been deleted by kgv.

SHA-1: 27c27aff93799a79851b2c60024418cc274e03b8
(0068332)
git (administrator)
2017-07-17 10:05

Branch CR28701 has been deleted by kgv.

SHA-1: 7a958f816a7ae1268ad8cbe1c59ad4114da75a6e
(0068333)
git (administrator)
2017-07-17 10:05

Branch CR28701_1 has been deleted by kgv.

SHA-1: fcc70f55a888515004988f0446e82b51cefed524

- Related Changesets
occt: master d6cda17a
Timestamp: 2017-05-02 05:36:49
Author: abv
Committer: bugmaster
Details ] Diff ]
0028701: Configuration - add support of VS 2017

Added support of Visual Studio 2017 (15) in CMake build procedure.
CMake 3.7.2 or above is required to generate projects for VS 2017.

Since version of compiler and toolset remained at 14 (now they are 14.1), and they use the same run-time, the same third-party products as for VS 2015 (14) can be used.
Also the name of the folder for installation of OCCT binaries in OCCT-standard layout (default on Windows) remains "vc14".

Support of Visual Studio 2017 is added in genproj generator and relevant environment, with format specifier "vc141".

The syntax of the genproj command is revised:
- UWP is considered as separate platform ("uwp" alternative to "wnt"), not part of IDE specification
- Option "IDE" is renamed to "Format"
- Obsolete name of local variable "aWokStation" is replaced by equivalent "theFormat"

In environment scripts, additional variables are defined (derived from VCVER, see adm/vcver.bat):
- VCLIB defines name of the subdirectory specific to VS version; it is the same as VCVER except that for VCVER=vc141 VCLIB=vc14 and for VCVER=141-uwp VCLIB=vc14-uwp
- VCFMT is VCVER without optional suffix "-uwp"
- VCPROP is "NativeDesktop" for normal builds or "Universal" for UWP builds

Command genconf is amended to:
- Detect presence of VS 2017 (separately for desktop and UWP)
- Use only two first digits after "vc" in format specification for search of third-party libs
- Have more space in user interface for VS specification

All supported variants of VCVER variable are documented in dev guides / buiding / msvc
mod - genproj.bat Diff ] File ]
mod - dox/dev_guides/building/msvc.md Diff ] File ]
add - adm/vcver.bat Diff ] File ]
mod - adm/templates/msvc.bat Diff ] File ]
mod - adm/genconfdeps.tcl Diff ] File ]
mod - adm/cmake/occt_macros.cmake Diff ] File ]
mod - src/ViewerTest/ViewerTest.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_CmdParser.cxx Diff ] File ]
mod - genconf.bat Diff ] File ]
mod - adm/genproj.tcl Diff ] File ]
mod - src/QANCollection/QANCollection_Stl.cxx Diff ] File ]
mod - adm/templates/env.bat Diff ] File ]
mod - adm/genconf.tcl Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-04-30 08:47 abv New Issue
2017-04-30 08:47 abv Assigned To => bugmaster
2017-05-01 22:17 abv Description Updated View Revisions
2017-05-02 08:37 git Note Added: 0065661
2017-05-02 14:30 Timo Note Added: 0065676
2017-05-02 15:39 abv Note Added: 0065680
2017-05-02 16:37 Timo Note Added: 0065681
2017-05-15 20:39 git Note Added: 0066113
2017-05-15 20:57 abv Assigned To bugmaster => kgv
2017-05-15 20:57 abv Status new => resolved
2017-05-15 20:57 abv Steps to Reproduce Updated View Revisions
2017-05-15 21:09 git Note Added: 0066114
2017-05-15 21:10 kgv Note Added: 0066115
2017-05-15 21:10 kgv Assigned To kgv => bugmaster
2017-05-15 21:10 kgv Status resolved => reviewed
2017-05-17 14:33 bugmaster Note Added: 0066199
2017-05-17 14:33 bugmaster Assigned To bugmaster => abv
2017-05-17 14:33 bugmaster Status reviewed => feedback
2017-05-18 08:12 git Note Added: 0066233
2017-05-18 08:47 git Note Added: 0066234
2017-05-18 15:57 git Note Added: 0066282
2017-05-18 15:57 abv Note Added: 0066283
2017-05-18 15:57 abv Assigned To abv => bugmaster
2017-05-18 15:57 abv Status feedback => reviewed
2017-05-19 13:43 git Note Added: 0066316
2017-05-22 15:28 bugmaster Relationship added parent of 0028769
2017-05-23 17:14 git Note Added: 0066487
2017-05-23 17:16 git Note Added: 0066489
2017-05-23 17:16 git Note Added: 0066490
2017-07-14 13:55 bugmaster Changeset attached => occt master d6cda17a
2017-07-14 13:55 bugmaster Status reviewed => verified
2017-07-14 13:55 bugmaster Resolution open => fixed
2017-07-17 10:05 git Note Added: 0068332
2017-07-17 10:05 git Note Added: 0068333


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker