compiletools 5.3.3__tar.gz → 6.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. {compiletools-5.3.3 → compiletools-6.0.2}/PKG-INFO +58 -13
  2. {compiletools-5.3.3 → compiletools-6.0.2}/pyproject.toml +9 -3
  3. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-cache-clean.rst +1 -1
  4. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-cache.rst +1 -1
  5. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-cake.rst +35 -20
  6. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-commandline.rst +1 -1
  7. compiletools-6.0.2/src/compiletools/README.ct-compilation-database.rst +127 -0
  8. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-config.rst +1 -1
  9. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-cppdeps.rst +11 -10
  10. compiletools-6.0.2/src/compiletools/README.ct-doc.rst +141 -0
  11. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-filelist.rst +1 -1
  12. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-findtargets.rst +1 -1
  13. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-gitroot.rst +1 -1
  14. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-headertree.rst +1 -1
  15. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-jobs.rst +1 -1
  16. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-list-variants.rst +1 -1
  17. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/README.ct-magicflags.rst +29 -8
  18. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/apptools.py +56 -4
  19. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/cake.py +4 -11
  20. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/compilation_database.py +9 -13
  21. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/compiler_macros.py +4 -1
  22. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/config.py +1 -1
  23. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/configutils.py +5 -0
  24. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/cppdeps.py +1 -1
  25. compiletools-6.0.2/src/compiletools/ct.conf.d/ct.conf +14 -0
  26. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/dirnamer.py +3 -79
  27. compiletools-6.0.2/src/compiletools/file_analyzer.py +1331 -0
  28. compiletools-6.0.2/src/compiletools/filesystem_utils.py +119 -0
  29. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/findtargets.py +46 -23
  30. compiletools-6.0.2/src/compiletools/git_sha_report.py +231 -0
  31. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/global_hash_registry.py +84 -27
  32. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/headerdeps.py +209 -128
  33. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/hunter.py +113 -79
  34. compiletools-6.0.2/src/compiletools/magicflags.py +922 -0
  35. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/makefile.py +213 -77
  36. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/namer.py +39 -34
  37. compiletools-6.0.2/src/compiletools/preprocessing_cache.py +555 -0
  38. compiletools-6.0.2/src/compiletools/samples/hunter_macro_propagation/README.md +47 -0
  39. compiletools-6.0.2/src/compiletools/samples/hunter_macro_propagation/app.cpp +9 -0
  40. compiletools-6.0.2/src/compiletools/samples/hunter_macro_propagation/config.h +7 -0
  41. compiletools-6.0.2/src/compiletools/samples/hunter_macro_propagation/renderer.h +4 -0
  42. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/pytest_test.py +6 -6
  43. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/test_exposes_bug.py +3 -3
  44. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/test_macro_state_bug.py +4 -4
  45. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/test_macro_state_dependency.py +30 -9
  46. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/simple_preprocessor.py +283 -316
  47. compiletools-6.0.2/src/compiletools/stringzilla_utils.py +160 -0
  48. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_base.py +59 -21
  49. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_cake.py +59 -9
  50. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_compilation_database.py +7 -10
  51. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_environment_assumptions.py +15 -6
  52. compiletools-6.0.2/src/compiletools/test_fd_fix_integration.py +317 -0
  53. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_file_analyzer.py +30 -25
  54. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_file_analyzer_integration.py +24 -24
  55. compiletools-6.0.2/src/compiletools/test_filesystem_utils.py +155 -0
  56. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_findtargets.py +1 -0
  57. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_headerdeps.py +1 -1
  58. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_hunter.py +1 -1
  59. compiletools-6.0.2/src/compiletools/test_hunter_macro_propagation.py +122 -0
  60. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_listvariants.py +7 -4
  61. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_macro_state_dependency.py +8 -2
  62. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_magicflags.py +115 -105
  63. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_magicpkgconfig.py +11 -10
  64. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_makefile.py +0 -12
  65. compiletools-6.0.2/src/compiletools/test_multiuser_cache.py +984 -0
  66. compiletools-6.0.2/src/compiletools/test_preprocessing_cache.py +557 -0
  67. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_simple_preprocessor.py +294 -132
  68. compiletools-6.0.2/src/compiletools/test_stringzilla_utils.py +279 -0
  69. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/testhelper.py +133 -9
  70. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/utils.py +9 -0
  71. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/version.py +1 -1
  72. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/wrappedos.py +33 -1
  73. compiletools-5.3.3/src/compiletools/README.ct-doc.rst +0 -96
  74. compiletools-5.3.3/src/compiletools/benchmark_file_analyzer_cache.py +0 -258
  75. compiletools-5.3.3/src/compiletools/ct.conf.d/ct.conf +0 -8
  76. compiletools-5.3.3/src/compiletools/diskcache.py +0 -251
  77. compiletools-5.3.3/src/compiletools/file_analyzer.py +0 -919
  78. compiletools-5.3.3/src/compiletools/file_analyzer_cache.py +0 -915
  79. compiletools-5.3.3/src/compiletools/git_sha_report.py +0 -178
  80. compiletools-5.3.3/src/compiletools/magicflags.py +0 -759
  81. compiletools-5.3.3/src/compiletools/memoize.py +0 -19
  82. compiletools-5.3.3/src/compiletools/mmap_oracle_cache.py +0 -871
  83. compiletools-5.3.3/src/compiletools/test_cache_performance.py +0 -258
  84. compiletools-5.3.3/src/compiletools/test_cache_versioning.py +0 -217
  85. compiletools-5.3.3/src/compiletools/test_ctcache_conflicts.py +0 -196
  86. compiletools-5.3.3/src/compiletools/test_ctcache_type_config.py +0 -224
  87. compiletools-5.3.3/src/compiletools/test_mmap_oracle_cache.py +0 -608
  88. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/__init__.py +0 -0
  89. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/create_cmakelists.py +0 -0
  90. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/ct.conf.d/blank.conf +0 -0
  91. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/ct.conf.d/blank.release.conf +0 -0
  92. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/ct.conf.d/clang.debug.conf +0 -0
  93. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/ct.conf.d/clang.release.conf +0 -0
  94. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/ct.conf.d/gcc.debug.conf +0 -0
  95. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/ct.conf.d/gcc.release.conf +0 -0
  96. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/doc.py +0 -0
  97. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/filelist.py +0 -0
  98. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/git_utils.py +0 -0
  99. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/headertree.py +0 -0
  100. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/jobs.py +0 -0
  101. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/listvariants.py +0 -0
  102. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/preprocessor.py +0 -0
  103. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/calculator/add.C +0 -0
  104. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/calculator/add.H +0 -0
  105. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/calculator/calculator.cpp +0 -0
  106. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/calculator/calculator.h +0 -0
  107. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/calculator/main.cpp +0 -0
  108. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/conditional_includes/linux_header.h +0 -0
  109. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/conditional_includes/main.cpp +0 -0
  110. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/conditional_includes/windows_header.h +0 -0
  111. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/aarch64_feature.hpp +0 -0
  112. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/advanced_feature.hpp +0 -0
  113. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/advanced_preprocessor_header.hpp +0 -0
  114. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/advanced_preprocessor_test.cpp +0 -0
  115. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/alt_form_feature.hpp +0 -0
  116. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/arm_feature.hpp +0 -0
  117. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/armcc_feature.hpp +0 -0
  118. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/avx2_optimization.hpp +0 -0
  119. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/basic_feature.hpp +0 -0
  120. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/cache_profiler.hpp +0 -0
  121. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/certificate_validation.hpp +0 -0
  122. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/cflags_feature.hpp +0 -0
  123. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/clang_feature.hpp +0 -0
  124. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/combined_features.hpp +0 -0
  125. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/compiler_builtin_header.hpp +0 -0
  126. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/compiler_builtin_test.cpp +0 -0
  127. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/conditional_header.hpp +0 -0
  128. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/cppflags_feature.hpp +0 -0
  129. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/cpu_profiler.hpp +0 -0
  130. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/custom_allocator.hpp +0 -0
  131. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/cxxflags_feature.hpp +0 -0
  132. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/default_feature.hpp +0 -0
  133. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/detailed_profiler.hpp +0 -0
  134. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/elif_header.hpp +0 -0
  135. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/elif_test.cpp +0 -0
  136. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/emscripten_feature.hpp +0 -0
  137. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/expert_feature.hpp +0 -0
  138. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/expert_mode_base.hpp +0 -0
  139. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/fma_optimization.hpp +0 -0
  140. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/gcc_feature.hpp +0 -0
  141. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/high_optimization.hpp +0 -0
  142. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/intel_feature.hpp +0 -0
  143. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/leak_detector.hpp +0 -0
  144. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/linux_advanced.hpp +0 -0
  145. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/linux_epoll_threading.hpp +0 -0
  146. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/linux_feature.hpp +0 -0
  147. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/main.cpp +0 -0
  148. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/memory_profiler.hpp +0 -0
  149. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/memory_tracker.hpp +0 -0
  150. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/msvc_feature.hpp +0 -0
  151. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/multi_flag_header.hpp +0 -0
  152. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/multi_flag_test.cpp +0 -0
  153. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/nested_macros_header.hpp +0 -0
  154. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/nested_macros_test.cpp +0 -0
  155. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/networking_base.hpp +0 -0
  156. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/numa_threading.hpp +0 -0
  157. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/partial_features.hpp +0 -0
  158. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/profiling_base.hpp +0 -0
  159. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/riscv_feature.hpp +0 -0
  160. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/simd_optimization.hpp +0 -0
  161. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/ssl_networking.hpp +0 -0
  162. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/stack_tracer.hpp +0 -0
  163. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/strict_cert_validation.hpp +0 -0
  164. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/tcc_feature.hpp +0 -0
  165. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/temp_defined.hpp +0 -0
  166. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/temp_still_defined.hpp +0 -0
  167. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/version1_feature.hpp +0 -0
  168. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/version2_feature.hpp +0 -0
  169. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/version3_feature.hpp +0 -0
  170. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/version_205_plus.hpp +0 -0
  171. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/version_ge_2_feature.hpp +0 -0
  172. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/windows_advanced.hpp +0 -0
  173. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/windows_iocp.hpp +0 -0
  174. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/windows_iocp_threading.hpp +0 -0
  175. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cppflags_macros/x86_64_feature.hpp +0 -0
  176. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cross_platform/cross_platform.cpp +0 -0
  177. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cross_platform/cross_platform.hpp +0 -0
  178. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cross_platform/cross_platform_lin.cpp +0 -0
  179. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cross_platform/cross_platform_win.cpp +0 -0
  180. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cross_platform/test_source.cpp +0 -0
  181. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cycle/cycle_a.hpp +0 -0
  182. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cycle/cycle_b.hpp +0 -0
  183. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/cycle/cycle_c.hpp +0 -0
  184. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/dottypaths/d1/d1.cpp +0 -0
  185. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/dottypaths/d1/d1.hpp +0 -0
  186. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/dottypaths/d2/d2.cpp +0 -0
  187. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/dottypaths/d2/d2.hpp +0 -0
  188. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/dottypaths/dottypaths.cpp +0 -0
  189. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/duplicate_flags/main.cpp +0 -0
  190. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/a_widget.cpp +0 -0
  191. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/a_widget.hpp +0 -0
  192. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/red_herring_c_style_2.hpp +0 -0
  193. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/test_factory.cpp +0 -0
  194. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/widget.hpp +0 -0
  195. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/widget_factory.cpp +0 -0
  196. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/widget_factory.hpp +0 -0
  197. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/z_widget.cpp +0 -0
  198. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/factory/z_widget.hpp +0 -0
  199. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/feature_headers/database.h +0 -0
  200. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/feature_headers/feature_config.h +0 -0
  201. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/feature_headers/graphics.h +0 -0
  202. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/feature_headers/logging.h +0 -0
  203. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/feature_headers/main.cpp +0 -0
  204. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/feature_headers/networking.h +0 -0
  205. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/isystem_include_bug/fake_system_include/system/version.h +0 -0
  206. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/isystem_include_bug/main.cpp +0 -0
  207. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/ldflags/conditional_ldflags_test.cpp +0 -0
  208. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/ldflags/version_dependent_ldflags.cpp +0 -0
  209. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/ldflags/version_macro.hpp +0 -0
  210. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/build.sh +0 -0
  211. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/main.cpp +0 -0
  212. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/mylib/get_double.cpp +0 -0
  213. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/mylib/get_double.hpp +0 -0
  214. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/mylib/get_int.cpp +0 -0
  215. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/mylib/get_int.hpp +0 -0
  216. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/mylib/get_numbers.cpp +0 -0
  217. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/library/mylib/get_numbers.hpp +0 -0
  218. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/lotsofmagic/lotsofmagic.cpp +0 -0
  219. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_deps/feature_header.hpp +0 -0
  220. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_deps/feature_x_impl.cpp +0 -0
  221. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_deps/feature_y_impl.cpp +0 -0
  222. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_deps/main.cpp +0 -0
  223. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/README.md +0 -0
  224. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/clean_main.cpp +0 -0
  225. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/config.h +0 -0
  226. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/core.h +0 -0
  227. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/debug.h +0 -0
  228. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/feature.h +0 -0
  229. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/main.cpp +0 -0
  230. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/module_b.h +0 -0
  231. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/release.h +0 -0
  232. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/macro_state_dependency/sample.cpp +0 -0
  233. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magic_processing_order/complex_header.h +0 -0
  234. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magic_processing_order/complex_test.cpp +0 -0
  235. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magic_processing_order/macro_header.h +0 -0
  236. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magic_processing_order/test_macro_transform.cpp +0 -0
  237. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magic_processing_order/traits_header.h +0 -0
  238. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicinclude/main.cpp +0 -0
  239. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicinclude/subdir/important.hpp +0 -0
  240. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicinclude/subdir2/important2.hpp +0 -0
  241. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicinclude/subdir3/important3.hpp +0 -0
  242. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicpkgconfig/main.cpp +0 -0
  243. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicsourceinheader/include_dir/some_header.hpp +0 -0
  244. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/another_header.hpp +0 -0
  245. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/the_code_lin.cpp +0 -0
  246. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/the_code_win.cpp +0 -0
  247. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/magicsourceinheader/main.cpp +0 -0
  248. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/movingheaders/main.cpp +0 -0
  249. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/movingheaders/someheader.hpp +0 -0
  250. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/nestedconfig/gcc.debug.conf +0 -0
  251. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/nestedconfig/nc.cpp +0 -0
  252. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/nestedconfig/subdir/gcc.debug.conf +0 -0
  253. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/nestedconfig/subdir/nc.cpp +0 -0
  254. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/get_double.cpp +0 -0
  255. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/get_double.hpp +0 -0
  256. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/get_int.cpp +0 -0
  257. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/get_int.hpp +0 -0
  258. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/get_numbers.cpp +0 -0
  259. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/get_numbers.hpp +0 -0
  260. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/test_direct_include.cpp +0 -0
  261. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/numbers/test_library.cpp +0 -0
  262. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/pkgconfig/main.cpp +0 -0
  263. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/README.txt +0 -0
  264. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/createfile.cpp +0 -0
  265. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/createfile.hpp +0 -0
  266. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/filename.hpp +0 -0
  267. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/obtainlock.cpp +0 -0
  268. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/obtainlock.hpp +0 -0
  269. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/test_flock_1.cpp +0 -0
  270. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/serialise_tests/test_flock_2.cpp +0 -0
  271. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/simple/helloworld_c.c +0 -0
  272. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/simple/helloworld_cpp.cpp +0 -0
  273. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/simple/test_cflags.c +0 -0
  274. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/version_dependent_api/api_config.h +0 -0
  275. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/version_dependent_api/api_config_new.h +0 -0
  276. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/version_dependent_api/test_main.cpp +0 -0
  277. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/version_dependent_api/test_main_new.cpp +0 -0
  278. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/version_dependent_api/version.h +0 -0
  279. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/samples/version_dependent_api/version_new.h +0 -0
  280. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_apptools.py +0 -0
  281. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_cap.py +0 -0
  282. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_compiler_macros.py +0 -0
  283. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_configutils.py +0 -0
  284. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_cppdeps.py +0 -0
  285. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_library.py +0 -0
  286. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_magicinclude.py +0 -0
  287. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_movingheaders.py +0 -0
  288. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_namer.py +0 -0
  289. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_serialisetests.py +0 -0
  290. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/test_utils.py +0 -0
  291. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/tree.py +0 -0
  292. {compiletools-5.3.3 → compiletools-6.0.2}/src/compiletools/uth_reload.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compiletools
