diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2017-02-10 20:35:12 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2017-02-10 20:35:12 +0900 |
commit | 4b11dc566a5bbfa1378d6266525c281b028abcc8 (patch) | |
tree | b48831a898906734f8884d08b6e18f1144ee2b82 /src/gc/unix/configure.cmake | |
parent | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff) | |
download | coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.gz coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.bz2 coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.zip |
Imported Upstream version 1.0.0.9910upstream/1.0.0.9910
Diffstat (limited to 'src/gc/unix/configure.cmake')
-rw-r--r-- | src/gc/unix/configure.cmake | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/gc/unix/configure.cmake b/src/gc/unix/configure.cmake new file mode 100644 index 0000000000..6e1e8fe27d --- /dev/null +++ b/src/gc/unix/configure.cmake @@ -0,0 +1,40 @@ +check_include_files(sys/time.h HAVE_SYS_TIME_H) +check_include_files(sys/mman.h HAVE_SYS_MMAN_H) +check_cxx_source_compiles(" + #include <pthread.h> + #include <stdint.h> + + int main() + { + uint64_t tid; + pthread_threadid_np(pthread_self(), &tid); + return (int)tid; + } + " HAVE_PTHREAD_THREADID_NP) + +check_cxx_source_compiles(" + #include <pthread.h> + #include <stdint.h> + + int main() + { + return (int)pthread_getthreadid_np(); + } + " HAVE_PTHREAD_GETTHREADID_NP) + +check_cxx_source_runs(" + #include <sched.h> + + int main() + { + int result = sched_getcpu(); + if (result == -1) + { + return 1; + } + + return 0; + } + " HAVE_SCHED_GETCPU) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
\ No newline at end of file |