MantisBT - Open CASCADE
View Issue Details
0027209Open CASCADE[OCCT] OCCT:Configurationpublic2016-02-28 14:302016-04-20 15:49
[OCCT] 7.0.0[OCCT] 7.0.0 
0027209: CMake - warnings on configuration step for VTK when using vc14 target
When I build OCCT (current master) with CMake for vc14-64, and select to use VTK (I have VTK-6.1 downloaded from OCC web site), CMake reports this warning:

CMake Warning (dev) at adm/cmake/vtk.cmake:98 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property. Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target "vtkIOEnSight".
Call Stack (most recent call first):
  CMakeLists.txt:12 (include)
  CMakeLists.txt:315 (OCCT_INCLUDE_CMAKE_FILE)
This warning is for project developers. Use -Wno-dev to suppress it.
Try to configure occt with vc14 via CMake
No tags attached.
child of 0027040closed abv IVtk does not compile after configuring with CMake 
Issue History
2016-02-28 14:30abvNew Issue
2016-02-28 14:30abvAssigned To => bugmaster
2016-02-28 14:31abvTarget Version7.1.0 => 7.0.0
2016-03-02 13:01abvAssigned Tobugmaster => ski
2016-03-02 13:01abvStatusnew => assigned
2016-03-04 15:32skiNote Added: 0051407
2016-03-04 15:33skiAssigned Toski => abv
2016-03-04 15:33skiStatusassigned => feedback
2016-03-04 15:52abvAssigned Toabv => ski
2016-03-04 15:52abvNote Added: 0051409
2016-03-09 15:28gitNote Added: 0051469
2016-03-12 18:54abvRelationship addedchild of 0027040
2016-03-12 19:06abvNote Added: 0051570
2016-03-12 19:07abvStatusfeedback => assigned
2016-03-25 15:04gitNote Added: 0052011
2016-03-25 15:04skiNote Added: 0052012
2016-03-25 15:05skiNote Added: 0052013
2016-03-25 15:05skiAssigned Toski => abv
2016-03-25 15:05skiStatusassigned => resolved
2016-03-25 15:05skiSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13304#r13304
2016-03-25 20:13abvNote Added: 0052042
2016-03-28 15:49abvNote Added: 0052080
2016-03-28 17:41abvNote Added: 0052082
2016-03-28 17:41abvAssigned Toabv => ibs
2016-03-28 17:41abvStatusresolved => assigned
2016-03-30 07:47gitNote Added: 0052145
2016-03-30 09:49gitNote Added: 0052148
2016-03-30 10:01abvNote Added: 0052153
2016-03-30 10:01abvAssigned Toibs => bugmaster
2016-03-30 10:01abvStatusassigned => resolved
2016-03-30 10:01abvStatusresolved => reviewed
2016-04-06 10:33abvChangeset attached => occt master 16b40363
2016-04-06 10:33abvAssigned Tobugmaster => abv
2016-04-06 10:33abvStatusreviewed => verified
2016-04-06 10:33abvResolutionopen => fixed
2016-04-17 13:07gitNote Added: 0052813
2016-04-17 13:07gitNote Added: 0052814
2016-04-17 13:07gitNote Added: 0052815
2016-04-20 15:43aivFixed in Version => 7.0.0
2016-04-20 15:49aivStatusverified => closed

2016-03-04 15:32   
I tried to build VTK-6.1-vc14-win64 on my local station (Win7) and got a lot of compile errors.
VTK-6.1-vc10 was successfully configured and built.
All obtained errors are reported in VTK bug tracker.
And it seems that VTK-6.1 does not correctly support vc-14.
From VTK-6.3 supporting of vc-14 was added:
"In terms of compatibility, VTK 6.3 now has support for MSVC 2013 and 2015." (see [^])
2016-03-04 15:52   
As agreed, please check building OCCT with VTK 6.3
2016-03-09 15:28   
Branch CR27209 has been created by ski.

SHA-1: 5f2f80a83d423804218664b26b10900249fa65e7

Detailed log of new commits:

Author: ski
Date: Wed Mar 9 15:16:36 2016 +0300

    0027209: CMake - warnings on configuration step for VTK when using vc14 target
    Eliminated redundant dependence of OCCT with VTK-6.3.
2016-03-12 19:06   
The CMake warning is caused by incorrect fix previously made for 0027040: that fix does not work when using VTK 6.1 with vc14 (cannot find CMake variable). The consequence is that problem described in 0027040 appears again (for vc14).
2016-03-25 15:04   
Branch CR27209_1 has been created by ski.

SHA-1: e9dcccf095b2ab06eb68aa12d4403042facfd6b4

Detailed log of new commits:

Author: ski
Date: Fri Mar 25 15:03:55 2016 +0300

    0027209: CMake - warnings on configuration step for VTK when using vc14 target
    Added check for existence of VTK library target.
2016-03-25 15:04   
Dear abv,

It seems that it is the problem of VTK/CMake.

Command find_package(VTK QUIET) (see adm/cmake/vtk.cmake (line 59)) created VTK_LIBRARIES variable which contains non-existing library name "vtkIOEnSight".
In CMake GUI building of module vtkIOEnSight is OFF.

The easiest way to escape with situation is to check existing of TARGET for current VTK_LIBRARY name. Corresponding changes were done in OCCT branch CRCR27209_1
2016-03-25 15:05   
please review.
2016-03-25 20:13   
I wonder: cannot we just use libpath variables defined by vtk, and rely on EXTERNLIB for list of libs. Besides, note that Vtk and Cmake are made by the same company, thus it is extremely unlikely that Vtk build is incorrect, rather we can misuse it.
2016-03-28 15:49   
Please consult with SALOME team on correct way to use VTK settings in CMake projects
2016-03-28 17:41   
Ok, warning has gone. Still I cannot build OCCT using CMake with VS 2015 when VTK is used but D3D is not (subject of 0027040). Please fix!
2016-03-30 07:47   
Branch CR27209_2 has been created by abv.

SHA-1: 8f87db161697bff436c5ba9020fb3d7afc15ce28

Detailed log of new commits:

Author: ski
Date: Fri Mar 25 15:03:55 2016 +0300

    0027209: CMake - warnings on configuration step for VTK when using vc14 target
    Added check for existence of VTK library target.
    Removal of hard-coded path to D3D9 library is amended for VTK 6.1 built with VC12 and VC14.
2016-03-30 09:49   
Branch CR27209_2 has been updated forcibly by abv.

SHA-1: d44cf55ae4c7c16dc749807690ba3a81e9f8daa9
2016-03-30 10:01   
Build with vc12-14 is fixed by replicating the fix made previously for 0027040 for another CMAKE variable used by VTK 6.1 configuration in these builds. Note that use of hard-coded path to D3D seems to be permanent problem of VTK builds (and is also present in VTK configuration used by SALOME).

Please integrate branch CR27209_2 (tested with vc10, vc12, vc14).
2016-04-17 13:07   
Branch CR27209 has been deleted by kgv.

SHA-1: 5f2f80a83d423804218664b26b10900249fa65e7
2016-04-17 13:07   
Branch CR27209_1 has been deleted by kgv.

SHA-1: e9dcccf095b2ab06eb68aa12d4403042facfd6b4
2016-04-17 13:07   
Branch CR27209_2 has been deleted by kgv.

SHA-1: d44cf55ae4c7c16dc749807690ba3a81e9f8daa9