Commit Graph

163 Commits

Author SHA1 Message Date
Daniel Kirchner
7a32daadf0 Make the boost cmake workaround compatible with older versions of cmake. 2019-06-12 18:04:08 +02:00
Daniel Kirchner
dcb6b2cb33 Add back comment and output messages. 2019-06-06 21:03:33 +02:00
Daniel Kirchner
cb9c35f883 Define imported targets manually, if not provided by find_package(Boost). 2019-06-06 21:03:33 +02:00
Daniel Kirchner
226f8bb64d Use imported cmake targets for boost. 2019-06-06 18:49:34 +02:00
Daniel Kirchner
5677bedf34 Require gcc >= 5.0. 2019-06-05 11:57:06 +02:00
Daniel Kirchner
9f5340fa53 Try to find Z3 using CONFIG_MODE before manual search. 2019-06-04 15:58:03 +02:00
Bhargava Shastry
9f77d90c0b cmake: Minor refactoring of SANITIZE flag 2019-05-22 11:33:27 +02:00
Mathias Baumann
cbf81b123a Fix new found spelling mistakes and add exceptions 2019-05-21 10:59:34 +02:00
Alex Beregszaszi
e121c8f3c7 Store compiler version in CBOR metadata 2019-05-08 22:21:50 +02:00
rocky
b3ef7e2301 Remove clang+osx ld warning
Boost libraries on osx use visibility=hidden to reduce unnecessary DWARF entries.

Unless we match visibility, ld will give a warning message like:

   ld: warning: direct access in function 'boost::filesystem... from file ...
   means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
2019-04-30 07:38:28 -04:00
rocky
b06b996461 soltest.sh, EthOptions.cmake, and CODING_STYLE.md tweaks
solidity.sh:
  * introduce SOLIDITY_BUILD_DIR env var for soltest.sh,
  * add --help output

EthOptions.cmake: more complete configuration information

