Commit a5672379 authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: replace VTK_OVERRIDE with override, simplify CMakeLists

- using ENABLE_BY_DEFAULT=ON eliminates much of the declaration cruft
parent 67c941a2
#-----------------------------------------------------------------------------
# OpenFOAM blockMeshDict reader plugin for ParaView GUI (5.7+)
# An OpenFOAM reader plugin ("paraFoam") for ParaView GUI (5.7+)
cmake_minimum_required(VERSION 3.8)
find_package(ParaView REQUIRED)
......@@ -11,17 +11,14 @@ if (STAGED_INSTALL_PREFIX)
endif()
#-----------------------------------------------------------------------------
# Don't use CMAKE_INSTALL_LIBDIR here
# Do not use CMAKE_INSTALL_LIBDIR here
# OpenFOAM uses lib (not lib64, or lib/multi-arch)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
####
#----
set(PARAVIEW_PLUGIN_ENABLE_ParaFoamBlockReader TRUE)
set("_paraview_plugin_default_${CMAKE_PROJECT_NAME}" ON)
paraview_plugin_scan(
PLUGIN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/plugin/paraview.plugin"
PROVIDES_PLUGINS plugins
......@@ -39,8 +36,8 @@ endforeach()
# Install under <platform>/<arch>/lib, not lib64
# Don't want static libraries, include files...
paraview_plugin_build(
PLUGINS ${plugins}
AUTOLOAD ${plugins}
PLUGINS ${plugins}
AUTOLOAD ${plugins}
)
## RUNTIME_DESTINATION "${CMAKE_INSTALL_BINDIR}"
......
......@@ -63,8 +63,7 @@ message("OpenFOAM api = ${foam_api}, libs = ${foamPvLibQualifier}")
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
get_filename_component(FOAM_PLATFORMS ${FOAM_LIBBIN} DIRECTORY)
set(CMAKE_INSTALL_PREFIX "${FOAM_PLATFORMS}"
CACHE PATH "Install path prefix"
FORCE)
CACHE PATH "Install path prefix" FORCE)
set(SUPPORTING_LIBBIN "${FOAM_LIBBIN}")
else()
set(SUPPORTING_LIBBIN "${CMAKE_INSTALL_PREFIX}/lib")
......@@ -76,7 +75,7 @@ include(CMakeLists-library.txt)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt)
include(CMakeLists-Project.txt)
else()
message("================")
include(${PARAVIEW_USE_FILE})
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -65,7 +65,7 @@ class vtkPVblockMeshReader
{
public:
vtkTypeMacro(vtkPVblockMeshReader, vtkMultiBlockDataSetAlgorithm);
void PrintSelf(ostream&, vtkIndent) VTK_OVERRIDE;
void PrintSelf(ostream&, vtkIndent) override;
static vtkPVblockMeshReader* New();
......@@ -130,7 +130,7 @@ protected:
vtkInformation* unusedRequest,
vtkInformationVector** unusedInputVector,
vtkInformationVector* outputVector
) VTK_OVERRIDE;
) override;
//- Get the mesh for a particular time
virtual int RequestData
......@@ -138,10 +138,10 @@ protected:
vtkInformation* unusedRequest,
vtkInformationVector** unusedInputVector,
vtkInformationVector* outputVector
) VTK_OVERRIDE;
) override;
//- Fill in additional port information
virtual int FillOutputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
virtual int FillOutputPortInformation(int, vtkInformation*) override;
// The observer to modify this object when array selections are modified
vtkCallbackCommand* SelectionObserver;
......
#-----------------------------------------------------------------------------
# OpenFOAM reader plugin for ParaView GUI (5.7+)
# An OpenFOAM reader plugin ("paraFoam") for ParaView GUI (5.7+)
cmake_minimum_required(VERSION 3.8)
find_package(ParaView REQUIRED)
......@@ -11,18 +11,14 @@ if (STAGED_INSTALL_PREFIX)
endif()
#-----------------------------------------------------------------------------
# Don't use CMAKE_INSTALL_LIBDIR here
# Do not use CMAKE_INSTALL_LIBDIR here
# OpenFOAM uses lib (not lib64, or lib/multi-arch)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
####
#----
set(PARAVIEW_PLUGIN_ENABLE_ParaFoamReader TRUE)
set("_paraview_plugin_default_${CMAKE_PROJECT_NAME}" ON)
paraview_plugin_scan(
PLUGIN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/plugin/paraview.plugin"
PROVIDES_PLUGINS plugins
......@@ -40,12 +36,12 @@ endforeach()
# Install under <platform>/<arch>/lib, not lib64
# Don't want static libraries, include files...
paraview_plugin_build(
PLUGINS ${plugins}
AUTOLOAD ${plugins}
PLUGINS ${plugins}
AUTOLOAD ${plugins}
)
## RUNTIME_DESTINATION "${CMAKE_INSTALL_BINDIR}"
## LIBRARY_DESTINATION "${CMAKE_INSTALL_LIBDIR}"
## LIBRARY_SUBDIRECTORY "${PARAVIEW_PLUGIN_SUBDIR}"
## RUNTIME_DESTINATION "${CMAKE_INSTALL_BINDIR}"
## LIBRARY_DESTINATION "${CMAKE_INSTALL_LIBDIR}"
## LIBRARY_SUBDIRECTORY "${PARAVIEW_PLUGIN_SUBDIR}"
#-----------------------------------------------------------------------------
......@@ -68,7 +68,7 @@ include(CMakeLists-library.txt)
if (${ParaView_VERSION} VERSION_GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt)
include(CMakeLists-Project.txt)
else()
message("================")
include(${PARAVIEW_USE_FILE})
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -68,7 +68,7 @@ class vtkPVFoamReader
{
public:
vtkTypeMacro(vtkPVFoamReader, vtkMultiBlockDataSetAlgorithm);
void PrintSelf(ostream&, vtkIndent) VTK_OVERRIDE;
void PrintSelf(ostream&, vtkIndent) override;
static vtkPVFoamReader* New();
......@@ -203,7 +203,7 @@ protected:
vtkInformation*,
vtkInformationVector**,
vtkInformationVector*
) VTK_OVERRIDE;
) override;
//- Get the mesh/fields for a particular time
virtual int RequestData
......@@ -211,10 +211,10 @@ protected:
vtkInformation*,
vtkInformationVector**,
vtkInformationVector*
) VTK_OVERRIDE;
) override;
//- Fill in additional port information
virtual int FillOutputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
virtual int FillOutputPortInformation(int, vtkInformation*) override;
//- The observer to modify this object when array selections are modified
vtkCallbackCommand* SelectionObserver;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment