Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2019-09-25 18:31:49 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2019-09-25 18:31:49 +0300
commitaea9a0bda5ffc7aac4ba5e8c6582893b7aad7d90 (patch)
treed5209ec744135e580d7702636064dfe37b7cd9f0 /CMakeLists.txt
parenta3942420524c91179009e06b9d77cfb4326dcf7f (diff)
LLFIO is now make installable and cmake find_package()-able, which should implement cmake hunter support.
Significantly slimmed down the headers being dragged in by the default LLFIO include, specifically that outcome<T> is no longer dragged in, and: - #36 Async file i/o and storage profile have been modularised out of the default headers. - #36 Mapped file i/o can be modularised out of the default headers. Changed barrier kind to class enum, as per latest WG21 spec.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e04a3638..c1420f33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,7 +138,7 @@ if(MSVC)
endif()
endif()
if(CLANG OR GCC)
- CheckCXXHasCoroutines(_CLANG_GCC "-std=c++14 -fcoroutines-ts")
+ CheckCXXHasCoroutines(_CLANG_GCC "-fcoroutines-ts")
if(CXX_HAS_COROUTINES_CLANG_GCC)
all_compile_options(PUBLIC "-fcoroutines-ts")
all_compile_definitions(PUBLIC "LLFIO_HAVE_COROUTINES=1")
@@ -176,6 +176,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
all_link_libraries(PUBLIC ${libcxx_cxxexperimental})
endif()
# Set any macros this library requires
+all_compile_definitions(PRIVATE LLFIO_INCLUDE_ASYNC_FILE_HANDLE=1 LLFIO_INCLUDE_STORAGE_PROFILE=1)
+foreach(target ${llfio_EXAMPLE_TARGETS})
+ target_compile_definitions(${target} PRIVATE LLFIO_INCLUDE_ASYNC_FILE_HANDLE=1 LLFIO_INCLUDE_STORAGE_PROFILE=1)
+endforeach()
if(LLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE)
all_compile_definitions(PUBLIC LLFIO_EXPERIMENTAL_STATUS_CODE=1)
endif()
@@ -208,7 +212,10 @@ endif()
# For all possible configurations of this library, add each test
include(QuickCppLibMakeStandardTests)
-# For each test target, link to kerneltest
+# For each test target, set definitions and linkage
+foreach(target ${llfio_COMPILE_TEST_TARGETS} ${llfio_TEST_TARGETS})
+ target_compile_definitions(${target} PRIVATE LLFIO_INCLUDE_ASYNC_FILE_HANDLE=1 LLFIO_INCLUDE_STORAGE_PROFILE=1)
+endforeach()
foreach(test_target ${llfio_TEST_TARGETS})
target_link_libraries(${test_target} PRIVATE kerneltest::hl)
endforeach()