Jelajahi Sumber

try to work around Travis old GCC errors

Sean Barrett 6 tahun lalu
induk
melakukan
5037e236ed
2 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 1 1
      tests/Makefile
  2. 2 0
      tests/test_cpp_compilation.cpp

+ 1 - 1
tests/Makefile

@@ -6,5 +6,5 @@ CPPFLAGS = -Wno-write-strings -DSTB_DIVIDE_TEST
 
 all:
 	$(CC) $(INCLUDES) $(CFLAGS) ../stb_vorbis.c test_c_compilation.c test_c_lexer.c test_dxt.c test_easyfont.c test_image.c test_image_write.c test_perlin.c test_sprintf.c test_truetype.c test_voxel.c -lm
-	$(CC) $(INCLUDES) $(CPPFLAGS) test_cpp_compilation.cpp -lm -lstdc++
+	$(CC) $(INCLUDES) $(CPPFLAGS) -DTRAVIS test_cpp_compilation.cpp -lm -lstdc++
 	$(CC) $(INCLUDES) $(CFLAGS) -DIWT_TEST image_write_test.c -lm -o image_write_test

+ 2 - 0
tests/test_cpp_compilation.cpp

@@ -17,7 +17,9 @@
 #define STB_VOXEL_RENDER_IMPLEMENTATION
 #define STB_CONNECTED_COMPONENTS_IMPLEMENTATION
 #define STB_DS_IMPLEMENTATION
+#ifndef TRAVIS
 #define STBDS_UNIT_TESTS
+#endif
 
 #define STBI_MALLOC     my_malloc
 #define STBI_FREE       my_free