Skip to content

Commit

Permalink
Fix for findR.cmake module
Browse files Browse the repository at this point in the history
  • Loading branch information
bnaras committed Oct 20, 2023
1 parent becd81f commit cb60f60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 0 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ if [ -x "$(command -v cmake)" ]; then
cd src/osqp_sources
mkdir -p build
cd build
CFLAGS="${CPPFLAGS} ${CFLAGS}"
CXXFLAGS="${CPPFLAGS} ${CXXFLAGS}"
echo "CFLAGS are ${CFLAGS}"
echo "CXXFLAGS are ${CFLAGS}"
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 ..
Expand Down
7 changes: 5 additions & 2 deletions inst/58f00bd_fixes/make_fixes.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ replace_lines("osqp_sources/CMakeLists.txt", 2, 'cmake_minimum_required (VERSION
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")
## 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='#')


0 comments on commit cb60f60

Please sign in to comment.