From 0eec0fd4e51cd9f2a65aeb2d72dbee81eb47a46a Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Thu, 25 Jan 2024 10:14:36 +0100 Subject: [PATCH] add platform define for tests --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 080053d5..030f5743 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,11 @@ if(${PROJECT_NAME}_ENABLE_UNIT_TESTING) target_compile_features(${PROJECT_NAME}-tests PRIVATE ${PRJ_COMPILE_FEATURES}) target_compile_definitions(${PROJECT_NAME}-tests PRIVATE ${PRJ_DEFINITIONS} ${PRJ_WARNINGS}) set_project_warnings(${PROJECT_NAME}-tests) + if (WIN32) + target_compile_definitions(${PROJECT_NAME}-tests PRIVATE -DPLATFORM_WINDOWS=1) + else () + target_compile_definitions(${PROJECT_NAME}-tests PRIVATE -DPLATFORM_LINUX=1) + endif () endif()