diff --git a/CMakeLists.txt b/CMakeLists.txt index 41d43c1e..a2fb4f47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,9 +29,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # set paths to Conan packages include(${CMAKE_BINARY_DIR}/conan_paths.cmake OPTIONAL) -# include common tools and workarounds -include(common/scripts) - # enable static analysis #enable_clang_tidy() #enable_iwyu() @@ -40,6 +37,7 @@ include(common/scripts) add_subdirectory(src) # set restrictive compilation warnings +include(warnings) set_warnings(mp-units) # add usage example diff --git a/cmake/common/scripts.cmake b/cmake/common/scripts.cmake deleted file mode 100644 index cf732be5..00000000 --- a/cmake/common/scripts.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2017 Mateusz Pusz -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") - -include(install) -include(static_analysis) -include(warnings) diff --git a/cmake/common/simple-config.cmake.in b/cmake/common/simple-config.cmake.in deleted file mode 100644 index f40ebfa8..00000000 --- a/cmake/common/simple-config.cmake.in +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") diff --git a/cmake/common/documentation.cmake b/cmake/documentation.cmake similarity index 99% rename from cmake/common/documentation.cmake rename to cmake/documentation.cmake index 9c80df01..4b1466da 100644 --- a/cmake/common/documentation.cmake +++ b/cmake/documentation.cmake @@ -20,7 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) find_package(Doxygen REQUIRED) find_package(Sphinx REQUIRED) diff --git a/cmake/common/install.cmake b/cmake/install.cmake similarity index 100% rename from cmake/common/install.cmake rename to cmake/install.cmake diff --git a/cmake/common/static_analysis.cmake b/cmake/static_analysis.cmake similarity index 100% rename from cmake/common/static_analysis.cmake rename to cmake/static_analysis.cmake diff --git a/cmake/common/warnings.cmake b/cmake/warnings.cmake similarity index 100% rename from cmake/common/warnings.cmake rename to cmake/warnings.cmake diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a8a457f3..4df6fa9b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,9 +33,6 @@ set_property(CACHE UNITS_DOWNCAST_MODE PROPERTY STRINGS AUTO ON OFF) # set path to custom cmake modules list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") -# include common tools and workarounds -include(common/scripts) - find_package(fmt CONFIG REQUIRED) find_package(Microsoft.GSL CONFIG REQUIRED) @@ -83,6 +80,8 @@ endif() add_library(mp-units::mp-units ALIAS mp-units) +include(install) + # installation info install_targets(mp-units) install(DIRECTORY include/units