3
- Version: 5.3.3
3
+ Version: 6.0.2
4
4
  Summary: Tools to make compiling C/C++ projects easy
5
5
  Keywords: c++,make,development
6
6
  Author: DrGeoff
@@ -25,7 +25,7 @@ Requires-Dist: stringzilla>=3.0.0
25
25
  Requires-Dist: bump-my-version>=0.26.0 ; extra == 'dev'
26
26
  Requires-Dist: twine>=5.0.0 ; extra == 'dev'
27
27
  Requires-Dist: pytest>=7.0.0 ; extra == 'dev'
28
- Requires-Dist: pytest-xdist>=3.0.0 ; extra == 'dev'
28
+ Requires-Dist: pytest-xdist>=3.5 ; extra == 'dev'
29
29
  Requires-Dist: ruff>=0.12.9 ; extra == 'dev'
30
30
  Requires-Python: >=3.9
31
31
  Project-URL: Download, https://github.com/DrGeoff/compiletools/archive/v{version}.tar.gz
@@ -47,7 +47,7 @@ C/C++ build tools that requires almost no configuration.
47
47
  :Author: drgeoffathome@gmail.com
48
48
  :Date: 2016-08-09
49
49
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
50
- :Version: 5.3.3
50
+ :Version: 6.0.2
51
51
  :Manual section: 1
