From 165894e0635070768c2513f8ac6ed1fe3f15b3ea Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Sun, 3 Sep 2023 11:00:17 +0200 Subject: [PATCH 1/2] add config files for direnv and codespell --- .codespellrc | 5 +++++ .envrc | 18 ++++++++++++++++++ .gitignore | 1 + requirements.txt | 14 ++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 .codespellrc create mode 100644 .envrc create mode 100644 requirements.txt diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..f199ae70 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,5 @@ +[codespell] +builtin = clear,rare,en-GB_to_en-US,names,informal,code +check-hidden = +skip = ./.git,./out/*,./.direnv/*,./cmake-build-*,./build/*,./prefix/*,./conan/*,./stagedir/*,*.log,.*.swp,*~,*.bak +quiet-level = 2 diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..ea1482c2 --- /dev/null +++ b/.envrc @@ -0,0 +1,18 @@ +# Define environment in this dir only with direnv. +# On first usage enter: direnv allow +# man direnv for more infos +# +# https://direnv.net +# +# see too https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html +export CMAKE_PREFIX_PATH=${PWD}/stagedir +export CMAKE_EXPORT_COMPILE_COMMANDS=YES +export CTEST_OUTPUT_ON_FAILURE=YES + +export CPM_USE_LOCAL_PACKAGES=YES +export CPM_SOURCE_CACHE=${PWD}/.cache/CPM + +export LD_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib +export BUILD_DIR=${PWD}/build + +layout python3 diff --git a/.gitignore b/.gitignore index a3f1df04..19ce3137 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ CMakeUserPresets.json # IDE files .vs/ .idea/ +.direnv/ .vscode/ !.vscode/settings.json !.vscode/tasks.json diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..b4564962 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,14 @@ +# ============================================================================= +# PYTHON PACKAGES (PIP) +# ============================================================================= +# USE (python3): pip3 install -U -r +# ============================================================================= + +codespell>=2.2.5 +builddriver>=0.9.0 +bumpversion>=0.6.0 +cmake-format>=0.6.13 +cmake>=3.27 +gcovr>=5.2 +ninja>=1.11 +yamllint>=1.26 From ddb09bf2886310452755e6613226791271295373 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Sun, 3 Sep 2023 11:20:40 +0200 Subject: [PATCH 2/2] Prevent use of installed packages --- .envrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.envrc b/.envrc index ea1482c2..5a6c9fb7 100644 --- a/.envrc +++ b/.envrc @@ -5,14 +5,14 @@ # https://direnv.net # # see too https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html -export CMAKE_PREFIX_PATH=${PWD}/stagedir +export CMAKE_PREFIX_PATH=${PWD}/out/install export CMAKE_EXPORT_COMPILE_COMMANDS=YES export CTEST_OUTPUT_ON_FAILURE=YES -export CPM_USE_LOCAL_PACKAGES=YES +export CPM_USE_LOCAL_PACKAGES=NO export CPM_SOURCE_CACHE=${PWD}/.cache/CPM export LD_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib -export BUILD_DIR=${PWD}/build +export BUILD_DIR=${PWD}/out/build layout python3