Commit Graph

398 Commits

Author SHA1 Message Date
Riccardo Spagni 77015e8132
Merge pull request #904
f07f120 cmake: don't try to link with atomic on Apple (redfish)
19349d7 cmake: ARM: clang: make warning non-fatal: inline asm (redfish)
f3e09f3 cmake: link with -latomic for clang (redfish)
f4b35ae cmake: include -ldl via cmake built-in var (redfish)
fa85cd8 common: stack trace: make clang happy with func ptrs (redfish)
4dce26b cmake: do not pass -stdlib=c++ to clang >=3.7 (redfish)
2016-07-20 13:56:59 +02:00
Riccardo Spagni 255ff79416
Merge pull request #896
1e89f4f cmake: do not ignore dangerous warnings with -Wno-error (redfish)
2016-07-20 13:51:54 +02:00
redfish f07f120e5d cmake: don't try to link with atomic on Apple
-latomic is necessary with Clang on Linux, but
apparently, on OSX it's not found.
2016-07-12 00:25:56 -04:00
redfish 19349d7870 cmake: ARM: clang: make warning non-fatal: inline asm
Clang issues a warning for some inline asm in stack_trace.cpp.  This
patch ieaves the warning to be displayed as a reminder to fix
the code.
2016-07-10 21:27:00 -04:00
redfish f3e09f36d3 cmake: link with -latomic for clang
otherwise clang build fails with

../cryptonote_core/libcryptonote_core.a(miner.cpp.o): In function
`std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/usr/bin/../lib/gcc/i686-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/bits/atomic_base.h:396:
undefined reference to `__atomic_load_8'

This has no effect on the gcc build.

The one strange thing is that test code like

std::atomic<int> x;
int main() { return x; }

compiles and links without errors with clang, without -latomic.  This
alone would suggest that this patch is unnecessary, but that is not the
case. It's not clear exactly why, though. The bitmonero code is
including the same header, but it must be doing something more complex
than in this test code snippet that causes the failure at link time
pasted above. In any case, passing -latomic fixes the problem and
seems safe.

.
2016-07-10 21:27:00 -04:00
redfish f4b35aeafd cmake: include -ldl via cmake built-in var
This does two things:
1. fixes clang build, which otherwise errors with undefined symbol
'dlsym'.
2. simplifies the cmake script, delegating to cmake to figure
   out platform-specific flags for linking against the dl library.
2016-07-10 21:27:00 -04:00
redfish 4dce26bba4 cmake: do not pass -stdlib=c++ to clang >=3.7
Tested on Linux (Arch) with clang 3.7 and 3.8 i686 and ARM:
if -stdlib=c++ is passed to clang, then the build errors
out with <string>,<iostrea>,etc. headers not found. Simply
not passing the arg fixes the problem.

**NOTE**: not tested on OSX.
2016-07-10 21:19:16 -04:00
redfish 1e89f4f2c5 cmake: do not ignore dangerous warnings with -Wno-error
Shorten the list of warnings that are reported, but
which are forced to NOT generate an error, via -Wno-error.

Unwhitelist these: strict-aliasing, sign-compare, type-limits

