From 7aa2a67d8381c9a88d69a3f53d74a7f079214263 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Mon, 9 Mar 2026 21:49:43 +0800 Subject: Establish a well-structured modern C++ project architecture Focus on code quality: Treat strict warnings as errors, memory checks with Sanitizers, Clang formatting and static analysis Performance optimization: LTO, ccache --- etc/lto.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 etc/lto.cmake (limited to 'etc/lto.cmake') diff --git a/etc/lto.cmake b/etc/lto.cmake new file mode 100644 index 0000000..517ec14 --- /dev/null +++ b/etc/lto.cmake @@ -0,0 +1,8 @@ +include(CheckIPOSupported) +check_ipo_supported(RESULT ipo_supported OUTPUT error) +if(ipo_supported) + message(STATUS "IPO / LTO supported and enabled.") + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) +else() + message(STATUS "IPO / LTO not supported: <${error}>") +endif() \ No newline at end of file -- cgit v1.2.3