Skip to content

Commit

Permalink
Update external dependency versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mankarse committed May 23, 2023
1 parent d4ceb7e commit c77d41b
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 32 deletions.
13 changes: 6 additions & 7 deletions ext/ExternalDependencies.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
==== HourglassII External Dependencies Configuration ====
HourglassII depends on the following libraries:

Boost version 1.72.0 -- https://www.boost.org/users/history/version_1_72_0.html
SFML version 2.5.1 -- http://www.sfml-dev.org/download.php
Threading Building Blocks version 2020.1-- https://github.com/intel/tbb/releases/tag/v2020.1
OpenALSoft 1.20.1 -- https://github.com/kcat/openal-soft/releases/tag/openal-soft-1.20.1
GLFW 3.3.2 -- https://www.glfw.org/download.html
GSL 202f332702ccaddd67894d5fdcaf91fa2cbd38eb -- https://github.com/Microsoft/GSL/
Vulkan (LunarG Vulkan SDK 1.2.135.0) -- https://vulkan.lunarg.com/sdk/home
Boost 1.82.0 -- https://www.boost.org/users/history/version_1_82_0.html
SFML 2.5.1 -- http://www.sfml-dev.org/download.php
oneTBB 2021.9.0 -- https://github.com/oneapi-src/oneTBB/releases/tag/v2021.9.0
GLFW 3.3.8 -- https://www.glfw.org/download
Microsoft.GSL 4.0.0 -- https://github.com/microsoft/GSL/releases/tag/v4.0.0
Vulkan (LunarG Vulkan SDK 1.3.246.1) -- https://vulkan.lunarg.com/sdk/home
4 changes: 2 additions & 2 deletions src/hg/Util/ParallelForEach.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef HG_PARALLEL_FOR_EACH_H
#define HG_PARALLEL_FOR_EACH_H
#include <boost/range.hpp>
#include <tbb/parallel_do.h>
#include <oneapi/tbb/parallel_for_each.h>
#include <boost/range/algorithm/for_each.hpp>
#include "as_lvalue.h"

