Skip to content

Commit

Permalink
iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Dec 14, 2023
1 parent 6df841c commit 1561bef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions doc/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [with bazel](#build-cli-bazel)
- [with cmake](#build-cli-cmake)
- [with gcc](#build-cli-gcc)
- [with clang](#build-cli-clang)
- [Building chromobius as a python package](#build-python)
- [with bazel](#build-python-bazel)
- [with cmake](#build-python-cmake)
Expand Down Expand Up @@ -82,6 +83,32 @@ g++ \
-l pymatching
```

<a class="anchor" id="build-cli-clang"></a>
### with clang:

```bash
# This must be run from the repository root.
# This requires that you have libstim and libpymatching installed.

readarray -d '' CC_FILES_TO_BUILD < \
<( \
find src \
| grep "\\.cc$" \
| grep -v "\\.\(test\|perf\|pybind\)\\.cc$" \
)

clang \
-I src \
-std=c++20 \
-O3 \
-march=native \
${CC_FILES_TO_BUILD[@]} \
-l "stdc++" \
-l m \
-l stim \
-l pymatching
```

Then, to run the built tool:

```bash
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

CC_FILES = glob.glob("src/**/*.cc", recursive=True)
H_FILES = glob.glob("src/**/*.h", recursive=True) + glob.glob("src/**/*.inl", recursive=True)
CMAKE_FILES = ['CMakeLists.txt', *glob.glob("file_lists/**", recursive=True)]
CMAKE_FILES = ['CMakeLists.txt', *glob.glob("file_lists/*", recursive=True)]
RELEVANT_SOURCE_FILES = sorted(CMAKE_FILES + CC_FILES + CMAKE_FILES)


Expand Down

0 comments on commit 1561bef

Please sign in to comment.