Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues 39 and 40. #41

Merged
merged 1 commit into from
Jun 8, 2024
Merged
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: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ src/osqp_sources/docs
src/osqp_sources/site
src/osqp_sources/tests
src/osqp_sources/lin_sys/direct/qdldl/qdldl_sources/tests

^configure$
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: osqp
Title: Quadratic Programming Solver using the 'OSQP' Library
Version: 0.6.3.2
Date: 2023-10-19
Version: 0.6.3.3
Date: 2024-06-07
Authors@R: c(
person("Bartolomeo", "Stellato", role = c("aut", "ctb", "cph"),
email = "[email protected]"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,24 @@ 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"')

## We don't use CMAKE anymore, so not needed
## Fix CMakeLists.txt
replace_lines("osqp_sources/include/CMakeLists.txt", 12, ' "${CMAKE_CURRENT_SOURCE_DIR}/osqp_proj.h"',
comment_prefix = "#")
## 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 = "#")
## replace_lines("osqp_sources/lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt", 2, 'cmake_minimum_required (VERSION 3.5)',
## comment_prefix = "#")

replace_lines("osqp_sources/CMakeLists.txt", 2, 'cmake_minimum_required (VERSION 3.5)',
comment_prefix = "#")
## replace_lines("osqp_sources/CMakeLists.txt", 2, 'cmake_minimum_required (VERSION 3.5)',
## comment_prefix = "#")

## Drop lines 242-255 as they are not needed
## lines <- readLines("osqp_sources/CMakeLists.txt")[-(242:255)]
##writeLines(lines, "osqp_sources/CMakeLists.txt")

## 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='#')

## replace_lines("osqp_sources/configure/cmake/FindR.cmake", 11, 'find_program(R_EXEC NAMES R R.exe PATHS ${R_HOME}/bin)',
## comment_prefix='#')


5 changes: 2 additions & 3 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
OSQP_LIB_TARGET_DIR=./lib
OSQP_INCLUDE_TARGET_DIR=./include/osqp/
OSQP_INCLUDE_TARGET_DIR=./include/osqp
OSQP_STATIC_LIB=$(OSQP_LIB_TARGET_DIR)/libosqp.a

OSQP_FLAGS=-DR_LANG=TRUE

PKG_CXXFLAGS=-I$(OSQP_INCLUDE_TARGET_DIR)
PKG_LIBS=-L$(OSQP_LIB_TARGET_DIR) -losqp

FIXES_SCRIPT=../inst/58f00bd_fixes/make_fixes.R
FIXES_SCRIPT=../inst/0dd00a57_fixes/make_fixes.R

ROBJECTS=osqp_solve_interface.o RcppExports.o
OBJECTS=$(ROBJECTS)
Expand All @@ -30,7 +30,6 @@ $(OSQP_STATIC_LIB):
# a go at building the static library here.
echo "Making fixes to osqp_sources for CRAN"
$(R_HOME)/bin/Rscript $(FIXES_SCRIPT)
echo "No cmake? I will try via osqp/Makefile"
cd osqp; \
$(MAKE) all CC="$(CC)" \
OSQP_FLAGS="$(OSQP_FLAGS)" \
Expand Down
3 changes: 1 addition & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OSQP_FLAGS=-DR_LANG=TRUE
PKG_CXXFLAGS=-I$(OSQP_INCLUDE_TARGET_DIR)
PKG_LIBS=-L$(OSQP_LIB_TARGET_DIR) -losqp

FIXES_SCRIPT=../inst/58f00bd_fixes/make_fixes.R
FIXES_SCRIPT=../inst/0dd00a57_fixes/make_fixes.R

ROBJECTS=osqp_solve_interface.o RcppExports.o
OBJECTS=$(ROBJECTS)
Expand All @@ -30,7 +30,6 @@ $(OSQP_STATIC_LIB):
# a go at building the static library here.
echo "Making fixes to osqp_sources for CRAN"
$(R_HOME)/bin$(R_ARCH_BIN)/Rscript $(FIXES_SCRIPT)
echo "No cmake? I will try via osqp/Makefile"
cd osqp; \
$(MAKE) all CC="$(CC)" \
OSQP_FLAGS="$(OSQP_FLAGS)" \
Expand Down
Loading