Skip to content

Commit 7e8b534

Browse files
committed
cmake: better doc for MSVC flags
1 parent 9841d9c commit 7e8b534

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

cmake/compilerFlags.cmake

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,7 @@ if(MSVC)
167167
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
168168
endif ()
169169

170-
# Object Level Parallelism
171-
add_compile_options(/MP)
172-
add_compile_options(/utf-8)
173-
add_definitions(-DNOMINMAX) # This definition is not only needed for Exiv2 but also for xmpsdk
174-
175-
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
176-
if (MSVC_VERSION GREATER_EQUAL "1910") # VS2017 and up
177-
add_compile_options("/Zc:__cplusplus")
178-
endif()
179-
170+
add_compile_options(/MP) # Object Level Parallelism
171+
add_compile_options(/utf-8) # Set source and execution character sets to UTF-8
172+
add_definitions(-DNOMINMAX) # This definition is not only needed for Exiv2 but also for xmpsdk
180173
endif()

0 commit comments

Comments
 (0)