From 40a13e8aa4e3dee1a47d7f0f47cbd490892b976a Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 06:49:25 -0600 Subject: [PATCH] Define NOMINMAX and multi-processor compilation for wxtest --- test/test.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test.cmake b/test/test.cmake index b7b5fffa..0643c057 100644 --- a/test/test.cmake +++ b/test/test.cmake @@ -83,6 +83,14 @@ endif() target_compile_definitions(wxtest PRIVATE SCWX_TEST_DATA_DIR="${SCWX_DIR}/test/data") +if (MSVC) + # Don't include Windows macros + target_compile_options(wxtest PRIVATE -DNOMINMAX) + + # Enable multi-processor compilation + target_compile_options(wxtest PRIVATE "/MP") +endif() + gtest_discover_tests(wxtest) target_link_libraries(wxtest GTest::gtest