Skip to content

Commit

Permalink
Merge pull request #6 from jmikeowen/blt-cmake-overhall
Browse files Browse the repository at this point in the history
BLT/CMAKE build system
  • Loading branch information
mdavis36 authored Mar 3, 2020
2 parents 79cabe9 + c832d92 commit 15da34c
Show file tree
Hide file tree
Showing 95 changed files with 3,187 additions and 377 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ err.job
runit
dumps*
src/BUILD
src/build
src/BUILD/**
src/build/**
dumps-*
tpl
tpl/**
python

# These are files automatically generated in our configure process.
src/aclocal.m4
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

[submodule "blt"]
path = cmake/blt
url = https://github.com/llnl/blt
30 changes: 0 additions & 30 deletions CMakeLists.txt

This file was deleted.

20 changes: 10 additions & 10 deletions cmake/CMakeBasics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
###############################################################################
# Basic

# Libraries
include(cmake/SetupLibraries.cmake)

find_package(PythonInterp)

# Instantiate and add source files to the project
# _inst_var : *name* of list variable containing base names to instantiate
# The file ${_inst_var}Inst.cc.py must exist.
# If instantiation is disabled, ${_inst_var}.cc will be added
# to the source files, if it exists.
# _source_var : *name* of list variable to append source files to.
function(instantiate _inst_var _source_var)
set(_dims)
set(_dims 1)
if(ENABLE_2D)
list(APPEND _dims 2)
endif()
Expand All @@ -28,9 +23,9 @@ function(instantiate _inst_var _source_var)
if(ENABLE_INSTANTIATIONS)
foreach(_dim ${_dims})
set(_inst_py ${CMAKE_CURRENT_SOURCE_DIR}/${_inst}Inst.cc.py)
set(_inst_file ${_inst}Inst.cc.${_dim}.cc)
set(_inst_file ${_inst}Inst${_dim}d.cc)
# Run the python script to generate the instantiation files
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/helpers/InstantiationGenerator.py
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/helpers/InstantiationGenerator.py
${_inst_py} ${_inst_file} ${_dim}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

Expand Down Expand Up @@ -58,18 +53,23 @@ else()
add_definitions("-DDEBUG=0")
endif()

add_definitions(-DCXXONLY=1)
if(ENABLE_CXXONLY)
add_definitions(-DCXXONLY=1)
endif()
add_definitions(-DUSE_TETGEN=0)
add_definitions(-DUSE_TRIANGLE=0)
add_definitions(-DNOPOLYTOPE=1)
add_definitions(-DSPHERAL1D=1)
if(ENABLE_2D)
add_definitions(-DSPHERAL2D=1)
endif()
if(ENABLE_3D)
add_definitions(-DNOR3D=1)
add_definitions(-DSPHERAL3D=1)
endif()
add_definitions(-DTIMER=1)
if(ENABLE_TIMER)
add_definitions(-DTIMER=1)
endif()

if (ENABLE_MPI)
add_definitions(-DUSE_MPI=1)
Expand Down
Loading

0 comments on commit 15da34c

Please sign in to comment.