diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-07-27 17:34:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 17:34:59 +0200 |
commit | debb71065c8947ee6d79c981eb43d631beb11294 (patch) | |
tree | 09cb0fa0a1dbe83d4833bcd62dc8832161e4329b /deps | |
parent | 65443efcc2f4c7d687b2bd9c631f6bb426688bbf (diff) | |
parent | be1d0545c2f7a85a63d05b4bdc1020ee284e72cb (diff) |
Merge pull request #2 from OpenVicProject/let-the-games-begin
Initial structural commit
Diffstat (limited to 'deps')
-rw-r--r-- | deps/SCsub | 45 | ||||
m--------- | deps/lexy | 0 |
2 files changed, 45 insertions, 0 deletions
diff --git a/deps/SCsub b/deps/SCsub new file mode 100644 index 0000000..16ee889 --- /dev/null +++ b/deps/SCsub @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +Import("env") + +def build_lexy(env): + env.Append(CPPDEFINES=["LEXY_HAS_UNICODE_DATABASE=1"]) + lexy_env = env.Clone() + + # Require C++20 + if lexy_env.get("is_msvc", False): + lexy_env.Append(CXXFLAGS=["/std:c++20"]) + + lexy_env.Append(CXXFLAGS=["/WX", "/W3", "/D", "_CRT_SECURE_NO_WARNINGS"]) + if not lexy_env.get("use_clang_cl"): + lexy_env.Append(CXXFLAGS=["/wd5105"]) + else: + lexy_env.Append(CXXFLAGS=["-std=c++20"]) + + lexy_env.Append(CXXFLAGS=["-pedantic-errors", "-Werror", "-Wall", "-Wextra", "-Wconversion", "-Wsign-conversion"]) + if lexy_env.get("use_llvm"): + lexy_env.Append(CXXFLAGS=["-Wno-shift-op-parentheses", "-Wno-parentheses-equality"]) + else: + lexy_env.Append(CXXFLAGS=[ + "-Wno-parentheses", "-Wno-unused-local-typedefs", "-Wno-array-bounds", "-Wno-maybe-uninitialized", "-Wno-restrict" + ]) + + paths = ["lexy/include", "lexy/src"] + lexy_env.Append(CPPPATH=[[lexy_env.Dir(p) for p in paths]]) + sources = env.GlobRecursive("*.cpp", paths) + env.lexy_sources = sources + library_name = "liblexy_file" + env["LIBSUFFIX"] + library = lexy_env.StaticLibrary(target="lexy/src/" + library_name, source=sources) + Default(library) + + env.Append(CPPPATH=[env.Dir("lexy/include")]) + if env.get("is_msvc", False): + env.Append(CXXFLAGS=["/external:I", env.Dir("lexy/include"), "/external:W0"]) + else: + env.Append(CXXFLAGS=["-isystem", env.Dir("lexy/include")]) + env.Append(CXXFLAGS=[""]) + env.Append(LIBPATH=[env.Dir("lexy/src")]) + env.Append(LIBS=[library_name]) + + +build_lexy(env)
\ No newline at end of file diff --git a/deps/lexy b/deps/lexy new file mode 160000 +Subproject 5e2601b3de57e979b5d23b8936cf040eb228fb9 |