From a5a1596de0e057c1a18e8d1b651821fa89f4dcc5 Mon Sep 17 00:00:00 2001 From: Troy Schrapel Date: Thu, 21 Sep 2023 14:52:53 +0930 Subject: [PATCH] Fixed CMakeLists.txt for Pi Pico --- CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35d3b0c..63ec04a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,14 +13,14 @@ if (NOT BUILD_SHARED_LIBS) add_definitions(-DVR_EMU_TMS9918_STATIC) endif() -if (PROJECT_IS_TOP_LEVEL) - if(MSVC) - add_compile_options(/W4 /WX) - add_compile_options(/arch:AVX2 /Ox) - else() - add_compile_options(-Wall -Wextra -Wpedantic -Werror) - add_compile_options(-march=native) - endif() +if(MSVC) + add_compile_options(/W4 /WX) + add_compile_options(/arch:AVX2 /Ox) +else() + add_compile_options(-Wall -Wextra -Wpedantic -Werror) + if (UNIX) + add_compile_options(-march=native) + endif() endif() include(CTest)