Commit graph

18 commits

Author SHA1 Message Date
badaix
53dfeb15fc Remove unused cmake scripts 2020-08-05 22:03:52 +02:00
Stijn Van der Borght
1fcb8b4fc2 code review changes pt2: cleaned up cmake, removed unused addUs function and windows macro from time_defs.hpp 2020-04-08 11:33:25 +02:00
Stijn Van der Borght
2f0764d9b8 added Opus to windows cmake config 2020-04-08 11:33:25 +02:00
Stijn Van der Borght
094ec9b53c re-added Outurnate's Windows client for master branch 2020-04-08 11:33:25 +02:00
badaix
835c4864bd Add soxr to cmake 2020-02-14 22:11:26 +01:00
Felix Geyer
f6f107af28 cmake: properly link against libatomic when needed
Similar to CMAKE_REQUIRED_FLAGS, CMAKE_CXX_LINK_FLAGS is not an
appropriate variable for linking against libraries.
2020-02-02 16:20:23 +01:00
Felix Geyer
c4a4c77417 cmake: fix libatomic checks
CMAKE_REQUIRED_FLAGS is not appropriate for libraries.
They are added before object files to the compiler command line arguments.
Depending on compiler settings it might decide that the library is not
actually needed because at that point it hasn't seen any object file
using a symbol from the library.
See "-Wl,--as-needed"
2020-02-02 16:20:23 +01:00
badaix
8c6d703ec5 Update copyright dates 2020-01-04 01:03:48 +01:00
Szabolcs Hubai
c1a2fedd8d cmake: set CMAKE_CXX_LINK_FLAGS in CheckAtomic module
The checks are valid, the "atomic" is added to CMAKE_REQUIRED_LIBRARIES,
but it fails during linking with undefined reference to __atomic_store_8
error.

"-latomic" needs to be added to CMAKE_CXX_LINK_FLAGS to fix that.
2019-11-04 14:37:35 +01:00
Szabolcs Hubai
e177689426 cmake: fix test HAVE_CXX_LIBATOMICS64_2ARGS in CheckAtomic module
It's no sense to repeat an already failed check.
Looks like a copy-paste bug as the HAVE_CXX_LIBATOMICS64_2ARGS test
runs again the very same check as the HAVE_LIBATOMIC_2ARGS.

Without this change the check obviously fails:

-- Performing Test HAVE_LIBATOMIC_2ARGS
-- Performing Test HAVE_LIBATOMIC_2ARGS - Failed
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
-- Looking for __atomic_load_8 in atomic
-- Looking for __atomic_load_8 in atomic - not found
-- Performing Test HAVE_CXX_LIBATOMICS64_2ARGS
-- Performing Test HAVE_CXX_LIBATOMICS64_2ARGS - Failed
CMake Error at cmake/CheckAtomic.cmake:146 (message):
  Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
  CMakeLists.txt:80 (include)

With this change the test HAVE_CXX_LIBATOMICS64_2ARGS succeeds:

-- Performing Test HAVE_LIBATOMIC_2ARGS
-- Performing Test HAVE_LIBATOMIC_2ARGS - Failed
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
-- Looking for __atomic_load_8 in atomic
-- Looking for __atomic_load_8 in atomic - not found
-- Performing Test HAVE_CXX_LIBATOMICS64_2ARGS
-- Performing Test HAVE_CXX_LIBATOMICS64_2ARGS - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITH_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITH_LIB - Success
2019-11-04 14:37:35 +01:00
Szabolcs Hubai
5c4174cfc1 cmake: use 'long long' for atomic check
Use 'long long' in the check_working_cxx_atomics check.
Without it the check succeed but fails during linking:

-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success

Tested with the following toolchains with OpenWrt:
* toolchain-aarch64_cortex-a72_gcc-8.3.0_musl
* toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.3.0_musl_eabi
* toolchain-i386_pentium_gcc-8.3.0_musl
* toolchain-mips_24kc_gcc-8.3.0_musl
* toolchain-mipsel_24kc_gcc-8.3.0_musl
2019-11-04 14:37:35 +01:00
badaix
7d8e77cfc0 check for 32bit lib atomic 2019-10-28 21:19:48 +01:00
badaix
64c78d1a14 add CheckAtomic cmake module 2019-10-28 19:18:01 +01:00
badaix
b20add3815 add clang-format file
reformat code
2019-09-24 22:42:36 +02:00
badaix
1299fc44fc remove include guard 2018-04-26 15:56:05 +02:00
badaix
2896ff7bf6 add documentation for CheckCXX11StringSupport 2018-04-25 16:57:44 +02:00
badaix
14e033a677 cmake checks for c++11 string support 2018-04-25 16:41:59 +02:00
Jörg Krause
0dd803007a Initial CMake support 2018-02-03 21:29:45 +01:00