CODING_STYLE.md: note existence of .editorconfig
contributing.rst: note that tests are Boost C++ unit tests
2019-04-18 07:53:28 -04:00
rocky
6d5505720d Maximum clang/gcc debugging when debugging desired.
-g3 adds macro information. See https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
Both clang and gdb support this, and I think this preferred over the older -ggdb.
2019-04-16 11:47:06 -04:00
Bhargava Shastry
0d2566fa71 Add CI to build ossfuzz fuzzer binaries 2019-04-03 10:27:05 +02:00
Alex Beregszaszi
62f707610e Run clang tests with ASAN 2019-02-07 18:59:40 +01:00
Leonardo Alt
4058978b3b Require Z3 >= 4.6.0 2019-02-07 14:24:40 +01:00
Alex Beregszaszi
57463ca3a5 Add C++17 toolchain 2019-02-05 14:21:23 +00:00
Shelly Grossman
3b5f446018 Ensuring UTF-8 encoding for MSVC builds 2019-01-26 15:30:17 +02:00
Bhargava Shastry
24b1de7df0 This PR refactors and shares oss-fuzz specific test harness code with the afl fuzzer harness. ChangeLog updated. 2019-01-23 11:06:25 +01:00
Daniel Kirchner
5baac8470b Use emscripten 1.38.8 on both travis and circle. 2019-01-17 18:31:34 +01:00
Alex Beregszaszi
3f58505c76 Remove obsolete ETH_EMSCRIPTEN option
This was made obsolete by using toolchain files (#2836)
2019-01-17 15:23:21 +00:00
Daniel Kirchner
ecdc00d569 Set emscripten to strict mode (wrt deprecated compiler options). 2019-01-17 15:22:43 +00:00
Christian Parpart
b7eaa4f8d3
Ensuring we use at least boost 1.65, build static on Xenial, and adapt CircleCI accordingly. 2019-01-14 16:10:26 +01:00
chriseth
8825533222
Merge pull request #5699 from ethereum/cmake-no-c-dependency
cmake: Do not depend on a C compiler to be present
2018-12-20 11:56:55 +01:00
Christian Parpart
639622c6d7 cmake: Do not depend on a C compiler to be present by explicitly stating that this is a C++ project.
CMake defaults to C *and* C++ toolchain, in case nothing has been specified.
This means that cmake always checks for both, which is more than needed.

This PR cuts off C toolchain requirement from /CMakeLists.txt and ensures that we
don't pass along any `..._C_...` variables in EthCompilerSettings.cake nor jsoncpp.cmake.
2018-12-20 09:02:00 +01:00
Paweł Bylica
b57a36ddae CMake: Use toolchain files 2018-12-19 12:32:15 +00:00
Daniel Kirchner
2f698b6efe Use imported CMake targets. 2018-12-17 15:15:11 +01:00
Christian Parpart
5b86e3ec50 Enables C++14 standard (was C++11) within the Solidity compiler project. 2018-12-11 21:28:05 +01:00
chriseth
640e3ca596 Update paths to CharStream, Scanner and Token files. 2018-11-22 20:37:24 +01:00
Dominik Harz
2b053ceeff Fix cmake Z3 import issue for Fedora 2018-11-08 11:12:47 +00:00
Daniel Kirchner
a102f3b783 Remove trailing whitespace for all files in the repository. 2018-09-04 11:30:30 +02:00
Daniel Kirchner
c7a0f44159 Do not force GMP to be present as dependency of CVC4, but also allow CLN instead. 2018-08-08 19:02:59 +02:00
Daniel Kirchner
9b4546c487 Add workarounds for building against CVC4 on ArchLinux. 2018-08-08 19:02:59 +02:00
Alex Beregszaszi
551343ae3e
Merge pull request #4665 from mattaereal/cmake-patch-solver
cmake option added to make solvers optional
2018-08-08 17:58:01 +01:00
Matías Aereal Aeón
4b20708c49 cmake flags to make solvers optional. Implementation of #4651 2018-08-08 12:43:57 -03:00
Alex Beregszaszi
22461ca939
Merge pull request #4528 from guidovranken/propagate_CMAKE_CXX_FLAGS_jsoncpp
Propagate original CMAKE_CXX_FLAGS to jsoncpp compilation
2018-08-08 13:28:10 +01:00
Daniel Kirchner
fb0e3b25d0 Rename JSONCPP_EXTRA_FLAGS to JSONCPP_CXX_FLAGS, add EMSCRIPTEN workaround and remove obsolete MSVC workaround. 2018-08-08 13:17:13 +02:00
Leo Arias
9e2f26ae9a Update the coverage info message in cmake 2018-08-07 00:54:52 +00:00
Augusto F. Hack
6c3b48ddfc Added guards for unknown pragmas
Removed push/pop if there was no change to the warnings *in the same
file* for a given compiler. This assumes the imported boost headers use
a warning stack themselves.

The pragmas don't seem to be required anymore, but were not removed to
mantain compatibility with older versions of the boost library.

Compiled with
- clang version 6.0.1 (tags/RELEASE_601/final)
- gcc (GCC) 8.1.1 20180531
 against:
- libboost 1.67.0-5
2018-08-05 19:21:33 -03:00
Alex Beregszaszi
f7c96c8dee
Merge pull request #4560 from ethereum/cmake-policy
CMake policies
2018-08-02 13:32:32 +01:00
Alex Beregszaszi
4e14ccb7df Include license header from code derived from V8 (scanner/token) 2018-08-02 11:29:11 +01:00
Christian Parpart
4c5ea49881 Fixes building Solidity when base directory contains spaces.
closes #4521
2018-07-27 09:41:05 +02:00
Paweł Bylica
807f7533d9
CMake: Add option COVERAGE
This also removed PROFILE option that also adds --coverage flag. Instead you can use -DCMAKE_EXE_LINKER_FLAGS=-lprofiler. The profiling options can be added back when better investigated (e.g. -lprofiler vs -pg options).
2018-07-24 17:12:41 +02:00
Paweł Bylica
1a64dd1d71
CMake: Better policy availability checking
It's better to use if(POLICY ...) and we don't have to check for CMake 3.0 because this is the minimal required version.
2018-07-24 17:07:11 +02:00
Paweł Bylica
cfef5ec6b2
CMake: Set CMP0043 to NEW
This avoids warning in CMake 3.0.2
2018-07-24 17:04:44 +02:00
Paweł Bylica
7cd00e3630
CMake: Set CMP0042 to NEW
This should not affect solidity, but with this setting all supported CMake version will use NEW policy are will be allowed to use RPATH on macOS.
2018-07-24 17:01:25 +02:00
Paweł Bylica
33e22dc8bb
CMake: Do not set CMP0020 because it's about Qt 2018-07-24 16:57:57 +02:00
Paweł Bylica
9b5d713c28
CMake: Do not use non-existing sanitizer blacklist 2018-07-24 16:53:33 +02:00
Paweł Bylica
47eede069f
CMake: Drop policy CMP0028 OLD 2018-07-24 16:51:32 +02:00
Guido Vranken
096cac5e65 Propagate original CMAKE_CXX_FLAGS to jsoncpp compilation 2018-07-19 00:05:45 +02:00
Guido Vranken
730a444226 Do not ignore CMAKE_CXX_FLAGS defined on the command line 2018-07-17 00:58:32 +02:00
Cryptomental
140dbfdbd8 Code, Changelog, ReleaseChecklist: Fix typos.
Refs: #4442
2018-07-11 00:26:23 +02:00
Christian Parpart
230317e9ff Visual Studio 2017 build-time (linking) fix and improvements 2018-07-10 19:10:29 +02:00
mingchuan
a104e5fb03
Fix cmake when custom CMAKE_INSTALL_LIBDIR is given
According to cmake documents, we cannot assume CMAKE_INSTALL_LIBDIR is a
relative path. This commit fixes the "no rule to make libjsoncpp.a"
error by passing -DCMAKE_INSTALL_LIBDIR=lib to jsoncpp external project.
2018-06-06 14:29:48 +08:00
Lefteris Karapetsas
7ca98d4a19
Fix a typo in Buildinfo.cmake
The file should be prelease.txt and not preleases.txt
2018-05-22 17:28:17 +02:00
Paweł Bylica
7db058074b
CMake: Fix libdir for jsoncpp external project in special case
When building on Debian/Ubuntu with install prefix /usr (e.g. in PPA builds) the CMAKE_INSTALL_LIBDIR is resolved to lib/x86_64-linux-gnu. For jsoncpp external project this is never the case because the install prefix is not /usr. Remove multiarch part from libdir if there.
2018-05-17 14:44:09 +02:00
Alexander Arlt
4aed41d9b6 cmake/EthCompilerSettings.cmake: increase stacksize for apple clang
- normally 16MB is enough to run all tests, but it will exceed the stack, if -DSANITIZE=address is used.
2018-05-15 15:11:38 +02:00
Alex Beregszaszi
fa2a28abc2 CMake: enable C++11 for jsoncpp 2018-04-23 13:37:37 +01:00
Alexander Arlt
0b49fd3493 CMake: Update jsoncpp to v1.8.4 2018-04-23 11:10:39 +01:00
Alex Beregszaszi
bff741b42f Remove obsolete warning supressions for clang 2018-04-18 23:15:16 +01:00
Alex Beregszaszi
b53156b039 Remove -fpermissive 2018-04-18 23:14:38 +01:00
Leonardo Alt
ae3350ae03 [SMTChecker] Integration with CVC4 2018-04-17 12:26:58 +01:00
Paweł Bylica
cdb0bbb5ec
CMake: Do no search for ctest 2018-04-16 12:02:38 +02:00
Alex Beregszaszi
c43953f9fe CMake: abort if linking results in undefined symbols with emscripten 2018-02-20 23:28:43 +01:00
Alex Beregszaszi
b4f99312e6 Disable greedy exception catcher in Emscripten build 2018-02-12 22:44:51 +00:00
Alexander Arlt
d9c51f9ca1 Set stack-size to 16MB for darwin clang.
By default Apple's clang defines a stack size of 8MB, some tests require
more.
2018-02-05 22:15:05 +01:00
Paweł Bylica
ffd440ccff
CMake: Cleanup include paths 2017-09-26 22:44:57 +02:00
Paweł Bylica
5722f3083c
CMake: Add compiler warning about implicit fallthough 2017-09-26 14:21:01 +02:00
Paweł Bylica
ab8b1bcc72 Merge pull request #2938 from ethereum/cmake-ccache
CMake: Better ccache configuration
2017-09-21 10:52:41 +02:00
Paweł Bylica
49c98bbc34
CMake: Better ccache configuration
EthCcache module taken from cpp-ethereum.
2017-09-20 16:39:41 +02:00
Paweł Bylica
4a499a38ea
jsoncpp: Restore download dir in source tree 2017-09-19 20:41:28 +02:00
Paweł Bylica
5706508332
deps: Move and fix jsoncpp.cmake from deps submodule
This copies jsoncpp.cmake from ethereum/cpp-dependencies repo and adds BUILD_BYPRODUCT information to ExternalProject configuration (required by Ninja).
2017-09-19 11:55:55 +02:00
Paweł Bylica
d223b1361b
CMake: Better handle -fstack-protector flag support 2017-08-24 12:26:37 +02:00
Paweł Bylica
5831b048c0
CMake: Fix FindZ3 2017-08-24 08:31:51 +02:00
Alex Beregszaszi
957f23a9f4 Merge pull request #2538 from ethereum/z3Conditions
z3 conditions
2017-08-24 00:27:09 +01:00
Alex Beregszaszi
e7832eccf4 Merge pull request #2783 from ethereum/cmake-dead-code
CMake: Remove unused scripts
2017-08-23 21:10:21 +01:00
Paweł Bylica
d57e3d7f72
CMake: Explicitly ask for Boost.System library 2017-08-23 17:59:48 +02:00
chriseth
c9cf24458b Prepare build system for Z3. 2017-08-23 17:37:35 +02:00
Paweł Bylica
b9015f0fb6
CMake: Remove unused scripts 2017-08-23 17:25:29 +02:00
chriseth
b3f8ed457a Cleanup. 2017-08-23 14:24:30 +02:00
chriseth
1ece7bf443 z3 conditions 2017-08-23 14:24:04 +02:00
Paweł Bylica
0dc73913e1
CMake: Allow linking Boost dynamically
Make Boost_USE_STATIC_LIBS an CMake option, ON by default.
2017-08-21 20:42:06 +02:00
Paweł Bylica
0712e6302e
Boost: Use static libs 2017-08-18 13:32:36 +02:00
Paweł Bylica
d1f4d110fb
CMake: Build static libs by default 2017-08-18 13:32:35 +02:00
Alex Beregszaszi
872e25413e Remove LINKABLE from Emscripten 2017-07-19 12:38:16 +01:00
Alex Beregszaszi
5050164d9e Add comments to Emscripten flags 2017-07-18 21:59:32 +01:00
chriseth
c78a3a0b01 Add other licenses. 2017-07-01 22:59:08 +01:00
Lefteris Karapetsas
735c977db1 Silence implicit fallthrough warning for gcc > 7
In my system I have gcc 7.1.1 and there I get a lot of warnings which
fail the build due to implicit fallthroughs in switch statements.

Some examples can be seen here:
https://gist.github.com/LefterisJP/388c3ba5ad356f92a3b44e7efed89f9f

This PR proposes a simple solution, which is to ignore the warning for
both gcc and clang.
2017-06-29 16:46:55 +02:00
chriseth
cb7021881a Whiskers template system 2017-06-22 16:56:57 +02:00
Alex Beregszaszi
e6a36e0121 Include trailing zero in license 2017-06-14 14:14:52 +01:00
chriseth
1ce949519d Move 0x to cmake file. 2017-06-14 14:17:53 +02:00
chriseth
1d79059897 Convert license to character array. 2017-06-14 12:42:48 +02:00
chriseth
9d0691b47a Include license and warranty statement with solc. 2017-06-09 13:11:15 +02:00
Alex Beregszaszi
9cffa9a92e Do not use -Og for debug mode (won't work on Mac/clang) 2017-02-09 14:56:18 +00:00
Alex Beregszaszi
4675599170 Include SOL_VERSION_COMMIT/SOL_VERSION_PLATFORM in buildinfo.h 2017-01-17 12:54:58 +00:00
chriseth
9c2ed33e9a Merge pull request #1342 from ethereum/emscripten-codesize
Emscripten code size improvements [WIP TEST]
2016-11-25 18:07:10 +01:00
Alex Beregszaszi
35def4735e Compile with -Og in debug mode (by @chfast) 2016-11-14 21:43:28 +00:00
Alex Beregszaszi
7bbaeedc31 Add optimisation flags for Emscripten 2016-11-09 02:46:47 +00:00
chriseth
7a30e8cf6e Merge pull request #1252 from ethereum/jsoncpp-from-source
Build jsoncpp from source using jsoncpp.cmake script
2016-11-08 13:47:52 +01:00
chriseth
81254e0eb7 Fix cmake empty string replace. 2016-10-27 16:30:11 +02:00
Paweł Bylica
4bde0a2d36 Build jsoncpp from source using jsoncpp.cmake script 2016-10-20 22:18:13 +01:00