Commits

gyulalaszlo committed 34510e3

CMake formatting fix, updated platform.msvc.h

Comments (0)

Files changed (2)

 project( bitsquid_foundation )
 enable_testing()
 
-add_library( bitsquid_foundation
-
-    array.h
-    collection_types.h
-    hash.h
-    math_types.h
-    memory.h
-    memory_types.h
-    murmur_hash.h
-    queue.h
-    string_stream.h
-    temp_allocator.h
-    types.h
 
-    platform.msvc.h
+file(GLOB headers "*.h")
 
+add_library( bitsquid_foundation
     memory.cpp
     murmur_hash.cpp
     string_stream.cpp
+
+		${headers}
   )
 
 add_executable( bitsquid_foundation_unit_test
 /// Snprintf is not part of C89.
 /// It's standard only in C99. Microsoft has no plan supporting C99.
 #define snprintf c99_snprintf
+#define vsnprintf c99_vsnprintf
 
-
+/// MSVC implementation of the C99 vsnprintf function.
 inline int c99_vsnprintf( char* str, size_t size, const char* format, va_list ap )
 {
     int count = -1;
 
 
 /// MSVC implementation of the C99 snprintf function.
-/// Original source: http://stackoverflow.com/a/8712996/147778
 inline int c99_snprintf( char* str, size_t size, const char* format, ... )
 {
     int count;
 __pragma(warning(disable:4005))
 
 /// Disable the compiler warning C4127 for the do {} while(0) loops.
-/// Original source: http://stackoverflow.com/a/1946485/147778
 #define MAKE_DELETE(a, T, p) \
     __pragma(warning(push)) \
     __pragma(warning(disable:4127)) \