From 5d3a57f60c4c2a3546e14ffb96b3317dbfc2c1ba Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 14:40:57 +0100 Subject: [PATCH 01/28] Update cmake --- CMakeLists.txt | 2 +- ExampleAnalysis/CMakeLists.txt | 13 ++++++------- ExampleData/CMakeLists.txt | 13 ++++++------- ExampleDependencies/CMakeLists.txt | 11 +++++------ ExampleDependencies/cmake/get_cpm.cmake | 6 +++--- ExampleLoader/CMakeLists.txt | 13 ++++++------- ExampleTransformation/CMakeLists.txt | 13 ++++++------- ExampleView/CMakeLists.txt | 13 ++++++------- ExampleViewJS/CMakeLists.txt | 13 ++++++------- ExampleViewOpenGL/CMakeLists.txt | 13 ++++++------- ExampleWriter/CMakeLists.txt | 13 ++++++------- 11 files changed, 57 insertions(+), 66 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0bc47c..156f840 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) if(NOT DEFINED MV_EXAMPLES_USE_VCPKG) set(MV_EXAMPLES_USE_VCPKG OFF) diff --git a/ExampleAnalysis/CMakeLists.txt b/ExampleAnalysis/CMakeLists.txt index 8fb697b..9cd9fdd 100644 --- a/ExampleAnalysis/CMakeLists.txt +++ b/ExampleAnalysis/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -64,8 +63,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE Common) # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -104,6 +103,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleData/CMakeLists.txt b/ExampleData/CMakeLists.txt index b3ca337..4d23660 100644 --- a/ExampleData/CMakeLists.txt +++ b/ExampleData/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # Include cmake tools @@ -78,8 +77,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${PLUGIN_HEADERS}") @@ -125,6 +124,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index b2828e0..380f0c7 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) include(cmake/get_cpm.cmake) @@ -82,8 +81,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -149,6 +148,6 @@ mv_install_dependencies(${PROJECT_NAME} "hwy" "hwy_contrib") # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleDependencies/cmake/get_cpm.cmake b/ExampleDependencies/cmake/get_cpm.cmake index baf2d8c..8465975 100644 --- a/ExampleDependencies/cmake/get_cpm.cmake +++ b/ExampleDependencies/cmake/get_cpm.cmake @@ -2,8 +2,8 @@ # # SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors -set(CPM_DOWNLOAD_VERSION 0.40.2) -set(CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d") +set(CPM_DOWNLOAD_VERSION 0.40.4) +set(CPM_HASH_SUM "67dcc1deb6e12a2f0705647ccc5f7023e3d15746b944e14352b82373e09b8a0a") if(CPM_SOURCE_CACHE) set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") @@ -21,4 +21,4 @@ file(DOWNLOAD ${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM} ) -include(${CPM_DOWNLOAD_LOCATION}) +include(${CPM_DOWNLOAD_LOCATION}) \ No newline at end of file diff --git a/ExampleLoader/CMakeLists.txt b/ExampleLoader/CMakeLists.txt index 569e0cd..1997a23 100644 --- a/ExampleLoader/CMakeLists.txt +++ b/ExampleLoader/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -61,8 +60,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -101,6 +100,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleTransformation/CMakeLists.txt b/ExampleTransformation/CMakeLists.txt index 3501bd0..937c138 100644 --- a/ExampleTransformation/CMakeLists.txt +++ b/ExampleTransformation/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -61,8 +60,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -101,6 +100,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleView/CMakeLists.txt b/ExampleView/CMakeLists.txt index 693e433..64fa713 100644 --- a/ExampleView/CMakeLists.txt +++ b/ExampleView/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -65,8 +64,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -105,6 +104,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleViewJS/CMakeLists.txt b/ExampleViewJS/CMakeLists.txt index 61f206d..41f1123 100644 --- a/ExampleViewJS/CMakeLists.txt +++ b/ExampleViewJS/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -80,8 +79,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -120,6 +119,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleViewOpenGL/CMakeLists.txt b/ExampleViewOpenGL/CMakeLists.txt index e42f0d0..3847397 100644 --- a/ExampleViewOpenGL/CMakeLists.txt +++ b/ExampleViewOpenGL/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -75,8 +74,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -117,6 +116,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleWriter/CMakeLists.txt b/ExampleWriter/CMakeLists.txt index dcbf1ae..2742e7b 100644 --- a/ExampleWriter/CMakeLists.txt +++ b/ExampleWriter/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -17,8 +17,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -61,8 +60,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -# Request C++17 -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +# Request C++20 +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) # Enable unity build if(MV_UNITY_BUILD) @@ -101,6 +100,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,"${ManiVault_INSTALL_DIR}/Debug",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() From 9f7d149241a4b42a04ceec8c1e8641d39011f20b Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 14:41:14 +0100 Subject: [PATCH 02/28] Remove mac input var in CI --- .github/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2860243..20f6968 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,16 +4,10 @@ on: push: pull_request: workflow_dispatch: - inputs: - forceMacBuild: - description: 'If set true override the ENABLE_MACOS_BUILD to force a build' - type: boolean - default: false env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release - MACENABLED: ${{ inputs.forceMacBuild }} USERNAME: ManiVaultStudio FEED_URL: https://nuget.pkg.github.com/ManiVaultStudio/index.json VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/ManiVaultStudio/index.json,readwrite" @@ -186,7 +180,7 @@ jobs: conan-cxx: g++-${{matrix.build-cversion}} - name: Mac build - if: startsWith(matrix.os, 'macos') && (env.MACENABLED == 'true' || vars.ENABLE_MACOS_BUILD == 'True') + if: startsWith(matrix.os, 'macos') uses: ManiVaultStudio/github-actions/conan_linuxmac_build@main with: conan-compiler: ${{matrix.build-compiler}} From d4ed36acf994acfd41bd30873c7aa2ff0a3f67a4 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 14:45:59 +0100 Subject: [PATCH 03/28] Update CI (relwithdebinfo) --- conanfile.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/conanfile.py b/conanfile.py index 11eb259..f8a85c4 100644 --- a/conanfile.py +++ b/conanfile.py @@ -10,7 +10,7 @@ class ExamplePluginsConan(ConanFile): """Class to package ExamplePlugins using conan - Packages both RELEASE and DEBUG. + Packages both RELEASE and RELWITHDEBINFO. Uses rules_support (github.com/ManiVaultStudio/rulessupport) to derive versioninfo based on the branch naming convention as described in https://github.com/ManiVaultStudio/core/wiki/Branch-naming-rules @@ -18,7 +18,7 @@ class ExamplePluginsConan(ConanFile): name = "ExamplePlugins" description = ( - "A collection of examples including analys, data, loader and view plugins." + "A collection of examples including analysis, data, loader and view plugins." ) topics = ("hdps", "plugin", "examples", "various") url = "https://github.com/ManiVaultStudio/ExamplePlugins" @@ -92,13 +92,12 @@ def generate(self): qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath) qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0] qt_dir = qt_cfg.parents[0].as_posix() - qt_root = qt_cfg.parents[3].as_posix() + #qt_root = qt_cfg.parents[2].as_posix() - # for Qt >= 6.4.2 - #tc.variables["Qt6_DIR"] = qt_dir + tc.variables["Qt6_DIR"] = qt_dir # for Qt < 6.4.2 - tc.variables["Qt6_ROOT"] = qt_root + #tc.variables["Qt6_ROOT"] = qt_root # Use the ManiVault .cmake file to find ManiVault with find_package mv_core_root = self.deps_cpp_info["hdps-core"].rootpath @@ -145,12 +144,12 @@ def build(self): print("Build OS is: ", self.settings.os) cmake = self._configure_cmake() - cmake.build(build_type="Debug") + cmake.build(build_type="RelWithDebInfo") cmake.build(build_type="Release") def package(self): package_dir = pathlib.Path(self.build_folder, "package") - debug_dir = package_dir / "Debug" + relWithDebInfo_dir = package_dir / "RelWithDebInfo" release_dir = package_dir / "Release" print("Packaging install dir: ", package_dir) subprocess.run( @@ -159,9 +158,9 @@ def package(self): "--install", self.build_folder, "--config", - "Debug", + "RelWithDebInfo", "--prefix", - debug_dir, + relWithDebInfo_dir, ] ) subprocess.run( @@ -178,9 +177,9 @@ def package(self): self.copy(pattern="*", src=package_dir) def package_info(self): - self.cpp_info.debug.libdirs = ["Debug/lib"] - self.cpp_info.debug.bindirs = ["Debug/Plugins", "Debug"] - self.cpp_info.debug.includedirs = ["Debug/include", "Debug"] + self.cpp_info.relwithdebinfo.libdirs = ["RelWithDebInfo/lib"] + self.cpp_info.relwithdebinfo.bindirs = ["RelWithDebInfo/Plugins", "RelWithDebInfo"] + self.cpp_info.relwithdebinfo.includedirs = ["RelWithDebInfo/include", "RelWithDebInfo"] self.cpp_info.release.libdirs = ["Release/lib"] self.cpp_info.release.bindirs = ["Release/Plugins", "Release"] self.cpp_info.release.includedirs = ["Release/include", "Release"] From 6b60ac0ef98d50a357797490c9f75b9b645a5c28 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 14:46:44 +0100 Subject: [PATCH 04/28] Fix path --- ExampleAnalysis/CMakeLists.txt | 2 +- ExampleData/CMakeLists.txt | 2 +- ExampleDependencies/CMakeLists.txt | 2 +- ExampleLoader/CMakeLists.txt | 2 +- ExampleTransformation/CMakeLists.txt | 2 +- ExampleView/CMakeLists.txt | 2 +- ExampleViewJS/CMakeLists.txt | 2 +- ExampleViewOpenGL/CMakeLists.txt | 2 +- ExampleWriter/CMakeLists.txt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ExampleAnalysis/CMakeLists.txt b/ExampleAnalysis/CMakeLists.txt index 9cd9fdd..604471b 100644 --- a/ExampleAnalysis/CMakeLists.txt +++ b/ExampleAnalysis/CMakeLists.txt @@ -103,6 +103,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleData/CMakeLists.txt b/ExampleData/CMakeLists.txt index 4d23660..fda7aa5 100644 --- a/ExampleData/CMakeLists.txt +++ b/ExampleData/CMakeLists.txt @@ -124,6 +124,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 380f0c7..d3afe73 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -148,6 +148,6 @@ mv_install_dependencies(${PROJECT_NAME} "hwy" "hwy_contrib") # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleLoader/CMakeLists.txt b/ExampleLoader/CMakeLists.txt index 1997a23..d0d2f6c 100644 --- a/ExampleLoader/CMakeLists.txt +++ b/ExampleLoader/CMakeLists.txt @@ -100,6 +100,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleTransformation/CMakeLists.txt b/ExampleTransformation/CMakeLists.txt index 937c138..c75c4b0 100644 --- a/ExampleTransformation/CMakeLists.txt +++ b/ExampleTransformation/CMakeLists.txt @@ -100,6 +100,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleView/CMakeLists.txt b/ExampleView/CMakeLists.txt index 64fa713..1ee9038 100644 --- a/ExampleView/CMakeLists.txt +++ b/ExampleView/CMakeLists.txt @@ -104,6 +104,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleViewJS/CMakeLists.txt b/ExampleViewJS/CMakeLists.txt index 41f1123..01f11f7 100644 --- a/ExampleViewJS/CMakeLists.txt +++ b/ExampleViewJS/CMakeLists.txt @@ -119,6 +119,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleViewOpenGL/CMakeLists.txt b/ExampleViewOpenGL/CMakeLists.txt index 3847397..7cb66d9 100644 --- a/ExampleViewOpenGL/CMakeLists.txt +++ b/ExampleViewOpenGL/CMakeLists.txt @@ -116,6 +116,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/ExampleWriter/CMakeLists.txt b/ExampleWriter/CMakeLists.txt index 2742e7b..55ea6e9 100644 --- a/ExampleWriter/CMakeLists.txt +++ b/ExampleWriter/CMakeLists.txt @@ -100,6 +100,6 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # ----------------------------------------------------------------------------- # 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}/RelWithDebInfo","${ManiVault_INSTALL_DIR}/Release">>) + set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() From 64aa139ed05197d3dbb9adbff2ae96ed1ff6388f Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 14:52:08 +0100 Subject: [PATCH 05/28] Update vcpkg setup --- .github/workflows/build.yml | 17 +++++++++++++++-- vcpkg.json | 6 +++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20f6968..369d4e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: - name: Clone vcpkg run: | cd ${{ github.workspace }} - git clone --branch 2024.08.23 --single-branch https://github.com/microsoft/vcpkg.git + git clone --branch 2025.02.14 --single-branch https://github.com/microsoft/vcpkg.git # Bootstrap vcpkg - name: Bootstrap vcpkg @@ -98,7 +98,20 @@ jobs: echo "VCPKG_EXE=${{ github.workspace }}/vcpkg/vcpkg" >> $GITHUB_ENV echo "VCPKG_LIBRARY_LINKAGE=dynamic" >> $GITHUB_ENV - # Use cached vcpkg packges if possible + - name: NuGet dependencies (Linux) + if: startsWith(matrix.os, 'ubuntu') + shell: bash + run: | + sudo apt update && sudo apt install -y mono-complete + + - name: NuGet dependencies (MacOS) + if: startsWith(matrix.os, 'macos') + shell: bash + run: | + brew update + brew install mono + + # Use cached vcpkg packages if possible - name: Add NuGet sources if: startsWith(matrix.os, 'windows') shell: pwsh diff --git a/vcpkg.json b/vcpkg.json index bb9ec28..7b3fe05 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -8,9 +8,9 @@ "platform": "!osx" } ], - "builtin-baseline":"73964f854d0d6424f335e9515b61b3a2dad5e15b", + "builtin-baseline":"d5ec528843d29e3a52d745a64b469f810b2cedbf", "overrides": [ - { "name": "blake3", "version": "1.5.1" }, - { "name": "faiss", "version": "1.7.4" } + { "name": "blake3", "version": "1.5.4" }, + { "name": "faiss", "version": "1.8.0" } ] } \ No newline at end of file From faa80c1f1f44c8be8027c28191806ea0b720f649 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 14:59:32 +0100 Subject: [PATCH 06/28] Add build arch --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 369d4e2..33fe6a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -186,6 +186,7 @@ jobs: conan-libcxx-version: ${{matrix.build-libcxx}} conan-build-type: ${{matrix.build-config}} conan-build-os: ${{matrix.build-os}} + build-arch: ${{matrix.build-arch}} conan-user: ${{secrets.LKEB_UPLOAD_USER}} conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}} conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}} @@ -201,6 +202,7 @@ jobs: conan-libcxx-version: ${{matrix.build-libcxx}} conan-build-type: ${{matrix.build-config}} conan-build-os: ${{matrix.build-os}} + build-arch: ${{matrix.build-arch}} conan-user: ${{secrets.LKEB_UPLOAD_USER}} conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}} conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}} From 8099ae08b2daefac09ab1a10af821a2b35edadcd Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 15:32:57 +0100 Subject: [PATCH 07/28] brew upgrade --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33fe6a3..4fbab07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,7 +108,7 @@ jobs: if: startsWith(matrix.os, 'macos') shell: bash run: | - brew update + brew update && brew upgrade brew install mono # Use cached vcpkg packages if possible From b22356640547fd64941305a17fa5952a5b2c0e97 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 15:33:08 +0100 Subject: [PATCH 08/28] Fix spelling --- Common/CMakeLists.txt | 4 ++-- Common/common.cpp | 2 +- ExampleAnalysis/src/ExampleAnalysisPlugin.cpp | 2 +- ExampleData/src/ExampleDataPlugin.cpp | 2 +- ExampleDependencies/src/ExampleDependenciesPlugin.cpp | 2 +- ExampleLoader/src/ExampleLoaderPlugin.cpp | 2 +- ExampleTransformation/src/ExampleTransformationPlugin.cpp | 2 +- ExampleView/src/ExampleViewPlugin.cpp | 2 +- ExampleViewJS/src/ExampleViewJSPlugin.cpp | 2 +- ExampleViewOpenGL/src/ExampleViewGLPlugin.cpp | 2 +- ExampleWriter/src/ExampleWriterPlugin.cpp | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Common/CMakeLists.txt b/Common/CMakeLists.txt index 36abc53..960a680 100644 --- a/Common/CMakeLists.txt +++ b/Common/CMakeLists.txt @@ -1,12 +1,12 @@ set(DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(COMMON_HEADERS - ${DIR}/Common.h + ${DIR}/common.h PARENT_SCOPE ) set(COMMON_SOURCES - ${DIR}/Common.cpp + ${DIR}/common.cpp PARENT_SCOPE ) diff --git a/Common/common.cpp b/Common/common.cpp index e1fa704..ba7a549 100644 --- a/Common/common.cpp +++ b/Common/common.cpp @@ -1,4 +1,4 @@ -#include "Common.h" +#include "common.h" QString getExampleNotificationMessage() { diff --git a/ExampleAnalysis/src/ExampleAnalysisPlugin.cpp b/ExampleAnalysis/src/ExampleAnalysisPlugin.cpp index 6180b5f..2019484 100644 --- a/ExampleAnalysis/src/ExampleAnalysisPlugin.cpp +++ b/ExampleAnalysis/src/ExampleAnalysisPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleAnalysisPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include "PointData/PointData.h" diff --git a/ExampleData/src/ExampleDataPlugin.cpp b/ExampleData/src/ExampleDataPlugin.cpp index 81c96ee..da0b3ea 100644 --- a/ExampleData/src/ExampleDataPlugin.cpp +++ b/ExampleData/src/ExampleDataPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleDataPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include "Application.h" diff --git a/ExampleDependencies/src/ExampleDependenciesPlugin.cpp b/ExampleDependencies/src/ExampleDependenciesPlugin.cpp index a2fec98..423a401 100644 --- a/ExampleDependencies/src/ExampleDependenciesPlugin.cpp +++ b/ExampleDependencies/src/ExampleDependenciesPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleDependenciesPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include diff --git a/ExampleLoader/src/ExampleLoaderPlugin.cpp b/ExampleLoader/src/ExampleLoaderPlugin.cpp index 0ef67be..1d30b6a 100644 --- a/ExampleLoader/src/ExampleLoaderPlugin.cpp +++ b/ExampleLoader/src/ExampleLoaderPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleLoaderPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include "PointData/PointData.h" #include "Set.h" diff --git a/ExampleTransformation/src/ExampleTransformationPlugin.cpp b/ExampleTransformation/src/ExampleTransformationPlugin.cpp index 5c01d5c..7cb91cd 100644 --- a/ExampleTransformation/src/ExampleTransformationPlugin.cpp +++ b/ExampleTransformation/src/ExampleTransformationPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleTransformationPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include diff --git a/ExampleView/src/ExampleViewPlugin.cpp b/ExampleView/src/ExampleViewPlugin.cpp index c6f3c63..486ad85 100644 --- a/ExampleView/src/ExampleViewPlugin.cpp +++ b/ExampleView/src/ExampleViewPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleViewPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include diff --git a/ExampleViewJS/src/ExampleViewJSPlugin.cpp b/ExampleViewJS/src/ExampleViewJSPlugin.cpp index 115d87b..32f8de3 100644 --- a/ExampleViewJS/src/ExampleViewJSPlugin.cpp +++ b/ExampleViewJS/src/ExampleViewJSPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleViewJSPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include "ChartWidget.h" diff --git a/ExampleViewOpenGL/src/ExampleViewGLPlugin.cpp b/ExampleViewOpenGL/src/ExampleViewGLPlugin.cpp index cfd8874..38dabf7 100644 --- a/ExampleViewOpenGL/src/ExampleViewGLPlugin.cpp +++ b/ExampleViewOpenGL/src/ExampleViewGLPlugin.cpp @@ -1,7 +1,7 @@ #include "ExampleViewGLPlugin.h" #include "ExampleGLWidget.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include "GlobalSettingsAction.h" diff --git a/ExampleWriter/src/ExampleWriterPlugin.cpp b/ExampleWriter/src/ExampleWriterPlugin.cpp index 070fc70..1fa52b2 100644 --- a/ExampleWriter/src/ExampleWriterPlugin.cpp +++ b/ExampleWriter/src/ExampleWriterPlugin.cpp @@ -1,6 +1,6 @@ #include "ExampleWriterPlugin.h" -#include "../Common/Common.h" +#include "../Common/common.h" #include "PointData/PointData.h" From 6163b5cc4246bc64ecc7b0c2a2b5048568e9c1a9 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 15:41:51 +0100 Subject: [PATCH 09/28] Maybe not do this on 13 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4fbab07..7457612 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,7 +105,7 @@ jobs: sudo apt update && sudo apt install -y mono-complete - name: NuGet dependencies (MacOS) - if: startsWith(matrix.os, 'macos') + if: startsWith(matrix.os, 'macos') && !endsWith(matrix.os, '13') shell: bash run: | brew update && brew upgrade From 651c5313e953c7493ad6ad0fa75057810ebf3fa4 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 15:53:34 +0100 Subject: [PATCH 10/28] Update CPM --- ExampleDependencies/cmake/get_cpm.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ExampleDependencies/cmake/get_cpm.cmake b/ExampleDependencies/cmake/get_cpm.cmake index 8465975..47e2e87 100644 --- a/ExampleDependencies/cmake/get_cpm.cmake +++ b/ExampleDependencies/cmake/get_cpm.cmake @@ -2,8 +2,8 @@ # # SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors -set(CPM_DOWNLOAD_VERSION 0.40.4) -set(CPM_HASH_SUM "67dcc1deb6e12a2f0705647ccc5f7023e3d15746b944e14352b82373e09b8a0a") +set(CPM_DOWNLOAD_VERSION 0.40.5) +set(CPM_HASH_SUM "c46b876ae3b9f994b4f05a4c15553e0485636862064f1fcc9d8b4f832086bc5d") if(CPM_SOURCE_CACHE) set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") @@ -21,4 +21,4 @@ file(DOWNLOAD ${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM} ) -include(${CPM_DOWNLOAD_LOCATION}) \ No newline at end of file +include(${CPM_DOWNLOAD_LOCATION}) From c7c435e2bce0976be4a3f19f4d6d779d71b60485 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 16:51:38 +0100 Subject: [PATCH 11/28] like this? --- CMakeLists.txt | 10 ++++++++++ conanfile.py | 6 +----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 156f840..e9d7e0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,16 @@ endif() set(PROJECT "ExamplePlugins") PROJECT(${PROJECT}) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION LESS 1930)) + set(CMAKE_C_STANDARD 17) + set(CMAKE_C_STANDARD_REQUIRED ON) + set(CMAKE_C_EXTENSIONS OFF) +endif() + add_subdirectory(Common) add_subdirectory(ExampleView) diff --git a/conanfile.py b/conanfile.py index f8a85c4..d7cd347 100644 --- a/conanfile.py +++ b/conanfile.py @@ -92,13 +92,9 @@ def generate(self): qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath) qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0] qt_dir = qt_cfg.parents[0].as_posix() - #qt_root = qt_cfg.parents[2].as_posix() tc.variables["Qt6_DIR"] = qt_dir - # for Qt < 6.4.2 - #tc.variables["Qt6_ROOT"] = qt_root - # Use the ManiVault .cmake file to find ManiVault with find_package mv_core_root = self.deps_cpp_info["hdps-core"].rootpath manivault_dir = pathlib.Path(mv_core_root, "cmake", "mv").as_posix() @@ -130,7 +126,7 @@ def generate(self): tc.variables["VCPKG_HOST_TRIPLET"] = vcpkg_triplet tc.variables["VCPKG_ROOT"] = vcpkg_dir.as_posix() - tc.variables["CMAKE_PROJECT_INCLUDE"] = vcpkg_tc.as_posix() + tc.variables["CMAKE_PROJECT_INCLUDE"] = vcpkg_tc.as_posix() tc.generate() From cef5a7b265a2e1e3605ef3a777f5611c895691ec Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 17:06:12 +0100 Subject: [PATCH 12/28] Try that --- CMakeLists.txt | 8 ++---- ExampleDependencies/CMakeLists.txt | 44 ++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9d7e0e..52365a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,11 +16,9 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION LESS 1930)) - set(CMAKE_C_STANDARD 17) - set(CMAKE_C_STANDARD_REQUIRED ON) - set(CMAKE_C_EXTENSIONS OFF) -endif() +set(CMAKE_C_STANDARD 17) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_EXTENSIONS OFF) add_subdirectory(Common) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index d3afe73..4ddc2cc 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -29,6 +29,50 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED) find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET) +include(CheckCXXSourceCompiles) + +# RISC-V only has 32-bit and 64-bit atomic instructions. GCC is supposed +# to convert smaller atomics to those larger ones via masking and +# shifting like LLVM, but it’s a known bug that it does not. This means +# anything that wants to use atomics on 1-byte or 2-byte types needs +# -latomic, but not 4-byte or 8-byte (though it does no harm). +set(atomic_code + " + #include + #include + std::atomic n8 (0); // riscv64 + std::atomic n64 (0); // armel, mipsel, powerpc + int main() { + ++n8; + ++n64; + return 0; + }") + +check_cxx_source_compiles("${atomic_code}" ATOMICS_LOCK_FREE_INSTRUCTIONS) + +if(ATOMICS_LOCK_FREE_INSTRUCTIONS) + set(ATOMICS_FOUND TRUE) + set(ATOMICS_LIBRARIES) + message(STATUS "Great.") +else() + set(CMAKE_REQUIRED_LIBRARIES "-latomic") + check_cxx_source_compiles("${atomic_code}" ATOMICS_IN_LIBRARY) + set(CMAKE_REQUIRED_LIBRARIES) + if(ATOMICS_IN_LIBRARY) + set(ATOMICS_LIBRARY atomic) + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Atomics DEFAULT_MSG ATOMICS_LIBRARY) + set(ATOMICS_LIBRARIES ${ATOMICS_LIBRARY}) + unset(ATOMICS_LIBRARY) + message(STATUS "OK.") + else() + if(Atomics_FIND_REQUIRED) + message(FATAL_ERROR "Neither lock free instructions nor -latomic found.") + endif() + endif() +endif() +unset(atomic_code) + CPMAddPackage( NAME highway URL https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz From 7b58a5431763830039ca5de6815e02adb69f29fe Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 17:26:21 +0100 Subject: [PATCH 13/28] Maybe --- ExampleDependencies/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 4ddc2cc..510f11a 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -1,11 +1,11 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) # ----------------------------------------------------------------------------- # ExampleAnalysis Plugin # ----------------------------------------------------------------------------- -PROJECT("ExampleDependenciesPlugin") +PROJECT("ExampleDependenciesPlugin" C CXX) # ----------------------------------------------------------------------------- # CMake Options @@ -48,8 +48,12 @@ set(atomic_code return 0; }") +message(STATUS "Test start.") + check_cxx_source_compiles("${atomic_code}" ATOMICS_LOCK_FREE_INSTRUCTIONS) +message(STATUS "Test end.") + if(ATOMICS_LOCK_FREE_INSTRUCTIONS) set(ATOMICS_FOUND TRUE) set(ATOMICS_LIBRARIES) From 93944afa2f91c42766cf2552d38f2a8cbc1fcd3d Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 17:46:54 +0100 Subject: [PATCH 14/28] more tires --- CMakeLists.txt | 2 +- ExampleDependencies/CMakeLists.txt | 2 +- conanfile.py | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52365a8..6d6c94f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ endif() # ExamplePlugins # ----------------------------------------------------------------------------- set(PROJECT "ExamplePlugins") -PROJECT(${PROJECT}) +PROJECT(${PROJECT} C CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 510f11a..9c8ef74 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -5,7 +5,7 @@ option(MV_UNITY_BUILD "Combine target source files into batches for faster compi # ----------------------------------------------------------------------------- # ExampleAnalysis Plugin # ----------------------------------------------------------------------------- -PROJECT("ExampleDependenciesPlugin" C CXX) +PROJECT("ExampleDependenciesPlugin") # ----------------------------------------------------------------------------- # CMake Options diff --git a/conanfile.py b/conanfile.py index d7cd347..8383f4a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -88,6 +88,9 @@ def generate(self): tc.variables["CMAKE_CXX_STANDARD_REQUIRED"] = "ON" + if self.settings.os == "Windows": + tc.variables["CMAKE_GENERATOR_PLATFORM"] = "x64" + # Use the Qt provided .cmake files qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath) qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0] From f8ffa6b07281d97edff17fa4df638857a78b91df Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 18:06:06 +0100 Subject: [PATCH 15/28] wild --- CMakeLists.txt | 2 +- conanfile.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d6c94f..eb8ecc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_C_STANDARD 17) +set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS OFF) diff --git a/conanfile.py b/conanfile.py index 8383f4a..d7cd347 100644 --- a/conanfile.py +++ b/conanfile.py @@ -88,9 +88,6 @@ def generate(self): tc.variables["CMAKE_CXX_STANDARD_REQUIRED"] = "ON" - if self.settings.os == "Windows": - tc.variables["CMAKE_GENERATOR_PLATFORM"] = "x64" - # Use the Qt provided .cmake files qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath) qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0] From 53107e5e591d5002ad3b86fdeddbe2936e7f51b9 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 08:42:39 +0100 Subject: [PATCH 16/28] Test --- CMakeLists.txt | 24 ++++++++++++------------ ExampleDependencies/CMakeLists.txt | 4 +++- conanfile.py | 2 -- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb8ecc4..3160037 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,17 +22,17 @@ set(CMAKE_C_EXTENSIONS OFF) add_subdirectory(Common) -add_subdirectory(ExampleView) -add_subdirectory(ExampleViewJS) -add_subdirectory(ExampleViewOpenGL) -add_subdirectory(ExampleAnalysis) -add_subdirectory(ExampleTransformation) -add_subdirectory(ExampleLoader) -add_subdirectory(ExampleWriter) -add_subdirectory(ExampleData) +#add_subdirectory(ExampleView) +#add_subdirectory(ExampleViewJS) +#add_subdirectory(ExampleViewOpenGL) +#add_subdirectory(ExampleAnalysis) +#add_subdirectory(ExampleTransformation) +#add_subdirectory(ExampleLoader) +#add_subdirectory(ExampleWriter) +#add_subdirectory(ExampleData) add_subdirectory(ExampleDependencies) -set_target_properties(ExampleViewPlugin ExampleViewJSPlugin ExampleViewOpenGLPlugin ExampleAnalysisPlugin ExampleTransformationPlugin ExampleLoaderPlugin ExampleWriterPlugin ExampleDataPlugin ExampleDependenciesPlugin - PROPERTIES - FOLDER ExamplePlugins -) \ No newline at end of file +#set_target_properties(ExampleViewPlugin ExampleViewJSPlugin ExampleViewOpenGLPlugin ExampleAnalysisPlugin ExampleTransformationPlugin ExampleLoaderPlugin ExampleWriterPlugin ExampleDataPlugin ExampleDependenciesPlugin +# PROPERTIES +# FOLDER ExamplePlugins +#) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 9c8ef74..c95910c 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -17,7 +17,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + #set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) include(cmake/get_cpm.cmake) diff --git a/conanfile.py b/conanfile.py index d7cd347..4660a76 100644 --- a/conanfile.py +++ b/conanfile.py @@ -86,8 +86,6 @@ def generate(self): tc = CMakeToolchain(self, generator=generator) - tc.variables["CMAKE_CXX_STANDARD_REQUIRED"] = "ON" - # Use the Qt provided .cmake files qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath) qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0] From 14e95e04744c18bf12b06afbfb311b8a7691ea56 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 08:57:57 +0100 Subject: [PATCH 17/28] different --- ExampleDependencies/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index c95910c..2d25028 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -15,11 +15,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus $,/MDd,/MD>") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - #set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) include(cmake/get_cpm.cmake) From ffe43ee3767b0ae5eecc645a51e1725ed6ba279c Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 09:14:43 +0100 Subject: [PATCH 18/28] this? --- ExampleDependencies/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 2d25028..55a0a49 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -15,8 +15,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus $,/MDd,/MD>") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) include(cmake/get_cpm.cmake) From c71cf9025b0c4f5d446ab7e88fdbd2b4542f93a8 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 09:23:46 +0100 Subject: [PATCH 19/28] Handle subtargets --- ExampleDependencies/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 55a0a49..c82a1dc 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -87,6 +87,13 @@ CPMAddPackage( OPTIONS "HWY_ENABLE_EXAMPLES OFF" "HWY_ENABLE_INSTALL OFF" "HWY_ENABLE_TESTS OFF" "HWY_ENABLE_CONTRIB ON" "BUILD_SHARED_LIBS ON" ) +if (MSVC) + target_compile_options(hwy PRIVATE "$,/MDd,/MD>") + target_compile_options(hwy_contrib PRIVATE "$,/MDd,/MD>") + set_target_properties(hwy_test PROPERTIES EXCLUDE_FROM_ALL True) + set_target_properties(hwy_list_targets PROPERTIES EXCLUDE_FROM_ALL True) +endif() + if(${MV_EXAMPLES_USE_VCPKG}) find_package(blake3 CONFIG REQUIRED) From 792134a9c5f9d3527292d0d96199345c9f3e155a Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 09:25:41 +0100 Subject: [PATCH 20/28] update linker flags --- ExampleData/CMakeLists.txt | 5 +++-- ExampleDependencies/CMakeLists.txt | 1 - ExampleLoader/CMakeLists.txt | 5 +++-- ExampleTransformation/CMakeLists.txt | 5 +++-- ExampleView/CMakeLists.txt | 5 +++-- ExampleViewJS/CMakeLists.txt | 5 +++-- ExampleViewOpenGL/CMakeLists.txt | 5 +++-- ExampleWriter/CMakeLists.txt | 5 +++-- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ExampleData/CMakeLists.txt b/ExampleData/CMakeLists.txt index fda7aa5..89a30e2 100644 --- a/ExampleData/CMakeLists.txt +++ b/ExampleData/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # Include cmake tools diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index c82a1dc..3db8518 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -16,7 +16,6 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") diff --git a/ExampleLoader/CMakeLists.txt b/ExampleLoader/CMakeLists.txt index d0d2f6c..4b9651b 100644 --- a/ExampleLoader/CMakeLists.txt +++ b/ExampleLoader/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # ----------------------------------------------------------------------------- diff --git a/ExampleTransformation/CMakeLists.txt b/ExampleTransformation/CMakeLists.txt index c75c4b0..99a472c 100644 --- a/ExampleTransformation/CMakeLists.txt +++ b/ExampleTransformation/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # ----------------------------------------------------------------------------- diff --git a/ExampleView/CMakeLists.txt b/ExampleView/CMakeLists.txt index 1ee9038..0c4f2ff 100644 --- a/ExampleView/CMakeLists.txt +++ b/ExampleView/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # ----------------------------------------------------------------------------- diff --git a/ExampleViewJS/CMakeLists.txt b/ExampleViewJS/CMakeLists.txt index 01f11f7..4bf270d 100644 --- a/ExampleViewJS/CMakeLists.txt +++ b/ExampleViewJS/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # ----------------------------------------------------------------------------- diff --git a/ExampleViewOpenGL/CMakeLists.txt b/ExampleViewOpenGL/CMakeLists.txt index 7cb66d9..3d9366e 100644 --- a/ExampleViewOpenGL/CMakeLists.txt +++ b/ExampleViewOpenGL/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # ----------------------------------------------------------------------------- diff --git a/ExampleWriter/CMakeLists.txt b/ExampleWriter/CMakeLists.txt index 55ea6e9..832d3c1 100644 --- a/ExampleWriter/CMakeLists.txt +++ b/ExampleWriter/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # ----------------------------------------------------------------------------- From 76d2adb1a1f09b7d42cc383c9955162a888a01a2 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 09:25:52 +0100 Subject: [PATCH 21/28] revert test code --- CMakeLists.txt | 24 +++++++-------- ExampleDependencies/CMakeLists.txt | 48 ------------------------------ 2 files changed, 12 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3160037..36971f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,17 +22,17 @@ set(CMAKE_C_EXTENSIONS OFF) add_subdirectory(Common) -#add_subdirectory(ExampleView) -#add_subdirectory(ExampleViewJS) -#add_subdirectory(ExampleViewOpenGL) -#add_subdirectory(ExampleAnalysis) -#add_subdirectory(ExampleTransformation) -#add_subdirectory(ExampleLoader) -#add_subdirectory(ExampleWriter) -#add_subdirectory(ExampleData) +add_subdirectory(ExampleView) +add_subdirectory(ExampleViewJS) +add_subdirectory(ExampleViewOpenGL) +add_subdirectory(ExampleAnalysis) +add_subdirectory(ExampleTransformation) +add_subdirectory(ExampleLoader) +add_subdirectory(ExampleWriter) +add_subdirectory(ExampleData) add_subdirectory(ExampleDependencies) -#set_target_properties(ExampleViewPlugin ExampleViewJSPlugin ExampleViewOpenGLPlugin ExampleAnalysisPlugin ExampleTransformationPlugin ExampleLoaderPlugin ExampleWriterPlugin ExampleDataPlugin ExampleDependenciesPlugin -# PROPERTIES -# FOLDER ExamplePlugins -#) +set_target_properties(ExampleViewPlugin ExampleViewJSPlugin ExampleViewOpenGLPlugin ExampleAnalysisPlugin ExampleTransformationPlugin ExampleLoaderPlugin ExampleWriterPlugin ExampleDataPlugin ExampleDependenciesPlugin + PROPERTIES + FOLDER ExamplePlugins +) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 3db8518..9b737e2 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -30,54 +30,6 @@ find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED) find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET) -include(CheckCXXSourceCompiles) - -# RISC-V only has 32-bit and 64-bit atomic instructions. GCC is supposed -# to convert smaller atomics to those larger ones via masking and -# shifting like LLVM, but it’s a known bug that it does not. This means -# anything that wants to use atomics on 1-byte or 2-byte types needs -# -latomic, but not 4-byte or 8-byte (though it does no harm). -set(atomic_code - " - #include - #include - std::atomic n8 (0); // riscv64 - std::atomic n64 (0); // armel, mipsel, powerpc - int main() { - ++n8; - ++n64; - return 0; - }") - -message(STATUS "Test start.") - -check_cxx_source_compiles("${atomic_code}" ATOMICS_LOCK_FREE_INSTRUCTIONS) - -message(STATUS "Test end.") - -if(ATOMICS_LOCK_FREE_INSTRUCTIONS) - set(ATOMICS_FOUND TRUE) - set(ATOMICS_LIBRARIES) - message(STATUS "Great.") -else() - set(CMAKE_REQUIRED_LIBRARIES "-latomic") - check_cxx_source_compiles("${atomic_code}" ATOMICS_IN_LIBRARY) - set(CMAKE_REQUIRED_LIBRARIES) - if(ATOMICS_IN_LIBRARY) - set(ATOMICS_LIBRARY atomic) - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Atomics DEFAULT_MSG ATOMICS_LIBRARY) - set(ATOMICS_LIBRARIES ${ATOMICS_LIBRARY}) - unset(ATOMICS_LIBRARY) - message(STATUS "OK.") - else() - if(Atomics_FIND_REQUIRED) - message(FATAL_ERROR "Neither lock free instructions nor -latomic found.") - endif() - endif() -endif() -unset(atomic_code) - CPMAddPackage( NAME highway URL https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz From 41c9adc1081e29c1c6e3221188949f07c45dd85c Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 09:39:19 +0100 Subject: [PATCH 22/28] No need for this --- ExampleDependencies/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 9b737e2..dde046a 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -39,8 +39,6 @@ CPMAddPackage( ) if (MSVC) - target_compile_options(hwy PRIVATE "$,/MDd,/MD>") - target_compile_options(hwy_contrib PRIVATE "$,/MDd,/MD>") set_target_properties(hwy_test PROPERTIES EXCLUDE_FROM_ALL True) set_target_properties(hwy_list_targets PROPERTIES EXCLUDE_FROM_ALL True) endif() From df486f575cb57376ab7e872fa87dad2e24ee51d4 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 10:02:39 +0100 Subject: [PATCH 23/28] maybe --- ExampleDependencies/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index dde046a..98fe97f 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -43,6 +43,11 @@ if (MSVC) set_target_properties(hwy_list_targets PROPERTIES EXCLUDE_FROM_ALL True) endif() +if (APPLE) + target_compile_definitions(hwy PRIVATE HWY_DISABLED_TARGETS=HWY_ALL_SVE) + target_compile_definitions(hwy_contrib PRIVATE HWY_DISABLED_TARGETS=HWY_ALL_SVE) +endif() + if(${MV_EXAMPLES_USE_VCPKG}) find_package(blake3 CONFIG REQUIRED) From c264b2d38c8b10ca13a52b5540e78446dd0f6b86 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 10:35:22 +0100 Subject: [PATCH 24/28] back to 17 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36971f8..3b3fb92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD 17) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS OFF) From a52b66de76bbe2d3f0641b25408408dff914bea6 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 11:27:47 +0100 Subject: [PATCH 25/28] Just no --- .github/workflows/build.yml | 4 +++- ExampleDependencies/CMakeLists.txt | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7457612..f7058f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,9 @@ jobs: - name: Get matrix from file id: matrix_setup uses: ManiVaultStudio/github-actions/matrix_setup@main - + with: + matrix_ids : 'windows_2022 linux_gcc13 macos_code14' + cross-platform-build: name: Cross platform build needs: prepare_matrix diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index 98fe97f..dde046a 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -43,11 +43,6 @@ if (MSVC) set_target_properties(hwy_list_targets PROPERTIES EXCLUDE_FROM_ALL True) endif() -if (APPLE) - target_compile_definitions(hwy PRIVATE HWY_DISABLED_TARGETS=HWY_ALL_SVE) - target_compile_definitions(hwy_contrib PRIVATE HWY_DISABLED_TARGETS=HWY_ALL_SVE) -endif() - if(${MV_EXAMPLES_USE_VCPKG}) find_package(blake3 CONFIG REQUIRED) From af7fdc79434ef262ea97438614a46196109fd5ec Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 16:28:27 +0100 Subject: [PATCH 26/28] Maybe yes --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7058f6..c744e3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,6 @@ jobs: - name: Get matrix from file id: matrix_setup uses: ManiVaultStudio/github-actions/matrix_setup@main - with: - matrix_ids : 'windows_2022 linux_gcc13 macos_code14' cross-platform-build: name: Cross platform build From 1a0005d7fbc98fb4ef411d528fdeb955fe1c4106 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 16:33:13 +0100 Subject: [PATCH 27/28] forgotten child --- ExampleAnalysis/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ExampleAnalysis/CMakeLists.txt b/ExampleAnalysis/CMakeLists.txt index 604471b..8522f03 100644 --- a/ExampleAnalysis/CMakeLists.txt +++ b/ExampleAnalysis/CMakeLists.txt @@ -16,8 +16,9 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # ----------------------------------------------------------------------------- From 878cf385160cd583cec377a87f08daea9190697c Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 16:51:01 +0100 Subject: [PATCH 28/28] highway patch for apple arm --- ExampleDependencies/CMakeLists.txt | 4 +++- .../cmake/highway-apple-arm.patch | 18 ++++++++++++++++++ .../cmake/{highway.patch => highway-win.patch} | 0 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ExampleDependencies/cmake/highway-apple-arm.patch rename ExampleDependencies/cmake/{highway.patch => highway-win.patch} (100%) diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index dde046a..cb65e7e 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -34,7 +34,9 @@ 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 + PATCHES + "cmake/highway-win.patch" # from https://github.com/conan-io/conan-center-index/pull/24197/files, fixes https://github.com/google/highway/issues/2225 + "cmake/highway-apple-arm.patch" # from https://github.com/Homebrew/homebrew-core/blob/d55553b062fab1ddfc3ea0c8f41725f0b2584f10/Formula/h/highway.rb, fixes https://github.com/google/highway/issues/2317 OPTIONS "HWY_ENABLE_EXAMPLES OFF" "HWY_ENABLE_INSTALL OFF" "HWY_ENABLE_TESTS OFF" "HWY_ENABLE_CONTRIB ON" "BUILD_SHARED_LIBS ON" ) diff --git a/ExampleDependencies/cmake/highway-apple-arm.patch b/ExampleDependencies/cmake/highway-apple-arm.patch new file mode 100644 index 0000000..a4859e1 --- /dev/null +++ b/ExampleDependencies/cmake/highway-apple-arm.patch @@ -0,0 +1,18 @@ +diff --git a/hwy/detect_targets.h b/hwy/detect_targets.h +index a8d4a13f..e0ffb33a 100644 +--- a/hwy/detect_targets.h ++++ b/hwy/detect_targets.h +@@ -223,8 +223,12 @@ + #endif + + // SVE[2] require recent clang or gcc versions. ++// ++// SVE is not supported on Apple arm64 CPUs and also crashes the compiler: ++// https://github.com/llvm/llvm-project/issues/97198 + #if (HWY_COMPILER_CLANG && HWY_COMPILER_CLANG < 1100) || \ +- (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) ++ (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) || \ ++ (HWY_OS_APPLE && HWY_ARCH_ARM_A64) + #define HWY_BROKEN_SVE (HWY_SVE | HWY_SVE2 | HWY_SVE_256 | HWY_SVE2_128) + #else + #define HWY_BROKEN_SVE 0 \ No newline at end of file diff --git a/ExampleDependencies/cmake/highway.patch b/ExampleDependencies/cmake/highway-win.patch similarity index 100% rename from ExampleDependencies/cmake/highway.patch rename to ExampleDependencies/cmake/highway-win.patch