summaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2016-08-10 09:29:17 -0400
committerAllen Winter <allen.winter@kdab.com>2016-08-10 09:29:17 -0400
commitccb0f3c34a87051c04f12a9df0ea24e04b2a712d (patch)
tree67e8a5794bb66008b1c5268d66d847140e43693a /ConfigureChecks.cmake
parent3f456f1b12a9bdb013a23d250f64aad0f7683e8b (diff)
downloadlibical-git-ccb0f3c34a87051c04f12a9df0ea24e04b2a712d.tar.gz
ConfigureChecks.cmake - hack finding snprintf for MSVS2015
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 6fced15b..bb115381 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -36,7 +36,6 @@ else()
check_function_exists(open HAVE_OPEN) #Unix <sys/stat.h>,<sys/types.h>,<fcntl.h>
check_function_exists(nanosleep HAVE_NANOSLEEP) #Unix <time.h>
check_function_exists(signal HAVE_SIGNAL) #Unix <signal.h>
- check_function_exists(snprintf HAVE_SNPRINTF) #Unix <stdio.h>
check_function_exists(stat HAVE_STAT) #Unix <sys/stat.h>,<sys/types.h>,<unistd.h>
check_function_exists(strdup HAVE_STRDUP) #Unix <string.h>
check_function_exists(strcasecmp HAVE_STRCASECMP) #Unix <strings.h>
@@ -55,6 +54,11 @@ check_function_exists(backtrace HAVE_BACKTRACE)
check_function_exists(iswspace HAVE_ISWSPACE) #Linux <wctype.h>
check_function_exists(setenv HAVE_SETENV)
check_function_exists(unsetenv HAVE_UNSETENV)
+check_function_exists(snprintf HAVE_SNPRINTF) #Available with MSVC 2015
+#TODO:V2:BUILDSYSTEM:Figure out why check_function_exists fails to find snprintf for MSVC2015
+if(MSVC_VERSION GREATER 1899)
+ set(HAVE_SNPRINTF true)
+endif()
set(_SAVE_RQL ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES kernel32.lib)