diff options
author | Ilya Leoshkevich iii@linux.ibm.com <iii@linux.ibm.com> | 2021-03-16 14:26:53 +0100 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2021-03-16 16:20:32 +0100 |
commit | cb791930b26b3c275b99e0db5fd7f0db35179cc4 (patch) | |
tree | ab3f137fbef68bdf59212a29edf53f71d527f2dc | |
parent | 263ebed2446637f2ecd45cddca9dd8e427675217 (diff) |
Fix defining HAVE_SYS_SDT_H with CMake
DFLTCC probe points are never activated when compiling with CMake. This
is because check_include_file() only sets an internal CMake variable,
but not a C define [1].
Fix as the link suggests - by adding an explicit add_definitions.
[1] https://cmake.org/pipermail/cmake/2015-June/060830.html
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b57e1e6..6cfd64f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,13 +314,16 @@ if(WITH_NATIVE_INSTRUCTIONS AND DEFINED NATIVEFLAG) endif() # -# Check for stndard/system includes +# Check for standard/system includes # check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(stdarg.h HAVE_STDARG_H) check_include_file(stdint.h HAVE_STDINT_H) check_include_file(stddef.h HAVE_STDDEF_H) check_include_file(sys/sdt.h HAVE_SYS_SDT_H) +if(HAVE_SYS_SDT_H) + add_definitions(-DHAVE_SYS_SDT_H) +endif() check_include_file(unistd.h HAVE_UNISTD_H) # |