-
Notifications
You must be signed in to change notification settings - Fork 35
C++20 module support #105
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
base: develop
Are you sure you want to change the base?
C++20 module support #105
Changes from all commits
fc52022
3d6703b
ca5e12b
0f5e4ac
f412580
17b3387
6d4c13c
cbbb162
eef66a8
afbc1f8
399ade9
f5763b8
29ef890
0df3ae6
b757c78
bece0c7
6acac98
4aa1151
13ce5d2
a5bf8c8
e29bc2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -337,13 +337,20 @@ function(boost_install_target) | |
| string(APPEND CONFIG_INSTALL_DIR "-static") | ||
| endif() | ||
|
|
||
| # C++20 modules supported since CMake 3.28 | ||
| set(__BOOST_INSTALL_FILE_SET_ARGS) | ||
| if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28) | ||
| set(__BOOST_INSTALL_FILE_SET_ARGS FILE_SET CXX_MODULES DESTINATION "${CMAKE_INSTALL_DATADIR}") | ||
| endif() | ||
|
|
||
| install(TARGETS ${LIB} EXPORT ${LIB}-targets | ||
| # explicit destination specification required for 3.13, 3.14 no longer needs it | ||
| RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" | ||
| LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
| ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
| PRIVATE_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
| PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does install actually work without specifying Also such installation approach won't work for both headers and modules users simultaneously if Boost library is not header-only. Because installed .a or .so library will contain symbols attached to the target module (with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ${__BOOST_INSTALL_FILE_SET_ARGS} | ||
| ) | ||
|
|
||
| export(TARGETS ${LIB} NAMESPACE Boost:: FILE export/${LIB}-targets.cmake) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anarthal ! I believe that it is also required to set
CXX_MODULES_BMI DESTINATION ""to not install the BMI (because it is compiler/version specific and should be build from module interface unit and public headers)as CMake documentation says
I am not pretty sure whether BMI is installed with unset
CXX_MODULES_BMIbut explicit option specification seems more straightforward wayThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
CXX_MODULES_BMIcan be omitted, it is as wrong designedinstalloption! The installed BMI files are never used fromCMake!