diff options
author | Siva Chandra Reddy <sivachandra@google.com> | 2023-05-16 18:02:20 +0000 |
---|---|---|
committer | Siva Chandra Reddy <sivachandra@google.com> | 2023-05-16 20:55:36 +0000 |
commit | 9d877369b7527785f3fea202fea7525e328780f0 (patch) | |
tree | ff1c93369c61dd42bdc38ae1bae2af180c65f9ed /libc/test | |
parent | 3ae4265b48c51e6c05252607171b76e189fa2e4f (diff) | |
download | llvm-9d877369b7527785f3fea202fea7525e328780f0.tar.gz |
[libc] Remove *TestMain libraries and combine them with the main test libraries.
There are not tests currently which use the main test framework but not
the `main` function from LibcTestMain.cpp. So, this change essentially
simplifies by merging the *TestMain libraries with the main test
libraries.
Reviewed By: michaelrj, jhuber6
Differential Revision: https://reviews.llvm.org/D150698
Diffstat (limited to 'libc/test')
-rw-r--r-- | libc/test/UnitTest/CMakeLists.txt | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/libc/test/UnitTest/CMakeLists.txt b/libc/test/UnitTest/CMakeLists.txt index 7a54d502b50c..7f6e782815c8 100644 --- a/libc/test/UnitTest/CMakeLists.txt +++ b/libc/test/UnitTest/CMakeLists.txt @@ -1,9 +1,10 @@ set(libc_test_srcs_common - Test.h - LibcTest.cpp CmakeFilePath.cpp - LibcTest.h + LibcTest.cpp + LibcTestMain.cpp TestLogger.cpp + LibcTest.h + Test.h TestLogger.h ) @@ -36,23 +37,7 @@ add_library( HermeticTestUtils.cpp ) -add_library( - LibcUnitTestMain - ${library_type} - EXCLUDE_FROM_ALL - LibcTestMain.cpp -) -add_dependencies(LibcUnitTestMain LibcUnitTest) - -add_library( - LibcHermeticTestMain - ${library_type} - EXCLUDE_FROM_ALL - LibcTestMain.cpp -) -add_dependencies(LibcHermeticTestMain LibcHermeticTest) - -foreach(lib LibcUnitTest LibcUnitTestMain LibcHermeticTest LibcHermeticTestMain) +foreach(lib LibcUnitTest LibcHermeticTest) target_include_directories(${lib} PUBLIC ${LIBC_SOURCE_DIR}) target_compile_options(${lib} PRIVATE -fno-exceptions -fno-rtti) add_dependencies(${lib} @@ -65,11 +50,9 @@ foreach(lib LibcUnitTest LibcUnitTestMain LibcHermeticTest LibcHermeticTestMain) ) endforeach() -foreach(lib LibcHermeticTest LibcHermeticTestMain) - target_include_directories(${lib} PRIVATE ${LIBC_BUILD_DIR}/include) - target_compile_options(${lib} - PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS} -ffreestanding -nostdlib -nostdlib++) -endforeach() +target_include_directories(LibcHermeticTest PRIVATE ${LIBC_BUILD_DIR}/include) +target_compile_options(LibcHermeticTest + PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS} -ffreestanding -nostdlib -nostdlib++) add_header_library( string_utils |