For example, ignoring strict-aliasing warning caused
lots of wasted time diagnosing Issue #847.
2016-07-09 11:59:07 -04:00
redfish ab250754f2 cmake: pass -fno-strict-aliasing to fix build with GCC 6.1.1
This patch is a temprorary workaround until aliasing is fixed in the
code (Issue #847).
2016-07-08 21:42:05 -04:00
Riccardo Spagni 65df33fb06
Merge pull request #877
ecd0f2d makefile: remove unnecessary ARM-specific targets (redfish)
c650160 cmake: disable AES on ARM (redfish)
804b1bc cmake: initialize ARCH for native builds (redfish)
bb39034 cmake: remove repetitive code in handling of NO_AES (redfish)
2016-07-06 18:14:03 +02:00
Riccardo Spagni 628f57b212
Merge pull request #873
d718960 remove POSIX_C_SOURCE and remove dlfcn.h for static builds (luigi1111)
2016-07-06 18:12:03 +02:00
Ilya Kitaev 653c7e3804 cmake: BUILD_TESTS as option explicitly; added missed dependency 2016-06-23 16:01:33 +03:00
redfish c6501607f3 cmake: disable AES on ARM
On ARM, gcc fails with 'unknown argument' if passed '-maes'.
2016-06-21 22:32:55 -04:00
redfish 804b1bc197 cmake: initialize ARCH for native builds
We need ARCH, because it needs to be set for ARM7, ARM6 to be
initialized.

Strangely, on different machines (both ARMv7, Arch), ${ARCH}
var is either empty or 'native'. Handle both cases.
2016-06-21 22:32:16 -04:00
redfish bb39034405 cmake: remove repetitive code in handling of NO_AES
Minor eefactor only. No behavior or interface change in this commit.
2016-06-21 19:53:07 -04:00
luigi1111 d7189600ae
remove POSIX_C_SOURCE and remove dlfcn.h for static builds
The former was a faulty "fix" for gmtime_r not existing on Windows. The latter is needed only for dynamic builds, and is not included with msys2, which ends up fine because Windows is only built static at this time.
2016-06-21 11:16:25 -05:00
Riccardo Spagni fd32a3b52a
Merge pull request #869
03e545d More fixing for Windows (iDunk)
e8baa57 CMakeLists.txt: fix build for mingw (iDunk)
2016-06-21 09:32:12 +02:00
iDunk 03e545d323
More fixing for Windows 2016-06-20 22:38:36 +01:00
iDunk e8baa57326
CMakeLists.txt: fix build for mingw
Fix from iDunk from IRC.
2016-06-20 21:39:13 +01:00
moneromooo-monero f72388c1c6
CMakeLists: fix build without libunwind 2016-06-20 19:20:14 +01:00
moneromooo-monero e409e59d29
Print stack trace on exceptions
if libunwind is found.

Useful for debugging logs.
2016-04-28 23:34:51 +01:00
moneromooo-monero f7301c3563
Revert "Print stack trace upon exceptions"
Ain't nobody got time for link/cmake skullduggery.

This reverts commit fff238ec94.
2016-03-21 10:12:23 +00:00
moneromooo-monero fff238ec94
Print stack trace upon exceptions
Useful for debugging users' logs
2016-03-19 21:48:36 +00:00
Riccardo Spagni 11de19266b
change to LMDB as default, even on 32-bit and ARM 2016-03-12 21:20:00 +02:00
warptangent 9832d18dca
cmake: Include OpenSSL libraries in static linking 2016-02-12 16:54:14 -08:00
warptangent c2f2437586
cmake: Remove unused variable
DL is empty and unused elsewhere.

The intention at one point may have been to use CMAKE_DL_LIBS, but that
would more likely apply in some situations involving static linking.
2016-02-12 15:02:12 -08:00
warptangent 7205210b0f
cmake: Fix unbound config compile settings
This allows the OpenSSL function checks to compile in unbound's CMake
configuration.

Otherwise, the functions SHA256() and EVP_sha512() won't be called from
libunbound as possible algorithms.

They had not been compiling because static OpenSSL libraries were being
used, along with lack of -ldl. The static library preference is
unnecessary for the checks, so use default suffixes ordering for
CMAKE_FIND_LIBRARY_SUFFIXES when building unbound.

Related files:
configure_checks.cmake
external/unbound/validator/val_secalgo.c
  secalgo_ds_digest(), setup_key_digest()
2016-02-12 15:02:06 -08:00
warptangent 3d1e690cb2
Add make option to disable BerkeleyDB
Sample use:
BERKELEY_DB=0 make debug

This makes development with BlockchainLMDB easier when virtual methods
have changed and don't match BlockchainBDB.
2016-02-01 13:06:15 -08:00
me0wmix 34ebfe39cd Last fixups in the Cmake stuff and better default build instruction 2016-01-22 20:27:01 -07:00
me0wmix c965bf4a7c Added/corrected OpenBSD build instructions. 2016-01-21 11:34:02 -07:00
me0wmix 28f95eb001 OpenBSD support for Monero. 2016-01-21 11:18:26 -07:00
Howard Chu 94de39fbad Tweak arm6 flags 2016-01-11 23:14:06 +00:00
Howard Chu d26e7d0b3a ARMv7 optimization flags are too aggressive 2016-01-03 12:58:08 +00:00
Howard Chu 26aac68095 Fix release flags
flags were being accumulated instead of being set.
Win32 was getting -O2 -DNDEBUG -Ofast -DNDEBUG etc...
Also for Win32, stay compatible to WinXP
2016-01-02 21:53:02 +00:00
Riccardo Spagni de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
Howard Chu cfe15b81bd Also set stacksize for Win32 not on MSVC 2015-12-20 18:41:36 +00:00
warptangent 725acc7f17
Replace tabs with two spaces for consistency with rest of codebase
Remove trailing whitespace in same files.
2015-12-15 06:22:06 -08:00
moneromooo-monero 180bcde866
build: default to Berkeley DB for 32 bit and ARM 2015-10-04 19:01:56 +01:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 464dbe7379 Fixed MINGW duplicate library errors when MSYS folder cannot be found.
*Thanks to luigi1111 for reporting.
2015-07-17 19:49:22 -07:00
warptangent bbb936df0f
Use g++ flag "-pthread" instead of "-lpthread", where preferred
CMake supports this through THREADS_PREFER_PTHREAD_FLAG.

Remove inclusion of pthread library in EXTRA_LIBRARIES, as the
individual CMakeLists.txt files which need pthread already require it
with CMAKE_THREAD_LIBS_INIT.
2015-07-16 05:30:46 -07:00
Riccardo Spagni 54c785d0bb
fixed ARM arch test to prevent breaking on short arch strings 2015-07-16 12:46:38 +02:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo e5d2680094 ** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)
Bockchain:
1. Optim: Multi-thread long-hash computation when encountering groups of blocks.
2. Optim: Cache verified txs and return result from cache instead of re-checking whenever possible.
3. Optim: Preload output-keys when encoutering groups of blocks. Sort by amount and global-index before bulk querying database and multi-thread when possible.
4. Optim: Disable double spend check on block verification, double spend is already detected when trying to add blocks.
5. Optim: Multi-thread signature computation whenever possible.
6. Patch: Disable locking (recursive mutex) on called functions from check_tx_inputs which causes slowdowns (only seems to happen on ubuntu/VMs??? Reason: TBD)
7. Optim: Removed looped full-tx hash computation when retrieving transactions from pool (???).
8. Optim: Cache difficulty/timestamps (735 blocks) for next-difficulty calculations so that only 2 db reads per new block is needed when a new block arrives (instead of 1470 reads).

