From f46046162d7727ea0e031054e71c4fca476ee8c5 Mon Sep 17 00:00:00 2001 From: Nathan Gibson Date: Thu, 29 Oct 2020 10:16:34 -0600 Subject: [PATCH 1/3] Updated to new build system. --- .gitmodules | 12 - CMakeLists.txt | 357 ++------- cmake/develop_dependencies.cmake | 41 + cmake/unit_testing.cmake | 15 + dependencies/Log | 1 - dependencies/catch-adapter | 1 - dependencies/dimwits | 1 - dependencies/range-v3-adapter | 1 - metaconfigure/LICENSE | 10 - metaconfigure/README.md | 6 - metaconfigure/__init__.py | 2 - metaconfigure/cmake.py | 703 ------------------ metaconfigure/collect_subprojects.py | 61 -- metaconfigure/configuration.py | 138 ---- metaconfigure/description.json | 629 ---------------- metaconfigure/description.py | 169 ----- metaconfigure/docs/.gitignore | 4 - metaconfigure/docs/Gemfile | 26 - metaconfigure/docs/LICENSE.md | 13 - metaconfigure/docs/README-jekyll.md | 25 - metaconfigure/docs/Updating.md | 61 -- metaconfigure/docs/_config.yml | 29 - metaconfigure/docs/_data/navigation.yml | 11 - metaconfigure/docs/_includes/footer.html | 23 - metaconfigure/docs/_includes/head.html | 12 - metaconfigure/docs/_includes/header.html | 11 - metaconfigure/docs/_includes/icon-github.html | 1 - metaconfigure/docs/_includes/icon-github.svg | 1 - metaconfigure/docs/_includes/nav.html | 20 - metaconfigure/docs/_layouts/default.html | 20 - metaconfigure/docs/_layouts/home.html | 9 - metaconfigure/docs/_layouts/page.html | 14 - metaconfigure/docs/_layouts/post.html | 18 - metaconfigure/docs/_sass/_base.scss | 206 ----- metaconfigure/docs/_sass/_layout.scss | 242 ------ .../docs/_sass/_syntax-highlighting.scss | 71 -- metaconfigure/docs/assets/main.scss | 39 - metaconfigure/docs/index.md | 20 - metaconfigure/fetch_subprojects.py | 105 --- metaconfigure/generate.py | 16 - metaconfigure/signature.py | 42 -- 41 files changed, 108 insertions(+), 3078 deletions(-) create mode 100644 cmake/develop_dependencies.cmake create mode 100644 cmake/unit_testing.cmake delete mode 160000 dependencies/Log delete mode 160000 dependencies/catch-adapter delete mode 160000 dependencies/dimwits delete mode 160000 dependencies/range-v3-adapter delete mode 100644 metaconfigure/LICENSE delete mode 100644 metaconfigure/README.md delete mode 100644 metaconfigure/__init__.py delete mode 100644 metaconfigure/cmake.py delete mode 100644 metaconfigure/collect_subprojects.py delete mode 100644 metaconfigure/configuration.py delete mode 100644 metaconfigure/description.json delete mode 100644 metaconfigure/description.py delete mode 100644 metaconfigure/docs/.gitignore delete mode 100644 metaconfigure/docs/Gemfile delete mode 100644 metaconfigure/docs/LICENSE.md delete mode 100644 metaconfigure/docs/README-jekyll.md delete mode 100644 metaconfigure/docs/Updating.md delete mode 100644 metaconfigure/docs/_config.yml delete mode 100644 metaconfigure/docs/_data/navigation.yml delete mode 100644 metaconfigure/docs/_includes/footer.html delete mode 100644 metaconfigure/docs/_includes/head.html delete mode 100644 metaconfigure/docs/_includes/header.html delete mode 100644 metaconfigure/docs/_includes/icon-github.html delete mode 100644 metaconfigure/docs/_includes/icon-github.svg delete mode 100644 metaconfigure/docs/_includes/nav.html delete mode 100644 metaconfigure/docs/_layouts/default.html delete mode 100644 metaconfigure/docs/_layouts/home.html delete mode 100644 metaconfigure/docs/_layouts/page.html delete mode 100644 metaconfigure/docs/_layouts/post.html delete mode 100644 metaconfigure/docs/_sass/_base.scss delete mode 100644 metaconfigure/docs/_sass/_layout.scss delete mode 100644 metaconfigure/docs/_sass/_syntax-highlighting.scss delete mode 100644 metaconfigure/docs/assets/main.scss delete mode 100644 metaconfigure/docs/index.md delete mode 100755 metaconfigure/fetch_subprojects.py delete mode 100755 metaconfigure/generate.py delete mode 100755 metaconfigure/signature.py diff --git a/.gitmodules b/.gitmodules index 9384c6b..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +0,0 @@ -[submodule "dependencies/catch-adapter"] - path = dependencies/catch-adapter - url = https://github.com/njoy/catch-adapter.git -[submodule "dependencies/dimwits"] - path = dependencies/dimwits - url = https://github.com/njoy/DimensionalAnalysis.git -[submodule "dependencies/range-v3-adapter"] - path = dependencies/range-v3-adapter - url = https://github.com/njoy/range-v3-adapter.git -[submodule "dependencies/Log"] - path = dependencies/Log - url = https://github.com/njoy/Log.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 56b0568..8834422 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,330 +1,77 @@ +######################################################################## +# Preamble +######################################################################## -cmake_minimum_required( VERSION 3.2 ) -set( CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Supported configuration types" FORCE ) - -if ( NOT GIT_EXECUTABLE ) - find_package( Git 2.1 ) - if ( NOT GIT_FOUND ) - message( FATAL_ERROR "git installation was not found." ) - endif() -endif() - -if( NOT ROOT_DIRECTORY ) - set( ROOT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) - if ( NOT fetched_subprojects ) - if ( NOT PYTHON_EXECUTABLE ) - find_package( PythonInterp 3.4 ) - if ( NOT PYTHONINTERP_FOUND ) - message( FATAL_ERROR "Python interpreter installation was not found." ) - endif() - endif() - execute_process( COMMAND ${PYTHON_EXECUTABLE} "./metaconfigure/fetch_subprojects.py" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE fetch_failure ) - if ( NOT fetch_failure ) - set( fetched_subprojects TRUE CACHE BOOL "fetch script ran" ) - else() - message( FATAL_ERROR "Failed to fetch dependencies" ) - endif() - endif() -endif() - -if( NOT is_subproject ) - if( NOT ROOT_DIRECTORY ) - set( ROOT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) - endif() - if ( NOT PYTHON_EXECUTABLE ) - find_package( PythonInterp ) - if ( NOT PYTHONINTERP_FOUND ) - message( FATAL_ERROR "Python interpreter installation was not found." ) - endif() - endif() - execute_process( COMMAND ${PYTHON_EXECUTABLE} ./metaconfigure/signature.py ${CMAKE_BINARY_DIR}/signature - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE signature_failure ) - file( READ "${CMAKE_BINARY_DIR}/signature.json" SIGNATURE ) -endif() - +cmake_minimum_required( VERSION 3.14 ) project( constants LANGUAGES CXX ) -get_directory_property( is_subproject PARENT_DIRECTORY ) -include( CMakeDependentOption REQUIRED ) -set( constants_AppleClang_minimum_version 8.0 ) -set( constants_GNU_minimum_version 6.2 ) -set( constants_Clang_minimum_version 3.8 ) - -if( constants_${CMAKE_CXX_COMPILER_ID}_minimum_version ) - if( CMAKE_CXX_COMPILER_VERSION AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS - ${constants_${CMAKE_CXX_COMPILER_ID}_minimum_version} ) - message( FATAL_ERROR "${CMAKE_CXX_COMPILER_ID} version must be greater than ${constants_${CMAKE_CXX_COMPILER_ID}_minimum_version}" ) - endif() -endif() -# general properties -option( constants_strict "Compile time warnings are converted to errors" ON ) +######################################################################## +# Project-wide setup +######################################################################## -# binary instrumentation -option( coverage "Enable binary instrumentation to collect test coverage information in the DEBUG configuration" ) -option( profile_generate "Enable binary instrumentation to generation execution profiles in the RELEASE configuration which may be used to guide later optimization" ) +set( CMAKE_CXX_STANDARD 17 ) +set( CMAKE_CXX_STANDARD_REQUIRED YES ) -# additional optimizations -option( link_time_optimization "Enable link time optimization in the RELEASE configuration" ) -option( profile_use "In the RELEASE configuration, leverage previously generated execution profile to inform optimization decisions" ) -option( nonportable_optimization "Enable optimizations which compromise portability of resulting binary in the RELEASE configuration" ) +option( constants_unit_tests + "Compile the constants unit tests and integrate with ctest" ON + ) +option( strict_compile + "Treat all warnings as errors." ON + ) -# libraries and linking -option( static "Statically link component and environment libraries" OFF ) -if ( static AND ( "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" ) ) - message( FATAL_ERROR "Static binaries not supported on OSX" ) -endif() +# Compile flags +set( common_flags "-Wall" "-Wextra" "-Wpedantic" ) +set( strict_flags "-Werror" ) +set( release_flags "-O3" ) +set( debug_flags "-O0" "-g" ) -CMAKE_DEPENDENT_OPTION( static_libraries "Statically link component libraries" OFF "NOT static" ON ) -option( unit_tests "Compile the constants unit tests and integrate with ctest" ON ) +######################################################################## +# Dependencies +######################################################################## -if ( profile_generate AND profile_use ) - message( FATAL_ERROR "Cannot both generate and use execution profile in the same configuration" ) -endif() +set( REPOSITORIES "release" + CACHE STRING + "Options for where to fetch repositories: develop, release, local" + ) -if ( profile_generate ) - file( MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/profiling" ) -endif() +if( REPOSITORIES STREQUAL "develop" ) + include( cmake/develop_dependencies.cmake ) -set( constants_AppleClang_Darwin_common_flags "-stdlib=libc++" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_AppleClang_Darwin_DEBUG_flags "-O0" "-g" "-gdwarf-3" ) -set( constants_AppleClang_Darwin_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_AppleClang_Darwin_strict_flags "-Werror" ) -set( constants_AppleClang_Darwin_coverage_flags "--coverage" ) -set( constants_AppleClang_Darwin_subproject_flags ) -set( constants_AppleClang_Darwin_base_project_flags ) -set( constants_AppleClang_Darwin_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_AppleClang_Darwin_link_time_optimization_flags "-flto" ) -set( constants_AppleClang_Darwin_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_AppleClang_Darwin_nonportable_optimization_flags "-march=native" ) -set( constants_AppleClang_Darwin_static_flags "-static" ) -set( constants_GNU_CYGWIN_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=gnu++17" ) -set( constants_GNU_CYGWIN_DEBUG_flags "-O0" "-g" "-gdwarf-3" "-fsignaling-nans" ) -set( constants_GNU_CYGWIN_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_GNU_CYGWIN_strict_flags "-Werror" ) -set( constants_GNU_CYGWIN_coverage_flags "--coverage" ) -set( constants_GNU_CYGWIN_subproject_flags ) -set( constants_GNU_CYGWIN_base_project_flags ) -set( constants_GNU_CYGWIN_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_CYGWIN_link_time_optimization_flags "-flto" ) -set( constants_GNU_CYGWIN_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_CYGWIN_nonportable_optimization_flags "-march=native" ) -set( constants_GNU_CYGWIN_static_flags "-static" ) -set( constants_GNU_Linux_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_GNU_Linux_DEBUG_flags "-O0" "-g" "-gdwarf-3" "-fsignaling-nans" ) -set( constants_GNU_Linux_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_GNU_Linux_strict_flags "-Werror" ) -set( constants_GNU_Linux_coverage_flags "--coverage" ) -set( constants_GNU_Linux_subproject_flags ) -set( constants_GNU_Linux_base_project_flags ) -set( constants_GNU_Linux_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_Linux_link_time_optimization_flags "-flto" ) -set( constants_GNU_Linux_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_Linux_nonportable_optimization_flags "-march=native" ) -set( constants_GNU_Linux_static_flags "-static" ) -set( constants_GNU_MinGW_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_GNU_MinGW_DEBUG_flags "-O0" "-g" "-gdwarf-3" "-fsignaling-nans" ) -set( constants_GNU_MinGW_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_GNU_MinGW_strict_flags "-Werror" ) -set( constants_GNU_MinGW_coverage_flags "--coverage" ) -set( constants_GNU_MinGW_subproject_flags ) -set( constants_GNU_MinGW_base_project_flags ) -set( constants_GNU_MinGW_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_MinGW_link_time_optimization_flags "-flto" ) -set( constants_GNU_MinGW_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_MinGW_nonportable_optimization_flags "-march=native" ) -set( constants_GNU_MinGW_static_flags "-static" ) -set( constants_GNU_Windows_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_GNU_Windows_DEBUG_flags "-O0" "-g" "-gdwarf-3" "-fsignaling-nans" ) -set( constants_GNU_Windows_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_GNU_Windows_strict_flags "-Werror" ) -set( constants_GNU_Windows_coverage_flags "--coverage" ) -set( constants_GNU_Windows_subproject_flags ) -set( constants_GNU_Windows_base_project_flags ) -set( constants_GNU_Windows_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_Windows_link_time_optimization_flags "-flto" ) -set( constants_GNU_Windows_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_Windows_nonportable_optimization_flags "-march=native" ) -set( constants_GNU_Windows_static_flags "-static" ) -set( constants_GNU_Darwin_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_GNU_Darwin_DEBUG_flags "-O0" "-g" "-gdwarf-3" "-fsignaling-nans" ) -set( constants_GNU_Darwin_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_GNU_Darwin_strict_flags "-Werror" ) -set( constants_GNU_Darwin_coverage_flags "--coverage" ) -set( constants_GNU_Darwin_subproject_flags ) -set( constants_GNU_Darwin_base_project_flags ) -set( constants_GNU_Darwin_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_Darwin_link_time_optimization_flags "-flto" ) -set( constants_GNU_Darwin_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_GNU_Darwin_nonportable_optimization_flags "-march=native" ) -set( constants_GNU_Darwin_static_flags "-static" ) -set( constants_Clang_CYGWIN_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=gnu++17" ) -set( constants_Clang_CYGWIN_DEBUG_flags "-O0" "-g" "-gdwarf-3" "-fsignaling-nans" ) -set( constants_Clang_CYGWIN_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_Clang_CYGWIN_strict_flags "-Werror" ) -set( constants_Clang_CYGWIN_coverage_flags "--coverage" ) -set( constants_Clang_CYGWIN_subproject_flags ) -set( constants_Clang_CYGWIN_base_project_flags ) -set( constants_Clang_CYGWIN_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_CYGWIN_link_time_optimization_flags "-flto" ) -set( constants_Clang_CYGWIN_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_CYGWIN_nonportable_optimization_flags "-march=native" ) -set( constants_Clang_CYGWIN_static_flags "-static" ) -set( constants_Clang_Linux_common_flags "-stdlib=libstdc++" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_Clang_Linux_DEBUG_flags "-O0" "-g" "-gdwarf-3" ) -set( constants_Clang_Linux_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_Clang_Linux_strict_flags "-Werror" ) -set( constants_Clang_Linux_coverage_flags "--coverage" ) -set( constants_Clang_Linux_subproject_flags ) -set( constants_Clang_Linux_base_project_flags ) -set( constants_Clang_Linux_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_Linux_link_time_optimization_flags "-flto" ) -set( constants_Clang_Linux_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_Linux_nonportable_optimization_flags "-march=native" ) -set( constants_Clang_Linux_static_flags "-static" ) -set( constants_Clang_MinGW_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_Clang_MinGW_DEBUG_flags "-O0" "-g" "-gdwarf-3" "-fsignaling-nans" ) -set( constants_Clang_MinGW_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_Clang_MinGW_strict_flags "-Werror" ) -set( constants_Clang_MinGW_coverage_flags "--coverage" ) -set( constants_Clang_MinGW_subproject_flags ) -set( constants_Clang_MinGW_base_project_flags ) -set( constants_Clang_MinGW_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_MinGW_link_time_optimization_flags "-flto" ) -set( constants_Clang_MinGW_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_MinGW_nonportable_optimization_flags "-march=native" ) -set( constants_Clang_MinGW_static_flags "-static" ) -set( constants_Clang_Windows_common_flags "-stdlib=libc++" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_Clang_Windows_DEBUG_flags "-O0" "-g" "-gdwarf-3" ) -set( constants_Clang_Windows_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_Clang_Windows_strict_flags "-Werror" ) -set( constants_Clang_Windows_coverage_flags "--coverage" ) -set( constants_Clang_Windows_subproject_flags ) -set( constants_Clang_Windows_base_project_flags ) -set( constants_Clang_Windows_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_Windows_link_time_optimization_flags "-flto" ) -set( constants_Clang_Windows_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_Windows_nonportable_optimization_flags "-march=native" ) -set( constants_Clang_Windows_static_flags "-static" ) -set( constants_Clang_Darwin_common_flags "-stdlib=libc++" "-Wall" "-Wextra" "-Wpedantic" "-std=c++17" ) -set( constants_Clang_Darwin_DEBUG_flags "-O0" "-g" "-gdwarf-3" ) -set( constants_Clang_Darwin_RELEASE_flags "-O3" "-DNDEBUG" ) -set( constants_Clang_Darwin_strict_flags "-Werror" ) -set( constants_Clang_Darwin_coverage_flags "--coverage" ) -set( constants_Clang_Darwin_subproject_flags ) -set( constants_Clang_Darwin_base_project_flags ) -set( constants_Clang_Darwin_profile_generate_flags "-fprofile-generate='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_Darwin_link_time_optimization_flags "-flto" ) -set( constants_Clang_Darwin_profile_use_flags "-fprofile-use='${CMAKE_BINARY_DIR}/profiling'" ) -set( constants_Clang_Darwin_nonportable_optimization_flags "-march=native" ) -set( constants_Clang_Darwin_static_flags "-static" ) -get_directory_property( is_subproject PARENT_DIRECTORY ) +elseif( REPOSITORIES STREQUAL "release" ) + include( cmake/release_dependencies.cmake ) -if( NOT TARGET range-v3-adapter ) - add_subdirectory( ${ROOT_DIRECTORY}/subprojects/range-v3-adapter ) -endif() +elseif( REPOSITORIES STREQUAL "local" ) + include( cmake/local_dependencies.cmake ) -if( NOT TARGET catch-adapter ) - add_subdirectory( ${ROOT_DIRECTORY}/subprojects/catch-adapter ) endif() -if( NOT TARGET fmt-adapter ) - add_subdirectory( ${ROOT_DIRECTORY}/subprojects/fmt-adapter ) -endif() -if( NOT TARGET spdlog-adapter ) - add_subdirectory( ${ROOT_DIRECTORY}/subprojects/spdlog-adapter ) -endif() +######################################################################## +# Project targets +######################################################################## -if( NOT TARGET Log ) - add_subdirectory( ${ROOT_DIRECTORY}/subprojects/Log ) -endif() +add_library( constants INTERFACE + ) +target_include_directories( constants INTERFACE src/ ) +target_link_libraries( constants + INTERFACE range-v3-adapter + INTERFACE catch-adapter + INTERFACE Log + INTERFACE dimwits + ) -if( NOT TARGET hana-adapter ) - add_subdirectory( ${ROOT_DIRECTORY}/subprojects/hana-adapter ) -endif() -if( NOT TARGET dimwits ) - add_subdirectory( ${ROOT_DIRECTORY}/subprojects/dimwits ) -endif() +####################################################################### +# Top-level Only +####################################################################### +if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) -if ( NOT GIT_EXECUTABLE ) - find_package( Git ) - if ( NOT GIT_FOUND ) - message( FATAL_ERROR "git installation was not found." ) + # unit testing + if( constants_unit_tests ) + include( cmake/unit_testing.cmake ) endif() -endif() - -execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE -) -execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE -) -message( STATUS "" ) -message( STATUS "-----------------------------------------------------------" ) -message( STATUS "" ) -message( STATUS "constants" ) -message( STATUS "Git current branch: ${GIT_BRANCH}" ) -message( STATUS "Git commit hash: ${GIT_HASH}" ) -message( STATUS "" ) -message( STATUS "-----------------------------------------------------------" ) - -add_library( constants INTERFACE ) -target_sources( constants INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/src/constants.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/testing.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/CODATA2014.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/map.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/math.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/tags.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/CODATA2018.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/testing/src/defineReferenceValues.hpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/constants/testing/src/toValue.hpp" ) - -target_include_directories( constants INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/src src/ ) - -set( PREFIX constants_${CMAKE_CXX_COMPILER_ID}_${CMAKE_SYSTEM_NAME} ) - -target_link_libraries( constants INTERFACE "$<$,$>:${${PREFIX}_RELEASE_flags};${${PREFIX}_link_time_optimization_flags}$<$:${${PREFIX}_profile_generate_flags};>$<$:${${PREFIX}_profile_use_flags};>$<$:${${PREFIX}_nonportable_optimization_flags};>>$<$:$<$:${${PREFIX}_coverage_flags};>>$<$:${CXX_appended_flags};>$<$:${constants_appended_flags};>" ) - -target_link_libraries( constants INTERFACE range-v3-adapter INTERFACE catch-adapter INTERFACE Log INTERFACE dimwits ) - -if( NOT is_subproject ) - enable_testing() - if ( unit_tests ) - add_subdirectory( src/constants/CODATA2014/test ) - add_subdirectory( src/constants/CODATA2018/test ) - add_subdirectory( src/constants/math/test ) - endif() endif() - -install( FILES "${CMAKE_BINARY_DIR}/signature.json" - DESTINATION share/${CMAKE_PROJECT_NAME} - PERMISSIONS OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ -) -install( DIRECTORY src// DESTINATION include - FILE_PERMISSIONS OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ - DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ - FILES_MATCHING REGEX ".*\.h[+][+]$|.*\.hxx$|.*\.hpp$|.*\.hh$|.*\.h$" ) - - INCLUDE(CPack) - \ No newline at end of file diff --git a/cmake/develop_dependencies.cmake b/cmake/develop_dependencies.cmake new file mode 100644 index 0000000..5296a13 --- /dev/null +++ b/cmake/develop_dependencies.cmake @@ -0,0 +1,41 @@ +cmake_minimum_required( VERSION 3.14 ) +include( FetchContent ) + +####################################################################### +# Declare project dependencies +####################################################################### + +FetchContent_Declare( range-v3-adapter + GIT_REPOSITORY https://github.com/njoy/range-v3-adapter + GIT_TAG origin/master + GIT_SHALLOW TRUE + ) + +FetchContent_Declare( catch-adapter + GIT_REPOSITORY https://github.com/njoy/catch-adapter + GIT_TAG origin/master + GIT_SHALLOW TRUE + ) + +FetchContent_Declare( Log + GIT_REPOSITORY https://github.com/njoy/Log + GIT_TAG origin/master + GIT_SHALLOW TRUE + ) + +FetchContent_Declare( dimwits + GIT_REPOSITORY https://github.com/njoy/DimensionalAnalysis + GIT_TAG origin/master + GIT_SHALLOW TRUE + ) + +####################################################################### +# Load dependencies +####################################################################### + +FetchContent_MakeAvailable( + range-v3-adapter + catch-adapter + Log + dimwits + ) diff --git a/cmake/unit_testing.cmake b/cmake/unit_testing.cmake new file mode 100644 index 0000000..81dccf8 --- /dev/null +++ b/cmake/unit_testing.cmake @@ -0,0 +1,15 @@ +####################################################################### +# Setup +####################################################################### + +message( STATUS "Adding constants unit testing" ) +enable_testing() + + +####################################################################### +# Unit testing directories +####################################################################### + +add_subdirectory( src/constants/CODATA2014/test ) +add_subdirectory( src/constants/CODATA2018/test ) +add_subdirectory( src/constants/math/test ) diff --git a/dependencies/Log b/dependencies/Log deleted file mode 160000 index 0bdd885..0000000 --- a/dependencies/Log +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0bdd885bb9da924d876db2e240157a420abf97f0 diff --git a/dependencies/catch-adapter b/dependencies/catch-adapter deleted file mode 160000 index fb84b82..0000000 --- a/dependencies/catch-adapter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fb84b82ebf7a4789aa43cea560680cf745c6ee4f diff --git a/dependencies/dimwits b/dependencies/dimwits deleted file mode 160000 index d2b187e..0000000 --- a/dependencies/dimwits +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d2b187ef57addd5e821c297cdef1ab2c914858a6 diff --git a/dependencies/range-v3-adapter b/dependencies/range-v3-adapter deleted file mode 160000 index e8b1fb8..0000000 --- a/dependencies/range-v3-adapter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e8b1fb8a3e0ca6834b90d1fe2ddd0be611e3d71c diff --git a/metaconfigure/LICENSE b/metaconfigure/LICENSE deleted file mode 100644 index df778cf..0000000 --- a/metaconfigure/LICENSE +++ /dev/null @@ -1,10 +0,0 @@ -Copyright (c) 2016, Los Alamos National Security, LLC -All rights reserved. -Copyright 2016. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the U.S. Department of Energy. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from LANL. - -Additionally, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of Los Alamos National Security, LLC, Los Alamos National Laboratory, LANL, the U.S. Government, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/metaconfigure/README.md b/metaconfigure/README.md deleted file mode 100644 index 180427a..0000000 --- a/metaconfigure/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# NJOY metaconfigure -The metaconfigure package contains a suite of Python scripts to assist in the generation of build system configuration files for NJOY projects. - - -## License -This software is distributed according to the terms specified in the [LICENSE](LICENSE) file. diff --git a/metaconfigure/__init__.py b/metaconfigure/__init__.py deleted file mode 100644 index 587ee5a..0000000 --- a/metaconfigure/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from metaconfigure import description -from metaconfigure import cmake diff --git a/metaconfigure/cmake.py b/metaconfigure/cmake.py deleted file mode 100644 index 7124cd5..0000000 --- a/metaconfigure/cmake.py +++ /dev/null @@ -1,703 +0,0 @@ -import os -import textwrap -from . import description - -language = {'c' : 'C', 'c++' : 'CXX', 'fortran' : 'Fortran'} -platform = {'linux':'Linux', 'osx':'Darwin', 'windows':'Windows', - 'cygwin':'CYGWIN', 'mingw':'MinGW'} -vendor = {'gcc' : 'GNU', - 'g++' : 'GNU', - 'gfortran' : 'GNU', - 'llvm clang' : 'Clang', - 'llvm clang++' : 'Clang', - 'apple clang' : 'AppleClang', - 'apple clang++' : 'AppleClang'} - - -def fetch_subprojects(state): - contents = "" - if state['subprojects']: - contents += textwrap.dedent( - """ - if ( NOT GIT_EXECUTABLE ) - find_package( Git 2.1 ) - if ( NOT GIT_FOUND ) - message( FATAL_ERROR "git installation was not found." ) - endif() - endif() - - if( NOT ROOT_DIRECTORY ) - set( ROOT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) - if ( NOT fetched_subprojects ) - if ( NOT PYTHON_EXECUTABLE ) - find_package( PythonInterp 3.4 ) - if ( NOT PYTHONINTERP_FOUND ) - message( FATAL_ERROR "Python interpreter installation was not found." ) - endif() - endif() - execute_process( COMMAND ${PYTHON_EXECUTABLE} "./metaconfigure/fetch_subprojects.py" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE fetch_failure ) - if ( NOT fetch_failure ) - set( fetched_subprojects TRUE CACHE BOOL "fetch script ran" ) - else() - message( FATAL_ERROR "Failed to fetch dependencies" ) - endif() - endif() - endif() - """) - - return contents - -def signature(): - """ - Generate the 'signature' for the project - """ - contents = textwrap.dedent( - """ - if( NOT is_subproject ) - if( NOT ROOT_DIRECTORY ) - set( ROOT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) - endif() - if ( NOT PYTHON_EXECUTABLE ) - find_package( PythonInterp ) - if ( NOT PYTHONINTERP_FOUND ) - message( FATAL_ERROR "Python interpreter installation was not found." ) - endif() - endif() - execute_process( COMMAND ${PYTHON_EXECUTABLE} ./metaconfigure/signature.py ${CMAKE_BINARY_DIR}/signature - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE signature_failure ) - file( READ "${CMAKE_BINARY_DIR}/signature.json" SIGNATURE ) - endif() - """) - - return contents - -def subproject_languages(state): - languages=set() - if 'subprojects' in state: - for subproject in state['subprojects'].values(): - languages.add(subproject['language']) - languages=languages | subproject_languages(subproject) - - return languages - - -def has_library(state): - return bool(state['implementation files']) - - -def has_executable(state): - return 'driver' in state - - -def has_unit_tests(state): - return 'tests' in state and state['tests'] - - -def has_tests(state): - return has_unit_tests(state) or os.path.isdir("tests") - - -def project_statement(state): - project_language = language[state['language']] - contents = "\nproject( {name} LANGUAGES {language} )".format(name=state['name'], - language=project_language) - contents += "\nget_directory_property( is_subproject PARENT_DIRECTORY )" - contents += "\ninclude( CMakeDependentOption REQUIRED )" - additional_languages = subproject_languages(state) - if state['language'] in additional_languages: - additional_languages.remove(state['language']) - - for addition in additional_languages: - contents += "\nenable_language( {0} )".format(language[addition]) - - return contents - - -def compiler_minimum(state): - contents='' - any_=False - for name, compiler in state['compiler'].items(): - if 'minimum version' in compiler: - any_=True - contents += "\nset( {name}_{vendor}_minimum_version {version} )".format(name=state['name'], - vendor=vendor[name], - version=compiler['minimum version']) - - if any_: - contents += """ - -if( {name}_${{CMAKE_{language}_COMPILER_ID}}_minimum_version ) - if( CMAKE_{language}_COMPILER_VERSION AND - CMAKE_{language}_COMPILER_VERSION VERSION_LESS - ${{{name}_${{CMAKE_{language}_COMPILER_ID}}_minimum_version}} ) - message( FATAL_ERROR "${{CMAKE_{language}_COMPILER_ID}} version must be greater than ${{{name}_${{CMAKE_{language}_COMPILER_ID}}_minimum_version}}" ) - endif() -endif()""".format(language=language[state['language']], - name=state['name']) - - return '\n' + contents - - -def make_aux_directories(state): - contents=""" - - if ( profile_generate ) - file( MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/profiling" ) - endif()""" - if state['language'] == 'fortran': - contents += """ - - set( CMAKE_Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/fortran_modules" CACHE PATH "directory for fortran modules" ) - file( MAKE_DIRECTORY "${CMAKE_Fortran_MODULE_DIRECTORY}" ) """ - - contents = textwrap.dedent(contents) - return contents - - -def define_options(state): - if state['is external project']: - return '' - - contents=""" - - # general properties - option( {name}_strict "Compile time warnings are converted to errors" {strict} ) - - # binary instrumentation - option( coverage "Enable binary instrumentation to collect test coverage information in the DEBUG configuration" ) - option( profile_generate "Enable binary instrumentation to generation execution profiles in the RELEASE configuration which may be used to guide later optimization" ) - - # additional optimizations - option( link_time_optimization "Enable link time optimization in the RELEASE configuration" ) - option( profile_use "In the RELEASE configuration, leverage previously generated execution profile to inform optimization decisions" ) - option( nonportable_optimization "Enable optimizations which compromise portability of resulting binary in the RELEASE configuration" ) - - # libraries and linking - option( static "Statically link component and environment libraries" OFF ) - if ( static AND ( "${{CMAKE_SYSTEM_NAME}}" STREQUAL "Darwin" ) ) - message( FATAL_ERROR "Static binaries not supported on OSX" ) - endif() - - CMAKE_DEPENDENT_OPTION( static_libraries "Statically link component libraries" OFF "NOT static" ON )""" - - if has_library(state): - contents += """ - CMAKE_DEPENDENT_OPTION( static_{name} "Statically link the {name} component library" OFF "NOT static;NOT static_libraries" ON ) """ - - if has_unit_tests(state): - contents += """ - - option( unit_tests "Compile the {name} unit tests and integrate with ctest" ON ) """ - - contents += """ - - if ( profile_generate AND profile_use ) - message( FATAL_ERROR "Cannot both generate and use execution profile in the same configuration" ) - endif()""" - - contents=textwrap.dedent(contents.format(name=state['name'], strict='ON' if state['strict'] else 'OFF')) - return contents - - -def traverse_subprojects(state): - contents='' - if state['subprojects'] and not state['is external project']: - contents += '\nget_directory_property( is_subproject PARENT_DIRECTORY )' - build_queue = description.reconstruct_build_queue(state) - build_queue.pop() - for subproject in build_queue: - contents += textwrap.dedent(""" - - if( NOT TARGET {subproject} ) - add_subdirectory( ${{ROOT_DIRECTORY}}/subprojects/{subproject} ) - endif()""".format(subproject=subproject)) - - contents += '\n' - - return contents - - -def define_compiler_flags(state): - contents="\n" - for compiler in state['compiler'].keys(): - for operating_system in set(['linux','windows','osx','cygwin','mingw']).intersection(state['compiler'][compiler].keys()): - environment=state['compiler'][compiler][operating_system] - flags=environment['flags'] - args ={ 'name' : state['name'], - 'vendor' : vendor[compiler], - 'platform' : platform[operating_system], - 'profile_path' : '${CMAKE_BINARY_DIR}/profiling' } - - args['common_flags']=' '.join(['"{0}"'.format(flag) for flag in - flags['common'] + flags['warning'] ]) - if 'standard' in state: - args['common_flags'] += ' "{0}"'.format(environment['standard'][state['standard']]) - - args['debug_flags']=' '.join(['"{0}"'.format(flag) for flag in flags['debug']]) - args['release_flags']=' '.join(['"{0}"'.format(flag) for flag in flags['optimization']]) - - keys=['strict', 'coverage', 'subproject', 'base project', - 'profile generate', 'link time optimization', 'profile use', - 'nonportable optimization', 'static'] - - options=[(key).replace(' ', '_') for key in keys] - - for pair in zip(keys, options): - args[pair[1] + '_flags']=' '.join(['"{0}"'.format(flag) for flag in flags[pair[0]]]) - - block="\nset( {name}_{vendor}_{platform}_common_flags {common_flags} )" - block += "\nset( {name}_{vendor}_{platform}_DEBUG_flags {debug_flags} )" - block += "\nset( {name}_{vendor}_{platform}_RELEASE_flags {release_flags} )" - - for option in options: - block += "\nset( {{name}}_{{vendor}}_{{platform}}_{option}_flags {{{option}_flags}} )".format(option=option) - - contents += block.format(**args).format(**args) - - return contents - - -def lto_flags_expression(state): - contents = "" - release = "${{${{PREFIX}}_RELEASE_flags}};".format(language=language[state['language']], name=state['name']) - link_time_optimization = "${{${{PREFIX}}_link_time_optimization_flags}}".format(language=language[state['language']], name=state['name']) - option_template = "$<$:${{{{${{{{PREFIX}}}}_{0}_flags}}}};>" - - profile_generate = option_template.format('profile_generate').format(language=language[state['language']], name=state['name']) - profile_use = option_template.format('profile_use').format(language=language[state['language']], name=state['name']) - nonportable_optimization = option_template.format('nonportable_optimization').format(language=language[state['language']], name=state['name']) - coverage = option_template.format('coverage').format(language=language[state['language']], name=state['name']) - language_appended_flags = "$<$:${{{0}_appended_flags}};>".format(language[state['language']]) - project_appended_flags = "$<$:${{{0}_appended_flags}};>".format(state['name']) - contents = "\"$<$,$>:{release}{link_time_optimization}{profile_generate}{profile_use}{nonportable_optimization}>$<$:{coverage}>{language_appended_flags}{project_appended_flags}\"" - contents = contents.format(release=release, - link_time_optimization=link_time_optimization, - profile_generate=profile_generate, - profile_use=profile_use, - nonportable_optimization=nonportable_optimization, - coverage=coverage, - language_appended_flags=language_appended_flags, - project_appended_flags=project_appended_flags) - - return contents - - -def target_flags_expression(state): - contents = "" - template = "\n${{{{${{{{PREFIX}}}}_{0}_flags}}}}" - common = template.format('common') - debug = template.format('DEBUG') - release = template.format('RELEASE') - - option_template = "\n$<$:${{{{${{{{PREFIX}}}}_{0}_flags}}}}>" - strict = "\n$<$:${{{{${{{{PREFIX}}}}_strict_flags}}}}>".format('{name}_strict') - coverage = option_template.format('coverage') - profile_generate = option_template.format('profile_generate') - link_time_optimization = option_template.format('link_time_optimization') - profile_use = option_template.format('profile_use') - nonportable_optimization = option_template.format('nonportable_optimization') - static = option_template.format('static') - - subproject = "\n$<$:${{${{PREFIX}}_subproject_flags}}>" - base_project = "\n$<$>:${{${{PREFIX}}_base_project_flags}}>" - addition = common + strict + static + subproject + base_project \ - + "\n$<$:" + debug + ' ' + coverage + '>' \ - + "\n$<$:"\ - + release + ' '\ - + profile_generate + ' '\ - + profile_use + ' '\ - + link_time_optimization\ - + ' ' + nonportable_optimization + ">" - contents += addition.format(language=language[state['language']], name=state['name']) - contents += "\n${{{language}_appended_flags}} ${{{name}_appended_flags}}".format(language=language[state['language']], name=state['name']) - return contents - - -def test_flags_expression(state): - contents = '' - template = "${{{{${{{{PREFIX}}}}_{0}_flags}}}}" - common = template.format('common') - debug = template.format('DEBUG') - release = template.format('RELEASE') - - option_template = "\n$<$:${{{{${{{{PREFIX}}}}_{0}_flags}}}}>" - coverage = option_template.format('coverage') - strict = option_template.format('strict') - link_time_optimization = option_template.format('link_time_optimization') - nonportable_optimization = option_template.format('nonportable_optimization') - - addition = common + strict \ - + "$<$:\n" + debug + coverage + '>' \ - + "\n$<$:\n" + release + link_time_optimization + nonportable_optimization + ">\n" - contents += addition.format(language=language[state['language']], name=state['name']) - - contents += "\n${{{language}_appended_flags}} ${{{name}_appended_flags}}".format(language=language[state['language']], name=state['name']) - return contents - - -def set_library_type(state): - if not has_library(state): - return '' - - return textwrap.dedent(""" - - if ( static_{name} ) - set( {name}_library_linkage STATIC ) - else () - set( {name}_library_linkage SHARED ) - endif () - - set( CMAKE_SKIP_BUILD_RPATH FALSE ) - set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE ) - if ( CMAKE_SYSTEM_NAME STREQUAL "Darwin" ) - set( rpath_prefix "@loader_path" ) - else() - set( rpath_prefix "\\\\$ORIGIN" ) - endif() - list( INSERT 0 CMAKE_INSTALL_RPATH "${{rpath_prefix}}/../lib" ) - set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )""").format(name=state['name']) - - -def collect_revision_info(state): - return textwrap.dedent(""" - - if ( NOT GIT_EXECUTABLE ) - find_package( Git ) - if ( NOT GIT_FOUND ) - message( FATAL_ERROR "git installation was not found." ) - endif() - endif() - - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) """) - - -def print_banner(state): - return textwrap.dedent(""" - - message( STATUS "" ) - message( STATUS "-----------------------------------------------------------" ) - message( STATUS "" ) - message( STATUS "{name}" ) - message( STATUS "Git current branch: ${{GIT_BRANCH}}" ) - message( STATUS "Git commit hash: ${{GIT_HASH}}" ) - message( STATUS "" ) - message( STATUS "-----------------------------------------------------------" ) - """.format(**state)) - - -def link_dependencies(state): - contents='' - if len(state['subprojects']) > 0 : - contents += '\ntarget_link_libraries( {name}'.format(name=state['name']) - for name, subproject in state['subprojects'].items(): - contents += (' PUBLIC {}' if has_library(state) else ' INTERFACE {}').format(name) - - contents += ' )\n' - - return contents - - -def add_targets(state): - format = {"name": state['name']} - - contents = "" - sources=[] - for group in state['file extension']: - if group == 'configure files': - continue - sources.extend(state[group]) - sources = '"\n "${CMAKE_CURRENT_SOURCE_DIR}/'.join(sources) - - for conf in state['configure files']: - hpp = conf[:-3] - contents += textwrap.dedent(""" - configure_file( "${{CMAKE_CURRENT_SOURCE_DIR}}/{conf}" - "${{CMAKE_CURRENT_BINARY_DIR}}/{hpp}" @ONLY ) - """.format( conf=conf, hpp=hpp )) - sources += '"\n "${CMAKE_CURRENT_BINARY_DIR}/' + hpp - - format['policy'] ="PUBLIC" if has_library(state) else "INTERFACE" - format['compile_flags'] = target_flags_expression(state) - format['link_flags'] = lto_flags_expression(state) - format['sources'] = sources - format['include_path'] = ( - state['include path'] if 'include path' in state else '') - format['include_binary_path'] = "${CMAKE_CURRENT_BINARY_DIR}/src" - format['language'] = language[state['language']] - format['driver'] = state['driver'] if 'driver' in state else '' - format['indented_compile_flags'] = ( - format['compile_flags'].replace('\n', '\n ')) - - if has_library(state): - contents+=""" -add_library( {name} ${{{name}_library_linkage}} - "${{CMAKE_CURRENT_SOURCE_DIR}}/{sources}" ) - """.format(**format) - else: - contents+=""" -add_library( {name} INTERFACE ) -target_sources( {name} INTERFACE "${{CMAKE_CURRENT_SOURCE_DIR}}/{sources}" ) - """.format(**format) - - if state['language'] == 'fortran': - contents += """ -target_include_directories( {name} PUBLIC "${{CMAKE_Fortran_MODULE_DIRECTORY}}" ) - """.format(**format) - - if 'include path' in state: - contents += """ -target_include_directories( {name} {policy} {include_binary_path} {include_path} ) - """.format(**format) - - if has_library(state) or has_executable(state) or has_tests(state): - contents += """ -set( PREFIX {name}_${{CMAKE_{language}_COMPILER_ID}}_${{CMAKE_SYSTEM_NAME}} ) - """.format(**format) - - if has_library(state): - contents += """ -target_compile_options( {name} PRIVATE {compile_flags} ) - """.format(**format) - - contents += """ -target_link_libraries( {name} {policy} {link_flags} ) - """.format(**format) - contents += link_dependencies(state) - - if has_executable(state): - contents += textwrap.dedent( - """ -if ( NOT is_subproject ) - add_executable( {name}_executable {driver} ) - set_target_properties( {name}_executable PROPERTIES OUTPUT_NAME {name} ) - target_compile_options( {name}_executable PRIVATE {indented_compile_flags} ) - target_link_libraries( {name}_executable {policy} {name} ) -endif() - """.format(**format)) - - return textwrap.dedent(contents) - - -def add_tests(state): - contents='' - if not state['is external project']: - if has_tests(state): - name=state['name'] - contents=""" - if( NOT is_subproject ) - enable_testing() """ - if state['tests']: - expression=test_flags_expression(state) - contents += """ - if ( unit_tests )""" - for test_name, sources in state['tests'].items(): - executable_name=test_name + '.test' - try: - directory=os.path.dirname(sources[0]) - except IndexError: - print("Error while generating CMakeLists.txt for {}".format(executable_name)) - print("There seem to be no associated source files. Does this project use unusual file extensions?") - raise - contents += """ - add_subdirectory( {} )""".format(directory) - test_contents=""" -add_executable( {executable_name}""" - split='\n ' if len(sources) > 1 else ' ' - test_contents += split + split.join([os.path.split(entry)[1] for entry in sources]) + ' )' - test_contents += """ -target_compile_options( {executable_name} PRIVATE {expression} ) -target_link_libraries( {executable_name} PUBLIC {name} ) """ - if os.path.isdir(os.path.join(directory, 'resources')): - test_contents += """ -file( GLOB resources "resources/*" )""" - test_contents += """ -foreach( resource ${{resources}})""" - test_contents += """ - file( COPY "${{resource}}" DESTINATION "${{CMAKE_CURRENT_BINARY_DIR}}" )""" - test_contents += """ -endforeach()""" - - test_contents += """ -add_test( NAME {test_name} COMMAND {executable_name} )""" - test_contents=textwrap.dedent(test_contents).format(executable_name=executable_name, - test_name=test_name, - expression=expression, - name=name) - with open(os.path.join(directory, 'CMakeLists.txt'), 'w') as TestCMakeFile: - TestCMakeFile.write(test_contents) - - contents += """ - endif() """ - - if os.path.isdir(os.path.join(os.getcwd(), 'tests')) : - contents += """ - add_subdirectory( tests )""" - - contents += """ - endif()""" - contents=textwrap.dedent(contents) - - return contents - - -def is_subdirectory(child, parent): - true_child=os.path.realpath(child) - true_parent=os.path.realpath(parent) - while true_child: - true_child=os.path.split(true_child)[0] - if true_child == true_parent: - return True - - return False - - -def install(state): - targets=[] - contents="\n" - if has_library(state): - targets.append("{name}".format(name=state['name'])) - - if has_executable(state): - targets.append("{name}_executable".format(name=state['name'])) - - if targets: - block = """ - install( TARGETS ${{installation_targets}} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ""" - if "group id" in state: - block += """ - SETGID {gid}""" - - block += """ ) - """ - - if has_executable(state): - if len(targets) > 1: - contents += """ - set( installation_targets {0} )""".format(targets[0]) - contents += """ - if ( NOT is_subproject ) - list( APPEND installation_targets {0} ) - endif() - """.format(targets[-1]) - contents += block - else: - contents += """ - if ( NOT is_subproject ) - list( APPEND installation_targets {0} )""" - contents += block.replace('\n', '\n ') - contents += """ - endif() - """ - - - - regex=[] - if 'include path' in state and is_subdirectory(state['include path'], os.getcwd()): - if 'header files' in state['file extension']: - for extension in state['file extension']['header files']: - regex.append(".*\\.{0}$".format(extension).replace('+', '[+]')) - - contents += """ - install( FILES "${{CMAKE_BINARY_DIR}}/signature.json" - DESTINATION share/${{CMAKE_PROJECT_NAME}} - PERMISSIONS OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ - ) - install( DIRECTORY {include_path}/ DESTINATION include - FILE_PERMISSIONS OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ - DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ""" - if "group id" in state: - contents += """ - SETGID {gid}""" - - - contents += """ - FILES_MATCHING REGEX "{regex}" """ - - contents += """ ) - """ - - if state['language'] == 'fortran': - contents += """ - file( RELATIVE_PATH relative_fortran_module_files_path - "${{CMAKE_CURRENT_SOURCE_DIR}}" "${{CMAKE_Fortran_MODULE_DIRECTORY}}" ) - file( GLOB fortran_module_files - RELATIVE "${{relative_fortran_module_files_path}}" - *.mod ) - install( FILES ${{fortran_module_files}} - DESTINATION include - PERMISSIONS OWNER_READ OWNER_WRITE - GROUP_READ - WORLD_READ""" - if "group id" in state: - contents += """ - SETGID {gid}""" - - contents += """ ) - """ - - contents = contents.format( - name=state['name'], - targets=targets, - include_path=state['include path'] if 'include path' in state else '', - regex='|'.join(regex), - gid=state['group id'] if 'group id' in state else '') - - return textwrap.dedent(contents) - -def generate(): - state=description.deserialize() - description.collect_subprojects(state, state['project path']) - contents = \ - """ -cmake_minimum_required( VERSION 3.2 ) -set( CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Supported configuration types" FORCE ) - """ - contents += fetch_subprojects(state) - contents += signature() - contents += project_statement(state) - if not state['is external project']: - contents += compiler_minimum(state) - contents += define_options(state) - contents += make_aux_directories(state) - contents += define_compiler_flags(state) - contents += set_library_type(state) - - contents += traverse_subprojects(state) - contents += collect_revision_info(state) - contents += print_banner(state) - if not state['is external project']: - contents += add_targets(state) - contents += add_tests(state) - contents += install(state) - contents += """ - INCLUDE(CPack) - """ - - with open('CMakeLists.txt', 'w') as CMakeFile: - CMakeFile.write(contents) diff --git a/metaconfigure/collect_subprojects.py b/metaconfigure/collect_subprojects.py deleted file mode 100644 index a062efc..0000000 --- a/metaconfigure/collect_subprojects.py +++ /dev/null @@ -1,61 +0,0 @@ -#! /usr/bin/env python -""" -A script to generate a flat subproject directory from a tree of dependency directories -""" -import os -import subprocess -import textwrap -import json -import shutil -import sys -import warnings - -def project_name(): - return os.path.split( os.getcwd() )[1] - -def dependency_directory(): - """ - A function isolating the path specification to the project's dependency directory - """ - return os.path.join( os.getcwd(), "dependencies" ) - -def traverse_dependencies( destination, traversed ): - """ - collect unique links to dependency projects in a destination folder - """ - if not os.path.isdir( dependency_directory() ): - return - - os.chdir( dependency_directory() ) - - for dependency in os.listdir( os.getcwd() ) : - if os.path.isdir( dependency ) and not dependency in traversed : - traversed.add( dependency ) - os.chdir( dependency ) - if not os.path.isdir( os.path.join( destination, dependency ) ): - try: - os.symlink( os.getcwd(), - os.path.join( destination, dependency ) ) - - except OSError: - warnings.warn( "Could not create symbolic " - "link from {} to subprojects directory."\ - .format( os.getcwd() ) ) - warnings.warn( "Copying directory contents instead" ) - shutil.copytree( os.getcwd(), - os.path.join( destination, dependency ), - ignore = shutil.ignore_patterns("dependencies") ) - - traverse_dependencies( destination, traversed ) - os.chdir( ".." ) - - os.chdir( os.path.join( ".." ) ) - -def collect_subprojects(): - destination = os.path.join( os.getcwd(), "subprojects" ) - if not os.path.isdir( destination ): - os.makedirs( destination ) - - traverse_dependencies( destination, set() ) - -collect_subprojects() diff --git a/metaconfigure/configuration.py b/metaconfigure/configuration.py deleted file mode 100644 index 6adbacd..0000000 --- a/metaconfigure/configuration.py +++ /dev/null @@ -1,138 +0,0 @@ -import copy - -languages = {'c' : {}, 'c++' : {}, 'fortran' : {} } - -for language in languages.keys(): - languages[language]['file extension'] = {} - languages[language]['compiler'] = {} - -languages['c']['standards'] = ['c89', 'c99', 'c11'] -languages['c++']['standards'] = ['c++98', 'c++11', 'c++14', 'c++17'] -languages['fortran']['standards'] = ['fortran77', 'fortran90', 'fortran95', 'fortran2003', 'fortran2008'] - -languages['c']['file extension']['implementation files'] = ['c'] -languages['c']['file extension']['header files'] = ['h'] -languages['c']['file extension']['configure files'] = ['in'] -languages['c++']['file extension']['implementation files'] = ['c++', 'cxx', 'cpp', 'cc', 'C'] -languages['c++']['file extension']['header files'] = ['h++', 'hxx', 'hpp', 'hh', 'h'] -languages['c++']['file extension']['configure files'] = ['in'] -languages['fortran']['file extension']['implementation files'] = ['f', 'for', 'f90'] -languages['fortran']['file extension']['configure files'] = ['in'] - -languages['c']['compiler']['gcc'] = {} -languages['c']['compiler']['llvm clang'] = {} -languages['c']['compiler']['apple clang'] = {} -languages['c++']['compiler']['g++'] = {} -languages['c++']['compiler']['llvm clang++'] = {} -languages['c++']['compiler']['apple clang++'] = {} -languages['fortran']['compiler']['gfortran'] = {} - -languages['c']['compiler']['gcc']['linux'] = {} -languages['c']['compiler']['gcc']['cygwin'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['gcc']['mingw'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['gcc']['osx'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['gcc']['windows'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['llvm clang']['linux'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['llvm clang']['osx'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['llvm clang']['windows'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['llvm clang']['cygwin'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['llvm clang']['mingw'] = languages['c']['compiler']['gcc']['linux'] -languages['c']['compiler']['apple clang']['osx'] = languages['c']['compiler']['gcc']['linux'] - -languages['fortran']['compiler']['gfortran']['linux'] = {} -languages['fortran']['compiler']['gfortran']['osx'] = languages['fortran']['compiler']['gfortran']['linux'] -languages['fortran']['compiler']['gfortran']['windows'] = languages['fortran']['compiler']['gfortran']['linux'] -languages['fortran']['compiler']['gfortran']['cygwin'] = languages['fortran']['compiler']['gfortran']['linux'] -languages['fortran']['compiler']['gfortran']['mingw'] = languages['fortran']['compiler']['gfortran']['linux'] - -languages['c']['compiler']['gcc']['linux']['standard'] = {'c89' : '-std=c90', - 'c99' : '-std=c99', - 'c11' : '-std=c11'} - -languages['c++']['compiler']['g++']['linux'] = {} -languages['c++']['compiler']['g++']['linux']['standard'] = {'c++98' : '-std=c++98', - 'c++11' : '-std=c++11', - 'c++14' : '-std=c++14', - 'c++17' : '-std=c++17'} - -languages['fortran']['compiler']['gfortran']['linux']['standard'] = {'fortran77' : '-std=legacy' , - 'fortran95' : '-std=f95', - 'fortran2003' : '-std=f2003', - 'fortran2008' : '-std=f2008' } - -languages['c']['compiler']['gcc']['linux']['flags'] = {} -languages['fortran']['compiler']['gfortran']['linux']['flags'] = {} - -languages['c']['compiler']['gcc']['linux']['flags']['common'] = [] -languages['fortran']['compiler']['gfortran']['linux']['flags']['common'] = languages['c']['compiler']['gcc']['linux']['flags']['common'] - -languages['c']['compiler']['gcc']['linux']['flags']['subproject'] = [] -languages['fortran']['compiler']['gfortran']['linux']['flags']['subproject'] = languages['c']['compiler']['gcc']['linux']['flags']['subproject'] - -languages['c']['compiler']['gcc']['linux']['flags']['base project'] = [] -languages['fortran']['compiler']['gfortran']['linux']['flags']['base project'] = languages['c']['compiler']['gcc']['linux']['flags']['subproject'] - -languages['c']['compiler']['gcc']['linux']['flags']['warning'] = ['-Wall', '-Wextra', '-Wpedantic'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['warning'] = languages['c']['compiler']['gcc']['linux']['flags']['warning'] - -languages['c']['compiler']['gcc']['linux']['flags']['strict'] = ['-Werror'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['strict'] = languages['c']['compiler']['gcc']['linux']['flags']['strict'] - -languages['c']['compiler']['gcc']['linux']['flags']['debug'] = ['-O0', '-g', '-gdwarf-3', '-fsignaling-nans'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['debug'] = languages['c']['compiler']['gcc']['linux']['flags']['debug'] + ['-fcheck=all', '-ffpe-trap=invalid,zero,overflow'] - -languages['c']['compiler']['gcc']['linux']['flags']['coverage'] = ['--coverage'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['coverage'] = languages['c']['compiler']['gcc']['linux']['flags']['coverage'] - -languages['c']['compiler']['gcc']['linux']['flags']['static'] = ['-static'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['static'] = languages['c']['compiler']['gcc']['linux']['flags']['static'] - -languages['c']['compiler']['gcc']['linux']['flags']['optimization'] = ['-O3', '-DNDEBUG'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['optimization'] = languages['c']['compiler']['gcc']['linux']['flags']['optimization'] - -languages['c']['compiler']['gcc']['linux']['flags']['nonportable optimization'] = ['-march=native'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['nonportable optimization'] = languages['c']['compiler']['gcc']['linux']['flags']['nonportable optimization'] - -languages['c']['compiler']['gcc']['linux']['flags']['link time optimization'] = ['-flto'] -languages['fortran']['compiler']['gfortran']['linux']['flags']['link time optimization'] = languages['c']['compiler']['gcc']['linux']['flags']['link time optimization'] - -languages['c']['compiler']['gcc']['linux']['flags']['profile generate'] = ["-fprofile-generate='{profile_path}'"] -languages['fortran']['compiler']['gfortran']['linux']['flags']['profile generate'] = languages['c']['compiler']['gcc']['linux']['flags']['profile generate'] - -languages['c']['compiler']['gcc']['linux']['flags']['profile use'] = ["-fprofile-use='{profile_path}'"] -languages['fortran']['compiler']['gfortran']['linux']['flags']['profile use'] = languages['c']['compiler']['gcc']['linux']['flags']['profile use'] - -languages['c++']['compiler']['g++']['linux']['flags'] = copy.deepcopy( languages['c']['compiler']['gcc']['linux']['flags'] ) -languages['c++']['compiler']['g++']['linux']['flags']['common'].append('-Wno-subobject-linkage') -languages['c++']['compiler']['g++']['osx'] = copy.deepcopy( languages['c++']['compiler']['g++']['linux'] ) -languages['c++']['compiler']['g++']['cygwin'] = copy.deepcopy( languages['c++']['compiler']['g++']['linux'] ) -languages['c++']['compiler']['g++']['mingw'] = copy.deepcopy( languages['c++']['compiler']['g++']['linux'] ) -languages['c++']['compiler']['g++']['windows'] = languages['c++']['compiler']['g++']['linux'] - -languages['c++']['compiler']['llvm clang++'] = copy.deepcopy( languages['c++']['compiler']['g++']) -languages['c++']['compiler']['llvm clang++']['linux']['flags']['common'] = ['-stdlib=libstdc++'] -languages['c++']['compiler']['llvm clang++']['linux']['flags']['debug'].remove('-fsignaling-nans') - -languages['c++']['compiler']['llvm clang++']['cygwin']['standard'] = {'c++98' : '-std=gnu++98', - 'c++11' : '-std=gnu++11', - 'c++14' : '-std=gnu++14', - 'c++17' : '-std=gnu++17'} - -languages['c++']['compiler']['g++']['cygwin']['standard'] = {'c++98' : '-std=gnu++98', - 'c++11' : '-std=gnu++11', - 'c++14' : '-std=gnu++14', - 'c++17' : '-std=gnu++17'} - -languages['c++']['compiler']['llvm clang++']['osx']['flags'] = copy.deepcopy(languages['c++']['compiler']['llvm clang++']['linux']['flags']) -languages['c++']['compiler']['llvm clang++']['osx']['flags']['common'] = ['-stdlib=libc++'] -languages['c++']['compiler']['llvm clang++']['windows'] = languages['c++']['compiler']['llvm clang++']['osx'] - -languages['c++']['compiler']['apple clang++']['osx'] = languages['c++']['compiler']['llvm clang++']['osx'] - -languages['c']['compiler']['gcc']['minimum version'] = '6.2' -languages['c']['compiler']['llvm clang'] ['minimum version'] = '3.8' -languages['c']['compiler']['apple clang']['minimum version'] = '8.0' -languages['c++']['compiler']['g++']['minimum version'] = '6.2' -languages['c++']['compiler']['llvm clang++']['minimum version'] = '3.8' -languages['c++']['compiler']['apple clang++']['minimum version'] = '8.0' -languages['fortran']['compiler']['gfortran']['minimum version'] = '5.1' diff --git a/metaconfigure/description.json b/metaconfigure/description.json deleted file mode 100644 index ef96b85..0000000 --- a/metaconfigure/description.json +++ /dev/null @@ -1,629 +0,0 @@ -{ - "compiler": { - "apple clang++": { - "minimum version": "8.0", - "osx": { - "flags": { - "base project": [], - "common": [ - "-stdlib=libc++" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - } - }, - "g++": { - "cygwin": { - "flags": { - "base project": [], - "common": [ - "-Wno-subobject-linkage" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3", - "-fsignaling-nans" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=gnu++11", - "c++14": "-std=gnu++14", - "c++17": "-std=gnu++17", - "c++98": "-std=gnu++98" - } - }, - "linux": { - "flags": { - "base project": [], - "common": [ - "-Wno-subobject-linkage" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3", - "-fsignaling-nans" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - }, - "mingw": { - "flags": { - "base project": [], - "common": [ - "-Wno-subobject-linkage" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3", - "-fsignaling-nans" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - }, - "minimum version": "6.2", - "osx": { - "flags": { - "base project": [], - "common": [ - "-Wno-subobject-linkage" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3", - "-fsignaling-nans" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - }, - "windows": { - "flags": { - "base project": [], - "common": [ - "-Wno-subobject-linkage" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3", - "-fsignaling-nans" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - } - }, - "llvm clang++": { - "cygwin": { - "flags": { - "base project": [], - "common": [ - "-Wno-subobject-linkage" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3", - "-fsignaling-nans" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=gnu++11", - "c++14": "-std=gnu++14", - "c++17": "-std=gnu++17", - "c++98": "-std=gnu++98" - } - }, - "linux": { - "flags": { - "base project": [], - "common": [ - "-stdlib=libstdc++" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - }, - "mingw": { - "flags": { - "base project": [], - "common": [ - "-Wno-subobject-linkage" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3", - "-fsignaling-nans" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - }, - "minimum version": "3.8", - "osx": { - "flags": { - "base project": [], - "common": [ - "-stdlib=libc++" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - }, - "windows": { - "flags": { - "base project": [], - "common": [ - "-stdlib=libc++" - ], - "coverage": [ - "--coverage" - ], - "debug": [ - "-O0", - "-g", - "-gdwarf-3" - ], - "link time optimization": [ - "-flto" - ], - "nonportable optimization": [ - "-march=native" - ], - "optimization": [ - "-O3", - "-DNDEBUG" - ], - "profile generate": [ - "-fprofile-generate='{profile_path}'" - ], - "profile use": [ - "-fprofile-use='{profile_path}'" - ], - "static": [ - "-static" - ], - "strict": [ - "-Werror" - ], - "subproject": [], - "warning": [ - "-Wall", - "-Wextra", - "-Wpedantic" - ] - }, - "standard": { - "c++11": "-std=c++11", - "c++14": "-std=c++14", - "c++17": "-std=c++17", - "c++98": "-std=c++98" - } - } - } - }, - "configure files": [], - "file extension": { - "configure files": [ - "in" - ], - "header files": [ - "h++", - "hxx", - "hpp", - "hh", - "h" - ], - "implementation files": [ - "c++", - "cxx", - "cpp", - "cc", - "C" - ] - }, - "header files": [ - "src/constants.hpp", - "src/constants/testing.hpp", - "src/constants/CODATA2014.hpp", - "src/constants/map.hpp", - "src/constants/math.hpp", - "src/constants/tags.hpp", - "src/constants/CODATA2018.hpp", - "src/constants/testing/src/defineReferenceValues.hpp", - "src/constants/testing/src/toValue.hpp" - ], - "ignore pattern": "$^", - "implementation files": [], - "include path": "src/", - "initialized": true, - "is external project": false, - "language": "c++", - "name": "constants", - "standard": "c++17", - "standards": [ - "c++98", - "c++11", - "c++14", - "c++17" - ], - "strict": true, - "test pattern": "test$", - "tests": { - "constants.CODATA2014": [ - "src/constants/CODATA2014/test/CODATA2014.test.cpp" - ], - "constants.CODATA2018": [ - "src/constants/CODATA2018/test/CODATA2018.test.cpp" - ], - "constants.math": [ - "src/constants/math/test/math.test.cpp" - ] - }, - "update": true -} \ No newline at end of file diff --git a/metaconfigure/description.py b/metaconfigure/description.py deleted file mode 100644 index 806fa29..0000000 --- a/metaconfigure/description.py +++ /dev/null @@ -1,169 +0,0 @@ -""" -A script to generate a serialized project description for build script -generation. -""" -import os -import glob -import json -import re -from metaconfigure import configuration - - -def serialize(state): - with open("metaconfigure/description.json", "w") as json_file: - project_path = state.pop('project path') - subprojects = state.pop('subprojects') - json_file.write(json.dumps(state, indent=2, sort_keys=True)) - state['subprojects'] = subprojects - state['project path'] = project_path - - -def deserialize(): - with open("metaconfigure/description.json", "r") as json_file: - state = json.loads(json_file.read()) - state['project path'] = os.getcwd() - state['subprojects'] = {} - return state - - -def collect_subprojects(state, root): - if os.path.isdir(os.path.join(os.getcwd(), 'dependencies')): - os.chdir('dependencies') - anchor = os.getcwd() - for name in os.listdir(os.getcwd()): - if os.path.isdir(os.path.join(os.getcwd(), name)): - os.chdir(os.path.join(root, 'subprojects', name)) - subproject = deserialize() - collect_subprojects(subproject, root) - state['subprojects'][name] = subproject - os.chdir(anchor) - - os.chdir('..') - - -def reconstruct_dependency_graph(state): - dependencies = {state['name']: state['subprojects'].keys()} - for name in state['subprojects'].keys(): - dependencies.update( - reconstruct_dependency_graph(state['subprojects'][name])) - - return dependencies - - -def reconstruct_build_queue(state): - queue = [] - graph = reconstruct_dependency_graph(state) - while len(graph) > 0: - found_next = False - next_node = None - for node, edges in graph.items(): - queueable = True - for edge in edges: - if edge not in queue: - queueable = False - break - - if queueable: - next_node = node - found_next = True - break - - if not found_next: - raise RuntimeError('Cyclic Dependencies?!') - else: - queue.append(next_node) - graph.pop(next_node) - - return queue - - -def relative_path(state): - return os.path.relpath(os.getcwd(), state['project path']) - - -def evaluate_test_directory(state): - path, name = os.path.split(os.path.dirname(relative_path(state))) - if path: - while True: - path, directory = os.path.split(path) - if not directory == "src": - name = '.'.join([directory, name]) - else: - break - - else: - name = state['name'] - - directory = relative_path(state) - files = [] - for extension in state['file extension']['implementation files']: - filenames = glob.glob('*.' + extension) - file_paths = [os.path.join(directory, filename) - for filename in filenames] - files.extend(file_paths) - - state['tests'][name] = files - os.chdir('..') - - -def evaluate_directory(state): - path = relative_path(state) - for group in state['file extension']: - files = [] - for extension in state['file extension'][group]: - filenames = glob.glob('*.' + extension) - file_paths = [os.path.join(path, filename) - for filename in filenames] - files.extend(file_paths) - - state[group].extend(files) - - for name in os.listdir(os.getcwd()): - if os.path.isdir(os.path.join(os.getcwd(), name)): - os.chdir(name) - if not re.match(state['ignore pattern'], name): - if re.match(state['test pattern'], name): - evaluate_test_directory(state) - else: - evaluate_directory(state) - else: - os.chdir('..') - - os.chdir('..') - - -def collect_driver(state): - if 'driver' not in state: - for extension in state['file extension']['implementation files']: - possible_driver = 'src/main.' + extension - if possible_driver in state['implementation files']: - state['driver'] = possible_driver - state['implementation files'].remove(possible_driver) - return - return - - -def generate(name, language, **kwargs): - state = {'strict':True, 'test pattern':'test$', 'ignore pattern':'$^', - 'is external project':False} - state.update({'name':name, 'language':language}) - state.update(kwargs) - if 'initialized' not in state: - state.update(configuration.languages[state['language']]) - if state['is external project']: - state.pop('compiler') - state['initialized'] = True - - state['project path'] = os.getcwd() - state['tests'] = {} - state['subprojects'] = {} - if 'update' not in state: - state['update'] = not state['is external project'] - - for group in state['file extension']: - state[group] = [] - - os.chdir('src') - evaluate_directory(state) - collect_driver(state) - serialize(state) diff --git a/metaconfigure/docs/.gitignore b/metaconfigure/docs/.gitignore deleted file mode 100644 index 17e5238..0000000 --- a/metaconfigure/docs/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -_site/ -.sass-cache/ -.jekyll-metadata -Gemfile.lock diff --git a/metaconfigure/docs/Gemfile b/metaconfigure/docs/Gemfile deleted file mode 100644 index bc23b52..0000000 --- a/metaconfigure/docs/Gemfile +++ /dev/null @@ -1,26 +0,0 @@ -source "https://rubygems.org" -ruby RUBY_VERSION - -# Hello! This is where you manage which Jekyll version is used to run. -# When you want to use a different version, change it below, save the -# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: -# -# bundle exec jekyll serve -# -# This will help ensure the proper Jekyll version is running. -# Happy Jekylling! -# gem "jekyll", "3.3.1" - -# This is the default theme for new Jekyll sites. You may change this to anything you like. -gem "minima", "~> 2.0" - -gem "html-proofer" - -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. -gem "github-pages", group: :jekyll_plugins - -# If you have any plugins, put them here! -# group :jekyll_plugins do -# gem "jekyll-feed", "~> 0.6" -# end diff --git a/metaconfigure/docs/LICENSE.md b/metaconfigure/docs/LICENSE.md deleted file mode 100644 index 52aa97a..0000000 --- a/metaconfigure/docs/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: default ---- -Copyright (c) 2016, Los Alamos National Security, LLC -All rights reserved. -Copyright 2016. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the U.S. Department of Energy. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from LANL. - -Additionally, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of Los Alamos National Security, LLC, Los Alamos National Laboratory, LANL, the U.S. Government, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/metaconfigure/docs/README-jekyll.md b/metaconfigure/docs/README-jekyll.md deleted file mode 100644 index f85a392..0000000 --- a/metaconfigure/docs/README-jekyll.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: page ---- -# Jekyll-website -This repository contains the required stuff to make the NJOY website and keep it consistent across all the projects. - -## Using jekyll-website -For all projects under the NJOY organization, this repository should be created as a git 'subtree' in the `docs` directory. This will ensure consistency across all the projects as well as make the documentation for each accessible from the website. - -In order to prevent pushing to this repository one should set the push url for this remote in git like this: - -```bash -git remote set-url --push no_push -``` -Here `` is the name of the remote (probably `jekyll`). What this tells git is whenever you try to push to this remote, simply push to the url `no_push` which doesn't exist. - -Alternatively, you can set the push url to the url of the remote of the real repository like: - -```bash -git remote set-url --push jekyll git@github.com:njoy/njoy.github.io.git -``` -as is done for the [njoy.github.io](https://github.com/njoy/njoy.github.io) repository. - -## License -This repository---and all repositories under the NJOY organization---are licensed according to the [LICENSE](LICENSE.md) file diff --git a/metaconfigure/docs/Updating.md b/metaconfigure/docs/Updating.md deleted file mode 100644 index 32e35b8..0000000 --- a/metaconfigure/docs/Updating.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -layout: page -title: Updating Metaconfigure ---- -**Note:** that all the subprojects/dependencies must be updated prior to updating the super project. - -These commands (unless otherwise specified) should be run from the top level of a project (*not* from inside the `metaconfigure` directory). -1. Create a branch -2. Download ("fetch") subprojects - ```bash - python metaconfigure/fetch_subprojects.py - ``` -3. Update the metaconfigure subtree - ```bash - git subtree pull --squash --prefix metaconfigure https://github.com/njoy/metaconfigure.git master - ``` -4. Delete old `description.json` file. - ```bash - rm metaconfigure/description.json - ``` -5. Generate new `metaconfigure/description.json` file. This is done in Python. - ```python - import metaconfigure - args = {"name": "project-name", "language": "c++", "is external project": False, "include path": "src/include"} - metaconfigure.description.generate(**args) - ``` - Note that the values in `args` need to be appropriate for your particular project. The values given above are just an example. -6. Inspect the new `metaconfigure/description.json`. In particular check: - - `implementation files`—ensure the correct relative path (to top-level of project) is correct. - - `header files`—ensure the correct relative path (to top-level of project) is correct. - - `include path`—ensure that this points to the correct path. This is needed for any C++ project. -7. Generate a [CMake](https://cmake.org) file - ```bash - ./metaconfigure/generate.py cmake - ``` -8. Inspect resulting `CMakelists.txt` file - - Is the target of the expected type (executable, interface, or library)? - - An executable target will always be accompanied by a library or interface target in the CMake files generated by metaconfigure. A library target is a collection of source file which are to be compiled into a library file (either static or dynamic based on configuration settings) during the build process. This implies that the project contains one or more implementation files (excluding an implementation file for any executable driver). Those declarations look something like this: - ```cmake - add_library( ${_library_linkage} ) - ``` - - For targets that lack implementation files (`.cpp` files)—such as header-only libraries—there's nothing to compile. Interface declarations look like - ```cmake - add_library( INTERFACE ) - ``` - - Given a driver implementation file (defaults to `main.` but can be specified in the description), you should also see an executable target which links to the library or interface target. - ```cmake - add_executable( _executable ) - set_target_properties( _executable PROPERTIES OUTPUT_NAME ) - target_compile_options( _executable PRIVATE ) - target_link_libraries( _executable ) - ``` - - Are the tests specified? - - Are the compiler flags specified? -9. Build/test project locally to make sure everything works. -10. Update `.travis.yml` and `.travis.sh`. -11. Push to GitHub. -12. Create pull request. diff --git a/metaconfigure/docs/_config.yml b/metaconfigure/docs/_config.yml deleted file mode 100644 index 64cfe23..0000000 --- a/metaconfigure/docs/_config.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Welcome to Jekyll! -# -# This config file is meant for settings that affect your whole blog, values -# which you are expected to set up once and rarely need to edit after that. -# For technical reasons, this file is *NOT* reloaded automatically when you use -# 'jekyll serve'. If you change this file, please restart the server process. - -# Site settings -title: NJOY -subtitle: Nuclear Data Processing-from Los Alamos National Laboratory -email: njoy@lanl.gov - -description: NJOY nuclear data processing from LANL - -url: "http://njoy.lanl.gov" # the base hostname & protocol for your site -#twitter_username: jekyllrb -github_username: njoy - -markdown: kramdown -timezone: America/Denver - -theme: minima - -# Serving -port: 8000 -baseurl: "" # the subpath of your site, e.g. /blog - -exclude: [vendor] -include: ['Developers', 'Build', 'LICENSE.md'] diff --git a/metaconfigure/docs/_data/navigation.yml b/metaconfigure/docs/_data/navigation.yml deleted file mode 100644 index f728e2e..0000000 --- a/metaconfigure/docs/_data/navigation.yml +++ /dev/null @@ -1,11 +0,0 @@ - - title: "Getting NJOY" - url: "https://njoy.github.io/Build/index.html" - - - title: "Developers" - url: "https://njoy.github.io/DevelopersGuide" - - - title: "Projects" - url: "https://njoy.github.io/Projects.html" - - - title: "About" - url: "https://njoy.github.io/about/index.html" diff --git a/metaconfigure/docs/_includes/footer.html b/metaconfigure/docs/_includes/footer.html deleted file mode 100644 index 41ecc8c..0000000 --- a/metaconfigure/docs/_includes/footer.html +++ /dev/null @@ -1,23 +0,0 @@ -
- -
- - - - -
- -
diff --git a/metaconfigure/docs/_includes/head.html b/metaconfigure/docs/_includes/head.html deleted file mode 100644 index 3e8a6c5..0000000 --- a/metaconfigure/docs/_includes/head.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - - - - - - diff --git a/metaconfigure/docs/_includes/header.html b/metaconfigure/docs/_includes/header.html deleted file mode 100644 index e7abc0f..0000000 --- a/metaconfigure/docs/_includes/header.html +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/metaconfigure/docs/_includes/icon-github.html b/metaconfigure/docs/_includes/icon-github.html deleted file mode 100644 index e501a16..0000000 --- a/metaconfigure/docs/_includes/icon-github.html +++ /dev/null @@ -1 +0,0 @@ -{% include icon-github.svg %}{{ include.username }} diff --git a/metaconfigure/docs/_includes/icon-github.svg b/metaconfigure/docs/_includes/icon-github.svg deleted file mode 100644 index 4422c4f..0000000 --- a/metaconfigure/docs/_includes/icon-github.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/metaconfigure/docs/_includes/nav.html b/metaconfigure/docs/_includes/nav.html deleted file mode 100644 index a674e61..0000000 --- a/metaconfigure/docs/_includes/nav.html +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/metaconfigure/docs/_layouts/default.html b/metaconfigure/docs/_layouts/default.html deleted file mode 100644 index 52085bf..0000000 --- a/metaconfigure/docs/_layouts/default.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - {% include head.html %} - - - - {% include header.html %} - -
-
- {{ content }} -
-
- - {% include footer.html %} - - - - diff --git a/metaconfigure/docs/_layouts/home.html b/metaconfigure/docs/_layouts/home.html deleted file mode 100644 index 519eebb..0000000 --- a/metaconfigure/docs/_layouts/home.html +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: default ---- - -
- - {{ content }} - -
diff --git a/metaconfigure/docs/_layouts/page.html b/metaconfigure/docs/_layouts/page.html deleted file mode 100644 index 01e4b2a..0000000 --- a/metaconfigure/docs/_layouts/page.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: default ---- -
- -
-

