From 05884492ef84667db3c74264f04c180f7e8de1de Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 16 Jun 2016 10:26:59 +0200 Subject: [PATCH] + do not pollute all projects with vtk options that don't use this library --- CMakeLists.txt | 2 +- src/3rdParty/salomesmesh/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d96337a96..e0f180b3c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -559,7 +559,7 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif() if(${VTK_MAJOR_VERSION} EQUAL 6) if(${VTK_MINOR_VERSION} LESS 2) - add_definitions(-DVTK_NO_QUAD_POLY ) + set(VTK_OPTIONS -DVTK_NO_QUAD_POLY) endif() if(${VTK_MINOR_VERSION} EQUAL 0) message(WARNING "VTK <6.0 cannot be used with c++11, FEM postprocessing is disabled") diff --git a/src/3rdParty/salomesmesh/CMakeLists.txt b/src/3rdParty/salomesmesh/CMakeLists.txt index b3f0f1ba61..3d9cdfa597 100644 --- a/src/3rdParty/salomesmesh/CMakeLists.txt +++ b/src/3rdParty/salomesmesh/CMakeLists.txt @@ -16,6 +16,10 @@ if(CMAKE_COMPILER_IS_CLANGXX) set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-self-assign -Wno-reorder -Wno-switch-enum -Wno-unknown-pragmas -Wno-logical-op-parentheses -Wno-unused-variable -Wno-unused-function -Wno-overloaded-virtual") endif() +if (VTK_OPTIONS) + add_definitions(${VTK_OPTIONS}) +endif() + include(${VTK_USE_FILE}) include_directories( src/SMDS