MantisBT - VTK
View Issue Details
0011094VTK(No Category)public2010-08-04 11:522016-08-12 09:55
lesmana 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0011094: LocalUserOptions.cmake included twice if doing in-source build
using vtk-5.6.0.tar.gz

CMakeLists.txt line 1078 and 1079
INCLUDE(${VTK_BINARY_DIR}/LocalUserOptions.cmake OPTIONAL)
INCLUDE(${VTK_SOURCE_DIR}/LocalUserOptions.cmake OPTIONAL)

if doing out-of-source build this will work fine. but if doing in-source builds it will include LocalUserOptions.cmake twice.

workaround: use include guard in LocalUserOptions.cmake

if(NOT LOCALUSEROPTIONS_INCLUDED)
  set(LOCALUSEROPTIONS_INCLUDED TRUE)
  #content
  ...
endif(NOT LOCALUSEROPTIONS_INCLUDED)

fix suggestion: if binary dir and source dir are identical include only once

if(${VTK_BINARY_DIR} STREQUAL ${VTK_SOURCE_DIR})
INCLUDE(${VTK_BINARY_DIR}/LocalUserOptions.cmake OPTIONAL)
else(${VTK_BINARY_DIR} STREQUAL ${VTK_SOURCE_DIR})
INCLUDE(${VTK_BINARY_DIR}/LocalUserOptions.cmake OPTIONAL)
INCLUDE(${VTK_SOURCE_DIR}/LocalUserOptions.cmake OPTIONAL)
endif(${VTK_BINARY_DIR} STREQUAL ${VTK_SOURCE_DIR})
No tags attached.
Issue History
2010-08-04 11:52lesmanaNew Issue
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:55Kitware RobotNote Added: 0037189
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved
2016-08-12 09:55Kitware RobotAssigned To => Kitware Robot

Notes
(0037189)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.