BUILD.gn (2763B)
1 config("gout_config") { 2 include_dirs = [ 3 "//", 4 "//src", 5 ] + system_include_dirs 6 lib_dirs = [] + system_lib_dirs 7 libs = [ "git2" ] 8 configs = [ 9 "//build:compiler_std", 10 "//build:compiler_warnings", 11 "//build:strict_prototypes", 12 "//build:no_exceptions", 13 "//build:no_rtti", 14 "//build:posix_env", 15 ] 16 if (is_debug) { 17 configs += [ 18 "//build:debug", 19 "//build:no_optimize", 20 "//build:symbols", 21 "//build:asan", 22 ] 23 } else { 24 configs += [ 25 "//build:release", 26 "//build:optimize_size", 27 "//build:lto", 28 ] 29 } 30 } 31 32 group("default") { 33 testonly = true 34 deps = [ 35 ":gout", 36 ":gout_index", 37 ":gout_tests", 38 ] 39 } 40 41 executable("gout") { 42 sources = [ "src/gout_main.c" ] 43 configs += [ ":gout_config" ] 44 deps = [ 45 "//src:format", 46 "//src:gout_srcs", 47 "//src:utils", 48 ] 49 } 50 51 executable("gout_index") { 52 sources = [ "src/gout_index_main.c" ] 53 configs += [ ":gout_config" ] 54 deps = [ "//src:gout_index_srcs" ] 55 } 56 57 config("gout_test_config") { 58 defines = [ "_DARWIN_C_SOURCE" ] 59 } 60 61 executable("gout_tests") { 62 testonly = true 63 64 sources = [ 65 "src/format_tests.c", 66 "src/fs_inmemory.c", 67 "src/git/delta_tests.c", 68 "src/git/commit_tests.c", 69 "src/git/git_tests.c", 70 "src/gout_index_options_tests.c", 71 "src/gout_options_tests.c", 72 "src/git/repo_tests.c", 73 "src/gout_tests.c", 74 "src/gout_tests_main.c", 75 "src/utils_tests.c", 76 "src/writer/atom/atom_tests.c", 77 "src/writer/cache/cache_tests.c", 78 "src/writer/gemini/log_tests.c", 79 "src/writer/gemini/refs_tests.c", 80 "src/writer/gemini/files_tests.c", 81 "src/writer/gemini/fileblob_tests.c", 82 "src/writer/gemini/commit_tests.c", 83 "src/writer/gemini/repo_index_tests.c", 84 "src/writer/gemini/repo_writer_tests.c", 85 "src/writer/gemini/page_tests.c", 86 "src/writer/gopher/log_tests.c", 87 "src/writer/gopher/refs_tests.c", 88 "src/writer/gopher/files_tests.c", 89 "src/writer/gopher/fileblob_tests.c", 90 "src/writer/gopher/commit_tests.c", 91 "src/writer/gopher/repo_index_tests.c", 92 "src/writer/gopher/repo_writer_tests.c", 93 "src/writer/gopher/page_tests.c", 94 "src/writer/html/log_tests.c", 95 "src/writer/html/files_tests.c", 96 "src/writer/html/fileblob_tests.c", 97 "src/writer/html/refs_tests.c", 98 "src/writer/html/commit_tests.c", 99 "src/writer/html/repo_index_tests.c", 100 "src/writer/html/repo_writer_tests.c", 101 "src/writer/html/page_tests.c", 102 "src/writer/index_writer_tests.c", 103 ] 104 configs += [ 105 ":gout_config", 106 ":gout_test_config", 107 "//build:test_warnings", 108 ] 109 deps = [ 110 "//src:gout_index_srcs", 111 "//src:gout_srcs", 112 "//third_party/utest:utest_headers", 113 ] 114 }