• R/O
  • SSH

cmake_tools: Commit

This library contains CMake code (files with .cmake extentions),
Python scripts and it is intended for simplification different actions
on the organization of the build environment.


Commit MetaInfo

Revisionbc6fa73da933d50d179d5282fdf82fce4f6d8d34 (tree)
Time2024-03-18 11:57:06
AuthorSergey Gusarov
CommiterSergey Gusarov

Log Message

Fixed reporting of cpp version since MS VC++ 2017+

Change Summary

Incremental Difference

diff -r 37f7a475f64b -r bc6fa73da933 tools/compilers/msvs_cxx.cmake
--- a/tools/compilers/msvs_cxx.cmake Mon Mar 18 04:14:01 2024 +0300
+++ b/tools/compilers/msvs_cxx.cmake Mon Mar 18 05:57:06 2024 +0300
@@ -24,6 +24,9 @@
2424 if (MSVC_VERSION VERSION_GREATER 1900 OR MSVC_VERSION VERSION_EQUAL 1900)
2525 # If CRT wants to be secure - let it be
2626 set(CMT_COMPILER_DEFINITIONS "${CMT_COMPILER_DEFINITIONS} -D__STDC_WANT_SECURE_LIB__")
27+
28+# Without it VC++ breaks standard and reports that it c++98-compatible only
29+ set(CMT_COMPILER_DEFINITIONS "${CMT_COMPILER_DEFINITIONS} /Zc:__cplusplus")
2730 endif()
2831
2932 set(CMT_COMPILER_OPTIONS "${CMT_COMPILER_OPTIONS} /Wall")
Show on old repository browser