star-gs

Literate program for a geometric sensitivity calculation
git clone git://git.meso-star.fr/star-gs.git
Log | Files | Refs | README | LICENSE

commit 7da3f726fd6e9c0732b1321acc296722ed85b96d
parent 78b7ba2b099c1d0400688dcd68fa1a16c9b50323
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 14 Oct 2022 10:59:51 +0200

Delete CMake files to rely only on POSIX Make

Diffstat:
Dcmake/CMakeLists.txt | 101-------------------------------------------------------------------------------
Dcmake/noweb/CMakeLists.txt | 69---------------------------------------------------------------------
2 files changed, 0 insertions(+), 170 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,101 +0,0 @@ -# Copyright (C) 2021 -# CNRS/RAPSODEE, -# CNRS/LMAP, -# |Meso|Star> (contact@meso-star.com), -# UPS/Laplace. -# -# This program 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. -# -# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. - -cmake_minimum_required(VERSION 3.1) -project(atrstm C) -enable_testing() - -set(SGS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -option(NO_TEST "Do not build tests" OFF) - -################################################################################ -# Sub directories -################################################################################ -add_subdirectory(noweb) - -################################################################################ -# Check dependencies -################################################################################ -find_package(RCMake 0.4 REQUIRED) -find_package(RSys 0.12 REQUIRED) -find_package(Star3D 0.8 REQUIRED) -find_package(StarMC 0.5 REQUIRED) -find_package(StarSP 0.12 REQUIRED) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories( - ${RSys_INCLUDE_DIR} - ${Star3D_INCLUDE_DIR} - ${StarMC_INCLUDE_DIR} - ${StarSP_INCLUDE_DIR}) - -################################################################################ -# Configure and define targets -################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 0) -set(VERSION_PATCH 0) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(SGS_FILES_SRC - sgs_args.c - sgs.c - sgs_compute_4v_s.c - sgs_compute_sensitivity_translation.c - sgs_geometry.c - sgs_geometry_box.c - sgs_geometry_slope.c - sgs_geometry_step.c - sgs_log.c - sgs_main.c) - -set(SGS_FILES_INC - sgs_args.h - sgs_c.h - sgs_geometry.h - sgs_geometry_c.h - sgs.h - sgs_log.h) - -set(SGS_FILES_DOC COPYING README.md) - -# Prepend each file in the `SGS_FILES_<SRC|INC>' list by `SGS_SOURCE_DIR' -rcmake_prepend_path(SGS_FILES_SRC ${SGS_SOURCE_DIR}) -rcmake_prepend_path(SGS_FILES_INC ${SGS_SOURCE_DIR}) -rcmake_prepend_path(SGS_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -add_executable(sgs ${SGS_FILES_SRC} ${SGS_FILES_INC}) -target_link_libraries(sgs RSys Star3D StarMC StarSP m) - -set_target_properties(sgs PROPERTIES - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS sgs - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -install(FILES ${SGS_FILES_DOC} DESTINATION share/doc/sgs) - diff --git a/cmake/noweb/CMakeLists.txt b/cmake/noweb/CMakeLists.txt @@ -1,69 +0,0 @@ -# Copyright (C) 2021 -# CNRS/RAPSODEE, -# CNRS/LMAP, -# |Meso|Star> (contact@meso-star.com), -# UPS/Laplace. -# -# This program 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. -# -# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. - -set(SGS_NOWEB_DIR ${PROJECT_SOURCE_DIR}/../src/) - -set(NOTANGLE_OPTS ) -set(NOWEAVE_OPTS -index -delay -v) - -################################################################################ -# Look for noweb programs -################################################################################ -find_program(_notangle NAMES notangle) -find_program(_noweave NAMES noweave) -find_program(_cpif NAMES cpif) -if(NOT _notangle OR NOT _noweave OR NOT _cpif) - message(FATAL_ERROR "Noweb programs are missing") -endif() - -################################################################################ -# Setup targets -################################################################################ -set(SGS_NOWEB_SRC - sgs_compute_sensitivity_translation.nw) - -set(C_FILES) -set(TEX_FILES) -foreach(_noweb IN LISTS SGS_NOWEB_SRC) - get_filename_component(_name ${_noweb} NAME_WLE) - set(_src ${SGS_NOWEB_DIR}/${_noweb}) - set(_dst_c ${CMAKE_CURRENT_BINARY_DIR}/${_name}.c) - set(_dst_tex ${CMAKE_CURRENT_BINARY_DIR}/${_name}.tex) - - string(REGEX REPLACE "_" "\\\\_" _chunk "${_name}.c") - - add_custom_command( - OUTPUT ${_dst_c} - COMMAND ${_notangle} ${NOTANGLE_OPTS} -R${_chunk} ${_src} | ${_cpif} ${_dst_c} - DEPENDS ${_src} - COMMENT "Tangle ${_src}" - VERBATIM) - list(APPEND C_FILES ${_dst_c}) - - add_custom_command( - OUTPUT ${_dst_tex} - COMMAND ${_noweave} ${NOWEAVE_OPTS} ${_src} > ${_dst_tex} - DEPENDS ${_src} - COMMENT "Weave ${_dst_tex}" - VERBATIM) - list(APPEND TEX_FILES ${_dst_tex}) -endforeach() - -add_custom_target(tangle ALL DEPENDS ${C_FILES}) -add_custom_target(weave ALL DEPENDS ${TEX_FILES})