Expand All @@ -10,7 +10,7 @@ template<typename RandomAccessRange, typename Func>
void parallel_for_each(
RandomAccessRange &range, Func &&func, tbb::task_group_context &context = as_lvalue(tbb::task_group_context()))
{
tbb::parallel_do(boost::begin(range), boost::end(range), std::forward<Func>(func), context);
oneapi::tbb::parallel_for_each(boost::begin(range), boost::end(range), std::forward<Func>(func), context);
//boost::for_each(range, func);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/hg/Util/async_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "async.h"
#include "TestDriver.h"
#include <tbb/task_scheduler_init.h>
namespace hg {
namespace async_test {
namespace {
Expand All @@ -15,7 +14,8 @@ namespace {
auto test = ([] {
//Running test in newly created thread so task_scheduler_init is able to operate independently
//from the main codebase.
tbb::task_scheduler_init init(1);
//tbb::task_scheduler_init init(1); //No longer exists. TODO: Is there another way to force TBB into single threaded mode?
//Not that it is particularly relevant right now, as the current implementation of hg::async does not use TBB
std::atomic<int> counter(0);
async([&] {
async([&] {
Expand Down
2 changes: 1 addition & 1 deletion src/hg/Util/clone_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define HG_CLONE_PTR_H
#include <boost/swap.hpp>
#include "default_clone.h"
#include <gsl/gsl_assert>
#include <gsl/assert>
namespace hg {
//It is desirable for this to be a smart reference
//(rather than a smart pointer)
Expand Down
1 change: 1 addition & 0 deletions src/hg/Util/file_util.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef HG_FILE_UTIL_H
#define HG_FILE_UTIL_H
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <sstream>
#include <vector>
namespace hg {
Expand Down
18 changes: 11 additions & 7 deletions src/hg/Util/scalable_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@ class tbb_scalable_allocator
typedef typename Alloc<T>::type tbb_alloc;
tbb_alloc alloc;
public:
typedef typename tbb_alloc::pointer pointer;
typedef typename tbb_alloc::const_pointer const_pointer;
using propagate_on_container_move_assignment = tbb_alloc::propagate_on_container_move_assignment;
typedef typename tbb_alloc::value_type *pointer;
typedef typename tbb_alloc::value_type const *const_pointer;
typedef void *void_pointer;
typedef void const *const_void_pointer;
typedef typename tbb_alloc::value_type value_type;
typedef typename tbb_alloc::size_type size_type;
typedef typename tbb_alloc::difference_type difference_type;
typedef typename std::size_t size_type;
typedef typename std::ptrdiff_t difference_type;
template<typename U> struct rebind final
{ typedef tbb_scalable_allocator<U> other; };

typedef typename tbb_alloc::reference reference;
typedef typename tbb_alloc::const_reference const_reference;
typedef typename tbb_alloc::value_type &reference;
typedef typename tbb_alloc::value_type const &const_reference;

pointer allocate(size_type n) { return alloc.allocate(n); }
void deallocate(pointer p, size_type n) { alloc.deallocate(p, n); }
size_type max_size() const { return alloc.max_size(); }
size_type max_size() const {
size_type absolutemax = static_cast<size_type>(-1) / sizeof(value_type);
return (absolutemax > 0 ? absolutemax : 1);
}

tbb_scalable_allocator() : alloc() {}
tbb_scalable_allocator(tbb_scalable_allocator const &)
Expand Down
1 change: 1 addition & 0 deletions src/hg/Util/unlock_util.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef HG_UNLOCK_UTIL_H
#define HG_UNLOCK_UTIL_H
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <string_view>
namespace hg {
inline bool IsLevelComplete(
Expand Down
2 changes: 1 addition & 1 deletion src/hg/VulkanUtilHG/VulkanDeviceHG.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "hg/GlobalConst.h"

#include <gsl/gsl_util>
#include <gsl/util>
#include <boost/throw_exception.hpp>
#include <vulkan/vulkan.h>
#include <system_error>
Expand Down
2 changes: 1 addition & 1 deletion src/hg/VulkanUtilHG/VulkanFramebufferHG.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define HG_VULKANFRAMEBUFFERHG_H

#include "hg/VulkanUtil/VulkanFramebuffer.h"
#include <gsl/gsl_util>
#include <gsl/util>
#include <vulkan/vulkan.h>
#include <array>

Expand Down
2 changes: 1 addition & 1 deletion src/hg/VulkanUtilHG/VulkanGraphicsPipelineHG.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "hg/VulkanUtil/VulkanGraphicsPipeline.h"
#include "hg/VulkanUtilHG/VulkanShaderModuleHG.h"
#include <gsl/gsl_util>
#include <gsl/util>
#include <vulkan/vulkan.h>
#include "hg/Util/Maths.h"
#include <vector>
Expand Down
4 changes: 0 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#ifdef _WIN32
#include <Windows.h>
#endif
#include <tbb/task_scheduler_init.h>



namespace hg {

Expand Down Expand Up @@ -67,7 +64,6 @@ int main_entry(int argc, char *argv[])

initialiseCurrentPath(args);
GlobalResourceHolder global_resources;
//tbb::task_scheduler_init tbb_init(1);

if (!hg::getTestDriver().passesAllTests()) {
std::cerr << "Failed self-check! Aborting." << std::endl;
Expand Down
12 changes: 6 additions & 6 deletions unitysrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(HOURGLASSII_EXT_DIR "${PROJECT_SOURCE_DIR}/ext")

set(SFML_STATIC_LIBRARIES TRUE)
find_package(
SFML 2.5.1
SFML 2.5.1 #EXACT
REQUIRED
COMPONENTS graphics audio
CONFIG
Expand All @@ -13,36 +13,36 @@ set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(
Boost 1.77.0
Boost 1.82.0 #EXACT
REQUIRED
COMPONENTS headers filesystem thread serialization
CONFIG
HINTS "${HOURGLASSII_EXT_DIR}"
)

find_package(
TBB 2020.3.0 #Latest is now oneAPI TBB 2021.3.0; Not using this yet because oneAPI TBB (v2020.1...2020.3) appears to be incompatible with C++20 mode on MSVC 2019 (v16.11.2)
TBB 2021.9.0 #EXACT
REQUIRED
CONFIG
HINTS "${HOURGLASSII_EXT_DIR}"
)

find_package(
glfw3 3.3.4
glfw3 3.3.8 #EXACT
REQUIRED
CONFIG
HINTS "${HOURGLASSII_EXT_DIR}"
)

find_package(
Microsoft.GSL 3.1.0 #Lastest is 3.1.0; but there are much more recent changes in the main branch of the git repository
Microsoft.GSL 4.0.0 #EXACT
REQUIRED
CONFIG
HINTS "${HOURGLASSII_EXT_DIR}"
)

find_package(
Vulkan
Vulkan #1.3.246 EXACT
REQUIRED
COMPONENTS glslangValidator)

Expand Down

0 comments on commit c77d41b

Please sign in to comment.