Skip to content

CMake: Multi-Config Generator#1384

Merged
ax3l merged 3 commits intoopenPMD:devfrom
ax3l:fix-examples-pdb
Mar 20, 2023
Merged

CMake: Multi-Config Generator#1384
ax3l merged 3 commits intoopenPMD:devfrom
ax3l:fix-examples-pdb

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Mar 1, 2023

Set target properties for multi-config generators.

Fix #1383

Regression to #1326

Set target properties for multi-config generators.
@ax3l ax3l added this to the 0.15.0 milestone Mar 1, 2023
ax3l added a commit to ax3l/cmake-easyinstall that referenced this pull request Mar 1, 2023
@ax3l
Copy link
Member Author

ax3l commented Mar 1, 2023

Hm, does not yet work. Seems to actually collide on a vc143.pdb file in the runtime dir...

Update: solved by setting the COMPILE_PDB_NAME[_CFG] output name target properties.
Contrary to PDB_NAME, the default here is unspecified and seems to default to vc143.pdb

ax3l added a commit to ax3l/cmake-easyinstall that referenced this pull request Mar 20, 2023
@ax3l ax3l changed the title CMake: Multi-Config Generator Quickfix CMake: Multi-Config Generator Mar 20, 2023
Contrary to `PDB_NAME`, the default here is unspecified
and seems to default to `vc143.pdb`
ax3l added a commit to ax3l/cmake-easyinstall that referenced this pull request Mar 20, 2023
@ax3l
Copy link
Member Author

ax3l commented Mar 20, 2023

@franzpoeschel ok, now the parallel build works and is not a hack anymore :)

@franzpoeschel
Copy link
Contributor

Nice!

So, what was missing is the COMPILE_PDB_NAME so that the different processes don't try accessing the same file?

@ax3l
Copy link
Member Author

ax3l commented Mar 20, 2023

Yes, exactly. Seems it was unspecified and collided for different executables we build in parallel.
I added an update here: #1384 (comment)

@franzpoeschel
Copy link
Contributor

I actually saw a similar issue in another of my PRs today (the eternal #824), I'll have to rebase and see if this fixes it :)

Copy link
Contributor

@franzpoeschel franzpoeschel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ax3l ax3l enabled auto-merge (squash) March 20, 2023 18:16
@ax3l ax3l merged commit bf385dd into openPMD:dev Mar 20, 2023
@ax3l ax3l deleted the fix-examples-pdb branch March 20, 2023 20:19
set_target_properties(openPMD.py PROPERTIES
COMPILE_PDB_NAME_${CFG_UPPER} openpmd_api_cxx
ARCHIVE_OUTPUT_DIRECTORY_${CFG_UPPER} ${openPMD_PYTHON_OUTPUT_DIRECTORY}/${CFG}/openpmd_api
LIBRARY_OUTPUT_DIRECTORY_${CFG_UPPER} ${openPMD_PYTHON_OUTPUT_DIRECTORY}/${CFG}/openpmd_api
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke my slightly arcane logic in setup.py for Windows.
Fix in #1400

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Examples: Fix Windows PDB

2 participants