Berkeley-DB:
1. Fix: 32-bit data errors causing wrong output global indices and failure to send blocks to peers (etc).
2. Fix: Unable to pop blocks on reorganize due to transaction errors.
3. Patch: Large number of transaction aborts when running multi-threaded bulk queries.
4. Patch: Insufficient locks error when running full sync.
5. Patch: Incorrect db stats when returning from an immediate exit from "pop block" operation.
6. Optim: Add bulk queries to get output global indices.
7. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3)
8. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key
9. Optim: Added thread-safe buffers used when multi-threading bulk queries.
10. Optim: Added support for nosync/write_nosync options for improved performance (*see --db-sync-mode option for details)
11. Mod: Added checkpoint thread and auto-remove-logs option.
12. *Now usable on 32-bit systems like RPI2.

LMDB:
1. Optim: Added custom comparison for 256-bit key tables (minor speed-up, TBD: get actual effect)
2. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3)
3. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key
4. Optim: Added support for sync/writemap options for improved performance (*see --db-sync-mode option for details)
5. Mod: Auto resize to +1GB instead of multiplier x1.5

ETC:
1. Minor optimizations for slow-hash for ARM (RPI2). Incomplete.
2. Fix: 32-bit saturation bug when computing next difficulty on large blocks.

[PENDING ISSUES]
1. Berkely db has a very slow "pop-block" operation. This is very noticeable on the RPI2 as it sometimes takes > 10 MINUTES to pop a block during reorganization.
   This does not happen very often however, most reorgs seem to take a few seconds but it possibly depends on the number of outputs present. TBD.
2. Berkeley db, possible bug "unable to allocate memory". TBD.

[NEW OPTIONS] (*Currently all enabled for testing purposes)
1. --fast-block-sync arg=[0:1] (default: 1)
	a. 0 = Compute long hash per block (may take a while depending on CPU)
	b. 1 = Skip long-hash and verify blocks based on embedded known good block hashes (faster, minimal CPU dependence)
