-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from Battery-Intelligence-Lab/chebyshev
Chebyshev
- Loading branch information
Showing
708 changed files
with
2,589 additions
and
224,707 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This cmake file is to add external dependency projects. | ||
# Adapted from https://github.com/cpp-best-practices/cmake_template/tree/main | ||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/recipes/") | ||
|
||
include(cmake/recipes/CPM.cmake) | ||
|
||
# Range-v3 library: | ||
CPMAddPackage( | ||
NAME range-v3 | ||
URL "https://github.com/ericniebler/range-v3/archive/refs/tags/0.12.0.tar.gz" | ||
DOWNLOAD_ONLY YES | ||
) | ||
|
||
include(eigen) | ||
|
||
add_library(range-v3 INTERFACE) | ||
target_include_directories(range-v3 SYSTEM INTERFACE ${range-v3_SOURCE_DIR}/include) | ||
|
||
# Catch2 library: | ||
if(NOT TARGET Catch2::Catch2WithMain) | ||
CPMAddPackage( | ||
NAME Catch2 | ||
URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.3.2.tar.gz" | ||
) | ||
endif() | ||
|
||
|
||
# CPMAddPackage("gh:fmtlib/fmt#10.1.1") #fmt library | ||
# fmt library: | ||
CPMAddPackage( | ||
NAME fmt | ||
URL "https://github.com/fmtlib/fmt/archive/refs/tags/10.1.1.tar.gz" | ||
) | ||
|
||
|
||
# # Glaze library: | ||
# CPMAddPackage( | ||
# NAME glaze | ||
# URL "https://github.com/stephenberry/glaze/archive/refs/tags/v1.3.4.tar.gz" | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
The files in this folder are taken and adapted from: | ||
The files in this folder are mostly taken and adapted from: | ||
|
||
https://github.com/lefticus/cpp_weekly/tree/master/cmake | ||
|
||
Currently, they may or may not be in use. | ||
Currently, they may or may not be in use. | ||
|
||
CPM is obtained from https://github.com/cpm-cmake/CPM.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors | ||
set(CPM_DOWNLOAD_VERSION 0.40.0) | ||
set(CPM_HASH_SUM "7b354f3a5976c4626c876850c93944e52c83ec59a159ae5de5be7983f0e17a2a") | ||
|
||
if(CPM_SOURCE_CACHE) | ||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
elseif(DEFINED ENV{CPM_SOURCE_CACHE}) | ||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
else() | ||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
endif() | ||
|
||
# Expand relative path. This is important if the provided path contains a tilde (~) | ||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE) | ||
|
||
file(DOWNLOAD | ||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake | ||
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM} | ||
) | ||
|
||
include(${CPM_DOWNLOAD_LOCATION}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Obtained: https://github.com/polyfem/polysolve/tree/main/cmake/recipes | ||
# Copyright 2019 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
if(TARGET Eigen3::Eigen) | ||
return() | ||
endif() | ||
|
||
option(EIGEN_WITH_MKL "Use Eigen with MKL" OFF) | ||
option(EIGEN_DONT_VECTORIZE "Disable Eigen vectorization" OFF) | ||
option(EIGEN_MPL2_ONLY "Enable Eigen MPL2 license only" OFF) | ||
|
||
message(STATUS "Third-party: creating target 'Eigen3::Eigen'") | ||
|
||
include(CPM) | ||
# Eigen library: | ||
CPMAddPackage( | ||
NAME eigen | ||
URL "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz" | ||
DOWNLOAD_ONLY YES | ||
) | ||
|
||
add_library(Eigen3_Eigen INTERFACE) | ||
add_library(Eigen3::Eigen ALIAS Eigen3_Eigen) | ||
|
||
include(GNUInstallDirs) | ||
target_include_directories(Eigen3_Eigen SYSTEM INTERFACE | ||
$<BUILD_INTERFACE:${eigen_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
) | ||
|
||
if(EIGEN_MPL2_ONLY) | ||
target_compile_definitions(Eigen3_Eigen INTERFACE EIGEN_MPL2_ONLY) | ||
endif() | ||
|
||
if(EIGEN_DONT_VECTORIZE) | ||
target_compile_definitions(Eigen3_Eigen INTERFACE EIGEN_DONT_VECTORIZE) | ||
endif() | ||
|
||
if(EIGEN_WITH_MKL) | ||
#TODO : Checks that, on 64bits systems, `mkl::mkl` is using the LP64 interface | ||
# (by looking at the compile definition of the target) | ||
include(mkl) | ||
target_link_libraries(Eigen3_Eigen INTERFACE mkl::mkl) | ||
target_compile_definitions(Eigen3_Eigen INTERFACE | ||
EIGEN_USE_MKL_ALL | ||
EIGEN_USE_LAPACKE_STRICT | ||
) | ||
endif() | ||
|
||
# On Windows, enable natvis files to improve debugging experience | ||
if(WIN32 AND eigen_SOURCE_DIR) | ||
target_sources(Eigen3_Eigen INTERFACE $<BUILD_INTERFACE:${eigen_SOURCE_DIR}/debug/msvc/eigen.natvis>) | ||
endif() | ||
|
||
# Install rules | ||
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME eigen) | ||
set_target_properties(Eigen3_Eigen PROPERTIES EXPORT_NAME Eigen) | ||
install(DIRECTORY ${eigen_SOURCE_DIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
install(TARGETS Eigen3_Eigen EXPORT Eigen_Targets) | ||
install(EXPORT Eigen_Targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/eigen NAMESPACE Eigen3::) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.