commit 653543b83105e8cb30cdbbdf920ee03cfadfa78b parent 3b25c95e99437cad6c32a94b652b50b9107f7a7a Author: Vincent Forest <vincent.forest@meso-star.com> Date: Tue, 31 Oct 2023 15:24:09 +0100 Remove CMake support POSIX make becomes the only supported build system. Diffstat:
| D | cmake/CMakeLists.txt | | | 76 | ---------------------------------------------------------------------------- |
| D | cmake/atmosphere/CMakeLists.txt | | | 114 | ------------------------------------------------------------------------------- |
| D | cmake/combustion/CMakeLists.txt | | | 127 | ------------------------------------------------------------------------------- |
| D | cmake/commands/CMakeLists.txt | | | 89 | ------------------------------------------------------------------------------- |
| D | cmake/core/CMakeLists.txt | | | 154 | ------------------------------------------------------------------------------- |
| D | cmake/doc/CMakeLists.txt | | | 94 | ------------------------------------------------------------------------------- |
| D | cmake/planeto/CMakeLists.txt | | | 124 | ------------------------------------------------------------------------------- |
7 files changed, 0 insertions(+), 778 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,76 +0,0 @@ -# Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -# Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -# Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -# Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -# Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -# Copyright (C) 2022-2023 Observatoire de Paris -# Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -# Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -# Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -# -# 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(htrdr C) -enable_testing() - -set(HTRDR_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -set(HTRDR_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) - -set(VERSION_MAJOR 0) -set(VERSION_MINOR 9) -set(VERSION_PATCH 2) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -option(HTRDR_BUILD_ATMOSPHERE "Build the htrdr-atmosphere program" ON) -option(HTRDR_BUILD_COMBUSTION "Build the htrdr-combustion program" ON) -option(HTRDR_BUILD_PLANETO "Build the htrdr-planeto program" ON) - -set(HTRDR_BUILD_COMMANDS "") -if(HTRDR_BUILD_ATMOSPHERE) - set(HTRDR_BUILD_COMMANDS "${HTRDR_BUILD_COMMANDS};HTRDR_BUILD_ATMOSPHERE") -endif() -if(HTRDR_BUILD_COMBUSTION) - set(HTRDR_BUILD_COMMANDS "${HTRDR_BUILD_COMMANDS};HTRDR_BUILD_COMBUSTION") -endif() -if(HTRDR_BUILD_PLANETO) - set(HTRDR_BUILD_COMMANDS "${HTRDR_BUILD_COMMANDS};HTRDR_BUILD_PLANETO") -endif() - -################################################################################ -# Add sub projects -################################################################################ -add_subdirectory(core) - -if(HTRDR_BUILD_ATMOSPHERE) - add_subdirectory(atmosphere) -endif() -if(HTRDR_BUILD_COMBUSTION) - add_subdirectory(combustion) -endif() -if(HTRDR_BUILD_PLANETO) - add_subdirectory(planeto) -endif() - -add_subdirectory(commands) -add_subdirectory(doc) - -################################################################################ -# Define output & install directories -################################################################################ -set(HTRDR_FILES_DOC - ${PROJECT_SOURCE_DIR}/../COPYING - ${PROJECT_SOURCE_DIR}/../README.md) -install(FILES ${HTRDR_FILES_DOC} DESTINATION share/doc/htrdr) - diff --git a/cmake/atmosphere/CMakeLists.txt b/cmake/atmosphere/CMakeLists.txt @@ -1,114 +0,0 @@ -# Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -# Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -# Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -# Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -# Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -# Copyright (C) 2022-2023 Observatoire de Paris -# Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -# Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -# Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -# -# 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(htrdr-atmosphere) - -################################################################################ -# Check dependencies -################################################################################ -find_package(HTSky 0.2 REQUIRED) -find_package(RCMake 0.3 REQUIRED) -find_package(RSys 0.11 REQUIRED) -find_package(Star3D 0.8 REQUIRED) -find_package(StarCamera 0.0 REQUIRED) -find_package(StarSF 0.6 REQUIRED) -find_package(StarSP 0.12 REQUIRED) -find_package(StarVX 0.1 REQUIRED) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories( - ${HTSky_INCLUDE_DIR} - ${RSys_INCLUDE_DIR} - ${StarCamera_INCLUDE_DIR} - ${Star3D_INCLUDE_DIR} - ${StarSF_INCLUDE_DIR} - ${StarSP_INCLUDE_DIR} - ${StarVX_INCLUDE_DIR} - ${HTRDR_BUILD_DIR} - ${HTRDR_SOURCE_DIR}) - -################################################################################ -# Generate files -################################################################################ -set(HTRDR_ATMOSPHERE_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD "1" CACHE INTERNAL "") -set(HTRDR_ATMOSPHERE_ARGS_DEFAULT_SKY_MTL_NAME "\"air\"" CACHE INTERNAL "") - -configure_file(${HTRDR_SOURCE_DIR}/atmosphere/htrdr_atmosphere_args.h.in - ${HTRDR_BUILD_DIR}/atmosphere/htrdr_atmosphere_args.h @ONLY) - -################################################################################ -# Configure and define targets -################################################################################ -set(HTRDR_ATMOSPHERE_FILES_SRC - htrdr_atmosphere_args.c - htrdr_atmosphere.c - htrdr_atmosphere_compute_radiance_lw.c - htrdr_atmosphere_compute_radiance_sw.c - htrdr_atmosphere_draw_map.c - htrdr_atmosphere_ground.c - htrdr_atmosphere_main.c - htrdr_atmosphere_sun.c) - -set(HTRDR_ATMOSPHERE_FILES_INC - htrdr_atmosphere_c.h - htrdr_atmosphere_ground.h - htrdr_atmosphere.h - htrdr_atmosphere_sun.h) - -set(HTRDR_ATMOSPHERE_FILES_INC2 # Generated files - htrdr_atmosphere_args.h) - -# Prepend each file in the `HTRDR_FILES_<SRC|INC>' list by `HTRDR_SOURCE_DIR' -rcmake_prepend_path(HTRDR_ATMOSPHERE_FILES_SRC ${HTRDR_SOURCE_DIR}/atmosphere) -rcmake_prepend_path(HTRDR_ATMOSPHERE_FILES_INC ${HTRDR_SOURCE_DIR}/atmosphere) -rcmake_prepend_path(HTRDR_ATMOSPHERE_FILES_INC2 ${HTRDR_BUILD_DIR}/atmosphere) - -# Atmosphere library -add_library(htrdr-atmosphere STATIC - ${HTRDR_ATMOSPHERE_FILES_SRC} - ${HTRDR_ATMOSPHERE_FILES_INC} - ${HTRDR_ATMOSPHERE_FILES_INC2}) -target_link_libraries(htrdr-atmosphere - htrdr-core HTSky RSys Star3D StarCamera StarSF StarSP) - -if(CMAKE_COMPILER_IS_GNUCC) - target_link_libraries(htrdr-atmosphere m) -endif() - -set_target_properties(htrdr-atmosphere PROPERTIES - DEFINE_SYMBOL HTRDR_STATIC - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS htrdr-atmosphere - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) - diff --git a/cmake/combustion/CMakeLists.txt b/cmake/combustion/CMakeLists.txt @@ -1,127 +0,0 @@ -# Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -# Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -# Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -# Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -# Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -# Copyright (C) 2022-2023 Observatoire de Paris -# Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -# Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -# Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -# -# 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(htrdr-combustion) - -################################################################################ -# Check dependencies -################################################################################ -find_package(AtrSTM REQUIRED) -find_package(RCMake 0.3 REQUIRED) -find_package(RSys 0.11 REQUIRED) -find_package(Star3D 0.8 REQUIRED) -find_package(StarCamera 0.0 REQUIRED) -find_package(StarSF 0.6 REQUIRED) -find_package(StarSP 0.12 REQUIRED) -find_package(StarVX 0.1 REQUIRED) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories( - ${AtrSTM_INCLUDE_DIR} - ${RSys_INCLUDE_DIR} - ${Star3D_INCLUDE_DIR} - ${StarCamera_INCLUDE_DIR} - ${StarSF_INCLUDE_DIR} - ${StarSP_INCLUDE_DIR} - ${StarVX_INCLUDE_DIR} - ${HTRDR_BUILD_DIR} - ${HTRDR_SOURCE_DIR}) - -################################################################################ -# Generate files -################################################################################ -set(HTRDR_COMBUSTION_ARGS_DEFAULT_LASER_FLUX_DENSITY "1" CACHE INTERNAL "") -set(HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_DIMENSION "1.80" CACHE INTERNAL "") -set(HTRDR_COMBUSTION_ARGS_DEFAULT_FRACTAL_PREFACTOR "1.30" CACHE INTERNAL "") -set(HTRDR_COMBUSTION_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD "1.0" CACHE INTERNAL "") -set(HTRDR_COMBUSTION_ARGS_DEFAULT_GRID_DEFINITION_HINT "256" CACHE INTERNAL "") -set(HTRDR_COMBUSTION_ARGS_DEFAULT_WAVELENGTH "532" CACHE INTERNAL "") - -configure_file(${HTRDR_SOURCE_DIR}/combustion/htrdr_combustion_args.h.in - ${HTRDR_BUILD_DIR}/combustion/htrdr_combustion_args.h @ONLY) - -################################################################################ -# Configure and define targets -################################################################################ -set(HTRDR_COMBUSTION_FILES_SRC - htrdr_combustion.c - htrdr_combustion_args.c - htrdr_combustion_draw_map.c - htrdr_combustion_compute_radiance_sw.c - htrdr_combustion_geometry_ray_filter.c - htrdr_combustion_laser.c - htrdr_combustion_main.c - htrdr_combustion_phase_func.c) - -set(HTRDR_COMBUSTION_FILES_INC - htrdr_combustion.h - htrdr_combustion_c.h - htrdr_combustion_geometry_ray_filter.h - htrdr_combustion_laser.h) - -# Prepend each file in the `HTRDR_FILES_<SRC|INC>' list by `HTRDR_SOURCE_DIR' -rcmake_prepend_path(HTRDR_COMBUSTION_FILES_SRC ${HTRDR_SOURCE_DIR}/combustion) -rcmake_prepend_path(HTRDR_COMBUSTION_FILES_INC ${HTRDR_SOURCE_DIR}/combustion) - -# Combustion library -add_library(htrdr-combustion STATIC - ${HTRDR_COMBUSTION_FILES_SRC} - ${HTRDR_COMBUSTION_FILES_INC}) -target_link_libraries(htrdr-combustion - htrdr-core AtrSTM RSys Star3D StarCamera StarSF StarSP) - -set_target_properties(htrdr-combustion PROPERTIES - DEFINE_SYMBOL HTRDR_STATIC - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -################################################################################ -# Add tests -################################################################################ -if(NOT NO_TEST) - function(build_test _name) - add_executable(${_name} - ${HTRDR_SOURCE_DIR}/combustion/${_name}.c) - target_link_libraries(${_name} htrdr-combustion ${ARGN}) - endfunction() - - function(new_test _name) - build_test(${_name} ${ARGN}) - add_test(${_name} ${_name}) - endfunction() - - new_test(test_htrdr_combustion_laser) -endif() - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS htrdr-combustion - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) - diff --git a/cmake/commands/CMakeLists.txt b/cmake/commands/CMakeLists.txt @@ -1,89 +0,0 @@ -# Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -# Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -# Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -# Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -# Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -# Copyright (C) 2022-2023 Observatoire de Paris -# Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -# Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -# Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -# -# 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(htrdr-commands C) - -include_directories(${HTRDR_BUILD_DIR} ${HTRDR_SOURCE_DIR}) - -set(_link_libraries "") - -if(HTRDR_BUILD_ATMOSPHERE) - list(APPEND _link_libraries htrdr-atmosphere) -endif() -if(HTRDR_BUILD_COMBUSTION) - list(APPEND _link_libraries htrdr-combustion) -endif() -if(HTRDR_BUILD_PLANETO) - list(APPEND _link_libraries htrdr-planeto) -endif() - -################################################################################ -# Check dependencies -################################################################################ -find_package(RSys 0.11 REQUIRED) -include_directories(${RSys_INCLUDE_DIR}) - -################################################################################ -# Configure and define targets -################################################################################ -add_executable(htrdr_cmd ${HTRDR_SOURCE_DIR}/commands/htrdr_cmd.c) -target_link_libraries(htrdr_cmd ${_link_libraries}) -set_target_properties(htrdr_cmd PROPERTIES - COMPILE_DEFINITIONS "${HTRDR_BUILD_COMMANDS}" - OUTPUT_NAME htrdr) - -add_executable(htrdr_atmosphere_cmd - ${HTRDR_SOURCE_DIR}/commands/htrdr_atmosphere_cmd.c) -set_target_properties(htrdr_atmosphere_cmd PROPERTIES - COMPILE_DEFINITIONS "${HTRDR_BUILD_COMMANDS}" - OUTPUT_NAME htrdr-atmosphere) -if(HTRDR_BUILD_ATMOSPHERE) - target_link_libraries(htrdr_atmosphere_cmd htrdr-atmosphere) -endif() - -add_executable(htrdr_combustion_cmd - ${HTRDR_SOURCE_DIR}/commands/htrdr_combustion_cmd.c) -set_target_properties(htrdr_combustion_cmd PROPERTIES - COMPILE_DEFINITIONS "${HTRDR_BUILD_COMMANDS}" - OUTPUT_NAME htrdr-combustion) -if(HTRDR_BUILD_COMBUSTION) - target_link_libraries(htrdr_combustion_cmd htrdr-combustion) -endif() - -add_executable(htrdr_planeto_cmd - ${HTRDR_SOURCE_DIR}/commands/htrdr_planeto_cmd.c) -set_target_properties(htrdr_planeto_cmd PROPERTIES - COMPILE_DEFINITIONS "${HTRDR_BUILD_COMMANDS}" - OUTPUT_NAME htrdr-planeto) -if(HTRDR_BUILD_PLANETO) - target_link_libraries(htrdr_planeto_cmd htrdr-planeto) -endif() - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS htrdr_cmd htrdr_atmosphere_cmd htrdr_combustion_cmd htrdr_planeto_cmd - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) diff --git a/cmake/core/CMakeLists.txt b/cmake/core/CMakeLists.txt @@ -1,154 +0,0 @@ -# Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -# Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -# Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -# Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -# Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -# Copyright (C) 2022-2023 Observatoire de Paris -# Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -# Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -# Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -# -# 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(htrdr-core C) - -################################################################################ -# Check dependencies -################################################################################ -find_package(AW 2.0 REQUIRED) -find_package(MruMtl 0.1 REQUIRED) -find_package(RCMake 0.3 REQUIRED) -find_package(RSys 0.11 REQUIRED) -find_package(Star3D 0.8 REQUIRED) -find_package(StarCamera 0.0 REQUIRED) -find_package(StarSF 0.6 REQUIRED) -find_package(StarSP 0.12 REQUIRED) -find_package(OpenMP 1.2 REQUIRED) -find_package(MPI 2 REQUIRED) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -set(CMAKE_C_COMPILER ${MPI_C_COMPILER}) - -include_directories( - ${AW_INCLUDE_DIR} - ${MruMtl_INCLUDE_DIR} - ${RSys_INCLUDE_DIR} - ${Star3D_INCLUDE_DIR} - ${StarCamera_INCLUDE_DIR} - ${StarSF_INCLUDE_DIR} - ${StarSP_INCLUDE_DIR} - ${StarVX_INCLUDE_DIR} - ${HTSky} - ${HTRDR_BUILD_DIR} - ${HTRDR_SOURCE_DIR} - ${MPI_INCLUDE_PATH}) - -################################################################################ -# Generate files -################################################################################ -set(HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MIN "0.0" CACHE INTERNAL "") -set(HTRDR_ARGS_CAMERA_PERSPECTIVE_FOV_EXCLUSIVE_MAX "180.0" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_CAMERA_POS "0,0,0" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_CAMERA_TGT "0,1,0" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_CAMERA_UP "0,0,1" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_CAMERA_ORTHOGRAPHIC_HEIGHT "1" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOV "70" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_LENS_RADIUS "0" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_CAMERA_PERSPECTIVE_FOCAL_DST "1" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_RECTANGLE_POS "0,0,0" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_RECTANGLE_TGT "0,0,1" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_RECTANGLE_UP "0,1,0" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_RECTANGLE_SZ "1,1" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_IMG_WIDTH "320" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_IMG_HEIGHT "240" CACHE INTERNAL "") -set(HTRDR_ARGS_DEFAULT_IMG_SPP "1" CACHE INTERNAL "") - -configure_file(${HTRDR_SOURCE_DIR}/core/htrdr_args.h.in - ${HTRDR_BUILD_DIR}/core/htrdr_args.h @ONLY) -configure_file(${HTRDR_SOURCE_DIR}/core/htrdr_version.h.in - ${HTRDR_BUILD_DIR}/core/htrdr_version.h @ONLY) - -################################################################################ -# Configure and define targets -################################################################################ -set(HTRDR_CORE_FILES_SRC - htrdr.c - htrdr_args.c - htrdr_buffer.c - htrdr_draw_map.c - htrdr_geometry.c - htrdr_log.c - htrdr_materials.c - htrdr_ran_wlen_cie_xyz.c - htrdr_ran_wlen_discrete.c - htrdr_ran_wlen_planck.c - htrdr_rectangle.c - htrdr_slab.c - htrdr_spectral.c) -set(HTRDR_CORE_FILES_INC - htrdr.h - htrdr_accum.h - htrdr_buffer.h - htrdr_c.h - htrdr_draw_map.h - htrdr_geometry.c - htrdr_interface.h - htrdr_log.h - htrdr_materials.h - htrdr_ran_wlen_cie_xyz.h - htrdr_ran_wlen_discrete.h - htrdr_ran_wlen_planck.h - htrdr_rectangle.h - htrdr_sensor.h - htrdr_slab.h - htrdr_spectral.h) -set(HTRDR_CORE_FILES_INC2 # Generated files - htrdr_args.h - htrdr_version.h) - -# Prepend each file in the `HTRDR_FILES_<SRC|INC>' list by `HTRDR_SOURCE_DIR' -rcmake_prepend_path(HTRDR_CORE_FILES_SRC ${HTRDR_SOURCE_DIR}/core) -rcmake_prepend_path(HTRDR_CORE_FILES_INC ${HTRDR_SOURCE_DIR}/core) -rcmake_prepend_path(HTRDR_CORE_FILES_INC2 ${HTRDR_BUILD_DIR}/core) - -# Core library -add_library(htrdr-core SHARED - ${HTRDR_CORE_FILES_SRC} - ${HTRDR_CORE_FILES_INC} - ${HTRDR_CORE_FILES_INC2}) -target_link_libraries(htrdr-core AW MruMtl RSys Star3D StarCamera StarSF StarSP) - -if(CMAKE_COMPILER_IS_GNUCC) - target_link_libraries(htrdr-core m) - set_target_properties(htrdr-core PROPERTIES LINK_FLAGS "${OpenMP_C_FLAGS}") -endif() - -set_target_properties(htrdr-core PROPERTIES - COMPILE_FLAGS "${OpenMP_C_FLAGS}" - DEFINE_SYMBOL HTRDR_CORE_SHARED_BUILD - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS htrdr-core - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) - diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt @@ -1,94 +0,0 @@ -# Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -# Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -# Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -# Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -# Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -# Copyright (C) 2022-2023 Observatoire de Paris -# Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -# Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -# Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -# -# 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(HTRDR_DOC_DIR ${PROJECT_SOURCE_DIR}/../doc) - -################################################################################ -# Look for the a2x program -################################################################################ -find_program(SCDOC NAMES scdoc) -if(NOT SCDOC) - message(WARNING - "The `scdoc' program is missing. " - "The htrdr man pages cannot be generated.") - return() -endif() - -################################################################################ -# ROFF man pages -################################################################################ -set(MAN_SOURCES - ${HTRDR_DOC_DIR}/htrdr.1.scd - ${HTRDR_DOC_DIR}/htrdr-image.5.scd - ${HTRDR_DOC_DIR}/htrdr-materials.5.scd - ${HTRDR_DOC_DIR}/htrdr-obj.5.scd - ${HTRDR_DOC_DIR}/rnrl.5.scd) - -if(HTRDR_BUILD_ATMOSPHERE) - configure_file(${HTRDR_DOC_DIR}/htrdr-atmosphere.1.scd.in - ${CMAKE_CURRENT_BINARY_DIR}/htrdr-atmosphere.1.scd @ONLY) - list(APPEND MAN_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/htrdr-atmosphere.1.scd) -endif() - -if(HTRDR_BUILD_COMBUSTION) - configure_file(${HTRDR_DOC_DIR}/htrdr-combustion.1.scd.in - ${CMAKE_CURRENT_BINARY_DIR}/htrdr-combustion.1.scd @ONLY) - list(APPEND MAN_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/htrdr-combustion.1.scd) -endif() - -if(HTRDR_BUILD_PLANETO) - configure_file(${HTRDR_DOC_DIR}/htrdr-planeto.1.scd.in - ${CMAKE_CURRENT_BINARY_DIR}/htrdr-planeto.1.scd @ONLY) - list(APPEND MAN_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/htrdr-planeto.1.scd) -endif() - -set(MAN_FILES) -set(MAN5_FILES) -set(MAN1_FILES) - -foreach(_src IN LISTS MAN_SOURCES) - get_filename_component(_man ${_src} NAME) - string(REGEX MATCH "^.*\.[1-9]" _man "${_man}") - - add_custom_command( - OUTPUT ${_man} - COMMAND ${SCDOC} < ${_src} > ${_man} - DEPENDS ${_src} - COMMENT "Build ROFF man page ${_man}" - VERBATIM) - list(APPEND MAN_FILES ${_man}) - - string(REGEX MATCH "^.*.5$" _man5 ${_man}) - string(REGEX MATCH "^.*.1$" _man1 ${_man}) - if(_man1) - list(APPEND MAN1_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_man1}) - elseif(_man5) - list(APPEND MAN5_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_man5}) - else() - message(FATAL_ERROR "Unexpected man type") - endif() -endforeach() -add_custom_target(man-roff ALL DEPENDS ${MAN_FILES}) - -install(FILES ${MAN1_FILES} DESTINATION share/man/man1) -install(FILES ${MAN5_FILES} DESTINATION share/man/man5) diff --git a/cmake/planeto/CMakeLists.txt b/cmake/planeto/CMakeLists.txt @@ -1,124 +0,0 @@ -# Copyright (C) 2018-2019, 2022-2023 Centre National de la Recherche Scientifique -# Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux -# Copyright (C) 2022-2023 Institut Pierre-Simon Laplace -# Copyright (C) 2022-2023 Institut de Physique du Globe de Paris -# Copyright (C) 2018-2023 |Méso|Star> (contact@meso-star.com) -# Copyright (C) 2022-2023 Observatoire de Paris -# Copyright (C) 2022-2023 Université de Reims Champagne-Ardenne -# Copyright (C) 2022-2023 Université de Versaille Saint-Quentin -# Copyright (C) 2018-2019, 2022-2023 Université Paul Sabatier -# -# 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(htrdr-planeto) - -################################################################################ -# Check dependencies -################################################################################ -find_package(RCMake 0.4 REQUIRED) -find_package(RNATM 0.0.1 REQUIRED) -find_package(RNGRD 0.0 REQUIRED) -find_package(RSys 0.11 REQUIRED) -find_package(Star3D 0.8 REQUIRED) -find_package(StarBuffer 0.0 REQUIRED) -find_package(StarCamera 0.0 REQUIRED) -find_package(StarSF 0.6 REQUIRED) -find_package(StarSP 0.12 REQUIRED) -find_package(StarVX 0.1 REQUIRED) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories( - ${RNATM_INCLUDE_DIR} - ${RNGRD} - ${RSys_INCLUDE_DIR} - ${Star3D_INCLUDE_DIR} - ${StarBuffer_INCLUDE_DIR} - ${StarCamera_INCLUDE_DIR} - ${StarSF_INCLUDE_DIR} - ${StarSP_INCLUDE_DIR} - ${StarVX_INCLUDE_DIR} - ${HTRDR_BUILD_DIR} - ${HTRDR_SOURCE_DIR}) - -################################################################################ -# Generate files -################################################################################ -set(HTRDR_PLANETO_ARGS_DEFAULT_OPTICAL_THICKNESS_THRESHOLD "1" CACHE INTERNAL "") -set(HTRDR_PLANETO_ARGS_DEFAULT_GRID_DEFINITION_HINT "512" CACHE INTERNAL "") - -configure_file(${HTRDR_SOURCE_DIR}/planeto/htrdr_planeto_args.h.in - ${HTRDR_BUILD_DIR}/planeto/htrdr_planeto_args.h @ONLY) - -################################################################################ -# Configure and define targets -################################################################################ -set(HTRDR_PLANETO_FILES_SRC - htrdr_planeto.c - htrdr_planeto_args.c - htrdr_planeto_compute_radiance.c - htrdr_planeto_draw_map.c - htrdr_planeto_main.c - htrdr_planeto_source.c) - -set(HTRDR_PLANETO_FILES_INC - htrdr_planeto.h - htrdr_planeto_c.h - htrdr_planeto_source.h) - -# Prepend each file in the `HTRDR_FILES_<SRC|INC>' list by `HTRDR_SOURCE_DIR' -rcmake_prepend_path(HTRDR_PLANETO_FILES_SRC ${HTRDR_SOURCE_DIR}/planeto) -rcmake_prepend_path(HTRDR_PLANETO_FILES_INC ${HTRDR_SOURCE_DIR}/planeto) - -# Planeto library -add_library(htrdr-planeto STATIC - ${HTRDR_PLANETO_FILES_SRC} - ${HTRDR_PLANETO_FILES_INC}) -target_link_libraries(htrdr-planeto - htrdr-core RNATM RNGRD RSys Star3D StarBuffer StarCamera StarSF StarSP) - -set_target_properties(htrdr-planeto PROPERTIES - DEFINE_SYMBOL HTRDR_STATIC - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -################################################################################ -# Add tests -################################################################################ -if(NOT NO_TEST) - function(build_test _name) - add_executable(${_name} - ${HTRDR_SOURCE_DIR}/planeto/${_name}.c) - target_link_libraries(${_name} htrdr-core htrdr-planeto ${ARGN}) - endfunction() - - function(new_test _name) - build_test(${_name} ${ARGN}) - add_test(${_name} ${_name}) - endfunction() - - new_test(test_htrdr_planeto_source StarBuffer) -endif() - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS htrdr-planeto - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -