diff --git a/CMakeLists.txt b/CMakeLists.txt index 04551dfb..7b307a11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,8 @@ endif() if(MSVC) # Don't warn when using standard non-secure functions. add_compile_definitions(_CRT_SECURE_NO_WARNINGS) + # Don't warn about using the portable "strdup" function. + add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) # Fix std::min and std::max handling with windows.harness. add_compile_definitions(NOMINMAX) endif() diff --git a/test_common/CMakeLists.txt b/test_common/CMakeLists.txt index 61580300..b0505345 100644 --- a/test_common/CMakeLists.txt +++ b/test_common/CMakeLists.txt @@ -21,8 +21,3 @@ set(HARNESS_SOURCES ) add_library(harness STATIC ${HARNESS_SOURCES}) - -if(MSVC) - # Don't warn about using the portable "strdup" function. - target_compile_definitions(harness PRIVATE _CRT_NONSTDC_NO_DEPRECATE) -endif() \ No newline at end of file