Skip to content
Snippets Groups Projects
Verified Commit 17a83d04 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Add branching for unordered container types

parent acf323cd
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,11 @@ if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSI
list(APPEND vkcv_definitions __NO_SEMAPHORES__)
endif()
if (((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "4.0.0")) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.0.0")))
list(APPEND vkcv_definitions VKCV_UNORDERED_CONTAINER)
endif()
# configure everything to use the required dependencies
include(${vkcv_config}/Libraries.cmake)
......
......@@ -6,18 +6,36 @@
*/
#include <vector>
#ifdef VKCV_UNORDERED_CONTAINER
#include <unordered_map>
#include <unordered_set>
#else
#include <map>
#include <set>
#endif
namespace vkcv {
template<typename K, typename V>
using Dictionary = std::unordered_map<K, V>;
template<typename T>
using Vector = std::vector<T>;
#ifdef VKCV_UNORDERED_CONTAINER
template<typename K, typename V>
using Dictionary = std::unordered_map<K, V>;
template<typename T>
using Set = std::unordered_set<T>;
#else
template<typename K, typename V>
using Dictionary = std::map<K, V>;
template<typename T>
using Set = std::set<T>;
#endif
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment