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

fix(cmake): ensure D is automounted when using toolchain #679

Conversation

ReenigneArcher
Copy link

@ReenigneArcher ReenigneArcher commented Oct 19, 2024

When using the toolchain file, the "D" drive is not automounted as it is when using the Makefile options. This PR fixes that using the same conditions as the Makefile option.

Otherwise you must add extra bits to the code to automount, such as https://github.com/abaire/nxdk_pgraph_tests/blob/4b7934e6d612a6d17f9ec229a2d72601a5caefc4/src/main.cpp#L118-L122

This was discussed on the discord server here: https://discord.com/channels/428359196719972353/428399682239332354/1296626606688833617

It may be better to use a cmake "option" with the value set to ON by default, and OFF when it desired to disable. This would be more standard for CMake, just let me know which way is preferred.

Edit: converted to draft as during my first test I had not cleared the cmake cache, thus the toolchain was not fully reloaded. Need to fix some things.

@ReenigneArcher ReenigneArcher force-pushed the fix/cmake/ensure-D-is-automounted-when-using-toolchain branch from 40fc3e8 to cff768a Compare October 19, 2024 01:22
@ReenigneArcher ReenigneArcher marked this pull request as draft October 19, 2024 02:19
@ReenigneArcher
Copy link
Author

I will close this, as I don't know how to fix this using the toolchain by itself, but adding set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -include:_automount_d_drive") to the project's main cmake file seems to work fine.

It requires some other configuration as well, e.g. https://github.com/abaire/nxdk_pgraph_tests/blob/4b7934e6d612a6d17f9ec229a2d72601a5caefc4/CMakeLists.txt#L22

@ReenigneArcher ReenigneArcher deleted the fix/cmake/ensure-D-is-automounted-when-using-toolchain branch October 19, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant