Skip to content

CMakeLists.txt can not find pugixml.hpp, and how can I install the built python module #17

Description

@qingfengxia

I can not follow the guidance to build, with openmc installed to /opt/openmc
but i can pip install parametric-plasma-source not sure how compatible it is with other components.

I had a few concern like
such as "find_package(OpenMC)", but if my openmc is not installed to /usr/ there is no OpenMC.config for cmake to find package. if it is requred to install openmc to /usr, it should be stated in readme.md?

================== 1) ======================================
cmake is fine, but make got error like this. and later "openmc/bank.h"

/home/jovyan/parametric-plasma-source/parametric_plasma_source/source_generator.cpp:4:10: fatal error: pugixml.hpp: No such file or directory
4 | #include "pugixml.hpp"
| ^~~~~~~~~~~~~

The solution, could be
replace:
target_include_directories(source_generator PUBLIC ${OPENMC_DIR}/vendor/pugixml)

to use openmc repo's

target_include_directories(source_generator PUBLIC ${OPENMC_DIR}/vendor/pugixml/src)

to use the git submodule

target_include_directories(source_generator PUBLIC ${PROJECT_SOURCE_DIR}/pugixml/src)

=========== 2) =========
I do not understand, why?

if(OpenMC_FOUND)
  # Build the source_sampling OpenMC plugin if OpenMC is available
  set(OPENMC_INC_DIR ${OpenMC_DIR}/../../../include/openmc)
  set(OPENMC_LIB_DIR ${OpenMC_DIR}/../../../lib)

is that because, I am on master branch, some cmake edit has not been merged?

=========== 3) ============
the installation guide, said "make install" but python binary module should not install to "/usr/lib"? anyway, I have not yet get this step to test out

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions