Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: recursive

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "qdldl"]
path = ext/qdldl
url = https://github.com/osqp/qdldl.git
28 changes: 16 additions & 12 deletions algebra/_common/lin_sys/qdldl/qdldl.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
include(FetchContent)

message(STATUS "Fetching/configuring QDLDL solver")
list(APPEND CMAKE_MESSAGE_INDENT " ")

FetchContent_Declare(
qdldl
GIT_REPOSITORY https://github.com/osqp/qdldl.git
GIT_TAG v0.1.8
)
# Define where the QDLDL source code is located, and allow advanced users to provide their own copy
set(QDLDL_SRC_LOCATION "${OSQP_ALGEBRA_ROOT}/../ext/qdldl" CACHE STRING "Location of QDLDL source code")
mark_as_advanced(QDLDL_SRC_LOCATION)

# Make QDLDL use the same types as OSQP
set(QDLDL_FLOAT ${OSQP_USE_FLOAT} CACHE BOOL "QDLDL Float type")
Expand All @@ -17,8 +10,19 @@ set(QDLDL_LONG ${OSQP_USE_LONG} CACHE BOOL "QDLDL Integer type")
set(QDLDL_BUILD_STATIC_LIB OFF CACHE BOOL "Build QDLDL static library")
set(QDLDL_BUILD_SHARED_LIB OFF CACHE BOOL "Build QDLDL shared library")

FetchContent_MakeAvailable(qdldl)
FetchContent_GetProperties(qdldl)
message(STATUS "Configuring QDLDL solver")
list(APPEND CMAKE_MESSAGE_INDENT " ")

if(NOT EXISTS ${QDLDL_SRC_LOCATION}/README.md)
message(FATAL_ERROR
"QDLDL not found in \"${QDLDL_SRC_LOCATION}\".\n \n"
"Get the QDLDL source code using the following commands and then re-run CMake:\n"
" git submodule init"
" git submodule update"
)
endif()

add_subdirectory(${QDLDL_SRC_LOCATION} ${CMAKE_CURRENT_BINARY_DIR}/ext/qdldl EXCLUDE_FROM_ALL)

list(POP_BACK CMAKE_MESSAGE_INDENT)

Expand Down
1 change: 1 addition & 0 deletions ext/qdldl
Submodule qdldl added at 138fda
Loading