diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/GrBoost.cmake | 10 | ||||
-rw-r--r-- | cmake/Modules/GrMiscUtils.cmake | 14 | ||||
-rw-r--r-- | cmake/Modules/GrPython.cmake | 18 | ||||
-rw-r--r-- | cmake/Modules/GrTest.cmake | 3 | ||||
-rw-r--r-- | cmake/msvc/sys/time.h | 69 |
5 files changed, 25 insertions, 89 deletions
diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake index 5e3ad1b435..4e515152d3 100644 --- a/cmake/Modules/GrBoost.cmake +++ b/cmake/Modules/GrBoost.cmake @@ -50,5 +50,13 @@ IF(MSVC) ENDIF(BOOST_ALL_DYN_LINK) ENDIF(MSVC) -SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47") +SET(Boost_ADDITIONAL_VERSIONS + "1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" + "1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" + "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" + "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" + "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" + "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" + "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" +) FIND_PACKAGE(Boost "1.35" COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake index a7e20124f5..c36c509b57 100644 --- a/cmake/Modules/GrMiscUtils.cmake +++ b/cmake/Modules/GrMiscUtils.cmake @@ -84,17 +84,3 @@ MACRO(GR_INCLUDE_SUBDIRECTORY subdir) LIST(REMOVE_AT _cmake_source_dirs 0) LIST(REMOVE_AT _cmake_binary_dirs 0) ENDMACRO(GR_INCLUDE_SUBDIRECTORY) - -######################################################################## -# Create an always-built target with a unique name -# Usage: GR_UNIQUE_TARGET(<description> <dependencies list>) -######################################################################## -FUNCTION(GR_UNIQUE_TARGET desc) - INCLUDE(GrPython) - FILE(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib -unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] -print re.sub('\\W', '_', '${desc} ${reldir} ' + unique)" - OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE) - ADD_CUSTOM_TARGET(${_target} ALL DEPENDS ${ARGN}) -ENDFUNCTION(GR_UNIQUE_TARGET) diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake index 8cffd7a010..f54dbc9ba7 100644 --- a/cmake/Modules/GrPython.cmake +++ b/cmake/Modules/GrPython.cmake @@ -51,10 +51,6 @@ ENDIF(PYTHON_EXECUTABLE) #make the path to the executable appear in the cmake gui SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter") -IF(NOT PYTHONINTERP_FOUND) - MESSAGE(FATAL_ERROR "Error: Python interpretor required by the build system.") -ENDIF(NOT PYTHONINTERP_FOUND) - ######################################################################## # Check for the existence of a python module: # - desc a string description of the check @@ -95,6 +91,19 @@ print sysconfig.get_python_lib(plat_specific=True, prefix='') FILE(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR) ######################################################################## +# Create an always-built target with a unique name +# Usage: GR_UNIQUE_TARGET(<description> <dependencies list>) +######################################################################## +FUNCTION(GR_UNIQUE_TARGET desc) + FILE(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib +unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] +print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))" + OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE) + ADD_CUSTOM_TARGET(${_target} ALL DEPENDS ${ARGN}) +ENDFUNCTION(GR_UNIQUE_TARGET) + +######################################################################## # Install python sources (also builds and installs byte-compiled python) ######################################################################## FUNCTION(GR_PYTHON_INSTALL) @@ -163,7 +172,6 @@ FUNCTION(GR_PYTHON_INSTALL) ENDIF() - INCLUDE(GrMiscUtils) #unique target GR_UNIQUE_TARGET("pygen" ${python_install_gen_targets}) ENDFUNCTION(GR_PYTHON_INSTALL) diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index 1851437afc..e9e2a0c2e2 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -98,6 +98,9 @@ FUNCTION(GR_ADD_TEST test_name) ENDFOREACH(arg) FILE(APPEND ${sh_file} "\n") + #make the shell file executable + EXECUTE_PROCESS(COMMAND chmod +x ${sh_file}) + ADD_TEST(${test_name} ${SHELL} ${sh_file}) ENDIF(UNIX) diff --git a/cmake/msvc/sys/time.h b/cmake/msvc/sys/time.h deleted file mode 100644 index 998b5d7bba..0000000000 --- a/cmake/msvc/sys/time.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_SYS_TIME_H_ -#define _MSC_SYS_TIME_H_ - -//http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/430449b3-f6dd-4e18-84de-eebd26a8d668 -#include < time.h > -#include <windows.h> //I've ommited this line. -#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) - #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 -#else - #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL -#endif - -struct timespec { - -time_t tv_sec; /* Seconds since 00:00:00 GMT, */ - -/* 1 January 1970 */ - -long tv_nsec; /* Additional nanoseconds since */ - -/* tv_sec */ - -}; - -struct timezone -{ - int tz_minuteswest; /* minutes W of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -static inline int gettimeofday(struct timeval *tv, struct timezone *tz) -{ - FILETIME ft; - unsigned __int64 tmpres = 0; - static int tzflag; - - if (NULL != tv) - { - GetSystemTimeAsFileTime(&ft); - - tmpres |= ft.dwHighDateTime; - tmpres <<= 32; - tmpres |= ft.dwLowDateTime; - - /*converting file time to unix epoch*/ - tmpres -= DELTA_EPOCH_IN_MICROSECS; - tv->tv_sec = (long)(tmpres / 1000000UL); - tv->tv_usec = (long)(tmpres % 1000000UL); - } - - if (NULL != tz) - { - if (!tzflag) - { - _tzset(); - tzflag++; - } - tz->tz_minuteswest = _timezone / 60; - tz->tz_dsttime = _daylight; - } - - return 0; -} - -#endif //_MSC_SYS_TIME_H_ |