From 2a26553a58c9be60d29ee1f4b1f80aa64e52b9f3 Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Fri, 1 Nov 2024 11:09:28 +0800 Subject: [PATCH] Build the C extension with optimize options enabled (#230) --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 493bfb0..084e078 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,9 @@ set(CMAKE_PREFIX_PATH ${PROJECT_SOURCE_DIR}/pybind11/include ${CMAKE_PREFIX_PATH option(LINK_STATIC "Link against static libraries" OFF) MESSAGE(STATUS "LINK_STATIC: " ${LINK_STATIC}) +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif () MESSAGE(STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE}) set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_package(Threads REQUIRED)