Commit Graph

71 Commits

Author SHA1 Message Date
868f4eef3d Various cleanups (#1099)
* cmake: remove atomic checks

All this stuff was replaced with std::atomic

Fixes: 9bcba812af

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* cmake: remove vsnprintf checks

Available since C++11

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: const ref conversions

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: handle self assignment

Found with bugprone-unhandled-self-assignment,cert-oop54-cpp

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: remove wrong forward declarations

Found with bugprone-forward-declaration-namespace

Signed-off-by: Rosen Penev <rosenp@gmail.com>

---------

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-05 10:31:46 -05:00
2a1fb27735 clang-tidy: Replace C headers with C++ alternatives
run-clang-tidy -header-filter='.*' -checks='-*,modernize-deprecated-headers'

Fixed manually as automatic fix would shuffle headers around.
2023-07-22 07:09:58 +02:00
01348fb619 Move finding ZLIB to root CMakeLists.txt
Small line decrease, but also easier to read what is happening.
Now all dependencies can be read from the root CMakeLists.txt file.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2021-03-06 14:52:25 +01:00
9e0a7f7adb Use CMake's CTest which includes BUILD_TESTING option
BUILD_TESTING is default enabled, which is a good default anyway.
Move the CppUnit check to the root CMakeLists.txt, simpler and clearer.
BUILD_TESTS is obsolete.

The need for BUILD_SHARED_LIBS=OFF for testing is not clear, it works on Linux.
But I kept it in the instructions for now.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2021-03-06 14:52:25 +01:00
8f6b6ac055 Don't pull in C++11+ for one class 2020-12-20 18:38:05 +01:00
5ebd3d5276 Fix WinRT configuring
Don't rely on _WIN32_WINNT value to enable WinRT support.

if _WIN32_WINNT is not set manually, it is defaulted to SDK version. So
if you use SDK > 8 you cannot use TagLib under Win7 and lower because of
CreateFile2 function dependency.

PLATFORM_WINRT option (OFF by default) was introduced to enable WinRT
build.

Related issues: https://github.com/Microsoft/vcpkg/issues/1240
2017-06-08 19:00:37 +05:00
de87cd7736 Remove the CMake check for Boost I missed out on. 2016-12-20 12:06:21 +09:00
14c3ce5737 Remove all the optional dependencies on Boost. 2016-12-20 11:54:06 +09:00
ffa32b19a7 Fix the CMake check for std::atomic_int.
std::atomic_int of Visual C++ 2012 cannot be constructed with integer.
2016-12-20 11:48:14 +09:00
a19a623d4b Make use of increment/decrement operators of std::atomic. 2016-12-09 10:09:31 +09:00
250c59f783 Remove optional dependencies on Boost's dynamic libraries.
Using precompiled Boost libraries can lead to depending on external dynamic libraries.
2016-12-09 09:42:29 +09:00
b5115e3497 Fix #667: Compiled TagLib framework for OS X fails at codesign. 2016-12-08 12:53:40 +08:00
a27199b772 Support Boost iostreams library to decode compressed ID3v2 frames in additiion to zlib.
This will help Windows users build TagLib without zlib source.
2016-03-02 11:14:11 +09:00
455e827e1e Explicitly set a false flag in ConfigureChecks.cmake. 2016-02-15 02:18:42 +09:00
f3016c0892 Enable Boost Endian library again.
It should be detected properly now.
2016-02-15 01:36:17 +09:00
bb006e41d7 Disable Boost Endian library for now.
It's not detected properly depending on the environment.
2016-02-14 03:17:37 +09:00
ab2267f9aa Find Boost properly.
check_cxx_source_compiles() depends on the Visual Studio settings.
2016-02-14 01:53:02 +09:00
130654316b Backport some comments from tablib2 branch. 2015-12-21 13:54:02 +09:00
5cd139a578 Small fix in style. 2015-12-21 13:34:48 +09:00
62ec63b039 Disable tests with a shared library. 2015-12-03 15:04:37 -05:00
6775cef651 Make use of the Boost Endian library for byte swapping.
It's likely to be better at choosing the most efficient method than our CMake tests.
2015-11-13 10:58:23 +09:00
86c7e905ba Silence some MSVC security warnings by replacing strdup() with _strdup().
Backported from taglib2.
2015-11-13 10:06:01 +09:00
70f8fb1bae Revert "Add and fix some comments in ConfigureChecks.cmake."
This reverts commit fa6f33e552.
2015-08-31 16:28:24 +09:00
fa6f33e552 Add and fix some comments in ConfigureChecks.cmake. 2015-08-26 15:05:34 +09:00
80441ff754 Remove a workaround for an older version of GCC.
GLIBC's byte swap functions are a good fallback option.
2015-08-07 08:59:16 +09:00
19a7e45997 Merge pull request #639 from TsudaKageyu/remove-cmake-check-float
Run-time check for byte order rather than CMake check.
2015-08-07 01:17:27 +09:00
076e845912 Run-time check for integer byte order rather than CMake check.
It will easily be optimized out.
2015-08-03 13:08:58 +09:00
44d9f2bf25 Run-time check for floating point byte order rather than CMake check.
It's safer not to use an unofficial CMake script.
2015-08-01 23:40:23 +09:00
89e6ad96a4 Check for vsnprintf first. 2015-08-01 23:38:50 +09:00
aa1dd0278d CMake check for vsprintf_s/vsnprintf rather than sprintf_s/snprintf. 2015-08-01 23:38:50 +09:00
13dab99af0 Remove unused includes from ConfigureChecks.cmake. 2015-08-01 23:34:36 +09:00
f25e30d33f Revert "Reorder CMake checks for sprintf() variants."
This reverts commit c69364d831.
2015-08-01 01:59:36 +09:00
c69364d831 Reorder CMake checks for sprintf() variants.
VS2015 has snprintf(), however sprintf_s() is still recommended.
2015-07-31 10:11:01 +09:00
48311cca14 Undo comment stacking. 2015-05-31 22:12:18 -04:00
abc5743222 Removed missed unnecessary BUILD_TESTS check. 2015-05-20 15:34:05 -04:00
e44cba56b5 Don't look for CppUnit unless BUILD_TESTS, general cleanup. 2015-05-20 11:11:55 -04:00
735e17f504 Merge remote-tracking branch 'TsudaKageyu/64bit-atom'
Conflicts:
	ConfigureChecks.cmake
2014-12-08 16:52:33 -08:00
0731bc7b2e Remove CMake check for sizeof(long). 2014-12-09 08:55:46 +09:00
421eb5e97e Merge pull request #420 from TsudaKageyu/remove-codecvt
Replaced codecvt with Win32 API.
2014-12-08 09:14:00 -08:00
f29c5f45f8 Workaround for 64-bit MP4 atoms. 2014-08-23 00:04:33 +09:00
3c727e091e Removed a useless line from ConfigureChecks.cmake. 2014-08-12 13:42:44 +09:00
972aa1feef Replaced codecvt with Win32 API. 2014-08-07 17:35:42 +09:00
e29f1d39e7 Added float conversion functions to ByteVector.
Added CMake checks about IEEE754 compliance.
2014-07-17 12:09:14 +09:00
5f738a9819 Changed to skip the ZLib check when ZLIB_SOURCE is set. 2014-07-09 09:52:08 +09:00
fadb57e4cd Added a Windows-friendly build option ZLIB_SOURCE. 2014-06-19 19:54:12 +09:00
95776b5905 These files should not be marked as executable 2013-10-06 17:11:01 +02:00
36d7f9ba32 Removed the dependency on shlwapi.dll in Win32 2013-06-06 13:45:23 +09:00
42d268c2c9 Fixed shlwapi.h and shlwapi.lib detection for MSVC 2013-05-26 04:17:18 +09:00
b3f3eeeec7 Added FindShlwapi.cmake in lieu of pragma comment() in fileref.h. 2013-05-25 01:58:49 -04:00
bbec1c7f81 Changed String::number() to use a standard function 2013-05-19 14:39:45 +09:00