We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de2bd87 commit f735cf4Copy full SHA for f735cf4
CMakeLists.txt
@@ -15,7 +15,7 @@ list(
15
)
16
17
# Specify C++ standard for all targets
18
-set( CMAKE_CXX_STANDARD 17 )
+set( CMAKE_CXX_STANDARD 20 )
19
set( CMAKE_CXX_STANDARD_REQUIRED ON )
20
set( CMAKE_CXX_EXTENSIONS OFF )
21
@@ -55,11 +55,15 @@ endif()
55
include( FetchContent )
56
FetchContent_Declare(
57
libtokamap
58
- GIT_REPOSITORY git@github.com:jholloc/libtokamap.git
59
- GIT_TAG main
+ GIT_REPOSITORY https://github.com/ukaea/libtokamap.git
+ GIT_TAG develop
60
+ CMAKE_ARGS -DENABLE_TESTS=OFF
61
62
63
FetchContent_MakeAvailable( libtokamap )
64
65
+
66
find_package( UDA REQUIRED )
67
add_subdirectory( mapping_plugin )
68
+# add_subdirectory( geometry_map_plugin )
69
+# add_subdirectory( CUSTOM_MASTU_plugin )
mapping_plugin/CMakeLists.txt
@@ -8,11 +8,6 @@
8
find_package( UDA 2.7.0 REQUIRED )
9
find_package( Boost REQUIRED )
10
11
-# Specify C++ standard for all targets
12
13
-set( CMAKE_CXX_STANDARD_REQUIRED ON )
14
-set( CMAKE_CXX_EXTENSIONS OFF )
-
set( SOURCES
src/uda_data_source.cpp
src/uda_ram_cache.cpp
@@ -34,6 +29,7 @@ target_include_directories( libtokamap_uda_extension PRIVATE
34
29
${CMAKE_SOURCE_DIR}/libtokamap/src
35
30
36
31
target_link_libraries( libtokamap_uda_extension PRIVATE Boost::boost LibTokaMap::libtokamap )
32
+target_compile_features(libtokamap_uda_extension PUBLIC cxx_std_17)
37
33
38
39
mapping_plugin/config/libtokamap_config.json.in
@@ -1,8 +1,6 @@
1
{
2
"mapping_directory": "@CMAKE_INSTALL_PREFIX@/etc/JSON_mappings",
3
- "globals_schema": "@CMAKE_BINARY_DIR@/_deps/libtokamap-src/schemas/mappings.schema.json",
4
- "mapping_schema": "@CMAKE_BINARY_DIR@/_deps/libtokamap-src/schemas/globals.schema.json",
5
- "mapping_config_schema": "@CMAKE_BINARY_DIR@/_deps/libtokamap-src/schemas/mappings.cfg.schema.json",
+ "schemas_directory": "@CMAKE_BINARY_DIR@/_deps/libtokamap-src/schemas",
6
"cache_enabled": false,
7
"cache_size": 100
}
mapping_plugin/mapping_plugin.cpp
@@ -247,6 +247,8 @@ int JSONMappingPlugin::get(IDAM_PLUGIN_INTERFACE* plugin_interface)
247
case UDA_TYPE_STRING:
248
type_index = std::type_index{typeid(char)};
249
break;
250
+ case UDA_TYPE_UNSIGNED_LONG64:
251
+ type_index = std::type_index{typeid(uint64_t)};
252
default:
253
254
mapping_plugin/src/uda_data_source.cpp
@@ -27,8 +27,9 @@
27
28
#include "map_types/data_source_mapping.hpp"
#include "map_types/map_arguments.hpp"
-#include "uda_ram_cache.hpp"
-#include "utils/ram_cache.hpp"
+// #include "uda_ram_cache.hpp"
+// #include "utils/ram_cache.hpp"
+#include "utils/typed_data_array.hpp"
// TODO:
// - handle compressed dims
mapping_plugin/src/uda_plugin_helpers.cpp
@@ -19,6 +19,7 @@ std::unordered_map<std::string, UDA_TYPE> json_plugin::uda_type_map()
static std::unordered_map<std::string, UDA_TYPE> type_map;
if (type_map.empty()) {
type_map = {{typeid(unsigned int).name(), UDA_TYPE_UNSIGNED_INT},
22
+ {typeid(uint64_t).name(), UDA_TYPE_UNSIGNED_LONG64},
23
{typeid(int).name(), UDA_TYPE_INT},
24
{typeid(float).name(), UDA_TYPE_FLOAT},
25
{typeid(double).name(), UDA_TYPE_DOUBLE},
@@ -33,6 +34,7 @@ std::unordered_map<std::type_index, UDA_TYPE> json_plugin::uda_type_index_map()
static std::unordered_map<std::type_index, UDA_TYPE> type_map;
type_map = {{std::type_index{ typeid(unsigned int) }, UDA_TYPE_UNSIGNED_INT},
+ {std::type_index{ typeid(uint64_t) }, UDA_TYPE_UNSIGNED_LONG64},
{std::type_index{ typeid(int) }, UDA_TYPE_INT},
{std::type_index{ typeid(float) }, UDA_TYPE_FLOAT},
40
{std::type_index{ typeid(double) }, UDA_TYPE_DOUBLE},
mapping_plugin/src/uda_plugin_helpers.hpp
@@ -8,7 +8,7 @@
#include <clientserver/udaStructs.h>
#include <clientserver/udaTypes.h>
-#include "map_types/map_arguments.hpp"
namespace json_plugin
mapping_plugin/test/CMakeLists.txt
@@ -6,10 +6,6 @@
# LANGUAGES CXX
# )
set( TEST_SOURCES
@@ -26,6 +22,7 @@ FetchContent_MakeAvailable( Catch2 )
26
# Create test executable
add_executable( mapping_plugin_tests ${TEST_SOURCES} )
+target_compile_features(mapping_plugin_tests PUBLIC cxx_std_17)
# INCLUDE
target_include_directories( mapping_plugin_tests PRIVATE
0 commit comments