52
52
  :Manual group: developers
53
53
 
@@ -57,20 +57,23 @@ SYNOPSIS
57
57
 
58
58
  DESCRIPTION
59
59
  ===========
60
- The various ct-* tools exist to build C/C++ executables with almost no
60
+ The various ct-* tools exist to build C/C++ executables with almost no
61
61
  configuration. For example, to build a C or C++ program, type
62
62
 
63
63
  .. code-block:: bash
64
64
 
65
- ct-cake --auto
65
+ ct-cake
66
66
 
67
- which will try to determine the correct source files to generate executables
68
- from and also determine the tests to build and run.
67
+ which will automatically determine the correct source files to generate executables
68
+ from and also determine the tests to build and run. (The ``--auto`` flag is the
69
+ default; use ``--no-auto`` to disable automatic target detection.)
69
70
 
70
71
  A variant is a configuration file that specifies various configurable settings
71
72
  like the compiler and compiler flags. Common variants are "debug" and "release".
72
73
 
73
- Options are parsed using python-configargparse. This means they can be passed
74
+ CONFIGURATION
75
+ =============
76
+ Options are parsed using the python package ConfigArgParse. This means they can be passed
74
77
  in on the command line, as environment variables or in config files.
75
78
  Command-line values override environment variables which override config file
