Skip to content

Commit

Permalink
Merge pull request ethereum#13880 from ethereum/allow-older-boost-sup…
Browse files Browse the repository at this point in the history
…port

Allow support for older boost and adjust docs
  • Loading branch information
nikola-matic authored Jan 18, 2023
2 parents db0ecd2 + c2e2adb commit 57a6866
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
7 changes: 4 additions & 3 deletions docs/installing-solidity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,10 @@ The following are dependencies for all builds of Solidity:
+-----------------------------------+-------------------------------------------------------+
| Software | Notes |
+===================================+=======================================================+
| `CMake`_ (version 3.13+) | Cross-platform build file generator. |
| `CMake`_ (version 3.21.3+ on | Cross-platform build file generator. |
| Windows, 3.13+ otherwise) | |
+-----------------------------------+-------------------------------------------------------+
| `Boost`_ (version 1.77+ on | C++ libraries. |
| `Boost`_ (version 1.77 on | C++ libraries. |
| Windows, 1.65+ otherwise) | |
+-----------------------------------+-------------------------------------------------------+
| `Git`_ | Command-line tool for retrieving source code. |
Expand Down Expand Up @@ -408,7 +409,7 @@ You need to install the following dependencies for Windows builds of Solidity:
+-----------------------------------+-------------------------------------------------------+
| `Visual Studio 2019`_ (Optional) | C++ compiler and dev environment. |
+-----------------------------------+-------------------------------------------------------+
| `Boost`_ (version 1.77+) | C++ libraries. |
| `Boost`_ (version 1.77) | C++ libraries. |
+-----------------------------------+-------------------------------------------------------+

If you already have one IDE and only need the compiler and libraries,
Expand Down
6 changes: 5 additions & 1 deletion libsolidity/lsp/LanguageServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ vector<boost::filesystem::path> LanguageServer::allSolidityFilesFromProject() co

// We explicitly decided against including all files from include paths but leave the possibility
// open for a future PR to enable such a feature to be optionally enabled (default disabled).

// Note: Newer versions of boost have deprecated symlink_option::recurse
#if (BOOST_VERSION < 107200)
auto directoryIterator = fs::recursive_directory_iterator(m_fileRepository.basePath(), fs::symlink_option::recurse);
#else
auto directoryIterator = fs::recursive_directory_iterator(m_fileRepository.basePath(), fs::directory_options::follow_directory_symlink);
#endif
for (fs::directory_entry const& dirEntry: directoryIterator)
if (
dirEntry.path().extension() == ".sol" &&
Expand Down
3 changes: 0 additions & 3 deletions libsolutil/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
#include <libsolutil/vector_ref.h>

#include <boost/version.hpp>
#if (BOOST_VERSION < 106500)
#error "Unsupported Boost version. At least 1.65 required."
#endif

#include <map>
#include <utility>
Expand Down
3 changes: 0 additions & 3 deletions libsolutil/Numeric.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
#include <libsolutil/CommonData.h>

#include <boost/version.hpp>
#if (BOOST_VERSION < 106500)
#error "Unsupported Boost version. At least 1.65 required."
#endif

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

0 comments on commit 57a6866

Please sign in to comment.