diff options
author | Adam Szmigin <smidge@xsco.net> | 2020-09-29 22:48:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 22:48:28 +0100 |
commit | 2fb8d7e1811090bcea1ab204407936b408fa5ec3 (patch) | |
tree | 0488a4619bb04fa29bd7280ede8efcd2f72e4510 /CMakeLists.txt | |
parent | 8b8dfd2326008e9cd477a106cf2991ebc9d9eeeb (diff) | |
parent | 9a41def39c2e108a425c2f57264f372f2c1134c4 (diff) |
Merge pull request #30 from xsco/fix/cmake-msvc-cpp-version
Set `__cplusplus` correctly on MSVC under CMake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 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) |