76
79
  values which override defaults. Note that the environment variables are
@@ -101,12 +104,53 @@ For example,
101
104
  or
102
105
  --append-CXXFLAGS='"-march=skylake"'
103
106
 
104
- Other notable tools are
107
+ SHARED OBJECT CACHE
108
+ ===================
109
+ compiletools supports a shared object file cache for multi-user/multi-host
110
+ environments. When enabled via ``shared-objects = true`` in ct.conf
111
+ (or via the command line or environment variable), the Makefile
112
+ generation includes proper locking mechanisms to safely share object files across
113
+ concurrent builds by multiple users and hosts.
105
114
 
106
- .. code-block:: text
115
+ Setting in ct.conf is the recommended way to enable this feature for teams so that
116
+ all users gain the locking without needing to set their own environment variables.
107
117
 
108
- * ct-headertree: provides information about structure of the include files
109
- * ct-filelist: provides the list of files needed to be included in a tarball (e.g. for packaging)
118
+ This feature can also be used by a single developer on a single machine to compile
119
+ different directories in parallel, sharing the same object file cache for objects
120
+ that are in common.
121
+
122
+ Key features:
123
+
124
+ * **Content-addressable storage**: Object files named by source + flags hash
125
+ * **Filesystem-aware locking**: Uses flock on local filesystems, atomic mkdir on network filesystems (NFS, GPFS, Lustre)
126
+ * **Multi-user safe**: Group-writable cache with proper file permissions
127
+ * **Cross-host compatible**: Automatic filesystem detection and appropriate locking strategy
128
+ * **Stale lock detection**: Automatic cleanup of locks from crashed builds
129
+ * **Minimal configuration**: Just set ``shared-objects = true`` in config
130
+
131
+ Example setup for shared cache:
132
+
133
+ .. code-block:: bash
134
+
135
+ # In ct.conf or variant config
136
+ shared-objects = true
137
+ objdir = /shared/nfs/build/cache
138
+
139
+ # Ensure cache directory is group-writable with SGID
140
+ mkdir -p /shared/nfs/build/cache
141
+ chmod 2775 /shared/nfs/build/cache
142
+
143
+ Configuration options in ct.conf:
144
+
145
+ * ``max_file_read_size = 0`` - Bytes to read from files (0 = entire file)
146
+ * ``shared-objects = true`` - Enable shared object cache
147
+
148
+ OTHER TOOLS
149
+ ===========
150
+ Other notable tools are:
151
+
152
+ * ct-headertree: provides information about structure of the include files
153
+ * ct-filelist: provides the list of files needed to be included in a tarball (e.g. for packaging)
110
154
 
