From 66b95420535cca954f599198a4b59b11d0122243 Mon Sep 17 00:00:00 2001 From: Jayden Grubb Date: Thu, 17 Apr 2025 01:59:50 +1000 Subject: [PATCH] Add NOVA_COMPILER_GCC/CLANG/MSVC definition to CMakeLists --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22f3d6c..e6adc72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,20 @@ else () ) endif () +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_definitions( + NOVA_COMPILER_CLANG + ) +elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + add_compile_definitions( + NOVA_COMPILER_GCC + ) +elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_definitions( + NOVA_COMPILER_MSVC + ) +endif () + if (NOVA_BUILD_ENGINE) add_subdirectory(engine) endif ()