Commit Graph

13 Commits

Author SHA1 Message Date
Keith Rothman 1830202f7d Fixes to enable compilation under clang-7.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
2019-10-14 21:33:23 -07:00
Tomasz Michalak 7b8561ad6f third_party: Add sanitizers-cmake module
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
2019-10-08 14:02:13 +02:00
Tim 'mithro' Ansell 8e6933fe26 cmake: Only add `-Wall and -Werror` for our code.
Fixes #127.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2018-09-27 12:44:58 +02:00
Rick Altherr 0910ac07a2 Use CMake build types to set optimization level
CMake has reasonable defaults for Debug and Release builds but the build
type isn't specified by default. That led to me adding explicit flags.
Remove those flags and default to using Release builds.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-12 11:48:11 -08:00
Rick Altherr f413656912 Disable tests by default
No need to spend time building all the tests unless you specifically
want them.  To build them, run 'cmake -DPRJXRAY_BUILD_TESTING=ON ..' in
the build directory.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
2018-01-12 11:48:11 -08:00
Rick Altherr c1790df562 Import github.com/jbeder/yaml-cpp
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 6a4402415e Use proper CMake mechanisms to set compiler settings
By setting CMAKE_CXX_STANDARD, CMake will figure out the right flag to
pass to the compiler being used as well as error if the compiler doesn't
support that standard.  The standard can also be changed on a per-target
basis.

Using add_compiler_options() is just a bit cleaner syntactically and
will apply the flags to C and C++.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 62dd2f94a5 When building with tests, turn off optimiations
Debugging failing tests is awful when optimizations are turned on.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 30a1e466d3 lib: wrapper to manage memory-mapped files
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 3491625dc2 Avoid building third_party targets unless explicitly asked for
Any explicit dependencies on a third_party library will cause that
target to get built.  This commit only removes the targets from the
implicit "all" target.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 0f68a516bb Re-enable optimizations
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr 5e42fd5abc bitread: Replace flag parsing with gflags
Some flag-related string parsing is also replaced with methods from
abseil.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00
Rick Altherr fedf33b5ce tools: build with CMake
Building with CMake makes it a lot easier to bring in other libraries
such as gflags and abseil.

Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
2017-12-20 22:46:39 +01:00