]> granicus.if.org Git - check/commitdiff
cmake: use libcompat's snprintf if not available on system
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 25 Dec 2013 03:04:51 +0000 (03:04 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 25 Dec 2013 03:04:51 +0000 (03:04 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@960 64e312b2-a51f-0410-8e61-82d0ca0eb02a

lib/CMakeLists.txt

index 750cb6389b8057e65bede2c188ca707aaddfdd76..7d99513b3f14bb35dc246e52dc8897a5b6080872 100644 (file)
@@ -64,6 +64,10 @@ if(NOT HAVE_DECL_SLEEP)
   set(SOURCES ${SOURCES} sleep.c)
 endif(NOT HAVE_DECL_SLEEP)
 
+if(NOT HAVE_SNPRINTF AND NOT HAVE__SNPRINTF)
+    set(SOURCES ${SOURCES} snprintf.c)
+endif(NOT HAVE_SNPRINTF AND NOT HAVE__SNPRINTF)
+
 if(NOT HAVE_DECL_STRDUP AND NOT HAVE__STRDUP)
   set(SOURCES ${SOURCES} strdup.c)
 endif(NOT HAVE_DECL_STRDUP AND NOT HAVE__STRDUP)