Commit 6e7de15c authored by Bob Obara's avatar Bob Obara
Browse files

Merge remote-tracking branch 'origin/master' into TabAndViewInfoChanges

parents c38fd9b5 5e2a9f57
......@@ -61,6 +61,12 @@ if(MOAB_FOUND)
include(MOABTargets.cmake)
endif()
#Certain version of moab define a scope variable called BUILD_SHARED_LIBS
#which hides the cache version of said variable. So we defend against
#this by unsetting the variable
unset(BUILD_SHARED_LIBS)
set_target_properties(MOAB PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${MOAB_INCLUDE_DIR}"
)
......
......@@ -18,10 +18,12 @@
find_path(REMUS_ROOT_DIR
NAMES include/remus/version.h
include/remus/Version.h
)
find_path(REMUS_INCLUDE_DIR
NAMES remus/version.h
remus/Version.h
HINTS ${REMUS_ROOT_DIR}/include/
)
......@@ -35,10 +37,6 @@ if(REMUS_FOUND)
#now we create the import targets to be used
include(${REMUS_ROOT_DIR}/lib/Remus-targets.cmake)
#find boost since it could be in a location that isn't part of our
#include paths
#cmb_find_boost()
#next find ZeroMQ since it could be in a location that isn't part of our
#include paths
find_package(ZeroMQ REQUIRED)
......@@ -46,6 +44,7 @@ if(REMUS_FOUND)
include_directories(SYSTEM
${Boost_INCLUDE_DIRS}
${ZeroMQ_INCLUDE_DIRS})
endif()
set(REMUS_INCLUDE_DIRS ${REMUS_INCLUDE_DIR})
......
#Setup the CMake module paths
list(APPEND CMAKE_MODULE_PATH "@SMTK_MODULE_DIR@")
set(smtk_module_dir "@SMTK_MODULE_DIR@/Modules")
list(APPEND CMAKE_MODULE_PATH "@SMTK_MODULE_DIR@;@SMTK_VTK_MODULE_DIR@")
set(smtk_module_dir "@SMTK_VTK_MODULE_DIR@/Modules")
if(IS_DIRECTORY "${smtk_module_dir}")
list(APPEND CMAKE_MODULE_PATH "${smtk_module_dir}")
file(GLOB config_files RELATIVE "${smtk_module_dir}" "${smtk_module_dir}/*.cmake")
......
......@@ -62,57 +62,46 @@ include(FindHashFunctor)
# Set the directory where the binaries will be stored
set(EXECUTABLE_OUTPUT_PATH
${PROJECT_BINARY_DIR}/bin
CACHE PATH
"Directory where all executable will be stored"
)
${PROJECT_BINARY_DIR}/bin)
# Set the directory where the libraries will be stored
set(LIBRARY_OUTPUT_PATH
${PROJECT_BINARY_DIR}/lib
CACHE PATH
"Directory where all the libraries will be stored"
)
${PROJECT_BINARY_DIR}/lib)
mark_as_advanced(
EXECUTABLE_OUTPUT_PATH
LIBRARY_OUTPUT_PATH
)
include(CMakeDependentOption)
################################################################################
# Options that the user controls
################################################################################
option(BUILD_SHARED_LIBS "Build SMTK using shared libraries" OFF)
option(BUILD_SHARED_LIBS "Build SMTK using shared libraries" ON)
option(SMTK_NO_SYSTEM_BOOST "Allow boost to search for system installed boost" ON)
# Option to build Qt ui compoments for attributes
option(SMTK_ENABLE_TESTING "Enable Testing" ON)
option(SMTK_ENABLE_PYTHON_WRAPPING "Build Python Wrappings using Shiboken" OFF)
if (SMTK_ENABLE_PYTHON_WRAPPING)
# Provide system packagers with the ability to install SMTK
# to the system's Python site package directory. The default
# is off so that people building relocatable bundles (such as
# CMB) can distribute their own Python interpreter with
# internal packages (e.g., as part of a Mac ".app" bundle).
option(
SMTK_INSTALL_PYTHON_TO_SITE_PACKAGES
"Install Python modules to the interpreter's site-packages directory or into CMAKE_INSTALL_PREFIX?"
OFF)
mark_as_advanced(SMTK_INSTALL_PYTHON_TO_SITE_PACKAGES)
endif()
# Provide system packagers with the ability to install SMTK
# to the system's Python site package directory. The default
# is off so that people building relocatable bundles (such as
# CMB) can distribute their own Python interpreter with
# internal packages (e.g., as part of a Mac ".app" bundle).
cmake_dependent_option(
SMTK_INSTALL_PYTHON_TO_SITE_PACKAGES
"Install Python modules to the interpreter's site-packages directory or into CMAKE_INSTALL_PREFIX?"
OFF
SMTK_ENABLE_PYTHON_WRAPPING OFF)
mark_as_advanced(SMTK_INSTALL_PYTHON_TO_SITE_PACKAGES)
option(SMTK_ENABLE_QT_SUPPORT "Build Qt GUI" OFF)
option(SMTK_ENABLE_VTK_SUPPORT "Build VTK component" OFF)
option(SMTK_ENABLE_REMUS_SUPPORT "Build Remus components" OFF)
option(SMTK_ENABLE_PARAVIEW_SUPPORT "Build paraview plugins for model sessions" OFF)
cmake_dependent_option(SMTK_ENABLE_PARAVIEW_SUPPORT "Build paraview plugins for model sessions" OFF
SMTK_ENABLE_VTK_SUPPORT OFF)
option(SMTK_ENABLE_CGM_SESSION "Build CGM component" OFF)
option(SMTK_ENABLE_DISCRETE_SESSION "Build discrete model session components" OFF)
option(SMTK_ENABLE_POLYGON_SESSION "Build Boost.polygon model session." ON)
if (SMTK_ENABLE_VTK_SUPPORT)
option(SMTK_ENABLE_EXODUS_SESSION "Build a session to Exodus-II side sets" ON)
endif()
if (SMTK_ENABLE_REMUS_SUPPORT)
option(SMTK_ENABLE_REMOTE_SESSION "Build a session that allows modeling in a remote process." ON)
endif()
cmake_dependent_option(SMTK_ENABLE_EXODUS_SESSION "Build a session to Exodus-II side sets" ON
SMTK_ENABLE_VTK_SUPPORT OFF)
cmake_dependent_option(SMTK_ENABLE_REMOTE_SESSION "Build a session that allows modeling in a remote process" ON
SMTK_ENABLE_REMUS_SUPPORT OFF)
option(SMTK_USE_SYSTEM_MOAB "Use the system-installed moab?" OFF)
option(SMTK_USE_SYSTEM_SPARSEHASH "Use the system-installed sparsehash?" OFF)
......@@ -470,7 +459,7 @@ install(
FILE SMTKTargets.cmake
)
export(PACKAGE SMTK)
export(EXPORT SMTK FILE "${PROJECT_BINARY_DIR}/SMTKTargets.cmake")
################################################################################
# Create a build directory package configuration file
......@@ -481,7 +470,8 @@ export(PACKAGE SMTK)
#
# Required to happen before we include the docs directory
set(MOAB_ROOT_DIR "${MOAB_ROOT_DIR}")
set(SMTK_MODULE_DIR "${SMTK_SOURCE_DIR}/CMake")
set(SMTK_VTK_MODULE_DIR "${CMAKE_BINARY_DIR}/lib/cmake/SMTK")
set(SMTK_MODULE_DIR "${PROJECT_SOURCE_DIR}/CMake")
set(SMTK_CONFIG_DIR "${PROJECT_BINARY_DIR}")
configure_file(
${PROJECT_SOURCE_DIR}/CMake/SMTKConfig.cmake.in
......@@ -494,6 +484,7 @@ configure_file(
# Setup the config file for exports that stores what other thirdparty
# packages we need to search for ( MOAB, Remus, etc ) for when using the
# install version of smtk
set(SMTK_VTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_CONFIG_DIR "\${CMAKE_CURRENT_LIST_DIR}")
configure_file(
......
......@@ -27,5 +27,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# if (SMTK_ENABLE_CGM_SESSION)
# target_link_libraries(add_a_session smtkCGMSession)
# endif (SMTK_ENABLE_CGM_SESSION)
# add_test(tut-add_a_session ${EXECUTABLE_OUTPUT_PATH}/add_a_session)
# add_test(NAME tut-add_a_session COMMAND add_a_session)
#endif()
......@@ -27,5 +27,5 @@ if (SMTK_ENABLE_TESTING)
if (SMTK_ENABLE_CGM_SESSION)
target_link_libraries(implement_an_operator smtkCGMSession)
endif (SMTK_ENABLE_CGM_SESSION)
add_test(tut-implement_an_operator ${EXECUTABLE_OUTPUT_PATH}/implement_an_operator)
add_test(NAME tut-implement_an_operator COMMAND implement_an_operator)
endif()
.. _smtk-contributing:
********************
Contributing to SMTK
********************
......@@ -5,6 +7,9 @@ Contributing to SMTK
.. role:: cxx(code)
:language: c++
.. role:: cmake(code)
:language: cmake
.. contents::
The first step to contributing to SMTK is to obtain the source code and build it.
......@@ -31,6 +36,7 @@ With that in mind:
* common — source for classes used throughout the smtkCore library
* attribute — source for :ref:`smtk-attribute-sys` in the smtkCore library
* model — source for :ref:`smtk-model-sys` in the smtkCore library
* mesh — source for :ref:`smtk-mesh-sys` in the smtkCore library
* simulation — aids to exporting simulation input decks in the smtkCore library
* io — file and string I/O in the smtkCore library, a mix of XML and JSON
* view — source for providing views of attributes and models in the smtkCore library
......@@ -66,9 +72,15 @@ Code style
Using SMTK from another project
===============================
.. todo::
SMTK generates a file named :file:`SMTKConfig.cmake` that allows other projects to find and use SMTK.
This file is installed to :file:`${CMAKE_INSTALL_PREFIX}/lib/cmake/SMTK/`.
Your project can add SMTK with
.. code:: cmake
find_package(SMTK)
SMTK does not currently export an SMTKConfig.cmake file like it should.
Then, when building your project, set CMake's :cmake:`SMTK_DIR` to the directory containing :file:`SMTKConfig.cmake`.
Extending SMTK
==============
......
......@@ -35,13 +35,20 @@ SMTK, clone the repository:
.. code:: sh
git clone git://public.kitware.com/SMTK.git
git clone https://gitlab.kitware.com/cmb/smtk.git
and follow the instructions in the :file:`ReadMe.mkd` file
in the top-level source directory.
The rest of this user's guide assumes you have built
and installed SMTK according to these instructions.
In addition to cloning anonymously as mentioned above,
you are also welcome to create an account on either
gitlab.kitware.com or github.com and fork the repository.
Forking the repository will allow you to submit contributions
back to SMTK for inclusion in later releases.
See :ref:`smtk-contributing` for more on how to
prepare and submit changes to SMTK.
.. toctree::
:maxdepth: 4
......
==
IO
============
==
:smtk:io:`WriteMesh <smtk::io::WriteMesh>`
:smtk:`WriteMesh <smtk::io::WriteMesh>`
Writes out a given :smtk:`Collection <smtk::mesh::Collection>`, or only
the elements that match a given Domain, Neumann, or Dirichlet property.
......@@ -10,7 +11,7 @@ IO
+ Exodus II (exo exoII exo2 g gen)
:smtk:io:`ImportMesh <smtk::io::ImportMesh>`
:smtk:`ImportMesh <smtk::io::ImportMesh>`
Load a given file in as a new :smtk:`Collection <smtk::mesh::Collection>` or
part of an existing :smtk:`Collection <smtk::mesh::Collection>`. Also
supports loading just elements that a given Domain, Neumann, or Dirichlet
......@@ -23,11 +24,11 @@ IO
Serialization
============
:smtk:io:`ExportJSON <smtk::io::ExportJSON>`
:smtk:`ExportJSON <smtk::io::ExportJSON>`
Export all the :smtk:`Collection <smtk::mesh::Collection>` that have
associations with the any model that is part of the passed in
:smtk:`Manager <smtk::model::Manager>`. The exporter will save each
Collection using :smtk:io:`WriteMesh <smtk::io::WriteMesh>` with the file
Collection using :smtk:`WriteMesh <smtk::io::WriteMesh>` with the file
type MOAB and extension h5m.
The format of the created json is:
......@@ -106,7 +107,7 @@ Serialization
}
:smtk:io:`ImportJSON <smtk::io::ImportJSON>`
:smtk:`ImportJSON <smtk::io::ImportJSON>`
Imports all the :smtk:`Collection <smtk::mesh::Collection>` that are listed
in the provided JSON string. Each Collection will be marked as being associated
with the provided model :smtk:`Manager <smtk::model::Manager>`.
......@@ -13,3 +13,4 @@ entity.
:maxdepth: 3
concepts.rst
IO.rst
......@@ -44,6 +44,8 @@ set(smtk_srcs
add_library(smtkCore ${smtk_srcs})
target_include_directories(smtkCore
PUBLIC
$<BUILD_INTERFACE:${SMTK_SOURCE_DIR}>
$<BUILD_INTERFACE:${SMTK_BINARY_DIR}>
$<INSTALL_INTERFACE:include/smtk/${SMTK_VERSION}>
)
target_link_libraries(smtkCore
......
......@@ -129,6 +129,7 @@ namespace smtk
class MeshPhrase;
class MeshListPhrase;
class Model;
typedef std::vector<Model> Models;
class Operator;
class PropertyValuePhrase;
class PropertyListPhrase;
......
add_executable(list-cgm-engines list-cgm-engines.cxx)
target_link_libraries(list-cgm-engines smtkCGMSession smtkCore)
add_test(list-cgm-engines ${EXECUTABLE_OUTPUT_PATH}/list-cgm-engines -test-set-default)
add_test(NAME list-cgm-engines COMMAND list-cgm-engines -test-set-default)
add_executable(test-operators test-operators.cxx)
target_link_libraries(test-operators smtkCGMSession smtkCore ${Boost_LIBRARIES})
add_test(test-operators ${EXECUTABLE_OUTPUT_PATH}/test-operators)
add_test(NAME test-operators COMMAND test-operators)
......@@ -38,6 +38,11 @@ set_source_files_properties(
set(${vtk-module}_NO_HeaderTest 1)
set(VTK_INSTALL_NO_HEADERS 1)
vtk_module_library(${vtk-module} ${srcs})
target_include_directories(${vtk-module}
PUBLIC
$<BUILD_INTERFACE:${SMTK_SOURCE_DIR}>
$<BUILD_INTERFACE:${SMTK_BINARY_DIR}>
$<INSTALL_INTERFACE:include/smtk/${SMTK_VERSION}>)
if(SMTK_ENABLE_REMUS_SUPPORT)
#Remus is needed
......
......@@ -63,6 +63,11 @@ set_source_files_properties(
set(${vtk-module}_NO_HeaderTest 1)
set(VTK_INSTALL_NO_HEADERS 1)
vtk_module_library(${vtk-module} ${srcs})
target_include_directories(${vtk-module}
PUBLIC
$<BUILD_INTERFACE:${SMTK_SOURCE_DIR}>
$<BUILD_INTERFACE:${SMTK_BINARY_DIR}>
$<INSTALL_INTERFACE:include/smtk/${SMTK_VERSION}>)
if(SMTK_ENABLE_REMUS_SUPPORT)
#Remus is needed
......
......@@ -235,6 +235,11 @@ set(_module_src
set(vtkSMTKDiscreteModel_NO_HeaderTest 1)
set(VTK_INSTALL_NO_HEADERS 1)
vtk_module_library(vtkSMTKDiscreteModel ${_module_src})
target_include_directories(${vtk-module}
PUBLIC
$<BUILD_INTERFACE:${SMTK_SOURCE_DIR}>
$<BUILD_INTERFACE:${SMTK_BINARY_DIR}>
$<INSTALL_INTERFACE:include/smtk/${SMTK_VERSION}>)
target_link_libraries(vtkSMTKDiscreteModel LINK_PRIVATE ${UUID_LIBS})
......
......@@ -16,7 +16,7 @@
#ifndef __smtkdiscrete_DISCRETEMESH_H
#define __smtkdiscrete_DISCRETEMESH_H
#include "vtkSMTKDiscreteModelModule.h" // For export macro
#include "smtk/bridge/discrete/kernel/vtkSMTKDiscreteModelModule.h" // For export macro
#include "DiscreteMeshCellIdIterator.h" //needed for iterator
#include "vtkType.h" //needed for vtkIdType
......
......@@ -20,7 +20,7 @@
#ifndef __smtkdiscrete_vtkDiscreteModel_h
#define __smtkdiscrete_vtkDiscreteModel_h
#include "vtkSMTKDiscreteModelModule.h" // For export macro
#include "smtk/bridge/discrete/kernel/vtkSMTKDiscreteModelModule.h" // For export macro
#include "Model/vtkModel.h"
......
......@@ -14,7 +14,7 @@
#ifndef __smtkdiscrete_vtkDiscreteModelEdge_h
#define __smtkdiscrete_vtkDiscreteModelEdge_h
#include "vtkSMTKDiscreteModelModule.h" // For export macro
#include "smtk/bridge/discrete/kernel/vtkSMTKDiscreteModelModule.h" // For export macro
#include "Model/vtkModelEdge.h"
#include "vtkDiscreteModelGeometricEntity.h"
......
......@@ -14,7 +14,7 @@
#ifndef __smtkdiscrete_vtkDiscreteModelEntity_h
#define __smtkdiscrete_vtkDiscreteModelEntity_h
#include "vtkSMTKDiscreteModelModule.h" // For export macro
#include "smtk/bridge/discrete/kernel/vtkSMTKDiscreteModelModule.h" // For export macro
#include "vtkObject.h"
......
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