Skip to content

Commit 6b3b486

Browse files
committed
fix build on BUILD_PWAL=OFF
1 parent e078cb9 commit 6b3b486

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

src/concurrency_control/interface/start_up.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static Status create_datastore(database_options options) { // NOLINT
106106
}
107107
#endif
108108

109-
static Status init_body(database_options options, void* datastore) { // NOLINT
109+
static Status init_body(database_options options, [[maybe_unused]] void* datastore) {
110110
// prevent double initialization
111111
if (get_initialized()) { return Status::WARN_ALREADY_INIT; }
112112

test/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,16 @@ else ()
135135
file (GLOB TEST_WITH_LIMESTONE_DOUBLE_SOURCES
136136
"test_double/*.cpp"
137137
)
138+
file (GLOB LIMESTONE_DOUBLE_SOURCES "test_double/doubles/limestone_double.cpp")
139+
add_library(limestone-double ${LIMESTONE_DOUBLE_SOURCES})
140+
target_link_libraries(limestone-double PRIVATE limestone)
141+
target_include_directories(limestone-double
142+
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
143+
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
144+
)
138145
endif()
139146
endif()
140147

141-
file (GLOB LIMESTONE_DOUBLE_SOURCES "test_double/doubles/limestone_double.cpp")
142-
add_library(limestone-double ${LIMESTONE_DOUBLE_SOURCES})
143-
target_link_libraries(limestone-double PRIVATE limestone)
144-
target_include_directories(limestone-double
145-
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
146-
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
147-
)
148-
149148
register_tests(
150149
TARGET shirakami
151150
DEPENDS

test/start/start_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
#include "gtest/gtest.h"
77
#include "glog/logging.h"
88

9+
#ifdef PWAL
910
#include "limestone/api/datastore.h"
11+
#endif
1012

1113
#include "shirakami/api_diagnostic.h"
1214
#include "shirakami/database_options.h"
@@ -42,6 +44,8 @@ TEST_F(start_test, valid_recovery_invalid_log_directory) { // NOLINT
4244
fin();
4345
}
4446

47+
#ifdef PWAL
48+
4549
static limestone::api::configuration create_limestone_config(const std::string& path) {
4650
#if HAVE_LIMESTONE_CONFIG_CTOR_NONE && HAVE_LIMESTONE_CONFIG_SET_DATA_LOCATION_STDFSPATH
4751
auto limestone_config = limestone::api::configuration{};
@@ -71,4 +75,6 @@ TEST_F(start_test, error_when_borrow_ds_and_maintenance) { // NOLINT
7175
delete datastore;
7276
}
7377

78+
#endif
79+
7480
} // namespace shirakami::testing

0 commit comments

Comments
 (0)