Skip to content

Commit 9dbf6a8

Browse files
committed
update example2 with cmake_minimum_required(VERSION 3.5...4.0)
1 parent aa021a5 commit 9dbf6a8

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

examples/example2/CMakeLists.txt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Example CMake file for compiling & linking a project with the the SQLiteCpp wrapper
2-
#
3-
# Copyright (c) 2012-2023 Sebastien Rombauts ([email protected])
4-
#
5-
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
6-
# or copy at http://opensource.org/licenses/MIT)
7-
cmake_minimum_required(VERSION 3.1) # for "CMAKE_CXX_STANDARD" version
8-
project(SQLiteCpp_Example VERSION 2.0)
9-
10-
# SQLiteC++ 3.x now requires C++11 compiler
11-
set(CMAKE_CXX_STANDARD 11)
12-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
13-
14-
# Add SQLite3 C++ wrapper around sqlite3 library (and sqlite3 itself provided for ease of use)
15-
# Here you can set CMake variables to avoid building Example, as well as cpplint, cppcheck...
16-
# or set them in the cmake command line (see for instance provided build.bat/build.sh scripts)
17-
set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE)
18-
set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE)
19-
set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "" FORCE)
20-
add_subdirectory(../.. SQLiteCpp) # out-of-source build requires explicit subdir name for compilation artifacts
21-
22-
# Add main.cpp example source code to the executable
23-
add_executable(SQLiteCpp_Example src/main.cpp)
24-
25-
# Link SQLiteCpp_example1 with SQLiteCpp
26-
target_link_libraries(SQLiteCpp_Example SQLiteCpp)
1+
# Example CMake file for compiling & linking a project with the the SQLiteCpp wrapper
2+
#
3+
# Copyright (c) 2012-2023 Sebastien Rombauts ([email protected])
4+
#
5+
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
6+
# or copy at http://opensource.org/licenses/MIT)
7+
cmake_minimum_required(VERSION 3.5...4.0)
8+
project(SQLiteCpp_Example VERSION 2.0)
9+
10+
# SQLiteC++ 3.x now requires C++11 compiler
11+
set(CMAKE_CXX_STANDARD 11)
12+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
13+
14+
# Add SQLite3 C++ wrapper around sqlite3 library (and sqlite3 itself provided for ease of use)
15+
# Here you can set CMake variables to avoid building Example, as well as cpplint, cppcheck...
16+
# or set them in the cmake command line (see for instance provided build.bat/build.sh scripts)
17+
set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE)
18+
set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE)
19+
set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "" FORCE)
20+
add_subdirectory(../.. SQLiteCpp) # out-of-source build requires explicit subdir name for compilation artifacts
21+
22+
# Add main.cpp example source code to the executable
23+
add_executable(SQLiteCpp_Example src/main.cpp)
24+
25+
# Link SQLiteCpp_example1 with SQLiteCpp
26+
target_link_libraries(SQLiteCpp_Example SQLiteCpp)

0 commit comments

Comments
 (0)