Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2e2adb

Browse files
committed
Allow support for older boost and adjust docs
1 parent 96ddc54 commit c2e2adb

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

docs/installing-solidity.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,10 @@ The following are dependencies for all builds of Solidity:
319319
+-----------------------------------+-------------------------------------------------------+
320320
| Software | Notes |
321321
+===================================+=======================================================+
322-
| `CMake`_ (version 3.13+) | Cross-platform build file generator. |
322+
| `CMake`_ (version 3.21.3+ on | Cross-platform build file generator. |
323+
| Windows, 3.13+ otherwise) | |
323324
+-----------------------------------+-------------------------------------------------------+
324-
| `Boost`_ (version 1.77+ on | C++ libraries. |
325+
| `Boost`_ (version 1.77 on | C++ libraries. |
325326
| Windows, 1.65+ otherwise) | |
326327
+-----------------------------------+-------------------------------------------------------+
327328
| `Git`_ | Command-line tool for retrieving source code. |
@@ -408,7 +409,7 @@ You need to install the following dependencies for Windows builds of Solidity:
408409
+-----------------------------------+-------------------------------------------------------+
409410
| `Visual Studio 2019`_ (Optional) | C++ compiler and dev environment. |
410411
+-----------------------------------+-------------------------------------------------------+
411-
| `Boost`_ (version 1.77+) | C++ libraries. |
412+
| `Boost`_ (version 1.77) | C++ libraries. |
412413
+-----------------------------------+-------------------------------------------------------+
413414

414415
If you already have one IDE and only need the compiler and libraries,

libsolidity/lsp/LanguageServer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,12 @@ vector<boost::filesystem::path> LanguageServer::allSolidityFilesFromProject() co
220220

221221
// We explicitly decided against including all files from include paths but leave the possibility
222222
// open for a future PR to enable such a feature to be optionally enabled (default disabled).
223-
223+
// Note: Newer versions of boost have deprecated symlink_option::recurse
224+
#if (BOOST_VERSION < 107200)
225+
auto directoryIterator = fs::recursive_directory_iterator(m_fileRepository.basePath(), fs::symlink_option::recurse);
226+
#else
224227
auto directoryIterator = fs::recursive_directory_iterator(m_fileRepository.basePath(), fs::directory_options::follow_directory_symlink);
228+
#endif
225229
for (fs::directory_entry const& dirEntry: directoryIterator)
226230
if (
227231
dirEntry.path().extension() == ".sol" &&

libsolutil/Common.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
#include <libsolutil/vector_ref.h>
4242

4343
#include <boost/version.hpp>
44-
#if (BOOST_VERSION < 106500)
45-
#error "Unsupported Boost version. At least 1.65 required."
46-
#endif
4744

4845
#include <map>
4946
#include <utility>

libsolutil/Numeric.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
#include <libsolutil/CommonData.h>
2626

2727
#include <boost/version.hpp>
28-
#if (BOOST_VERSION < 106500)
29-
#error "Unsupported Boost version. At least 1.65 required."
30-
#endif
3128

3229
// TODO: do this only conditionally as soon as a boost version with gcc 12 support is released.
3330
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)

0 commit comments

Comments
 (0)