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_ROOT_PREFIX="/home/share/micromamba"
|
||||
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)
|
||||
cmake --preset conan-release
|
||||
|
||||
@@ -124,6 +124,8 @@ find_package(Eigen3 CONFIG REQUIRED)
|
||||
get_target_property(EIGEN3_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
|
||||
include_directories(${EIGEN3_INCLUDE_DIRS})
|
||||
|
||||
find_package(OpenMP)
|
||||
|
||||
find_package(ROOT CONFIG REQUIRED)
|
||||
include(${ROOT_USE_FILE})
|
||||
|
||||
@@ -145,6 +147,8 @@ else()
|
||||
IOXML
|
||||
IOXMLParser
|
||||
ImagingCore
|
||||
ImagingHybrid
|
||||
ImagingSources
|
||||
InteractionStyle
|
||||
InteractionWidgets
|
||||
RenderingAnnotation
|
||||
|
||||
@@ -30,13 +30,13 @@ You can create and activate the environment using either `micromamba` or `conda`
|
||||
**Using Micromamba:**
|
||||
```bash
|
||||
micromamba env create -f condaenv.yml
|
||||
micromamba activate mutom
|
||||
micromamba activate uLib
|
||||
```
|
||||
|
||||
**Using Conda:**
|
||||
```bash
|
||||
conda env create -f condaenv.yml
|
||||
conda activate mutom
|
||||
conda activate uLib
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```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:
|
||||
@@ -91,6 +91,6 @@ The `fast` profile is defined at `~/.conan2/profiles/fast` and sets:
|
||||
### Make python package
|
||||
|
||||
```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]
|
||||
eigen/3.4.0
|
||||
boost/1.83.0
|
||||
boost/1.86.0
|
||||
# pybind11/3.0.2
|
||||
hdf5/1.14.3
|
||||
|
||||
|
||||
13
condaenv.yml
13
condaenv.yml
@@ -1,4 +1,4 @@
|
||||
name: mutom
|
||||
name: uLib
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
@@ -7,4 +7,13 @@ dependencies:
|
||||
- cmake
|
||||
- conan
|
||||
- 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
|
||||
${ROOT_LIBRARIES}
|
||||
${VTK_LIBRARIES}
|
||||
VTK::ImagingHybrid
|
||||
VTK::ImagingSources
|
||||
${PACKAGE_LIBPREFIX}Math
|
||||
${PACKAGE_LIBPREFIX}Detectors
|
||||
${PACKAGE_LIBPREFIX}Geant)
|
||||
@@ -56,7 +58,7 @@ set_target_properties(${libname} PROPERTIES
|
||||
AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON)
|
||||
target_link_libraries(${libname} ${LIBRARIES} Qt6::Widgets)
|
||||
target_link_libraries(${libname} PUBLIC ${LIBRARIES} Qt6::Widgets)
|
||||
|
||||
install(TARGETS ${libname}
|
||||
EXPORT "uLibTargets"
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
vtkPolyData* polydata = nullptr;
|
||||
if (vtkActor *actor = vtkActor::SafeDownCast(m_Prop)) {
|
||||
if (actor->GetMapper()) {
|
||||
polydata = vtkPolyData::SafeDownCast(actor->GetMapper()->GetDataSetInput());
|
||||
polydata = vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput());
|
||||
}
|
||||
} else if (vtkAssembly *asm_p = vtkAssembly::SafeDownCast(m_Prop)) {
|
||||
vtkPropCollection *parts = asm_p->GetParts();
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
for (int i = 0; i < parts->GetNumberOfItems(); ++i) {
|
||||
vtkActor *a = vtkActor::SafeDownCast(parts->GetNextProp());
|
||||
if (a && a->GetMapper()) {
|
||||
polydata = vtkPolyData::SafeDownCast(a->GetMapper()->GetDataSetInput());
|
||||
polydata = vtkPolyData::SafeDownCast(a->GetMapper()->GetInput());
|
||||
if (polydata) break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user