]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/pcre2/pcre2-10.35_add_check_for_Intel_CET.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / pcre2 / pcre2-10.35_add_check_for_Intel_CET.patch
CommitLineData
1e59de90
TL
1--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200
2+++ b/CMakeLists.txt 2020-07-09 19:33:12.725648600 +0200
3@@ -146,6 +146,23 @@
4 )
5 set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
6
7+# Check whether Intel CET is enabled, and if so, adjust compiler flags. This
8+# code was written by PH, trying to imitate the logic from the autotools
9+# configuration.
10+
11+CHECK_C_SOURCE_COMPILES(
12+ "#ifndef __CET__
13+ #error CET is not enabled
14+ #endif
15+ int main() { return 0; }"
16+ INTEL_CET_ENABLED
17+)
18+
19+IF (INTEL_CET_ENABLED)
20+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk")
21+ENDIF(INTEL_CET_ENABLED)
22+
23+
24 # User-configurable options
25 #
26 # Note: CMakeSetup displays these in alphabetical order, regardless of