-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from rbrich/cmake-COMPILE_ONLY
[build] cmake: Use COMPILE_ONLY
- Loading branch information
Showing
20 changed files
with
178 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[settings] | ||
os=Linux | ||
arch=x86_64 | ||
build_type=Release | ||
compiler=clang | ||
compiler.cppstd=20 | ||
compiler.libcxx=libstdc++11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
include(linux_clang) | ||
|
||
[settings] | ||
os=Linux | ||
arch=x86_64 | ||
build_type=Release | ||
compiler=clang | ||
compiler.version=16 | ||
compiler.cppstd=20 | ||
compiler.libcxx=libstdc++11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include(linux_clang) | ||
|
||
[settings] | ||
arch=armv8 | ||
compiler.version=16 |
3 changes: 2 additions & 1 deletion
3
docker/conan/profiles/linux_gcc10 → docker/conan/profiles/linux_gcc12_arm64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
include(linux_gcc) | ||
|
||
[settings] | ||
compiler.version=10 | ||
arch=armv8 | ||
compiler.version=12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Debian 12 ARM64 with GCC 12 | ||
# | ||
# CI builder (DockerHub public image), local build check: | ||
# docker build --platform linux/arm64/v8 --pull --build-arg UID=$(id -u) -t rbrich/xcikit-debian-arm64:12 . -f docker/debian_12-arm64.dockerfile | ||
# docker run --platform linux/arm64/v8 --rm -v $PWD:/src -w /src -it rbrich/xcikit-debian-arm64:12 | ||
# CMake arguments (for Clion IDE): | ||
# -DFORCE_COLORS=1 | ||
# -DCONAN_OPTIONS="-o;xcikit/*:system_sdl=True;-o;xcikit/*:system_vulkan=True;-o;xcikit/*:system_freetype=True;-o;xcikit/*:system_harfbuzz=True;-o;xcikit/*:system_benchmark=True;-o;xcikit/*:system_zlib=True;-o;xcikit/*:system_range_v3=True;-o;xcikit/*:with_hyperscan=True" | ||
|
||
FROM debian:bookworm-slim AS builder | ||
|
||
RUN echo 'deb https://deb.debian.org/debian bookworm-backports main' > /etc/apt/sources.list.d/backports.list | ||
|
||
RUN echo "gcc"; apt-get update && apt-get install --no-install-recommends -y \ | ||
g++ && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "dev tools"; apt-get update && apt-get install --no-install-recommends -y \ | ||
gdb ca-certificates curl make ninja-build ccache \ | ||
python3-minimal python3-pip libpython3-stdlib && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "xcikit deps"; apt-get update && apt-get install --no-install-recommends -y \ | ||
librange-v3-dev libsdl2-dev glslang-tools libvulkan-dev libfreetype6-dev libharfbuzz-dev \ | ||
libvectorscan-dev libbenchmark-dev && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install CMake 3.30.3 from backports | ||
RUN echo "cmake"; apt-get update && apt-get install --no-install-recommends -y -t bookworm-backports cmake \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
ENV CMAKE_GENERATOR=Ninja CONAN_CMAKE_GENERATOR=Ninja | ||
|
||
RUN echo "conan"; pip3 install --no-cache-dir --break-system-packages conan | ||
|
||
ARG UID=10002 | ||
RUN useradd -m -p np -u ${UID} -s /bin/bash builder | ||
USER builder | ||
|
||
COPY --chown=builder docker/conan /home/builder/conan | ||
RUN conan config install /home/builder/conan | ||
ENV CONAN_DEFAULT_PROFILE=linux_gcc12_arm64 | ||
|
||
# Preinstall Conan deps | ||
ENV XCIKIT=/home/builder/xcikit | ||
COPY --chown=builder build.sh detect_system_deps.py conanfile.py conandata.yml VERSION $XCIKIT/ | ||
RUN $XCIKIT/build.sh deps | ||
RUN $XCIKIT/build.sh deps --debug | ||
|
||
# Configure ccache | ||
RUN ccache -o max_size=200M | ||
|
||
CMD ./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# CI builder with Emscripten (DockerHub public image), local build check: | ||
# docker build --platform linux/arm64/v8 --pull --build-arg UID=$(id -u) -t rbrich/xcikit-emscripten-arm64 . -f docker/emscripten-arm64.dockerfile | ||
# docker run --platform linux/arm64/v8 --rm -v $PWD:/src -w /src -it rbrich/xcikit-emscripten-arm64 | ||
# CMake arguments (for Clion IDE): | ||
# -DFORCE_COLORS=1 -DXCI_WIDGETS=0 -DXCI_TEXT=0 -DXCI_GRAPHICS=0 | ||
# -DCONAN_OPTIONS="-c;tools.cmake.cmaketoolchain:user_toolchain=['/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake']" | ||
|
||
FROM emscripten/emsdk:3.1.64-arm64 AS builder | ||
|
||
RUN echo "dev tools"; apt-get update && apt-get install --no-install-recommends -y \ | ||
gdb ninja-build python3-setuptools gpg && rm -rf /var/lib/apt/lists/* | ||
|
||
# Ubuntu 22.04 has CMake 3.22.1, which is too old. Get newer version (https://apt.kitware.com/). | ||
RUN echo "cmake"; apt-get purge -y cmake && \ | ||
curl https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - > /usr/share/keyrings/kitware-archive-keyring.gpg && \ | ||
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' > /etc/apt/sources.list.d/kitware.list && \ | ||
apt-get update && apt-get install --no-install-recommends -y cmake && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "conan"; pip3 --no-cache-dir install conan | ||
|
||
ARG UID=10001 | ||
RUN useradd -m -p np -u ${UID} -s /bin/bash builder | ||
USER builder | ||
|
||
COPY --chown=builder docker/conan /home/builder/conan | ||
RUN conan config install /home/builder/conan | ||
ENV CONAN_DEFAULT_PROFILE=emscripten | ||
|
||
# Preinstall Conan deps | ||
ENV XCIKIT=/home/builder/xcikit | ||
COPY --chown=builder build.sh detect_system_deps.py conanfile.py conandata.yml VERSION $XCIKIT/ | ||
RUN $XCIKIT/build.sh deps --emscripten script | ||
RUN $XCIKIT/build.sh deps --emscripten script --debug | ||
|
||
# Preinstall Emscripten ports (it has no explicit install command, workaround...) | ||
RUN echo "int main(){}" > ~/dummy.c | ||
RUN cd ; emcc -s USE_ZLIB=1 dummy.c -o dummy.out && rm dummy.* | ||
|
||
CMD ./build.sh --emscripten core vfs data script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.