add static linking
CMake Build / build (push) Successful in 22s

This commit is contained in:
2025-03-22 11:05:33 +08:00
parent 48a1faf868
commit 0970a23501
+2
View File
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.10)
project(cpp_example)
# static linking
set(CMAKE_EXE_LINKER_FLAGS "-static")
add_executable(cpp_example main.cpp)