View Issue Details

IDProjectCategoryView StatusLast Update
0028701Open CASCADEOCCT:Configurationpublic2019-10-02 17:53
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.2.0 
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 numberNot required

Relationships

parent of 0028769 closedbugmaster Open CASCADE Unification of msvc.bat files. 
parent of 0029852 closednenadus Community VS2017: install binaries to vc141 folder instead of vc14 
related to 0030938 closedbugmaster Open CASCADE Configuration, genproj - Support building with VS 2019 

Activities

git

2017-05-02 08:37

administrator   ~0065661

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".

Timo

2017-05-02 14:30

updater   ~0065676

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.

abv

2017-05-02 15:39

manager   ~0065680

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?

Timo

2017-05-02 16:37

updater   ~0065681

Yes, I am on OCCT 7.0.

git

2017-05-15 20:39

administrator   ~0066113

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

git

2017-05-15 21:09

administrator   ~0066114

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

kgv

2017-05-15 21:10

developer   ~0066115

Please test the patch, including project generation by genproj.

bugmaster

2017-05-17 14:33

administrator   ~0066199

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

git

2017-05-18 08:12

administrator   ~0066233

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

git

2017-05-18 08:47

administrator   ~0066234

Branch CR28701_1 has been updated forcibly by abv.

SHA-1: be55f0436f58448a9b7828be49c46e7a3eaf736b

git

2017-05-18 15:57

administrator   ~0066282

Branch CR28701_1 has been updated forcibly by abv.

SHA-1: aab01f275cdcc324dd19914bd145c49d304b6c72

abv

2017-05-18 15:57

manager   ~0066283

Corrections are pushed to CR28701_1, please check

git

2017-05-19 13:43

administrator   ~0066316

Branch CR28701_1 has been updated forcibly by inv.

SHA-1: fcc70f55a888515004988f0446e82b51cefed524

git

2017-05-23 17:14

administrator   ~0066487

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

git

2017-05-23 17:16

administrator   ~0066489

Branch CR28701_OCCT710 has been created by kgv.

SHA-1: 27c27aff93799a79851b2c60024418cc274e03b8


No new revisions were added by this update.

git

2017-05-23 17:16

administrator   ~0066490

Branch CR28701_710 has been deleted by kgv.

SHA-1: 27c27aff93799a79851b2c60024418cc274e03b8

git

2017-07-17 10:05

administrator   ~0068332

Branch CR28701 has been deleted by kgv.

SHA-1: 7a958f816a7ae1268ad8cbe1c59ad4114da75a6e

git

2017-07-17 10:05

administrator   ~0068333

Branch CR28701_1 has been deleted by kgv.

SHA-1: fcc70f55a888515004988f0446e82b51cefed524

git

2019-10-02 17:53

administrator   ~0087706

Branch CR28701_OCCT710 has been deleted by kgv.

SHA-1: 27c27aff93799a79851b2c60024418cc274e03b8

Related Changesets

occt: master d6cda17a

2017-05-02 05:36:49

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
Affected Issues
0028701
mod - adm/cmake/occt_macros.cmake Diff File
mod - adm/genconf.tcl Diff File
mod - adm/genconfdeps.tcl Diff File
mod - adm/genproj.tcl Diff File
mod - adm/templates/env.bat Diff File
mod - adm/templates/msvc.bat Diff File
add - adm/vcver.bat Diff File
mod - dox/dev_guides/building/msvc.md Diff File
mod - genconf.bat Diff File
mod - genproj.bat Diff File
mod - src/QANCollection/QANCollection_Stl.cxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_CmdParser.cxx 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
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
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
2017-08-18 13:11 bugmaster Test case number => Not required
2017-09-29 16:17 aiv Fixed in Version => 7.2.0
2017-09-29 16:29 aiv Status verified => closed
2018-07-17 08:02 kgv Relationship added related to 0029852
2018-07-17 08:02 kgv Relationship replaced parent of 0029852
2019-09-04 09:45 kgv Relationship added related to 0030938
2019-10-02 17:53 git Note Added: 0087706