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

Temporary Directory Dependency in CMake Configuration #3160

Open
ahnaf-tahmid-chowdhury opened this issue Oct 5, 2024 · 0 comments
Open

Comments

@ahnaf-tahmid-chowdhury
Copy link
Contributor

Description

During the wheel testing process for OpenMC PR #3087, the build configuration uses the OpenMCTargets.cmake file to fetch relevant information for the OpenMC library. The target sets the _IMPORT_PREFIX variable to a /tmp directory during the building process. However, this causes issues during test runs because the /tmp directory is already deleted by the time the test runs, leading to failures in finding required files.

Current Behavior

  • The OpenMCTargets.cmake file defines the installation prefix _IMPORT_PREFIX to a temporary path (/tmp/...).
  • After the wheel is built, the /tmp directory gets removed, causing the test process to fail when trying to access the necessary files.

Proposed Solution

Redesign OpenMCConfig.cmake:

  1. Remove the reliance on the OpenMCTargets.cmake file.
  2. Manually set the necessary variables in OpenMCConfig.cmake, which will be configured during the initialization of the CMake process.
  3. This approach ensures the variables are correctly configured for the wheel installation and test runs, without relying on paths in /tmp that no longer exist.

Impact of Removing Target Dependency

Since the target settings are causing issues due to reliance on the temporary directory, removing the dependency on OpenMCTargets.cmake seems necessary to avoid failures during the test phase of the pip wheel build.

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

1 participant