Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04 AS base
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
build-essential clang lld make gdb cmake ninja-build \
crossbuild-essential-arm64 \
git curl wget unzip sudo \
pip \
clang-format clang-tidy \
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ In the configuration options, select the `'conan-debug' config`.
When the project configuration is finished, click Build to build the project.
<p style="text-align: center;"><img src="docs/images/cmakeBuild.png" alt="cmakeBuild" width="400"/></p>

#### Build for ARMv8

To compile dependencies this project to run to-dos-api in the **ARMv8** environment, use the command `conan install . -pr:h profiles/to-dos-conan-profile-arm64.conf --build=missing` instead of the one specified in the previous paragraph in the terminal.

When dependencies are built, use the command `conan build . -pr:h profiles/to-dos-conan-profile-arm64.conf` to build to-dos-api for running in an **ARMv8** environment.

### Project run

#### Before launching web server:
Expand Down
30 changes: 30 additions & 0 deletions profiles/to-dos-conan-profile-arm64.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[settings]
os=Linux
arch=armv8
build_type=Debug
compiler=clang
compiler.version=14
compiler.libcxx=libstdc++11
compiler.cppstd=gnu20

[options]
boost/*:without_locale=True
boost/*:without_stacktrace=True

[conf]
tools.build:compiler_executables={"c":"clang","cpp":"clang++"}
tools.system.package_manager:mode=install

[buildenv]
CFLAGS=--target=aarch64-linux-gnu
CXXFLAGS=--target=aarch64-linux-gnu
LDFLAGS=--target=aarch64-linux-gnu
CC=clang
CXX=clang++
LD=aarch64-linux-gnu-ld
AR=aarch64-linux-gnu-ar
RANLIB=aarch64-linux-gnu-ranlib
NM=aarch64-linux-gnu-nm
STRIP=aarch64-linux-gnu-strip
OBJCOPY=aarch64-linux-gnu-objcopy
OBJDUMP=aarch64-linux-gnu-objdump
8 changes: 7 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ target_include_directories(${TEST_PROJECT} PRIVATE
${CMAKE_SOURCE_DIR}/src
)

gtest_discover_tests(${TEST_PROJECT})
if(CMAKE_CROSSCOMPILING)
message(STATUS "Cross-compiling for ${CMAKE_SYSTEM_PROCESSOR}, skipping test discovery")
add_test(NAME ${TEST_PROJECT}
COMMAND ${TEST_PROJECT})
else()
gtest_discover_tests(${TEST_PROJECT})
endif()