From daf6d2fb7a95f3fc610c54e6623f43738a942fe3 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sun, 25 Dec 2022 17:30:08 +0100 Subject: [PATCH] refactor: downcasting-specific build options removed --- conanfile.py | 2 -- src/core/CMakeLists.txt | 18 ------------------ 2 files changed, 20 deletions(-) diff --git a/conanfile.py b/conanfile.py index ce659ec9..0ab25811 100644 --- a/conanfile.py +++ b/conanfile.py @@ -54,8 +54,6 @@ class MPUnitsConan(ConanFile): url = "https://github.com/mpusz/units" settings = "os", "compiler", "build_type", "arch" requires = "gsl-lite/0.40.0" - options = {"downcast_mode": ["off", "on", "auto"]} - default_options = {"downcast_mode": "on"} exports = ["LICENSE.md"] exports_sources = [ "docs/*", diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index cc5187bd..0e4ae547 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -22,10 +22,6 @@ cmake_minimum_required(VERSION 3.19) -# core library options -set(${projectPrefix}DOWNCAST_MODE ON CACHE STRING "Select downcasting mode") -set_property(CACHE ${projectPrefix}DOWNCAST_MODE PROPERTY STRINGS AUTO ON OFF) - # find dependencies find_package(gsl-lite CONFIG REQUIRED) @@ -65,20 +61,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") ) endif() -if(DEFINED ${projectPrefix}DOWNCAST_MODE) - set(downcast_mode_options OFF ON AUTO) - list(FIND downcast_mode_options "${${projectPrefix}DOWNCAST_MODE}" downcast_mode) - - if(downcast_mode EQUAL -1) - message(FATAL_ERROR - "'${projectPrefix}DOWNCAST_MODE' should be one of ${downcast_mode_options} ('${${projectPrefix}DOWNCAST_MODE}' received)" - ) - else() - message(STATUS "${projectPrefix}DOWNCAST_MODE: ${${projectPrefix}DOWNCAST_MODE}") - target_compile_definitions(mp-units-core INTERFACE ${projectPrefix}DOWNCAST_MODE=${downcast_mode}) - endif() -endif() - set_target_properties(mp-units-core PROPERTIES EXPORT_NAME core) add_library(mp-units::core ALIAS mp-units-core)