Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
qingfengxia opened this issue Nov 9, 2020 · 2 comments

Comments

@qingfengxia
Copy link

qingfengxia commented Nov 9, 2020

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

@makeclean
Copy link
Contributor

makeclean commented Nov 9, 2020 via email

@qingfengxia
Copy link
Author

Thank you, Hopefully Dan's new PR may fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants