From 1566ff9160d32539b521645c78e25d2211f0fa92 Mon Sep 17 00:00:00 2001 From: eathenabot Date: Thu, 31 May 2012 05:02:00 +0000 Subject: * Merged changes up to eAthena 15105. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16171 54d463be-8e91-2dee-dedb-b68131a5f0ec --- CMakeLists.txt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 83e021fc3..4a1a06b2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,19 +209,11 @@ endif() # (ref. bugreport:1003). # message( STATUS "Check for monotonic clock" ) -set( SOURCECODE - "#include \n" - "#include \n" - "#include \n" - "int main(int argc, char** argv){\n" - " struct timespec tval;\n" - " return clock_gettime(CLOCK_MONOTONIC, &tval);\n" - "}\n" - ) find_library( RT_LIBRARY rt )# (optional, rt on Debian) mark_as_advanced( RT_LIBRARY ) set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ${RT_LIBRARY} ) -CHECK_C_SOURCE_RUNS( "${SOURCECODE}" HAVE_MONOTONIC_CLOCK ) +file( READ "${CMAKE_SOURCE_DIR}/3rdparty/cmake/tests/HAVE_MONOTONIC_CLOCK.c" _SOURCE ) +CHECK_C_SOURCE_RUNS( "${_SOURCE}" HAVE_MONOTONIC_CLOCK ) if( HAVE_MONOTONIC_CLOCK ) message( STATUS "Check for monotonic clock - yes" ) set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${RT_LIBRARY} ) -- cgit v1.2.3-60-g2f50