Files
openGauss-third_party/dependency/cJSON/project_include.cmake
2022-03-10 19:21:58 +08:00

12 lines
313 B
CMake

add_compile_options(
-fstack-protector-all
$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,STATIC_LIBRARY>:-fPIC>
$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-fPIE>
)
add_link_options(
-Wl,-z,now
-Wl,-z,relro
-Wl,-z,noexecstack
$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-pie>
)