-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
Line 19 in beca9bf
| # Compiler flags and definitions for Visual Studio come here |
For MSVC, add_compile_definitions(NOMINMAX) should be inserted to avoid problems with std::min and std::max in ads, AdsTool and AdsLibTest.bin. Without this definition, MSVC requires a data type specification std::min<T> and std::max<T>.
See: https://stackoverflow.com/questions/7035023/stdmax-expected-an-identifier
Alternatively, you can also add this to the projects:
if(MSVC)
target_compile_definitions(ads PRIVATE NOMINMAX)
endif()
and
if(MSVC)
target_compile_definitions(AdsTool PRIVATE NOMINMAX)
endif()
and
if(MSVC)
target_compile_definitions(AdsLibTest.bin PRIVATE NOMINMAX)
endif()
Metadata
Metadata
Assignees
Labels
No labels