From 4feaab4baedf450669f6c37033275f53e1daceb2 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Wed, 9 Oct 2024 13:21:59 +0200 Subject: [PATCH] Oh what fun, msvc 2019 on the ci --- CMakeLists.txt | 2 +- ExampleAnalysis/CMakeLists.txt | 4 -- ExampleDependencies/CMakeLists.txt | 25 ++++++------ .../src/ExampleDependenciesPlugin.cpp | 40 +++++++++---------- .../src/ExampleDependenciesPlugin.h | 6 +-- ExampleLoader/CMakeLists.txt | 5 --- ExampleTransformation/CMakeLists.txt | 8 +--- .../src/ExampleTransformationPlugin.h | 2 +- ExampleViewJS/CMakeLists.txt | 4 -- ExampleViewOpenGL/CMakeLists.txt | 4 -- ExampleWriter/CMakeLists.txt | 4 -- conanfile.py | 2 +- 12 files changed, 41 insertions(+), 65 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a9ca20..7c2fb71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,4 +16,4 @@ add_subdirectory(ExampleTransformation) add_subdirectory(ExampleLoader) add_subdirectory(ExampleWriter) add_subdirectory(ExampleData) -add_subdirectory(ExampleDependencies) +# add_subdirectory(ExampleDependencies) diff --git a/ExampleAnalysis/CMakeLists.txt b/ExampleAnalysis/CMakeLists.txt index b55fc22..2bdd32f 100644 --- a/ExampleAnalysis/CMakeLists.txt +++ b/ExampleAnalysis/CMakeLists.txt @@ -40,10 +40,6 @@ set(PLUGIN_SOURCES src/ExampleAnalysisPlugin.json ) -set(PLUGIN_MOC_HEADERS - src/ExampleAnalysisPlugin.h -) - source_group( Plugin FILES ${PLUGIN_SOURCES}) # ----------------------------------------------------------------------------- diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 521f1c3..c1ce21a 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -21,7 +21,7 @@ if(MSVC) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) -include(cmake/get_cpm.cmake) +# include(cmake/get_cpm.cmake) # ----------------------------------------------------------------------------- # Dependencies @@ -30,20 +30,20 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED) find_package(ManiVault COMPONENTS Core PointData CONFIG) -find_package(blake3 CONFIG REQUIRED) +# find_package(blake3 CONFIG REQUIRED) if(NOT APPLE) include(cmake/ci_fixes.cmake) find_package(faiss CONFIG REQUIRED) endif() -CPMAddPackage( - NAME highway - URL https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz - URL_HASH SHA256=7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343 - PATCHES "cmake/highway.patch" # see https://github.com/conan-io/conan-center-index/pull/24197/files, fixes https://github.com/google/highway/issues/2225 - OPTIONS "HWY_ENABLE_EXAMPLES OFF" "HWY_ENABLE_INSTALL OFF" "HWY_ENABLE_TESTS OFF" "HWY_ENABLE_CONTRIB ON" "BUILD_SHARED_LIBS ON" -) +# CPMAddPackage( + # NAME highway + # URL https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz + # URL_HASH SHA256=7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343 + # PATCHES "cmake/highway.patch" # see https://github.com/conan-io/conan-center-index/pull/24197/files, fixes https://github.com/google/highway/issues/2225 + # OPTIONS "HWY_ENABLE_EXAMPLES OFF" "HWY_ENABLE_INSTALL OFF" "HWY_ENABLE_TESTS OFF" "HWY_ENABLE_CONTRIB ON" "BUILD_SHARED_LIBS ON" +# ) # ----------------------------------------------------------------------------- # Source files @@ -93,8 +93,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::WebEngineWidgets) target_link_libraries(${PROJECT_NAME} PRIVATE ManiVault::Core) target_link_libraries(${PROJECT_NAME} PRIVATE ManiVault::PointData) -target_link_libraries(${PROJECT_NAME} PRIVATE BLAKE3::blake3) -target_link_libraries(${PROJECT_NAME} PRIVATE hwy hwy_contrib) +# target_link_libraries(${PROJECT_NAME} PRIVATE BLAKE3::blake3) +# target_link_libraries(${PROJECT_NAME} PRIVATE hwy hwy_contrib) if(NOT APPLE) target_link_libraries(${PROJECT_NAME} PRIVATE faiss) @@ -124,7 +124,8 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD ) # Automatically available when using find_package(ManiVault) -mv_install_dependencies(${PROJECT_NAME} "hwy" "hwy_contrib") +#mv_install_dependencies(${PROJECT_NAME} "hwy" "hwy_contrib") +mv_install_dependencies(${PROJECT_NAME}) # ----------------------------------------------------------------------------- # Miscellaneous diff --git a/ExampleDependencies/src/ExampleDependenciesPlugin.cpp b/ExampleDependencies/src/ExampleDependenciesPlugin.cpp index 1a8078e..8c8483a 100644 --- a/ExampleDependencies/src/ExampleDependenciesPlugin.cpp +++ b/ExampleDependencies/src/ExampleDependenciesPlugin.cpp @@ -9,10 +9,10 @@ #include #include -#include -#include - -#include +//#include +//#include +// +//#include #if !defined(__APPLE__) #include @@ -53,9 +53,9 @@ void ExampleDependenciesPlugin::init() void ExampleDependenciesPlugin::compute() { - std::cout << "ExampleDependenciesPlugin: Startin..." << std::endl; + std::cout << "ExampleDependenciesPlugin: Starting..." << std::endl; - std::cout << "ExampleDependenciesPlugin: Using blake version: " << blake3_version() << std::endl; + //std::cout << "ExampleDependenciesPlugin: Using blake version: " << blake3_version() << std::endl; auto printData = [](const std::vector& vec, size_t dims, size_t points) { for (size_t dim = 0; dim < dims; dim++) @@ -81,11 +81,11 @@ void ExampleDependenciesPlugin::compute() std::cout << "ExampleDependenciesPlugin: Data before sorting" << std::endl; printData(data, numDims, numPoints); - for (size_t dim = 0; dim < numDims; dim++) - { - size_t offset = numPoints * dim; - hwy::VQSort(data.data() + offset, numPoints, hwy::SortAscending{}); - } + //for (size_t dim = 0; dim < numDims; dim++) + //{ + // size_t offset = numPoints * dim; + // hwy::VQSort(data.data() + offset, numPoints, hwy::SortAscending{}); + //} std::cout << "ExampleDependenciesPlugin: Data after sorting" << std::endl; printData(data, numDims, numPoints); @@ -96,19 +96,19 @@ void ExampleDependenciesPlugin::compute() events().notifyDatasetDataChanged(outputPoints); // Create hash - blake3_hasher hasher; - blake3_hasher_init(&hasher); + //blake3_hasher hasher; + //blake3_hasher_init(&hasher); - blake3_hasher_update(&hasher, data.data(), data.size()); + //blake3_hasher_update(&hasher, data.data(), data.size()); - uint8_t output[BLAKE3_OUT_LEN]; - blake3_hasher_finalize(&hasher, output, BLAKE3_OUT_LEN); + //uint8_t output[BLAKE3_OUT_LEN]; + //blake3_hasher_finalize(&hasher, output, BLAKE3_OUT_LEN); // Print the hash as hexadecimal - for (size_t i = 0; i < BLAKE3_OUT_LEN; i++) { - printf("%02x", output[i]); - } - printf("\n"); + //for (size_t i = 0; i < BLAKE3_OUT_LEN; i++) { + // printf("%02x", output[i]); + //} + //printf("\n"); #if !defined(__APPLE__) // find knn diff --git a/ExampleDependencies/src/ExampleDependenciesPlugin.h b/ExampleDependencies/src/ExampleDependenciesPlugin.h index acb72e0..161b76d 100644 --- a/ExampleDependencies/src/ExampleDependenciesPlugin.h +++ b/ExampleDependencies/src/ExampleDependenciesPlugin.h @@ -52,12 +52,12 @@ class ExampleDependenciesPluginFactory : public AnalysisPluginFactory /** Destructor */ ~ExampleDependenciesPluginFactory() override {} - /** Creates an instance of the example analysis plugin */ + /** Creates an instance of the example dependencies plugin */ AnalysisPlugin* produce() override; - /** Returns the data types that are supported by the example analysis plugin */ + /** Returns the data types that are supported by the example dependencies plugin */ mv::DataTypes supportedDataTypes() const override; - /** Enable right-click on data set to open analysis */ + /** Enable right-click on data set to open dependencies */ PluginTriggerActions getPluginTriggerActions(const mv::Datasets& datasets) const override; }; diff --git a/ExampleLoader/CMakeLists.txt b/ExampleLoader/CMakeLists.txt index bf58994..470e540 100644 --- a/ExampleLoader/CMakeLists.txt +++ b/ExampleLoader/CMakeLists.txt @@ -38,10 +38,6 @@ set(PLUGIN_SOURCES src/ExampleLoaderPlugin.json ) -set(PLUGIN_MOC_HEADERS - src/ExampleLoaderPlugin.h -) - source_group( Plugin FILES ${PLUGIN_SOURCES}) # ----------------------------------------------------------------------------- @@ -98,7 +94,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # Miscellaneous # ----------------------------------------------------------------------------- # Automatically set the debug environment (command + working directory) for MSVC -# Automatically set the debug environment (command + working directory) for MSVC if(MSVC) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/debug,${ManiVault_INSTALL_DIR}/release>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,${ManiVault_INSTALL_DIR}/debug/ManiVault\ Studio.exe,${ManiVault_INSTALL_DIR}/release/ManiVault\ Studio.exe>) diff --git a/ExampleTransformation/CMakeLists.txt b/ExampleTransformation/CMakeLists.txt index e7c6540..0d83985 100644 --- a/ExampleTransformation/CMakeLists.txt +++ b/ExampleTransformation/CMakeLists.txt @@ -38,10 +38,6 @@ set(PLUGIN_SOURCES src/ExampleTransformationPlugin.json ) -set(PLUGIN_MOC_HEADERS - src/ExampleTransformationPlugin.h -) - source_group( Plugin FILES ${PLUGIN_SOURCES}) # ----------------------------------------------------------------------------- @@ -99,6 +95,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # Automatically set the debug environment (command + working directory) for MSVC if(MSVC) - set_property(TARGET ${EXAMPLETRANSFORMATION} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/debug,${ManiVault_INSTALL_DIR}/release>) - set_property(TARGET ${EXAMPLETRANSFORMATION} PROPERTY VS_DEBUGGER_COMMAND $,${ManiVault_INSTALL_DIR}/debug/ManiVault\ Studio.exe,${ManiVault_INSTALL_DIR}/release/ManiVault\ Studio.exe>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/debug,${ManiVault_INSTALL_DIR}/release>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,${ManiVault_INSTALL_DIR}/debug/ManiVault\ Studio.exe,${ManiVault_INSTALL_DIR}/release/ManiVault\ Studio.exe>) endif() diff --git a/ExampleTransformation/src/ExampleTransformationPlugin.h b/ExampleTransformation/src/ExampleTransformationPlugin.h index a8408ad..79f5d31 100644 --- a/ExampleTransformation/src/ExampleTransformationPlugin.h +++ b/ExampleTransformation/src/ExampleTransformationPlugin.h @@ -33,7 +33,7 @@ Q_OBJECT /** Define the transformation options */ enum class Type { - Abs, /** abosulte value */ + Abs, /** absolute value */ Pow2 /** value squared */ }; diff --git a/ExampleViewJS/CMakeLists.txt b/ExampleViewJS/CMakeLists.txt index d874056..d1a3001 100644 --- a/ExampleViewJS/CMakeLists.txt +++ b/ExampleViewJS/CMakeLists.txt @@ -40,10 +40,6 @@ set(PLUGIN_SOURCES src/ExampleViewJSPlugin.json ) -set(PLUGIN_MOC_HEADERS - src/ExampleViewJSPlugin.h -) - set(WEB res/example_chart/radar_chart.html res/example_chart/radar_chart.tools.js diff --git a/ExampleViewOpenGL/CMakeLists.txt b/ExampleViewOpenGL/CMakeLists.txt index 1ab45a4..aeb82f8 100644 --- a/ExampleViewOpenGL/CMakeLists.txt +++ b/ExampleViewOpenGL/CMakeLists.txt @@ -38,10 +38,6 @@ set(PLUGIN_SOURCES src/ExampleViewGLPlugin.json ) -set(PLUGIN_MOC_HEADERS - src/ExampleViewGLPlugin.h -) - set(PLUGIN_WIDGETS src/ExampleGLWidget.h src/ExampleGLWidget.cpp diff --git a/ExampleWriter/CMakeLists.txt b/ExampleWriter/CMakeLists.txt index 6063eb5..f0a18a3 100644 --- a/ExampleWriter/CMakeLists.txt +++ b/ExampleWriter/CMakeLists.txt @@ -38,10 +38,6 @@ set(PLUGIN_SOURCES src/ExampleWriterPlugin.json ) -set(PLUGIN_MOC_HEADERS - src/ExampleWriterPlugin.h -) - source_group( Plugin FILES ${PLUGIN_SOURCES}) # ----------------------------------------------------------------------------- diff --git a/conanfile.py b/conanfile.py index c611997..87bcbeb 100644 --- a/conanfile.py +++ b/conanfile.py @@ -105,7 +105,7 @@ def generate(self): print("ManiVault_DIR: ", self.manivault_dir) # Set some build options - tc.variables["MV_UNITY_BUILD"] = "ON" + #tc.variables["MV_UNITY_BUILD"] = "ON" # Install vcpkg dependencies if os.environ.get("VCPKG_ROOT", None):