111
155
  SEE ALSO
112
156
  ========
@@ -117,13 +161,14 @@ SEE ALSO
117
161
  * ct-cache-clean
118
162
  * ct-cake
119
163
  * ct-cmakelists
120
- * ct-commandline
164
+ * ct-compilation-database
121
165
  * ct-config
122
166
  * ct-cppdeps
123
167
  * ct-create-cmakelists
124
168
  * ct-create-makefile
125
169
  * ct-filelist
126
170
  * ct-findtargets
171
+ * ct-git-sha-report
127
172
  * ct-gitroot
128
173
  * ct-headertree
129
174
  * ct-jobs
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "compiletools"
3
- version = "5.3.3"
3
+ version = "6.0.2"
4
4
  description = "Tools to make compiling C/C++ projects easy"
5
5
  readme = "src/compiletools/README.ct-doc.rst"
6
6
  requires-python = ">=3.9"
@@ -35,7 +35,7 @@ dev = [
35
35
  "bump-my-version>=0.26.0",
36
36
  "twine>=5.0.0",
37
37
  "pytest>=7.0.0",
38
- "pytest-xdist>=3.0.0",
38
+ "pytest-xdist>=3.5",
39
39
  "ruff>=0.12.9",
40
40
  ]
41
41
 
@@ -83,7 +83,7 @@ include = [
83
83
  ]
84
84
 
85
85
  [tool.bumpversion]
86
- current_version = "5.3.3"
86
+ current_version = "6.0.2"
87
87
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
88
88
  serialize = ["{major}.{minor}.{patch}"]
89
89
  search = "{current_version}"
@@ -113,9 +113,15 @@ filename = "src/compiletools/README.ct-cake.rst"
113
113
  [[tool.bumpversion.files]]
114
114
  filename = "src/compiletools/README.ct-commandline.rst"
115
115
 
116
+ [[tool.bumpversion.files]]
117
+ filename = "src/compiletools/README.ct-compilation-database.rst"
118
+
116
119
  [[tool.bumpversion.files]]
117
120
  filename = "src/compiletools/README.ct-config.rst"
118
121
 
122
+ [[tool.bumpversion.files]]
123
+ filename = "src/compiletools/README.ct-cppdeps.rst"
124
+
119
125
  [[tool.bumpversion.files]]
120
126
  filename = "src/compiletools/README.ct-findtargets.rst"
121
127
 
@@ -9,7 +9,7 @@ Remove the current dependency cache
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-02-23
11
11
  :Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ Where is the dependency information used by the ct-* applications stored
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-02-21
11
11
  :Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ Swiss army knife for building a C/C++ project
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-02-06
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -23,18 +23,19 @@ ct-cake is the Swiss army knife of build tools that combines many of the
23
23
  compiletools into one uber-tool. For many C/C++ projects you can compile
24
24
  simply using
25
25
 
26
- ``ct-cake --auto``
26
+ ``ct-cake``
27
27
 
28
- ct-cake will try to determine the correct source files to generate executables
28
+ ct-cake will automatically determine the correct source files to generate executables
29
29
  from and also determine the tests to build and run. It works by spidering over
30
- the source code to determine what implementation files to build, what libraries
30
+ the source code to determine what implementation files to build, what libraries
31
31
  to link against and what compiler flags to set. Only build what you
32
32
  need, and throw out your Makefiles.
33
33
 
34
- The --auto flag tells ct-cake to search for files that will be the "main" file.
34
+ By default (``--auto``), ct-cake searches for files that will be the "main" file.
35
35
  From that set of files, ct-cake then uses the header includes to
36
- determine what implementation (cpp) files are also required to be built and
37
- linked into the final executable/s.
36
+ determine what implementation (cpp) files are also required to be built and
37
+ linked into the final executable/s. Use ``--no-auto`` to disable automatic
38
+ target detection and specify files explicitly.
38
39
 
39
40
  Cake works off the same principles as Ruby on Rails. It will make your life
40
41
  easy if you don't arbitrarily name things. The main rules are:
@@ -75,10 +76,9 @@ testing, but it's not essential.
75
76
 
76
77
  The basic workflow is to simply type:
77
78
 
78
- ``ct-cake --auto``
79
+ ``ct-cake``
79
80
 
80
- If there are multiple executables that --auto finds and you only want to build
81
- one specific one:
81
+ If there are multiple executables found and you only want to build one specific one:
82
82
 
83
83
  ``ct-cake path/to/src/app.cpp``
84
84
 
@@ -94,15 +94,15 @@ How it Works
94
94
  ============
95
95
 
96
96
  ct-cake generates the header dependencies for the "main.cpp"
