Explorar o código

tests: add a work-around for macOS linking error

wwylele %!s(int64=9) %!d(string=hai) anos
pai
achega
282195b450
Modificáronse 2 ficheiros con 15 adicións e 0 borrados
  1. 1 0
      src/tests/CMakeLists.txt
  2. 14 0
      src/tests/glad.cpp

+ 1 - 0
src/tests/CMakeLists.txt

@@ -1,4 +1,5 @@
 set(SRCS
+            glad.cpp
             tests.cpp
             core/file_sys/path_parser.cpp
             )

+ 14 - 0
src/tests/glad.cpp

@@ -0,0 +1,14 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include <catch.hpp>
+#include <glad/glad.h>
+
+// This is not an actual test, but a work-around for issue #2183.
+// If tests uses functions in core but doesn't explicitly use functions in glad, the linker of macOS
+// will error about undefined references from video_core to glad. So we explicitly use a glad
+// function here to shut up the linker.
+TEST_CASE("glad fake test", "[dummy]") {
+    REQUIRE(&gladLoadGL != nullptr);
+}