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

Use sqlite3 in /usr/local rather than /tmp #1150

Merged
merged 3 commits into from
Aug 22, 2023
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
4 changes: 2 additions & 2 deletions C/plugins/storage/sqlite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(STORAGE_COMMON_LIB storage-common-lib)

# Path of compiled libsqlite3.a and .h files: /tmp/sqlite3-pkg/src
set(FLEDGE_SQLITE3_LIBS "/tmp/sqlite3-pkg/src" CACHE INTERNAL "")
# Path of compiled libsqlite3.a and .h files: /usr/local
set(FLEDGE_SQLITE3_LIBS "/usr/local" CACHE INTERNAL "")

# Find source files
file(GLOB SOURCES ./common/*.cpp ./schema/*.cpp *.cpp)
Expand Down
4 changes: 2 additions & 2 deletions C/plugins/storage/sqlitelb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(STORAGE_COMMON_LIB storage-common-lib)

# Path of compiled libsqlite3.a and .h files: /tmp/sqlite3-pkg/src
set(FLEDGE_SQLITE3_LIBS "/tmp/sqlite3-pkg/src" CACHE INTERNAL "")
# Path of compiled libsqlite3.a and .h files: /usr/local
set(FLEDGE_SQLITE3_LIBS "/usr/local" CACHE INTERNAL "")

# Find source files
file(GLOB SOURCES ./common/*.cpp ../sqlite/schema/*.cpp *.cpp)
Expand Down
4 changes: 2 additions & 2 deletions C/plugins/storage/sqlitememory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(STORAGE_COMMON_LIB storage-common-lib)

# Path of compiled libsqlite3.a and .h files: /tmp/sqlite3-pkg/src
set(FLEDGE_SQLITE3_LIBS "/tmp/sqlite3-pkg/src" CACHE INTERNAL "")
# Path of compiled libsqlite3.a and .h files: /usr/local
set(FLEDGE_SQLITE3_LIBS "/usr/local" CACHE INTERNAL "")

# Find source files
# Add sqlitelb plugin common files
Expand Down
3 changes: 2 additions & 1 deletion requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ if [[ $YUM_PLATFORM = true ]]; then

set -e
make
# TODO: Use make install to install sqlite3 as a command
make install
fi
cd $fledge_location
set -e
Expand Down Expand Up @@ -253,6 +253,7 @@ elif apt --version 2>/dev/null; then

sqlite3_build_prepare
make
make install

apt install -y sqlite3 # make install after sqlite3_build_prepare should be enough to install sqlite3 as a command
apt install -y pkg-config
Expand Down
1 change: 1 addition & 0 deletions tests/unit/C/cmake_sqlite/Findsqlite3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

set(SQLITE_MIN_VERSION "3.11.0")
# Check wether path of compiled libsqlite3.a and .h files exists
set(FLEDGE_SQLITE3_LIBS "/usr/local" CACHE INTERNAL "")
if (EXISTS ${FLEDGE_SQLITE3_LIBS})
find_path(SQLITE_INCLUDE_DIR sqlite3.h PATHS ${FLEDGE_SQLITE3_LIBS})
find_library(SQLITE_LIBRARIES NAMES libsqlite3.a PATHS "${FLEDGE_SQLITE3_LIBS}/.libs")
Expand Down
1 change: 1 addition & 0 deletions tests/unit/C/cmake_sqliteM/Findsqlite3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

set(SQLITE_MIN_VERSION "3.11.0")
# Check wether path of compiled libsqlite3.a and .h files exists
set(FLEDGE_SQLITE3_LIBS "/usr/local" CACHE INTERNAL "")
if (EXISTS ${FLEDGE_SQLITE3_LIBS})
find_path(SQLITE_INCLUDE_DIR sqlite3.h PATHS ${FLEDGE_SQLITE3_LIBS})
find_library(SQLITE_LIBRARIES NAMES libsqlite3.a PATHS "${FLEDGE_SQLITE3_LIBS}/.libs")
Expand Down
1 change: 1 addition & 0 deletions tests/unit/C/cmake_sqlitelb/Findsqlite3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

set(SQLITE_MIN_VERSION "3.11.0")
# Check wether path of compiled libsqlite3.a and .h files exists
set(FLEDGE_SQLITE3_LIBS "/usr/local" CACHE INTERNAL "")
if (EXISTS ${FLEDGE_SQLITE3_LIBS})
find_path(SQLITE_INCLUDE_DIR sqlite3.h PATHS ${FLEDGE_SQLITE3_LIBS})
find_library(SQLITE_LIBRARIES NAMES libsqlite3.a PATHS "${FLEDGE_SQLITE3_LIBS}/.libs")
Expand Down