2. --db-sync-mode arg=[[safe|fast|fastest]:[sync|async]:[nblocks_per_sync]] (default: fastest:async:1000)
	a. safe = fdatasync/fsync (or equivalent) per stored block. Very slow, but safest option to protect against power-out/crash conditions.
	b. fast/fastest = Enables asynchronous fdatasync/fsync (or equivalent). Useful for battery operated devices or STABLE systems with UPS and/or systems with battery backed write cache/solid state cache.
	Fast    - Write meta-data but defer data flush.
	Fastest - Defer meta-data and data flush.
	Sync    - Flush data after nblocks_per_sync and wait.
	Async   - Flush data after nblocks_per_sync but do not wait for the operation to finish.
3. --prep-blocks-threads arg=[n] (default: 4 or system max threads, whichever is lower)
        Max number of threads to use when computing long-hash in groups.
4. --show-time-stats arg=[0:1] (default: 1)
	Show benchmark related time stats.
5. --db-auto-remove-logs arg=[0:1] (default: 1)
	For berkeley-db only. Auto remove logs if enabled.

**Note: lmdb and berkeley-db have changes to the tables and are not compatible with official git head version.
	At the moment, you need a full resync to use this optimized version.

[PERFORMANCE COMPARISON]
**Some figures are approximations only.
Using a baseline machine of an i7-2600K+SSD+(with full pow computation):
1. The optimized lmdb/blockhain core can process blocks up to 585K for ~1.25 hours + download time, so it usually takes 2.5 hours to sync the full chain.
2. The current head with memory can process blocks up to 585K for ~4.2 hours + download time, so it usually takes 5.5 hours to sync the full chain.
3. The current head with lmdb can process blocks up to 585K for ~32 hours + download time and usually takes 36 hours to sync the full chain.

Averate procesing times (with full pow computation):
lmdb-optimized:
1. tx_ave = 2.5 ms / tx
2. block_ave = 5.87 ms / block
memory-official-repo:
1. tx_ave = 8.85 ms / tx
2. block_ave = 19.68 ms / block
lmdb-official-repo (0f4a036437)
1. tx_ave = 47.8 ms / tx
2. block_ave = 64.2 ms / block

**Note: The following data denotes processing times only (does not include p2p download time)
lmdb-optimized processing times (with full pow computation):
1. Desktop,  Quad-core / 8-threads 2600k  (8Mb) - 1.25 hours processing time (--db-sync-mode=fastest:async:1000).
2. Laptop,   Dual-core / 4-threads U4200  (3Mb) - 4.90 hours processing time (--db-sync-mode=fastest:async:1000).
3. Embedded, Quad-core / 4-threads Z3735F (2x1Mb) - 12.0 hours processing time (--db-sync-mode=fastest:async:1000).

lmdb-optimized processing times (with per-block-checkpoint)
1. Desktop,  Quad-core / 8-threads 2600k  (8Mb) - 10 minutes processing time (--db-sync-mode=fastest:async:1000).

berkeley-db optimized processing times (with full pow computation)
1. Desktop, Quad-core / 8-threads 2600k  (8Mb) - 1.8 hours processing time (--db-sync-mode=fastest:async:1000).
2. RPI2. Improved from estimated 3 months(???) into 2.5 days (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).

