Commit Graph

9 Commits

Author SHA1 Message Date
patrick96 9aefbd5d34 build: Add UndefinedBehaviorSanitizer 2019-01-20 15:12:22 +01:00
sam-lunt d3e37918e5 CMake refactor (#1510)
* Clean up CMake logic

- removed logic to find CppUnit (no longer used)
- removed "dirs" variable used to pass include directories
- removed add_library function (no longer used)
- removed make_executable function
    * only used in 2 places (polybar and polybar-msg)
    * it was more general than needed, logic is simpler without it
- split polybar into static library and executable
    * this allows linking unit tests to the library

* rename library

* add coverage build

- Added a CMake build type "Coverage" that builds C and C++
  code with the "--coverage" flag (recognized by both GCC and Clang)
- removed "-Wno-missing-field-initializers" from test flags,
  since it didn't seem to be needed any more
- removed logic from tests/CMakeLists to disable "-Werror" and "-pedantic-errors"
  since there didn't seem to be any warnings during the build

* fix whitespace

* update travis

* remove O2 from defalt flags

* allow tests to be built by default make target

* disable Werror for debug builds
2018-11-21 18:46:33 +01:00
patrick96 b5129ae0c4 refactor(ccache): Enable by default
Following [1] to get to this setup.

We setup all the ccache configuration before calling project() because
project will perform compiler checks. This is also why we can't use
message_colored here and print the colors manually

Before ENABLE_CCACHE was not yet defined when we reached the check in
01-core because the option was defined in 02-opts

[1] https://crascit.com/2016/04/09/using-ccache-with-cmake/
2018-06-01 10:49:00 -07:00
Le Baron d'Merde 55331d17f7 fix(FreeBSD): Use libraries from LOCALBASE (#1111)
Ensures proper linking when not building a port
2018-03-22 00:03:47 +01:00
Kyle Cook 0f34178104 Add FreeBSD Support (#931) 2018-03-21 23:35:10 +01:00
Chase Geigle 299f1617d3 fix(cmake): Suppress -Wnoexcept-type warning on GCC
There is no way to avoid this error in the code itself, so we must
suppress this warning if we wish to keep -Werror.
2017-08-30 15:27:05 +02:00
Dmitry Marakasov b23ff17dde Disable -Werror for parentheses-equality warning
This warning fires here:

/home/travis/build/jaagr/polybar/src/utils/command.cpp:135:46: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
    } else if ((((*(int *) &(m_forkstatus))) == 0xffff)) {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

and as this system macro cannot be changed, let's not turn this into an error
2017-07-05 17:17:58 +02:00
Michael Carlberg 41f7f82bd0 fix(cmake): Debug check 2017-01-27 13:30:23 +01:00
Michael Carlberg 43a17c3b36 refactor(cmake): Cleanup 2017-01-26 17:39:50 +01:00
Renamed from cmake/build/core.cmake (Browse further)