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:
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()