Commit 6fad3d5a authored by Xavier Deguillard's avatar Xavier Deguillard Committed by Facebook GitHub Bot

windows: default to c++17

Summary:
While compiling EdenFS on Windows, for every single file being compiled,
cl.exe complains that 2 incompatible /std option are being passed in on the
command line, a c++latest, and a c++17. The former is added by this file,
while the later is added by cmake via CMAKE_CXX_STANDARD.

I'm not exactly sure why the default is set to c++latest, but it's guaranteed
to always force cl.exe to generate a warning, as it simply cannot be set via
CMAKE_CXX_STANDARD.

A better fix to this would be to set CMAKE_CXX_STANDARD to 17, but since
folly still supports cmake 3.0, that didn't know about c++17, this can't
be done.

Reviewed By: yfeldblum

Differential Revision: D21392360

fbshipit-source-id: fc0e29ed89adf0a2c0b0193e7bd5f033463ed376
parent 6f06ca66
......@@ -39,7 +39,7 @@ if (NOT MSVC_FAVORED_ARCHITECTURE STREQUAL "blend" AND NOT MSVC_FAVORED_ARCHITEC
message(FATAL_ERROR "MSVC_FAVORED_ARCHITECTURE must be set to one of exactly, 'blend', 'AMD64', 'INTEL64', or 'ATOM'! Got '${MSVC_FAVORED_ARCHITECTURE}' instead!")
endif()
set(MSVC_LANGUAGE_VERSION "c++latest" CACHE STRING "One of 'c++17', or 'c++latest'. This determines which version of C++ to compile as.")
set(MSVC_LANGUAGE_VERSION "c++17" CACHE STRING "One of 'c++17', or 'c++latest'. This determines which version of C++ to compile as.")
set_property(
CACHE MSVC_LANGUAGE_VERSION
PROPERTY STRINGS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment