Skip to content

Commit

Permalink
Sync update to public
Browse files Browse the repository at this point in the history
  • Loading branch information
Vertexwahn committed Jan 1, 2024
1 parent dca5947 commit 97eab1b
Show file tree
Hide file tree
Showing 2,145 changed files with 193,384 additions and 95,765 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ root = true

[*]
end_of_line = lf
insert_final_newline = true
2 changes: 1 addition & 1 deletion .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: codespell-project/actions-codespell@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SPDX-License-Identifier: Apache-2.0
## Description

FlatlandRT is a 2D ray tracer visualization tool.
The following pictures were created using Flatland:
The following pictures were created using FlatlandRT:

From left to right: Refraction, ambient occlusion and reflection:

Expand Down Expand Up @@ -122,7 +122,7 @@ additional_languages:
python

build_flags:
--config=gcc9
--config=gcc11
```

#### Code coverage
Expand All @@ -142,7 +142,7 @@ xdg-open coverage_report/index.html

#### Address Sanitizer

There is a build config called `asan` that can be used for detection memory errors.
There is a build config called `asan` that can be used for detecting memory errors.

```shell
bazel run --config=asan --compilation_mode=opt //flatland/cli:flatland.cli -- $(pwd)/flatland/scenes/sphere.flatland.xml
Expand Down
29 changes: 19 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@


jobs:
- job: MacOSClang13BigSur
displayName: "Apple Clang13 on macOS 11 (Big Sur)"
pool:
vmImage: 'macOS-11'
steps:
- template: devertexwahn/ci/macOS-11-apple-clang13.yaml

- job: MacOSAppleClang14Monterey
displayName: "Apple Clang14 on macOS 12 (Monterey)"
pool:
Expand All @@ -35,14 +28,30 @@ jobs:
# steps:
# - template: devertexwahn/ci/ubuntu-20.04-clang14.yaml

- job: Ubuntu20GCC9
displayName: "GCC9 fast opt on Ubuntu 20.04"
- job: Ubuntu20GCC9Fast
displayName: "GCC9 fast on Ubuntu 20.04"
pool:
#name: Default
vmImage: 'ubuntu-20.04'
steps:
- template: devertexwahn/ci/ubuntu-20.04-gcc9-fast-opt.yaml
- template: devertexwahn/ci/ubuntu-20.04-gcc9-fast.yaml

- job: Ubuntu20GCC9Opt
displayName: "GCC9 opt on Ubuntu 20.04"
pool:
#name: Default
vmImage: 'ubuntu-20.04'
steps:
- template: devertexwahn/ci/ubuntu-20.04-gcc9-opt.yaml

- job: Ubuntu20GCC9Debug
displayName: "GCC9 debug on Ubuntu 20.04"
pool:
#name: Default
vmImage: 'ubuntu-20.04'
steps:
- template: devertexwahn/ci/ubuntu-20.04-gcc9-dbg.yaml


- job: Ubuntu22GCC11
displayName: "GCC11 fast opt on Ubuntu 22.04"
Expand Down
88 changes: 57 additions & 31 deletions devertexwahn/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,52 @@

#build --symlink_prefix=/ # Suppress symlink creation (to avoid untracked files issues with git)

#-------------------------------------------------------------------------------------
# Bzlmod
#-------------------------------------------------------------------------------------

common --enable_bzlmod
#common --registry=file:///%workspace%/registry
common --registry=https://raw.githubusercontent.com/Vertexwahn/bazel-registry/main/ # Check if this makes Windows happy
common --registry=https://raw.githubusercontent.com/bazelboost/registry/main
common --registry=https://bcr.bazel.build


#-------------------------------------------------------------------------------------
# C++ compiler settings
#-------------------------------------------------------------------------------------

# macOS (e.g. Clang 14.0.0)
build:macos --cxxopt=-std=c++2b # see https://clang.llvm.org/cxx_status.html
build:macos --cxxopt=-Wall
build:macos --define compiler=macos
#build:macos --cxxopt=-Werror # Commented out because of Embree
##build:macos --cxxopt=-Wextra
#build:macos --spawn_strategy=local

# Xcode 15 has some compiler issues - therefore there is this special config
build:macos_xcode15 --config=macos
build:macos_xcode15 --linkopt=-ld_classic # Workaround for Xcode 15 linker bug, see for instance https://github.com/godotengine/godot/pull/81968/files