97
- file you specify at the command line by either examining the "#include" lines in
98
- the source code (or by executing "gcc -MM -MF" if you use the --preprocess flag).
97
+ file you specify at the command line by either examining the "#include" lines in
98
+ the source code (or by executing "gcc -MM -MF" if you use the --preprocess flag).
99
99
  For each header file found in the source file, it looks for
100
- an underlying implementation (c,cpp,cc,cxx,etc) file with the same name, and
101
- adds that implementation file to the build. ct-cake also reads the first 8KB
102
- of each file for special comments
100
+ an underlying implementation (c,cpp,cc,cxx,etc) file with the same name, and
101
+ adds that implementation file to the build. ct-cake also reads the entire file
102
+ (configurable via --max-file-read-size) for special comments
103
103
  that indicate needed link and compile flags. Then it recurses through the
104
104
  dependencies of the cpp file, and uses this spidering to generate complete
105
- dependency information for the application. A Makefile is generated and finally
105
+ dependency information for the application. A Makefile is generated and finally
106
106
  it calls make.
107
107
 
108
108
  Magic Comments / Magic Flags
@@ -132,19 +132,34 @@ Performance
132
132
 
133
133
  Because ct-cake internally generates a makefile to build the C++ file, cake is
134
134
  about as fast as a handrolled Makefile that uses the same lazily generated
135
- dependencies. One particular example project took 0.04 seconds to build if
135
+ dependencies. One particular example project took 0.04 seconds to build if
136
136
  nothing is out of date, versus 2 seconds for, say, Boost.Build.
137
137
 
138
138
  ct-cake also eliminates the redundant generation of static archive files that
139
139
  a more hierarchical build process would generate as intermediaries, saving
140
140
  the cost of running 'ar'.
141
141
 
142
- Note that ct-cake doesn't build all cpp files that you have checked out, only
142
+ Note that ct-cake doesn't build all cpp files that you have checked out, only
143
143
  those
144
144
  strictly needed to build your particular binary, so you only pay for what
145
145
  you use. This difference alone should see a large improvement on most
146
146
  projects, especially for incremental rebuilds.
147
147
 
148
+ Shared Object Cache
149
+ -------------------
150
+
151
+ ct-cake supports a shared object file cache that enables multiple users and build
152
+ hosts to share compiled object files. This significantly speeds up builds in
153
+ multi-developer and CI/CD environments by reusing object files across builds.
154
+
155
+ Enable by setting ``shared-objects = true`` in your configuration file. This adds
156
+ filesystem-aware locking to ensure safe concurrent access (flock on local filesystems,
157
+ atomic mkdir on network filesystems). The cache uses content-addressable storage
158
+ (files named by hash of source + compiler flags) and includes automatic stale lock
159
+ detection for crashed builds.
160
+
161
+ See the main compiletools README for setup details.
162
+
148
163
  Selective build and test
149
164
  ========================
150
165
 
@@ -154,7 +169,7 @@ limiting building and testing in a Continuous Integration pipeline to only
154
169
  source that has changed from master.
155
170
 
156
171
  ``changed_source=git diff --name-only master | sed "s,^,$(git rev-parse --show-toplevel)/,"
157
- ct-cake --auto --build-only-changed \"$changed_source\"``
172
+ ct-cake --build-only-changed \"$changed_source\"``
158
173
 
159
174
  Configuration
160
175
  =============
@@ -275,7 +290,7 @@ the build.sh, before cake runs.
275
290
  #!/bin/sh
276
291
  set -e
277
292
  python fancypythoncodegenerator.py
278
- ct-cake --auto "$@"
293
+ ct-cake "$@"
279
294
 
280
295
 
281
296
  The special *"$@"* marker is the recommended way
