diff --git a/DESCRIPTION b/DESCRIPTION index f06539f..9006e46 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: osqp Title: Quadratic Programming Solver using the 'OSQP' Library -Version: 0.6.3.1 -Date: 2023-10-03 +Version: 0.6.3.2 +Date: 2023-10-19 Authors@R: c( person("Bartolomeo", "Stellato", role = c("aut", "ctb", "cph"), email = "bartolomeo.stellato@gmail.com"), diff --git a/NEWS.md b/NEWS.md index c1fbe10..e3b7ffd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +# Version 0.6.3.2 + +* CMAKE file fixes per R-exts + +# Version 0.6.3.1 + +* Bug fix: typo in sparse coercion routines (`dgCMatrix` where + `dtCMatrix` should be). + # Version 0.6.3 * Sync up to version [0.6.3 of OSQP release](https://github.com/osqp/osqp/releases/tag/v0.6.3) diff --git a/configure b/configure index c727d45..9716aa4 100755 --- a/configure +++ b/configure @@ -31,7 +31,7 @@ if [ -x "$(command -v cmake)" ]; then cd src/osqp_sources mkdir -p build cd build - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:bool=OFF -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON -DR_LANG=TRUE -DCMAKE_INSTALL_PREFIX:PATH=../../ .. + cmake -DR_HOME="${R_HOME}" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:bool=OFF -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON -DR_LANG=TRUE -DCMAKE_INSTALL_PREFIX:PATH=../../ .. cmake --build . --target install cd .. rm -rf build/ diff --git a/inst/58f00bd_fixes/make_fixes.R b/inst/58f00bd_fixes/make_fixes.R index 09de8f0..42f8d15 100644 --- a/inst/58f00bd_fixes/make_fixes.R +++ b/inst/58f00bd_fixes/make_fixes.R @@ -46,23 +46,31 @@ replace_lines(path = "osqp_sources/lin_sys/direct/qdldl/qdldl_sources/examples/e ## Rename proj.h to osqp_proj.h and edit files that use it. file.rename(from = "osqp_sources/include/proj.h", to = "osqp_sources/include/osqp_proj.h") -## Fix CMakeLists.txt -replace_lines("osqp_sources/CMakeLists.txt", 2, 'cmake_minimum_required (VERSION 3.5)', - comment_prefix = "#") +## Fix auxil.c +replace_lines("osqp_sources/src/auxil.c", 3, '#include "osqp_proj.h"') + +## Fix polish.c +replace_lines("osqp_sources/src/polish.c", 7, '#include "osqp_proj.h"') + +## Fix proj.c +replace_lines("osqp_sources/src/proj.c", 1, '#include "osqp_proj.h"') +## Fix CMakeLists.txt replace_lines("osqp_sources/include/CMakeLists.txt", 12, ' "${CMAKE_CURRENT_SOURCE_DIR}/osqp_proj.h"', comment_prefix = "#") replace_lines("osqp_sources/lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt", 2, 'cmake_minimum_required (VERSION 3.5)', comment_prefix = "#") -## Fix auxil.c -replace_lines("osqp_sources/src/auxil.c", 3, '#include "osqp_proj.h"') +replace_lines("osqp_sources/CMakeLists.txt", 2, 'cmake_minimum_required (VERSION 3.5)', + comment_prefix = "#") -## Fix polish.c -replace_lines("osqp_sources/src/polish.c", 7, '#include "osqp_proj.h"') +## Drop lines 242-255 as they are not needed +## lines <- readLines("osqp_sources/CMakeLists.txt")[-(242:255)] +##writeLines(lines, "osqp_sources/CMakeLists.txt") -## Fix proj.c -replace_lines("osqp_sources/src/proj.c", 1, '#include "osqp_proj.h"') +## Replace findR.cmake +replace_lines("osqp_sources/configure/cmake/FindR.cmake", 11, 'find_program(R_EXEC NAMES R R.exe PATHS ${R_HOME}/bin)', + comment_prefix='#')