# macOS Intel (config used in CI jobs)
build:clang14_macos --cxxopt=-std=c++20
#build:clang14 --cxxopt=-mavx
#build:clang14 --cxxopt=-mavx2
#build:clang14 --cxxopt=-msse4.2
#build:clang14 --cxxopt=-Werror
build:clang14_macos --incompatible_enable_cc_toolchain_resolution
build:clang14_macos --cxxopt=-mwaitpkg
build:clang14_macos --define compiler=clang14_macos

# macOS M1 (config is used on local MacBook M1 Pro)
build:clang14_macos_m1 --cxxopt=-std=c++20
build:clang14_macos_m1 --incompatible_enable_cc_toolchain_resolution
build:clang14_macos_m1 --linkopt=-ld_classic # Workaround for Xcode 15 linker bug, see for instance https://github.com/godotengine/godot/pull/81968/files
#build:clang14_macos_m1 --cxxopt=-mwaitpkg # lead to compilation issues on local M1 macBook
build:clang14_macos_m1 --define compiler=clang14_macos_m1

# Todo: Add apple_debug config
# https://github.com/RobotLocomotion/drake/search?q=apple_debug

# GCC 9.3
build:gcc9 --cxxopt=-std=c++2a
Expand All @@ -34,16 +80,9 @@ build:gcc11 --cxxopt=-fpermissive # Needed for fmt

build:linux --config=gcc11

# macOS (e.g. Clang 14.0.0)
build:macos --cxxopt=-std=c++2b # see https://clang.llvm.org/cxx_status.html
build:macos --cxxopt=-Wall
build:macos --define compiler=macos
#build:macos --cxxopt=-Werror # Commented out because of Embree
##build:macos --cxxopt=-Wextra
#build:macos --spawn_strategy=local

# Todo: Add apple_debug config
# https://github.com/RobotLocomotion/drake/search?q=apple_debug
build:gcc11_cpp14 --cxxopt=-std=c++14
build:gcc11_cpp14 --cxxopt=-Wall
build:gc11_cpp14 --define compiler=gcc11_cpp14

# Clang 14.0.0 (config is used on Ubuntu)
build:clang14 --cxxopt=-std=c++20
Expand All @@ -52,26 +91,13 @@ build:clang14 --cxxopt=-std=c++20
#build:clang14 --cxxopt=-msse4.2
#build:clang14 --cxxopt=-Werror
build:clang14 --incompatible_enable_cc_toolchain_resolution
# Tell Bazel to pass the right flags for llvm-ar, not libtool. Only needed if you are building on darwin.
# See https://github.com/bazelbuild/bazel/blob/5c75d0acec21459bbb13520817e3806e1507e907/tools/cpp/unix_cc_toolchain_config.bzl#L1000-L1024
build:clang14 --features=-libtool
build:clang14 --cxxopt=-mwaitpkg
build:clang14 --define compiler=clang14

# macOS Intel (config used in CI jobs)
build:clang14_macos --cxxopt=-std=c++20
#build:clang14 --cxxopt=-mavx
#build:clang14 --cxxopt=-mavx2
#build:clang14 --cxxopt=-msse4.2
#build:clang14 --cxxopt=-Werror
build:clang14_macos --incompatible_enable_cc_toolchain_resolution
build:clang14_macos --cxxopt=-mwaitpkg
build:clang14_macos --define compiler=clang14_macos

# macOS M1 (config is used on local MacBook M1 Pro)
build:clang14_macos_m1 --cxxopt=-std=c++20
build:clang14_macos_m1 --incompatible_enable_cc_toolchain_resolution
#build:clang14_macos_m1 --cxxopt=-mwaitpkg # lead to compilation issues on local M1 macBook
build:clang14_macos_m1 --define compiler=clang14_macos_m1

# Mingw
# MinGW
build:mingw --cxxopt=-std=c++2a
#build:mingw --cxxopt=-Wall
#build:mingw --cxxopt=-Werror
Expand All @@ -82,19 +108,19 @@ build:vs2019 --cxxopt=/std:c++20
build:vs2019 --cxxopt=/Zc:__cplusplus
build:vs2019 --enable_runfiles # https://github.com/bazelbuild/bazel/issues/8843
build:vs2019 --copt=-DWIN32_LEAN_AND_MEAN
build:vs2019 --copt=-DNOGDI
#build:vs2019 --copt=-DNOGDI
build:vs2019 --host_copt=-DWIN32_LEAN_AND_MEAN
build:vs2019 --host_copt=-DNOGDI
#build:vs2019 --host_copt=-DNOGDI
build:vs2019 --define compiler=vs2019

