File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,17 +107,18 @@ if(CMAKE_COMPILER_IS_GNUCC)
107107 add_compile_options (-W -Wall )
108108endif (CMAKE_COMPILER_IS_GNUCC )
109109
110- if (MSVC )
111- add_definitions (-D_CRT_SECURE_NO_WARNINGS )
112- if (MSVC_VERSION LESS 1700)
113- # Compile as C++ to allow declarations after statements. (C11 feature)
114- add_compile_options (/TP )
115- # However, this does not work as the code is not C++ compliant either.
116- message (FATAL_ERROR "MSVC_VERSION(${MSVC_VERSION} ) is not supported." )
117- elseif (MSVC_VERSION LESS 1920)
118- else ()
119- add_compile_options (/std:c11 )
120- endif (MSVC_VERSION LESS 1700 )
110+ if (MSVC )
111+ add_definitions (-D_CRT_SECURE_NO_WARNINGS )
112+ if (MSVC_VERSION LESS 1700)
113+ # VS2010 and earlier.
114+ # Compile as C++ to allow declarations after statements. (C11 feature)
115+ add_compile_options (/TP )
116+ elseif (MSVC_VERSION LESS 1920)
117+ # VS2013|VS2015|VS2017
118+ else ()
119+ # VS2019 and later.
120+ add_compile_options (/std:c11 )
121+ endif (MSVC_VERSION LESS 1700 )
121122endif (MSVC )
122123
123124# Uncomment to allow missing fields in the resolved-writer
Original file line number Diff line number Diff line change @@ -31,10 +31,8 @@ Limitations of Windows Build:
3131 statements were removed, that Avro-C would compile under
3232 Microsoft's C compiler also. I have not tried this.
3333
34- Note: This is referring to a C11 feature which is supported from VS2013
35- onward. However, compiling as C++ does not work as the code is not C++
36- compliant either. Basically, VS2010 or before just cannot be supported
37- unless significant changes are made to the code.
34+ Note: This is referring to a C11 feature which is supported in VS2013
35+ and later.
3836
39372. The shared library, i.e. DLL, for avro has not been built. There
4038 are instructions on how to build DLLs using CMake at
You can’t perform that action at this time.
0 commit comments