star-enclosures-2d

Extract enclosures from 2D geometry
git clone git://git.meso-star.fr/star-enclosures-2d.git
Log | Files | Refs | README | LICENSE

commit 19bee96e3a0b34c46199aff95731ecb6a4daa75f
parent 65b12d8539da5ab7d28b33051ad83c9805d9eb28
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 19 Apr 2024 08:47:16 +0200

Remove CMake support

POSIX make is now the only supported build system

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

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,189 +0,0 @@ -# Copyright (C) 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-enclosures-2d C) -enable_testing() - -include(CMakeDependentOption) - -set(SENC2D_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -option(NO_TEST "Do not build tests" OFF) - -cmake_dependent_option(HUGE_ADDITIONAL_TESTS - "Build additional tests that involve millions of segments" OFF - "NOT NO_TEST" OFF) - -################################################################################ -# Check dependencies -################################################################################ -find_package(RCMake 0.4 REQUIRED) -find_package(Star2D 0.5 REQUIRED) -find_package(RSys 0.8.1 REQUIRED) -find_package(OpenMP 2.0 REQUIRED) - -if(NOT NO_TEST) - find_package(StarSP 0.12 QUIET) -endif() - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories( - ${RSys_INCLUDE_DIR} - ${Star2D_INCLUDE_DIR}) -rcmake_append_runtime_dirs(_runtime_dirs RSys Star2D) - -if(StarSP_FOUND) - include_directories(${StarSP_INCLUDE_DIR}) - rcmake_append_runtime_dirs(_runtime_dirs RSys StarSP Star2D) -endif() - -################################################################################ -# Configure and define targets -################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 5) -set(VERSION_PATCH 5) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(SENC2D_FILES_SRC - senc2d_descriptor.c - senc2d_device.c - senc2d_enclosure.c - senc2d_scene.c - senc2d_scene_analyze.c) - -set(SENC2D_FILES_INC_API - senc2d.h - senc2d_sXd_helper.h - sencX2d.h - sencX2d_undefs.h) - -set(SENC2D_FILES_INC - senc2d_device_c.h - senc2d_enclosure_c.h - senc2d_enclosure_data.h - senc2d_internal_types.h - senc2d_scene_c.h - senc2d_scene_analyze_c.h - senc2d_side_range.h) - -set(SENC2D_FILES_DOC COPYING README.md) - -# Prepend each file by `SENC2D_SOURCE_DIR' -rcmake_prepend_path(SENC2D_FILES_SRC ${SENC2D_SOURCE_DIR}) -rcmake_prepend_path(SENC2D_FILES_INC ${SENC2D_SOURCE_DIR}) -rcmake_prepend_path(SENC2D_FILES_INC_API ${SENC2D_SOURCE_DIR}) -rcmake_prepend_path(SENC2D_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -if(CMAKE_COMPILER_IS_GNUCC) - set(MATH_LIB m) -endif() - -add_library(senc2d SHARED - ${SENC2D_FILES_SRC} - ${SENC2D_FILES_INC} - ${SENC2D_FILES_INC_API}) -target_link_libraries(senc2d RSys Star2D ${MATH_LIB}) - -set_target_properties(senc2d PROPERTIES -# C99 needed in case of printf %zu used -# C_STANDARD 99 - DEFINE_SYMBOL SENC2D_SHARED_BUILD - VERSION ${VERSION} - COMPILE_FLAGS ${OpenMP_C_FLAGS} - SOVERSION ${VERSION_MAJOR}) -rcmake_copy_runtime_libraries(senc2d) - -if(CMAKE_COMPILER_IS_GNUCC) - set_target_properties(senc2d PROPERTIES LINK_FLAGS "${OpenMP_C_FLAGS}") - target_link_libraries(senc2d m) -endif() - -rcmake_setup_devel(senc2d StarEnc2D ${VERSION} star/senc2d_version.h) - -################################################################################ -# Add tests -################################################################################ -if(NOT NO_TEST) - function(build_test _name) - add_executable(${_name} - ${SENC2D_SOURCE_DIR}/test_senc2d_utils.h - ${SENC2D_SOURCE_DIR}/${_name}.c) - foreach(other ${ARGN}) - target_sources(${_name} - PUBLIC ${STAR_GEOM_SOURCE_DIR}/${other}) - endforeach() - target_link_libraries(${_name} RSys senc2d) - endfunction() - - function(register_test _name) - add_test(${_name} ${ARGN}) - rcmake_set_test_runtime_dirs(${_name} _runtime_dirs) - endfunction() - - function(new_test _name) - build_test(${_name} ${ARGN}) - register_test(${_name} ${_name}) - endfunction() - - new_test(test_senc2d_square_behind_square) - new_test(test_senc2d_square_in_square) - new_test(test_senc2d_square_on_square) - new_test(test_senc2d_device) - new_test(test_senc2d_enclosure) - new_test(test_senc2d_inconsistant_square) - new_test(test_senc2d_invalid_scenes) - new_test(test_senc2d_multi_media) - new_test(test_senc2d_scene) - new_test(test_senc2d_some_enclosures) - new_test(test_senc2d_some_segments) - new_test(test_senc2d_unspecified_medium) - - if(NOT StarSP_FOUND) - message(STATUS - "StarSP is not found. Do not compile the" - "'test_senc2d_sample_enclosure' test.") - else() - new_test(test_senc2d_sample_enclosure) - target_link_libraries(test_senc2d_sample_enclosure StarSP Star2D) - endif() - - build_test(test_senc2d_many_enclosures) - build_test(test_senc2d_many_segments) - - target_link_libraries(test_senc2d_enclosure Star2D) - - rcmake_copy_runtime_libraries(test_senc2d_many_enclosures test_senc2d_utils2.h) - rcmake_copy_runtime_libraries(test_senc2d_many_segments test_senc2d_utils2.h) - rcmake_copy_runtime_libraries(test_senc2d_sample_enclosure) - - if(HUGE_ADDITIONAL_TESTS) - add_test(test_senc2d_many_enclosures test_senc2d_many_enclosures) - add_test(test_senc2d_many_segments test_senc2d_many_segments) - endif() -endif() - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS senc2d - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${SENC2D_FILES_INC_API} DESTINATION include/star) -install(FILES ${SENC2D_FILES_DOC} DESTINATION share/doc/star-enclosures-2d)