feat: targz runtime libraries
This commit is contained in:
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
build
|
||||
docker
|
||||
docs
|
||||
.git
|
||||
.github
|
||||
Doxyfile
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ build
|
||||
docs/html
|
||||
docs/latex
|
||||
perf.data*
|
||||
artifacts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
# set vars
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
@@ -79,7 +79,7 @@ find_package(glm REQUIRED)
|
||||
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
|
||||
|
||||
# tbb
|
||||
find_package(TBB REQUIRED COMPONENTS TBB::tbb)
|
||||
find_package(TBB REQUIRED COMPONENTS tbb)
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS filesystem system)
|
||||
|
||||
@@ -104,15 +104,68 @@ set(CPACK_GENERATOR "RPM;TGZ")
|
||||
set(ENZO_BIN_DIR ${CMAKE_PROJECT_NAME}/bin)
|
||||
set(ENZO_LIB_DIR ${CMAKE_PROJECT_NAME}/lib)
|
||||
|
||||
install(
|
||||
TARGETS ${AppExec}
|
||||
RUNTIME DESTINATION ${ENZO_BIN_DIR}
|
||||
LIBRARY DESTINATION ${ENZO_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${ENZO_LIB_DIR}
|
||||
|
||||
set_target_properties(${AppExec} PROPERTIES
|
||||
INSTALL_RPATH "$ORIGIN/../lib;$ORIGIN/../../lib"
|
||||
)
|
||||
|
||||
include(CPack)
|
||||
|
||||
# cpack_add_component("runtimes")
|
||||
# cpack_add_component("tgz-runtimes")
|
||||
|
||||
install(TARGETS ${AppExec}
|
||||
RUNTIME DESTINATION ${ENZO_BIN_DIR}
|
||||
LIBRARY DESTINATION ${ENZO_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${ENZO_LIB_DIR}
|
||||
# COMPONENT "runtimes"
|
||||
)
|
||||
|
||||
# install(TARGETS ${AppExec}
|
||||
# RUNTIME_DEPENDENCY_SET app_deps
|
||||
# RUNTIME DESTINATION ${ENZO_BIN_DIR}
|
||||
# LIBRARY DESTINATION ${ENZO_LIB_DIR}
|
||||
# ARCHIVE DESTINATION ${ENZO_LIB_DIR}
|
||||
# COMPONENT "tgz-runtimes"
|
||||
# )
|
||||
|
||||
# install(RUNTIME_DEPENDENCY_SET app_deps
|
||||
# DIRECTORIES "${CMAKE_BINARY_DIR}"
|
||||
# PRE_EXCLUDE_REGEXES
|
||||
# "libc.so.*" "libm.so.*" "libpthread.so.*" "librt.so.*" "libdl.so.*"
|
||||
# "libgcc_s.so.*" "libstdc++.so.*"
|
||||
# DESTINATION ${ENZO_LIB_DIR}
|
||||
# COMPONENT "tgz-runtimes"
|
||||
# )
|
||||
|
||||
# install(
|
||||
# DIRECTORY /usr/lib64/qt6
|
||||
# DESTINATION ${CMAKE_PROJECT_NAME}
|
||||
# COMPONENT "tgz-runtimes"
|
||||
# )
|
||||
|
||||
# install(
|
||||
# DIRECTORY /usr/lib64/
|
||||
# DESTINATION ${ENZO_LIB_DIR}
|
||||
# COMPONENT "tgz-runtimes"
|
||||
# FILES_MATCHING PATTERN "*Qt*.so*"
|
||||
# )
|
||||
|
||||
# file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/packaging/qt.conf
|
||||
# "[Paths]
|
||||
# Plugins = ../qt6/plugins
|
||||
# Libraries = ../lib
|
||||
# ")
|
||||
|
||||
# install(
|
||||
# FILES ${CMAKE_CURRENT_BINARY_DIR}/packaging/qt.conf
|
||||
# DESTINATION ${ENZO_BIN_DIR}
|
||||
# COMPONENT "tgz-runtimes"
|
||||
# )
|
||||
|
||||
|
||||
|
||||
|
||||
# set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.1.1, zlib >= 1.2.11")
|
||||
|
||||
# --- end packaging
|
||||
|
||||
2
build.sh
2
build.sh
@@ -2,5 +2,5 @@
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja ..
|
||||
cmake -DCMAKE_BUILD_TYPE=Build -G Ninja ..
|
||||
ninja
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
if (CPACK_GENERATOR MATCHES "RPM")
|
||||
MESSAGE(STATUS "GENERATOR: ${CPACK_GENERATOR}")
|
||||
if (${CPACK_GENERATOR} STREQUAL "RPM")
|
||||
# rpm specific config
|
||||
|
||||
MESSAGE(STATUS "RPM")
|
||||
|
||||
set(CPACK_RPM_COMPONENT_INSTALL ON)
|
||||
set(CPACK_COMPONENTS_ALL "runtimes")
|
||||
if(UNIX)
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt")
|
||||
endif(UNIX)
|
||||
|
||||
elseif(CPACK_GENERATOR MATCHES "TGZ")
|
||||
elseif(${CPACK_GENERATOR} STREQUAL "TGZ")
|
||||
# tgz specific config
|
||||
MESSAGE(STATUS "TGZ")
|
||||
|
||||
set(CPACK_TGZ_COMPONENT_INSTALL ON)
|
||||
set(CPACK_COMPONENTS_ALL "tgz-runtimes")
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
33
docker/builds/Dockerfile.rocky9
Normal file
33
docker/builds/Dockerfile.rocky9
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM rockylinux:9
|
||||
LABEL Description="Build environment"
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
RUN dnf -y install dnf-plugins-core
|
||||
|
||||
# Enable CRB (CodeReady Builder on EL9)
|
||||
RUN dnf config-manager --set-enabled crb
|
||||
|
||||
# Add EPEL on UBI by installing the release RPM
|
||||
RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||
|
||||
RUN dnf install -y \
|
||||
tar \
|
||||
rpm-build \
|
||||
git \
|
||||
cmake \
|
||||
ninja-build \
|
||||
qt6-qtbase-devel \
|
||||
qt6-qtsvg-devel \
|
||||
eigen3-devel \
|
||||
glm-devel \
|
||||
tbb \
|
||||
tbb-devel \
|
||||
boost-devel \
|
||||
CGAL-devel
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN ./build.sh
|
||||
|
||||
RUN cd build && cpack -G RPM
|
||||
3
docker/builds/build.sh
Executable file
3
docker/builds/build.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
podman buildx build -f Dockerfile.rocky9 --output ./artifacts/rocky9 ../../
|
||||
@@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <oneapi/tbb/concurrent_vector.h>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "Engine/Operator/AttributeHandle.h"
|
||||
#include "Engine/Types.h"
|
||||
#include <memory>
|
||||
#include <oneapi/tbb/spin_mutex.h>
|
||||
#include <oneapi/tbb/task_group.h>
|
||||
#include <tbb/spin_mutex.h>
|
||||
#include <tbb/task_group.h>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <CGAL/Polygon_mesh_processing/orientation.h>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include "Engine/Operator/AttributeHandle.h"
|
||||
#include <memory>
|
||||
#include <oneapi/tbb/spin_mutex.h>
|
||||
#include <tbb/spin_mutex.h>
|
||||
#include <tbb/spin_mutex.h>
|
||||
#include <variant>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include "Engine/Operator/GeometryOpDef.h"
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
|
||||
@@ -101,13 +101,12 @@ void enzo::op::OperatorTable::initPlugins()
|
||||
static bool pluginsLoaded=false;
|
||||
if(pluginsLoaded) return;
|
||||
|
||||
// auto initPlugin = boost::dll::import_symbol<void(enzo::op::addOperatorPtr)>(
|
||||
// "build/src/OpDefs/libenzoOps1.so", "newSopOperator"
|
||||
// );
|
||||
auto initPlugin = boost::dll::import_symbol<void(enzo::op::addOperatorPtr)>(
|
||||
findPlugin("enzoOps1"), "newSopOperator"
|
||||
);
|
||||
using InitPluginFn = void(enzo::op::addOperatorPtr);
|
||||
|
||||
const auto so = findPlugin("enzoOps1");
|
||||
static boost::dll::shared_library lib(so, boost::dll::load_mode::default_mode);
|
||||
|
||||
auto initPlugin = lib.get<InitPluginFn>("newSopOperator");
|
||||
initPlugin(enzo::op::OperatorTable::addOperator);
|
||||
|
||||
pluginsLoaded = true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Gui/Network/NetworkGraphicsView.h"
|
||||
#include <QGraphicsItem>
|
||||
#include "Gui/Network/Network.h"
|
||||
#include <QCoreApplication>
|
||||
#include "Gui/Network/NetworkGraphicsScene.h"
|
||||
#include "Gui/Network/SocketGraphic.h"
|
||||
#include <iostream>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "Engine/Operator/Geometry.h"
|
||||
#include "Engine/Types.h"
|
||||
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
|
||||
#include <oneapi/tbb/blocked_range.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include "icecream.hpp"
|
||||
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <glm/fwd.hpp>
|
||||
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
|
||||
#include <glm/geometric.hpp>
|
||||
#include <oneapi/tbb/blocked_range.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include "Engine/Types.h"
|
||||
#include "Gui/Viewport/GLCamera.h"
|
||||
#include "icecream.hpp"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(enzoOps1)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "Engine/Operator/AttributeHandle.h"
|
||||
#include "Engine/Types.h"
|
||||
#include <cstdio>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "Engine/Types.h"
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "OpDefs/GopHouse.h"
|
||||
#include "Engine/Operator/AttributeHandle.h"
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
|
||||
GOP_house::GOP_house(enzo::nt::NetworkManager* network, enzo::op::OpInfo opInfo)
|
||||
: GeometryOpDef(network, opInfo)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "Engine/Types.h"
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <oneapi/tbb/blocked_range.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "Engine/Types.h"
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <oneapi/tbb/blocked_range.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "OpDefs/GopTestCube.h"
|
||||
#include "Engine/Operator/AttributeHandle.h"
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
|
||||
GopTestGeoCube::GopTestGeoCube(enzo::nt::NetworkManager* network, enzo::op::OpInfo opInfo)
|
||||
: GeometryOpDef(network, opInfo)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include <Eigen/src/Geometry/AngleAxis.h>
|
||||
#include <Eigen/src/Geometry/Transform.h>
|
||||
#include <cstddef>
|
||||
#include <oneapi/tbb/blocked_range.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/blocked_range.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
|
||||
GopTransform::GopTransform(enzo::nt::NetworkManager* network, enzo::op::OpInfo opInfo)
|
||||
: GeometryOpDef(network, opInfo)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tbb/parallel_for.h>
|
||||
#include <iostream>
|
||||
#include <boost/dll/import.hpp>
|
||||
#include "Engine/Network/NetworkManager.h"
|
||||
@@ -14,7 +14,7 @@ TEST_CASE("tbb")
|
||||
{
|
||||
constexpr int N = 100;
|
||||
|
||||
oneapi::tbb::parallel_for(0, N, [](int i) {
|
||||
tbb::parallel_for(0, N, [](int i) {
|
||||
std::cout << "Iteration " << i
|
||||
<< " is running on thread "
|
||||
<< std::this_thread::get_id() << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user