@@ -9,7 +9,7 @@ This document describes the command line arguments that are common across ct-* p
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2017-07-06
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -0,0 +1,127 @@
1
+ =========================
2
+ ct-compilation-database
3
+ =========================
4
+
5
+ --------------------------------------------------------------------------------
6
+ Generate compile_commands.json for clang tooling and IDE integration
7
+ --------------------------------------------------------------------------------
8
+
9
+ :Author: drgeoffathome@gmail.com
10
+ :Date: 2025-10-08
11
+ :Copyright: Copyright (C) 2011-2025 Zomojo Pty Ltd
12
+ :Version: 6.0.2
13
+ :Manual section: 1
14
+ :Manual group: developers
15
+
16
+ SYNOPSIS
17
+ ========
18
+ ct-compilation-database [-h] [-c CONFIG_FILE] [--variant VARIANT] [-v] [-q]
19
+ [--version] [--compilation-database-output OUTPUT]
20
+ [--relative-paths]
21
+ [filename ...]
22
+
23
+ DESCRIPTION
24
+ ===========
25
+ ct-compilation-database generates a compilation database (compile_commands.json)
26
+ for C/C++ projects. This JSON file contains the exact compiler commands used to
27
+ build each source file, enabling integration with modern development tools.
28
+
29
+ The compilation database format is used by:
30
+
31
+ * **Language servers**: clangd, ccls for IDE features (autocomplete, go-to-definition)
32
+ * **Static analyzers**: clang-tidy, clang-format, cppcheck
33
+ * **Code indexers**: rtags, ycmd
34
+ * **Refactoring tools**: clang-rename, clang-include-fixer
35
+
36
+ ct-compilation-database is automatically invoked by ct-cake when building projects.
37
+ You can also run it standalone to regenerate the compilation database without
38
+ rebuilding.
39
+
40
+ The tool uses the same dependency analysis as ct-cake to ensure the compilation
41
+ database reflects the actual build configuration, including:
42
+
43
+ * Automatic detection of source files
44
+ * Magic flags from source comments
45
+ * Variant-specific compiler settings
46
+ * Include paths and preprocessor definitions
47
+
48
+ OUTPUT FORMAT
49
+ =============
50
+ The generated compile_commands.json follows the JSON Compilation Database
51
+ specification. Each entry contains:
52
+
53
+ .. code-block:: json
54
+
55
+ {
56
+ "directory": "/path/to/project",
57
+ "command": "g++ -std=c++11 -Wall -c main.cpp",
58
+ "file": "main.cpp"
59
+ }
60
+
61
+ OPTIONS
62
+ =======
63
+ --compilation-database-output OUTPUT
64
+ Output filename for compilation database.
65
+ Default: <gitroot>/compile_commands.json
66
+
67
+ --relative-paths
68
+ Use relative paths instead of absolute paths in the database.
69
+ Useful for portable compilation databases.
70
+
71
+ EXAMPLES
72
+ ========
73
+
74
+ Generate compilation database for current project::
75
+
76
+ ct-compilation-database
77
+
78
+ Generate with specific output location::
79
+
80
+ ct-compilation-database --compilation-database-output build/compile_commands.json
81
+
82
+ Generate with relative paths for portability::
83
+
84
+ ct-compilation-database --relative-paths
85
+
86
+ Generate for specific source files (disables auto-detection)::
87
+
88
+ ct-compilation-database --no-auto src/main.cpp src/utils.cpp
89
+
90
+ INTEGRATION WITH ct-cake
91
+ =========================
92
+ ct-cake automatically generates compile_commands.json by default. To control this
93
+ behavior, use these flags:
94
+
95
+ --compilation-database / --no-compilation-database
96
+ Enable or disable automatic generation (default: enabled)
97
+
98
+ --compilation-database-output OUTPUT
99
+ Customize output location
100
+
101
+ --compilation-database-relative-paths
102
+ Use relative paths
103
+
104
+ Example ct-cake usage::
105
+
106
+ ct-cake --no-compilation-database # Disable generation
107
+ ct-cake --compilation-database-output .compile_db.json
108
+
109
+ CLANGD CONFIGURATION
110
+ ====================
111
+ For best results with clangd, create a .clangd config file in your project root:
112
+
113
+ .. code-block:: yaml
114
+
115
+ CompileFlags:
116
+ CompilationDatabase: .
117
+
118
+ This tells clangd to use the compile_commands.json in the project root.
119
+
120
+ SEE ALSO
121
+ ========
122
+ ``compiletools`` (1), ``ct-cake`` (1), ``ct-config`` (1)
123
+
124
+ REFERENCES
125
+ ==========
126
+ * JSON Compilation Database: https://clang.llvm.org/docs/JSONCompilationDatabase.html
127
+ * clangd: https://clangd.llvm.org/
@@ -9,7 +9,7 @@ Helper tool for examining ct-* configuration
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2016-08-16
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ What
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2022-06-05
11
11
  :Copyright: Copyright (C) Geoffery Ericksson
12
- :Version: 4.1.85
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -33,20 +33,21 @@ ct-cppdeps generates the header dependencies for the file you specify at the
33
33
  command line. There are two possible methodologys:
34
34
 
35
35
  * "--headerdeps=direct" uses a regex to find the "#include" lines in the source
36
- code. This methodology is fast. However, while the regex correctly ignores
37
- commented out includes, it incorrectly identifies files that are surrounded
38
- by #ifdef 0 guards.
36
+ code. This methodology is fast and is supposed to generate the same results as
37
+ using the compiler to preprocess the file. However, its own simple
38
+ preprocessor does not handle all the complexities of a real C/C++
39
+ preprocessor and so it is possible to generate incorrect results.
39
40
 
40
41
  * "--headerdeps=cpp" executes "$CPP -MM -MF" which is slower but guarantees correctness.
41
42
 
42
43
 
43
44
  For each header file found in the source file, it looks for
44
- an underlying implementation (c,cpp,cc,cxx,etc) file with the same name, and
45
- adds that implementation file to the build.
46
- ct-cppdeps also reads the first 8KB of each file for special comments
47
- that indicate needed link and compile flags. Then it recurses through the
48
- dependencies of the cpp file, and uses this spidering to generate complete
49
- dependency information for the application.
45
+ an underlying implementation (c,cpp,cc,cxx,etc) file with the same name, and
46
+ adds that implementation file to the build.
47
+ ct-cppdeps also reads the entire file (configurable via --max-file-read-size)
48
+ for special comments that indicate needed link and compile flags. Then it
49
+ recurses through the dependencies of the cpp file, and uses this spidering to
50
+ generate complete dependency information for the application.
50
51
 
51
52
  EXAMPLES
52
53
  ========
