From f00567ecebadc9759e83fc7ace3415c66b549639 Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Fri, 19 Aug 2022 21:51:40 +0000 Subject: [PATCH] [libc][NFC] Move blockstore out of the CPP folder --- libc/src/__support/CMakeLists.txt | 6 ++++++ libc/src/__support/CPP/CMakeLists.txt | 6 ------ libc/src/__support/{CPP => }/blockstore.h | 0 libc/src/stdlib/CMakeLists.txt | 2 +- libc/src/stdlib/atexit.cpp | 2 +- libc/test/src/__support/CMakeLists.txt | 10 ++++++++++ libc/test/src/__support/CPP/CMakeLists.txt | 10 ---------- libc/test/src/__support/{CPP => }/blockstore_test.cpp | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) rename libc/src/__support/{CPP => }/blockstore.h (100%) rename libc/test/src/__support/{CPP => }/blockstore_test.cpp (98%) diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt index 0061f14dbfcf..b50986f2c08b 100644 --- a/libc/src/__support/CMakeLists.txt +++ b/libc/src/__support/CMakeLists.txt @@ -1,5 +1,11 @@ add_subdirectory(CPP) +add_header_library( + blockstore + HDRS + blockstore.h +) + add_header_library( common HDRS diff --git a/libc/src/__support/CPP/CMakeLists.txt b/libc/src/__support/CPP/CMakeLists.txt index 1a03710c6f70..9937c951c5d6 100644 --- a/libc/src/__support/CPP/CMakeLists.txt +++ b/libc/src/__support/CPP/CMakeLists.txt @@ -102,12 +102,6 @@ add_header_library( atomic.h ) -add_header_library( - blockstore - HDRS - blockstore.h -) - add_header_library( error HDRS diff --git a/libc/src/__support/CPP/blockstore.h b/libc/src/__support/blockstore.h similarity index 100% rename from libc/src/__support/CPP/blockstore.h rename to libc/src/__support/blockstore.h diff --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt index 8ad582ebaa73..d3dd5b2068b0 100644 --- a/libc/src/stdlib/CMakeLists.txt +++ b/libc/src/stdlib/CMakeLists.txt @@ -287,7 +287,7 @@ add_entrypoint_object( 20 # For constinit of the atexit callback list. DEPENDS libc.src.__support.fixedvector - libc.src.__support.CPP.blockstore + libc.src.__support.blockstore libc.src.__support.threads.mutex ) diff --git a/libc/src/stdlib/atexit.cpp b/libc/src/stdlib/atexit.cpp index 806e2c050162..7725463b8eb7 100644 --- a/libc/src/stdlib/atexit.cpp +++ b/libc/src/stdlib/atexit.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// #include "src/stdlib/atexit.h" -#include "src/__support/CPP/blockstore.h" +#include "src/__support/blockstore.h" #include "src/__support/common.h" #include "src/__support/fixedvector.h" #include "src/__support/threads/mutex.h" diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt index 2f9c4e726762..893e33166ef4 100644 --- a/libc/test/src/__support/CMakeLists.txt +++ b/libc/test/src/__support/CMakeLists.txt @@ -1,5 +1,15 @@ add_libc_testsuite(libc_support_unittests) +add_libc_unittest( + blockstore_test + SUITE + libc_support_unittests + SRCS + blockstore_test.cpp + DEPENDS + libc.src.__support.blockstore +) + add_libc_unittest( endian_test SUITE diff --git a/libc/test/src/__support/CPP/CMakeLists.txt b/libc/test/src/__support/CPP/CMakeLists.txt index 5bc486038673..e958b4b85b97 100644 --- a/libc/test/src/__support/CPP/CMakeLists.txt +++ b/libc/test/src/__support/CPP/CMakeLists.txt @@ -71,16 +71,6 @@ add_libc_unittest( libc.src.__support.CPP.atomic ) -add_libc_unittest( - blockstore_test - SUITE - libc_cpp_utils_unittests - SRCS - blockstore_test.cpp - DEPENDS - libc.src.__support.CPP.blockstore -) - add_libc_unittest( stringstream_test SUITE diff --git a/libc/test/src/__support/CPP/blockstore_test.cpp b/libc/test/src/__support/blockstore_test.cpp similarity index 98% rename from libc/test/src/__support/CPP/blockstore_test.cpp rename to libc/test/src/__support/blockstore_test.cpp index a9f00283dad5..3edbb920144b 100644 --- a/libc/test/src/__support/CPP/blockstore_test.cpp +++ b/libc/test/src/__support/blockstore_test.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "src/__support/CPP/blockstore.h" +#include "src/__support/blockstore.h" #include "utils/UnitTest/Test.h" struct Element {