fix compile errors in uLib env
This commit is contained in:
@@ -10,7 +10,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
export MAMBA_EXE="/home/share/micromamba/bin/micromamba"
|
export MAMBA_EXE="/home/share/micromamba/bin/micromamba"
|
||||||
export MAMBA_ROOT_PREFIX="/home/share/micromamba"
|
export MAMBA_ROOT_PREFIX="/home/share/micromamba"
|
||||||
eval "$(/home/share/micromamba/bin/micromamba shell hook --shell bash)"
|
eval "$(/home/share/micromamba/bin/micromamba shell hook --shell bash)"
|
||||||
micromamba activate mutom
|
micromamba activate uLib
|
||||||
|
|
||||||
# Configure (from repo root, using Conan preset — uses Ninja + ccache)
|
# Configure (from repo root, using Conan preset — uses Ninja + ccache)
|
||||||
cmake --preset conan-release
|
cmake --preset conan-release
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ find_package(Eigen3 CONFIG REQUIRED)
|
|||||||
get_target_property(EIGEN3_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
|
get_target_property(EIGEN3_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
include_directories(${EIGEN3_INCLUDE_DIRS})
|
include_directories(${EIGEN3_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
find_package(OpenMP)
|
||||||
|
|
||||||
find_package(ROOT CONFIG REQUIRED)
|
find_package(ROOT CONFIG REQUIRED)
|
||||||
include(${ROOT_USE_FILE})
|
include(${ROOT_USE_FILE})
|
||||||
|
|
||||||
@@ -145,6 +147,8 @@ else()
|
|||||||
IOXML
|
IOXML
|
||||||
IOXMLParser
|
IOXMLParser
|
||||||
ImagingCore
|
ImagingCore
|
||||||
|
ImagingHybrid
|
||||||
|
ImagingSources
|
||||||
InteractionStyle
|
InteractionStyle
|
||||||
InteractionWidgets
|
InteractionWidgets
|
||||||
RenderingAnnotation
|
RenderingAnnotation
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ You can create and activate the environment using either `micromamba` or `conda`
|
|||||||
**Using Micromamba:**
|
**Using Micromamba:**
|
||||||
```bash
|
```bash
|
||||||
micromamba env create -f condaenv.yml
|
micromamba env create -f condaenv.yml
|
||||||
micromamba activate mutom
|
micromamba activate uLib
|
||||||
```
|
```
|
||||||
|
|
||||||
**Using Conda:**
|
**Using Conda:**
|
||||||
```bash
|
```bash
|
||||||
conda env create -f condaenv.yml
|
conda env create -f condaenv.yml
|
||||||
conda activate mutom
|
conda activate uLib
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configure and Build
|
### Configure and Build
|
||||||
@@ -70,7 +70,7 @@ cmake --build build -j$(nproc)
|
|||||||
A `fast` conan profile is provided that uses **clang**, **lld** (LLVM linker), and **ccache**. Install them into your environment first:
|
A `fast` conan profile is provided that uses **clang**, **lld** (LLVM linker), and **ccache**. Install them into your environment first:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
micromamba install -n mutom -y clang clangxx lld -c conda-forge
|
micromamba install -n uLib -y clang clangxx lld -c conda-forge
|
||||||
```
|
```
|
||||||
|
|
||||||
Then build using the `fast` profile:
|
Then build using the `fast` profile:
|
||||||
@@ -91,6 +91,6 @@ The `fast` profile is defined at `~/.conan2/profiles/fast` and sets:
|
|||||||
### Make python package
|
### Make python package
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
micromamba run -n mutom env USE_CUDA=ON poetry install
|
micromamba run -n uLib env USE_CUDA=ON poetry install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[requires]
|
[requires]
|
||||||
eigen/3.4.0
|
eigen/3.4.0
|
||||||
boost/1.83.0
|
boost/1.86.0
|
||||||
# pybind11/3.0.2
|
# pybind11/3.0.2
|
||||||
hdf5/1.14.3
|
hdf5/1.14.3
|
||||||
|
|
||||||
|
|||||||
13
condaenv.yml
13
condaenv.yml
@@ -1,4 +1,4 @@
|
|||||||
name: mutom
|
name: uLib
|
||||||
channels:
|
channels:
|
||||||
- conda-forge
|
- conda-forge
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -7,4 +7,13 @@ dependencies:
|
|||||||
- cmake
|
- cmake
|
||||||
- conan
|
- conan
|
||||||
- root
|
- root
|
||||||
- vtk
|
- vtk=9.4 # VTK 9.4
|
||||||
|
- pybind11
|
||||||
|
# - boost=1.86.0 # requested by VTK 9.4
|
||||||
|
- ninja
|
||||||
|
- clang
|
||||||
|
- clangxx
|
||||||
|
- lld
|
||||||
|
- ccache
|
||||||
|
- OpenMP
|
||||||
|
- Geant4
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ list(APPEND HEADERS ${HEP_GEANT_HEADERS})
|
|||||||
set(LIBRARIES Eigen3::Eigen
|
set(LIBRARIES Eigen3::Eigen
|
||||||
${ROOT_LIBRARIES}
|
${ROOT_LIBRARIES}
|
||||||
${VTK_LIBRARIES}
|
${VTK_LIBRARIES}
|
||||||
|
VTK::ImagingHybrid
|
||||||
|
VTK::ImagingSources
|
||||||
${PACKAGE_LIBPREFIX}Math
|
${PACKAGE_LIBPREFIX}Math
|
||||||
${PACKAGE_LIBPREFIX}Detectors
|
${PACKAGE_LIBPREFIX}Detectors
|
||||||
${PACKAGE_LIBPREFIX}Geant)
|
${PACKAGE_LIBPREFIX}Geant)
|
||||||
@@ -56,7 +58,7 @@ set_target_properties(${libname} PROPERTIES
|
|||||||
AUTOMOC ON
|
AUTOMOC ON
|
||||||
AUTOUIC ON
|
AUTOUIC ON
|
||||||
AUTORCC ON)
|
AUTORCC ON)
|
||||||
target_link_libraries(${libname} ${LIBRARIES} Qt6::Widgets)
|
target_link_libraries(${libname} PUBLIC ${LIBRARIES} Qt6::Widgets)
|
||||||
|
|
||||||
install(TARGETS ${libname}
|
install(TARGETS ${libname}
|
||||||
EXPORT "uLibTargets"
|
EXPORT "uLibTargets"
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public:
|
|||||||
vtkPolyData* polydata = nullptr;
|
vtkPolyData* polydata = nullptr;
|
||||||
if (vtkActor *actor = vtkActor::SafeDownCast(m_Prop)) {
|
if (vtkActor *actor = vtkActor::SafeDownCast(m_Prop)) {
|
||||||
if (actor->GetMapper()) {
|
if (actor->GetMapper()) {
|
||||||
polydata = vtkPolyData::SafeDownCast(actor->GetMapper()->GetDataSetInput());
|
polydata = vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput());
|
||||||
}
|
}
|
||||||
} else if (vtkAssembly *asm_p = vtkAssembly::SafeDownCast(m_Prop)) {
|
} else if (vtkAssembly *asm_p = vtkAssembly::SafeDownCast(m_Prop)) {
|
||||||
vtkPropCollection *parts = asm_p->GetParts();
|
vtkPropCollection *parts = asm_p->GetParts();
|
||||||
@@ -192,7 +192,7 @@ public:
|
|||||||
for (int i = 0; i < parts->GetNumberOfItems(); ++i) {
|
for (int i = 0; i < parts->GetNumberOfItems(); ++i) {
|
||||||
vtkActor *a = vtkActor::SafeDownCast(parts->GetNextProp());
|
vtkActor *a = vtkActor::SafeDownCast(parts->GetNextProp());
|
||||||
if (a && a->GetMapper()) {
|
if (a && a->GetMapper()) {
|
||||||
polydata = vtkPolyData::SafeDownCast(a->GetMapper()->GetDataSetInput());
|
polydata = vtkPolyData::SafeDownCast(a->GetMapper()->GetInput());
|
||||||
if (polydata) break;
|
if (polydata) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user