|
# 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()
ADS/CMakeLists.txt
Line 19 in beca9bf
For MSVC,
add_compile_definitions(NOMINMAX)should be inserted to avoid problems withstd::minandstd::maxin ads, AdsTool and AdsLibTest.bin. Without this definition, MSVC requires a data type specificationstd::min<T>andstd::max<T>.See: https://stackoverflow.com/questions/7035023/stdmax-expected-an-identifier
Alternatively, you can also add this to the projects:
and
and