berkeley-db optimized processing times (with per-block-checkpoint)
1. RPI2. 12-15 hours (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).
2015-07-15 23:20:16 -07:00
moneromooo-monero 8623492150
Interpret x86_64 as x86-64 for architecture 2015-07-09 14:56:20 +01:00
Riccardo Spagni ce974949e2
fixed static assert test 2015-05-31 15:39:56 +02:00
Riccardo Spagni 5001489353
explicitly include libc++ with clang 2015-05-26 11:07:58 +02:00
warptangent 5c025f99a8
Check for Clang before adding compiler flag
See eb565a1ce2
2015-05-13 09:20:02 -07:00
Sergey Kazenyuk 867e98d739 Merge branch 'clang_fixes' into clang_fixes-master 2015-05-06 19:10:51 +03:00
Sergey Kazenyuk eb565a1ce2 Suppress 'register storage class is deprecated' warning in boost dependency library 2015-04-20 20:02:11 +03:00
Thomas Winget a8bc7182ea
Merge BlockchainDB into upstream 2015-04-07 17:56:18 -04:00
Thomas Winget 7292dea192
Merges PR #37
New/updated Makefile targets
2015-04-07 16:13:42 -04:00
Thomas Winget 9519526224
Only compile BerkeleyDB as an option in non-static 2015-04-07 15:02:20 -04:00
Riccardo Spagni 4222b372e4
add arm6 target and flags 2015-04-06 14:00:09 +02:00
rfree2monero c511abf005 remerged; commands JSON. logging upgrade. doxygen 2015-04-01 19:00:45 +02:00
rfree2monero 3cbdf198f1 Merge remote-tracking branch 'monero-official/master' into network-1.6-work1 2015-04-01 18:24:45 +02:00
Thomas Winget 874f48bc82
update berkeleydb branch to blockchain branch 2015-03-25 07:30:23 -04:00
Thomas Winget 5c0bc0050c
Merge upstream updates into blockchain branch 2015-03-25 05:56:36 -04:00
Thomas Winget 51e3579a80
Fixed bug in static linking boost on MINGW
There was a workaround for linking to boost at all on MINGW, but
unfortunately this workaround would not correctly link to boost
statically.  This workaround for that workaround works around the issue
that that workaround had.
2015-03-22 06:25:53 -04:00
Thomas Winget 8e3347f310
Pull blockchain changes into berkeleydb branch 2015-03-17 19:52:53 -04:00
Thomas Winget 6e9e8ab620
Move db_drivers/ to external/
Also change LMDB Cmake variables to CACHE rather than upgrading them
through several parent scopes.
2015-03-17 18:55:24 -04:00
Riccardo Spagni 56a1bf527b
fixed BUILD_64 option 2015-03-17 18:26:58 -04:00
Riccardo Spagni c97a685a37
fixed arch_width option 2015-03-17 18:26:48 -04:00
Riccardo Spagni 3a3c07c330
fixed msys2 / mingw folders based on architecture, added license to unbound CMakeList as that is not part of standard Unbound 2015-03-17 18:26:38 -04:00
Riccardo Spagni 3b3da86483
moved 32-bit/64-bit detection into main CMakeLists 2015-03-17 18:26:29 -04:00
Thomas Winget 11e815761f
Revert "Moved db_drivers/ into external/ for consistency"
This reverts commit b21335642e.
2015-03-17 18:03:11 -04:00
Thomas Winget cade0da8f1
CMake wiring, minor cleanup, minor test addition
Make Cmake things aware of BerkeleyDB and BlockchainBDB

Make the BlockchainDB unit tests aware of BlockchainBDB
2015-03-16 04:17:53 -04:00
Thomas Winget b21335642e
Moved db_drivers/ into external/ for consistency 2015-03-09 15:48:46 -04:00
rfree2monero 5ce4256e3d 2014 network limit 1.1 +utils +toc -doc -drmonero
Update of the PR with network limits

works very well for all speeds
(but remember that low download speed can stop upload
because we then slow down downloading of blockchain
requests too)

more debug options

fixed pedantic warnings in our code
should work again on Mac OS X and FreeBSD
fixed warning about size_t
tested on Debian, Ubuntu, Windows(testing now)

TCP options and ToS (QoS) flag
FIXED peer number limit
FIXED some spikes in ingress/download
FIXED problems when other up and down limit
2015-02-20 22:13:00 +01:00
rfree2monero eabb519605 2014 network limit 1.0a +utils +toc -doc -drmonero
commands and options for network limiting
works very well e.g. for 50 KiB/sec up and down
ToS (QoS) flag
peer number limit
TODO some spikes in ingress/download
TODO problems when other up and down limit
added "otshell utils" - simple logging (with colors, text files channels)
2015-02-20 22:13:00 +01:00
warptangent 84fe5fbd65
Add compile-time support for both db implementations: in-memory and LMDB
Usage:

default is lmdb for blockchain branch:
$ make release

same as:
$ DATABASE=lmdb make release

