diff options
author | eathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-31 05:02:00 +0000 |
---|---|---|
committer | eathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-31 05:02:00 +0000 |
commit | 1566ff9160d32539b521645c78e25d2211f0fa92 (patch) | |
tree | 73604a711179639d109e3899b3de00e5d625277a /CMakeLists.txt | |
parent | e7b059e2ddbd6f4b12ae78d6e1053a896f09c283 (diff) | |
download | hercules-1566ff9160d32539b521645c78e25d2211f0fa92.tar.gz hercules-1566ff9160d32539b521645c78e25d2211f0fa92.tar.bz2 hercules-1566ff9160d32539b521645c78e25d2211f0fa92.tar.xz hercules-1566ff9160d32539b521645c78e25d2211f0fa92.zip |
* Merged changes up to eAthena 15105.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16171 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 2 insertions, 10 deletions
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 <sys/time.h>\n" - "#include <time.h>\n" - "#include <unistd.h>\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} ) |