We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a25bd9a commit 9c2d6b8Copy full SHA for 9c2d6b8
1 file changed
CMakeLists.txt
@@ -25,7 +25,8 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithD
25
# Debug: No optimization (-O0), full debug info (-g)
26
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D_CFDESKTOPDEBUG" CACHE STRING "Flags used by the C++ compiler during Debug builds" FORCE)
27
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "" CACHE STRING "Linker flags used during Debug builds" FORCE)
28
-
+# For Static Library Relocatable
29
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
30
# Release: Maximum optimization (-O3), no debug info
31
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Flags used by the C++ compiler during Release builds" FORCE)
32
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" CACHE STRING "Linker flags used during Release builds" FORCE)
0 commit comments