Home | History | Annotate | Download | only in include
      1 set(files
      2   __bit_reference
      3   __bsd_locale_defaults.h
      4   __bsd_locale_fallbacks.h
      5   __errc
      6   __debug
      7   __functional_03
      8   __functional_base
      9   __functional_base_03
     10   __hash_table
     11   __libcpp_version
     12   __locale
     13   __mutex_base
     14   __node_handle
     15   __nullptr
     16   __split_buffer
     17   __sso_allocator
     18   __std_stream
     19   __string
     20   __threading_support
     21   __tree
     22   __tuple
     23   __undef_macros
     24   algorithm
     25   any
     26   array
     27   atomic
     28   bit
     29   bitset
     30   cassert
     31   ccomplex
     32   cctype
     33   cerrno
     34   cfenv
     35   cfloat
     36   charconv
     37   chrono
     38   cinttypes
     39   ciso646
     40   climits
     41   clocale
     42   cmath
     43   codecvt
     44   compare
     45   complex
     46   complex.h
     47   condition_variable
     48   csetjmp
     49   csignal
     50   cstdarg
     51   cstdbool
     52   cstddef
     53   cstdint
     54   cstdio
     55   cstdlib
     56   cstring
     57   ctgmath
     58   ctime
     59   ctype.h
     60   cwchar
     61   cwctype
     62   deque
     63   errno.h
     64   exception
     65   experimental/__config
     66   experimental/__memory
     67   experimental/algorithm
     68   experimental/any
     69   experimental/chrono
     70   experimental/coroutine
     71   experimental/deque
     72   experimental/filesystem
     73   experimental/forward_list
     74   experimental/functional
     75   experimental/iterator
     76   experimental/list
     77   experimental/map
     78   experimental/memory_resource
     79   experimental/numeric
     80   experimental/optional
     81   experimental/propagate_const
     82   experimental/ratio
     83   experimental/regex
     84   experimental/set
     85   experimental/simd
     86   experimental/string
     87   experimental/string_view
     88   experimental/system_error
     89   experimental/tuple
     90   experimental/type_traits
     91   experimental/unordered_map
     92   experimental/unordered_set
     93   experimental/utility
     94   experimental/vector
     95   ext/__hash
     96   ext/hash_map
     97   ext/hash_set
     98   filesystem
     99   float.h
    100   forward_list
    101   fstream
    102   functional
    103   future
    104   initializer_list
    105   inttypes.h
    106   iomanip
    107   ios
    108   iosfwd
    109   iostream
    110   istream
    111   iterator
    112   limits
    113   limits.h
    114   list
    115   locale
    116   locale.h
    117   map
    118   math.h
    119   memory
    120   module.modulemap
    121   mutex
    122   new
    123   numeric
    124   optional
    125   ostream
    126   queue
    127   random
    128   ratio
    129   regex
    130   scoped_allocator
    131   set
    132   setjmp.h
    133   shared_mutex
    134   span
    135   sstream
    136   stack
    137   stdbool.h
    138   stddef.h
    139   stdexcept
    140   stdint.h
    141   stdio.h
    142   stdlib.h
    143   streambuf
    144   string
    145   string.h
    146   string_view
    147   strstream
    148   system_error
    149   tgmath.h
    150   thread
    151   tuple
    152   type_traits
    153   typeindex
    154   typeinfo
    155   unordered_map
    156   unordered_set
    157   utility
    158   valarray
    159   variant
    160   vector
    161   version
    162   wchar.h
    163   wctype.h
    164   )
    165 
    166 if(LIBCXX_INSTALL_SUPPORT_HEADERS)
    167   set(files
    168     ${files}
    169     support/android/locale_bionic.h
    170     support/fuchsia/xlocale.h
    171     support/ibm/limits.h
    172     support/ibm/locale_mgmt_aix.h
    173     support/ibm/support.h
    174     support/ibm/xlocale.h
    175     support/musl/xlocale.h
    176     support/newlib/xlocale.h
    177     support/solaris/floatingpoint.h
    178     support/solaris/wchar.h
    179     support/solaris/xlocale.h
    180     support/win32/limits_msvc_win32.h
    181     support/win32/locale_win32.h
    182     support/xlocale/__nop_locale_mgmt.h
    183     support/xlocale/__posix_l_fallback.h
    184     support/xlocale/__strtonum_fallback.h
    185     support/xlocale/xlocale.h
    186     )
    187 endif()
    188 
    189 if (LIBCXX_NEEDS_SITE_CONFIG)
    190   # Generate a custom __config header. The new header is created
    191   # by prepending __config_site to the current __config header.
    192   add_custom_command(OUTPUT ${LIBCXX_BINARY_DIR}/__generated_config
    193     COMMAND ${PYTHON_EXECUTABLE} ${LIBCXX_SOURCE_DIR}/utils/cat_files.py
    194       ${LIBCXX_BINARY_DIR}/__config_site
    195       ${LIBCXX_SOURCE_DIR}/include/__config
    196       -o ${LIBCXX_BINARY_DIR}/__generated_config
    197     DEPENDS ${LIBCXX_SOURCE_DIR}/include/__config
    198             ${LIBCXX_BINARY_DIR}/__config_site
    199   )
    200   # Add a target that executes the generation commands.
    201   add_custom_target(cxx-generated-config ALL
    202     DEPENDS ${LIBCXX_BINARY_DIR}/__generated_config)
    203   set(generated_config_deps cxx-generated-config)
    204 else()
    205   set(files
    206     ${files}
    207     __config
    208     )
    209 endif()
    210 
    211 if(NOT LIBCXX_USING_INSTALLED_LLVM AND LIBCXX_HEADER_DIR)
    212   set(output_dir ${LIBCXX_HEADER_DIR}/include/c++/v1)
    213 
    214   set(out_files)
    215   foreach(f ${files})
    216     set(src ${CMAKE_CURRENT_SOURCE_DIR}/${f})
    217     set(dst ${output_dir}/${f})
    218     add_custom_command(OUTPUT ${dst}
    219       DEPENDS ${src}
    220       COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
    221       COMMENT "Copying CXX header ${f}")
    222     list(APPEND out_files ${dst})
    223   endforeach()
    224 
    225   if (LIBCXX_NEEDS_SITE_CONFIG)
    226     # Copy the generated header as __config into build directory.
    227     set(src ${LIBCXX_BINARY_DIR}/__generated_config)
    228     set(dst ${output_dir}/__config)
    229     add_custom_command(OUTPUT ${dst}
    230         DEPENDS ${src} ${generated_config_deps}
    231         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
    232         COMMENT "Copying CXX __config")
    233     list(APPEND out_files ${dst})
    234   endif()
    235 
    236   add_custom_target(cxx-headers ALL DEPENDS ${out_files} ${LIBCXX_CXX_ABI_HEADER_TARGET})
    237 else()
    238   add_custom_target(cxx-headers)
    239 endif()
    240 set_target_properties(cxx-headers PROPERTIES FOLDER "Misc")
    241 
    242 if (LIBCXX_INSTALL_HEADERS)
    243   foreach(file ${files})
    244     get_filename_component(dir ${file} DIRECTORY)
    245     install(FILES ${file}
    246       DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
    247       COMPONENT cxx-headers
    248       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
    249     )
    250   endforeach()
    251 
    252   if (LIBCXX_NEEDS_SITE_CONFIG)
    253     # Install the generated header as __config.
    254     install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
    255       DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
    256       PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
    257       RENAME __config
    258       COMPONENT cxx-headers)
    259   endif()
    260 
    261   if (NOT CMAKE_CONFIGURATION_TYPES)
    262     add_custom_target(install-cxx-headers
    263                       DEPENDS cxx-headers ${generated_config_deps}
    264                       COMMAND "${CMAKE_COMMAND}"
    265                               -DCMAKE_INSTALL_COMPONENT=cxx-headers
    266                               -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
    267     # Stripping is a no-op for headers
    268     add_custom_target(install-cxx-headers-stripped DEPENDS install-cxx-headers)
    269 
    270     add_custom_target(install-libcxx-headers DEPENDS install-cxx-headers)
    271     add_custom_target(install-libcxx-headers-stripped DEPENDS install-cxx-headers-stripped)
    272   endif()
    273 endif()
    274