for original in-memory implementation:
$ DATABASE=memory make release
2015-02-02 11:53:09 -08:00
warptangent 79ea1f6ff0
Merge upstream
Merge branch 'monero-project/master' into blockchain
2015-01-30 16:19:22 -08:00
Riccardo Spagni 2b3b70a261
remove aes flag, detect no sse2 2015-01-27 09:05:47 +02:00
Riccardo Spagni bb85fea35a
fixed AES support flag 2015-01-27 07:45:21 +02:00
Riccardo Spagni 615079e2f4
allow for explicitly disabling AES-NI 2015-01-26 23:19:53 +02:00
Thomas Winget 34883599bc
Add in-source lmdb to build process
Working on Linux, needs verified for other platforms but should be fine.
2015-01-18 18:30:31 -05:00
moneromooo-monero 0886183568 build: add liblmdb to the cmake autodetection system
update for rebase (warptangent 2015-01-04)
  src/cryptonote_core/CMakeLists.txt (edit)
  - replace LMDB_LIBRARIES with LMDB_LIBRARY set from autodetection
2015-01-04 19:39:40 -08:00
Thomas Winget 1240cf805b
BlockchainDB unit tests, lmdb linker flag
Some BlockchainDB unit testing fleshed out (and working), rudimentary
linker flag for lmdb in CMakeLists, but should probably be done
"correctly" at some point (find it on whatever system you're building on
and all that jazz).

update for rebase (warptangent 2015-01-04)
  fix conflicts with upstream CMakeLists.txt files

  tests/CMakeLists.txt (remove edits from original commit)