# Visual Studio 2022
build:vs2022 --cxxopt=/std:c++20
build:vs2022 --cxxopt=/Zc:__cplusplus
build:vs2022 --enable_runfiles # https://github.com/bazelbuild/bazel/issues/8843
build:vs2022 --copt=-DWIN32_LEAN_AND_MEAN
build:vs2022 --copt=-DNOGDI
#build:vs2022 --copt=-DNOGDI
build:vs2022 --host_copt=-DWIN32_LEAN_AND_MEAN
build:vs2022 --host_copt=-DNOGDI
#build:vs2022 --host_copt=-DNOGDI
build:vs2022 --define compiler=vs2022

build:windows --config=vs2022
Expand Down
2 changes: 1 addition & 1 deletion devertexwahn/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.1
6.4.0
176 changes: 176 additions & 0 deletions devertexwahn/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
"""FlatlandRT build and test dependencies."""

module(
name = "de_vertexwahn",
version = "0.0.1",
)

# Wait until abseil-cpp has a MODULE.bazel file - maybe we need to wait for Bazel 8 here...
#bazel_dep(
# name = "abseil-cpp",
# version = "20230802.0",
#)

bazel_dep(
name = "apple_support",
version = "1.11.1",
)

bazel_dep(
name = "bazel_skylib",
version = "1.5.0",
)

bazel_dep(
name = "boost.algorithm",
version = "1.83.0.bzl.1",
)

bazel_dep(
name = "boost.core",
version = "1.83.0.bzl.1",
)

bazel_dep(
name = "boost.predef",
version = "1.83.0.bzl.1",
)

bazel_dep(
name = "eigen",
version = "3.4.0",
)

bazel_dep(
name = "embree",
version = "4.3.0",
)

bazel_dep(
name = "gazelle",
version = "0.34.0",
)

bazel_dep(
name = "imath",
version = "3.1.9",
repo_name = "Imath",
)

bazel_dep(
name = "libdeflate",
version = "1.19",
)

# Does not compile on windows
#bazel_dep(
# name = "libjpeg_turbo",
# version = "2.1.91",
#)

# This version uses nasm to build
bazel_dep(
name = "libjpeg_turbo",
version = "2.1.4",
)

bazel_dep(
name = "libpng",
version = "1.6.40",
)

bazel_dep(
name = "libwebp",
version = "1.3.2",
)

bazel_dep(
name = "nasm",
version = "2.14.02",
)

bazel_dep(
name = "nlohmann_json",
version = "3.11.3",
)

bazel_dep(
name = "openexr",
version = "3.2.1",
)

bazel_dep(
name = "platforms",
version = "0.0.8",
)

bazel_dep(
name = "rules_cc",
version = "0.0.9",
)

bazel_dep(
name = "rules_go",
version = "0.43.0",
)

bazel_dep(
name = "rules_license",
version = "0.0.7",
)

bazel_dep(
name = "rules_oci",
version = "1.4.3",
)

bazel_dep(
name = "rules_pkg",
version = "0.9.1",
)

bazel_dep(
name = "zlib",
version = "1.3",
)

bazel_dep(
name = "container_structure_test",
version = "1.16.0",
dev_dependency = True,
)

bazel_dep(
name = "googletest",
version = "1.14.0.bcr.1",
dev_dependency = True,
)

#bazel_dep(name = "catch2", version = "3.4.0", dev_dependency = True)
#bazel_dep(name = "fmt", version = "10.1.1")
#bazel_dep(name = "toolchains_llvm", version = "0.10.1")

# This projects intends to stay as close as possible to upstream dependencies.
# Therefore, upstream dependencies are copied 1:1 to the `third_party` folder and
# overridden here:

local_path_override(
module_name = "bazel_skylib",
path = "../third_party/bazel-skylib",
)

local_path_override(
module_name = "autodiff",
path = "../third_party/autodiff",
)

local_path_override(
module_name = "openexr",
path = "../third_party/openexr",
)

local_path_override(
module_name = "rules_pkg",
path = "../third_party/rules_pkg-0.9.1",
)

Loading

0 comments on commit 97eab1b

Please sign in to comment.