star-mc

Parallel estimation of Monte Carlo integrators
git clone git://git.meso-star.fr/star-mc.git
Log | Files | Refs | README | LICENSE

commit fd31f1a3abedadcf1bae2f114894301582e3fc51
parent 6d72f59afad7241be06388b09d148d4b96ee1ab5
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 19 Oct 2023 16:21:02 +0200

Remove CMake support

POSIX make is now the only supported build system.

Diffstat:
Dcmake/CMakeLists.txt | 137-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 137 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,137 +0,0 @@ -# Copyright (C) 2015-2018, 2021-2023 |Méso|Star> (contact@meso-star.com) -# -# 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(star-mc C) -enable_testing() - -set(SMC_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -option(NO_TEST "Disable the test" OFF) - -################################################################################ -# Check dependencies -################################################################################ -find_package(RCMake 0.3 REQUIRED) -find_package(RSys 0.6 REQUIRED) -find_package(StarSP 0.12.1 REQUIRED) -find_package(OpenMP 1.2 REQUIRED) -find_package(Star3D 0.4) - -if(NOT OPENMP_FOUND) - message(STATUS "No OpenMP support: muti-threading is disabled") -endif() - -include_directories(${RSys_INCLUDE_DIR} ${StarSP_INCLUDE_DIR}) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -################################################################################ -# Configure and define targets -################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 5) -set(VERSION_PATCH 0) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(SMC_FILES_SRC - smc_device.c - smc_doubleN.c - smc_estimator.c - smc_type.c) -set(SMC_FILES_INC_API smc.h) -set(SMC_FILES_INC - smc_device_c.h - smc_type_real.h - smc_type_c.h) -set(SMC_FILES_DOC COPYING.en COPYING.fr README.md) - -# Prepend each file in the `SMC_FILES_<SRC|INC>' list by `SMC_SOURCE_DIR' -rcmake_prepend_path(SMC_FILES_SRC ${SMC_SOURCE_DIR}) -rcmake_prepend_path(SMC_FILES_INC ${SMC_SOURCE_DIR}) -rcmake_prepend_path(SMC_FILES_INC_API ${SMC_SOURCE_DIR}) -rcmake_prepend_path(SMC_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -add_library(smc SHARED ${SMC_FILES_SRC} ${SMC_FILES_INC} ${SMC_FILES_INC_API}) -set_target_properties(smc PROPERTIES - DEFINE_SYMBOL SMC_SHARED_BUILD - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -set_target_properties(smc PROPERTIES COMPILE_FLAGS ${OpenMP_C_FLAGS}) -if(CMAKE_COMPILER_IS_GNUCC) - set_target_properties(smc PROPERTIES LINK_FLAGS ${OpenMP_C_FLAGS}) -endif() - -target_link_libraries(smc RSys StarSP) -if(CMAKE_COMPILER_IS_GNUCC) - target_link_libraries(smc m) -endif() - -rcmake_setup_devel(smc StarMC ${VERSION} star/smc_version.h) - -################################################################################ -# Add tests -################################################################################ -if(NOT NO_TEST) - function(new_test _name) - add_executable(${_name} - ${SMC_SOURCE_DIR}/${_name}.c - ${SMC_SOURCE_DIR}/test_smc_utils.h) - target_link_libraries(${_name} smc RSys) - set(_libraries ${ARGN}) - foreach(_lib ${_libraries}) - target_link_libraries(${_name} ${_lib}) - endforeach(_lib) - add_test(${_name} ${_name}) - endfunction(new_test) - - if(CMAKE_COMPILER_IS_GNUCC) - set(MATH_LIB m) - endif() - - new_test(test_smc_device) - new_test(test_smc_solve ${MATH_LIB}) - new_test(test_smc_doubleN ${MATH_LIB}) - new_test(test_smc_errors) - - set_target_properties(test_smc_device PROPERTIES - COMPILE_FLAGS ${OpenMP_C_FLAGS} - LINK_FLAGS ${OpenMP_C_FLAGS}) - - if(NOT TARGET Star3D) - rcmake_copy_runtime_libraries(test_smc_solve) - message(STATUS - "The Star-3D library is not found: cannot generate the light path test") - else() - new_test(test_smc_light_path) - rcmake_copy_runtime_libraries(test_smc_light_path) - target_link_libraries(test_smc_light_path Star3D) - include_directories(${Star3D_INCLUDE_DIR}) - endif() - -endif() - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS smc - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${SMC_FILES_INC_API} DESTINATION include/star) -install(FILES ${SMC_FILES_DOC} DESTINATION share/doc/star-mc) -