]> git.seodisparate.com - c_simple_http/commitdiff
Update CMakeLists.txt
authorStephen Seo <seo.disparate@gmail.com>
Wed, 11 Sep 2024 03:58:29 +0000 (12:58 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Wed, 11 Sep 2024 03:58:29 +0000 (12:58 +0900)
CMakeLists.txt

index 0183e67e682577bc4a8b162146337b3288a6ac25..f4b7de8186d5ed71edbad61e713ae53fd4bfe464 100644 (file)
@@ -44,7 +44,8 @@ $<IF:$<CONFIG:Debug>,-Og,-fno-delete-null-pointer-checks -fno-strict-overflow -f
 -D_GLIBCXX_ASSERTIONS
 -fstrict-flex-arrays=3
 -fstack-clash-protection -fstack-protector-strong
--fPIC
+-fPIE -pie
+-Werror=implicit -Werror=incompatible-pointer-types -Werror=int-conversion
 )
 
 target_link_options(c_simple_http PUBLIC
@@ -56,7 +57,8 @@ $<IF:$<CONFIG:Debug>,-Og,-fno-delete-null-pointer-checks -fno-strict-overflow -f
 -fstack-clash-protection -fstack-protector-strong
 -Wl,-z,noexecstack
 -Wl,-z,relro -Wl,-z,now
--fPIC
+-fPIE -pie
+-Werror=implicit -Werror=incompatible-pointer-types -Werror=int-conversion
 )
 
 target_compile_options(unit_tests PUBLIC
@@ -66,7 +68,8 @@ $<IF:$<CONFIG:Debug>,-Og,-fno-delete-null-pointer-checks -fno-strict-overflow -f
 -D_GLIBCXX_ASSERTIONS
 -fstrict-flex-arrays=3
 -fstack-clash-protection -fstack-protector-strong
--fPIC
+-fPIE -pie
+-Werror=implicit -Werror=incompatible-pointer-types -Werror=int-conversion
 )
 
 target_link_options(unit_tests PUBLIC
@@ -78,5 +81,6 @@ $<IF:$<CONFIG:Debug>,-Og,-fno-delete-null-pointer-checks -fno-strict-overflow -f
 -fstack-clash-protection -fstack-protector-strong
 -Wl,-z,noexecstack
 -Wl,-z,relro -Wl,-z,now
--fPIC
+-fPIE -pie
+-Werror=implicit -Werror=incompatible-pointer-types -Werror=int-conversion
 )