2015-01-04 19:00:31 -08:00
Riccardo Spagni f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Riccardo Spagni affde29754
moved rapidjson to external folder, fixed CMake 2014-12-01 21:15:50 +02:00
Riccardo Spagni 4cd15cdde5
Merge pull request #1
f1eaf88 Prints seed after wallet upgrade. Removed iostream include. (Oran Juice)
70971be Doxygen comments (Oran Juice)
031ca23 Rewrites to old wallet file correctly (Oran Juice)
1f833dc Doxygen comments in (Oran Juice)
0bd88ff Writes seed language while generating wallet. Wallet open fix. (Oran Juice)
09a659e Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility (Oran Juice)
2014-12-01 20:15:06 +02:00
Riccardo Spagni 685dd4a5d3
don't build tests unless we're building all-* or *-test builds 2014-12-01 20:00:22 +02:00
Ben Boeckel ce71c01f11 cmake: work around a bug with implicit link directories
Unfortunately, this is necessary because CMake doesn't detect whether
mingw libraries are static or shared and doesn't put a -static flag around
the -lfoo argument which then makes the shared library be linked to.
2014-11-18 17:04:47 -05:00
Ben Boeckel 18c56abe4b msys: don't use LTO
This causes duplicate symbol errors on msys' mingw install.
2014-11-17 18:19:54 -05:00
Ben Boeckel 5680c9cac7 msys: factor out -Werror on msys
There are Windows-related warnings turned into errors here.
2014-11-17 18:19:54 -05:00
Ben Boeckel 475154255a msys: look in msys' directory for files
This tells find_path and find_library to look under this directory first
which is what we want on msys2.
2014-11-17 18:19:53 -05:00
Ben Boeckel 7d708e4223 cmake: support 2.8.7
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer
versions prefer PUBLIC and PRIVATE instead, but still support the LINK_
prefix.
2014-10-24 15:29:51 -04:00
Ben Boeckel 9689df925c cmake: clean up EXTRA_LIBRARIES
pthread is handled by CMAKE_THREAD_LIBS_INIT while libdl isn't needed.
2014-10-23 16:42:35 -04:00
Ben Boeckel 3b7bdcb790 cmake: set the project name 2014-10-23 16:42:35 -04:00
Ben Boeckel 0f0efc4af2 cmake: prepend to CMAKE_MODULE_PATH 2014-10-23 16:42:35 -04:00
Ben Boeckel abbd5c0bdb unbound: import cmake build system 2014-10-23 16:42:35 -04:00
Ben Boeckel 475fe209a8 cmake: minor cleanups (indentation and typos) 2014-10-23 16:42:35 -04:00
Ben Boeckel 799e8b241f cmake: use option() for STATIC 2014-10-23 16:42:35 -04:00
Ben Boeckel c24d22b44e cmake: clean up if auto-dereferencing
CMake will auto-dereference variable names in if statements, so there's
no need to dereference them manually.
2014-10-23 16:42:35 -04:00
Ben Boeckel eba180a1c7 cmake: support git info in released tarballs 2014-10-23 16:42:34 -04:00
Ben Boeckel eeffac6839 cmake: fix up BOOST_IGNORE_SYSTEM_PATHS
The option was set twice when it only needs to be set once. Also fix a
bogus dereference and spurious whitespace.
2014-10-23 16:42:34 -04:00
Ben Boeckel a43f1a88d8 cmake: remove configuration variables
CMAKE_BUILD_TYPE is meant for single-config build tools (e.g., make and
ninja) while CMAKE_CONFIGURATION_TYPES is meant for multi-config build
tools (e.g., Xcode and Visual Studio). They should not be mixed or
manually set.
2014-10-23 16:42:34 -04:00
Ben Boeckel a87ce09461 cmake: factor out error messages
Instead of using BoldRed and ColourReset everywhere, wrap it up in a
function.
2014-10-23 16:42:34 -04:00
Oran Juice 09a659edb5
Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility 2014-10-18 02:21:37 +05:30
Riccardo Spagni 26728d94fe
mingw library tweaks 2014-10-06 22:34:44 +02:00
Riccardo Spagni 2cf94c1321
fix for mingw not playing nicely with libunbound configure, fix for correctly finding static libs on various operating systems 2014-10-06 22:29:07 +02:00
Riccardo Spagni b05e27f8b1
need to link with -ldl on Linux when building statically 2014-10-06 21:17:31 +02:00
Riccardo Spagni 1afba7311e
quieten CMake when it can't find packages 2014-10-06 18:56:59 +02:00
Riccardo Spagni 6b7ac4b37f
enforce static libraries when building statically 2014-10-06 18:46:18 +02:00
Riccardo Spagni cee87473ad build libunbound from external if no local libunbound or for static builds 2014-10-06 18:08:32 +02:00
Riccardo Spagni 99945a5c47
dependencies enforced, send que error message log level moved 2014-09-29 20:13:15 +02:00
Riccardo Spagni 524eae58cc
never use the baked-in miniupnpc on FreeBSD because explosions 2014-09-24 20:57:09 +02:00
Riccardo Spagni bff1f9d4c4
redo FindUnbound.cmake 2014-09-24 20:38:24 +02:00
Thomas Winget 24f325a33d
Fixed artifacts from cherry-picking devel->master 2014-09-23 22:59:47 +02:00
Thomas Winget 5bd343778f Fixed CMake search for libunbound
As it turns out, some of CMake's built-in modules for detecting headers
and libraries don't work if you have certain compiler flags set, such as
-Werror=old-style-definition, as they do "int main()" rather than
"int main(void)".  Having CMake search for libs before compiler flags
are set alleviates this issue, and I believe the underlying issue will
be fixed in future releases of CMake.
2014-09-23 22:58:31 +02:00
Thomas Winget dea98df6b1 Updated CMake files -- added libunbound linker flag
CMake config file written, but was unable to test/get it working
properly because of a bug in CMake with functions related to
find_package.  Simple "-lunbound" flag used in its stead for now.  May
not build on non-Linux systems, not sure yet.
2014-09-23 22:58:02 +02:00
Riccardo Spagni b5d51e30d9
moved msys2 toolchain, boost libs fix 2014-09-22 12:30:53 +02:00
Riccardo Spagni ca569549ec
added mikezackles' missing boost function in CMakeLists 2014-09-22 12:09:46 +02:00
Riccardo Spagni 0e21944b97
turns out we do need -static-libgcc etc. on Linux 2014-09-15 23:17:24 +02:00
Riccardo Spagni d8257fb67b
explicitly disable LTO for Clang 2014-09-15 22:47:26 +02:00
Zachary Michaels ed41ee4c26 Use LTO by default
The mingw toolchains override this for now.
2014-09-15 22:36:58 +02:00
Zachary Michaels 729d4bb91d User setting to turn LTO on and off
This isn't currently working on mingw
2014-09-15 22:29:39 +02:00
Zachary Michaels e1dfd58bdb Remove unnecessary else 2014-09-15 22:29:39 +02:00
Zachary Michaels 1b90c6f3d5
Hack to add pthread to link libraries on mingw
This should link winpthreads.  We really shouldn't be passing these this
way, but that seems to be the existing solution, and it works for now.
2014-09-15 22:29:27 +02:00
Zachary Michaels f9f4fc1b00
Change to -static gcc flag 2014-09-15 22:28:35 +02:00
Zachary Michaels 44f920b0fd Set the boost thread api for mingw 2014-09-15 22:27:16 +02:00
Zachary Michaels a31d6bb9fb Hack to allow toolchains to pass flags to mingw 2014-09-15 22:27:16 +02:00
Zachary Michaels 9c848ceae7 Ignore another warning to make mingw happy 2014-09-15 22:27:16 +02:00
Zachary Michaels 0fe311b2f0
Remove unused CMake function 2014-09-15 22:25:04 +02:00
Zachary Michaels 8d6a04a9f0 Default to static linking on both MSVC and MINGW 2014-09-15 22:22:31 +02:00
Riccardo Spagni 5a3ce8a7dc FreeBSD static linking fixes 2014-09-15 08:08:03 +02:00
Riccardo Spagni 8334ce0b24 versioning now includes the commit hash, or -final for tagged releases 2014-09-12 13:12:43 +02:00
Riccardo Spagni 446a7ddc49 always check git diff 2014-09-12 13:12:43 +02:00
fluffypony d21cf293e1 added license to CMake 2014-09-11 08:25:07 +02:00
fluffypony 36c7ea9f77 more CMake tweaks to allow detection on OS X 2014-09-11 08:22:49 +02:00
fluffypony 8d8b47e69f more dynamic miniupnp fixes 2014-09-10 20:01:30 +02:00
fluffypony 7d01dad8f4 use external miniupnpc if available 2014-09-10 18:14:57 +02:00
fluffypony 81490d2aea miniupnpc changes for freebsd 2014-09-10 14:19:42 +02:00
fluffypony a8d043b6dd replace ftime with gettimeofday on FreeBSD because lcompat is stupid 2014-09-10 13:55:39 +02:00
fluffypony 0e343ecfdf make FreeBSD use -lcompat till we can fix ftime() 2014-09-10 13:25:34 +02:00
fluffypony 5a65991480 exclude local miniupnpc for FreeBSD, install from ports instead 2014-09-09 14:03:42 +02:00
Thomas Winget 45bd182363 needed to remove REQUIRED from find_package(Threads) 2014-06-30 07:23:49 -04:00
Zachary Michaels 6bee34e4a6 Fix to disable LTO for Clang
The previous code was assuming Apple == Clang.  This change should both
enable LTO when using gcc on Apple and fix Clang when using it on other
platforms.
2014-06-12 15:38:28 -04:00
Zachary Michaels e84f39ae54 Link to pthreads on non-apple unix 2014-06-11 13:15:23 -04:00
Zachary Michaels c8626dff3f Gcc 4.9 LTO fix
The new lto format requires use of the gcc-provided gcc-ar and
gcc-ranlib binaries.
2014-06-11 13:13:43 -04:00
mydesktop 3a3a817678 0.8.8update 2014-05-25 13:06:40 -04:00
OracionSeis 9f1ffe0473 OS X compilation fixed 2014-05-22 17:12:33 +04:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 3c5d7468d7 Update CMakeLists.txt
1. Fixed build error on machines not supporting aes-ni.
2014-05-21 13:02:46 -07:00
vertoe 41533168a9 fix CMakeLists.txt to add -lpthread, did not compile boost 1.55 2014-05-05 19:59:21 +02:00
mydesktop 79a4bedc36 mac osx building fixes 2014-04-30 16:50:06 -04:00
mydesktop 67df296650 various fixes to allow mac osx compilation 2014-04-30 13:52:21 -04:00
Antonio Juarez 9682a15400 Port mapping with UPnP 2014-04-09 13:14:35 +01:00
Antonio Juarez a401a02ddb Improvements in JSON RPC 2014-04-07 16:02:15 +01:00
Antonio Juarez 8efa1313f3 some fixes 2014-03-20 11:46:11 +00:00
Antonio Juarez 296ae46ed8 moved all stuff to github 2014-03-03 22:07:58 +00:00