Skip to content

Commit fbc31a4

Browse files
gargsaumyaSaumya Garg
andauthored
FEAT: update CMakeLists.txt to add new source file and include directories (#56)
* add library and include directories * removing this function, and will add it in pooling PR --------- Co-authored-by: Saumya Garg <gargsaumya@microsoft.com>
1 parent 292d8e9 commit fbc31a4

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

mssql_python/pybind/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ execute_process(
9090
)
9191

9292
# Add module library
93-
add_library(ddbc_bindings MODULE ddbc_bindings.cpp)
93+
add_library(ddbc_bindings MODULE ddbc_bindings.cpp connection/connection.cpp)
94+
95+
# Add include directories for your project
96+
target_include_directories(ddbc_bindings PRIVATE
97+
${CMAKE_CURRENT_SOURCE_DIR} # Root directory (for ddbc_bindings.h)
98+
${CMAKE_CURRENT_SOURCE_DIR}/connection # connection directory (for connection.h)
99+
)
94100

95101
# Set the output name to include Python version and architecture
96102
set_target_properties(ddbc_bindings PROPERTIES

mssql_python/pybind/connection/connection.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ SQLRETURN Connection::rollback() {
3939
// to be added
4040
}
4141

42-
SQLRETURN Connection::end_transaction(SQLSMALLINT completion_type) {
43-
// to be added
44-
}
45-
4642
SQLRETURN Connection::set_autocommit(bool enable) {
4743
LOG("Setting autocommit mode");
4844
// to be added

mssql_python/pybind/connection/connection.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class Connection {
3030
// Rollback the current transaction.
3131
SQLRETURN rollback();
3232

33-
// End the transaction with the specified completion type.
34-
SQLRETURN end_transaction(SQLSMALLINT completion_type);
35-
3633
// Enable or disable autocommit mode.
3734
SQLRETURN set_autocommit(bool value);
3835

0 commit comments

Comments
 (0)