Skip to content

Commit

Permalink
Merge pull request #10 from laristra/release
Browse files Browse the repository at this point in the history
Release 1.0.1
  • Loading branch information
raovgarimella authored Aug 6, 2020
2 parents 33619c3 + da28c10 commit 02a8b18
Show file tree
Hide file tree
Showing 91 changed files with 4,574 additions and 1,800 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,30 @@
*.exe
*.out
*.app

# Images
*.png

# Meshes
*.gmv
*.exo

# vfgen input
*.inp

# Binary data
*.bvf
*.dat

.DS_Store
build
build-Debug
build-Release
install
install-Debug
install-Release
.vscode

# Editor backup files
*~
.idea
9 changes: 3 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "cinch"]
path = cinch
url = ../../laristra/cinch.git
[submodule "wonton"]
path = wonton
url = ../../laristra/wonton.git
[submodule "googletest"]
path = googletest
url = ../../google/googletest
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ sudo: required
services:
- docker

python:
- "3.6"
dist: xenial

env:
global:
# Doctr deploy key for laristra/tangram
- secure: "VT6e1jEwGNu+71UYqtj12+dK4L/IBtoKdVgZ6NGb12QFgVzaB8x6sl8PTfS4xMa+Gav9z4x3qYBRHbhlU42TpKr/llFdFQHzTCVMk7Y8PVfF6vCmrqJWamcC6bVWnNEbJm4sdG/HK3XM8jKZdKRJVnUUskGcKiFzOMgl+GJaBTfHWr9XZhPW18k7rRWEeBevEsKPWGhD15ugno5kZYFkb4A1iV1nSap+VO3hSuQ3DqMzKYGyBBzBfSTdgWvqff6dFKgCA4Xr4AeMLppcG4cUyPyeSucF6Wq3PaOhHOksm15yA5a6LLcRD+Byabq4HU5qAYc0auMh3Csc1wqpu/fnCKKVKv9ZBB7EaWQYysa7RhFInYLSFS3RstVShENw2RtezIKNnIW+TaNlpYGMOGfbTngJnpjY54QNc6Gd22N/L4QKCpc+FwQHHukWAcf4fu/YqRhHWfoUaOOAMzedeChGWbxN+GnPy2QxxIKVUyxpS3+AwGv3cDD5vf9j47C7zPrw8L1FxNuFjYAioPAS+RxpYQGnqU+kCSvVtDmXBXPhA/2BZLqxrW1h1tnDx+kgVu2DXC5glv1PPdpUqg2cR9vdn8pmiKqSnED6AxGVwWmtwwKsrlQZGuLTpYSuCggcgqhbQSoZu3L1xSZj5LyFXvnZoGIGW7GzsjCSmKa0Ekkgmb0="
matrix:
- MPI=OFF DOCS=true
- MPI=ON DOCKERHUB=true
Expand All @@ -33,6 +29,9 @@ script:
--build-arg DOCS=${DOCS}
-t ${TRAVIS_REPO_SLUG}:latest ${HOME}/docker/

before_install:
- openssl aes-256-cbc -K $encrypted_79204e1bdcac_key -iv $encrypted_79204e1bdcac_iv -in github_deploy_key_laristra_tangram.enc -out github_deploy_key_laristra_tangram -d

after_success:
- if [[ ${DOCKERHUB} = true && ${DOCKER_USERNAME} && ${DOCKER_PASSWORD} && ${TRAVIS_PULL_REQUEST} == false && ${TRAVIS_BRANCH} == master ]]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
Expand All @@ -41,7 +40,14 @@ after_success:
- if [[ ${DOCS} || -n ${TRAVIS_TAG} ]]; then
cd ${HOME}/docker/tangram;
CON=$(docker run -d ${TRAVIS_REPO_SLUG}:latest) && docker cp ${CON}:/home/portage/tangram/build/doc . ;
pyenv local 3.6;
pip install doctr;
doctr deploy . --built-docs doc/doxygen/html;
fi

deploy:
provider: pages:git
edge: true # opt into version 2 of the dpl
deploy_key: github_deploy_key_laristra_tangram
local_dir: doc/doxygen/html
verbose: true
on:
tags: true # only deploy on tagged builds
condition: ${DOCS} && -d doc/doxygen/html
228 changes: 202 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,212 @@
https://github.com/laristra/tangram/blob/master/LICENSE
]]

