1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00
Commit graph

9 commits

Author SHA1 Message Date
patrick96
87750c064e build: Bump C++ to C++17
Now requires gcc8 or clang7
2022-10-23 15:20:21 +02:00
patrick96
b0e33053f9 Use debug flags for sanitizer builds 2022-10-16 21:25:48 +02:00
Patrick Ziegler
56779a5902
Make the event loop return shared_ptrs (#2842)
* Return shared_ptr from eventloop

* Add -Wdeprecated-copy-dtor warning

Produces a warning if classes don't have explicit copy operations if
they have a user-defined constructor.
This helps us stick to the rule of 5 (kinda, no warnings for missing
move operators).

* Clean up eventloop

* Fix compiler warnings

* Fix fs_event_handle_t name
2022-10-15 23:21:40 +02:00
patrick96
a82e4324f6 fix(build): Do not replace CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS contains, among other things, the LDFLAGS which
many distros use to universally apply linker flags.
When completely replacing CMAKE_EXE_LINKER_FLAGS, these flags are lost.
2022-03-03 15:33:10 +01:00
Patrick Ziegler
444120e664
script: Fix concurrency issues (#2518)
Fixes #1978

* Move tail and non-tail handler to method

Defining them in the constructor is ugly.

* script: Iterate over defined actions instead of fixed list

* Separate running logic and lock m_output

* Include POLYBAR_FLAGS in linker flags

* Stop using m_prev in script_runner

* Join module threads in stop function

Joining in the destructor may lead to UB because the subclass is already
deconstructed but the threads may still require it to be around (e.g.
for calling any functions on the instance)

* Cleanup script module

* Update changelog

* Remove AfterReturn class

* Remove m_stopping from script module

* Fix polybar not reading the entire line from child process.

For every `readline` call we created a new fd_streambuf. This means once
`readline` returns, the streambuf is destructed and and pending data in
its temporary buffer discarded and we never actually read it.

* Remove unused includes
2021-10-03 01:27:11 +02:00
patrick96
c901826317 Use CMAKE_EXE_LINKER_FLAGS
The newere target_link_options is not supported by our minimum cmake
version (3.5)
2021-07-11 14:47:26 +02:00
patrick96
3652d5fe0d cmake: Stop using CMAKE_* variables for flags
It is not recommended anyway and the -Werror flag set in CI was getting
set when compiling gtest, breaking our build.
2021-07-11 14:47:26 +02:00
Patrick Ziegler
d5be8cad97
Add compiler warning for missing override specifier (#2341)
* build: Add -Wsuggest-override

We should always use the override specifier when overriding virtual
functions. This helps prevent errors when a subclass tries to create a
function with the same name as a virtual function in a super-class but
with a different purpose.

* clang-format

* Upload logs on failure

* Add override to unsupported.hpp

* cmake: Make -Wsuggest-override flag conditional
2021-01-04 10:38:43 +01:00
patrick96
923d9ae061 Add cmake files for configuring individual targets
This makes the code a bit less messy. We barely need if(BUILD_...)
guards inside the cmake files, just the root CMakeLists.txt.
2020-12-24 02:20:38 +01:00