From 28e9b702f7e848792512bb58ac4008d647bf5158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Wed, 25 Sep 2013 23:55:09 +0200 Subject: [PATCH] Suppressed the flag SQLITE_ENABLE_COLUMN_METADATA from SQLiteC++ wrapper source code. - it can be defined by CMake in client code application --- CMakeLists.txt | 8 ++++++++ src/Column.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfd2cdc..5607da0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,14 @@ cmake_minimum_required (VERSION 2.6) project (SQLiteCpp) +# Enable the use of SQLite column metadata and Column::getName() method, +# Require that the sqlite3 library is also compiled with this flag. +option (SQLITE_ENABLE_COLUMN_METADATA + "Enable Column::getName(). Require support from sqlite3 library." OFF) +if (SQLITE_ENABLE_COLUMN_METADATA) + add_definitions(-DSQLITE_ENABLE_COLUMN_METADATA) +endif() + if (MSVC) # build the SQLite3 C library for Windows (for ease of use) add_subdirectory (sqlite3) diff --git a/src/Column.h b/src/Column.h index 7267928..8b1e505 100644 --- a/src/Column.h +++ b/src/Column.h @@ -10,14 +10,6 @@ */ #pragma once -/** - * @brief Enable APIs that provide convenient access to meta-data about tables and queries. - * - * @see #getName() - * - * @warning Requires this SQLITE_ENABLE_COLUMN_METADATA preprocessor macro to be also defined at compile times of the SQLite library. - */ -#define SQLITE_ENABLE_COLUMN_METADATA #include #include "Exception.h"