@@ -0,0 +1,141 @@
1
+ .. image:: https://github.com/DrGeoff/compiletools/actions/workflows/main.yml/badge.svg
2
+ :target: https://github.com/DrGeoff/compiletools/actions
3
+
4
+ ============
5
+ compiletools
6
+ ============
7
+
8
+ --------------------------------------------------------
9
+ C/C++ build tools that requires almost no configuration.
10
+ --------------------------------------------------------
11
+
12
+ :Author: drgeoffathome@gmail.com
13
+ :Date: 2016-08-09
14
+ :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
15
+ :Version: 6.0.2
16
+ :Manual section: 1
17
+ :Manual group: developers
18
+
19
+ SYNOPSIS
20
+ ========
21
+ ct-* [compilation args] [filename.cpp] [--variant=<VARIANT>]
22
+
23
+ DESCRIPTION
24
+ ===========
25
+ The various ct-* tools exist to build C/C++ executables with almost no
26
+ configuration. For example, to build a C or C++ program, type
27
+
28
+ .. code-block:: bash
29
+
30
+ ct-cake
31
+
32
+ which will automatically determine the correct source files to generate executables
33
+ from and also determine the tests to build and run. (The ``--auto`` flag is the
34
+ default; use ``--no-auto`` to disable automatic target detection.)
35
+
36
+ A variant is a configuration file that specifies various configurable settings
37
+ like the compiler and compiler flags. Common variants are "debug" and "release".
38
+
39
+ CONFIGURATION
40
+ =============
41
+ Options are parsed using the python package ConfigArgParse. This means they can be passed
42
+ in on the command line, as environment variables or in config files.
43
+ Command-line values override environment variables which override config file
44
+ values which override defaults. Note that the environment variables are
45
+ captilized. That is, a command line option of --magic=cpp is the equivalent of
46
+ an environment variable MAGIC=cpp.
47
+
48
+ If the option itself starts with a hypen then configargparse can fail to parse
49
+ it as you intended. For example, on many platforms,
50
+
51
+ .. code-block:: bash
52
+
53
+ --append-CXXFLAGS=-march=skylake
54
+
55
+ will fail. To work around this, compiletools postprocesses the options to
56
+ understand quotes. For example,
57
+
58
+ .. code-block:: bash
59
+
60
+ --append-CXXFLAGS="-march=skylake"
61
+
62
+ will work on all platforms. Note however that many shells (e.g., bash) will strip
63
+ quotes so you need to escape the quotes or single quote stop the shell preprocessing.
64
+ For example,
65
+
66
+ .. code-block:: bash
67
+
68
+ --append-CXXFLAGS=\\"-march=skylake\\"
69
+ or
70
+ --append-CXXFLAGS='"-march=skylake"'
71
+
72
+ SHARED OBJECT CACHE
73
+ ===================
74
+ compiletools supports a shared object file cache for multi-user/multi-host
75
+ environments. When enabled via ``shared-objects = true`` in ct.conf
76
+ (or via the command line or environment variable), the Makefile
77
+ generation includes proper locking mechanisms to safely share object files across
78
+ concurrent builds by multiple users and hosts.
79
+
80
+ Setting in ct.conf is the recommended way to enable this feature for teams so that
81
+ all users gain the locking without needing to set their own environment variables.
82
+
83
+ This feature can also be used by a single developer on a single machine to compile
84
+ different directories in parallel, sharing the same object file cache for objects
85
+ that are in common.
86
+
87
+ Key features:
88
+
89
+ * **Content-addressable storage**: Object files named by source + flags hash
90
+ * **Filesystem-aware locking**: Uses flock on local filesystems, atomic mkdir on network filesystems (NFS, GPFS, Lustre)
91
+ * **Multi-user safe**: Group-writable cache with proper file permissions
92
+ * **Cross-host compatible**: Automatic filesystem detection and appropriate locking strategy
93
+ * **Stale lock detection**: Automatic cleanup of locks from crashed builds
94
+ * **Minimal configuration**: Just set ``shared-objects = true`` in config
95
+
96
+ Example setup for shared cache:
97
+
98
+ .. code-block:: bash
99
+
100
+ # In ct.conf or variant config
101
+ shared-objects = true
102
+ objdir = /shared/nfs/build/cache
103
+
104
+ # Ensure cache directory is group-writable with SGID
105
+ mkdir -p /shared/nfs/build/cache
106
+ chmod 2775 /shared/nfs/build/cache
107
+
108
+ Configuration options in ct.conf:
109
+
110
+ * ``max_file_read_size = 0`` - Bytes to read from files (0 = entire file)
111
+ * ``shared-objects = true`` - Enable shared object cache
112
+
113
+ OTHER TOOLS
114
+ ===========
115
+ Other notable tools are:
116
+
117
+ * ct-headertree: provides information about structure of the include files
118
+ * ct-filelist: provides the list of files needed to be included in a tarball (e.g. for packaging)
119
+
120
+ SEE ALSO
121
+ ========
122
+ * ct-build
123
+ * ct-build-dynamic-library
124
+ * ct-build-static-library
125
+ * ct-cache
126
+ * ct-cache-clean
127
+ * ct-cake
128
+ * ct-cmakelists
129
+ * ct-compilation-database
130
+ * ct-config
131
+ * ct-cppdeps
132
+ * ct-create-cmakelists
133
+ * ct-create-makefile
134
+ * ct-filelist
135
+ * ct-findtargets
136
+ * ct-git-sha-report
137
+ * ct-gitroot
138
+ * ct-headertree
139
+ * ct-jobs
140
+ * ct-list-variants
141
+ * ct-magicflags
@@ -9,7 +9,7 @@ Determine header and source dependencies of a C/C++ file by following headers an
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2017-07-06
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ What
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-04-17
11
11
  :Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ What directory is the root of the git repository?
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2017-09-28
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.3
12
+ :Version: 6.0.2
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15