From bb70b7c74343f001b065fae89b416dc33ac128cd Mon Sep 17 00:00:00 2001
From: patrick96
Date: Thu, 24 Dec 2020 02:02:53 +0100
Subject: [PATCH] Cleanup
---
CHANGELOG.md | 7 +++++--
CMakeLists.txt | 2 +-
build.sh | 10 +++++-----
cmake/modules/FindXcb.cmake | 2 +-
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c3393127..df02656d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,12 +31,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `BUILD_DOC=ON` - Builds the documentation
- `BUILD_DOC_HTML=BUILD_DOC` - Builds the html documentation (depends on `BUILD_DOC`)
- `BUILD_DOC_MAN=BUILD_DOC` - Builds the manpages (depends on `BUILD_DOC`)
- - `BUILD_CONFIG=ON` - Generate sample config
- - `BUILD_SHELL=ON` - Generate shell completion files
+ - `BUILD_CONFIG=ON` - Generates sample config
+ - `BUILD_SHELL=ON` - Generates shell completion files
- `DISABLE_ALL=OFF` - Disables all above targets by default. Individual
targets can still be enabled explicitly.
- The documentation can no longer be built by directly configuring the `doc`
directory.
+- The sample config file is now placed in the `generated-sources` folder inside
+ whatever folder you invoked `cmake` from instead of in the root folder of the
+ repository.
### Added
- Warn states for the cpu, memory, fs, and battery modules.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fdaf177c..debe2ddf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,7 @@ if (BUILD_SHELL)
add_subdirectory(contrib/zsh)
endif()
-# Setup everything that uses a C++ compile (polybar, polybar-msg, tests)
+# Setup everything that uses a C++ compiler (polybar, polybar-msg, tests)
if(HAS_CXX_COMPILATION)
include(cxx)
if(BUILD_LIBPOLY)
diff --git a/build.sh b/build.sh
index 3b3a14f6..fb668e1c 100755
--- a/build.sh
+++ b/build.sh
@@ -151,8 +151,8 @@ set_build_opts() {
fi
if [[ -z "$JOB_COUNT" ]]; then
- read -r -p "$(msg "Parallelize the build using make -j$(nproc) --------------------------- [y/N]: ")" -n 1 p && echo
- [[ "${p^^}" != "Y" ]] && JOB_COUNT=1 || JOB_COUNT=$(nproc)
+ read -r -p "$(msg "Parallelize the build using make -j$(nproc) --------------------------- [y/N]: ")" -n 1 p && echo
+ [[ "${p^^}" != "Y" ]] && JOB_COUNT=1 || JOB_COUNT=$(nproc)
fi
@@ -205,9 +205,9 @@ main() {
msg "Building project"
if [ -z ${JOB_COUNT} ]; then
- make || msg_err "Failed to build project"
+ make || msg_err "Failed to build project"
else
- make -j$JOB_COUNT || msg_err "Failed to build project"
+ make -j$JOB_COUNT || msg_err "Failed to build project"
fi
install
msg "Build complete!"
@@ -248,7 +248,7 @@ while [[ "$1" == -* ]]; do
-g|--gcc)
USE_GCC=ON; shift ;;
-j|--jobs)
- JOB_COUNT=$(nproc); shift ;;
+ JOB_COUNT=$(nproc); shift ;;
-f)
REMOVE_BUILD_DIR=ON; shift ;;
-I|--no-install)
diff --git a/cmake/modules/FindXcb.cmake b/cmake/modules/FindXcb.cmake
index efc7bb90..064359ef 100644
--- a/cmake/modules/FindXcb.cmake
+++ b/cmake/modules/FindXcb.cmake
@@ -54,6 +54,6 @@ foreach(_comp ${Xcb_FIND_COMPONENTS})
if(Xcb_${_comp}_FOUND AND NOT TARGET Xcb::${_comp})
create_imported_target("Xcb::${_comp}" "${Xcb_${_comp}_INCLUDE_DIRS}" "${Xcb_${_comp}_LIBRARIES}")
elseif(NOT Xcb_${_comp}_FOUND AND Xcb_FIND_REQUIRED)
- message(FATAL_ERROR "Xcb: Required component \"${_comp}\" is not found")
+ message(FATAL_ERROR "Xcb: Required component \"${_comp}\" was not found")
endif()
endforeach()