From 36fea871c2b891908948363931071487d26268ce Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Wed, 6 Mar 2024 22:01:43 -0800 Subject: [PATCH] moved the OS stuff to the top --- CMakeLists.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b32ab69..4516e67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,14 @@ enable_testing() set(TARGET_GROUP production CACHE STRING "Group to build") +if(MSVC OR MSYS OR MINGW) + message("### SETUP FOR WINDOWS ###") + add_definitions(-DWINDOWS) +else() + message("### SETUP FOR UNIX ###") + add_definitions(-DUNIX) +endif() + # For being able to used LSP set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -24,14 +32,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_FLAGS "-Wall -Werror -Wpedantic") -if(MSVC OR MSYS OR MINGW) - message("### SETUP FOR WINDOWS ###") - add_definitions(-DWINDOWS) -else() - message("### SETUP FOR UNIX ###") - add_definitions(-DUNIX) -endif() - # ####################################### # TESTING STUFF # ####################################### @@ -41,6 +41,7 @@ endif() if (UNIT_TESTING) message(STATUS "CPPUTEST_LIB: ${CPPUTEST_LIB}") + add_subdirectory(cpputest) add_subdirectory(tests) endif()