2017-04-28 20:45:41 +00:00
|
|
|
# Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
2015-02-03 05:21:36 +00:00
|
|
|
ADD_OSQUERY_LIBRARY(TRUE osquery_database
|
2015-05-24 01:52:42 +00:00
|
|
|
database.cpp
|
2016-03-05 17:29:51 +00:00
|
|
|
query.cpp
|
|
|
|
plugins/ephemeral.cpp
|
2015-05-24 01:52:42 +00:00
|
|
|
)
|
|
|
|
|
2017-04-28 20:45:41 +00:00
|
|
|
# Optionally (but by default), add the RocksDB database plugin.
|
|
|
|
add_definitions(-DROCKSDB_LITE=1)
|
|
|
|
|
2016-03-05 17:29:51 +00:00
|
|
|
# Begin with just the SQLite database plugin.
|
|
|
|
set(OSQUERY_DATABASE_PLUGINS
|
|
|
|
plugins/sqlite.cpp
|
2017-04-28 20:45:41 +00:00
|
|
|
plugins/rocksdb.cpp
|
2016-03-05 17:29:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(OSQUERY_DATABASE_PLUGIN_TESTS
|
|
|
|
database/tests/plugin_tests.cpp
|
|
|
|
database/plugins/tests/sqlite_tests.cpp
|
2017-04-28 20:45:41 +00:00
|
|
|
database/plugins/tests/rocksdb_tests.cpp
|
2014-07-31 00:35:19 +00:00
|
|
|
)
|
|
|
|
|
2016-03-05 17:29:51 +00:00
|
|
|
# Plugins (which do not include the shim/ephemeral) are 'additional'.
|
|
|
|
ADD_OSQUERY_LIBRARY(FALSE osquery_database_plugins ${OSQUERY_DATABASE_PLUGINS})
|
|
|
|
|
|
|
|
# Non-plugin tests are core.
|
2015-04-27 09:12:58 +00:00
|
|
|
file(GLOB OSQUERY_DATABASE_TESTS "tests/*.cpp")
|
|
|
|
ADD_OSQUERY_TEST(TRUE ${OSQUERY_DATABASE_TESTS})
|
2015-11-02 07:54:54 +00:00
|
|
|
|
2016-03-05 17:29:51 +00:00
|
|
|
# Plugin tests are additional.
|
|
|
|
ADD_OSQUERY_TEST(FALSE ${OSQUERY_DATABASE_PLUGIN_TESTS})
|
|
|
|
|
2015-11-02 07:54:54 +00:00
|
|
|
file(GLOB OSQUERY_DATABASE_BENCHMARKS "benchmarks/*.cpp")
|
|
|
|
ADD_OSQUERY_BENCHMARK(${OSQUERY_DATABASE_BENCHMARKS})
|