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

Enable C++ Modules #385

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open

Enable C++ Modules #385

wants to merge 50 commits into from

Conversation

imorlxs
Copy link
Member

@imorlxs imorlxs commented Aug 14, 2024

This PR enables C++ Modules in BioDynaMo.
IMPORTANT: Notebooks don't work with this PR
Please don't merge it for now

@imorlxs imorlxs marked this pull request as draft August 14, 2024 10:10
@imorlxs imorlxs force-pushed the cppmodules branch 2 times, most recently from 8fb2c21 to 5de61fe Compare August 23, 2024 09:39
set(NO_MODULE "NO_CXXMODULE")
endif()

if (NOT ${TARGET} STREQUAL "biodynamo")
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 if can be removed as is not longer necessary

add_custom_command(TARGET ${TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${DICT_FILE}_rdict.pcm ${CMAKE_INSTALL_LIBDIR})
# add_custom_command(TARGET ${TARGET}
Copy link
Member Author

Choose a reason for hiding this comment

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

Also, this code is not longer necessary, as ROOT_GENERATE_DICTIONARY already generates the .pcm in CMAKE_INSTALL_LIBDIR

#find_package(GCCXML)

# We use the launcher script to emulate a `source thisbdm.sh` call
if(NOT BDM_OUT_OF_SOURCE)
set(LAUNCHER ${CMAKE_BINARY_DIR}/launcher.sh)
endif()

#----------------------------------------------------------------------------
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 function is now in RootMacros.cmake, imported from the root source code.

@imorlxs imorlxs marked this pull request as ready for review December 11, 2024 01:28
@imorlxs
Copy link
Member Author

imorlxs commented Dec 11, 2024

Could you review the code? @LukasBreitwieser @FonsRademakers @TobiasDuswald Feel free to request as many changes as needed. I want to know how I'm doing, and try to improve my code.
Thank you!

P.D.: Also, if I need to clean the commit history, or any another change, please tell me :)
Out-of-tree builds work now, but some demos doesn't work due to some template classes messing with the modules.

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

Successfully merging this pull request may close these issues.

2 participants