File tree 4 files changed +40
-1
lines changed
4 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,14 @@ set(PACKAGE_VERSION ${sqlite_orm_VERSION})
11
11
project ("sqlite_orm" VERSION ${PACKAGE_VERSION} )
12
12
13
13
# Handling C++ standard version to use
14
+ option (SQLITE_ORM_ENABLE_CXX_23 "Enable C++ 23" OFF )
14
15
option (SQLITE_ORM_ENABLE_CXX_20 "Enable C++ 20" OFF )
15
16
option (SQLITE_ORM_ENABLE_CXX_17 "Enable C++ 17" OFF )
16
17
set (CMAKE_CXX_STANDARD_REQUIRED ON )
17
- if (SQLITE_ORM_ENABLE_CXX_20)
18
+ if (SQLITE_ORM_ENABLE_CXX_23)
19
+ set (CMAKE_CXX_STANDARD 23)
20
+ message (STATUS "SQLITE_ORM: Build with C++23 features" )
21
+ elseif (SQLITE_ORM_ENABLE_CXX_20)
18
22
set (CMAKE_CXX_STANDARD 20)
19
23
message (STATUS "SQLITE_ORM: Build with C++20 features" )
20
24
elseif (SQLITE_ORM_ENABLE_CXX_17)
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ configuration:
20
20
environment :
21
21
appveyor_yml_disable_ps_linux : true
22
22
matrix :
23
+ - job_name : Visual Studio 2022, x64, C++23
24
+ appveyor_build_worker_image : Visual Studio 2022
25
+ platform : x64
26
+ SQLITE_ORM_CXX_STANDARD : " -DSQLITE_ORM_ENABLE_CXX_23=ON"
27
+
23
28
- job_name : clang, C++14
24
29
appveyor_build_worker_image : Ubuntu
25
30
CC : clang
Original file line number Diff line number Diff line change @@ -5,6 +5,33 @@ FetchContent_MakeAvailable(Catch2)
5
5
6
6
option (SQLITE_ORM_OMITS_CODECVT "Omits codec testing" OFF )
7
7
8
+
9
+ if (SQLITE_ORM_ENABLE_CXX_23 AND CMAKE_VERSION GREATER_EQUAL 3.28.2 AND MSVC and MSVC_VERSION GREATER_EQUAL 1930)
10
+ add_executable (module_tests
11
+ named_module.cpp
12
+ )
13
+
14
+ target_sources (module_tests PUBLIC
15
+ FILE_SET all_my_modules TYPE CXX_MODULES FILES
16
+ ../modules/sqlite_orm.ixx
17
+ )
18
+
19
+ target_compile_features (module_tests PUBLIC cxx_std_23)
20
+
21
+ if (SQLITE_ORM_OMITS_CODECVT)
22
+ message (STATUS "SQLITE_ORM_OMITS_CODECVT is enabled" )
23
+ target_compile_definitions (module_tests PRIVATE SQLITE_ORM_OMITS_CODECVT=1)
24
+ endif ()
25
+
26
+ target_precompile_headers(module_tests PRIVATE
27
+ <sqlite3.h>)
28
+
29
+ add_test (NAME "module_tests"
30
+ COMMAND module_tests
31
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
32
+ endif ()
33
+
34
+
8
35
add_executable (unit_tests
9
36
static_tests/functional/static_if_tests.cpp
10
37
static_tests/functional/mpl.cpp
Original file line number Diff line number Diff line change
1
+ import sqlite_orm;
2
+
3
+ int main () {}
You can’t perform that action at this time.
0 commit comments