From 623fe136b3bf78d9b6326327d5746fd2b5b3ec9b Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Mon, 13 May 2024 15:26:28 +0800 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bc15ee92..406351820 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,11 @@ SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake") include_directories(include) -add_compile_options(-O3) +if(MSVC) + add_compile_options(/O2) +else() + add_compile_options(-O3) +endif() option(ENABLE_TEST_SPEED "Enable test speed" OFF)