DiscussionsIssue archiveOCCT:Configuration

Archived issue #0027209

CMake - warnings on configuration step for VTK when using vc14 target

Open CASCADEOCCT:Configurationclosed16 public notes

Search issues

Description

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.

Steps to reproduce

Try to configure occt with vc14 via CMake

Public activity

16 archived notes

Participants are labeled by their role within this record.

01Commenter 1
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 https://blog.kitware.com/vtk-6-3-0)
02Commenter 2
As agreed, please check building OCCT with VTK 6.3
03Commenter 1
Branch [archived branch] has been created by Participant.

[revision removed]


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.
04Commenter 4
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).
05Commenter 1
Branch [archived branch] has been created by Participant.

[revision removed]


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.
06Commenter 6
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
07Commenter 7
please review.
08Commenter 8
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.
09Commenter 9
Please consult with SALOME team on correct way to use VTK settings in CMake projects
10Commenter 10
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!
11Commenter 1
Branch [archived branch] has been created by Author.

[revision removed]


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.
12Commenter 1
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
13Commenter 13
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).
14Commenter 1
Branch [archived branch] has been deleted by Participant.

[revision removed]
15Commenter 1
Branch [archived branch] has been deleted by Participant.

[revision removed]
16Commenter 1
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records