################################################################################
# Please Do Not Edit This File Unless You Know What You Are Doing.
#
# Project-specific configuration rules should be added in the 'config'
# subdirectory of the top-level of this project in the appropriate file,
# e.g., package configuration options should go in 'config/packages.cmake'.
#
# For more documentation on the design philosophy of this build system
# and the recognized configuration files that can be added to the 'config'
# subdirectory, please look in 'cinch/README.md' and 'cinch/INSTALL.md'
# from the top-level of this project.
#
# Any changes to the basic build template should be discussed with the
# project maintainers.
################################################################################
cmake_minimum_required(VERSION 3.13)

#------------------------------------------------------------------------------#
# Require some version of cmake
#------------------------------------------------------------------------------#
project(tangram CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if (CMAKE_VERSION_MAJOR GREATER_EQUAL 3.13)
CMAKE_POLICY(SET CMP0079 NEW) # allow target_link_libraries to reference
# targets from other directories
endif()

cmake_policy(SET CMP0074 NEW) # Don't ignore Pkg_ROOT variables



# SEMANTIC VERSION NUMBERS - UPDATE DILIGENTLY
# As soon as a change with a new version number is merged into the master,
# tag the central repository.

set(TANGRAM_VERSION_MAJOR 1)
set(TANGRAM_VERSION_MINOR 0)
set(TANGRAM_VERSION_PATCH 1)


# Top level target
add_library(tangram INTERFACE)

# Alias (Daniel Pfeiffer, Effective CMake) - this allows other
# projects that use Pkg as a subproject to find_package(Nmspc::Pkg)
# which does nothing because Pkg is already part of the project

add_library(tangram::tangram ALIAS tangram)
set(TANGRAM_LIBRARIES tangram::tangram)

# Find our modules first
if (CMAKE_VERSION GREATER_EQUAL 3.15)
list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
else ()
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
endif ()


#----------------------------------------------------------------------------
# Find packages here and set CMake variables. Set link dependencies
# and compile definitions for tangram_support target in
# tangram/support. Since the top level tangram::tangram target depends
# on tangram_support, the transitive dependencies will be picked up by
# projects linking to Tangram
#----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Find Wonton
#-----------------------------------------------------------------------------

# Link with an existing installation of Wonton, if provided.
find_package(WONTON QUIET REQUIRED NAMES wonton)

target_include_directories(tangram INTERFACE ${WONTON_INCLUDE_DIR})
message(STATUS "WONTON_INCLUDE_DIR=${WONTON_INCLUDE_DIR}")

target_link_libraries(tangram INTERFACE ${WONTON_LIBRARIES})
message(STATUS "WONTON_LIBRARIES=${WONTON_LIBRARIES}" )

if (TANGRAM_ENABLE_THRUST AND NOT WONTON_ENABLE_THRUST)
message(FATAL_ERROR "Thrust enabled for Tangram but Wonton is not built with Thrust")
endif ()
if (NOT TANGRAM_ENABLE_THRUST AND WONTON_ENABLE_THRUST)
message(FATAL_ERROR "Thrust disabled for Tangram but Wonton is built with Thrust")
endif ()

if (TANGRAM_ENABLE_MPI AND NOT WONTON_ENABLE_MPI)
message(FATAL_ERROR "MPI enabled for Tangram but Wonton is not compiled with MPI")
endif ()

if (NOT TANGRAM_ENABLE_MPI AND WONTON_ENABLE_MPI)
message(FATAL_ERROR "MPI disabled for Tangram but Wonton is compiled with MPI")
endif ()

if (TANGRAM_ENABLE_Jali AND NOT WONTON_ENABLE_Jali)
message(FATAL_ERROR "Jali enabled for Tangram but Wonton is not built with Jali")
endif ()

if (TANGRAM_ENABLE_FleCSI AND NOT WONTON_ENABLE_FleCSI)
message(FATAL_ERROR "FleCSI enabled for Tangram but Wonton is not built with FleCSI")
endif ()

cmake_minimum_required(VERSION 3.0)

#------------------------------------------------------------------------------#
# Include project-level CMake configuration file
# Configure XMOF2D
#------------------------------------------------------------------------------#

if(NOT "$ENV{CINCH_SOURCE_DIR}" STREQUAL "")
set(CINCH_SOURCE_DIR $ENV{CINCH_SOURCE_DIR})
elseif(EXISTS ${CMAKE_SOURCE_DIR}/cinch)
set(CINCH_SOURCE_DIR ${CMAKE_SOURCE_DIR}/cinch)
endif()
set(TANGRAM_ENABLE_XMOF2D False CACHE BOOL "Is XMOF2D enabled?")
if (TANGRAM_ENABLE_XMOF2D)

# Look for the XMOF2D package

find_package(XMOF2D REQUIRED)

message(STATUS "Located XMOF2D")

target_include_directories(tangram INTERFACE ${XMOF2D_INCLUDE_DIRS})
message(STATUS "XMOF2D_INCLUDE_DIR ${XMOF2D_INCLUDE_DIRS}")

# XMOF2D_LIBRARIES doesn't contain a real target name. Until we
# upgrade XMOF2D's cmake to export the correct target, we have to
# also specify where to find the library
target_link_directories(tangram INTERFACE ${XMOF2D_LIBRARY_DIR})
target_link_libraries(tangram INTERFACE ${XMOF2D_LIBRARIES})

if (NOT XMOF2D_ROOT)
set(XMOF2D_ROOT ${XMOF2D_INCLUDE_DIR}/../share/cmake CACHE FILEPATH "Where XMOF2D can be found")
endif ()

set(TANGRAM_ENABLE_XMOF2D True CACHE BOOL "Is XMOF2D enabled?" FORCE)
endif ()


if (ENABLE_UNIT_TESTS)

# This needs to be set in the root directory for tests to be run by
# 'make test' or ctest
enable_testing()

include(cmake/unittest.cmake)

endif ()



#-----------------------------------------------------------------------------
# Recurse down the source directories building up dependencies
#-----------------------------------------------------------------------------

add_subdirectory(tangram)


# In addition to the include directories of the source, we need to
# include the build or directory to get the autogenerated
# tangram-config.h (The first of these is needed if Wonton is included
# as a submodule, the second is needed for the auto-generated config
# file if Tangram is included as a submodule, the third is to get the
# autogenerated config header if Tangram is being compiled separately
# and the last is for dependencies in installations)

target_include_directories(tangram INTERFACE
$<BUILD_INTERFACE:${tangram_SOURCE_DIR}>
$<BUILD_INTERFACE:${tangram_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
$<INSTALL_INTERFACE:include>)


# Tangram targets

install(TARGETS tangram
EXPORT tangram_LIBRARIES
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
PUBLIC_HEADER DESTINATION include
INCLUDES DESTINATION include
)


#-----------------------------------------------------------------------------
# Add any applications built upon tangram
#-----------------------------------------------------------------------------

add_subdirectory(app)


#-----------------------------------------------------------------------------
# Prepare output for configuration files to be used by projects importing Tangram
#-----------------------------------------------------------------------------

# Write a configuration file from template replacing only variables enclosed
# by the @ sign.
configure_file(${PROJECT_SOURCE_DIR}/cmake/tangramConfig.cmake.in
tangramConfig.cmake @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/tangramConfig.cmake DESTINATION lib/cmake/tangram)


# write out a version file
include(CMakePackageConfigHelpers)
write_basic_package_version_file(tangramConfigVersion.cmake
VERSION "${TANGRAM_MAJOR_VERSION}.${TANGRAM_MINOR_VERSION}.${TANGRAM_PATCH_VERSION}"
COMPATIBILITY SameMajorVersion)
install(FILES ${PROJECT_BINARY_DIR}/tangramConfigVersion.cmake
DESTINATION lib/cmake/tangram)


# export targets

install(EXPORT tangram_LIBRARIES
FILE tangramTargets.cmake
NAMESPACE tangram::
EXPORT_LINK_INTERFACE_LIBRARIES
DESTINATION lib/cmake/tangram)



# Dynamically configured header files that contains defines like
# WONTON_ENABLE_MPI etc. if enabled

include(${CMAKE_SOURCE_DIR}/cinch/cmake/ProjectLists.txt)
configure_file(${PROJECT_SOURCE_DIR}/config/tangram-config.h.in
${PROJECT_BINARY_DIR}/tangram-config.h @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/tangram-config.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
Loading

0 comments on commit 02a8b18

Please sign in to comment.