xref: /llvm-project/libc/test/integration/src/stdio/CMakeLists.txt (revision d727eecfa65fa906066783ca2cafa80ee1437798)
1if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
2  add_subdirectory(${LIBC_TARGET_OS})
3endif()
4add_custom_target(stdio-integration-tests)
5add_dependencies(libc-integration-tests stdio-integration-tests)
6
7# These tests are not for correctness testing, but are instead a convenient way
8# to generate hermetic binaries for comparitive binary size testing.
9# FIXME: This test fails on AMDGPU so we disable it temporarily.
10if(NOT LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
11  add_integration_test(
12    sprintf_size_test
13    SUITE
14      stdio-integration-tests
15    SRCS
16      sprintf_size_test.cpp
17    DEPENDS
18      libc.src.stdio.sprintf
19    ARGS
20      "%s %c %d"
21      "First arg"
22      "a"
23      "0"
24  )
25endif()
26
27add_integration_test(
28  sprintf_size_test_no_sprintf
29  SUITE
30    stdio-integration-tests
31  SRCS
32    sprintf_size_test.cpp
33  ARGS
34    "%s %c %d"
35    "First arg"
36    "a"
37    "0"
38  COMPILE_OPTIONS
39    -DINTEGRATION_DISABLE_PRINTF
40)
41