Edit

kc3-lang/angle/util/BUILD.gn

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2019-12-16 16:03:57
    Hash : 9190f49c
    Message : GN: Make new angle_test_utils target. This source set target lets other targets import the test utils without needing to export them. They get built into angle_util. They also get compiled into the various tests and samples. The change also fixes export issues. Moves some of the GN logic into the util/ subfolder. Bug: angleproject:3162 Bug: chromium:1030192 Change-Id: If99d201092ad8541c0de60b3bd893ac9b5875270 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1968259 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>

  • util/BUILD.gn
  • # Copyright 2019 The ANGLE Project Authors. All rights reserved.
    # Use of this source code is governed by a BSD-style license that can be
    # found in the LICENSE file.
    
    import("../gni/angle.gni")
    
    if (is_win && !angle_is_winuwp) {
      angle_source_set("angle_stack_walker") {
        sources = [
          "windows/third_party/StackWalker/src/StackWalker.cpp",
          "windows/third_party/StackWalker/src/StackWalker.h",
        ]
    
        if (is_clang) {
          cflags_cc = [
            "-Wno-c++98-compat-extra-semi",
            "-Wno-missing-declarations",
            "-Wno-switch",
          ]
        } else {
          cflags_cc = [ "/wd4740" ]
        }
      }
    }
    
    config("angle_test_util_config") {
      include_dirs = [ ".." ]
    }
    
    angle_source_set("angle_test_utils") {
      public_configs = [ ":angle_test_util_config" ]
      deps = [
        "$angle_root:angle_common",
      ]
      sources = [
        "Timer.cpp",
        "Timer.h",
        "test_utils.cpp",
        "test_utils.h",
      ]
    
      if (is_win) {
        sources += [
          "windows/test_utils_win.cpp",
          "windows/win32/test_utils_win32.cpp",
        ]
        if (!angle_is_winuwp) {
          deps += [ ":angle_stack_walker" ]
        }
      } else {
        sources += [
          "posix/crash_handler_posix.cpp",
          "posix/test_utils_posix.cpp",
        ]
      }
    }