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

Added sqlite3 as third party package #857

Merged
merged 5 commits into from
Jul 2, 2020
Merged

Added sqlite3 as third party package #857

merged 5 commits into from
Jul 2, 2020

Conversation

dkeeney
Copy link

@dkeeney dkeeney commented Jul 1, 2020

The Sqlite3 package is now folded into the externs. It will be downloaded and compiled into a library for both release and debug. The .h is included in the include directories ${EXTERNAL_INCLUDES} and can be referenced as 'sqlite/sqlite.h'. The library is included in 'externlibs' and is merged into the core library. So, if you link with the htm.core library then it should be found.

Oh, you should not list sqlite.c or seqlite.h in src/CMakeLists.txt.

There are no unit tests included with this PR. I expect that the PlotRegion project will include enough testing to tell if it can link properly.

Copy link
Member

@breznak breznak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping Zbysekz, David 👍


# SQLite does not provide a CMakeList.txt to buld with so we provide the following lines to perform the compile here.
# Since we are building here and not in the source folder, the library will show up directly under build/ThirdParty.
set(SRCS ${sqlite3_SOURCE_DIR}/sqlite3.c ${sqlite3_SOURCE_DIR}/sqlite3.h)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might need to explicitely tell CMake this is a C (not C++) file somewhere here

https://github.com/htm-community/htm.core/pull/857/checks?check_run_id=827912596#step:6:173

@dkeeney dkeeney self-assigned this Jul 1, 2020
Copy link
Member

@breznak breznak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for providing the easy build! This helps #748

@@ -39,7 +39,7 @@
# Note: on MSVC, run startupMSVC.bat after deleting the build folder.

cmake_minimum_required(VERSION 3.7)
project(htm_core CXX)
project(htm_core CXX C)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it doesn't hurt if we add C to the languages (?)

@breznak breznak merged commit e0ff143 into master Jul 2, 2020
@breznak breznak deleted the sqlite3_external branch July 2, 2020 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants