File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ endfunction()
15
15
16
16
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
17
17
add_compile_options (-Wall -Wextra -pedantic -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wshadow -Wundef -Wold-style-cast -Wno-multichar )
18
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
19
+ add_compile_definitions (_CRT_SECURE_NO_WARNINGS )
18
20
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
19
21
add_compile_options (-Weverything )
20
22
# no need for c++98 compatibility
Original file line number Diff line number Diff line change 44
44
#define nullptr NULL
45
45
#endif
46
46
47
+ #if defined(_MSC_VER)
48
+ // suppress warnings about "conversion from 'type1' to 'type2', possible loss of data"
49
+ # pragma warning(disable : 4267)
50
+ # pragma warning(disable : 4244)
51
+ #endif
52
+
47
53
namespace simplecpp {
48
54
49
55
typedef std::string TokenString;
You can’t perform that action at this time.
0 commit comments