summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Szmigin <smidge@xsco.net>2020-09-29 22:48:28 +0100
committerGitHub <noreply@github.com>2020-09-29 22:48:28 +0100
commit2fb8d7e1811090bcea1ab204407936b408fa5ec3 (patch)
tree0488a4619bb04fa29bd7280ede8efcd2f72e4510
parent8b8dfd2326008e9cd477a106cf2991ebc9d9eeeb (diff)
parent9a41def39c2e108a425c2f57264f372f2c1134c4 (diff)
Merge pull request #30 from xsco/fix/cmake-msvc-cpp-version
Set `__cplusplus` correctly on MSVC under CMake
-rw-r--r--CMakeLists.txt6
-rw-r--r--meson.build2
2 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac70adf..06f992e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,11 +6,15 @@
# The meson/ninja build should be preferred in all other cases.
#
cmake_minimum_required(VERSION 3.13)
-project(libdjinterop VERSION 0.14.0)
+project(libdjinterop VERSION 0.14.1)
# Require C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
+if (MSVC)
+ # Ask MSVC to populate the __cplusplus macro properly.
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
+endif()
# Option to use either system SQLite or embedded SQLite.
option(SYSTEM_SQLITE "Use system installation of SQLite" ON)
diff --git a/meson.build b/meson.build
index 6017948..ea2e18d 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
project(
'djinterop',
'cpp', 'c',
- version: '0.14.0',
+ version: '0.14.1',
license: 'LGPL-3.0',
default_options: ['cpp_std=c++17', 'default_library=both'])