-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
318 changed files
with
29,369 additions
and
1,014,817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,16 @@ | ||
|
||
autom4te.cache/output.* | ||
autom4te.cache/traces.* | ||
autom4te.cache/requests | ||
Makefile.in | ||
|
||
*.o | ||
|
||
|
||
build/src/CTEM | ||
|
||
*.mod | ||
|
||
*.swp | ||
|
||
|
||
build/ | ||
|
||
configure | ||
|
||
config/ | ||
|
||
examples/global-lunar-bombardment/.DS_Store | ||
|
||
examples/mare-with-rays-model2/.DS_Store | ||
|
||
__pycache__/ | ||
|
||
*.dat | ||
|
||
*.DS_Store | ||
|
||
alocal.m4 | ||
|
||
*.m4 | ||
|
||
*.eps | ||
|
||
examples/mare-with-rays-model2/CTEM | ||
|
||
examples/global-lunar-bombardment/CTEM | ||
|
||
examples/*/*.o* | ||
|
||
*.out | ||
* | ||
!src/ | ||
!src/*/ | ||
!*.f90 | ||
!.gitignore | ||
!CMakeLists.txt | ||
!distclean.cmake | ||
!README.md | ||
!version.txt | ||
!ctem/ | ||
!ctem/**.py | ||
!cmake/Modules/*.cmake | ||
!*.bash | ||
|
||
!pyproject.toml | ||
!LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Copyright 2022 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh | ||
# This file is part of Swiftest. | ||
# Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
# Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
# You should have received a copy of the GNU General Public License along with Swiftest. | ||
# If not, see: https://www.gnu.org/licenses. | ||
|
||
# CMake project file for Swiftest | ||
################################################## | ||
# Define the project and the depencies that it has | ||
################################################## | ||
CMAKE_MINIMUM_REQUIRED(VERSION 3.24.0...3.27.1) | ||
SET(SKBUILD_PROJECT_NAME "ctem" CACHE STRING "Name of project set by scikit-build") | ||
|
||
# Get version stored in text file | ||
FILE(READ "version.txt" VERSION) | ||
PROJECT(${SKBUILD_PROJECT_NAME} LANGUAGES C Fortran VERSION ${VERSION}) | ||
|
||
IF (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel") | ||
SET(COMPILER_OPTIONS "Intel" CACHE STRING "Compiler identified as Intel") | ||
ELSEIF (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") | ||
SET(COMPILER_OPTIONS "GNU" CACHE STRING "Compiler identified as gfortran") | ||
ELSE () | ||
MESSAGE(FATAL_ERROR "Compiler ${CMAKE_Fortran_COMPILER_ID} not recognized!") | ||
ENDIF () | ||
|
||
# Set some options the user may choose | ||
OPTION(USE_OPENMP "Use OpenMP for parallelization" ON) | ||
OPTION(USE_SIMD "Use SIMD vectorization" ON) | ||
OPTION(BUILD_SHARED_LIBS "Build using shared libraries" ON) | ||
|
||
# The following section is modified from Numpy f2py documentation | ||
IF(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) | ||
MESSAGE(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.\n") | ||
ENDIF() | ||
|
||
# Ensure scikit-build modules | ||
FIND_PACKAGE(Python COMPONENTS Interpreter Development.Module REQUIRED) | ||
|
||
# Define some directories that are important to the build | ||
SET(SRC "${CMAKE_SOURCE_DIR}/src") | ||
SET(PY "${CMAKE_SOURCE_DIR}/ctem") | ||
|
||
# Make sure paths are correct for Unix or Windows style | ||
FILE(TO_CMAKE_PATH ${SRC} SRC) | ||
FILE(TO_CMAKE_PATH ${PY} PY) | ||
|
||
INCLUDE(GNUInstallDirs) | ||
IF (SKBUILD) | ||
SET(INSTALL_BINDIR ${SKBUILD_SCRIPTS_DIR}) | ||
SET(INSTALL_LIBDIR ${SKBUILD_DATA_DIR}/lib) | ||
SET(INSTALL_INCLUDEDIR ${SKBUILD_HEADERS_DIR}) | ||
SET(INSTALL_PYPROJ ${SKBUILD_PLATLIB_DIR}/${SKBUILD_PROJECT_NAME}) | ||
IF (APPLE) | ||
SET(CMAKE_INSTALL_RPATH "@loader_path;${CMAKE_BINARY_DIR}/bin") | ||
ELSEIF (LINUX) | ||
SET(CMAKE_INSTALL_RPATH "@ORIGIN;${CMAKE_BINARY_DIR}/bin") | ||
ENDIF () | ||
ELSE () | ||
SET(INSTALL_PYPROJ ${PY}) | ||
SET(INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR}) | ||
SET(INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) | ||
SET(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}) | ||
ENDIF () | ||
|
||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | ||
|
||
# Have the .mod files placed in the lib folder | ||
SET(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod) | ||
|
||
# Add our local modules to the module path | ||
FILE(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" LOCAL_MODULE_PATH) | ||
LIST(APPEND CMAKE_MODULE_PATH ${LOCAL_MODULE_PATH}) | ||
|
||
# Set the name of the ctem library | ||
SET(CTEM_LIBRARY ctem) | ||
|
||
# The source for the CTEM binary and have it placed in the bin folder | ||
ADD_SUBDIRECTORY(${SRC} ${BIN}) | ||
|
||
#ADD_SUBDIRECTORY(${PY}) | ||
|
||
# Add a distclean target to the Makefile | ||
ADD_CUSTOM_TARGET(distclean | ||
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_SOURCE_DIR}/distclean.cmake" | ||
) |
Oops, something went wrong.