forked from anarthal/boost-modules-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de8e1a7
commit b220f11
Showing
4 changed files
with
85 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
find_dependency(OpenSSL) | ||
|
||
function (add_asio_module NAME) | ||
set(ASIO_ROOT @CMAKE_INSTALL_PREFIX@) | ||
message("Root is: ${ASIO_ROOT}") | ||
add_library(${NAME}) | ||
target_include_directories(${NAME} PRIVATE ${ASIO_ROOT}/include) | ||
target_compile_features(${NAME} PUBLIC cxx_std_23) | ||
target_compile_options(${NAME} PRIVATE -Wno-include-angled-in-module-purview) | ||
if(DEFINED CPPdefinitions) | ||
target_compile_definitions(${NAME} PUBLIC ${CPPdefinitions}) | ||
endif() | ||
target_sources(${NAME} | ||
PUBLIC | ||
FILE_SET modules_public TYPE CXX_MODULES BASE_DIRS ${ASIO_ROOT} FILES | ||
${ASIO_ROOT}/module/asio.cxx | ||
) | ||
target_link_libraries(${NAME} PUBLIC OpenSSL::SSL OpenSSL::Crypto) | ||
function(add_asio_module NAME) | ||
set(ASIO_ROOT @CMAKE_INSTALL_PREFIX@) | ||
message("Root is: ${ASIO_ROOT}") | ||
add_library(${NAME}) | ||
target_include_directories(${NAME} PRIVATE ${ASIO_ROOT}/include) | ||
target_compile_features(${NAME} PUBLIC cxx_std_23) | ||
target_compile_options(${NAME} PRIVATE -Wno-include-angled-in-module-purview) | ||
if(DEFINED CPPdefinitions) | ||
target_compile_definitions(${NAME} PUBLIC ${CPPdefinitions}) | ||
endif() | ||
# cmake-format: off | ||
target_sources(${NAME} PUBLIC | ||
FILE_SET modules_public | ||
TYPE CXX_MODULES | ||
BASE_DIRS ${ASIO_ROOT} | ||
FILES | ||
${ASIO_ROOT}/module/asio.cxx | ||
) | ||
# cmake-format: on | ||
target_link_libraries(${NAME} PUBLIC OpenSSL::SSL OpenSSL::Crypto) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#ifdef USE_MODULES | ||
# ifndef __APPLE__ | ||
# ifndef XXX__APPLE__ | ||
import std; | ||
import std.compat; | ||
# else | ||
|