From a43f2a99ce87062b8162eded2abff6e200a02a0b Mon Sep 17 00:00:00 2001 From: Troy Schrapel Date: Sat, 16 Sep 2023 11:07:26 +0930 Subject: [PATCH] only build tests for top-level project --- CMakeLists.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf8f588..a7f8060 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,19 +18,17 @@ project(vrEmuLcd) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/) -if (PROJECT_IS_TOP_LEVEL) - if(MSVC) - add_compile_options(/W4 /WX) - else() - add_compile_options(-Wall -Wextra -Wpedantic -Werror) - add_compile_options(-march=native) - endif() +if(MSVC) + add_compile_options(/W4 /WX) +else() + add_compile_options(-Wall -Wextra -Wpedantic -Werror) + add_compile_options(-march=native) endif() include(CTest) add_subdirectory(src) -if (NOT DEFINED EMSCRIPTEN) -add_subdirectory(test) +if (PROJECT_IS_TOP_LEVEL) + add_subdirectory(test) endif() \ No newline at end of file