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"