{{ page.title | escape }}

-
- -
- {{ content }} -
- -
diff --git a/metaconfigure/docs/_layouts/post.html b/metaconfigure/docs/_layouts/post.html deleted file mode 100644 index 1d36c28..0000000 --- a/metaconfigure/docs/_layouts/post.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: default ---- -
- -
-

{{ page.title | escape }}

- -
- -
- {{ content }} -
- - {% if site.disqus.shortname %} - {% include disqus_comments.html %} - {% endif %} -
diff --git a/metaconfigure/docs/_sass/_base.scss b/metaconfigure/docs/_sass/_base.scss deleted file mode 100644 index 0883c3c..0000000 --- a/metaconfigure/docs/_sass/_base.scss +++ /dev/null @@ -1,206 +0,0 @@ -/** - * Reset some basic elements - */ -body, h1, h2, h3, h4, h5, h6, -p, blockquote, pre, hr, -dl, dd, ol, ul, figure { - margin: 0; - padding: 0; -} - - - -/** - * Basic styling - */ -body { - font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; - color: $text-color; - background-color: $background-color; - -webkit-text-size-adjust: 100%; - -webkit-font-feature-settings: "kern" 1; - -moz-font-feature-settings: "kern" 1; - -o-font-feature-settings: "kern" 1; - font-feature-settings: "kern" 1; - font-kerning: normal; -} - - - -/** - * Set `margin-bottom` to maintain vertical rhythm - */ -h1, h2, h3, h4, h5, h6, -p, blockquote, pre, -ul, ol, dl, figure, -%vertical-rhythm { - margin-bottom: $spacing-unit / 2; -} - - - -/** - * Images - */ -img { - max-width: 100%; - vertical-align: middle; -} - - - -/** - * Figures - */ -figure > img { - display: block; -} - -figcaption { - font-size: $small-font-size; -} - - - -/** - * Lists - */ -ul, ol { - margin-left: $spacing-unit; -} - -li { - > ul, - > ol { - margin-bottom: 0; - } -} - - - -/** - * Headings - */ -h1, h2, h3, h4, h5, h6 { - font-weight: $base-font-weight; -} - - - -/** - * Links - */ -a { - color: $brand-color; - text-decoration: none; - - &:visited { - color: darken($brand-color, 15%); - } - - &:hover { - color: $text-color; - text-decoration: underline; - } -} - - - -/** - * Blockquotes - */ -blockquote { - color: $grey-color; - border-left: 4px solid $grey-color-light; - padding-left: $spacing-unit / 2; - font-size: 18px; - letter-spacing: -1px; - font-style: italic; - - > :last-child { - margin-bottom: 0; - } -} - - - -/** - * Code formatting - */ -pre, -code { - font-size: 15px; - border: 1px solid $grey-color-light; - border-radius: 3px; - background-color: #eef; -} - -code { - padding: 1px 5px; -} - -pre { - padding: 8px 12px; - overflow-x: auto; - - > code { - border: 0; - padding-right: 0; - padding-left: 0; - } -} - - - -/** - * Wrapper - */ -.wrapper { - max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); - max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); - margin-right: auto; - margin-left: auto; - padding-right: $spacing-unit; - padding-left: $spacing-unit; - @extend %clearfix; - - @include media-query($on-laptop) { - max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); - max-width: calc(#{$content-width} - (#{$spacing-unit})); - padding-right: $spacing-unit / 2; - padding-left: $spacing-unit / 2; - } -} - - - -/** - * Clearfix - */ -%clearfix { - - &:after { - content: ""; - display: table; - clear: both; - } -} - - - -/** - * Icons - */ -.icon { - - > svg { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - - path { - fill: $grey-color; - } - } -} diff --git a/metaconfigure/docs/_sass/_layout.scss b/metaconfigure/docs/_sass/_layout.scss deleted file mode 100644 index 1cedbf5..0000000 --- a/metaconfigure/docs/_sass/_layout.scss +++ /dev/null @@ -1,242 +0,0 @@ -/** - * Site header - */ -.site-header { - border-top: 5px solid $grey-color-dark; - border-bottom: 1px solid $grey-color-light; - min-height: 56px; - - // Positioning context for the mobile navigation icon - position: relative; -} - -.site-title { - font-size: 26px; - font-weight: 300; - line-height: 56px; - letter-spacing: -1px; - margin-bottom: 0; - float: left; - - &, - &:visited { - color: $grey-color-dark; - } -} - -.site-nav { - float: right; - line-height: 56px; - - .menu-icon { - display: none; - } - - .page-link { - color: $text-color; - line-height: $base-line-height; - - // Gaps between nav items, but not on the last one - &:not(:last-child) { - margin-right: 20px; - } - } - - @include media-query($on-palm) { - position: absolute; - top: 9px; - right: $spacing-unit / 2; - background-color: $background-color; - border: 1px solid $grey-color-light; - border-radius: 5px; - text-align: right; - - .menu-icon { - display: block; - float: right; - width: 36px; - height: 26px; - line-height: 0; - padding-top: 10px; - text-align: center; - - > svg { - width: 18px; - height: 15px; - - path { - fill: $grey-color-dark; - } - } - } - - .trigger { - clear: both; - display: none; - } - - &:hover .trigger { - display: block; - padding-bottom: 5px; - } - - .page-link { - display: block; - padding: 5px 10px; - - &:not(:last-child) { - margin-right: 0; - } - margin-left: 20px; - } - } -} - - - -/** - * Site footer - */ -.site-footer { - border-top: 1px solid $grey-color-light; - padding: $spacing-unit 0; -} - -.footer-heading { - font-size: 18px; - margin-bottom: $spacing-unit / 2; -} - -.contact-list, -.social-media-list { - list-style: none; - margin-left: 0; -} - -.footer-col-wrapper { - font-size: 15px; - color: $grey-color; - margin-left: -$spacing-unit / 2; - @extend %clearfix; -} - -.footer-col { - float: left; - margin-bottom: $spacing-unit / 2; - padding-left: $spacing-unit / 2; -} - -.footer-col-1 { - width: -webkit-calc(15% - (#{$spacing-unit} / 2)); - width: calc(15% - (#{$spacing-unit} / 2)); -} - -.footer-col-2 { - width: -webkit-calc(30% - (#{$spacing-unit} / 2)); - width: calc(30% - (#{$spacing-unit} / 2)); -} - -.footer-col-3 { - width: -webkit-calc(80% - (#{$spacing-unit} / 2)); - width: calc(80% - (#{$spacing-unit} / 2)); -} - -@include media-query($on-laptop) { - .footer-col-1, - .footer-col-2 { - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); - } - - .footer-col-3 { - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - -@include media-query($on-palm) { - .footer-col { - float: none; - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - - - -/** - * Page content - */ -.page-content { - padding: $spacing-unit 0; -} - -.page-heading { - font-size: 20px; -} - -.post-list { - margin-left: 0; - list-style: none; - - > li { - margin-bottom: $spacing-unit; - } -} - -.post-meta { - font-size: $small-font-size; - color: $grey-color; -} - -.post-link { - display: block; - font-size: 24px; -} - - - -/** - * Posts - */ -.post-header { - margin-bottom: $spacing-unit; -} - -.post-title { - font-size: 42px; - letter-spacing: -1px; - line-height: 1; - - @include media-query($on-laptop) { - font-size: 36px; - } -} - -.post-content { - margin-bottom: $spacing-unit; - - h2 { - font-size: 32px; - - @include media-query($on-laptop) { - font-size: 28px; - } - } - - h3 { - font-size: 26px; - - @include media-query($on-laptop) { - font-size: 22px; - } - } - - h4 { - font-size: 20px; - - @include media-query($on-laptop) { - font-size: 18px; - } - } -} diff --git a/metaconfigure/docs/_sass/_syntax-highlighting.scss b/metaconfigure/docs/_sass/_syntax-highlighting.scss deleted file mode 100644 index 8fac597..0000000 --- a/metaconfigure/docs/_sass/_syntax-highlighting.scss +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Syntax highlighting styles - */ -.highlight { - background: #fff; - @extend %vertical-rhythm; - - .highlighter-rouge & { - background: #eef; - } - - .c { color: #998; font-style: italic } // Comment - .err { color: #a61717; background-color: #e3d2d2 } // Error - .k { font-weight: bold } // Keyword - .o { font-weight: bold } // Operator - .cm { color: #998; font-style: italic } // Comment.Multiline - .cp { color: #999; font-weight: bold } // Comment.Preproc - .c1 { color: #998; font-style: italic } // Comment.Single - .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special - .gd { color: #000; background-color: #fdd } // Generic.Deleted - .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific - .ge { font-style: italic } // Generic.Emph - .gr { color: #a00 } // Generic.Error - .gh { color: #999 } // Generic.Heading - .gi { color: #000; background-color: #dfd } // Generic.Inserted - .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific - .go { color: #888 } // Generic.Output - .gp { color: #555 } // Generic.Prompt - .gs { font-weight: bold } // Generic.Strong - .gu { color: #aaa } // Generic.Subheading - .gt { color: #a00 } // Generic.Traceback - .kc { font-weight: bold } // Keyword.Constant - .kd { font-weight: bold } // Keyword.Declaration - .kp { font-weight: bold } // Keyword.Pseudo - .kr { font-weight: bold } // Keyword.Reserved - .kt { color: #458; font-weight: bold } // Keyword.Type - .m { color: #099 } // Literal.Number - .s { color: #d14 } // Literal.String - .na { color: #008080 } // Name.Attribute - .nb { color: #0086B3 } // Name.Builtin - .nc { color: #458; font-weight: bold } // Name.Class - .no { color: #008080 } // Name.Constant - .ni { color: #800080 } // Name.Entity - .ne { color: #900; font-weight: bold } // Name.Exception - .nf { color: #900; font-weight: bold } // Name.Function - .nn { color: #555 } // Name.Namespace - .nt { color: #000080 } // Name.Tag - .nv { color: #008080 } // Name.Variable - .ow { font-weight: bold } // Operator.Word - .w { color: #bbb } // Text.Whitespace - .mf { color: #099 } // Literal.Number.Float - .mh { color: #099 } // Literal.Number.Hex - .mi { color: #099 } // Literal.Number.Integer - .mo { color: #099 } // Literal.Number.Oct - .sb { color: #d14 } // Literal.String.Backtick - .sc { color: #d14 } // Literal.String.Char - .sd { color: #d14 } // Literal.String.Doc - .s2 { color: #d14 } // Literal.String.Double - .se { color: #d14 } // Literal.String.Escape - .sh { color: #d14 } // Literal.String.Heredoc - .si { color: #d14 } // Literal.String.Interpol - .sx { color: #d14 } // Literal.String.Other - .sr { color: #009926 } // Literal.String.Regex - .s1 { color: #d14 } // Literal.String.Single - .ss { color: #990073 } // Literal.String.Symbol - .bp { color: #999 } // Name.Builtin.Pseudo - .vc { color: #008080 } // Name.Variable.Class - .vg { color: #008080 } // Name.Variable.Global - .vi { color: #008080 } // Name.Variable.Instance - .il { color: #099 } // Literal.Number.Integer.Long -} diff --git a/metaconfigure/docs/assets/main.scss b/metaconfigure/docs/assets/main.scss deleted file mode 100644 index c91fac8..0000000 --- a/metaconfigure/docs/assets/main.scss +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Only the main Sass file needs front matter (the dashes are enough) ---- -@charset "utf-8"; - -// Our variables -$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -$base-font-size: 16px; -$base-font-weight: 400; -$small-font-size: $base-font-size * 0.875; -$base-line-height: 1.5; - -$spacing-unit: 30px; - -$text-color: #111; -$background-color: #fdfdfd; -$brand-color: #2a7ae2; - -$grey-color: #828282; -$grey-color-light: lighten($grey-color, 40%); -$grey-color-dark: darken($grey-color, 25%); - -// Width of the content area -$content-width: 800px; - -$on-palm: 600px; -$on-laptop: 800px; - -// Minima also includes a mixin for defining media queries. -// Use media queries like this: -// @include media-query($on-palm) { -// .wrapper { -// padding-right: $spacing-unit / 2; -// padding-left: $spacing-unit / 2; -// } -// } - -// Import partials from the `minima` theme. -@import "minima"; diff --git a/metaconfigure/docs/index.md b/metaconfigure/docs/index.md deleted file mode 100644 index 9c4b953..0000000 --- a/metaconfigure/docs/index.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -layout: page -title: Metaconfigure ---- -## [Updating metaconfigure in a project](Updating.html) - -## Creating signatures -Metaconfigure has the ability to create a "signature" for a project. A signature is a unique combination of the project and each of its dependencies---with their specific versions. The signature enables the ability to load a project from a point in time and ensure that you have the same version you had then. - -To create a signature simply execute - -```bash -./metaconfigure/signature.py - ``` -This will create a JSON file that contains the signature for the project as it currently stands. The `` is optional, but allows you to specify the JSON filename that is written. - -### Collecting signatures -A signature file is not automatically created. If one would like to be able to recreate a version at a specific time, you must create the signature file yourself. - -We have created and stored some signatures in a [repository](https://github.com/njoy/signatures) on GitHub. These signatures are created every time the `master` branch is updated. Thus, it is a collection of officially supported versions of the projects. diff --git a/metaconfigure/fetch_subprojects.py b/metaconfigure/fetch_subprojects.py deleted file mode 100755 index b18f69b..0000000 --- a/metaconfigure/fetch_subprojects.py +++ /dev/null @@ -1,105 +0,0 @@ -#! /usr/bin/env python -""" -A script to generate a flat subproject directory from a tree of dependency directories -""" -import os -import subprocess -import textwrap -import json -import shutil -import sys -import warnings - -def project_name(): - return os.path.split( os.getcwd() )[1] - -def dependency_directory(): - """ - A function isolating the path specification to the project's dependency directory - """ - return os.path.join( os.getcwd(), "dependencies" ) - -def clone_submodule( relative_path ): - """ - A function to clone a git submodule - """ - print( textwrap.dedent( - """ - ---------------------------------------- - Fetching {relative_path}... - ---------------------------------------- - """.format( relative_path = relative_path ) ) ) - invocation = [ "git", "submodule", "update", "-q","--init", "--", relative_path ] -# if os.name == "nt": -# invocation.insert( 0, "powershell" ) - - clone = subprocess.Popen( invocation ) - clone.communicate() - -def update_repository( git ): - """ - A function to update a submodule to latest commit of the master branch - """ - if project_name() not in git: - print("Updating to master branch...\n") - invocation = ["git", "pull", "-q", "origin", "master"] - else: - print("Checking out revision {}...\n".format( git[ project_name() ] ) ) - invocation = ["git", "pull", "-q", "origin", git[ project_name() ] ] -# if os.name == "nt": -# invocation.insert( 0, "powershell" ) - update = subprocess.Popen( invocation ) - update.communicate() - -def traverse_dependencies( destination, traversed, git ): - """ - Clone and update dependencies uniquely and collect links to dependency projects - in a destination folder - """ - if not os.path.isdir( dependency_directory() ): - return - - os.chdir( dependency_directory() ) - - for dependency in os.listdir( os.getcwd() ) : - if os.path.isdir( dependency ) and not dependency in traversed : - traversed.add( dependency ) - clone_submodule( dependency ) - os.chdir( dependency ) - update_repository( git ) - if not os.path.isdir( os.path.join( destination, dependency ) ): - try: - os.symlink( os.getcwd(), - os.path.join( destination, dependency ) ) - - except OSError: - warnings.warn( "Could not create symbolic link " - "from {} to subprojects directory."\ - .format( os.getcwd() ) ) - warnings.warn( "Copying directory contents instead" ) - shutil.copytree( os.getcwd(), - os.path.join( destination, dependency ), - ignore = shutil.ignore_patterns("dependencies") ) - - traverse_dependencies( destination, traversed, git ) - os.chdir( ".." ) - - os.chdir( os.path.join( ".." ) ) - -def collect_subprojects( git ): - if git: - update_repository( git ) - - destination = os.path.join( os.getcwd(), "subprojects" ) - if not os.path.isdir( destination ): - os.makedirs( destination ) - - traverse_dependencies( destination, set(), git ) - -git = {} -if len(sys.argv) > 1: - with open ( sys.argv[1], "r" ) as json_file: - signature = json.loads( json_file.read() ) - git = signature['git'] - -collect_subprojects( git ) diff --git a/metaconfigure/generate.py b/metaconfigure/generate.py deleted file mode 100755 index cada665..0000000 --- a/metaconfigure/generate.py +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env python - -import sys - -import os.path -sys.path.append( os.path.abspath( os.getcwd() ) ) -import metaconfigure.description as description -import metaconfigure.cmake as cmake - -previous = description.deserialize() - -if previous['update']: - description.generate( **previous ) - -if sys.argv[1] == 'cmake': - cmake.generate() diff --git a/metaconfigure/signature.py b/metaconfigure/signature.py deleted file mode 100755 index 59d3550..0000000 --- a/metaconfigure/signature.py +++ /dev/null @@ -1,42 +0,0 @@ -#! /usr/bin/env python -""" -""" - -import os -import json -import subprocess -import sys -import time - -def project_signature(): - invocation = [ "git", "rev-parse", "HEAD" ] - if os.name == "nt": - invocation.insert( 0, "powershell" ) - - process = subprocess.Popen( invocation, stdout=subprocess.PIPE ) - hash_value = process.communicate() - return hash_value[0].strip().decode("utf-8") - -def generate( name = None ): - - project_name = os.path.split( os.getcwd() )[1] - if name is None: - name = project_name + str( time.time() ) - - git = {} - git[ project_name ] = project_signature() - root = os.getcwd() - - if os.path.isdir( "subprojects" ): - for subproject in os.listdir( "subprojects" ): - os.chdir(os.path.join("subprojects", subproject)) - git[subproject] = project_signature() - os.chdir(root) - - with open ( name + ".json", "w" ) as json_file: - json_file.write( json.dumps( { 'git' : git }, indent=0 ) ) - -if len(sys.argv) > 1: - generate( sys.argv[1] ) -else: - generate() From 29bb66bd61cc267a193fb8c9e5514968b37a6cec Mon Sep 17 00:00:00 2001 From: Nathan Gibson Date: Thu, 29 Oct 2020 10:18:49 -0600 Subject: [PATCH 2/3] Added release dependencies. --- cmake/release_dependencies.cmake | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 cmake/release_dependencies.cmake diff --git a/cmake/release_dependencies.cmake b/cmake/release_dependencies.cmake new file mode 100644 index 0000000..87b6384 --- /dev/null +++ b/cmake/release_dependencies.cmake @@ -0,0 +1,49 @@ +cmake_minimum_required( VERSION 3.14 ) +include( FetchContent ) + +####################################################################### +# Declare project dependencies +####################################################################### + +FetchContent_Declare( range-v3-adapter + GIT_REPOSITORY https://github.com/njoy/range-v3-adapter + GIT_TAG 252679d4737c8f755d87c0e1eed6c37394a2ec59 + ) + +FetchContent_Declare( hana-adapter + GIT_REPOSITORY https://github.com/njoy/hana-adapter + GIT_TAG f58e8973c9a614dc4f3720b5581a762c61bdbb40 + ) + +FetchContent_Declare( spdlog + GIT_REPOSITORY https://github.com/gabime/spdlog + GIT_TAG a51b4856377a71f81b6d74b9af459305c4c644f8 + ) + +FetchContent_Declare( catch-adapter + GIT_REPOSITORY https://github.com/njoy/catch-adapter + GIT_TAG fb84b82ebf7a4789aa43cea560680cf745c6ee4f + ) + +FetchContent_Declare( Log + GIT_REPOSITORY https://github.com/njoy/Log + GIT_TAG 52962b7796afe37ef1d8f7edb4bf9ecb1b868d15 + ) + +FetchContent_Declare( dimwits + GIT_REPOSITORY https://github.com/njoy/DimensionalAnalysis + GIT_TAG acd794d373c8740a788f5c9d58a6eb8ba4d9861a + ) + +####################################################################### +# Load dependencies +####################################################################### + +FetchContent_MakeAvailable( + range-v3-adapter + hana-adapter + spdlog + catch-adapter + Log + dimwits + ) From 605c85952cfac06aecf871e2c58c2e649826cb84 Mon Sep 17 00:00:00 2001 From: Nathan Gibson Date: Thu, 29 Oct 2020 10:35:33 -0600 Subject: [PATCH 3/3] Changed order of release dependencies. --- cmake/release_dependencies.cmake | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/cmake/release_dependencies.cmake b/cmake/release_dependencies.cmake index 87b6384..55a43c6 100644 --- a/cmake/release_dependencies.cmake +++ b/cmake/release_dependencies.cmake @@ -5,9 +5,14 @@ include( FetchContent ) # Declare project dependencies ####################################################################### -FetchContent_Declare( range-v3-adapter - GIT_REPOSITORY https://github.com/njoy/range-v3-adapter - GIT_TAG 252679d4737c8f755d87c0e1eed6c37394a2ec59 +FetchContent_Declare( catch-adapter + GIT_REPOSITORY https://github.com/njoy/catch-adapter + GIT_TAG fb84b82ebf7a4789aa43cea560680cf745c6ee4f + ) + +FetchContent_Declare( dimwits + GIT_REPOSITORY https://github.com/njoy/DimensionalAnalysis + GIT_TAG acd794d373c8740a788f5c9d58a6eb8ba4d9861a ) FetchContent_Declare( hana-adapter @@ -15,24 +20,19 @@ FetchContent_Declare( hana-adapter GIT_TAG f58e8973c9a614dc4f3720b5581a762c61bdbb40 ) -FetchContent_Declare( spdlog - GIT_REPOSITORY https://github.com/gabime/spdlog - GIT_TAG a51b4856377a71f81b6d74b9af459305c4c644f8 - ) - -FetchContent_Declare( catch-adapter - GIT_REPOSITORY https://github.com/njoy/catch-adapter - GIT_TAG fb84b82ebf7a4789aa43cea560680cf745c6ee4f - ) - FetchContent_Declare( Log GIT_REPOSITORY https://github.com/njoy/Log GIT_TAG 52962b7796afe37ef1d8f7edb4bf9ecb1b868d15 ) -FetchContent_Declare( dimwits - GIT_REPOSITORY https://github.com/njoy/DimensionalAnalysis - GIT_TAG acd794d373c8740a788f5c9d58a6eb8ba4d9861a +FetchContent_Declare( range-v3-adapter + GIT_REPOSITORY https://github.com/njoy/range-v3-adapter + GIT_TAG 252679d4737c8f755d87c0e1eed6c37394a2ec59 + ) + +FetchContent_Declare( spdlog + GIT_REPOSITORY https://github.com/gabime/spdlog + GIT_TAG a51b4856377a71f81b6d74b9af459305c4c644f8 ) ####################################################################### @@ -40,10 +40,10 @@ FetchContent_Declare( dimwits ####################################################################### FetchContent_MakeAvailable( - range-v3-adapter - hana-adapter - spdlog catch-adapter - Log dimwits + hana-adapter + Log + range-v3-adapter + spdlog )