tree-sitter 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +36 -0
- data/Rakefile +49 -0
- data/ext/tree-sitter/extconf.rb +34 -0
- data/ext/tree-sitter/tree-sitter.c +114 -0
- data/ext/tree-sitter/tree-sitter.h +15 -0
- data/ext/tree-sitter/tree-sitter/Makefile +360 -0
- data/ext/tree-sitter/tree-sitter/README.md +224 -0
- data/ext/tree-sitter/tree-sitter/compiler.target.mk +238 -0
- data/ext/tree-sitter/tree-sitter/doc/grammar-schema.json +249 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/CMakeLists.txt +57 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/LICENSE.md +21 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/README.md +64 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/appveyor.yml +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/adapter.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/adapters.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/adapters/snowhouse.h +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_exception.h +51 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeCloseTo.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeEmpty.h +32 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeFalsy.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeGTE.h +45 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeGreaterThan.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLTE.h +45 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeLessThan.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeNull.h +29 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/BeTruthy.h +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Contain.h +58 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Equal.h +90 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/MatchProxy.h +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/Matcher.h +74 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/MatcherException.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/ThrowException.h +60 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/ValueProxy.h +26 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/matchers.h +19 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/matchers/must.h +36 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/CMakeLists.txt +49 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/LICENSE_1_0.txt +23 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/README.md +419 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh +50 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/basic_assertions.cpp +228 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/boolean_operators.cpp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/container_spec.cpp +85 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/custom_matchers_test.cpp +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/exceptions_tests.cpp +97 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/expression_error_handling.cpp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/main.cpp +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/map_tests.cpp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/operator_tests.cpp +137 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/sequence_container_tests.cpp +192 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/string_line_tests.cpp +179 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/string_tests.cpp +65 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/stringize_tests.cpp +111 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/example/tests.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assert.h +126 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assertionexception.h +58 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/assertmacro.h +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/constraints.h +23 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/containsconstraint.h +80 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/endswithconstraint.h +53 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalsconstraint.h +83 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalscontainerconstraint.h +80 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/equalswithdeltaconstraint.h +51 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/andexpression.h +46 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/expression.h +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/expression_fwd.h +15 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/notexpression.h +44 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/expressions/orexpression.h +46 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/fulfillsconstraint.h +51 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/haslengthconstraint.h +60 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/isgreaterthanconstraint.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/isgreaterthanorequaltoconstraint.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/islessthanconstraint.h +54 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/islessthanorequaltoconstraint.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/constraints/startswithconstraint.h +52 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/exceptions.h +120 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/constraintadapter.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/constraintlist.h +91 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/expressionbuilder.h +357 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/fluent.h +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/andoperator.h +54 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/alloperator.h +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/atleastoperator.h +41 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/atmostoperator.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/collectionconstraintevaluator.h +113 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/collectionoperator.h +24 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/exactlyoperator.h +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/collections/noneoperator.h +33 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/constraintoperator.h +70 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/invalidexpressionexception.h +28 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/notoperator.h +53 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/fluent/operators/oroperator.h +55 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/snowhouse.h +33 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/stringize.h +104 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/assertion_frameworks/snowhouse/snowhouse/stringizers.h +60 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/bandit.h +44 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/context.h +97 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/external/optionparser.h +2825 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/default_failure_formatter.h +30 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/failure_formatter.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/failure_formatters.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/visual_studio_failure_formatter.h +36 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/grammar.h +185 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/listener.h +27 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/options.h +117 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/registrar.h +25 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/registration.h +7 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/registration/spec_registry.h +17 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/colorizer.h +141 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/dots_reporter.h +76 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/info_reporter.h +319 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/progress_reporter.h +116 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/reporters.h +53 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/single_line_reporter.h +86 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/spec_reporter.h +126 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/test_run_summary.h +90 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/reporters/xunit_reporter.h +109 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/always_run_policy.h +16 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/bandit_run_policy.h +168 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/never_run_policy.h +14 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/run_policies.h +9 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/run_policies/run_policy.h +66 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/runner.h +103 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/bandit/test_run_error.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/CMake/cotire.cmake +3695 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/CMakeLists.txt +11 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/HISTORY.md +281 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/MANUAL.md +780 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/OpenCV-2.3.1.patch +299 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/README.md +24 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/bullet-2.80-rev2531.patch +389 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.0.src.patch +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.1.src.patch +35 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.3.src.patch +46 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.4.src.patch +48 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clang-3.5.src.patch +39 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/clapack-3.2.1-CMAKE.patch +93 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/cmake-2.8.7.patch +218 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/cminpack-1.1.4.patch +18 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/fsedit-qt5.patch +74 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/fseditor-1.0.patch +68 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/hdf5-1.8.8.patch +118 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/libpng-1.5.9.patch +38 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.0.src.patch +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.1.src.patch +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.3.src.patch +128 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.4.src.patch +100 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/llvm-3.5.src.patch +99 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/yaml-cpp.patch +37 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/Patches/zlib-1.2.6.patch +23 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/README.md +137 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/license +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/CMakeLists.txt +33 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/example.cpp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/example.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/log.cpp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/log.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cmake/cotire/src/main.cpp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/cross_compile.sh +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/before_each_after_each.spec.cpp +78 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/context.spec.cpp +44 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/describe.spec.cpp +117 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/default_formatter.spec.cpp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/visual_studio_failure_formatter.spec.cpp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fake_context.h +69 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fake_reporter.h +78 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fakes.h +8 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/logging_fake.h +32 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/fuzzbox.spec.cpp +77 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/it.spec.cpp +355 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/main.cpp +6 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_close_to.cpp +112 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_empty.cpp +89 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_falsy.cpp +85 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_greater_than.cpp +105 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_gte.cpp +120 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_less_than.cpp +105 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_lte.cpp +119 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_null.cpp +43 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/be_truthy.cpp +85 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/contain.cpp +156 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/equal.cpp +218 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/matchers/throw_exception.cpp +105 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/options.spec.cpp +134 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/colorizer.spec.cpp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/dots_reporter.spec.cpp +206 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/info_reporter.spec.cpp +377 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/single_line_reporter.spec.cpp +201 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/reporters/xunit_reporter.spec.cpp +161 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/run.spec.cpp +77 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/run_policies/bandit_run_policy.spec.cpp +247 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/specs.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/synopsis.spec.cpp +54 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/util/argv_helper.h +62 -0
- data/ext/tree-sitter/tree-sitter/externals/bandit/specs/util/util.h +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/AUTHORS +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/DEPS +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/LICENSE +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/OWNERS +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/PRESUBMIT.py +120 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/buildbot/buildbot_run.py +190 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/codereview.settings +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/data/win/large-pdb-shim.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyp +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyp.bat +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyp_main.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/gyptest.py +274 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings.py +1076 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSSettings_test.py +1483 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSUtil.py +267 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/MSVSVersion.py +409 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.py +537 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.py +521 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/common_test.py +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/easy_xml.py +157 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/easy_xml_test.py +103 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/flock_tool.py +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/android.py +1072 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/cmake.py +1143 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/eclipse.py +335 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/gypd.py +87 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.py +2181 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/msvs.py +3342 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/msvs_test.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja.py +2160 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/ninja_test.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.py +1224 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/generator/xcode_test.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.py +2809 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/input_test.py +90 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/mac_tool.py +510 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/msvs_emulation.py +972 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/ordered_dict.py +289 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/win_tool.py +292 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.py +1499 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.py +2889 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylib/gyp/xml_fix.py +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/pylintrc +307 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/samples/samples +81 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/samples/samples.bat +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/setup.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/gyptest-bare.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/src/bare.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-bare/src/bare.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/gyptest-all.py +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/actions.gyp +226 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/copy.py +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/filter.py +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/foo.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/input.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-multiple/src/main.c +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/gyptest-none.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/fake_cross.py +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/foo.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-none/src/none_with_source_files.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/gyptest-action.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/make-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/none.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/subdir/make-subdir-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions-subdir/src/subdir/subdir.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/action.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/main.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/generated-header/test.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-all.py +102 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-default.py +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-errors.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/gyptest-generated-header.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/action_missing_name.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/actions.gyp +114 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/confirm-dep-files.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/counter.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/executable.gyp +74 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/make-prog1.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/make-prog2.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir1/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir2/make-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir2/none.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir3/generate_main.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/actions/src/subdir3/null_input.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/gyptest-additional.py +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/all.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/actions.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/emit.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/additional-targets/src/dir1/lib1.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/gyptest-assembly.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/gyptest-override.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/as.bat +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/assembly.gyp +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/lib1.S +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/lib1.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/override.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/override_asm.asm +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/assembly/src/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/gyptest-build.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/hello.c +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/build-option/hello.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/gyptest-all.py +85 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/gyptest-default.py +85 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/builddir.gypi +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func1.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func2.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func3.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func4.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/func5.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/prog1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/prog1.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/prog2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/prog2.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/prog3.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/cflags.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/cflags.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cflags/gyptest-cflags.py +104 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/gyptest-headers.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/headers.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/lib1.cpp +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/lib1.hpp +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compilable/src/program.cpp +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler-global-settings.gyp.in +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler-host.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/compiler.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/cxxtest.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-env.py +112 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/gyptest-compiler-global-settings.py +73 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_cc.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_cxx.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/my_ld.py +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/compiler-override/test.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/configurations.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/configurations.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/basics/gyptest-configurations.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/configurations.c +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/configurations.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/inheritance/gyptest-inheritance.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/actions.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/all_dependent_settings.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/configurations.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/dependencies.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/direct_dependent_settings.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/gyptest-configurations.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/libraries.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/link_settings.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/sources.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/standalone_static_library.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/target_name.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/invalid/type.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/configurations.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/front.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/gyptest-target_platform.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/left.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/target_platform/right.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/configurations.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/configurations.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/configurations/x64/gyptest-x86.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-all.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-attribs.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-default.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-samedir.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-slash.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/gyptest-updir.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-attribs.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-samedir.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-slash.gyp +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies-updir.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/copies.gyp +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/file3 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/file4 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/directory/subdir/file5 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/executable-file.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/file1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/file2 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/copies/src/parentdir/subdir/file6 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/gyptest-custom-generator.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/mygenerator.py +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/custom-generator/test.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/cxxflags.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/cxxflags/gyptest-cxxflags.py +65 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/defines-escaping.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/defines-escaping.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines-escaping/gyptest-defines-escaping.py +184 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines-env.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines.c +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/defines.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-define-override.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines-env-regyp.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines-env.py +85 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/defines/gyptest-defines.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/a.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/b/b3.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/c.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/c.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/c/d.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/double_dependency.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/double_dependent.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/extra_targets.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-double-dependency.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-extra-targets.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-lib-only.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-none-traversal.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/gyptest-sharedlib-linksettings.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/lib_only.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/main.c +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/none_traversal.gyp +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/program.c +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/sharedlib.c +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/staticlib.c +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependencies/sharedlib-linksettings/test.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/gyptest-copy.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/copies.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/dependency-copy/src/file2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_basenames.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_node.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_rule.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/duplicate_targets.gyp +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/gyptest-errors.py +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/missing_dep.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/errors/missing_targets.gyp +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/escaping/colon/test.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/escaping/gyptest-colon.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/exclusion.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/gyptest-exclusion.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/exclusion/hello.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/gyptest-cross.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/bogus1.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/bogus2.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/cross.gyp +83 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/cross_compile.gypi +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/fake_cross.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/program.cc +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test1.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test2.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test3.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/test4.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/external-cross-compile/src/tochar.py +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/actions.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/actions-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/executable.gyp +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/make-prog1.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/make-prog2.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir1/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/actions-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/make-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/actions/subdir2/none.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/copies-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/copies.gyp +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/file1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/file2 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/copies-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/file3 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/file4 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/copies/subdir/subdir.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-actions.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-copies.py +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-depth.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-mac-bundle.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-relocate.py +60 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-rules.py +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-subdir2-deep.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-symlink.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/gyptest-top-all.py +54 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/app.order +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/header.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/resource.sb +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/mac-bundle/test.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/copy-file.py +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/rules.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/define3.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/define4.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/executable.gyp +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/function1.in1 +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/function2.in1 +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir1/program.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file1.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file2.in0 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file3.in1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/file4.in1 +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/none.gyp +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/rules/subdir2/rules-out/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/inc.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/inc1/include1.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/prog1.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/prog1.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/deeper/deeper.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/inc2/include2.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/prog2.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir2/prog2.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/build/README.txt +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/inc3/include3.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/prog3.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/subdir3/prog3.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/generator-output/src/symroot.gypi +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/defines.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/echo.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/gyptest-multiple-values.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/gyp-defines/gyptest-regyp.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/a.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/a.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/b.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/b.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/c.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/c.h +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/d.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/emit.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hard_dependency/src/hard_dependency.gyp +78 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-all.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-default.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-disable-regyp.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp-output.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-regyp.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/gyptest-target.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello2.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/hello/hello2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-config-arg.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-config-env.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/gyptest-home-includes.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/src/all.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/home_dot_gyp/src/printfoo.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/gyptest-all.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/gyptest-default.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/inc.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/inc1/include1.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/includes.c +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/includes.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/shadow1/shadow.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/shadow2/shadow.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/inc.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/inc2/include2.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/subdir_includes.c +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/include_dirs/src/subdir/subdir_includes.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/gyptest-intermediate-dir.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/script.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/shared_infile.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/test.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/intermediate_dir/src/test2.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib +4119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/check_no_signature.py +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/main.m +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-archs.gyp +110 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test-device.gyp +79 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/app-bundle/test.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/deployment-target/check-version-min.c +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/deployment-target/deployment-target.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-app-ios.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-archs.py +106 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-deployment-target.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ios/gyptest-per-config-settings.py +147 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/README.txt +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestCmd.py +1597 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestCommon.py +570 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/lib/TestGyp.py +1117 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-shared-obj-install-path.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-shared.py +84 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/gyptest-static.py +84 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib1_moveable.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/lib2_moveable.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/library.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/program.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library/src/shared_dependency.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/gyptest-library-dirs.py +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/README.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/hello.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/mylib.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/mylib.h +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/test-win.gyp +60 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/library_dirs/subdir/test.gyp +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/base.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/extra.c +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/gyptest-all.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/link-objects/link-objects.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/gyptest-implicit-rpath.py +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/linux/implicit-rpath/test.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/action-envvars/action/action.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/action-envvars/action/action.sh +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib +4119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/TestApp/main.m +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/test-error.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/app-bundle/test.gyp +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/empty_main.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/file.mm +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/header.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/my_file.cc +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/my_main_file.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-archs-multiarch.gyp +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-archs-x86_64.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/archs/test-no-archs.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/change.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/executable-file.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/secret.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/bundle-resources/test.gyp +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/ccfile.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/ccfile_withcflags.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cfile.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cppfile.cpp +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cppfile_withcflags.cpp +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cxxfile.cxx +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/cxxfile_withcflags.cxx +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mfile.m +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mmfile.mm +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/mmfile_withcflags.mm +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/cflags/test.gyp +132 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/c++11.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/c++98.cc +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libc++.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/clang-cxx-library/libstdc++.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/copy-dylib/empty.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/copy-dylib/test.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/debuginfo/file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/debuginfo/test.gyp +82 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/Info.plist +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/bundle.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/executable.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/depend-on-bundle/test.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/deployment-target/check-version-min.c +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/deployment-target/deployment-target.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-dirs/calculate.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-dirs/framework-dirs.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/myframework.h +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/myframework.m +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework-headers/test.gyp +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/Info.plist +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVector.h +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVector.mm +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/framework/framework.gyp +71 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir1/dir1.gyp +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir2/dir2.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/global-settings/src/dir2/file.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-action-envvars.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app-error.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-app.py +119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-archs.py +89 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-bundle-resources.py +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-cflags.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-clang-cxx-language-standard.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-clang-cxx-library.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-copies.py +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-copy-dylib.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-debuginfo.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-depend-on-bundle.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-deployment-target.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework-dirs.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework-headers.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-framework.py +74 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-global-settings.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-infoplist-process.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-installname.py +79 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-ldflags.py +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-libraries.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-loadable-module.py +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-missing-cfbundlesignature.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-non-strs-flattened-to-env.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-objc-arc.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-objc-gc.py +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-copy-bundle.py +75 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-defaults.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-fail.py +67 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-multiple-configurations.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild-static-library.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-postbuild.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-prefixheader.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-rebuild.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-rpath.py +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-sdkroot.py +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-sourceless-module.py +72 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-strip-default.py +95 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-strip.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-type-envvars.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-unicode-settings.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-env-order.py +94 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-gcc-clang.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xcode-gcc.py +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-xctest.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/Info.plist +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test1.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test2.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/infoplist-process/test3.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/Info.plist +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/installname/test.gyp +93 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags-libtool/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags-libtool/test.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/Info.plist +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/file.c +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/symbol_list.def +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/ldflags/subdirectory/test.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/README.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/hello.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/mylib.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/libraries/subdir/test.gyp +65 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/Info.plist +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/module.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/loadable-module/test.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Info.plist +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/missing-cfbundlesignature/test.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/Info.plist +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/non-strs-flattened-to-env/test.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/c-file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/cc-file.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/m-file-no-arc.m +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/m-file.m +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/mm-file-no-arc.mm +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/mm-file.mm +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-arc/test.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/c-file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/cc-file.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/main.m +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/needs-gc-mm.mm +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/needs-gc.m +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/objc-gc/test.gyp +102 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/copied.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/main.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/resource_file.sb +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-copy-bundle/test.gyp +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/Info.plist +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-defaults/test.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/postbuild-fail.sh +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/test.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/touch-dynamic.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-fail/touch-static.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/main.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-multiple-configurations/test.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/empty.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuild-static-library/test.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/copy.sh +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file_g.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/file_h.c +4 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/script/static_library_postbuild.sh +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/subdirectory/copied_file.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/postbuilds/test.gyp +93 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.cc +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.m +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/file.mm +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/header.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/prefixheader/test.gyp +82 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/TestApp-Info.plist +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/delay-touch.sh +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/empty.c +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rebuild/test.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/rpath/test.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/file.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/test.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sdkroot/test_shorthand.sh +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/empty.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/empty.txt +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/fun.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/sourceless-module/test.gyp +96 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/file.c +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/main.c +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/strip.saves +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/nested_file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/nested_strip.saves +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/subdirectory.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/test-defaults.gyp +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/strip/test.gyp +119 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/file.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test.gyp +100 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_executable.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_bundle_shared_library.sh +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_executable.sh +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_none.sh +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/file.cc +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/test.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/unicode-settings/test_bundle_display_name.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/Info.plist +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext1 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext2 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/file.ext3 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/main.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-env-order/test.gyp +121 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/aliasing.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/test-clang.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/test.gyp +60 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_c.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_cc.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_m.m +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/valid_mm.mm +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/MyClass.h +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/MyClass.m +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/TestCase.m +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/resource.txt +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/test.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/dependencies.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/gyptest-dependencies.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/gyptest-noload.py +57 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/main.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/main.h +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/all.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.c +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/lib/shared.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make/noload/main.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/basics/gyptest-make_global_settings.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/basics/make_global_settings.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/env-wrapper/gyptest-wrapper.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/env-wrapper/wrapper.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/wrapper/gyptest-wrapper.py +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/make_global_settings/wrapper/wrapper.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file0 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file1 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file2 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file3 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/file4 +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/gyptest-many-actions-unsorted.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/gyptest-many-actions.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/many-actions-unsorted.gyp +154 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/many-actions/many-actions.gyp +1817 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/gyptest-default.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/lib1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/lib2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/module.gyp +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/module/src/program.c +111 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/buildevents.gyp +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/gyptest-msbuild-supports-prepostbuild.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/gyptest-ninja-warnings.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/buildevents/main.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/gyptest-config_attrs.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/hello.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/config_attrs/hello.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/base/base.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/express.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/express/gyptest-express.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/external.gyp +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/external_builder.py +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/gyptest-all.py +59 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/hello.cpp +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/hello.z +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/msbuild_action.py +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/external_builder/msbuild_rule.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/filters.gyp +47 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/gyptest-filters-2008.py +68 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/filters/gyptest-filters-2010.py +57 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/gyptest-all.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello.cpp +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello_exclude.gyp +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/list_excluded/hello_mac.cpp +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/missing_sources/gyptest-missing.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/missing_sources/hello_missing.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/AppName.props +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/AppName.vsprops +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/gyptest-props.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/hello.c +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/props/hello.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/common.gypi +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/gyptest-shared_output.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/hello.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/hello.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/there/there.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/shared_output/there/there.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/gyptest-all.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello.c +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/msvs/uldi2010/hello2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-all.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/gyptest-default.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/common.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/multiple.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog1.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/multiple-targets/src/prog2.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/a.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/a.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp +88 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/b.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/b.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/c.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/c.h +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/action_dependencies/src/emit.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/chained-dependency.gyp +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/chained.c +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/empty.s +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/main.cc +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/solib.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/gyptest-no-cpp.py +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/call-f-main.c +2 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/empty-main.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/f.cc +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-cpp/src/test.gyp +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-output/gyptest-no-output.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/no-output/src/nooutput.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/gyptest-product.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/hello.c +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/product/product.gyp +128 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/gyptest-prune-targets.py +64 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib1.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib2.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib3.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/lib_indirect.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/program.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/test1.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/prune_targets/test2.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/a.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/a.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/c/c.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/a/c/c.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/b/b.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/foo/b/b.gyp +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/relative/gyptest-default.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/file.c +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/test-casesensitive.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/filecase/test.gyp +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rename/gyptest-filecase.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/gyptest-restat.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/create_intermediate.py +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/restat.gyp +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/restat/src/touch.py +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/gyptest-dirname.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/actions.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/copy-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/a/b/c.gencc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/a/b/c.printvars +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/foo/bar/baz.gencc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/foo/bar/baz.printvars +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/input-rule-dirname.gyp +92 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/main.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-dirname/src/subdir/printvars.py +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/gyptest-all.py +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/gyptest-default.py +91 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/main.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/make-sources.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/prog1.in +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/prog2.in +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-rebuild/src/same_target.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/gyptest-use-built-dependencies.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/src/main.cc +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-use-built-dependencies/src/use-built-dependencies-rule.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/gyptest-rules-variables.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_ext.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_name/test.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/input_path/subdir/test.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/subdir/input_dirname.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/subdir/test.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/test.input_root.c +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules-variables/src/variables.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-all.py +69 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-default.py +55 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-input-root.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/gyptest-special-variables.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/actions.gyp +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/an_asm.S +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/as.bat +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/copy-file.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/external.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/file1.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/external/file2.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/input-root.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/noaction/file1.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/noaction/no_action_with_rules_fails.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/rule.py +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/somefile.ext +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/special-variables.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/executable.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/function1.in +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/function2.in +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir1/program.c +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/file1.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/file2.in +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/never_used.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/no_action.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/no_inputs.gyp +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir2/none.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/executable2.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/function3.in +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir3/program.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/asm-function.assem +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/build-asm.gyp +49 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/rules/src/subdir4/program.c +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-all.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-default.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/gyptest-library.py +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/one/sub.gyp +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/test.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/library/two/sub.gyp +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/all.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir1/executable.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir1/main1.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir2/executable.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-gyp-name/src/subdir2/main2.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/gyptest-all.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdir1/subdir1.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdir2/subdir2.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/subdirs.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-rule-output-file-name/src/touch.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-all.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-default.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-shared.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-fail-static.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/gyptest-pass-executable.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/all.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-executable.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-shared.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/double-static.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/func.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog1.c +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog2.c +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/prog3.c +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/subdir1/func.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-source-file-name/src/subdir2/func.c +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/gyptest-all.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdir1/subdir1.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdir2/subdir2.gyp +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/subdirs.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name-different-directory/src/touch.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/gyptest-same-target-name.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/all.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/executable1.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/same-target-name/src/executable2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/blah.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sanitize-rule-names/script.py +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/common.gypi +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/dep.gyp +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/gyptest-self-dependency.py +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/self-dependency/self_dependency.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-all.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/gyptest-relocate.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/build/all.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog1/prog1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog1/prog1.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog2/prog2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/sibling/src/prog2/prog2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/small/gyptest-small.py +55 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/gyptest-standalone-static-library.py +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/invalid.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/mylib.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/mylib.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone-static-library/prog.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone/gyptest-standalone.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/standalone/standalone.gyp +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-all.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-SYMROOT-default.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir-all.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir-default.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-subdir2-deep.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-top-all.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/gyptest-top-default.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/prog1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/prog1.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/prog2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/prog2.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/subdir2/prog3.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/subdir/subdir2/prog3.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/subdirectory/src/symroot.gypi +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/gyptest-target.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/hello.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/target/target.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/gyptest-toolsets.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/main.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets.gyp +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toolsets/toolsets_shared.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/gyptest-toplevel-dir.py +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub1/main.gyp +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub1/prog1.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub2/prog2.c +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/toplevel-dir/src/sub2/prog2.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gyp +128 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gyp.stdout +136 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands-repeated.gypd.golden +77 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp +91 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp.ignore-env.stdout +96 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gyp.stdout +96 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gypd.golden +66 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/commands.gypi +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands-ignore-env.py +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands-repeated.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/gyptest-commands.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/test.py +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/commands/update_golden +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/filelist.gyp.stdout +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/filelist.gypd.golden +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/gyptest-filelist-golden.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/gyptest-filelist.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/dummy.py +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/filelist.gyp +93 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/src/filelist2.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/filelist/update_golden +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/gyptest-latelate.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/src/latelate.gyp +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/latelate/src/program.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/C1/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/variables/variable-in-path/variable-in-path.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/asm-files.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/b.s +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/c.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/asm-files/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/batch-file-action.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/infile +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/batch-file-action/somecmd.bat +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/a.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/bat with spaces.bat +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/command-quote.gyp +84 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/go.bat +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/command-quote/subdir/and/another/in-subdir.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-include-dirs.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-include-dirs.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-options.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/additional-options.gyp +31 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/analysis.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/buffer-security-check.gyp +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/buffer-security.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set-mbcs.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set-unicode.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/character-set.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/debug-format.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/default-char-is-unsigned.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/default-char-is-unsigned.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/disable-specific-warnings.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/disable-specific-warnings.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/exception-handling-on.cc +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/exception-handling.gyp +46 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files-with-precompiled.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/force-include-files.gyp +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/function-level-linking.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/function-level-linking.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/optimizations.gyp +207 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname-override.gyp +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/pdbname.gyp +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/precomp.cc +6 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/rtti-on.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/rtti.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-checks.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-checks.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-md.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mdd.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mt.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library-mtd.cc +19 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/runtime-library.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/subdir/header.h +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type1.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type2.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/uninit.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-as-error.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-as-error.gyp +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level.gyp +115 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level1.cc +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level2.cc +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level3.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/compiler-flags/warning-level4.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/gyptest-generator-output-different-drive.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/prog.c +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/generator-output-different-drive/prog.gyp +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-asm-files.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-additional-include-dirs.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-additional-options.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-analysis.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-buffer-security-check.py +53 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-character-set.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-debug-format.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-default-char-is-unsigned.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-disable-specific-warnings.py +32 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-exception-handling.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-force-include-files.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-function-level-linking.py +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-optimizations.py +105 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-pdbname-override.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-pdbname.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-rtti.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-runtime-checks.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-runtime-library.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-treat-wchar-t-as-built-in-type.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-warning-as-error.py +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-cl-warning-level.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-command-quote.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-lib-ltcg.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-additional-deps.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-additional-options.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-aslr.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-base-address.py +62 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-debug-info.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-default-libs.py +22 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-deffile.py +43 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-defrelink.py +51 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-delay-load-dlls.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-embed-manifest.py +99 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-enable-uac.py +95 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-entrypointsymbol.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-fixed-base.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-force-symbol-reference.py +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-generate-manifest.py +127 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-incremental.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-large-address-aware.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-large-pdb.py +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-library-adjust.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-library-directories.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-ltcg.py +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-mapfile.py +44 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-nodefaultlib.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-nxcompat.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-opt-icf.py +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-opt-ref.py +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-ordering.py +101 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-outputfile.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb-output.py +34 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pdb.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-pgo.py +75 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-profile.py +37 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-restat-importlib.py +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-shard.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-subsystem.py +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-target-machine.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-tsaware.py +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-uldi.py +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-unsupported-manifest.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-update-manifest.py +103 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-warnings-as-errors.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-long-command-line.py +23 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-projectname.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-targetname.py +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macro-vcinstalldir.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macros-containing-gyp.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-macros-in-inputs-and-outputs.py +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-midl-rules.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-quoting-commands.py +25 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-rc-build.py +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/basic-idl.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/history_indexer.idl +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/idl-rules/history_indexer_user.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/has-exports.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/hello.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/importlib/importlib.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/dllmain.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/large-pdb.gyp +98 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/large-pdb/main.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/answer.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/answer.h +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/lib-flags/ltcg.gyp +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/a/x.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/a/z.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-deps.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-deps.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/additional-options.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/aslr.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/b/y.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/base-address.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/debug-info.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile-multiple.gyp +17 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.def +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/deffile.gyp +38 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/delay-load-dlls.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/delay-load.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/embed-manifest.gyp +109 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/enable-uac.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/entrypointsymbol.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/entrypointsymbol.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/extra.manifest +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/extra2.manifest +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/fixed-base.gyp +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/force-symbol-reference.gyp +39 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/generate-manifest.gyp +166 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/incremental.gyp +65 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test.h +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/inline_test_main.cc +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/large-address-aware.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-adjust.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-adjust.gyp +16 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories-define.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories-reference.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/library-directories.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/link-ordering.gyp +95 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/link-warning.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/ltcg.gyp +42 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/main-crt.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/manifest-in-comment.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/mapfile.cc +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/mapfile.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/no-default-libs.cc +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/no-default-libs.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nodefaultlib.cc +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nodefaultlib.gyp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/nxcompat.gyp +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-icf.cc +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-icf.gyp +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-ref.cc +11 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/opt-ref.gyp +56 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/outputfile.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/pdb-output.gyp +36 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/pgo.gyp +143 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/profile.gyp +50 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/program-database.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subdir/library.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subsystem-windows.cc +9 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/subsystem.gyp +70 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/target-machine.gyp +48 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/tsaware.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/unsupported-manifest.gyp +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/update_pgd.py +35 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/warn-as-error.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/x.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/y.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/linker-flags/z.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/function.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/long-command-line/long-command-line.gyp +54 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/gyptest-all.py +21 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello.c +14 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello.gyp +28 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/hello2.c +13 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/precompiled/precomp.c +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/Resource.h +26 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.cpp +30 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.gyp +92 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.h +3 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.ico +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello.rc +86 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/hello3.rc +87 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/small.ico +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/subdir/hello2.rc +87 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/subdir/include.h +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/rc-build/targetver.h +24 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello1.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello2.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello3.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/hello4.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/shard/shard.gyp +20 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/a.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/b.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/main.cc +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/uldi/uldi.gyp +45 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/as.py +18 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/containing-gyp.gyp +40 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/do_stuff.py +8 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/hello.cc +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/input-output-macros.gyp +33 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/input.S +0 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/projectname.gyp +29 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/stuff.blah +1 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/targetname.gyp +52 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/test_exists.py +10 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/test/win/vs-macros/vcinstalldir.gyp +41 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/README +15 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/README +5 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/README +12 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/gyp-tests.el +63 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/gyp.el +252 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/run-unit-tests.sh +7 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/testdata/media.gyp +1105 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/graphviz.py +100 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_gyp.py +155 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_sln.py +168 -0
- data/ext/tree-sitter/tree-sitter/externals/gyp/tools/pretty_vcproj.py +329 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/AUTHORS +20 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/LICENSE +26 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/Makefile.in +68 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/README.md +97 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/example/test.json +88 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/example/test.py +11 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/jsonparser.pyx +9 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/setup.py +14 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/bindings/python/wrap_json.c +95 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/configure +3796 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/configure.ac +30 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/examples/test_json.c +180 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/json-parser.pc.in +10 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/json.c +1011 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/json.h +283 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-invalid-0001.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-invalid-0002.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0001.json +9 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0002.json +4 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/ext-valid-0003.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0000.json +0 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0001.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0002.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0003.json +88 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0004.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0005.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0006.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0007.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0008.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0009.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/invalid-0010.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/test.py +70 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0000.json +88 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0001.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0002.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0003.json +3 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0004.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0005.json +15 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0006.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0007.json +2 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0008.json +8 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0009.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0010.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0011.json +1 -0
- data/ext/tree-sitter/tree-sitter/externals/json-parser/tests/valid-0012.json +5 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/CMakeLists.txt +31 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/Doxyfile +1528 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/LICENSE.md +93 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/MANIFEST +7 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/Makefile +145 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/NEWS.md +234 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/README.md +67 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/appveyor.yml +42 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/Makefile +39 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/bench.c +56 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/icu.c +61 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/unistring.c +60 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/util.c +39 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/bench/util.h +22 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/Makefile +63 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/charwidths.jl +190 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/data/data_generator.rb +328 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/lump.md +27 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/case.c +50 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/charwidth.c +71 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/graphemetest.c +74 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/iterate.c +160 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/normtest.c +64 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/printproperty.c +51 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/tests.c +46 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/tests.h +23 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/test/valid.c +41 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.c +644 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc.h +601 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utf8proc_data.c +16752 -0
- data/ext/tree-sitter/tree-sitter/externals/utf8proc/utils.cmake +20 -0
- data/ext/tree-sitter/tree-sitter/gyp-mac-tool +511 -0
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/compiler.h +32 -0
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/parser.h +188 -0
- data/ext/tree-sitter/tree-sitter/include/tree_sitter/runtime.h +126 -0
- data/ext/tree-sitter/tree-sitter/out/Release/libcompiler.a +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/libruntime.a +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/linker.lock +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/json-parser/json.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/externals/utf8proc/utf8proc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_lex_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_parse_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/build_tables.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_conflict_manager.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lex_item_transitions.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/lookahead_set.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/parse_item_set_builder.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/recovery_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/build_tables/rule_can_be_blank.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/compile.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/generate_code/c_code.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/lex_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/parse_table.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/precedence_range.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_repeats.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/expand_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_choices.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/extract_tokens.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/flatten_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/intern_symbols.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/is_token.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/normalize_rules.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/parse_regex.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/prepare_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/prepare_grammar/token_description.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rule.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/blank.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/built_in_symbols.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_range.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/character_set.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/choice.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/metadata.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/named_symbol.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/pattern.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/repeat.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/rules.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/seq.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/string.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/symbol.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/rules/visitor.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/syntax_grammar.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/util/string_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/compiler/src/compiler/variable.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/externals/utf8proc/utf8proc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/document.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/error_costs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/language.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/lexer.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/node.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/parser.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/stack.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/string_input.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/tree.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/runtime/src/runtime/utf16.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/distinctive_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_conflict_manager_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/lex_item_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/parse_item_set_builder_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/build_tables/rule_can_be_blank_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_repeats_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/expand_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_choices_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/extract_tokens_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/flatten_grammar_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/intern_symbols_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/prepare_grammar/parse_regex_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/character_set_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/choice_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/rules/repeat_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/compiler/util/string_helpers_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/encoding_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/load_language.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/point_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/random_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/read_test_entries.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/record_alloc.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/rule_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/scope_sequence.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_input.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/spy_logger.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stderr_logger.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/stream_methods.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/helpers/tree_helpers.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/compile_grammar_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/integration/corpus_specs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/document_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/node_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/parser_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/stack_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/runtime/tree_spec.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/obj.target/tests/spec/specs.o +0 -0
- data/ext/tree-sitter/tree-sitter/out/Release/tests +0 -0
- data/ext/tree-sitter/tree-sitter/project.Makefile +6 -0
- data/ext/tree-sitter/tree-sitter/project.gyp +175 -0
- data/ext/tree-sitter/tree-sitter/runtime.target.mk +174 -0
- data/ext/tree-sitter/tree-sitter/script/check-mallocs +20 -0
- data/ext/tree-sitter/tree-sitter/script/ci +7 -0
- data/ext/tree-sitter/tree-sitter/script/clean +7 -0
- data/ext/tree-sitter/tree-sitter/script/configure +7 -0
- data/ext/tree-sitter/tree-sitter/script/fetch-fixtures +28 -0
- data/ext/tree-sitter/tree-sitter/script/format +7 -0
- data/ext/tree-sitter/tree-sitter/script/lint +14 -0
- data/ext/tree-sitter/tree-sitter/script/test +122 -0
- data/ext/tree-sitter/tree-sitter/script/trim-whitespace +3 -0
- data/ext/tree-sitter/tree-sitter/script/util/valgrind.supp +256 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/distinctive_tokens_spec.cc +34 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/lex_conflict_manager_spec.cc +88 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/lex_item_spec.cc +517 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/parse_item_set_builder_spec.cc +133 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/build_tables/rule_can_be_blank_spec.cc +60 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_repeats_spec.cc +152 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/expand_tokens_spec.cc +109 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_choices_spec.cc +106 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/extract_tokens_spec.cc +251 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/flatten_grammar_spec.cc +89 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/intern_symbols_spec.cc +89 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/prepare_grammar/parse_regex_spec.cc +245 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/character_set_spec.cc +337 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/choice_spec.cc +53 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/rules/repeat_spec.cc +22 -0
- data/ext/tree-sitter/tree-sitter/spec/compiler/util/string_helpers_spec.cc +26 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/c_errors.txt +130 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/javascript_errors.txt +157 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/json_errors.txt +56 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/error_corpus/python_errors.txt +29 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/extra_external_tokens.c +42 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/percent_strings.c +118 -0
- data/ext/tree-sitter/tree-sitter/spec/fixtures/external_scanners/shared_external_tokens.c +63 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/dedent.h +12 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/encoding_helpers.cc +58 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/encoding_helpers.h +15 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/equals_pointer.h +37 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.cc +206 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/load_language.h +12 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/point_helpers.cc +45 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/point_helpers.h +23 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.cc +35 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/random_helpers.h +8 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/read_test_entries.cc +105 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/read_test_entries.h +15 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/record_alloc.cc +84 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/record_alloc.h +16 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.cc +55 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/rule_helpers.h +21 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/scope_sequence.cc +106 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/scope_sequence.h +16 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_input.cc +133 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_input.h +39 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_logger.cc +22 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/spy_logger.h +15 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stderr_logger.cc +22 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stderr_logger.h +8 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stream_methods.cc +140 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/stream_methods.h +136 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/tree_helpers.cc +50 -0
- data/ext/tree-sitter/tree-sitter/spec/helpers/tree_helpers.h +16 -0
- data/ext/tree-sitter/tree-sitter/spec/integration/compile_grammar_spec.cc +847 -0
- data/ext/tree-sitter/tree-sitter/spec/integration/corpus_specs.cc +185 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/document_spec.cc +372 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/node_spec.cc +436 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/parser_spec.cc +479 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/stack_spec.cc +571 -0
- data/ext/tree-sitter/tree-sitter/spec/runtime/tree_spec.cc +439 -0
- data/ext/tree-sitter/tree-sitter/spec/spec_helper.h +19 -0
- data/ext/tree-sitter/tree-sitter/spec/specs.cc +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.cc +195 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_lex_table.h +18 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.cc +604 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_parse_table.h +22 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.cc +27 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/build_tables.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/conflict_type.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.cc +55 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_conflict_manager.h +31 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.cc +118 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item.h +82 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.cc +188 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lex_item_transitions.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.cc +47 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/lookahead_set.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.cc +148 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item.h +65 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.cc +167 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/parse_item_set_builder.h +35 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.cc +89 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/recovery_tokens.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/remove_duplicate_states.h +65 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.cc +44 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/build_tables/rule_can_be_blank.h +14 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/compile.cc +72 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/compile.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/compile_error.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.cc +691 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/generate_code/c_code.h +21 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/grammar.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.cc +78 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/lex_table.h +75 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/lexical_grammar.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.cc +335 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_grammar.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.cc +258 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/parse_table.h +106 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/precedence_range.cc +45 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/precedence_range.h +23 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.cc +80 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_repeats.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.cc +88 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/expand_tokens.h +18 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.cc +55 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_choices.h +15 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.cc +213 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/extract_tokens.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.cc +124 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/flatten_grammar.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/initial_syntax_grammar.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.cc +110 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/intern_symbols.h +20 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/interned_grammar.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.cc +30 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/is_token.h +14 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/normalize_rules.cc +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/normalize_rules.h +14 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.cc +252 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/parse_regex.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.cc +69 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/prepare_grammar.h +21 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.cc +69 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/prepare_grammar/token_description.h +15 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rule.cc +15 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rule.h +45 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.cc +36 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/blank.h +25 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.cc +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/built_in_symbols.h +16 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.cc +36 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_range.h +25 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.cc +220 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/character_set.h +59 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.cc +78 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/choice.h +28 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.cc +98 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/metadata.h +51 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.cc +35 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/named_symbol.h +26 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.cc +36 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/pattern.h +26 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.cc +44 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/repeat.h +27 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/rules.cc +108 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.cc +57 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/seq.h +29 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.cc +35 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/string.h +26 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.cc +82 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/symbol.h +55 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.cc +44 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/rules/visitor.h +234 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.cc +34 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/syntax_grammar.h +52 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/util/hash_combine.h +24 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/util/string_helpers.cc +54 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/util/string_helpers.h +19 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/variable.cc +11 -0
- data/ext/tree-sitter/tree-sitter/src/compiler/variable.h +27 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/alloc.h +85 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/array.h +137 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/document.c +152 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/document.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.c +28 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/error_costs.h +25 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/language.c +56 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/language.h +70 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/length.h +59 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/lexer.c +131 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/lexer.h +40 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/node.c +393 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/node.h +8 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/parser.c +1227 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/parser.h +41 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/point.h +46 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/reduce_action.h +32 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/reusable_node.h +50 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/stack.c +658 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/stack.h +130 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/string_input.c +50 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/string_input.h +17 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/tree.c +551 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/tree.h +117 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/tree_path.h +217 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/utf16.c +24 -0
- data/ext/tree-sitter/tree-sitter/src/runtime/utf16.h +20 -0
- data/ext/tree-sitter/tree-sitter/tests.Makefile +6 -0
- data/ext/tree-sitter/tree-sitter/tests.gyp +58 -0
- data/ext/tree-sitter/tree-sitter/tests.target.mk +176 -0
- data/lib/tree-sitter.rb +11 -0
- data/lib/tree-sitter/version.rb +3 -0
- data/test/test_helper.rb +9 -0
- data/test/tree-sitter/fixtures/arithmetic/grammar.json +67 -0
- data/test/tree-sitter/fixtures/ruby/grammar.json +4803 -0
- data/test/tree-sitter/test_basic.rb +7 -0
- data/test/tree-sitter/test_document.rb +7 -0
- data/test/tree-sitter/test_grammar.rb +34 -0
- data/tree-sitter.gemspec +33 -0
- metadata +2018 -0
@@ -0,0 +1,3695 @@
|
|
1
|
+
# - cotire (compile time reducer)
|
2
|
+
#
|
3
|
+
# See the cotire manual for usage hints.
|
4
|
+
#
|
5
|
+
#=============================================================================
|
6
|
+
# Copyright 2012-2015 Sascha Kratky
|
7
|
+
#
|
8
|
+
# Permission is hereby granted, free of charge, to any person
|
9
|
+
# obtaining a copy of this software and associated documentation
|
10
|
+
# files (the "Software"), to deal in the Software without
|
11
|
+
# restriction, including without limitation the rights to use,
|
12
|
+
# copy, modify, merge, publish, distribute, sublicense, and/or sell
|
13
|
+
# copies of the Software, and to permit persons to whom the
|
14
|
+
# Software is furnished to do so, subject to the following
|
15
|
+
# conditions:
|
16
|
+
#
|
17
|
+
# The above copyright notice and this permission notice shall be
|
18
|
+
# included in all copies or substantial portions of the Software.
|
19
|
+
#
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
22
|
+
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
23
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
24
|
+
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
25
|
+
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
27
|
+
# OTHER DEALINGS IN THE SOFTWARE.
|
28
|
+
#=============================================================================
|
29
|
+
|
30
|
+
if(__COTIRE_INCLUDED)
|
31
|
+
return()
|
32
|
+
endif()
|
33
|
+
set(__COTIRE_INCLUDED TRUE)
|
34
|
+
|
35
|
+
# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode
|
36
|
+
# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid
|
37
|
+
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
38
|
+
cmake_policy(PUSH)
|
39
|
+
endif()
|
40
|
+
cmake_minimum_required(VERSION 2.8.12)
|
41
|
+
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
42
|
+
cmake_policy(POP)
|
43
|
+
endif()
|
44
|
+
|
45
|
+
# activate select policies
|
46
|
+
if (POLICY CMP0038)
|
47
|
+
# targets may not link directly to themselves
|
48
|
+
cmake_policy(SET CMP0038 NEW)
|
49
|
+
endif()
|
50
|
+
|
51
|
+
if (POLICY CMP0039)
|
52
|
+
# utility targets may not have link dependencies
|
53
|
+
cmake_policy(SET CMP0039 NEW)
|
54
|
+
endif()
|
55
|
+
|
56
|
+
if (POLICY CMP0040)
|
57
|
+
# target in the TARGET signature of add_custom_command() must exist
|
58
|
+
cmake_policy(SET CMP0040 NEW)
|
59
|
+
endif()
|
60
|
+
|
61
|
+
if (POLICY CMP0045)
|
62
|
+
# error on non-existent target in get_target_property
|
63
|
+
cmake_policy(SET CMP0045 NEW)
|
64
|
+
endif()
|
65
|
+
|
66
|
+
if (POLICY CMP0046)
|
67
|
+
# error on non-existent dependency in add_dependencies
|
68
|
+
cmake_policy(SET CMP0046 NEW)
|
69
|
+
endif()
|
70
|
+
|
71
|
+
if (POLICY CMP0049)
|
72
|
+
# do not expand variables in target source entries
|
73
|
+
cmake_policy(SET CMP0049 NEW)
|
74
|
+
endif()
|
75
|
+
|
76
|
+
if (POLICY CMP0050)
|
77
|
+
# disallow add_custom_command SOURCE signatures
|
78
|
+
cmake_policy(SET CMP0050 NEW)
|
79
|
+
endif()
|
80
|
+
|
81
|
+
if (POLICY CMP0051)
|
82
|
+
# include TARGET_OBJECTS expressions in a target's SOURCES property
|
83
|
+
cmake_policy(SET CMP0051 NEW)
|
84
|
+
endif()
|
85
|
+
|
86
|
+
if (POLICY CMP0053)
|
87
|
+
# simplify variable reference and escape sequence evaluation
|
88
|
+
cmake_policy(SET CMP0053 NEW)
|
89
|
+
endif()
|
90
|
+
|
91
|
+
if (POLICY CMP0054)
|
92
|
+
# only interpret if() arguments as variables or keywords when unquoted
|
93
|
+
cmake_policy(SET CMP0054 NEW)
|
94
|
+
endif()
|
95
|
+
|
96
|
+
set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
|
97
|
+
set (COTIRE_CMAKE_MODULE_VERSION "1.7.2")
|
98
|
+
|
99
|
+
include(CMakeParseArguments)
|
100
|
+
include(ProcessorCount)
|
101
|
+
|
102
|
+
function (cotire_get_configuration_types _configsVar)
|
103
|
+
set (_configs "")
|
104
|
+
if (CMAKE_CONFIGURATION_TYPES)
|
105
|
+
list (APPEND _configs ${CMAKE_CONFIGURATION_TYPES})
|
106
|
+
endif()
|
107
|
+
if (CMAKE_BUILD_TYPE)
|
108
|
+
list (APPEND _configs "${CMAKE_BUILD_TYPE}")
|
109
|
+
endif()
|
110
|
+
if (_configs)
|
111
|
+
list (REMOVE_DUPLICATES _configs)
|
112
|
+
set (${_configsVar} ${_configs} PARENT_SCOPE)
|
113
|
+
else()
|
114
|
+
set (${_configsVar} "None" PARENT_SCOPE)
|
115
|
+
endif()
|
116
|
+
endfunction()
|
117
|
+
|
118
|
+
function (cotire_get_source_file_extension _sourceFile _extVar)
|
119
|
+
# get_filename_component returns extension from first occurrence of . in file name
|
120
|
+
# this function computes the extension from last occurrence of . in file name
|
121
|
+
string (FIND "${_sourceFile}" "." _index REVERSE)
|
122
|
+
if (_index GREATER -1)
|
123
|
+
math (EXPR _index "${_index} + 1")
|
124
|
+
string (SUBSTRING "${_sourceFile}" ${_index} -1 _sourceExt)
|
125
|
+
else()
|
126
|
+
set (_sourceExt "")
|
127
|
+
endif()
|
128
|
+
set (${_extVar} "${_sourceExt}" PARENT_SCOPE)
|
129
|
+
endfunction()
|
130
|
+
|
131
|
+
macro (cotire_check_is_path_relative_to _path _isRelativeVar)
|
132
|
+
set (${_isRelativeVar} FALSE)
|
133
|
+
if (IS_ABSOLUTE "${_path}")
|
134
|
+
foreach (_dir ${ARGN})
|
135
|
+
file (RELATIVE_PATH _relPath "${_dir}" "${_path}")
|
136
|
+
if (NOT _relPath OR (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\."))
|
137
|
+
set (${_isRelativeVar} TRUE)
|
138
|
+
break()
|
139
|
+
endif()
|
140
|
+
endforeach()
|
141
|
+
endif()
|
142
|
+
endmacro()
|
143
|
+
|
144
|
+
function (cotire_filter_language_source_files _language _target _sourceFilesVar _excludedSourceFilesVar _cotiredSourceFilesVar)
|
145
|
+
if (CMAKE_${_language}_SOURCE_FILE_EXTENSIONS)
|
146
|
+
set (_languageExtensions "${CMAKE_${_language}_SOURCE_FILE_EXTENSIONS}")
|
147
|
+
else()
|
148
|
+
set (_languageExtensions "")
|
149
|
+
endif()
|
150
|
+
if (CMAKE_${_language}_IGNORE_EXTENSIONS)
|
151
|
+
set (_ignoreExtensions "${CMAKE_${_language}_IGNORE_EXTENSIONS}")
|
152
|
+
else()
|
153
|
+
set (_ignoreExtensions "")
|
154
|
+
endif()
|
155
|
+
if (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS)
|
156
|
+
set (_excludeExtensions "${COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS}")
|
157
|
+
else()
|
158
|
+
set (_excludeExtensions "")
|
159
|
+
endif()
|
160
|
+
if (COTIRE_DEBUG AND _languageExtensions)
|
161
|
+
message (STATUS "${_language} source file extensions: ${_languageExtensions}")
|
162
|
+
endif()
|
163
|
+
if (COTIRE_DEBUG AND _ignoreExtensions)
|
164
|
+
message (STATUS "${_language} ignore extensions: ${_ignoreExtensions}")
|
165
|
+
endif()
|
166
|
+
if (COTIRE_DEBUG AND _excludeExtensions)
|
167
|
+
message (STATUS "${_language} exclude extensions: ${_excludeExtensions}")
|
168
|
+
endif()
|
169
|
+
if (CMAKE_VERSION VERSION_LESS "3.1.0")
|
170
|
+
set (_allSourceFiles ${ARGN})
|
171
|
+
else()
|
172
|
+
# as of CMake 3.1 target sources may contain generator expressions
|
173
|
+
# since we cannot obtain required property information about source files added
|
174
|
+
# through generator expressions at configure time, we filter them out
|
175
|
+
string (GENEX_STRIP "${ARGN}" _allSourceFiles)
|
176
|
+
endif()
|
177
|
+
set (_filteredSourceFiles "")
|
178
|
+
set (_excludedSourceFiles "")
|
179
|
+
foreach (_sourceFile ${_allSourceFiles})
|
180
|
+
get_source_file_property(_sourceIsHeaderOnly "${_sourceFile}" HEADER_FILE_ONLY)
|
181
|
+
get_source_file_property(_sourceIsExternal "${_sourceFile}" EXTERNAL_OBJECT)
|
182
|
+
get_source_file_property(_sourceIsSymbolic "${_sourceFile}" SYMBOLIC)
|
183
|
+
if (NOT _sourceIsHeaderOnly AND NOT _sourceIsExternal AND NOT _sourceIsSymbolic)
|
184
|
+
cotire_get_source_file_extension("${_sourceFile}" _sourceExt)
|
185
|
+
if (_sourceExt)
|
186
|
+
list (FIND _ignoreExtensions "${_sourceExt}" _ignoreIndex)
|
187
|
+
if (_ignoreIndex LESS 0)
|
188
|
+
list (FIND _excludeExtensions "${_sourceExt}" _excludeIndex)
|
189
|
+
if (_excludeIndex GREATER -1)
|
190
|
+
list (APPEND _excludedSourceFiles "${_sourceFile}")
|
191
|
+
else()
|
192
|
+
list (FIND _languageExtensions "${_sourceExt}" _sourceIndex)
|
193
|
+
if (_sourceIndex GREATER -1)
|
194
|
+
# consider source file unless it is excluded explicitly
|
195
|
+
get_source_file_property(_sourceIsExcluded "${_sourceFile}" COTIRE_EXCLUDED)
|
196
|
+
if (_sourceIsExcluded)
|
197
|
+
list (APPEND _excludedSourceFiles "${_sourceFile}")
|
198
|
+
else()
|
199
|
+
list (APPEND _filteredSourceFiles "${_sourceFile}")
|
200
|
+
endif()
|
201
|
+
else()
|
202
|
+
get_source_file_property(_sourceLanguage "${_sourceFile}" LANGUAGE)
|
203
|
+
if ("${_sourceLanguage}" STREQUAL "${_language}")
|
204
|
+
# add to excluded sources, if file is not ignored and has correct language without having the correct extension
|
205
|
+
list (APPEND _excludedSourceFiles "${_sourceFile}")
|
206
|
+
endif()
|
207
|
+
endif()
|
208
|
+
endif()
|
209
|
+
endif()
|
210
|
+
endif()
|
211
|
+
endif()
|
212
|
+
endforeach()
|
213
|
+
# separate filtered source files from already cotired ones
|
214
|
+
# the COTIRE_TARGET property of a source file may be set while a target is being processed by cotire
|
215
|
+
set (_sourceFiles "")
|
216
|
+
set (_cotiredSourceFiles "")
|
217
|
+
foreach (_sourceFile ${_filteredSourceFiles})
|
218
|
+
get_source_file_property(_sourceIsCotired "${_sourceFile}" COTIRE_TARGET)
|
219
|
+
if (_sourceIsCotired)
|
220
|
+
list (APPEND _cotiredSourceFiles "${_sourceFile}")
|
221
|
+
else()
|
222
|
+
get_source_file_property(_sourceCompileFlags "${_sourceFile}" COMPILE_FLAGS)
|
223
|
+
if (_sourceCompileFlags)
|
224
|
+
# add to excluded sources, if file has custom compile flags
|
225
|
+
list (APPEND _excludedSourceFiles "${_sourceFile}")
|
226
|
+
else()
|
227
|
+
list (APPEND _sourceFiles "${_sourceFile}")
|
228
|
+
endif()
|
229
|
+
endif()
|
230
|
+
endforeach()
|
231
|
+
if (COTIRE_DEBUG)
|
232
|
+
if (_sourceFiles)
|
233
|
+
message (STATUS "Filtered ${_target} ${_language} sources: ${_sourceFiles}")
|
234
|
+
endif()
|
235
|
+
if (_excludedSourceFiles)
|
236
|
+
message (STATUS "Excluded ${_target} ${_language} sources: ${_excludedSourceFiles}")
|
237
|
+
endif()
|
238
|
+
if (_cotiredSourceFiles)
|
239
|
+
message (STATUS "Cotired ${_target} ${_language} sources: ${_cotiredSourceFiles}")
|
240
|
+
endif()
|
241
|
+
endif()
|
242
|
+
set (${_sourceFilesVar} ${_sourceFiles} PARENT_SCOPE)
|
243
|
+
set (${_excludedSourceFilesVar} ${_excludedSourceFiles} PARENT_SCOPE)
|
244
|
+
set (${_cotiredSourceFilesVar} ${_cotiredSourceFiles} PARENT_SCOPE)
|
245
|
+
endfunction()
|
246
|
+
|
247
|
+
function (cotire_get_objects_with_property_on _filteredObjectsVar _property _type)
|
248
|
+
set (_filteredObjects "")
|
249
|
+
foreach (_object ${ARGN})
|
250
|
+
get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET)
|
251
|
+
if (_isSet)
|
252
|
+
get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property})
|
253
|
+
if (_propertyValue)
|
254
|
+
list (APPEND _filteredObjects "${_object}")
|
255
|
+
endif()
|
256
|
+
endif()
|
257
|
+
endforeach()
|
258
|
+
set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE)
|
259
|
+
endfunction()
|
260
|
+
|
261
|
+
function (cotire_get_objects_with_property_off _filteredObjectsVar _property _type)
|
262
|
+
set (_filteredObjects "")
|
263
|
+
foreach (_object ${ARGN})
|
264
|
+
get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET)
|
265
|
+
if (_isSet)
|
266
|
+
get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property})
|
267
|
+
if (NOT _propertyValue)
|
268
|
+
list (APPEND _filteredObjects "${_object}")
|
269
|
+
endif()
|
270
|
+
endif()
|
271
|
+
endforeach()
|
272
|
+
set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE)
|
273
|
+
endfunction()
|
274
|
+
|
275
|
+
function (cotire_get_source_file_property_values _valuesVar _property)
|
276
|
+
set (_values "")
|
277
|
+
foreach (_sourceFile ${ARGN})
|
278
|
+
get_source_file_property(_propertyValue "${_sourceFile}" ${_property})
|
279
|
+
if (_propertyValue)
|
280
|
+
list (APPEND _values "${_propertyValue}")
|
281
|
+
endif()
|
282
|
+
endforeach()
|
283
|
+
set (${_valuesVar} ${_values} PARENT_SCOPE)
|
284
|
+
endfunction()
|
285
|
+
|
286
|
+
function (cotire_resolve_config_properites _configurations _propertiesVar)
|
287
|
+
set (_properties "")
|
288
|
+
foreach (_property ${ARGN})
|
289
|
+
if ("${_property}" MATCHES "<CONFIG>")
|
290
|
+
foreach (_config ${_configurations})
|
291
|
+
string (TOUPPER "${_config}" _upperConfig)
|
292
|
+
string (REPLACE "<CONFIG>" "${_upperConfig}" _configProperty "${_property}")
|
293
|
+
list (APPEND _properties ${_configProperty})
|
294
|
+
endforeach()
|
295
|
+
else()
|
296
|
+
list (APPEND _properties ${_property})
|
297
|
+
endif()
|
298
|
+
endforeach()
|
299
|
+
set (${_propertiesVar} ${_properties} PARENT_SCOPE)
|
300
|
+
endfunction()
|
301
|
+
|
302
|
+
function (cotire_copy_set_properites _configurations _type _source _target)
|
303
|
+
cotire_resolve_config_properites("${_configurations}" _properties ${ARGN})
|
304
|
+
foreach (_property ${_properties})
|
305
|
+
get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET)
|
306
|
+
if (_isSet)
|
307
|
+
get_property(_propertyValue ${_type} ${_source} PROPERTY ${_property})
|
308
|
+
set_property(${_type} ${_target} PROPERTY ${_property} "${_propertyValue}")
|
309
|
+
endif()
|
310
|
+
endforeach()
|
311
|
+
endfunction()
|
312
|
+
|
313
|
+
function (cotire_get_target_usage_requirements _target _targetRequirementsVar)
|
314
|
+
set (_targetRequirements "")
|
315
|
+
get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES)
|
316
|
+
while (_librariesToProcess)
|
317
|
+
# remove from head
|
318
|
+
list (GET _librariesToProcess 0 _library)
|
319
|
+
list (REMOVE_AT _librariesToProcess 0)
|
320
|
+
if (TARGET ${_library})
|
321
|
+
list (FIND _targetRequirements ${_library} _index)
|
322
|
+
if (_index LESS 0)
|
323
|
+
list (APPEND _targetRequirements ${_library})
|
324
|
+
# process transitive libraries
|
325
|
+
get_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES)
|
326
|
+
if (_libraries)
|
327
|
+
list (APPEND _librariesToProcess ${_libraries})
|
328
|
+
list (REMOVE_DUPLICATES _librariesToProcess)
|
329
|
+
endif()
|
330
|
+
endif()
|
331
|
+
endif()
|
332
|
+
endwhile()
|
333
|
+
set (${_targetRequirementsVar} ${_targetRequirements} PARENT_SCOPE)
|
334
|
+
endfunction()
|
335
|
+
|
336
|
+
function (cotire_filter_compile_flags _language _flagFilter _matchedOptionsVar _unmatchedOptionsVar)
|
337
|
+
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
338
|
+
set (_flagPrefix "[/-]")
|
339
|
+
else()
|
340
|
+
set (_flagPrefix "--?")
|
341
|
+
endif()
|
342
|
+
set (_optionFlag "")
|
343
|
+
set (_matchedOptions "")
|
344
|
+
set (_unmatchedOptions "")
|
345
|
+
foreach (_compileFlag ${ARGN})
|
346
|
+
if (_compileFlag)
|
347
|
+
if (_optionFlag AND NOT "${_compileFlag}" MATCHES "^${_flagPrefix}")
|
348
|
+
# option with separate argument
|
349
|
+
list (APPEND _matchedOptions "${_compileFlag}")
|
350
|
+
set (_optionFlag "")
|
351
|
+
elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})$")
|
352
|
+
# remember option
|
353
|
+
set (_optionFlag "${CMAKE_MATCH_2}")
|
354
|
+
elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})(.+)$")
|
355
|
+
# option with joined argument
|
356
|
+
list (APPEND _matchedOptions "${CMAKE_MATCH_3}")
|
357
|
+
set (_optionFlag "")
|
358
|
+
else()
|
359
|
+
# flush remembered option
|
360
|
+
if (_optionFlag)
|
361
|
+
list (APPEND _matchedOptions "${_optionFlag}")
|
362
|
+
set (_optionFlag "")
|
363
|
+
endif()
|
364
|
+
# add to unfiltered options
|
365
|
+
list (APPEND _unmatchedOptions "${_compileFlag}")
|
366
|
+
endif()
|
367
|
+
endif()
|
368
|
+
endforeach()
|
369
|
+
if (_optionFlag)
|
370
|
+
list (APPEND _matchedOptions "${_optionFlag}")
|
371
|
+
endif()
|
372
|
+
if (COTIRE_DEBUG AND _matchedOptions)
|
373
|
+
message (STATUS "Filter ${_flagFilter} matched: ${_matchedOptions}")
|
374
|
+
endif()
|
375
|
+
if (COTIRE_DEBUG AND _unmatchedOptions)
|
376
|
+
message (STATUS "Filter ${_flagFilter} unmatched: ${_unmatchedOptions}")
|
377
|
+
endif()
|
378
|
+
set (${_matchedOptionsVar} ${_matchedOptions} PARENT_SCOPE)
|
379
|
+
set (${_unmatchedOptionsVar} ${_unmatchedOptions} PARENT_SCOPE)
|
380
|
+
endfunction()
|
381
|
+
|
382
|
+
function (cotire_get_target_compile_flags _config _language _target _flagsVar)
|
383
|
+
string (TOUPPER "${_config}" _upperConfig)
|
384
|
+
# collect options from CMake language variables
|
385
|
+
set (_compileFlags "")
|
386
|
+
if (CMAKE_${_language}_FLAGS)
|
387
|
+
set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS}")
|
388
|
+
endif()
|
389
|
+
if (CMAKE_${_language}_FLAGS_${_upperConfig})
|
390
|
+
set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS_${_upperConfig}}")
|
391
|
+
endif()
|
392
|
+
if (_target)
|
393
|
+
# add target compile flags
|
394
|
+
get_target_property(_targetflags ${_target} COMPILE_FLAGS)
|
395
|
+
if (_targetflags)
|
396
|
+
set (_compileFlags "${_compileFlags} ${_targetflags}")
|
397
|
+
endif()
|
398
|
+
endif()
|
399
|
+
if (UNIX)
|
400
|
+
separate_arguments(_compileFlags UNIX_COMMAND "${_compileFlags}")
|
401
|
+
elseif(WIN32)
|
402
|
+
separate_arguments(_compileFlags WINDOWS_COMMAND "${_compileFlags}")
|
403
|
+
else()
|
404
|
+
separate_arguments(_compileFlags)
|
405
|
+
endif()
|
406
|
+
# target compile options
|
407
|
+
if (_target)
|
408
|
+
get_target_property(_targetOptions ${_target} COMPILE_OPTIONS)
|
409
|
+
if (_targetOptions)
|
410
|
+
list (APPEND _compileFlags ${_targetOptions})
|
411
|
+
endif()
|
412
|
+
endif()
|
413
|
+
# interface compile options from linked library targets
|
414
|
+
if (_target)
|
415
|
+
set (_linkedTargets "")
|
416
|
+
cotire_get_target_usage_requirements(${_target} _linkedTargets)
|
417
|
+
foreach (_linkedTarget ${_linkedTargets})
|
418
|
+
get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS)
|
419
|
+
if (_targetOptions)
|
420
|
+
list (APPEND _compileFlags ${_targetOptions})
|
421
|
+
endif()
|
422
|
+
endforeach()
|
423
|
+
endif()
|
424
|
+
# handle the POSITION_INDEPENDENT_CODE target property
|
425
|
+
if (_target)
|
426
|
+
get_target_property(_targetPIC ${_target} POSITION_INDEPENDENT_CODE)
|
427
|
+
if (_targetPIC)
|
428
|
+
get_target_property(_targetType ${_target} TYPE)
|
429
|
+
if (_targetType STREQUAL "EXECUTABLE" AND CMAKE_${_language}_COMPILE_OPTIONS_PIE)
|
430
|
+
list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_PIE}")
|
431
|
+
elseif (CMAKE_${_language}_COMPILE_OPTIONS_PIC)
|
432
|
+
list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_PIC}")
|
433
|
+
endif()
|
434
|
+
endif()
|
435
|
+
endif()
|
436
|
+
# platform specific flags
|
437
|
+
if (APPLE)
|
438
|
+
get_target_property(_architectures ${_target} OSX_ARCHITECTURES_${_upperConfig})
|
439
|
+
if (NOT _architectures)
|
440
|
+
get_target_property(_architectures ${_target} OSX_ARCHITECTURES)
|
441
|
+
endif()
|
442
|
+
if (_architectures)
|
443
|
+
foreach (_arch ${_architectures})
|
444
|
+
list (APPEND _compileFlags "-arch" "${_arch}")
|
445
|
+
endforeach()
|
446
|
+
endif()
|
447
|
+
if (CMAKE_OSX_SYSROOT)
|
448
|
+
if (CMAKE_${_language}_SYSROOT_FLAG)
|
449
|
+
list (APPEND _compileFlags "${CMAKE_${_language}_SYSROOT_FLAG}" "${CMAKE_OSX_SYSROOT}")
|
450
|
+
else()
|
451
|
+
list (APPEND _compileFlags "-isysroot" "${CMAKE_OSX_SYSROOT}")
|
452
|
+
endif()
|
453
|
+
endif()
|
454
|
+
if (CMAKE_OSX_DEPLOYMENT_TARGET)
|
455
|
+
if (CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG)
|
456
|
+
list (APPEND _compileFlags "${CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
457
|
+
else()
|
458
|
+
list (APPEND _compileFlags "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
459
|
+
endif()
|
460
|
+
endif()
|
461
|
+
endif()
|
462
|
+
if (COTIRE_DEBUG AND _compileFlags)
|
463
|
+
message (STATUS "Target ${_target} compile flags: ${_compileFlags}")
|
464
|
+
endif()
|
465
|
+
set (${_flagsVar} ${_compileFlags} PARENT_SCOPE)
|
466
|
+
endfunction()
|
467
|
+
|
468
|
+
function (cotire_get_target_include_directories _config _language _target _includeDirsVar _systemIncludeDirsVar)
|
469
|
+
set (_includeDirs "")
|
470
|
+
set (_systemIncludeDirs "")
|
471
|
+
# default include dirs
|
472
|
+
if (CMAKE_INCLUDE_CURRENT_DIR)
|
473
|
+
list (APPEND _includeDirs "${CMAKE_CURRENT_BINARY_DIR}")
|
474
|
+
list (APPEND _includeDirs "${CMAKE_CURRENT_SOURCE_DIR}")
|
475
|
+
endif()
|
476
|
+
# parse additional include directories from target compile flags
|
477
|
+
set (_targetFlags "")
|
478
|
+
cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
|
479
|
+
cotire_filter_compile_flags("${_language}" "I" _dirs _ignore ${_targetFlags})
|
480
|
+
if (_dirs)
|
481
|
+
list (APPEND _includeDirs ${_dirs})
|
482
|
+
endif()
|
483
|
+
# target include directories
|
484
|
+
get_directory_property(_dirs DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" INCLUDE_DIRECTORIES)
|
485
|
+
if (_target)
|
486
|
+
get_target_property(_targetDirs ${_target} INCLUDE_DIRECTORIES)
|
487
|
+
if (_targetDirs)
|
488
|
+
list (APPEND _dirs ${_targetDirs})
|
489
|
+
endif()
|
490
|
+
get_target_property(_targetDirs ${_target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
|
491
|
+
if (_targetDirs)
|
492
|
+
list (APPEND _systemIncludeDirs ${_targetDirs})
|
493
|
+
endif()
|
494
|
+
endif()
|
495
|
+
# interface include directories from linked library targets
|
496
|
+
if (_target)
|
497
|
+
set (_linkedTargets "")
|
498
|
+
cotire_get_target_usage_requirements(${_target} _linkedTargets)
|
499
|
+
foreach (_linkedTarget ${_linkedTargets})
|
500
|
+
get_target_property(_targetDirs ${_linkedTarget} INTERFACE_INCLUDE_DIRECTORIES)
|
501
|
+
if (_targetDirs)
|
502
|
+
list (APPEND _dirs ${_targetDirs})
|
503
|
+
endif()
|
504
|
+
get_target_property(_targetDirs ${_linkedTarget} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
|
505
|
+
if (_targetDirs)
|
506
|
+
list (APPEND _systemIncludeDirs ${_targetDirs})
|
507
|
+
endif()
|
508
|
+
endforeach()
|
509
|
+
endif()
|
510
|
+
if (dirs)
|
511
|
+
list (REMOVE_DUPLICATES _dirs)
|
512
|
+
endif()
|
513
|
+
list (LENGTH _includeDirs _projectInsertIndex)
|
514
|
+
foreach (_dir ${_dirs})
|
515
|
+
if (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE)
|
516
|
+
cotire_check_is_path_relative_to("${_dir}" _isRelative "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}")
|
517
|
+
if (_isRelative)
|
518
|
+
list (LENGTH _includeDirs _len)
|
519
|
+
if (_len EQUAL _projectInsertIndex)
|
520
|
+
list (APPEND _includeDirs "${_dir}")
|
521
|
+
else()
|
522
|
+
list (INSERT _includeDirs _projectInsertIndex "${_dir}")
|
523
|
+
endif()
|
524
|
+
math (EXPR _projectInsertIndex "${_projectInsertIndex} + 1")
|
525
|
+
else()
|
526
|
+
list (APPEND _includeDirs "${_dir}")
|
527
|
+
endif()
|
528
|
+
else()
|
529
|
+
list (APPEND _includeDirs "${_dir}")
|
530
|
+
endif()
|
531
|
+
endforeach()
|
532
|
+
list (REMOVE_DUPLICATES _includeDirs)
|
533
|
+
list (REMOVE_DUPLICATES _systemIncludeDirs)
|
534
|
+
if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
|
535
|
+
list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
|
536
|
+
endif()
|
537
|
+
if (COTIRE_DEBUG AND _includeDirs)
|
538
|
+
message (STATUS "Target ${_target} include dirs: ${_includeDirs}")
|
539
|
+
endif()
|
540
|
+
set (${_includeDirsVar} ${_includeDirs} PARENT_SCOPE)
|
541
|
+
if (COTIRE_DEBUG AND _systemIncludeDirs)
|
542
|
+
message (STATUS "Target ${_target} system include dirs: ${_systemIncludeDirs}")
|
543
|
+
endif()
|
544
|
+
set (${_systemIncludeDirsVar} ${_systemIncludeDirs} PARENT_SCOPE)
|
545
|
+
endfunction()
|
546
|
+
|
547
|
+
function (cotire_get_target_export_symbol _target _exportSymbolVar)
|
548
|
+
set (_exportSymbol "")
|
549
|
+
get_target_property(_targetType ${_target} TYPE)
|
550
|
+
get_target_property(_enableExports ${_target} ENABLE_EXPORTS)
|
551
|
+
if (_targetType MATCHES "(SHARED|MODULE)_LIBRARY" OR
|
552
|
+
(_targetType STREQUAL "EXECUTABLE" AND _enableExports))
|
553
|
+
get_target_property(_exportSymbol ${_target} DEFINE_SYMBOL)
|
554
|
+
if (NOT _exportSymbol)
|
555
|
+
set (_exportSymbol "${_target}_EXPORTS")
|
556
|
+
endif()
|
557
|
+
string (MAKE_C_IDENTIFIER "${_exportSymbol}" _exportSymbol)
|
558
|
+
endif()
|
559
|
+
set (${_exportSymbolVar} ${_exportSymbol} PARENT_SCOPE)
|
560
|
+
endfunction()
|
561
|
+
|
562
|
+
function (cotire_get_target_compile_definitions _config _language _target _definitionsVar)
|
563
|
+
string (TOUPPER "${_config}" _upperConfig)
|
564
|
+
set (_configDefinitions "")
|
565
|
+
# CMAKE_INTDIR for multi-configuration build systems
|
566
|
+
if (NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
|
567
|
+
list (APPEND _configDefinitions "CMAKE_INTDIR=\"${_config}\"")
|
568
|
+
endif()
|
569
|
+
# target export define symbol
|
570
|
+
cotire_get_target_export_symbol("${_target}" _defineSymbol)
|
571
|
+
if (_defineSymbol)
|
572
|
+
list (APPEND _configDefinitions "${_defineSymbol}")
|
573
|
+
endif()
|
574
|
+
# directory compile definitions
|
575
|
+
get_directory_property(_definitions DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMPILE_DEFINITIONS)
|
576
|
+
if (_definitions)
|
577
|
+
list (APPEND _configDefinitions ${_definitions})
|
578
|
+
endif()
|
579
|
+
get_directory_property(_definitions DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMPILE_DEFINITIONS_${_upperConfig})
|
580
|
+
if (_definitions)
|
581
|
+
list (APPEND _configDefinitions ${_definitions})
|
582
|
+
endif()
|
583
|
+
# target compile definitions
|
584
|
+
get_target_property(_definitions ${_target} COMPILE_DEFINITIONS)
|
585
|
+
if (_definitions)
|
586
|
+
list (APPEND _configDefinitions ${_definitions})
|
587
|
+
endif()
|
588
|
+
get_target_property(_definitions ${_target} COMPILE_DEFINITIONS_${_upperConfig})
|
589
|
+
if (_definitions)
|
590
|
+
list (APPEND _configDefinitions ${_definitions})
|
591
|
+
endif()
|
592
|
+
# interface compile definitions from linked library targets
|
593
|
+
set (_linkedTargets "")
|
594
|
+
cotire_get_target_usage_requirements(${_target} _linkedTargets)
|
595
|
+
foreach (_linkedTarget ${_linkedTargets})
|
596
|
+
get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS)
|
597
|
+
if (_definitions)
|
598
|
+
list (APPEND _configDefinitions ${_definitions})
|
599
|
+
endif()
|
600
|
+
endforeach()
|
601
|
+
# parse additional compile definitions from target compile flags
|
602
|
+
# and don't look at directory compile definitions, which we already handled
|
603
|
+
set (_targetFlags "")
|
604
|
+
cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
|
605
|
+
cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags})
|
606
|
+
if (_definitions)
|
607
|
+
list (APPEND _configDefinitions ${_definitions})
|
608
|
+
endif()
|
609
|
+
list (REMOVE_DUPLICATES _configDefinitions)
|
610
|
+
if (COTIRE_DEBUG AND _configDefinitions)
|
611
|
+
message (STATUS "Target ${_target} compile definitions: ${_configDefinitions}")
|
612
|
+
endif()
|
613
|
+
set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE)
|
614
|
+
endfunction()
|
615
|
+
|
616
|
+
function (cotire_get_target_compiler_flags _config _language _target _compilerFlagsVar)
|
617
|
+
# parse target compile flags omitting compile definitions and include directives
|
618
|
+
set (_targetFlags "")
|
619
|
+
cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
|
620
|
+
set (_compilerFlags "")
|
621
|
+
cotire_filter_compile_flags("${_language}" "[ID]" _ignore _compilerFlags ${_targetFlags})
|
622
|
+
if (COTIRE_DEBUG AND _compilerFlags)
|
623
|
+
message (STATUS "Target ${_target} compiler flags: ${_compilerFlags}")
|
624
|
+
endif()
|
625
|
+
set (${_compilerFlagsVar} ${_compilerFlags} PARENT_SCOPE)
|
626
|
+
endfunction()
|
627
|
+
|
628
|
+
function (cotire_add_sys_root_paths _pathsVar)
|
629
|
+
if (APPLE)
|
630
|
+
if (CMAKE_OSX_SYSROOT AND CMAKE_${_language}_HAS_ISYSROOT)
|
631
|
+
foreach (_path IN LISTS ${_pathsVar})
|
632
|
+
if (IS_ABSOLUTE "${_path}")
|
633
|
+
get_filename_component(_path "${CMAKE_OSX_SYSROOT}/${_path}" ABSOLUTE)
|
634
|
+
if (EXISTS "${_path}")
|
635
|
+
list (APPEND ${_pathsVar} "${_path}")
|
636
|
+
endif()
|
637
|
+
endif()
|
638
|
+
endforeach()
|
639
|
+
endif()
|
640
|
+
endif()
|
641
|
+
set (${_pathsVar} ${${_pathsVar}} PARENT_SCOPE)
|
642
|
+
endfunction()
|
643
|
+
|
644
|
+
function (cotire_get_source_extra_properties _sourceFile _pattern _resultVar)
|
645
|
+
set (_extraProperties ${ARGN})
|
646
|
+
set (_result "")
|
647
|
+
if (_extraProperties)
|
648
|
+
list (FIND _extraProperties "${_sourceFile}" _index)
|
649
|
+
if (_index GREATER -1)
|
650
|
+
math (EXPR _index "${_index} + 1")
|
651
|
+
list (LENGTH _extraProperties _len)
|
652
|
+
math (EXPR _len "${_len} - 1")
|
653
|
+
foreach (_index RANGE ${_index} ${_len})
|
654
|
+
list (GET _extraProperties ${_index} _value)
|
655
|
+
if (_value MATCHES "${_pattern}")
|
656
|
+
list (APPEND _result "${_value}")
|
657
|
+
else()
|
658
|
+
break()
|
659
|
+
endif()
|
660
|
+
endforeach()
|
661
|
+
endif()
|
662
|
+
endif()
|
663
|
+
set (${_resultVar} ${_result} PARENT_SCOPE)
|
664
|
+
endfunction()
|
665
|
+
|
666
|
+
function (cotire_get_source_compile_definitions _config _language _sourceFile _definitionsVar)
|
667
|
+
set (_compileDefinitions "")
|
668
|
+
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
669
|
+
string (TOUPPER "${_config}" _upperConfig)
|
670
|
+
get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS)
|
671
|
+
if (_definitions)
|
672
|
+
list (APPEND _compileDefinitions ${_definitions})
|
673
|
+
endif()
|
674
|
+
get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS_${_upperConfig})
|
675
|
+
if (_definitions)
|
676
|
+
list (APPEND _compileDefinitions ${_definitions})
|
677
|
+
endif()
|
678
|
+
endif()
|
679
|
+
cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+(=.*)?$" _definitions ${ARGN})
|
680
|
+
if (_definitions)
|
681
|
+
list (APPEND _compileDefinitions ${_definitions})
|
682
|
+
endif()
|
683
|
+
if (COTIRE_DEBUG AND _compileDefinitions)
|
684
|
+
message (STATUS "Source ${_sourceFile} compile definitions: ${_compileDefinitions}")
|
685
|
+
endif()
|
686
|
+
set (${_definitionsVar} ${_compileDefinitions} PARENT_SCOPE)
|
687
|
+
endfunction()
|
688
|
+
|
689
|
+
function (cotire_get_source_files_compile_definitions _config _language _definitionsVar)
|
690
|
+
set (_configDefinitions "")
|
691
|
+
foreach (_sourceFile ${ARGN})
|
692
|
+
cotire_get_source_compile_definitions("${_config}" "${_language}" "${_sourceFile}" _sourceDefinitions)
|
693
|
+
if (_sourceDefinitions)
|
694
|
+
list (APPEND _configDefinitions "${_sourceFile}" ${_sourceDefinitions} "-")
|
695
|
+
endif()
|
696
|
+
endforeach()
|
697
|
+
set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE)
|
698
|
+
endfunction()
|
699
|
+
|
700
|
+
function (cotire_get_source_undefs _sourceFile _property _sourceUndefsVar)
|
701
|
+
set (_sourceUndefs "")
|
702
|
+
if (NOT CMAKE_SCRIPT_MODE_FILE)
|
703
|
+
get_source_file_property(_undefs "${_sourceFile}" ${_property})
|
704
|
+
if (_undefs)
|
705
|
+
list (APPEND _sourceUndefs ${_undefs})
|
706
|
+
endif()
|
707
|
+
endif()
|
708
|
+
cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+$" _undefs ${ARGN})
|
709
|
+
if (_undefs)
|
710
|
+
list (APPEND _sourceUndefs ${_undefs})
|
711
|
+
endif()
|
712
|
+
if (COTIRE_DEBUG AND _sourceUndefs)
|
713
|
+
message (STATUS "Source ${_sourceFile} ${_property} undefs: ${_sourceUndefs}")
|
714
|
+
endif()
|
715
|
+
set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE)
|
716
|
+
endfunction()
|
717
|
+
|
718
|
+
function (cotire_get_source_files_undefs _property _sourceUndefsVar)
|
719
|
+
set (_sourceUndefs "")
|
720
|
+
foreach (_sourceFile ${ARGN})
|
721
|
+
cotire_get_source_undefs("${_sourceFile}" ${_property} _undefs)
|
722
|
+
if (_undefs)
|
723
|
+
list (APPEND _sourceUndefs "${_sourceFile}" ${_undefs} "-")
|
724
|
+
endif()
|
725
|
+
endforeach()
|
726
|
+
set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE)
|
727
|
+
endfunction()
|
728
|
+
|
729
|
+
macro (cotire_set_cmd_to_prologue _cmdVar)
|
730
|
+
set (${_cmdVar} "${CMAKE_COMMAND}")
|
731
|
+
if (COTIRE_DEBUG)
|
732
|
+
list (APPEND ${_cmdVar} "--warn-uninitialized")
|
733
|
+
endif()
|
734
|
+
list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$<CONFIGURATION>")
|
735
|
+
if (COTIRE_VERBOSE)
|
736
|
+
list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON")
|
737
|
+
elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles")
|
738
|
+
list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=$(VERBOSE)")
|
739
|
+
endif()
|
740
|
+
endmacro()
|
741
|
+
|
742
|
+
function (cotire_init_compile_cmd _cmdVar _language _compilerExe _compilerArg1)
|
743
|
+
if (NOT _compilerExe)
|
744
|
+
set (_compilerExe "${CMAKE_${_language}_COMPILER}")
|
745
|
+
endif()
|
746
|
+
if (NOT _compilerArg1)
|
747
|
+
set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1})
|
748
|
+
endif()
|
749
|
+
string (STRIP "${_compilerArg1}" _compilerArg1)
|
750
|
+
set (${_cmdVar} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE)
|
751
|
+
endfunction()
|
752
|
+
|
753
|
+
macro (cotire_add_definitions_to_cmd _cmdVar _language)
|
754
|
+
foreach (_definition ${ARGN})
|
755
|
+
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
756
|
+
list (APPEND ${_cmdVar} "/D${_definition}")
|
757
|
+
else()
|
758
|
+
list (APPEND ${_cmdVar} "-D${_definition}")
|
759
|
+
endif()
|
760
|
+
endforeach()
|
761
|
+
endmacro()
|
762
|
+
|
763
|
+
macro (cotire_add_includes_to_cmd _cmdVar _language _includeSystemFlag _includesVar _systemIncludesVar)
|
764
|
+
foreach (_include ${${_includesVar}})
|
765
|
+
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
766
|
+
file (TO_NATIVE_PATH "${_include}" _include)
|
767
|
+
list (APPEND ${_cmdVar} "/I${_include}")
|
768
|
+
else()
|
769
|
+
list (FIND ${_systemIncludesVar} ${_include} _index)
|
770
|
+
if(_index GREATER -1 AND NOT "${_includeSystemFlag}" STREQUAL "")
|
771
|
+
list (APPEND ${_cmdVar} "${_includeSystemFlag}${_include}")
|
772
|
+
else()
|
773
|
+
list (APPEND ${_cmdVar} "-I${_include}")
|
774
|
+
endif()
|
775
|
+
endif()
|
776
|
+
endforeach()
|
777
|
+
endmacro()
|
778
|
+
|
779
|
+
macro (cotire_add_frameworks_to_cmd _cmdVar _language)
|
780
|
+
if (APPLE)
|
781
|
+
set (_frameWorkDirs "")
|
782
|
+
foreach (_include ${ARGN})
|
783
|
+
if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$")
|
784
|
+
get_filename_component(_frameWorkDir "${_include}" PATH)
|
785
|
+
list (APPEND _frameWorkDirs "${_frameWorkDir}")
|
786
|
+
endif()
|
787
|
+
endforeach()
|
788
|
+
if (_frameWorkDirs)
|
789
|
+
list (REMOVE_DUPLICATES _frameWorkDirs)
|
790
|
+
foreach (_frameWorkDir ${_frameWorkDirs})
|
791
|
+
list (APPEND ${_cmdVar} "-F${_frameWorkDir}")
|
792
|
+
endforeach()
|
793
|
+
endif()
|
794
|
+
endif()
|
795
|
+
endmacro()
|
796
|
+
|
797
|
+
macro (cotire_add_compile_flags_to_cmd _cmdVar)
|
798
|
+
foreach (_flag ${ARGN})
|
799
|
+
list (APPEND ${_cmdVar} "${_flag}")
|
800
|
+
endforeach()
|
801
|
+
endmacro()
|
802
|
+
|
803
|
+
function (cotire_check_file_up_to_date _fileIsUpToDateVar _file)
|
804
|
+
if (EXISTS "${_file}")
|
805
|
+
set (_triggerFile "")
|
806
|
+
foreach (_dependencyFile ${ARGN})
|
807
|
+
if (EXISTS "${_dependencyFile}")
|
808
|
+
# IS_NEWER_THAN returns TRUE if both files have the same timestamp
|
809
|
+
# thus we do the comparison in both directions to exclude ties
|
810
|
+
if ("${_dependencyFile}" IS_NEWER_THAN "${_file}" AND
|
811
|
+
NOT "${_file}" IS_NEWER_THAN "${_dependencyFile}")
|
812
|
+
set (_triggerFile "${_dependencyFile}")
|
813
|
+
break()
|
814
|
+
endif()
|
815
|
+
endif()
|
816
|
+
endforeach()
|
817
|
+
if (_triggerFile)
|
818
|
+
if (COTIRE_VERBOSE)
|
819
|
+
get_filename_component(_fileName "${_file}" NAME)
|
820
|
+
message (STATUS "${_fileName} update triggered by ${_triggerFile} change.")
|
821
|
+
endif()
|
822
|
+
set (${_fileIsUpToDateVar} FALSE PARENT_SCOPE)
|
823
|
+
else()
|
824
|
+
if (COTIRE_VERBOSE)
|
825
|
+
get_filename_component(_fileName "${_file}" NAME)
|
826
|
+
message (STATUS "${_fileName} is up-to-date.")
|
827
|
+
endif()
|
828
|
+
set (${_fileIsUpToDateVar} TRUE PARENT_SCOPE)
|
829
|
+
endif()
|
830
|
+
else()
|
831
|
+
if (COTIRE_VERBOSE)
|
832
|
+
get_filename_component(_fileName "${_file}" NAME)
|
833
|
+
message (STATUS "${_fileName} does not exist yet.")
|
834
|
+
endif()
|
835
|
+
set (${_fileIsUpToDateVar} FALSE PARENT_SCOPE)
|
836
|
+
endif()
|
837
|
+
endfunction()
|
838
|
+
|
839
|
+
macro (cotire_find_closest_relative_path _headerFile _includeDirs _relPathVar)
|
840
|
+
set (${_relPathVar} "")
|
841
|
+
foreach (_includeDir ${_includeDirs})
|
842
|
+
if (IS_DIRECTORY "${_includeDir}")
|
843
|
+
file (RELATIVE_PATH _relPath "${_includeDir}" "${_headerFile}")
|
844
|
+
if (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\.")
|
845
|
+
string (LENGTH "${${_relPathVar}}" _closestLen)
|
846
|
+
string (LENGTH "${_relPath}" _relLen)
|
847
|
+
if (_closestLen EQUAL 0 OR _relLen LESS _closestLen)
|
848
|
+
set (${_relPathVar} "${_relPath}")
|
849
|
+
endif()
|
850
|
+
endif()
|
851
|
+
elseif ("${_includeDir}" STREQUAL "${_headerFile}")
|
852
|
+
# if path matches exactly, return short non-empty string
|
853
|
+
set (${_relPathVar} "1")
|
854
|
+
break()
|
855
|
+
endif()
|
856
|
+
endforeach()
|
857
|
+
endmacro()
|
858
|
+
|
859
|
+
macro (cotire_check_header_file_location _headerFile _insideIncludeDirs _outsideIncludeDirs _headerIsInside)
|
860
|
+
# check header path against ignored and honored include directories
|
861
|
+
cotire_find_closest_relative_path("${_headerFile}" "${_insideIncludeDirs}" _insideRelPath)
|
862
|
+
if (_insideRelPath)
|
863
|
+
# header is inside, but could be become outside if there is a shorter outside match
|
864
|
+
cotire_find_closest_relative_path("${_headerFile}" "${_outsideIncludeDirs}" _outsideRelPath)
|
865
|
+
if (_outsideRelPath)
|
866
|
+
string (LENGTH "${_insideRelPath}" _insideRelPathLen)
|
867
|
+
string (LENGTH "${_outsideRelPath}" _outsideRelPathLen)
|
868
|
+
if (_outsideRelPathLen LESS _insideRelPathLen)
|
869
|
+
set (${_headerIsInside} FALSE)
|
870
|
+
else()
|
871
|
+
set (${_headerIsInside} TRUE)
|
872
|
+
endif()
|
873
|
+
else()
|
874
|
+
set (${_headerIsInside} TRUE)
|
875
|
+
endif()
|
876
|
+
else()
|
877
|
+
# header is outside
|
878
|
+
set (${_headerIsInside} FALSE)
|
879
|
+
endif()
|
880
|
+
endmacro()
|
881
|
+
|
882
|
+
macro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar)
|
883
|
+
if (NOT EXISTS "${_headerFile}")
|
884
|
+
set (${_headerIsIgnoredVar} TRUE)
|
885
|
+
elseif (IS_DIRECTORY "${_headerFile}")
|
886
|
+
set (${_headerIsIgnoredVar} TRUE)
|
887
|
+
elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed" AND "${_headerFile}" MATCHES "\\.h$")
|
888
|
+
# heuristic: ignore C headers with embedded parent directory references or "-fixed" or "_fixed" in path
|
889
|
+
# these often stem from using GCC #include_next tricks, which may break the precompiled header compilation
|
890
|
+
# with the error message "error: no include path in which to search for header.h"
|
891
|
+
set (${_headerIsIgnoredVar} TRUE)
|
892
|
+
else()
|
893
|
+
set (${_headerIsIgnoredVar} FALSE)
|
894
|
+
endif()
|
895
|
+
endmacro()
|
896
|
+
|
897
|
+
macro (cotire_check_ignore_header_file_ext _headerFile _ignoreExtensionsVar _headerIsIgnoredVar)
|
898
|
+
# check header file extension
|
899
|
+
cotire_get_source_file_extension("${_headerFile}" _headerFileExt)
|
900
|
+
set (${_headerIsIgnoredVar} FALSE)
|
901
|
+
if (_headerFileExt)
|
902
|
+
list (FIND ${_ignoreExtensionsVar} "${_headerFileExt}" _index)
|
903
|
+
if (_index GREATER -1)
|
904
|
+
set (${_headerIsIgnoredVar} TRUE)
|
905
|
+
endif()
|
906
|
+
endif()
|
907
|
+
endmacro()
|
908
|
+
|
909
|
+
macro (cotire_parse_line _line _headerFileVar _headerDepthVar)
|
910
|
+
if (MSVC)
|
911
|
+
# cl.exe /showIncludes output looks different depending on the language pack used, e.g.:
|
912
|
+
# English: "Note: including file: C:\directory\file"
|
913
|
+
# German: "Hinweis: Einlesen der Datei: C:\directory\file"
|
914
|
+
# We use a very general regular expression, relying on the presence of the : characters
|
915
|
+
if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$")
|
916
|
+
# Visual Studio compiler output
|
917
|
+
string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar})
|
918
|
+
get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE)
|
919
|
+
else()
|
920
|
+
set (${_headerFileVar} "")
|
921
|
+
set (${_headerDepthVar} 0)
|
922
|
+
endif()
|
923
|
+
else()
|
924
|
+
if (_line MATCHES "^(\\.+) (.*)$")
|
925
|
+
# GCC like output
|
926
|
+
string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar})
|
927
|
+
if (IS_ABSOLUTE "${CMAKE_MATCH_2}")
|
928
|
+
set (${_headerFileVar} "${CMAKE_MATCH_2}")
|
929
|
+
else()
|
930
|
+
get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" REALPATH)
|
931
|
+
endif()
|
932
|
+
else()
|
933
|
+
set (${_headerFileVar} "")
|
934
|
+
set (${_headerDepthVar} 0)
|
935
|
+
endif()
|
936
|
+
endif()
|
937
|
+
endmacro()
|
938
|
+
|
939
|
+
function (cotire_parse_includes _language _scanOutput _ignoredIncludeDirs _honoredIncludeDirs _ignoredExtensions _selectedIncludesVar _unparsedLinesVar)
|
940
|
+
if (WIN32)
|
941
|
+
# prevent CMake macro invocation errors due to backslash characters in Windows paths
|
942
|
+
string (REPLACE "\\" "/" _scanOutput "${_scanOutput}")
|
943
|
+
endif()
|
944
|
+
# canonize slashes
|
945
|
+
string (REPLACE "//" "/" _scanOutput "${_scanOutput}")
|
946
|
+
# prevent semicolon from being interpreted as a line separator
|
947
|
+
string (REPLACE ";" "\\;" _scanOutput "${_scanOutput}")
|
948
|
+
# then separate lines
|
949
|
+
string (REGEX REPLACE "\n" ";" _scanOutput "${_scanOutput}")
|
950
|
+
list (LENGTH _scanOutput _len)
|
951
|
+
# remove duplicate lines to speed up parsing
|
952
|
+
list (REMOVE_DUPLICATES _scanOutput)
|
953
|
+
list (LENGTH _scanOutput _uniqueLen)
|
954
|
+
if (COTIRE_VERBOSE OR COTIRE_DEBUG)
|
955
|
+
message (STATUS "Scanning ${_uniqueLen} unique lines of ${_len} for includes")
|
956
|
+
if (_ignoredExtensions)
|
957
|
+
message (STATUS "Ignored extensions: ${_ignoredExtensions}")
|
958
|
+
endif()
|
959
|
+
if (_ignoredIncludeDirs)
|
960
|
+
message (STATUS "Ignored paths: ${_ignoredIncludeDirs}")
|
961
|
+
endif()
|
962
|
+
if (_honoredIncludeDirs)
|
963
|
+
message (STATUS "Included paths: ${_honoredIncludeDirs}")
|
964
|
+
endif()
|
965
|
+
endif()
|
966
|
+
set (_sourceFiles ${ARGN})
|
967
|
+
set (_selectedIncludes "")
|
968
|
+
set (_unparsedLines "")
|
969
|
+
# stack keeps track of inside/outside project status of processed header files
|
970
|
+
set (_headerIsInsideStack "")
|
971
|
+
foreach (_line IN LISTS _scanOutput)
|
972
|
+
if (_line)
|
973
|
+
cotire_parse_line("${_line}" _headerFile _headerDepth)
|
974
|
+
if (_headerFile)
|
975
|
+
cotire_check_header_file_location("${_headerFile}" "${_ignoredIncludeDirs}" "${_honoredIncludeDirs}" _headerIsInside)
|
976
|
+
if (COTIRE_DEBUG)
|
977
|
+
message (STATUS "${_headerDepth}: ${_headerFile} ${_headerIsInside}")
|
978
|
+
endif()
|
979
|
+
# update stack
|
980
|
+
list (LENGTH _headerIsInsideStack _stackLen)
|
981
|
+
if (_headerDepth GREATER _stackLen)
|
982
|
+
math (EXPR _stackLen "${_stackLen} + 1")
|
983
|
+
foreach (_index RANGE ${_stackLen} ${_headerDepth})
|
984
|
+
list (APPEND _headerIsInsideStack ${_headerIsInside})
|
985
|
+
endforeach()
|
986
|
+
else()
|
987
|
+
foreach (_index RANGE ${_headerDepth} ${_stackLen})
|
988
|
+
list (REMOVE_AT _headerIsInsideStack -1)
|
989
|
+
endforeach()
|
990
|
+
list (APPEND _headerIsInsideStack ${_headerIsInside})
|
991
|
+
endif()
|
992
|
+
if (COTIRE_DEBUG)
|
993
|
+
message (STATUS "${_headerIsInsideStack}")
|
994
|
+
endif()
|
995
|
+
# header is a candidate if it is outside project
|
996
|
+
if (NOT _headerIsInside)
|
997
|
+
# get parent header file's inside/outside status
|
998
|
+
if (_headerDepth GREATER 1)
|
999
|
+
math (EXPR _index "${_headerDepth} - 2")
|
1000
|
+
list (GET _headerIsInsideStack ${_index} _parentHeaderIsInside)
|
1001
|
+
else()
|
1002
|
+
set (_parentHeaderIsInside TRUE)
|
1003
|
+
endif()
|
1004
|
+
# select header file if parent header file is inside project
|
1005
|
+
# (e.g., a project header file that includes a standard header file)
|
1006
|
+
if (_parentHeaderIsInside)
|
1007
|
+
cotire_check_ignore_header_file_path("${_headerFile}" _headerIsIgnored)
|
1008
|
+
if (NOT _headerIsIgnored)
|
1009
|
+
cotire_check_ignore_header_file_ext("${_headerFile}" _ignoredExtensions _headerIsIgnored)
|
1010
|
+
if (NOT _headerIsIgnored)
|
1011
|
+
list (APPEND _selectedIncludes "${_headerFile}")
|
1012
|
+
else()
|
1013
|
+
# fix header's inside status on stack, it is ignored by extension now
|
1014
|
+
list (REMOVE_AT _headerIsInsideStack -1)
|
1015
|
+
list (APPEND _headerIsInsideStack TRUE)
|
1016
|
+
endif()
|
1017
|
+
endif()
|
1018
|
+
if (COTIRE_DEBUG)
|
1019
|
+
message (STATUS "${_headerFile} ${_ignoredExtensions} ${_headerIsIgnored}")
|
1020
|
+
endif()
|
1021
|
+
endif()
|
1022
|
+
endif()
|
1023
|
+
else()
|
1024
|
+
if (MSVC)
|
1025
|
+
# for cl.exe do not keep unparsed lines which solely consist of a source file name
|
1026
|
+
string (FIND "${_sourceFiles}" "${_line}" _index)
|
1027
|
+
if (_index LESS 0)
|
1028
|
+
list (APPEND _unparsedLines "${_line}")
|
1029
|
+
endif()
|
1030
|
+
else()
|
1031
|
+
list (APPEND _unparsedLines "${_line}")
|
1032
|
+
endif()
|
1033
|
+
endif()
|
1034
|
+
endif()
|
1035
|
+
endforeach()
|
1036
|
+
list (REMOVE_DUPLICATES _selectedIncludes)
|
1037
|
+
set (${_selectedIncludesVar} ${_selectedIncludes} PARENT_SCOPE)
|
1038
|
+
set (${_unparsedLinesVar} ${_unparsedLines} PARENT_SCOPE)
|
1039
|
+
endfunction()
|
1040
|
+
|
1041
|
+
function (cotire_scan_includes _includesVar)
|
1042
|
+
set(_options "")
|
1043
|
+
set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE UNPARSED_LINES)
|
1044
|
+
set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES
|
1045
|
+
IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
|
1046
|
+
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
1047
|
+
set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
|
1048
|
+
if (NOT _option_LANGUAGE)
|
1049
|
+
set (_option_LANGUAGE "CXX")
|
1050
|
+
endif()
|
1051
|
+
if (NOT _option_COMPILER_ID)
|
1052
|
+
set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}")
|
1053
|
+
endif()
|
1054
|
+
if (NOT _option_COMPILER_VERSION)
|
1055
|
+
set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}")
|
1056
|
+
endif()
|
1057
|
+
set (_cmd "${_option_COMPILER_EXECUTABLE}" ${_option_COMPILER_ARG1})
|
1058
|
+
cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
|
1059
|
+
cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS})
|
1060
|
+
cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})
|
1061
|
+
cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" "${_option_INCLUDE_SYSTEM_FLAG}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)
|
1062
|
+
cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES})
|
1063
|
+
cotire_add_makedep_flags("${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" _cmd)
|
1064
|
+
# only consider existing source files for scanning
|
1065
|
+
set (_existingSourceFiles "")
|
1066
|
+
foreach (_sourceFile ${_sourceFiles})
|
1067
|
+
if (EXISTS "${_sourceFile}")
|
1068
|
+
list (APPEND _existingSourceFiles "${_sourceFile}")
|
1069
|
+
endif()
|
1070
|
+
endforeach()
|
1071
|
+
if (NOT _existingSourceFiles)
|
1072
|
+
set (${_includesVar} "" PARENT_SCOPE)
|
1073
|
+
return()
|
1074
|
+
endif()
|
1075
|
+
list (APPEND _cmd ${_existingSourceFiles})
|
1076
|
+
if (COTIRE_VERBOSE)
|
1077
|
+
message (STATUS "execute_process: ${_cmd}")
|
1078
|
+
endif()
|
1079
|
+
if (_option_COMPILER_ID MATCHES "MSVC")
|
1080
|
+
# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
|
1081
|
+
unset (ENV{VS_UNICODE_OUTPUT})
|
1082
|
+
endif()
|
1083
|
+
execute_process(
|
1084
|
+
COMMAND ${_cmd}
|
1085
|
+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
1086
|
+
RESULT_VARIABLE _result
|
1087
|
+
OUTPUT_QUIET
|
1088
|
+
ERROR_VARIABLE _output)
|
1089
|
+
if (_result)
|
1090
|
+
message (STATUS "Result ${_result} scanning includes of ${_existingSourceFiles}.")
|
1091
|
+
endif()
|
1092
|
+
cotire_parse_includes(
|
1093
|
+
"${_option_LANGUAGE}" "${_output}"
|
1094
|
+
"${_option_IGNORE_PATH}" "${_option_INCLUDE_PATH}"
|
1095
|
+
"${_option_IGNORE_EXTENSIONS}"
|
1096
|
+
_includes _unparsedLines
|
1097
|
+
${_sourceFiles})
|
1098
|
+
if (_option_INCLUDE_PRIORITY_PATH)
|
1099
|
+
set (_sortedIncludes "")
|
1100
|
+
foreach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH})
|
1101
|
+
foreach (_include ${_includes})
|
1102
|
+
string (FIND ${_include} ${_priorityPath} _position)
|
1103
|
+
if (_position GREATER -1)
|
1104
|
+
list (APPEND _sortedIncludes ${_include})
|
1105
|
+
endif()
|
1106
|
+
endforeach()
|
1107
|
+
endforeach()
|
1108
|
+
if (_sortedIncludes)
|
1109
|
+
list (INSERT _includes 0 ${_sortedIncludes})
|
1110
|
+
list (REMOVE_DUPLICATES _includes)
|
1111
|
+
endif()
|
1112
|
+
endif()
|
1113
|
+
set (${_includesVar} ${_includes} PARENT_SCOPE)
|
1114
|
+
if (_option_UNPARSED_LINES)
|
1115
|
+
set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE)
|
1116
|
+
endif()
|
1117
|
+
endfunction()
|
1118
|
+
|
1119
|
+
macro (cotire_append_undefs _contentsVar)
|
1120
|
+
set (_undefs ${ARGN})
|
1121
|
+
if (_undefs)
|
1122
|
+
list (REMOVE_DUPLICATES _undefs)
|
1123
|
+
foreach (_definition ${_undefs})
|
1124
|
+
list (APPEND ${_contentsVar} "#undef ${_definition}")
|
1125
|
+
endforeach()
|
1126
|
+
endif()
|
1127
|
+
endmacro()
|
1128
|
+
|
1129
|
+
macro (cotire_comment_str _language _commentText _commentVar)
|
1130
|
+
if ("${_language}" STREQUAL "CMAKE")
|
1131
|
+
set (${_commentVar} "# ${_commentText}")
|
1132
|
+
else()
|
1133
|
+
set (${_commentVar} "/* ${_commentText} */")
|
1134
|
+
endif()
|
1135
|
+
endmacro()
|
1136
|
+
|
1137
|
+
function (cotire_write_file _language _file _contents _force)
|
1138
|
+
get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME)
|
1139
|
+
cotire_comment_str("${_language}" "${_moduleName} ${COTIRE_CMAKE_MODULE_VERSION} generated file" _header1)
|
1140
|
+
cotire_comment_str("${_language}" "${_file}" _header2)
|
1141
|
+
set (_contents "${_header1}\n${_header2}\n${_contents}")
|
1142
|
+
if (COTIRE_DEBUG)
|
1143
|
+
message (STATUS "${_contents}")
|
1144
|
+
endif()
|
1145
|
+
if (_force OR NOT EXISTS "${_file}")
|
1146
|
+
file (WRITE "${_file}" "${_contents}")
|
1147
|
+
else()
|
1148
|
+
file (READ "${_file}" _oldContents)
|
1149
|
+
if (NOT "${_oldContents}" STREQUAL "${_contents}")
|
1150
|
+
file (WRITE "${_file}" "${_contents}")
|
1151
|
+
else()
|
1152
|
+
if (COTIRE_DEBUG)
|
1153
|
+
message (STATUS "${_file} unchanged")
|
1154
|
+
endif()
|
1155
|
+
endif()
|
1156
|
+
endif()
|
1157
|
+
endfunction()
|
1158
|
+
|
1159
|
+
function (cotire_generate_unity_source _unityFile)
|
1160
|
+
set(_options "")
|
1161
|
+
set(_oneValueArgs LANGUAGE)
|
1162
|
+
set(_multiValueArgs
|
1163
|
+
DEPENDS SOURCES_COMPILE_DEFINITIONS
|
1164
|
+
PRE_UNDEFS SOURCES_PRE_UNDEFS POST_UNDEFS SOURCES_POST_UNDEFS PROLOGUE EPILOGUE)
|
1165
|
+
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
1166
|
+
if (_option_DEPENDS)
|
1167
|
+
cotire_check_file_up_to_date(_unityFileIsUpToDate "${_unityFile}" ${_option_DEPENDS})
|
1168
|
+
if (_unityFileIsUpToDate)
|
1169
|
+
return()
|
1170
|
+
endif()
|
1171
|
+
endif()
|
1172
|
+
set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
|
1173
|
+
if (NOT _option_PRE_UNDEFS)
|
1174
|
+
set (_option_PRE_UNDEFS "")
|
1175
|
+
endif()
|
1176
|
+
if (NOT _option_SOURCES_PRE_UNDEFS)
|
1177
|
+
set (_option_SOURCES_PRE_UNDEFS "")
|
1178
|
+
endif()
|
1179
|
+
if (NOT _option_POST_UNDEFS)
|
1180
|
+
set (_option_POST_UNDEFS "")
|
1181
|
+
endif()
|
1182
|
+
if (NOT _option_SOURCES_POST_UNDEFS)
|
1183
|
+
set (_option_SOURCES_POST_UNDEFS "")
|
1184
|
+
endif()
|
1185
|
+
set (_contents "")
|
1186
|
+
if (_option_PROLOGUE)
|
1187
|
+
list (APPEND _contents ${_option_PROLOGUE})
|
1188
|
+
endif()
|
1189
|
+
if (_option_LANGUAGE AND _sourceFiles)
|
1190
|
+
if ("${_option_LANGUAGE}" STREQUAL "CXX")
|
1191
|
+
list (APPEND _contents "#ifdef __cplusplus")
|
1192
|
+
elseif ("${_option_LANGUAGE}" STREQUAL "C")
|
1193
|
+
list (APPEND _contents "#ifndef __cplusplus")
|
1194
|
+
endif()
|
1195
|
+
endif()
|
1196
|
+
set (_compileUndefinitions "")
|
1197
|
+
foreach (_sourceFile ${_sourceFiles})
|
1198
|
+
cotire_get_source_compile_definitions(
|
1199
|
+
"${_option_CONFIGURATION}" "${_option_LANGUAGE}" "${_sourceFile}" _compileDefinitions
|
1200
|
+
${_option_SOURCES_COMPILE_DEFINITIONS})
|
1201
|
+
cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_PRE_UNDEFS _sourcePreUndefs ${_option_SOURCES_PRE_UNDEFS})
|
1202
|
+
cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_POST_UNDEFS _sourcePostUndefs ${_option_SOURCES_POST_UNDEFS})
|
1203
|
+
if (_option_PRE_UNDEFS)
|
1204
|
+
list (APPEND _compileUndefinitions ${_option_PRE_UNDEFS})
|
1205
|
+
endif()
|
1206
|
+
if (_sourcePreUndefs)
|
1207
|
+
list (APPEND _compileUndefinitions ${_sourcePreUndefs})
|
1208
|
+
endif()
|
1209
|
+
if (_compileUndefinitions)
|
1210
|
+
cotire_append_undefs(_contents ${_compileUndefinitions})
|
1211
|
+
set (_compileUndefinitions "")
|
1212
|
+
endif()
|
1213
|
+
if (_sourcePostUndefs)
|
1214
|
+
list (APPEND _compileUndefinitions ${_sourcePostUndefs})
|
1215
|
+
endif()
|
1216
|
+
if (_option_POST_UNDEFS)
|
1217
|
+
list (APPEND _compileUndefinitions ${_option_POST_UNDEFS})
|
1218
|
+
endif()
|
1219
|
+
foreach (_definition ${_compileDefinitions})
|
1220
|
+
if (_definition MATCHES "^([a-zA-Z0-9_]+)=(.+)$")
|
1221
|
+
list (APPEND _contents "#define ${CMAKE_MATCH_1} ${CMAKE_MATCH_2}")
|
1222
|
+
list (INSERT _compileUndefinitions 0 "${CMAKE_MATCH_1}")
|
1223
|
+
else()
|
1224
|
+
list (APPEND _contents "#define ${_definition}")
|
1225
|
+
list (INSERT _compileUndefinitions 0 "${_definition}")
|
1226
|
+
endif()
|
1227
|
+
endforeach()
|
1228
|
+
# use absolute path as source file location
|
1229
|
+
get_filename_component(_sourceFileLocation "${_sourceFile}" ABSOLUTE)
|
1230
|
+
if (WIN32)
|
1231
|
+
file (TO_NATIVE_PATH "${_sourceFileLocation}" _sourceFileLocation)
|
1232
|
+
endif()
|
1233
|
+
list (APPEND _contents "#include \"${_sourceFileLocation}\"")
|
1234
|
+
endforeach()
|
1235
|
+
if (_compileUndefinitions)
|
1236
|
+
cotire_append_undefs(_contents ${_compileUndefinitions})
|
1237
|
+
set (_compileUndefinitions "")
|
1238
|
+
endif()
|
1239
|
+
if (_option_LANGUAGE AND _sourceFiles)
|
1240
|
+
list (APPEND _contents "#endif")
|
1241
|
+
endif()
|
1242
|
+
if (_option_EPILOGUE)
|
1243
|
+
list (APPEND _contents ${_option_EPILOGUE})
|
1244
|
+
endif()
|
1245
|
+
list (APPEND _contents "")
|
1246
|
+
string (REPLACE ";" "\n" _contents "${_contents}")
|
1247
|
+
if (COTIRE_VERBOSE)
|
1248
|
+
message ("${_contents}")
|
1249
|
+
endif()
|
1250
|
+
cotire_write_file("${_option_LANGUAGE}" "${_unityFile}" "${_contents}" TRUE)
|
1251
|
+
endfunction()
|
1252
|
+
|
1253
|
+
function (cotire_generate_prefix_header _prefixFile)
|
1254
|
+
set(_options "")
|
1255
|
+
set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG)
|
1256
|
+
set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS
|
1257
|
+
INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH
|
1258
|
+
IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
|
1259
|
+
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
1260
|
+
if (NOT _option_COMPILER_ID)
|
1261
|
+
set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}")
|
1262
|
+
endif()
|
1263
|
+
if (NOT _option_COMPILER_VERSION)
|
1264
|
+
set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}")
|
1265
|
+
endif()
|
1266
|
+
if (_option_DEPENDS)
|
1267
|
+
cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS})
|
1268
|
+
if (_prefixFileIsUpToDate)
|
1269
|
+
# create empty log file
|
1270
|
+
set (_unparsedLinesFile "${_prefixFile}.log")
|
1271
|
+
file (WRITE "${_unparsedLinesFile}" "")
|
1272
|
+
return()
|
1273
|
+
endif()
|
1274
|
+
endif()
|
1275
|
+
set (_prologue "")
|
1276
|
+
set (_epilogue "")
|
1277
|
+
if (_option_COMPILER_ID MATCHES "Clang")
|
1278
|
+
set (_prologue "#pragma clang system_header")
|
1279
|
+
elseif (_option_COMPILER_ID MATCHES "GNU")
|
1280
|
+
set (_prologue "#pragma GCC system_header")
|
1281
|
+
elseif (_option_COMPILER_ID MATCHES "MSVC")
|
1282
|
+
set (_prologue "#pragma warning(push, 0)")
|
1283
|
+
set (_epilogue "#pragma warning(pop)")
|
1284
|
+
elseif (_option_COMPILER_ID MATCHES "Intel")
|
1285
|
+
# Intel compiler requires hdrstop pragma to stop generating PCH file
|
1286
|
+
set (_epilogue "#pragma hdrstop")
|
1287
|
+
endif()
|
1288
|
+
set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
|
1289
|
+
cotire_scan_includes(_selectedHeaders ${_sourceFiles}
|
1290
|
+
LANGUAGE "${_option_LANGUAGE}"
|
1291
|
+
COMPILER_EXECUTABLE "${_option_COMPILER_EXECUTABLE}"
|
1292
|
+
COMPILER_ID "${_option_COMPILER_ID}"
|
1293
|
+
COMPILER_VERSION "${_option_COMPILER_VERSION}"
|
1294
|
+
COMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS}
|
1295
|
+
COMPILE_FLAGS ${_option_COMPILE_FLAGS}
|
1296
|
+
INCLUDE_DIRECTORIES ${_option_INCLUDE_DIRECTORIES}
|
1297
|
+
INCLUDE_SYSTEM_FLAG ${_option_INCLUDE_SYSTEM_FLAG}
|
1298
|
+
SYSTEM_INCLUDE_DIRECTORIES ${_option_SYSTEM_INCLUDE_DIRECTORIES}
|
1299
|
+
IGNORE_PATH ${_option_IGNORE_PATH}
|
1300
|
+
INCLUDE_PATH ${_option_INCLUDE_PATH}
|
1301
|
+
IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS}
|
1302
|
+
INCLUDE_PRIORITY_PATH ${_option_INCLUDE_PRIORITY_PATH}
|
1303
|
+
UNPARSED_LINES _unparsedLines)
|
1304
|
+
cotire_generate_unity_source("${_prefixFile}"
|
1305
|
+
PROLOGUE ${_prologue} EPILOGUE ${_epilogue} LANGUAGE "${_option_LANGUAGE}" ${_selectedHeaders})
|
1306
|
+
set (_unparsedLinesFile "${_prefixFile}.log")
|
1307
|
+
if (_unparsedLines)
|
1308
|
+
if (COTIRE_VERBOSE OR NOT _selectedHeaders)
|
1309
|
+
list (LENGTH _unparsedLines _skippedLineCount)
|
1310
|
+
message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}")
|
1311
|
+
endif()
|
1312
|
+
string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}")
|
1313
|
+
endif()
|
1314
|
+
file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}")
|
1315
|
+
endfunction()
|
1316
|
+
|
1317
|
+
function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar)
|
1318
|
+
set (_flags ${${_flagsVar}})
|
1319
|
+
if (_compilerID MATCHES "MSVC")
|
1320
|
+
# cl.exe options used
|
1321
|
+
# /nologo suppresses display of sign-on banner
|
1322
|
+
# /TC treat all files named on the command line as C source files
|
1323
|
+
# /TP treat all files named on the command line as C++ source files
|
1324
|
+
# /EP preprocess to stdout without #line directives
|
1325
|
+
# /showIncludes list include files
|
1326
|
+
set (_sourceFileTypeC "/TC")
|
1327
|
+
set (_sourceFileTypeCXX "/TP")
|
1328
|
+
if (_flags)
|
1329
|
+
# append to list
|
1330
|
+
list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /showIncludes)
|
1331
|
+
else()
|
1332
|
+
# return as a flag string
|
1333
|
+
set (_flags "${_sourceFileType${_language}} /EP /showIncludes")
|
1334
|
+
endif()
|
1335
|
+
elseif (_compilerID MATCHES "GNU")
|
1336
|
+
# GCC options used
|
1337
|
+
# -H print the name of each header file used
|
1338
|
+
# -E invoke preprocessor
|
1339
|
+
# -fdirectives-only do not expand macros, requires GCC >= 4.3
|
1340
|
+
if (_flags)
|
1341
|
+
# append to list
|
1342
|
+
list (APPEND _flags -H -E)
|
1343
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0")
|
1344
|
+
list (APPEND _flags "-fdirectives-only")
|
1345
|
+
endif()
|
1346
|
+
else()
|
1347
|
+
# return as a flag string
|
1348
|
+
set (_flags "-H -E")
|
1349
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0")
|
1350
|
+
set (_flags "${_flags} -fdirectives-only")
|
1351
|
+
endif()
|
1352
|
+
endif()
|
1353
|
+
elseif (_compilerID MATCHES "Clang")
|
1354
|
+
# Clang options used
|
1355
|
+
# -H print the name of each header file used
|
1356
|
+
# -E invoke preprocessor
|
1357
|
+
# -fno-color-diagnostics don't prints diagnostics in color
|
1358
|
+
if (_flags)
|
1359
|
+
# append to list
|
1360
|
+
list (APPEND _flags -H -E -fno-color-diagnostics)
|
1361
|
+
else()
|
1362
|
+
# return as a flag string
|
1363
|
+
set (_flags "-H -E -fno-color-diagnostics")
|
1364
|
+
endif()
|
1365
|
+
elseif (_compilerID MATCHES "Intel")
|
1366
|
+
if (WIN32)
|
1367
|
+
# Windows Intel options used
|
1368
|
+
# /nologo do not display compiler version information
|
1369
|
+
# /QH display the include file order
|
1370
|
+
# /EP preprocess to stdout, omitting #line directives
|
1371
|
+
# /TC process all source or unrecognized file types as C source files
|
1372
|
+
# /TP process all source or unrecognized file types as C++ source files
|
1373
|
+
set (_sourceFileTypeC "/TC")
|
1374
|
+
set (_sourceFileTypeCXX "/TP")
|
1375
|
+
if (_flags)
|
1376
|
+
# append to list
|
1377
|
+
list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /QH)
|
1378
|
+
else()
|
1379
|
+
# return as a flag string
|
1380
|
+
set (_flags "${_sourceFileType${_language}} /EP /QH")
|
1381
|
+
endif()
|
1382
|
+
else()
|
1383
|
+
# Linux / Mac OS X Intel options used
|
1384
|
+
# -H print the name of each header file used
|
1385
|
+
# -EP preprocess to stdout, omitting #line directives
|
1386
|
+
# -Kc++ process all source or unrecognized file types as C++ source files
|
1387
|
+
if (_flags)
|
1388
|
+
# append to list
|
1389
|
+
if ("${_language}" STREQUAL "CXX")
|
1390
|
+
list (APPEND _flags -Kc++)
|
1391
|
+
endif()
|
1392
|
+
list (APPEND _flags -H -EP)
|
1393
|
+
else()
|
1394
|
+
# return as a flag string
|
1395
|
+
if ("${_language}" STREQUAL "CXX")
|
1396
|
+
set (_flags "-Kc++ ")
|
1397
|
+
endif()
|
1398
|
+
set (_flags "${_flags}-H -EP")
|
1399
|
+
endif()
|
1400
|
+
endif()
|
1401
|
+
else()
|
1402
|
+
message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.")
|
1403
|
+
endif()
|
1404
|
+
set (${_flagsVar} ${_flags} PARENT_SCOPE)
|
1405
|
+
endfunction()
|
1406
|
+
|
1407
|
+
function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersion _prefixFile _pchFile _hostFile _flagsVar)
|
1408
|
+
set (_flags ${${_flagsVar}})
|
1409
|
+
if (_compilerID MATCHES "MSVC")
|
1410
|
+
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
1411
|
+
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
|
1412
|
+
file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative)
|
1413
|
+
# cl.exe options used
|
1414
|
+
# /Yc creates a precompiled header file
|
1415
|
+
# /Fp specifies precompiled header binary file name
|
1416
|
+
# /FI forces inclusion of file
|
1417
|
+
# /TC treat all files named on the command line as C source files
|
1418
|
+
# /TP treat all files named on the command line as C++ source files
|
1419
|
+
# /Zs syntax check only
|
1420
|
+
# /Zm precompiled header memory allocation scaling factor
|
1421
|
+
set (_sourceFileTypeC "/TC")
|
1422
|
+
set (_sourceFileTypeCXX "/TP")
|
1423
|
+
if (_flags)
|
1424
|
+
# append to list
|
1425
|
+
list (APPEND _flags /nologo "${_sourceFileType${_language}}"
|
1426
|
+
"/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}")
|
1427
|
+
if (COTIRE_PCH_MEMORY_SCALING_FACTOR)
|
1428
|
+
list (APPEND _flags "/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}")
|
1429
|
+
endif()
|
1430
|
+
else()
|
1431
|
+
# return as a flag string
|
1432
|
+
set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
|
1433
|
+
if (COTIRE_PCH_MEMORY_SCALING_FACTOR)
|
1434
|
+
set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}")
|
1435
|
+
endif()
|
1436
|
+
endif()
|
1437
|
+
elseif (_compilerID MATCHES "GNU|Clang")
|
1438
|
+
# GCC / Clang options used
|
1439
|
+
# -x specify the source language
|
1440
|
+
# -c compile but do not link
|
1441
|
+
# -o place output in file
|
1442
|
+
# note that we cannot use -w to suppress all warnings upon pre-compiling, because turning off a warning may
|
1443
|
+
# alter compile flags as a side effect (e.g., -Wwrite-string implies -fconst-strings)
|
1444
|
+
set (_xLanguage_C "c-header")
|
1445
|
+
set (_xLanguage_CXX "c++-header")
|
1446
|
+
if (_flags)
|
1447
|
+
# append to list
|
1448
|
+
list (APPEND _flags "-x" "${_xLanguage_${_language}}" "-c" "${_prefixFile}" -o "${_pchFile}")
|
1449
|
+
else()
|
1450
|
+
# return as a flag string
|
1451
|
+
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
|
1452
|
+
endif()
|
1453
|
+
elseif (_compilerID MATCHES "Intel")
|
1454
|
+
if (WIN32)
|
1455
|
+
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
1456
|
+
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
|
1457
|
+
file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative)
|
1458
|
+
# Windows Intel options used
|
1459
|
+
# /nologo do not display compiler version information
|
1460
|
+
# /Yc create a precompiled header (PCH) file
|
1461
|
+
# /Fp specify a path or file name for precompiled header files
|
1462
|
+
# /FI tells the preprocessor to include a specified file name as the header file
|
1463
|
+
# /TC process all source or unrecognized file types as C source files
|
1464
|
+
# /TP process all source or unrecognized file types as C++ source files
|
1465
|
+
# /Zs syntax check only
|
1466
|
+
# /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)
|
1467
|
+
set (_sourceFileTypeC "/TC")
|
1468
|
+
set (_sourceFileTypeCXX "/TP")
|
1469
|
+
if (_flags)
|
1470
|
+
# append to list
|
1471
|
+
list (APPEND _flags /nologo "${_sourceFileType${_language}}"
|
1472
|
+
"/Yc" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}")
|
1473
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1474
|
+
list (APPEND _flags "/Wpch-messages")
|
1475
|
+
endif()
|
1476
|
+
else()
|
1477
|
+
# return as a flag string
|
1478
|
+
set (_flags "/Yc /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
|
1479
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1480
|
+
set (_flags "${_flags} /Wpch-messages")
|
1481
|
+
endif()
|
1482
|
+
endif()
|
1483
|
+
else()
|
1484
|
+
# Linux / Mac OS X Intel options used
|
1485
|
+
# -pch-dir location for precompiled header files
|
1486
|
+
# -pch-create name of the precompiled header (PCH) to create
|
1487
|
+
# -Kc++ process all source or unrecognized file types as C++ source files
|
1488
|
+
# -fsyntax-only check only for correct syntax
|
1489
|
+
# -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)
|
1490
|
+
get_filename_component(_pchDir "${_pchFile}" PATH)
|
1491
|
+
get_filename_component(_pchName "${_pchFile}" NAME)
|
1492
|
+
set (_xLanguage_C "c-header")
|
1493
|
+
set (_xLanguage_CXX "c++-header")
|
1494
|
+
if (_flags)
|
1495
|
+
# append to list
|
1496
|
+
if ("${_language}" STREQUAL "CXX")
|
1497
|
+
list (APPEND _flags -Kc++)
|
1498
|
+
endif()
|
1499
|
+
list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}")
|
1500
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1501
|
+
list (APPEND _flags "-Wpch-messages")
|
1502
|
+
endif()
|
1503
|
+
else()
|
1504
|
+
# return as a flag string
|
1505
|
+
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"")
|
1506
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1507
|
+
set (_flags "${_flags} -Wpch-messages")
|
1508
|
+
endif()
|
1509
|
+
endif()
|
1510
|
+
endif()
|
1511
|
+
else()
|
1512
|
+
message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.")
|
1513
|
+
endif()
|
1514
|
+
set (${_flagsVar} ${_flags} PARENT_SCOPE)
|
1515
|
+
endfunction()
|
1516
|
+
|
1517
|
+
function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerVersion _prefixFile _pchFile _flagsVar)
|
1518
|
+
set (_flags ${${_flagsVar}})
|
1519
|
+
if (_compilerID MATCHES "MSVC")
|
1520
|
+
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
1521
|
+
# cl.exe options used
|
1522
|
+
# /Yu uses a precompiled header file during build
|
1523
|
+
# /Fp specifies precompiled header binary file name
|
1524
|
+
# /FI forces inclusion of file
|
1525
|
+
# /Zm precompiled header memory allocation scaling factor
|
1526
|
+
if (_pchFile)
|
1527
|
+
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
|
1528
|
+
if (_flags)
|
1529
|
+
# append to list
|
1530
|
+
list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}")
|
1531
|
+
if (COTIRE_PCH_MEMORY_SCALING_FACTOR)
|
1532
|
+
list (APPEND _flags "/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}")
|
1533
|
+
endif()
|
1534
|
+
else()
|
1535
|
+
# return as a flag string
|
1536
|
+
set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
|
1537
|
+
if (COTIRE_PCH_MEMORY_SCALING_FACTOR)
|
1538
|
+
set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}")
|
1539
|
+
endif()
|
1540
|
+
endif()
|
1541
|
+
else()
|
1542
|
+
# no precompiled header, force inclusion of prefix header
|
1543
|
+
if (_flags)
|
1544
|
+
# append to list
|
1545
|
+
list (APPEND _flags "/FI${_prefixFileNative}")
|
1546
|
+
else()
|
1547
|
+
# return as a flag string
|
1548
|
+
set (_flags "/FI\"${_prefixFileNative}\"")
|
1549
|
+
endif()
|
1550
|
+
endif()
|
1551
|
+
elseif (_compilerID MATCHES "GNU")
|
1552
|
+
# GCC options used
|
1553
|
+
# -include process include file as the first line of the primary source file
|
1554
|
+
# -Winvalid-pch warns if precompiled header is found but cannot be used
|
1555
|
+
# note: ccache requires the -include flag to be used in order to process precompiled header correctly
|
1556
|
+
if (_flags)
|
1557
|
+
# append to list
|
1558
|
+
list (APPEND _flags "-Winvalid-pch" "-include" "${_prefixFile}")
|
1559
|
+
else()
|
1560
|
+
# return as a flag string
|
1561
|
+
set (_flags "-Winvalid-pch -include \"${_prefixFile}\"")
|
1562
|
+
endif()
|
1563
|
+
elseif (_compilerID MATCHES "Clang")
|
1564
|
+
# Clang options used
|
1565
|
+
# -include process include file as the first line of the primary source file
|
1566
|
+
# -include-pch include precompiled header file
|
1567
|
+
# -Qunused-arguments don't emit warning for unused driver arguments
|
1568
|
+
# note: ccache requires the -include flag to be used in order to process precompiled header correctly
|
1569
|
+
if (_flags)
|
1570
|
+
# append to list
|
1571
|
+
list (APPEND _flags "-Qunused-arguments" "-include" "${_prefixFile}")
|
1572
|
+
else()
|
1573
|
+
# return as a flag string
|
1574
|
+
set (_flags "-Qunused-arguments -include \"${_prefixFile}\"")
|
1575
|
+
endif()
|
1576
|
+
elseif (_compilerID MATCHES "Intel")
|
1577
|
+
if (WIN32)
|
1578
|
+
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
|
1579
|
+
# Windows Intel options used
|
1580
|
+
# /Yu use a precompiled header (PCH) file
|
1581
|
+
# /Fp specify a path or file name for precompiled header files
|
1582
|
+
# /FI tells the preprocessor to include a specified file name as the header file
|
1583
|
+
# /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)
|
1584
|
+
if (_pchFile)
|
1585
|
+
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
|
1586
|
+
if (_flags)
|
1587
|
+
# append to list
|
1588
|
+
list (APPEND _flags "/Yu" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}")
|
1589
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1590
|
+
list (APPEND _flags "/Wpch-messages")
|
1591
|
+
endif()
|
1592
|
+
else()
|
1593
|
+
# return as a flag string
|
1594
|
+
set (_flags "/Yu /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
|
1595
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1596
|
+
set (_flags "${_flags} /Wpch-messages")
|
1597
|
+
endif()
|
1598
|
+
endif()
|
1599
|
+
else()
|
1600
|
+
# no precompiled header, force inclusion of prefix header
|
1601
|
+
if (_flags)
|
1602
|
+
# append to list
|
1603
|
+
list (APPEND _flags "/FI${_prefixFileNative}")
|
1604
|
+
else()
|
1605
|
+
# return as a flag string
|
1606
|
+
set (_flags "/FI\"${_prefixFileNative}\"")
|
1607
|
+
endif()
|
1608
|
+
endif()
|
1609
|
+
else()
|
1610
|
+
# Linux / Mac OS X Intel options used
|
1611
|
+
# -pch-dir location for precompiled header files
|
1612
|
+
# -pch-use name of the precompiled header (PCH) to use
|
1613
|
+
# -include process include file as the first line of the primary source file
|
1614
|
+
# -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2)
|
1615
|
+
if (_pchFile)
|
1616
|
+
get_filename_component(_pchDir "${_pchFile}" PATH)
|
1617
|
+
get_filename_component(_pchName "${_pchFile}" NAME)
|
1618
|
+
if (_flags)
|
1619
|
+
# append to list
|
1620
|
+
list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}")
|
1621
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1622
|
+
list (APPEND _flags "-Wpch-messages")
|
1623
|
+
endif()
|
1624
|
+
else()
|
1625
|
+
# return as a flag string
|
1626
|
+
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"")
|
1627
|
+
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
|
1628
|
+
set (_flags "${_flags} -Wpch-messages")
|
1629
|
+
endif()
|
1630
|
+
endif()
|
1631
|
+
else()
|
1632
|
+
# no precompiled header, force inclusion of prefix header
|
1633
|
+
if (_flags)
|
1634
|
+
# append to list
|
1635
|
+
list (APPEND _flags "-include" "${_prefixFile}")
|
1636
|
+
else()
|
1637
|
+
# return as a flag string
|
1638
|
+
set (_flags "-include \"${_prefixFile}\"")
|
1639
|
+
endif()
|
1640
|
+
endif()
|
1641
|
+
endif()
|
1642
|
+
else()
|
1643
|
+
message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.")
|
1644
|
+
endif()
|
1645
|
+
set (${_flagsVar} ${_flags} PARENT_SCOPE)
|
1646
|
+
endfunction()
|
1647
|
+
|
1648
|
+
function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile)
|
1649
|
+
set(_options "")
|
1650
|
+
set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE)
|
1651
|
+
set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS)
|
1652
|
+
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
1653
|
+
if (NOT _option_LANGUAGE)
|
1654
|
+
set (_option_LANGUAGE "CXX")
|
1655
|
+
endif()
|
1656
|
+
if (NOT _option_COMPILER_ID)
|
1657
|
+
set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}")
|
1658
|
+
endif()
|
1659
|
+
if (NOT _option_COMPILER_VERSION)
|
1660
|
+
set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}")
|
1661
|
+
endif()
|
1662
|
+
cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}")
|
1663
|
+
cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS})
|
1664
|
+
cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS})
|
1665
|
+
cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" "${_option_INCLUDE_SYSTEM_FLAG}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES)
|
1666
|
+
cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES})
|
1667
|
+
cotire_add_pch_compilation_flags(
|
1668
|
+
"${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}"
|
1669
|
+
"${_prefixFile}" "${_pchFile}" "${_hostFile}" _cmd)
|
1670
|
+
if (COTIRE_VERBOSE)
|
1671
|
+
message (STATUS "execute_process: ${_cmd}")
|
1672
|
+
endif()
|
1673
|
+
if (_option_COMPILER_ID MATCHES "MSVC")
|
1674
|
+
# cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared
|
1675
|
+
unset (ENV{VS_UNICODE_OUTPUT})
|
1676
|
+
endif()
|
1677
|
+
execute_process(
|
1678
|
+
COMMAND ${_cmd}
|
1679
|
+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
1680
|
+
RESULT_VARIABLE _result)
|
1681
|
+
if (_result)
|
1682
|
+
message (FATAL_ERROR "cotire: error ${_result} precompiling ${_prefixFile}.")
|
1683
|
+
endif()
|
1684
|
+
endfunction()
|
1685
|
+
|
1686
|
+
function (cotire_check_precompiled_header_support _language _target _msgVar)
|
1687
|
+
set (_unsupportedCompiler
|
1688
|
+
"Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}")
|
1689
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC")
|
1690
|
+
# supported since Visual Studio C++ 6.0
|
1691
|
+
# and CMake does not support an earlier version
|
1692
|
+
set (${_msgVar} "" PARENT_SCOPE)
|
1693
|
+
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU")
|
1694
|
+
# GCC PCH support requires version >= 3.4
|
1695
|
+
if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "3.4.0")
|
1696
|
+
set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}." PARENT_SCOPE)
|
1697
|
+
else()
|
1698
|
+
set (${_msgVar} "" PARENT_SCOPE)
|
1699
|
+
endif()
|
1700
|
+
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
|
1701
|
+
# all Clang versions have PCH support
|
1702
|
+
set (${_msgVar} "" PARENT_SCOPE)
|
1703
|
+
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
|
1704
|
+
# Intel PCH support requires version >= 8.0.0
|
1705
|
+
if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0")
|
1706
|
+
set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}." PARENT_SCOPE)
|
1707
|
+
else()
|
1708
|
+
set (${_msgVar} "" PARENT_SCOPE)
|
1709
|
+
endif()
|
1710
|
+
else()
|
1711
|
+
set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE)
|
1712
|
+
endif()
|
1713
|
+
if (CMAKE_${_language}_COMPILER MATCHES "ccache")
|
1714
|
+
if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros|pch_defines")
|
1715
|
+
set (${_msgVar}
|
1716
|
+
"ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"."
|
1717
|
+
PARENT_SCOPE)
|
1718
|
+
endif()
|
1719
|
+
endif()
|
1720
|
+
if (APPLE)
|
1721
|
+
# PCH compilation not supported by GCC / Clang for multi-architecture builds (e.g., i386, x86_64)
|
1722
|
+
cotire_get_configuration_types(_configs)
|
1723
|
+
foreach (_config ${_configs})
|
1724
|
+
set (_targetFlags "")
|
1725
|
+
cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
|
1726
|
+
cotire_filter_compile_flags("${_language}" "arch" _architectures _ignore ${_targetFlags})
|
1727
|
+
list (LENGTH _architectures _numberOfArchitectures)
|
1728
|
+
if (_numberOfArchitectures GREATER 1)
|
1729
|
+
string (REPLACE ";" ", " _architectureStr "${_architectures}")
|
1730
|
+
set (${_msgVar}
|
1731
|
+
"Precompiled headers not supported on Darwin for multi-architecture builds (${_architectureStr})."
|
1732
|
+
PARENT_SCOPE)
|
1733
|
+
break()
|
1734
|
+
endif()
|
1735
|
+
endforeach()
|
1736
|
+
endif()
|
1737
|
+
endfunction()
|
1738
|
+
|
1739
|
+
macro (cotire_get_intermediate_dir _cotireDir)
|
1740
|
+
# ${CMAKE_CFG_INTDIR} may reference a build-time variable when using a generator which supports configuration types
|
1741
|
+
get_filename_component(${_cotireDir} "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${COTIRE_INTDIR}" ABSOLUTE)
|
1742
|
+
endmacro()
|
1743
|
+
|
1744
|
+
macro (cotire_setup_file_extension_variables)
|
1745
|
+
set (_unityFileExt_C ".c")
|
1746
|
+
set (_unityFileExt_CXX ".cxx")
|
1747
|
+
set (_prefixFileExt_C ".h")
|
1748
|
+
set (_prefixFileExt_CXX ".hxx")
|
1749
|
+
set (_prefixSourceFileExt_C ".c")
|
1750
|
+
set (_prefixSourceFileExt_CXX ".cxx")
|
1751
|
+
endmacro()
|
1752
|
+
|
1753
|
+
function (cotire_make_single_unity_source_file_path _language _target _unityFileVar)
|
1754
|
+
cotire_setup_file_extension_variables()
|
1755
|
+
if (NOT DEFINED _unityFileExt_${_language})
|
1756
|
+
set (${_unityFileVar} "" PARENT_SCOPE)
|
1757
|
+
return()
|
1758
|
+
endif()
|
1759
|
+
set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}")
|
1760
|
+
set (_unityFileName "${_unityFileBaseName}${_unityFileExt_${_language}}")
|
1761
|
+
cotire_get_intermediate_dir(_baseDir)
|
1762
|
+
set (_unityFile "${_baseDir}/${_unityFileName}")
|
1763
|
+
set (${_unityFileVar} "${_unityFile}" PARENT_SCOPE)
|
1764
|
+
endfunction()
|
1765
|
+
|
1766
|
+
function (cotire_make_unity_source_file_paths _language _target _maxIncludes _unityFilesVar)
|
1767
|
+
cotire_setup_file_extension_variables()
|
1768
|
+
if (NOT DEFINED _unityFileExt_${_language})
|
1769
|
+
set (${_unityFileVar} "" PARENT_SCOPE)
|
1770
|
+
return()
|
1771
|
+
endif()
|
1772
|
+
set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}")
|
1773
|
+
cotire_get_intermediate_dir(_baseDir)
|
1774
|
+
set (_startIndex 0)
|
1775
|
+
set (_index 0)
|
1776
|
+
set (_unityFiles "")
|
1777
|
+
set (_sourceFiles ${ARGN})
|
1778
|
+
foreach (_sourceFile ${_sourceFiles})
|
1779
|
+
get_source_file_property(_startNew "${_sourceFile}" COTIRE_START_NEW_UNITY_SOURCE)
|
1780
|
+
math (EXPR _unityFileCount "${_index} - ${_startIndex}")
|
1781
|
+
if (_startNew OR (_maxIncludes GREATER 0 AND NOT _unityFileCount LESS _maxIncludes))
|
1782
|
+
if (_index GREATER 0)
|
1783
|
+
# start new unity file segment
|
1784
|
+
math (EXPR _endIndex "${_index} - 1")
|
1785
|
+
set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}")
|
1786
|
+
list (APPEND _unityFiles "${_baseDir}/${_unityFileName}")
|
1787
|
+
endif()
|
1788
|
+
set (_startIndex ${_index})
|
1789
|
+
endif()
|
1790
|
+
math (EXPR _index "${_index} + 1")
|
1791
|
+
endforeach()
|
1792
|
+
list (LENGTH _sourceFiles _numberOfSources)
|
1793
|
+
if (_startIndex EQUAL 0)
|
1794
|
+
# there is only a single unity file
|
1795
|
+
cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFiles)
|
1796
|
+
elseif (_startIndex LESS _numberOfSources)
|
1797
|
+
# end with final unity file segment
|
1798
|
+
math (EXPR _endIndex "${_index} - 1")
|
1799
|
+
set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}")
|
1800
|
+
list (APPEND _unityFiles "${_baseDir}/${_unityFileName}")
|
1801
|
+
endif()
|
1802
|
+
set (${_unityFilesVar} ${_unityFiles} PARENT_SCOPE)
|
1803
|
+
if (COTIRE_DEBUG AND _unityFiles)
|
1804
|
+
message (STATUS "unity files: ${_unityFiles}")
|
1805
|
+
endif()
|
1806
|
+
endfunction()
|
1807
|
+
|
1808
|
+
function (cotire_unity_to_prefix_file_path _language _target _unityFile _prefixFileVar)
|
1809
|
+
cotire_setup_file_extension_variables()
|
1810
|
+
if (NOT DEFINED _unityFileExt_${_language})
|
1811
|
+
set (${_prefixFileVar} "" PARENT_SCOPE)
|
1812
|
+
return()
|
1813
|
+
endif()
|
1814
|
+
set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}")
|
1815
|
+
set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}")
|
1816
|
+
string (REPLACE "${_unityFileBaseName}" "${_prefixFileBaseName}" _prefixFile "${_unityFile}")
|
1817
|
+
string (REGEX REPLACE "${_unityFileExt_${_language}}$" "${_prefixFileExt_${_language}}" _prefixFile "${_prefixFile}")
|
1818
|
+
set (${_prefixFileVar} "${_prefixFile}" PARENT_SCOPE)
|
1819
|
+
endfunction()
|
1820
|
+
|
1821
|
+
function (cotire_prefix_header_to_source_file_path _language _prefixHeaderFile _prefixSourceFileVar)
|
1822
|
+
cotire_setup_file_extension_variables()
|
1823
|
+
if (NOT DEFINED _prefixSourceFileExt_${_language})
|
1824
|
+
set (${_prefixSourceFileVar} "" PARENT_SCOPE)
|
1825
|
+
return()
|
1826
|
+
endif()
|
1827
|
+
string (REGEX REPLACE "${_prefixFileExt_${_language}}$" "${_prefixSourceFileExt_${_language}}" _prefixSourceFile "${_prefixHeaderFile}")
|
1828
|
+
set (${_prefixSourceFileVar} "${_prefixSourceFile}" PARENT_SCOPE)
|
1829
|
+
endfunction()
|
1830
|
+
|
1831
|
+
function (cotire_make_prefix_file_name _language _target _prefixFileBaseNameVar _prefixFileNameVar)
|
1832
|
+
cotire_setup_file_extension_variables()
|
1833
|
+
if (NOT _language)
|
1834
|
+
set (_prefixFileBaseName "${_target}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}")
|
1835
|
+
set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_C}")
|
1836
|
+
elseif (DEFINED _prefixFileExt_${_language})
|
1837
|
+
set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}")
|
1838
|
+
set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_${_language}}")
|
1839
|
+
else()
|
1840
|
+
set (_prefixFileBaseName "")
|
1841
|
+
set (_prefixFileName "")
|
1842
|
+
endif()
|
1843
|
+
set (${_prefixFileBaseNameVar} "${_prefixFileBaseName}" PARENT_SCOPE)
|
1844
|
+
set (${_prefixFileNameVar} "${_prefixFileName}" PARENT_SCOPE)
|
1845
|
+
endfunction()
|
1846
|
+
|
1847
|
+
function (cotire_make_prefix_file_path _language _target _prefixFileVar)
|
1848
|
+
cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName)
|
1849
|
+
set (${_prefixFileVar} "" PARENT_SCOPE)
|
1850
|
+
if (_prefixFileName)
|
1851
|
+
if (NOT _language)
|
1852
|
+
set (_language "C")
|
1853
|
+
endif()
|
1854
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang|Intel|MSVC")
|
1855
|
+
cotire_get_intermediate_dir(_baseDir)
|
1856
|
+
set (${_prefixFileVar} "${_baseDir}/${_prefixFileName}" PARENT_SCOPE)
|
1857
|
+
endif()
|
1858
|
+
endif()
|
1859
|
+
endfunction()
|
1860
|
+
|
1861
|
+
function (cotire_make_pch_file_path _language _target _pchFileVar)
|
1862
|
+
cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName)
|
1863
|
+
set (${_pchFileVar} "" PARENT_SCOPE)
|
1864
|
+
if (_prefixFileBaseName AND _prefixFileName)
|
1865
|
+
cotire_check_precompiled_header_support("${_language}" "${_target}" _msg)
|
1866
|
+
if (NOT _msg)
|
1867
|
+
if (XCODE)
|
1868
|
+
# For Xcode, we completely hand off the compilation of the prefix header to the IDE
|
1869
|
+
return()
|
1870
|
+
endif()
|
1871
|
+
cotire_get_intermediate_dir(_baseDir)
|
1872
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC")
|
1873
|
+
# MSVC uses the extension .pch added to the prefix header base name
|
1874
|
+
set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pch" PARENT_SCOPE)
|
1875
|
+
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
|
1876
|
+
# Clang looks for a precompiled header corresponding to the prefix header with the extension .pch appended
|
1877
|
+
set (${_pchFileVar} "${_baseDir}/${_prefixFileName}.pch" PARENT_SCOPE)
|
1878
|
+
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU")
|
1879
|
+
# GCC looks for a precompiled header corresponding to the prefix header with the extension .gch appended
|
1880
|
+
set (${_pchFileVar} "${_baseDir}/${_prefixFileName}.gch" PARENT_SCOPE)
|
1881
|
+
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
|
1882
|
+
# Intel uses the extension .pchi added to the prefix header base name
|
1883
|
+
set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pchi" PARENT_SCOPE)
|
1884
|
+
endif()
|
1885
|
+
endif()
|
1886
|
+
endif()
|
1887
|
+
endfunction()
|
1888
|
+
|
1889
|
+
function (cotire_select_unity_source_files _unityFile _sourcesVar)
|
1890
|
+
set (_sourceFiles ${ARGN})
|
1891
|
+
if (_sourceFiles AND "${_unityFile}" MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}_([0-9]+)_([0-9]+)")
|
1892
|
+
set (_startIndex ${CMAKE_MATCH_1})
|
1893
|
+
set (_endIndex ${CMAKE_MATCH_2})
|
1894
|
+
list (LENGTH _sourceFiles _numberOfSources)
|
1895
|
+
if (NOT _startIndex LESS _numberOfSources)
|
1896
|
+
math (EXPR _startIndex "${_numberOfSources} - 1")
|
1897
|
+
endif()
|
1898
|
+
if (NOT _endIndex LESS _numberOfSources)
|
1899
|
+
math (EXPR _endIndex "${_numberOfSources} - 1")
|
1900
|
+
endif()
|
1901
|
+
set (_files "")
|
1902
|
+
foreach (_index RANGE ${_startIndex} ${_endIndex})
|
1903
|
+
list (GET _sourceFiles ${_index} _file)
|
1904
|
+
list (APPEND _files "${_file}")
|
1905
|
+
endforeach()
|
1906
|
+
else()
|
1907
|
+
set (_files ${_sourceFiles})
|
1908
|
+
endif()
|
1909
|
+
set (${_sourcesVar} ${_files} PARENT_SCOPE)
|
1910
|
+
endfunction()
|
1911
|
+
|
1912
|
+
function (cotire_get_unity_source_dependencies _language _target _dependencySourcesVar)
|
1913
|
+
set (_dependencySources "")
|
1914
|
+
# depend on target's generated source files
|
1915
|
+
get_target_property(_targetSourceFiles ${_target} SOURCES)
|
1916
|
+
cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles})
|
1917
|
+
if (_generatedSources)
|
1918
|
+
# but omit all generated source files that have the COTIRE_EXCLUDED property set to true
|
1919
|
+
cotire_get_objects_with_property_on(_excludedGeneratedSources COTIRE_EXCLUDED SOURCE ${_generatedSources})
|
1920
|
+
if (_excludedGeneratedSources)
|
1921
|
+
list (REMOVE_ITEM _generatedSources ${_excludedGeneratedSources})
|
1922
|
+
endif()
|
1923
|
+
# and omit all generated source files that have the COTIRE_DEPENDENCY property set to false explicitly
|
1924
|
+
cotire_get_objects_with_property_off(_excludedNonDependencySources COTIRE_DEPENDENCY SOURCE ${_generatedSources})
|
1925
|
+
if (_excludedNonDependencySources)
|
1926
|
+
list (REMOVE_ITEM _generatedSources ${_excludedNonDependencySources})
|
1927
|
+
endif()
|
1928
|
+
if (_generatedSources)
|
1929
|
+
list (APPEND _dependencySources ${_generatedSources})
|
1930
|
+
endif()
|
1931
|
+
endif()
|
1932
|
+
if (COTIRE_DEBUG AND _dependencySources)
|
1933
|
+
message (STATUS "${_language} ${_target} unity source dependencies: ${_dependencySources}")
|
1934
|
+
endif()
|
1935
|
+
set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE)
|
1936
|
+
endfunction()
|
1937
|
+
|
1938
|
+
function (cotire_get_prefix_header_dependencies _language _target _dependencySourcesVar)
|
1939
|
+
set (_dependencySources "")
|
1940
|
+
# depend on target source files marked with custom COTIRE_DEPENDENCY property
|
1941
|
+
get_target_property(_targetSourceFiles ${_target} SOURCES)
|
1942
|
+
cotire_get_objects_with_property_on(_dependencySources COTIRE_DEPENDENCY SOURCE ${_targetSourceFiles})
|
1943
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
|
1944
|
+
# GCC and clang raise a fatal error if a file is not found during preprocessing
|
1945
|
+
# thus we depend on target's generated source files for prefix header generation
|
1946
|
+
cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles})
|
1947
|
+
if (_generatedSources)
|
1948
|
+
list (APPEND _dependencySources ${_generatedSources})
|
1949
|
+
endif()
|
1950
|
+
endif()
|
1951
|
+
if (COTIRE_DEBUG AND _dependencySources)
|
1952
|
+
message (STATUS "${_language} ${_target} prefix header dependencies: ${_dependencySources}")
|
1953
|
+
endif()
|
1954
|
+
set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE)
|
1955
|
+
endfunction()
|
1956
|
+
|
1957
|
+
function (cotire_generate_target_script _language _configurations _target _targetScriptVar _targetConfigScriptVar)
|
1958
|
+
set (_targetSources ${ARGN})
|
1959
|
+
cotire_get_prefix_header_dependencies(${_language} ${_target} COTIRE_TARGET_PREFIX_DEPENDS ${_targetSources})
|
1960
|
+
cotire_get_unity_source_dependencies(${_language} ${_target} COTIRE_TARGET_UNITY_DEPENDS ${_targetSources})
|
1961
|
+
# set up variables to be configured
|
1962
|
+
set (COTIRE_TARGET_LANGUAGE "${_language}")
|
1963
|
+
get_target_property(COTIRE_TARGET_IGNORE_PATH ${_target} COTIRE_PREFIX_HEADER_IGNORE_PATH)
|
1964
|
+
cotire_add_sys_root_paths(COTIRE_TARGET_IGNORE_PATH)
|
1965
|
+
get_target_property(COTIRE_TARGET_INCLUDE_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PATH)
|
1966
|
+
cotire_add_sys_root_paths(COTIRE_TARGET_INCLUDE_PATH)
|
1967
|
+
get_target_property(COTIRE_TARGET_PRE_UNDEFS ${_target} COTIRE_UNITY_SOURCE_PRE_UNDEFS)
|
1968
|
+
get_target_property(COTIRE_TARGET_POST_UNDEFS ${_target} COTIRE_UNITY_SOURCE_POST_UNDEFS)
|
1969
|
+
get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
|
1970
|
+
get_target_property(COTIRE_TARGET_INCLUDE_PRIORITY_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH)
|
1971
|
+
cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${_targetSources})
|
1972
|
+
cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${_targetSources})
|
1973
|
+
string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" COTIRE_INCLUDE_SYSTEM_FLAG)
|
1974
|
+
set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}")
|
1975
|
+
foreach (_config ${_configurations})
|
1976
|
+
string (TOUPPER "${_config}" _upperConfig)
|
1977
|
+
cotire_get_target_include_directories(
|
1978
|
+
"${_config}" "${_language}" "${_target}" COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig} COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig})
|
1979
|
+
cotire_get_target_compile_definitions(
|
1980
|
+
"${_config}" "${_language}" "${_target}" COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig})
|
1981
|
+
cotire_get_target_compiler_flags(
|
1982
|
+
"${_config}" "${_language}" "${_target}" COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig})
|
1983
|
+
cotire_get_source_files_compile_definitions(
|
1984
|
+
"${_config}" "${_language}" COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig} ${_targetSources})
|
1985
|
+
endforeach()
|
1986
|
+
# set up COTIRE_TARGET_SOURCES
|
1987
|
+
set (COTIRE_TARGET_SOURCES "")
|
1988
|
+
foreach (_sourceFile ${_targetSources})
|
1989
|
+
get_source_file_property(_generated "${_sourceFile}" GENERATED)
|
1990
|
+
if (_generated)
|
1991
|
+
# use absolute paths for generated files only, retrieving the LOCATION property is an expensive operation
|
1992
|
+
get_source_file_property(_sourceLocation "${_sourceFile}" LOCATION)
|
1993
|
+
list (APPEND COTIRE_TARGET_SOURCES "${_sourceLocation}")
|
1994
|
+
else()
|
1995
|
+
list (APPEND COTIRE_TARGET_SOURCES "${_sourceFile}")
|
1996
|
+
endif()
|
1997
|
+
endforeach()
|
1998
|
+
# copy variable definitions to cotire target script
|
1999
|
+
get_cmake_property(_vars VARIABLES)
|
2000
|
+
string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+" _matchVars "${_vars}")
|
2001
|
+
# remove COTIRE_VERBOSE which is passed as a CMake define on command line
|
2002
|
+
list (REMOVE_ITEM _matchVars COTIRE_VERBOSE)
|
2003
|
+
set (_contents "")
|
2004
|
+
set (_contentsHasGeneratorExpressions FALSE)
|
2005
|
+
foreach (_var IN LISTS _matchVars ITEMS
|
2006
|
+
XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES
|
2007
|
+
CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION
|
2008
|
+
CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1
|
2009
|
+
CMAKE_${_language}_SOURCE_FILE_EXTENSIONS)
|
2010
|
+
if (DEFINED ${_var})
|
2011
|
+
string (REPLACE "\"" "\\\"" _value "${${_var}}")
|
2012
|
+
set (_contents "${_contents}set (${_var} \"${_value}\")\n")
|
2013
|
+
if (NOT _contentsHasGeneratorExpressions)
|
2014
|
+
if ("${_value}" MATCHES "\\$<.*>")
|
2015
|
+
set (_contentsHasGeneratorExpressions TRUE)
|
2016
|
+
endif()
|
2017
|
+
endif()
|
2018
|
+
endif()
|
2019
|
+
endforeach()
|
2020
|
+
# generate target script file
|
2021
|
+
get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME)
|
2022
|
+
set (_targetCotireScript "${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_moduleName}")
|
2023
|
+
cotire_write_file("CMAKE" "${_targetCotireScript}" "${_contents}" FALSE)
|
2024
|
+
if (_contentsHasGeneratorExpressions)
|
2025
|
+
# use file(GENERATE ...) to expand generator expressions in the target script at CMake generate-time
|
2026
|
+
set (_configNameOrNoneGeneratorExpression "$<$<CONFIG:>:None>$<$<NOT:$<CONFIG:>>:$<CONFIGURATION>>")
|
2027
|
+
set (_targetCotireConfigScript "${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_configNameOrNoneGeneratorExpression}_${_moduleName}")
|
2028
|
+
file (GENERATE OUTPUT "${_targetCotireConfigScript}" INPUT "${_targetCotireScript}")
|
2029
|
+
else()
|
2030
|
+
set (_targetCotireConfigScript "${_targetCotireScript}")
|
2031
|
+
endif()
|
2032
|
+
set (${_targetScriptVar} "${_targetCotireScript}" PARENT_SCOPE)
|
2033
|
+
set (${_targetConfigScriptVar} "${_targetCotireConfigScript}" PARENT_SCOPE)
|
2034
|
+
endfunction()
|
2035
|
+
|
2036
|
+
function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)
|
2037
|
+
set (_sourceFiles ${ARGN})
|
2038
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
2039
|
+
# for Visual Studio and Intel, we attach the precompiled header compilation to the host file
|
2040
|
+
# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
|
2041
|
+
if (_sourceFiles)
|
2042
|
+
set (_flags "")
|
2043
|
+
cotire_add_pch_compilation_flags(
|
2044
|
+
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
2045
|
+
"${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags)
|
2046
|
+
set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
2047
|
+
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}")
|
2048
|
+
# make object file generated from host file depend on prefix header
|
2049
|
+
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
|
2050
|
+
# mark host file as cotired to prevent it from being used in another cotired target
|
2051
|
+
set_property (SOURCE ${_hostFile} PROPERTY COTIRE_TARGET "${_target}")
|
2052
|
+
endif()
|
2053
|
+
elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
2054
|
+
# for makefile based generator, we add a custom command to precompile the prefix header
|
2055
|
+
if (_targetScript)
|
2056
|
+
cotire_set_cmd_to_prologue(_cmds)
|
2057
|
+
list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "precompile" "${_targetScript}" "${_prefixFile}" "${_pchFile}" "${_hostFile}")
|
2058
|
+
file (RELATIVE_PATH _pchFileRelPath "${CMAKE_BINARY_DIR}" "${_pchFile}")
|
2059
|
+
if (COTIRE_DEBUG)
|
2060
|
+
message (STATUS "add_custom_command: OUTPUT ${_pchFile} ${_cmds} DEPENDS ${_prefixFile} IMPLICIT_DEPENDS ${_language} ${_prefixFile}")
|
2061
|
+
endif()
|
2062
|
+
set_property (SOURCE "${_pchFile}" PROPERTY GENERATED TRUE)
|
2063
|
+
add_custom_command(
|
2064
|
+
OUTPUT "${_pchFile}"
|
2065
|
+
COMMAND ${_cmds}
|
2066
|
+
DEPENDS "${_prefixFile}"
|
2067
|
+
IMPLICIT_DEPENDS ${_language} "${_prefixFile}"
|
2068
|
+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
2069
|
+
COMMENT "Building ${_language} precompiled header ${_pchFileRelPath}"
|
2070
|
+
VERBATIM)
|
2071
|
+
endif()
|
2072
|
+
endif()
|
2073
|
+
endfunction()
|
2074
|
+
|
2075
|
+
function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile)
|
2076
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
2077
|
+
# for Visual Studio and Intel, we include the precompiled header in all but the host file
|
2078
|
+
# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation
|
2079
|
+
set (_sourceFiles ${ARGN})
|
2080
|
+
list (LENGTH _sourceFiles _numberOfSourceFiles)
|
2081
|
+
if (_numberOfSourceFiles GREATER 0)
|
2082
|
+
# mark sources as cotired to prevent them from being used in another cotired target
|
2083
|
+
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
|
2084
|
+
set (_flags "")
|
2085
|
+
cotire_add_prefix_pch_inclusion_flags(
|
2086
|
+
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
2087
|
+
"${_prefixFile}" "${_pchFile}" _flags)
|
2088
|
+
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
2089
|
+
# make object files generated from source files depend on precompiled header
|
2090
|
+
set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}")
|
2091
|
+
endif()
|
2092
|
+
elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
2093
|
+
set (_sourceFiles ${_hostFile} ${ARGN})
|
2094
|
+
if (NOT _wholeTarget)
|
2095
|
+
# for makefile based generator, we force the inclusion of the prefix header for a subset
|
2096
|
+
# of the source files, if this is a multi-language target or has excluded files
|
2097
|
+
set (_flags "")
|
2098
|
+
cotire_add_prefix_pch_inclusion_flags(
|
2099
|
+
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
2100
|
+
"${_prefixFile}" "${_pchFile}" _flags)
|
2101
|
+
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
2102
|
+
# mark sources as cotired to prevent them from being used in another cotired target
|
2103
|
+
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
|
2104
|
+
endif()
|
2105
|
+
# make object files generated from source files depend on precompiled header
|
2106
|
+
set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}")
|
2107
|
+
endif()
|
2108
|
+
endfunction()
|
2109
|
+
|
2110
|
+
function (cotire_setup_prefix_file_inclusion _language _target _prefixFile)
|
2111
|
+
set (_sourceFiles ${ARGN})
|
2112
|
+
# force the inclusion of the prefix header for the given source files
|
2113
|
+
set (_flags "")
|
2114
|
+
set (_pchFile "")
|
2115
|
+
cotire_add_prefix_pch_inclusion_flags(
|
2116
|
+
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
2117
|
+
"${_prefixFile}" "${_pchFile}" _flags)
|
2118
|
+
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
|
2119
|
+
# mark sources as cotired to prevent them from being used in another cotired target
|
2120
|
+
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
|
2121
|
+
# make object files generated from source files depend on prefix header
|
2122
|
+
set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
|
2123
|
+
endfunction()
|
2124
|
+
|
2125
|
+
function (cotire_get_first_set_property_value _propertyValueVar _type _object)
|
2126
|
+
set (_properties ${ARGN})
|
2127
|
+
foreach (_property ${_properties})
|
2128
|
+
get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property})
|
2129
|
+
if (_propertyValue)
|
2130
|
+
set (${_propertyValueVar} ${_propertyValue} PARENT_SCOPE)
|
2131
|
+
return()
|
2132
|
+
endif()
|
2133
|
+
endforeach()
|
2134
|
+
set (${_propertyValueVar} "" PARENT_SCOPE)
|
2135
|
+
endfunction()
|
2136
|
+
|
2137
|
+
function (cotire_setup_combine_command _language _targetScript _joinedFile _cmdsVar)
|
2138
|
+
set (_files ${ARGN})
|
2139
|
+
set (_filesPaths "")
|
2140
|
+
foreach (_file ${_files})
|
2141
|
+
get_filename_component(_filePath "${_file}" ABSOLUTE)
|
2142
|
+
list (APPEND _filesPaths "${_filePath}")
|
2143
|
+
endforeach()
|
2144
|
+
cotire_set_cmd_to_prologue(_prefixCmd)
|
2145
|
+
list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "combine")
|
2146
|
+
if (_targetScript)
|
2147
|
+
list (APPEND _prefixCmd "${_targetScript}")
|
2148
|
+
endif()
|
2149
|
+
list (APPEND _prefixCmd "${_joinedFile}" ${_filesPaths})
|
2150
|
+
if (COTIRE_DEBUG)
|
2151
|
+
message (STATUS "add_custom_command: OUTPUT ${_joinedFile} COMMAND ${_prefixCmd} DEPENDS ${_files}")
|
2152
|
+
endif()
|
2153
|
+
set_property (SOURCE "${_joinedFile}" PROPERTY GENERATED TRUE)
|
2154
|
+
file (RELATIVE_PATH _joinedFileRelPath "${CMAKE_BINARY_DIR}" "${_joinedFile}")
|
2155
|
+
get_filename_component(_joinedFileBaseName "${_joinedFile}" NAME_WE)
|
2156
|
+
get_filename_component(_joinedFileExt "${_joinedFile}" EXT)
|
2157
|
+
if (_language AND _joinedFileBaseName MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}$")
|
2158
|
+
set (_comment "Generating ${_language} unity source ${_joinedFileRelPath}")
|
2159
|
+
elseif (_language AND _joinedFileBaseName MATCHES "${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}$")
|
2160
|
+
if (_joinedFileExt MATCHES "^\\.c")
|
2161
|
+
set (_comment "Generating ${_language} prefix source ${_joinedFileRelPath}")
|
2162
|
+
else()
|
2163
|
+
set (_comment "Generating ${_language} prefix header ${_joinedFileRelPath}")
|
2164
|
+
endif()
|
2165
|
+
else()
|
2166
|
+
set (_comment "Generating ${_joinedFileRelPath}")
|
2167
|
+
endif()
|
2168
|
+
add_custom_command(
|
2169
|
+
OUTPUT "${_joinedFile}"
|
2170
|
+
COMMAND ${_prefixCmd}
|
2171
|
+
DEPENDS ${_files}
|
2172
|
+
COMMENT "${_comment}"
|
2173
|
+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
2174
|
+
VERBATIM)
|
2175
|
+
list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd})
|
2176
|
+
set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)
|
2177
|
+
endfunction()
|
2178
|
+
|
2179
|
+
function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
|
2180
|
+
if (XCODE)
|
2181
|
+
# for Xcode, we attach a pre-build action to generate the unity sources and prefix headers
|
2182
|
+
set (_prefixFiles "")
|
2183
|
+
foreach (_language ${_languages})
|
2184
|
+
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
|
2185
|
+
if (_prefixFile)
|
2186
|
+
list (APPEND _prefixFiles "${_prefixFile}")
|
2187
|
+
endif()
|
2188
|
+
endforeach()
|
2189
|
+
set (_cmds ${ARGN})
|
2190
|
+
list (LENGTH _prefixFiles _numberOfPrefixFiles)
|
2191
|
+
if (_numberOfPrefixFiles GREATER 1)
|
2192
|
+
# we also generate a generic, single prefix header which includes all language specific prefix headers
|
2193
|
+
set (_language "")
|
2194
|
+
set (_targetScript "")
|
2195
|
+
cotire_make_prefix_file_path("${_language}" ${_target} _prefixHeader)
|
2196
|
+
cotire_setup_combine_command("${_language}" "${_targetScript}" "${_prefixHeader}" _cmds ${_prefixFiles})
|
2197
|
+
else()
|
2198
|
+
set (_prefixHeader "${_prefixFiles}")
|
2199
|
+
endif()
|
2200
|
+
if (COTIRE_DEBUG)
|
2201
|
+
message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}")
|
2202
|
+
endif()
|
2203
|
+
# because CMake PRE_BUILD command does not support dependencies,
|
2204
|
+
# we check dependencies explicity in cotire script mode when the pre-build action is run
|
2205
|
+
add_custom_command(
|
2206
|
+
TARGET "${_target}"
|
2207
|
+
PRE_BUILD ${_cmds}
|
2208
|
+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
2209
|
+
COMMENT "Updating target ${_target} prefix headers"
|
2210
|
+
VERBATIM)
|
2211
|
+
# make Xcode precompile the generated prefix header with ProcessPCH and ProcessPCH++
|
2212
|
+
set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
|
2213
|
+
set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${_prefixHeader}")
|
2214
|
+
elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
2215
|
+
# for makefile based generator, we force inclusion of the prefix header for all target source files
|
2216
|
+
# if this is a single-language target without any excluded files
|
2217
|
+
if (_wholeTarget)
|
2218
|
+
set (_language "${_languages}")
|
2219
|
+
# for Visual Studio and Intel, precompiled header inclusion is always done on the source file level
|
2220
|
+
# see cotire_setup_pch_file_inclusion
|
2221
|
+
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
2222
|
+
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
|
2223
|
+
if (_prefixFile)
|
2224
|
+
get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)
|
2225
|
+
set (_options COMPILE_OPTIONS)
|
2226
|
+
cotire_add_prefix_pch_inclusion_flags(
|
2227
|
+
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
|
2228
|
+
"${_prefixFile}" "${_pchFile}" _options)
|
2229
|
+
set_property(TARGET ${_target} APPEND PROPERTY ${_options})
|
2230
|
+
endif()
|
2231
|
+
endif()
|
2232
|
+
endif()
|
2233
|
+
endif()
|
2234
|
+
endfunction()
|
2235
|
+
|
2236
|
+
function (cotire_setup_unity_generation_commands _language _target _targetScript _targetConfigScript _unityFiles _cmdsVar)
|
2237
|
+
set (_dependencySources "")
|
2238
|
+
cotire_get_unity_source_dependencies(${_language} ${_target} _dependencySources ${ARGN})
|
2239
|
+
foreach (_unityFile ${_unityFiles})
|
2240
|
+
set_property (SOURCE "${_unityFile}" PROPERTY GENERATED TRUE)
|
2241
|
+
# set up compiled unity source dependencies via OBJECT_DEPENDS
|
2242
|
+
# this ensures that missing source files are generated before the unity file is compiled
|
2243
|
+
if (COTIRE_DEBUG AND _dependencySources)
|
2244
|
+
message (STATUS "${_unityFile} OBJECT_DEPENDS ${_dependencySources}")
|
2245
|
+
endif()
|
2246
|
+
if (_dependencySources)
|
2247
|
+
# the OBJECT_DEPENDS property requires a list of full paths
|
2248
|
+
set (_objectDependsPaths "")
|
2249
|
+
foreach (_sourceFile ${_dependencySources})
|
2250
|
+
get_source_file_property(_sourceLocation "${_sourceFile}" LOCATION)
|
2251
|
+
list (APPEND _objectDependsPaths "${_sourceLocation}")
|
2252
|
+
endforeach()
|
2253
|
+
set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths})
|
2254
|
+
endif()
|
2255
|
+
if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
2256
|
+
# unity file compilation results in potentially huge object file, thus use /bigobj by default unter MSVC and Windows Intel
|
2257
|
+
set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj")
|
2258
|
+
endif()
|
2259
|
+
cotire_set_cmd_to_prologue(_unityCmd)
|
2260
|
+
list (APPEND _unityCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "unity" "${_targetConfigScript}" "${_unityFile}")
|
2261
|
+
if (CMAKE_VERSION VERSION_LESS "3.1.0")
|
2262
|
+
set (_unityCmdDepends "${_targetScript}")
|
2263
|
+
else()
|
2264
|
+
# CMake 3.1.0 supports generator expressions in arguments to DEPENDS
|
2265
|
+
set (_unityCmdDepends "${_targetConfigScript}")
|
2266
|
+
endif()
|
2267
|
+
file (RELATIVE_PATH _unityFileRelPath "${CMAKE_BINARY_DIR}" "${_unityFile}")
|
2268
|
+
if (COTIRE_DEBUG)
|
2269
|
+
message (STATUS "add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_unityCmdDepends}")
|
2270
|
+
endif()
|
2271
|
+
add_custom_command(
|
2272
|
+
OUTPUT "${_unityFile}"
|
2273
|
+
COMMAND ${_unityCmd}
|
2274
|
+
DEPENDS ${_unityCmdDepends}
|
2275
|
+
COMMENT "Generating ${_language} unity source ${_unityFileRelPath}"
|
2276
|
+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
2277
|
+
VERBATIM)
|
2278
|
+
list (APPEND ${_cmdsVar} COMMAND ${_unityCmd})
|
2279
|
+
endforeach()
|
2280
|
+
list (LENGTH _unityFiles _numberOfUnityFiles)
|
2281
|
+
if (_numberOfUnityFiles GREATER 1)
|
2282
|
+
# create a joint unity file from all unity file segments
|
2283
|
+
cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile)
|
2284
|
+
cotire_setup_combine_command(${_language} "${_targetConfigScript}" "${_unityFile}" ${_cmdsVar} ${_unityFiles})
|
2285
|
+
endif()
|
2286
|
+
set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)
|
2287
|
+
endfunction()
|
2288
|
+
|
2289
|
+
function (cotire_setup_prefix_generation_command _language _target _targetScript _prefixFile _unityFile _cmdsVar)
|
2290
|
+
set (_sourceFiles ${ARGN})
|
2291
|
+
set (_dependencySources "")
|
2292
|
+
cotire_get_prefix_header_dependencies(${_language} ${_target} _dependencySources ${_sourceFiles})
|
2293
|
+
cotire_set_cmd_to_prologue(_prefixCmd)
|
2294
|
+
list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "prefix" "${_targetScript}" "${_prefixFile}" "${_unityFile}")
|
2295
|
+
set_property (SOURCE "${_prefixFile}" PROPERTY GENERATED TRUE)
|
2296
|
+
if (COTIRE_DEBUG)
|
2297
|
+
message (STATUS "add_custom_command: OUTPUT ${_prefixFile} COMMAND ${_prefixCmd} DEPENDS ${_unityFile} ${_dependencySources}")
|
2298
|
+
endif()
|
2299
|
+
file (RELATIVE_PATH _prefixFileRelPath "${CMAKE_BINARY_DIR}" "${_prefixFile}")
|
2300
|
+
get_filename_component(_prefixFileExt "${_prefixFile}" EXT)
|
2301
|
+
if (_prefixFileExt MATCHES "^\\.c")
|
2302
|
+
set (_comment "Generating ${_language} prefix source ${_prefixFileRelPath}")
|
2303
|
+
else()
|
2304
|
+
set (_comment "Generating ${_language} prefix header ${_prefixFileRelPath}")
|
2305
|
+
endif()
|
2306
|
+
add_custom_command(
|
2307
|
+
OUTPUT "${_prefixFile}" "${_prefixFile}.log"
|
2308
|
+
COMMAND ${_prefixCmd}
|
2309
|
+
DEPENDS "${_unityFile}" ${_dependencySources}
|
2310
|
+
COMMENT "${_comment}"
|
2311
|
+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
2312
|
+
VERBATIM)
|
2313
|
+
list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd})
|
2314
|
+
set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)
|
2315
|
+
endfunction()
|
2316
|
+
|
2317
|
+
function (cotire_setup_prefix_generation_from_unity_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar)
|
2318
|
+
set (_sourceFiles ${ARGN})
|
2319
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
|
2320
|
+
# GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma
|
2321
|
+
cotire_prefix_header_to_source_file_path(${_language} "${_prefixFile}" _prefixSourceFile)
|
2322
|
+
else()
|
2323
|
+
set (_prefixSourceFile "${_prefixFile}")
|
2324
|
+
endif()
|
2325
|
+
list (LENGTH _unityFiles _numberOfUnityFiles)
|
2326
|
+
if (_numberOfUnityFiles GREATER 1)
|
2327
|
+
cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile)
|
2328
|
+
cotire_setup_prefix_generation_command(
|
2329
|
+
${_language} ${_target} "${_targetScript}"
|
2330
|
+
"${_prefixSourceFile}" "${_unityFile}" ${_cmdsVar} ${_sourceFiles})
|
2331
|
+
else()
|
2332
|
+
cotire_setup_prefix_generation_command(
|
2333
|
+
${_language} ${_target} "${_targetScript}"
|
2334
|
+
"${_prefixSourceFile}" "${_unityFiles}" ${_cmdsVar} ${_sourceFiles})
|
2335
|
+
endif()
|
2336
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
|
2337
|
+
# set up generation of a prefix source file which includes the prefix header
|
2338
|
+
cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixFile}" _cmds ${_prefixSourceFile})
|
2339
|
+
endif()
|
2340
|
+
set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)
|
2341
|
+
endfunction()
|
2342
|
+
|
2343
|
+
function (cotire_setup_prefix_generation_from_provided_command _language _target _targetScript _prefixFile _cmdsVar)
|
2344
|
+
set (_prefixHeaderFiles ${ARGN})
|
2345
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
|
2346
|
+
# GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma
|
2347
|
+
cotire_prefix_header_to_source_file_path(${_language} "${_prefixFile}" _prefixSourceFile)
|
2348
|
+
else()
|
2349
|
+
set (_prefixSourceFile "${_prefixFile}")
|
2350
|
+
endif()
|
2351
|
+
cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixSourceFile}" _cmds ${_prefixHeaderFiles})
|
2352
|
+
if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
|
2353
|
+
# set up generation of a prefix source file which includes the prefix header
|
2354
|
+
cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixFile}" _cmds ${_prefixSourceFile})
|
2355
|
+
endif()
|
2356
|
+
set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)
|
2357
|
+
endfunction()
|
2358
|
+
|
2359
|
+
function (cotire_init_cotire_target_properties _target)
|
2360
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER SET)
|
2361
|
+
if (NOT _isSet)
|
2362
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER TRUE)
|
2363
|
+
endif()
|
2364
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD SET)
|
2365
|
+
if (NOT _isSet)
|
2366
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD TRUE)
|
2367
|
+
endif()
|
2368
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN SET)
|
2369
|
+
if (NOT _isSet)
|
2370
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN FALSE)
|
2371
|
+
endif()
|
2372
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH SET)
|
2373
|
+
if (NOT _isSet)
|
2374
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_SOURCE_DIR}")
|
2375
|
+
cotire_check_is_path_relative_to("${CMAKE_BINARY_DIR}" _isRelative "${CMAKE_SOURCE_DIR}")
|
2376
|
+
if (NOT _isRelative)
|
2377
|
+
set_property(TARGET ${_target} APPEND PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_BINARY_DIR}")
|
2378
|
+
endif()
|
2379
|
+
endif()
|
2380
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH SET)
|
2381
|
+
if (NOT _isSet)
|
2382
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH "")
|
2383
|
+
endif()
|
2384
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH SET)
|
2385
|
+
if (NOT _isSet)
|
2386
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH "")
|
2387
|
+
endif()
|
2388
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS SET)
|
2389
|
+
if (NOT _isSet)
|
2390
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS "")
|
2391
|
+
endif()
|
2392
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS SET)
|
2393
|
+
if (NOT _isSet)
|
2394
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS "")
|
2395
|
+
endif()
|
2396
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT SET)
|
2397
|
+
if (NOT _isSet)
|
2398
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY")
|
2399
|
+
endif()
|
2400
|
+
get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES SET)
|
2401
|
+
if (NOT _isSet)
|
2402
|
+
if (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES)
|
2403
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}")
|
2404
|
+
else()
|
2405
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "")
|
2406
|
+
endif()
|
2407
|
+
endif()
|
2408
|
+
endfunction()
|
2409
|
+
|
2410
|
+
function (cotire_make_target_message _target _languages _disableMsg _targetMsgVar)
|
2411
|
+
get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)
|
2412
|
+
get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD)
|
2413
|
+
string (REPLACE ";" " " _languagesStr "${_languages}")
|
2414
|
+
math (EXPR _numberOfExcludedFiles "${ARGC} - 4")
|
2415
|
+
if (_numberOfExcludedFiles EQUAL 0)
|
2416
|
+
set (_excludedStr "")
|
2417
|
+
elseif (COTIRE_VERBOSE OR _numberOfExcludedFiles LESS 4)
|
2418
|
+
string (REPLACE ";" ", " _excludedStr "excluding ${ARGN}")
|
2419
|
+
else()
|
2420
|
+
set (_excludedStr "excluding ${_numberOfExcludedFiles} files")
|
2421
|
+
endif()
|
2422
|
+
set (_targetMsg "")
|
2423
|
+
if (NOT _languages)
|
2424
|
+
set (_targetMsg "Target ${_target} cannot be cotired.")
|
2425
|
+
if (_disableMsg)
|
2426
|
+
set (_targetMsg "${_targetMsg} ${_disableMsg}")
|
2427
|
+
endif()
|
2428
|
+
elseif (NOT _targetUsePCH AND NOT _targetAddSCU)
|
2429
|
+
set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build and precompiled header.")
|
2430
|
+
if (_disableMsg)
|
2431
|
+
set (_targetMsg "${_targetMsg} ${_disableMsg}")
|
2432
|
+
endif()
|
2433
|
+
elseif (NOT _targetUsePCH)
|
2434
|
+
if (_excludedStr)
|
2435
|
+
set (_targetMsg "${_languagesStr} target ${_target} cotired without precompiled header ${_excludedStr}.")
|
2436
|
+
else()
|
2437
|
+
set (_targetMsg "${_languagesStr} target ${_target} cotired without precompiled header.")
|
2438
|
+
endif()
|
2439
|
+
if (_disableMsg)
|
2440
|
+
set (_targetMsg "${_targetMsg} ${_disableMsg}")
|
2441
|
+
endif()
|
2442
|
+
elseif (NOT _targetAddSCU)
|
2443
|
+
if (_excludedStr)
|
2444
|
+
set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build ${_excludedStr}.")
|
2445
|
+
else()
|
2446
|
+
set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.")
|
2447
|
+
endif()
|
2448
|
+
else()
|
2449
|
+
if (_excludedStr)
|
2450
|
+
set (_targetMsg "${_languagesStr} target ${_target} cotired ${_excludedStr}.")
|
2451
|
+
else()
|
2452
|
+
set (_targetMsg "${_languagesStr} target ${_target} cotired.")
|
2453
|
+
endif()
|
2454
|
+
endif()
|
2455
|
+
set (${_targetMsgVar} "${_targetMsg}" PARENT_SCOPE)
|
2456
|
+
endfunction()
|
2457
|
+
|
2458
|
+
function (cotire_choose_target_languages _target _targetLanguagesVar _wholeTargetVar)
|
2459
|
+
set (_languages ${ARGN})
|
2460
|
+
set (_allSourceFiles "")
|
2461
|
+
set (_allExcludedSourceFiles "")
|
2462
|
+
set (_allCotiredSourceFiles "")
|
2463
|
+
set (_targetLanguages "")
|
2464
|
+
set (_pchEligibleTargetLanguages "")
|
2465
|
+
get_target_property(_targetType ${_target} TYPE)
|
2466
|
+
get_target_property(_targetSourceFiles ${_target} SOURCES)
|
2467
|
+
get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)
|
2468
|
+
get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD)
|
2469
|
+
set (_disableMsg "")
|
2470
|
+
foreach (_language ${_languages})
|
2471
|
+
get_target_property(_prefixHeader ${_target} COTIRE_${_language}_PREFIX_HEADER)
|
2472
|
+
get_target_property(_unityBuildFile ${_target} COTIRE_${_language}_UNITY_SOURCE)
|
2473
|
+
if (_prefixHeader OR _unityBuildFile)
|
2474
|
+
message (STATUS "cotire: target ${_target} has already been cotired.")
|
2475
|
+
set (${_targetLanguagesVar} "" PARENT_SCOPE)
|
2476
|
+
return()
|
2477
|
+
endif()
|
2478
|
+
if (_targetUsePCH AND "${_language}" MATCHES "^C|CXX$")
|
2479
|
+
cotire_check_precompiled_header_support("${_language}" "${_target}" _disableMsg)
|
2480
|
+
if (_disableMsg)
|
2481
|
+
set (_targetUsePCH FALSE)
|
2482
|
+
endif()
|
2483
|
+
endif()
|
2484
|
+
set (_sourceFiles "")
|
2485
|
+
set (_excludedSources "")
|
2486
|
+
set (_cotiredSources "")
|
2487
|
+
cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles})
|
2488
|
+
if (_sourceFiles OR _excludedSources OR _cotiredSources)
|
2489
|
+
list (APPEND _targetLanguages ${_language})
|
2490
|
+
endif()
|
2491
|
+
if (_sourceFiles)
|
2492
|
+
list (APPEND _allSourceFiles ${_sourceFiles})
|
2493
|
+
endif()
|
2494
|
+
list (LENGTH _sourceFiles _numberOfSources)
|
2495
|
+
if (NOT _numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES})
|
2496
|
+
list (APPEND _pchEligibleTargetLanguages ${_language})
|
2497
|
+
endif()
|
2498
|
+
if (_excludedSources)
|
2499
|
+
list (APPEND _allExcludedSourceFiles ${_excludedSources})
|
2500
|
+
endif()
|
2501
|
+
if (_cotiredSources)
|
2502
|
+
list (APPEND _allCotiredSourceFiles ${_cotiredSources})
|
2503
|
+
endif()
|
2504
|
+
endforeach()
|
2505
|
+
set (_targetMsgLevel STATUS)
|
2506
|
+
if (NOT _targetLanguages)
|
2507
|
+
string (REPLACE ";" " or " _languagesStr "${_languages}")
|
2508
|
+
set (_disableMsg "No ${_languagesStr} source files.")
|
2509
|
+
set (_targetUsePCH FALSE)
|
2510
|
+
set (_targetAddSCU FALSE)
|
2511
|
+
endif()
|
2512
|
+
if (_targetUsePCH)
|
2513
|
+
if (_allCotiredSourceFiles)
|
2514
|
+
cotire_get_source_file_property_values(_cotireTargets COTIRE_TARGET ${_allCotiredSourceFiles})
|
2515
|
+
list (REMOVE_DUPLICATES _cotireTargets)
|
2516
|
+
string (REPLACE ";" ", " _cotireTargetsStr "${_cotireTargets}")
|
2517
|
+
set (_disableMsg "Target sources already include a precompiled header for target(s) ${_cotireTargets}.")
|
2518
|
+
set (_disableMsg "${_disableMsg} Set target property COTIRE_ENABLE_PRECOMPILED_HEADER to FALSE for targets ${_target},")
|
2519
|
+
set (_disableMsg "${_disableMsg} ${_cotireTargetsStr} to get a workable build system.")
|
2520
|
+
set (_targetMsgLevel SEND_ERROR)
|
2521
|
+
set (_targetUsePCH FALSE)
|
2522
|
+
elseif (NOT _pchEligibleTargetLanguages)
|
2523
|
+
set (_disableMsg "Too few applicable sources.")
|
2524
|
+
set (_targetUsePCH FALSE)
|
2525
|
+
elseif (XCODE AND _allExcludedSourceFiles)
|
2526
|
+
# for Xcode, we cannot apply the precompiled header to individual sources, only to the whole target
|
2527
|
+
set (_disableMsg "Exclusion of source files not supported for generator Xcode.")
|
2528
|
+
set (_targetUsePCH FALSE)
|
2529
|
+
elseif (XCODE AND "${_targetType}" STREQUAL "OBJECT_LIBRARY")
|
2530
|
+
# for Xcode, we cannot apply the required PRE_BUILD action to generate the prefix header to an OBJECT_LIBRARY target
|
2531
|
+
set (_disableMsg "Required PRE_BUILD action not supported for OBJECT_LIBRARY targets for generator Xcode.")
|
2532
|
+
set (_targetUsePCH FALSE)
|
2533
|
+
endif()
|
2534
|
+
endif()
|
2535
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH})
|
2536
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU})
|
2537
|
+
cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles})
|
2538
|
+
if (_targetMsg)
|
2539
|
+
if (NOT DEFINED COTIREMSG_${_target})
|
2540
|
+
set (COTIREMSG_${_target} "")
|
2541
|
+
endif()
|
2542
|
+
if (COTIRE_VERBOSE OR NOT "${_targetMsgLevel}" STREQUAL "STATUS" OR
|
2543
|
+
NOT "${COTIREMSG_${_target}}" STREQUAL "${_targetMsg}")
|
2544
|
+
# cache message to avoid redundant messages on re-configure
|
2545
|
+
set (COTIREMSG_${_target} "${_targetMsg}" CACHE INTERNAL "${_target} cotire message.")
|
2546
|
+
message (${_targetMsgLevel} "${_targetMsg}")
|
2547
|
+
endif()
|
2548
|
+
endif()
|
2549
|
+
list (LENGTH _targetLanguages _numberOfLanguages)
|
2550
|
+
if (_numberOfLanguages GREATER 1 OR _allExcludedSourceFiles)
|
2551
|
+
set (${_wholeTargetVar} FALSE PARENT_SCOPE)
|
2552
|
+
else()
|
2553
|
+
set (${_wholeTargetVar} TRUE PARENT_SCOPE)
|
2554
|
+
endif()
|
2555
|
+
set (${_targetLanguagesVar} ${_targetLanguages} PARENT_SCOPE)
|
2556
|
+
endfunction()
|
2557
|
+
|
2558
|
+
function (cotire_compute_unity_max_number_of_includes _target _maxIncludesVar)
|
2559
|
+
set (_sourceFiles ${ARGN})
|
2560
|
+
get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
|
2561
|
+
if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)")
|
2562
|
+
set (_numberOfThreads "${CMAKE_MATCH_2}")
|
2563
|
+
if (NOT _numberOfThreads)
|
2564
|
+
# use all available cores
|
2565
|
+
ProcessorCount(_numberOfThreads)
|
2566
|
+
endif()
|
2567
|
+
list (LENGTH _sourceFiles _numberOfSources)
|
2568
|
+
math (EXPR _maxIncludes "(${_numberOfSources} + ${_numberOfThreads} - 1) / ${_numberOfThreads}")
|
2569
|
+
# a unity source segment must not contain less than COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES files
|
2570
|
+
if (_maxIncludes LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES})
|
2571
|
+
set (_maxIncludes ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES})
|
2572
|
+
endif()
|
2573
|
+
elseif (NOT _maxIncludes MATCHES "[0-9]+")
|
2574
|
+
set (_maxIncludes 0)
|
2575
|
+
endif()
|
2576
|
+
if (COTIRE_DEBUG)
|
2577
|
+
message (STATUS "${_target} unity source max includes: ${_maxIncludes}")
|
2578
|
+
endif()
|
2579
|
+
set (${_maxIncludesVar} ${_maxIncludes} PARENT_SCOPE)
|
2580
|
+
endfunction()
|
2581
|
+
|
2582
|
+
function (cotire_process_target_language _language _configurations _target _wholeTarget _cmdsVar)
|
2583
|
+
set (${_cmdsVar} "" PARENT_SCOPE)
|
2584
|
+
get_target_property(_targetSourceFiles ${_target} SOURCES)
|
2585
|
+
set (_sourceFiles "")
|
2586
|
+
set (_excludedSources "")
|
2587
|
+
set (_cotiredSources "")
|
2588
|
+
cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles})
|
2589
|
+
if (NOT _sourceFiles AND NOT _cotiredSources)
|
2590
|
+
return()
|
2591
|
+
endif()
|
2592
|
+
set (_cmds "")
|
2593
|
+
# check for user provided unity source file list
|
2594
|
+
get_property(_unitySourceFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE_INIT)
|
2595
|
+
if (NOT _unitySourceFiles)
|
2596
|
+
set (_unitySourceFiles ${_sourceFiles} ${_cotiredSources})
|
2597
|
+
endif()
|
2598
|
+
cotire_generate_target_script(
|
2599
|
+
${_language} "${_configurations}" ${_target} _targetScript _targetConfigScript ${_unitySourceFiles})
|
2600
|
+
cotire_compute_unity_max_number_of_includes(${_target} _maxIncludes ${_unitySourceFiles})
|
2601
|
+
cotire_make_unity_source_file_paths(${_language} ${_target} ${_maxIncludes} _unityFiles ${_unitySourceFiles})
|
2602
|
+
if (NOT _unityFiles)
|
2603
|
+
return()
|
2604
|
+
endif()
|
2605
|
+
cotire_setup_unity_generation_commands(
|
2606
|
+
${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFiles}" _cmds ${_unitySourceFiles})
|
2607
|
+
cotire_make_prefix_file_path(${_language} ${_target} _prefixFile)
|
2608
|
+
if (_prefixFile)
|
2609
|
+
# check for user provided prefix header files
|
2610
|
+
get_property(_prefixHeaderFiles TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT)
|
2611
|
+
if (_prefixHeaderFiles)
|
2612
|
+
cotire_setup_prefix_generation_from_provided_command(
|
2613
|
+
${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" _cmds ${_prefixHeaderFiles})
|
2614
|
+
else()
|
2615
|
+
cotire_setup_prefix_generation_from_unity_command(
|
2616
|
+
${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_unityFiles}" _cmds ${_unitySourceFiles})
|
2617
|
+
endif()
|
2618
|
+
# check if selected language has enough sources at all
|
2619
|
+
list (LENGTH _sourceFiles _numberOfSources)
|
2620
|
+
if (_numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES})
|
2621
|
+
set (_targetUsePCH FALSE)
|
2622
|
+
else()
|
2623
|
+
get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)
|
2624
|
+
endif()
|
2625
|
+
if (_targetUsePCH)
|
2626
|
+
cotire_make_pch_file_path(${_language} ${_target} _pchFile)
|
2627
|
+
if (_pchFile)
|
2628
|
+
# first file in _sourceFiles is passed as the host file
|
2629
|
+
cotire_setup_pch_file_compilation(
|
2630
|
+
${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles})
|
2631
|
+
cotire_setup_pch_file_inclusion(
|
2632
|
+
${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_sourceFiles})
|
2633
|
+
endif()
|
2634
|
+
elseif (_prefixHeaderFiles)
|
2635
|
+
# user provided prefix header must be included unconditionally
|
2636
|
+
cotire_setup_prefix_file_inclusion(${_language} ${_target} "${_prefixFile}" ${_sourceFiles})
|
2637
|
+
endif()
|
2638
|
+
endif()
|
2639
|
+
# mark target as cotired for language
|
2640
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE "${_unityFiles}")
|
2641
|
+
if (_prefixFile)
|
2642
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER "${_prefixFile}")
|
2643
|
+
if (_targetUsePCH AND _pchFile)
|
2644
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER "${_pchFile}")
|
2645
|
+
endif()
|
2646
|
+
endif()
|
2647
|
+
set (${_cmdsVar} ${_cmds} PARENT_SCOPE)
|
2648
|
+
endfunction()
|
2649
|
+
|
2650
|
+
function (cotire_setup_clean_target _target)
|
2651
|
+
set (_cleanTargetName "${_target}${COTIRE_CLEAN_TARGET_SUFFIX}")
|
2652
|
+
if (NOT TARGET "${_cleanTargetName}")
|
2653
|
+
cotire_set_cmd_to_prologue(_cmds)
|
2654
|
+
get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" ABSOLUTE)
|
2655
|
+
list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${_outputDir}" "${COTIRE_INTDIR}" "${_target}")
|
2656
|
+
add_custom_target(${_cleanTargetName}
|
2657
|
+
COMMAND ${_cmds}
|
2658
|
+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
2659
|
+
COMMENT "Cleaning up target ${_target} cotire generated files"
|
2660
|
+
VERBATIM)
|
2661
|
+
cotire_init_target("${_cleanTargetName}")
|
2662
|
+
endif()
|
2663
|
+
endfunction()
|
2664
|
+
|
2665
|
+
function (cotire_setup_pch_target _languages _configurations _target)
|
2666
|
+
if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
2667
|
+
# for makefile based generators, we add a custom target to trigger the generation of the cotire related files
|
2668
|
+
set (_dependsFiles "")
|
2669
|
+
foreach (_language ${_languages})
|
2670
|
+
set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE)
|
2671
|
+
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
|
2672
|
+
# Visual Studio and Intel only create precompiled header as a side effect
|
2673
|
+
list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)
|
2674
|
+
endif()
|
2675
|
+
cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props})
|
2676
|
+
if (_dependsFile)
|
2677
|
+
list (APPEND _dependsFiles "${_dependsFile}")
|
2678
|
+
endif()
|
2679
|
+
endforeach()
|
2680
|
+
if (_dependsFiles)
|
2681
|
+
set (_pchTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}")
|
2682
|
+
add_custom_target("${_pchTargetName}" DEPENDS ${_dependsFiles})
|
2683
|
+
cotire_init_target("${_pchTargetName}")
|
2684
|
+
cotire_add_to_pch_all_target(${_pchTargetName})
|
2685
|
+
endif()
|
2686
|
+
else()
|
2687
|
+
# for other generators, we add the "clean all" target to clean up the precompiled header
|
2688
|
+
cotire_setup_clean_all_target()
|
2689
|
+
endif()
|
2690
|
+
endfunction()
|
2691
|
+
|
2692
|
+
function (cotire_collect_unity_target_sources _target _languages _unityTargetSourcesVar)
|
2693
|
+
get_target_property(_targetSourceFiles ${_target} SOURCES)
|
2694
|
+
set (_unityTargetSources ${_targetSourceFiles})
|
2695
|
+
foreach (_language ${_languages})
|
2696
|
+
get_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE)
|
2697
|
+
if (_unityFiles)
|
2698
|
+
# remove source files that are included in the unity source
|
2699
|
+
set (_sourceFiles "")
|
2700
|
+
set (_excludedSources "")
|
2701
|
+
set (_cotiredSources "")
|
2702
|
+
cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles})
|
2703
|
+
if (_sourceFiles OR _cotiredSources)
|
2704
|
+
list (REMOVE_ITEM _unityTargetSources ${_sourceFiles} ${_cotiredSources})
|
2705
|
+
endif()
|
2706
|
+
# add unity source files instead
|
2707
|
+
list (APPEND _unityTargetSources ${_unityFiles})
|
2708
|
+
endif()
|
2709
|
+
endforeach()
|
2710
|
+
set (${_unityTargetSourcesVar} ${_unityTargetSources} PARENT_SCOPE)
|
2711
|
+
endfunction()
|
2712
|
+
|
2713
|
+
function (cotire_setup_unity_build_target _languages _configurations _target)
|
2714
|
+
get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME)
|
2715
|
+
if (NOT _unityTargetName)
|
2716
|
+
set (_unityTargetName "${_target}${COTIRE_UNITY_BUILD_TARGET_SUFFIX}")
|
2717
|
+
endif()
|
2718
|
+
# determine unity target sub type
|
2719
|
+
get_target_property(_targetType ${_target} TYPE)
|
2720
|
+
if ("${_targetType}" STREQUAL "EXECUTABLE")
|
2721
|
+
set (_unityTargetSubType "")
|
2722
|
+
elseif (_targetType MATCHES "(STATIC|SHARED|MODULE|OBJECT)_LIBRARY")
|
2723
|
+
set (_unityTargetSubType "${CMAKE_MATCH_1}")
|
2724
|
+
else()
|
2725
|
+
message (WARNING "cotire: target ${_target} has unknown target type ${_targetType}.")
|
2726
|
+
return()
|
2727
|
+
endif()
|
2728
|
+
# determine unity target sources
|
2729
|
+
set (_unityTargetSources "")
|
2730
|
+
cotire_collect_unity_target_sources(${_target} "${_languages}" _unityTargetSources)
|
2731
|
+
# handle automatic Qt processing
|
2732
|
+
get_target_property(_targetAutoMoc ${_target} AUTOMOC)
|
2733
|
+
get_target_property(_targetAutoUic ${_target} AUTOUIC)
|
2734
|
+
get_target_property(_targetAutoRcc ${_target} AUTORCC)
|
2735
|
+
if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
|
2736
|
+
# if the original target sources are subject to CMake's automatic Qt processing,
|
2737
|
+
# also include implicitly generated <targetname>_automoc.cpp file
|
2738
|
+
list (APPEND _unityTargetSources "${_target}_automoc.cpp")
|
2739
|
+
set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE)
|
2740
|
+
endif()
|
2741
|
+
# prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created
|
2742
|
+
set (CMAKE_AUTOMOC OFF)
|
2743
|
+
set (CMAKE_AUTOUIC OFF)
|
2744
|
+
set (CMAKE_AUTORCC OFF)
|
2745
|
+
if (COTIRE_DEBUG)
|
2746
|
+
message (STATUS "add target ${_targetType} ${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}")
|
2747
|
+
endif()
|
2748
|
+
# generate unity target
|
2749
|
+
if ("${_targetType}" STREQUAL "EXECUTABLE")
|
2750
|
+
add_executable(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})
|
2751
|
+
else()
|
2752
|
+
add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources})
|
2753
|
+
endif()
|
2754
|
+
if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc)
|
2755
|
+
# depend on the original target's implicity generated <targetname>_automoc target
|
2756
|
+
add_dependencies(${_unityTargetName} ${_target}_automoc)
|
2757
|
+
endif()
|
2758
|
+
# copy output location properties
|
2759
|
+
set (_outputDirProperties
|
2760
|
+
ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
|
2761
|
+
LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
|
2762
|
+
RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_<CONFIG>)
|
2763
|
+
if (COTIRE_UNITY_OUTPUT_DIRECTORY)
|
2764
|
+
set (_setDefaultOutputDir TRUE)
|
2765
|
+
if (IS_ABSOLUTE "${COTIRE_UNITY_OUTPUT_DIRECTORY}")
|
2766
|
+
set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}")
|
2767
|
+
else()
|
2768
|
+
# append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory
|
2769
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties})
|
2770
|
+
cotire_resolve_config_properites("${_configurations}" _properties ${_outputDirProperties})
|
2771
|
+
foreach (_property ${_properties})
|
2772
|
+
get_property(_outputDir TARGET ${_target} PROPERTY ${_property})
|
2773
|
+
if (_outputDir)
|
2774
|
+
get_filename_component(_outputDir "${_outputDir}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE)
|
2775
|
+
set_property(TARGET ${_unityTargetName} PROPERTY ${_property} "${_outputDir}")
|
2776
|
+
set (_setDefaultOutputDir FALSE)
|
2777
|
+
endif()
|
2778
|
+
endforeach()
|
2779
|
+
if (_setDefaultOutputDir)
|
2780
|
+
get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE)
|
2781
|
+
endif()
|
2782
|
+
endif()
|
2783
|
+
if (_setDefaultOutputDir)
|
2784
|
+
set_target_properties(${_unityTargetName} PROPERTIES
|
2785
|
+
ARCHIVE_OUTPUT_DIRECTORY "${_outputDir}"
|
2786
|
+
LIBRARY_OUTPUT_DIRECTORY "${_outputDir}"
|
2787
|
+
RUNTIME_OUTPUT_DIRECTORY "${_outputDir}")
|
2788
|
+
endif()
|
2789
|
+
else()
|
2790
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2791
|
+
${_outputDirProperties})
|
2792
|
+
endif()
|
2793
|
+
# copy output name
|
2794
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2795
|
+
ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_<CONFIG>
|
2796
|
+
LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_<CONFIG>
|
2797
|
+
OUTPUT_NAME OUTPUT_NAME_<CONFIG>
|
2798
|
+
RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_<CONFIG>
|
2799
|
+
PREFIX <CONFIG>_POSTFIX SUFFIX
|
2800
|
+
IMPORT_PREFIX IMPORT_SUFFIX)
|
2801
|
+
# copy compile stuff
|
2802
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2803
|
+
COMPILE_DEFINITIONS COMPILE_DEFINITIONS_<CONFIG>
|
2804
|
+
COMPILE_FLAGS COMPILE_OPTIONS
|
2805
|
+
Fortran_FORMAT Fortran_MODULE_DIRECTORY
|
2806
|
+
INCLUDE_DIRECTORIES
|
2807
|
+
INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
|
2808
|
+
POSITION_INDEPENDENT_CODE
|
2809
|
+
C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN)
|
2810
|
+
# copy compile features
|
2811
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2812
|
+
C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED
|
2813
|
+
CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED
|
2814
|
+
COMPILE_FEATURES)
|
2815
|
+
# copy interface stuff
|
2816
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2817
|
+
COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN
|
2818
|
+
COMPATIBLE_INTERFACE_STRING
|
2819
|
+
INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS
|
2820
|
+
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_SOURCES
|
2821
|
+
INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
2822
|
+
INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED)
|
2823
|
+
# copy link stuff
|
2824
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2825
|
+
BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH
|
2826
|
+
LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED
|
2827
|
+
LINK_FLAGS LINK_FLAGS_<CONFIG>
|
2828
|
+
LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_<CONFIG>
|
2829
|
+
LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_<CONFIG>
|
2830
|
+
LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC
|
2831
|
+
STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_<CONFIG>
|
2832
|
+
NO_SONAME SOVERSION VERSION)
|
2833
|
+
# copy cmake stuff
|
2834
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2835
|
+
IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK)
|
2836
|
+
# copy Apple platform specific stuff
|
2837
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2838
|
+
BUNDLE BUNDLE_EXTENSION FRAMEWORK INSTALL_NAME_DIR MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST
|
2839
|
+
MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH OSX_ARCHITECTURES
|
2840
|
+
OSX_ARCHITECTURES_<CONFIG> PRIVATE_HEADER PUBLIC_HEADER RESOURCE)
|
2841
|
+
# copy Windows platform specific stuff
|
2842
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2843
|
+
GNUtoMS
|
2844
|
+
COMPILE_PDB_NAME COMPILE_PDB_NAME_<CONFIG>
|
2845
|
+
COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
|
2846
|
+
PDB_NAME PDB_NAME_<CONFIG> PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_<CONFIG>
|
2847
|
+
VS_DOTNET_REFERENCES VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE
|
2848
|
+
VS_KEYWORD VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER
|
2849
|
+
VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES VS_WINRT_COMPONENT
|
2850
|
+
VS_DOTNET_TARGET_FRAMEWORK_VERSION WIN32_EXECUTABLE)
|
2851
|
+
# copy Android platform specific stuff
|
2852
|
+
cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName}
|
2853
|
+
ANDROID_API ANDROID_API_MIN ANDROID_GUI)
|
2854
|
+
# use output name from original target
|
2855
|
+
get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME)
|
2856
|
+
if (NOT _targetOutputName)
|
2857
|
+
set_property(TARGET ${_unityTargetName} PROPERTY OUTPUT_NAME "${_target}")
|
2858
|
+
endif()
|
2859
|
+
# use export symbol from original target
|
2860
|
+
cotire_get_target_export_symbol("${_target}" _defineSymbol)
|
2861
|
+
if (_defineSymbol)
|
2862
|
+
set_property(TARGET ${_unityTargetName} PROPERTY DEFINE_SYMBOL "${_defineSymbol}")
|
2863
|
+
if ("${_targetType}" STREQUAL "EXECUTABLE")
|
2864
|
+
set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE)
|
2865
|
+
endif()
|
2866
|
+
endif()
|
2867
|
+
cotire_init_target(${_unityTargetName})
|
2868
|
+
cotire_add_to_unity_all_target(${_unityTargetName})
|
2869
|
+
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}")
|
2870
|
+
endfunction(cotire_setup_unity_build_target)
|
2871
|
+
|
2872
|
+
function (cotire_target _target)
|
2873
|
+
set(_options "")
|
2874
|
+
set(_oneValueArgs "")
|
2875
|
+
set(_multiValueArgs LANGUAGES CONFIGURATIONS)
|
2876
|
+
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
2877
|
+
if (NOT _option_LANGUAGES)
|
2878
|
+
get_property (_option_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
2879
|
+
endif()
|
2880
|
+
if (NOT _option_CONFIGURATIONS)
|
2881
|
+
cotire_get_configuration_types(_option_CONFIGURATIONS)
|
2882
|
+
endif()
|
2883
|
+
# trivial checks
|
2884
|
+
get_target_property(_imported ${_target} IMPORTED)
|
2885
|
+
if (_imported)
|
2886
|
+
message (WARNING "cotire: imported target ${_target} cannot be cotired.")
|
2887
|
+
return()
|
2888
|
+
endif()
|
2889
|
+
# resolve alias
|
2890
|
+
get_target_property(_aliasName ${_target} ALIASED_TARGET)
|
2891
|
+
if (_aliasName)
|
2892
|
+
if (COTIRE_DEBUG)
|
2893
|
+
message (STATUS "${_target} is an alias. Applying cotire to aliased target ${_aliasName} instead.")
|
2894
|
+
endif()
|
2895
|
+
set (_target ${_aliasName})
|
2896
|
+
endif()
|
2897
|
+
# check if target needs to be cotired for build type
|
2898
|
+
# when using configuration types, the test is performed at build time
|
2899
|
+
cotire_init_cotire_target_properties(${_target})
|
2900
|
+
if (NOT CMAKE_CONFIGURATION_TYPES)
|
2901
|
+
if (CMAKE_BUILD_TYPE)
|
2902
|
+
list (FIND _option_CONFIGURATIONS "${CMAKE_BUILD_TYPE}" _index)
|
2903
|
+
else()
|
2904
|
+
list (FIND _option_CONFIGURATIONS "None" _index)
|
2905
|
+
endif()
|
2906
|
+
if (_index EQUAL -1)
|
2907
|
+
if (COTIRE_DEBUG)
|
2908
|
+
message (STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} not cotired (${_option_CONFIGURATIONS})")
|
2909
|
+
endif()
|
2910
|
+
return()
|
2911
|
+
endif()
|
2912
|
+
endif()
|
2913
|
+
# when not using configuration types, immediately create cotire intermediate dir
|
2914
|
+
if (NOT CMAKE_CONFIGURATION_TYPES)
|
2915
|
+
cotire_get_intermediate_dir(_baseDir)
|
2916
|
+
file (MAKE_DIRECTORY "${_baseDir}")
|
2917
|
+
endif()
|
2918
|
+
# choose languages that apply to the target
|
2919
|
+
cotire_choose_target_languages("${_target}" _targetLanguages _wholeTarget ${_option_LANGUAGES})
|
2920
|
+
if (NOT _targetLanguages)
|
2921
|
+
return()
|
2922
|
+
endif()
|
2923
|
+
set (_cmds "")
|
2924
|
+
foreach (_language ${_targetLanguages})
|
2925
|
+
cotire_process_target_language("${_language}" "${_option_CONFIGURATIONS}" ${_target} ${_wholeTarget} _cmd)
|
2926
|
+
if (_cmd)
|
2927
|
+
list (APPEND _cmds ${_cmd})
|
2928
|
+
endif()
|
2929
|
+
endforeach()
|
2930
|
+
get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD)
|
2931
|
+
if (_targetAddSCU)
|
2932
|
+
cotire_setup_unity_build_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target})
|
2933
|
+
endif()
|
2934
|
+
get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER)
|
2935
|
+
if (_targetUsePCH)
|
2936
|
+
cotire_setup_target_pch_usage("${_targetLanguages}" ${_target} ${_wholeTarget} ${_cmds})
|
2937
|
+
cotire_setup_pch_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target})
|
2938
|
+
endif()
|
2939
|
+
get_target_property(_targetAddCleanTarget ${_target} COTIRE_ADD_CLEAN)
|
2940
|
+
if (_targetAddCleanTarget)
|
2941
|
+
cotire_setup_clean_target(${_target})
|
2942
|
+
endif()
|
2943
|
+
endfunction(cotire_target)
|
2944
|
+
|
2945
|
+
function (cotire_map_libraries _strategy _mappedLibrariesVar)
|
2946
|
+
set (_mappedLibraries "")
|
2947
|
+
foreach (_library ${ARGN})
|
2948
|
+
if (TARGET "${_library}" AND "${_strategy}" MATCHES "COPY_UNITY")
|
2949
|
+
# use target's corresponding unity target, if available
|
2950
|
+
get_target_property(_libraryUnityTargetName ${_library} COTIRE_UNITY_TARGET_NAME)
|
2951
|
+
if (TARGET "${_libraryUnityTargetName}")
|
2952
|
+
list (APPEND _mappedLibraries "${_libraryUnityTargetName}")
|
2953
|
+
else()
|
2954
|
+
list (APPEND _mappedLibraries "${_library}")
|
2955
|
+
endif()
|
2956
|
+
else()
|
2957
|
+
list (APPEND _mappedLibraries "${_library}")
|
2958
|
+
endif()
|
2959
|
+
endforeach()
|
2960
|
+
list (REMOVE_DUPLICATES _mappedLibraries)
|
2961
|
+
set (${_mappedLibrariesVar} ${_mappedLibraries} PARENT_SCOPE)
|
2962
|
+
endfunction()
|
2963
|
+
|
2964
|
+
function (cotire_target_link_libraries _target)
|
2965
|
+
get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME)
|
2966
|
+
if (TARGET "${_unityTargetName}")
|
2967
|
+
get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT)
|
2968
|
+
if (COTIRE_DEBUG)
|
2969
|
+
message (STATUS "unity target ${_unityTargetName} link strategy: ${_linkLibrariesStrategy}")
|
2970
|
+
endif()
|
2971
|
+
if ("${_linkLibrariesStrategy}" MATCHES "^(COPY|COPY_UNITY)$")
|
2972
|
+
set (_unityLinkLibraries "")
|
2973
|
+
get_target_property(_linkLibraries ${_target} LINK_LIBRARIES)
|
2974
|
+
if (_linkLibraries)
|
2975
|
+
list (APPEND _unityLinkLibraries ${_linkLibraries})
|
2976
|
+
endif()
|
2977
|
+
get_target_property(_interfaceLinkLibraries ${_target} INTERFACE_LINK_LIBRARIES)
|
2978
|
+
if (_interfaceLinkLibraries)
|
2979
|
+
list (APPEND _unityLinkLibraries ${_interfaceLinkLibraries})
|
2980
|
+
endif()
|
2981
|
+
cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_unityLinkLibraries})
|
2982
|
+
if (COTIRE_DEBUG)
|
2983
|
+
message (STATUS "unity target ${_unityTargetName} libraries: ${_unityLinkLibraries}")
|
2984
|
+
endif()
|
2985
|
+
if (_unityLinkLibraries)
|
2986
|
+
target_link_libraries(${_unityTargetName} ${_unityLinkLibraries})
|
2987
|
+
endif()
|
2988
|
+
endif()
|
2989
|
+
endif()
|
2990
|
+
endfunction(cotire_target_link_libraries)
|
2991
|
+
|
2992
|
+
function (cotire_cleanup _binaryDir _cotireIntermediateDirName _targetName)
|
2993
|
+
if (_targetName)
|
2994
|
+
file (GLOB_RECURSE _cotireFiles "${_binaryDir}/${_targetName}*.*")
|
2995
|
+
else()
|
2996
|
+
file (GLOB_RECURSE _cotireFiles "${_binaryDir}/*.*")
|
2997
|
+
endif()
|
2998
|
+
# filter files in intermediate directory
|
2999
|
+
set (_filesToRemove "")
|
3000
|
+
foreach (_file ${_cotireFiles})
|
3001
|
+
get_filename_component(_dir "${_file}" PATH)
|
3002
|
+
get_filename_component(_dirName "${_dir}" NAME)
|
3003
|
+
if ("${_dirName}" STREQUAL "${_cotireIntermediateDirName}")
|
3004
|
+
list (APPEND _filesToRemove "${_file}")
|
3005
|
+
endif()
|
3006
|
+
endforeach()
|
3007
|
+
if (_filesToRemove)
|
3008
|
+
if (COTIRE_VERBOSE)
|
3009
|
+
message (STATUS "cleaning up ${_filesToRemove}")
|
3010
|
+
endif()
|
3011
|
+
file (REMOVE ${_filesToRemove})
|
3012
|
+
endif()
|
3013
|
+
endfunction()
|
3014
|
+
|
3015
|
+
function (cotire_init_target _targetName)
|
3016
|
+
if (COTIRE_TARGETS_FOLDER)
|
3017
|
+
set_target_properties(${_targetName} PROPERTIES FOLDER "${COTIRE_TARGETS_FOLDER}")
|
3018
|
+
endif()
|
3019
|
+
set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
3020
|
+
if (MSVC_IDE)
|
3021
|
+
set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
3022
|
+
endif()
|
3023
|
+
endfunction()
|
3024
|
+
|
3025
|
+
function (cotire_add_to_pch_all_target _pchTargetName)
|
3026
|
+
set (_targetName "${COTIRE_PCH_ALL_TARGET_NAME}")
|
3027
|
+
if (NOT TARGET "${_targetName}")
|
3028
|
+
add_custom_target("${_targetName}"
|
3029
|
+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
3030
|
+
VERBATIM)
|
3031
|
+
cotire_init_target("${_targetName}")
|
3032
|
+
endif()
|
3033
|
+
cotire_setup_clean_all_target()
|
3034
|
+
add_dependencies(${_targetName} ${_pchTargetName})
|
3035
|
+
endfunction()
|
3036
|
+
|
3037
|
+
function (cotire_add_to_unity_all_target _unityTargetName)
|
3038
|
+
set (_targetName "${COTIRE_UNITY_BUILD_ALL_TARGET_NAME}")
|
3039
|
+
if (NOT TARGET "${_targetName}")
|
3040
|
+
add_custom_target("${_targetName}"
|
3041
|
+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
3042
|
+
VERBATIM)
|
3043
|
+
cotire_init_target("${_targetName}")
|
3044
|
+
endif()
|
3045
|
+
cotire_setup_clean_all_target()
|
3046
|
+
add_dependencies(${_targetName} ${_unityTargetName})
|
3047
|
+
endfunction()
|
3048
|
+
|
3049
|
+
function (cotire_setup_clean_all_target)
|
3050
|
+
set (_targetName "${COTIRE_CLEAN_ALL_TARGET_NAME}")
|
3051
|
+
if (NOT TARGET "${_targetName}")
|
3052
|
+
cotire_set_cmd_to_prologue(_cmds)
|
3053
|
+
list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${CMAKE_BINARY_DIR}" "${COTIRE_INTDIR}")
|
3054
|
+
add_custom_target(${_targetName}
|
3055
|
+
COMMAND ${_cmds}
|
3056
|
+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
3057
|
+
COMMENT "Cleaning up all cotire generated files"
|
3058
|
+
VERBATIM)
|
3059
|
+
cotire_init_target("${_targetName}")
|
3060
|
+
endif()
|
3061
|
+
endfunction()
|
3062
|
+
|
3063
|
+
function (cotire)
|
3064
|
+
set(_options "")
|
3065
|
+
set(_oneValueArgs "")
|
3066
|
+
set(_multiValueArgs LANGUAGES CONFIGURATIONS)
|
3067
|
+
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
3068
|
+
set (_targets ${_option_UNPARSED_ARGUMENTS})
|
3069
|
+
foreach (_target ${_targets})
|
3070
|
+
if (TARGET ${_target})
|
3071
|
+
cotire_target(${_target} LANGUAGES ${_option_LANGUAGES} CONFIGURATIONS ${_option_CONFIGURATIONS})
|
3072
|
+
else()
|
3073
|
+
message (WARNING "cotire: ${_target} is not a target.")
|
3074
|
+
endif()
|
3075
|
+
endforeach()
|
3076
|
+
foreach (_target ${_targets})
|
3077
|
+
if (TARGET ${_target})
|
3078
|
+
cotire_target_link_libraries(${_target})
|
3079
|
+
endif()
|
3080
|
+
endforeach()
|
3081
|
+
endfunction()
|
3082
|
+
|
3083
|
+
if (CMAKE_SCRIPT_MODE_FILE)
|
3084
|
+
|
3085
|
+
# cotire is being run in script mode
|
3086
|
+
# locate -P on command args
|
3087
|
+
set (COTIRE_ARGC -1)
|
3088
|
+
foreach (_index RANGE ${CMAKE_ARGC})
|
3089
|
+
if (COTIRE_ARGC GREATER -1)
|
3090
|
+
set (COTIRE_ARGV${COTIRE_ARGC} "${CMAKE_ARGV${_index}}")
|
3091
|
+
math (EXPR COTIRE_ARGC "${COTIRE_ARGC} + 1")
|
3092
|
+
elseif ("${CMAKE_ARGV${_index}}" STREQUAL "-P")
|
3093
|
+
set (COTIRE_ARGC 0)
|
3094
|
+
endif()
|
3095
|
+
endforeach()
|
3096
|
+
|
3097
|
+
# include target script if available
|
3098
|
+
if ("${COTIRE_ARGV2}" MATCHES "\\.cmake$")
|
3099
|
+
# the included target scripts sets up additional variables relating to the target (e.g., COTIRE_TARGET_SOURCES)
|
3100
|
+
include("${COTIRE_ARGV2}")
|
3101
|
+
endif()
|
3102
|
+
|
3103
|
+
if (COTIRE_DEBUG)
|
3104
|
+
message (STATUS "${COTIRE_ARGV0} ${COTIRE_ARGV1} ${COTIRE_ARGV2} ${COTIRE_ARGV3} ${COTIRE_ARGV4} ${COTIRE_ARGV5}")
|
3105
|
+
endif()
|
3106
|
+
|
3107
|
+
if (NOT COTIRE_BUILD_TYPE)
|
3108
|
+
set (COTIRE_BUILD_TYPE "None")
|
3109
|
+
endif()
|
3110
|
+
string (TOUPPER "${COTIRE_BUILD_TYPE}" _upperConfig)
|
3111
|
+
set (_includeDirs ${COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig}})
|
3112
|
+
set (_systemIncludeDirs ${COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig}})
|
3113
|
+
set (_compileDefinitions ${COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}})
|
3114
|
+
set (_compileFlags ${COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}})
|
3115
|
+
# check if target has been cotired for actual build type COTIRE_BUILD_TYPE
|
3116
|
+
list (FIND COTIRE_TARGET_CONFIGURATION_TYPES "${COTIRE_BUILD_TYPE}" _index)
|
3117
|
+
if (_index GREATER -1)
|
3118
|
+
set (_sources ${COTIRE_TARGET_SOURCES})
|
3119
|
+
set (_sourcesDefinitions ${COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig}})
|
3120
|
+
else()
|
3121
|
+
if (COTIRE_DEBUG)
|
3122
|
+
message (STATUS "COTIRE_BUILD_TYPE=${COTIRE_BUILD_TYPE} not cotired (${COTIRE_TARGET_CONFIGURATION_TYPES})")
|
3123
|
+
endif()
|
3124
|
+
set (_sources "")
|
3125
|
+
set (_sourceLocations "")
|
3126
|
+
set (_sourcesDefinitions "")
|
3127
|
+
endif()
|
3128
|
+
set (_targetPreUndefs ${COTIRE_TARGET_PRE_UNDEFS})
|
3129
|
+
set (_targetPostUndefs ${COTIRE_TARGET_POST_UNDEFS})
|
3130
|
+
set (_sourcesPreUndefs ${COTIRE_TARGET_SOURCES_PRE_UNDEFS})
|
3131
|
+
set (_sourcesPostUndefs ${COTIRE_TARGET_SOURCES_POST_UNDEFS})
|
3132
|
+
|
3133
|
+
if ("${COTIRE_ARGV1}" STREQUAL "unity")
|
3134
|
+
|
3135
|
+
if (XCODE)
|
3136
|
+
# executing pre-build action under Xcode, check dependency on target script
|
3137
|
+
set (_dependsOption DEPENDS "${COTIRE_ARGV2}")
|
3138
|
+
else()
|
3139
|
+
# executing custom command, no need to re-check for dependencies
|
3140
|
+
set (_dependsOption "")
|
3141
|
+
endif()
|
3142
|
+
|
3143
|
+
cotire_select_unity_source_files("${COTIRE_ARGV3}" _sources ${_sources})
|
3144
|
+
|
3145
|
+
cotire_generate_unity_source(
|
3146
|
+
"${COTIRE_ARGV3}" ${_sources}
|
3147
|
+
LANGUAGE "${COTIRE_TARGET_LANGUAGE}"
|
3148
|
+
SOURCES_COMPILE_DEFINITIONS ${_sourcesDefinitions}
|
3149
|
+
PRE_UNDEFS ${_targetPreUndefs}
|
3150
|
+
POST_UNDEFS ${_targetPostUndefs}
|
3151
|
+
SOURCES_PRE_UNDEFS ${_sourcesPreUndefs}
|
3152
|
+
SOURCES_POST_UNDEFS ${_sourcesPostUndefs}
|
3153
|
+
${_dependsOption})
|
3154
|
+
|
3155
|
+
elseif ("${COTIRE_ARGV1}" STREQUAL "prefix")
|
3156
|
+
|
3157
|
+
if (XCODE)
|
3158
|
+
# executing pre-build action under Xcode, check dependency on unity file and prefix dependencies
|
3159
|
+
set (_dependsOption DEPENDS "${COTIRE_ARGV4}" ${COTIRE_TARGET_PREFIX_DEPENDS})
|
3160
|
+
else()
|
3161
|
+
# executing custom command, no need to re-check for dependencies
|
3162
|
+
set (_dependsOption "")
|
3163
|
+
endif()
|
3164
|
+
|
3165
|
+
set (_files "")
|
3166
|
+
foreach (_index RANGE 4 ${COTIRE_ARGC})
|
3167
|
+
if (COTIRE_ARGV${_index})
|
3168
|
+
list (APPEND _files "${COTIRE_ARGV${_index}}")
|
3169
|
+
endif()
|
3170
|
+
endforeach()
|
3171
|
+
|
3172
|
+
cotire_generate_prefix_header(
|
3173
|
+
"${COTIRE_ARGV3}" ${_files}
|
3174
|
+
COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}"
|
3175
|
+
COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1}
|
3176
|
+
COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}"
|
3177
|
+
COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}"
|
3178
|
+
LANGUAGE "${COTIRE_TARGET_LANGUAGE}"
|
3179
|
+
IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}"
|
3180
|
+
INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH}
|
3181
|
+
IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}"
|
3182
|
+
INCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH}
|
3183
|
+
INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}"
|
3184
|
+
INCLUDE_DIRECTORIES ${_includeDirs}
|
3185
|
+
SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}
|
3186
|
+
COMPILE_DEFINITIONS ${_compileDefinitions}
|
3187
|
+
COMPILE_FLAGS ${_compileFlags}
|
3188
|
+
${_dependsOption})
|
3189
|
+
|
3190
|
+
elseif ("${COTIRE_ARGV1}" STREQUAL "precompile")
|
3191
|
+
|
3192
|
+
set (_files "")
|
3193
|
+
foreach (_index RANGE 5 ${COTIRE_ARGC})
|
3194
|
+
if (COTIRE_ARGV${_index})
|
3195
|
+
list (APPEND _files "${COTIRE_ARGV${_index}}")
|
3196
|
+
endif()
|
3197
|
+
endforeach()
|
3198
|
+
|
3199
|
+
cotire_precompile_prefix_header(
|
3200
|
+
"${COTIRE_ARGV3}" "${COTIRE_ARGV4}" "${COTIRE_ARGV5}"
|
3201
|
+
COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}"
|
3202
|
+
COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1}
|
3203
|
+
COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}"
|
3204
|
+
COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}"
|
3205
|
+
LANGUAGE "${COTIRE_TARGET_LANGUAGE}"
|
3206
|
+
INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}"
|
3207
|
+
INCLUDE_DIRECTORIES ${_includeDirs}
|
3208
|
+
SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}
|
3209
|
+
COMPILE_DEFINITIONS ${_compileDefinitions}
|
3210
|
+
COMPILE_FLAGS ${_compileFlags})
|
3211
|
+
|
3212
|
+
elseif ("${COTIRE_ARGV1}" STREQUAL "combine")
|
3213
|
+
|
3214
|
+
if (COTIRE_TARGET_LANGUAGE)
|
3215
|
+
set (_combinedFile "${COTIRE_ARGV3}")
|
3216
|
+
set (_startIndex 4)
|
3217
|
+
else()
|
3218
|
+
set (_combinedFile "${COTIRE_ARGV2}")
|
3219
|
+
set (_startIndex 3)
|
3220
|
+
endif()
|
3221
|
+
set (_files "")
|
3222
|
+
foreach (_index RANGE ${_startIndex} ${COTIRE_ARGC})
|
3223
|
+
if (COTIRE_ARGV${_index})
|
3224
|
+
list (APPEND _files "${COTIRE_ARGV${_index}}")
|
3225
|
+
endif()
|
3226
|
+
endforeach()
|
3227
|
+
|
3228
|
+
if (XCODE)
|
3229
|
+
# executing pre-build action under Xcode, check dependency on files to be combined
|
3230
|
+
set (_dependsOption DEPENDS ${_files})
|
3231
|
+
else()
|
3232
|
+
# executing custom command, no need to re-check for dependencies
|
3233
|
+
set (_dependsOption "")
|
3234
|
+
endif()
|
3235
|
+
|
3236
|
+
if (COTIRE_TARGET_LANGUAGE)
|
3237
|
+
cotire_generate_unity_source(
|
3238
|
+
"${_combinedFile}" ${_files}
|
3239
|
+
LANGUAGE "${COTIRE_TARGET_LANGUAGE}"
|
3240
|
+
${_dependsOption})
|
3241
|
+
else()
|
3242
|
+
cotire_generate_unity_source("${_combinedFile}" ${_files} ${_dependsOption})
|
3243
|
+
endif()
|
3244
|
+
|
3245
|
+
elseif ("${COTIRE_ARGV1}" STREQUAL "cleanup")
|
3246
|
+
|
3247
|
+
cotire_cleanup("${COTIRE_ARGV2}" "${COTIRE_ARGV3}" "${COTIRE_ARGV4}")
|
3248
|
+
|
3249
|
+
else()
|
3250
|
+
message (FATAL_ERROR "cotire: unknown command \"${COTIRE_ARGV1}\".")
|
3251
|
+
endif()
|
3252
|
+
|
3253
|
+
else()
|
3254
|
+
|
3255
|
+
# cotire is being run in include mode
|
3256
|
+
# set up all variable and property definitions
|
3257
|
+
|
3258
|
+
if (NOT DEFINED COTIRE_DEBUG_INIT)
|
3259
|
+
if (DEFINED COTIRE_DEBUG)
|
3260
|
+
set (COTIRE_DEBUG_INIT ${COTIRE_DEBUG})
|
3261
|
+
else()
|
3262
|
+
set (COTIRE_DEBUG_INIT FALSE)
|
3263
|
+
endif()
|
3264
|
+
endif()
|
3265
|
+
option (COTIRE_DEBUG "Enable cotire debugging output?" ${COTIRE_DEBUG_INIT})
|
3266
|
+
|
3267
|
+
if (NOT DEFINED COTIRE_VERBOSE_INIT)
|
3268
|
+
if (DEFINED COTIRE_VERBOSE)
|
3269
|
+
set (COTIRE_VERBOSE_INIT ${COTIRE_VERBOSE})
|
3270
|
+
else()
|
3271
|
+
set (COTIRE_VERBOSE_INIT FALSE)
|
3272
|
+
endif()
|
3273
|
+
endif()
|
3274
|
+
option (COTIRE_VERBOSE "Enable cotire verbose output?" ${COTIRE_VERBOSE_INIT})
|
3275
|
+
|
3276
|
+
set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "inc;inl;ipp" CACHE STRING
|
3277
|
+
"Ignore headers with the listed file extensions from the generated prefix header.")
|
3278
|
+
|
3279
|
+
set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH "" CACHE STRING
|
3280
|
+
"Ignore headers from these directories when generating the prefix header.")
|
3281
|
+
|
3282
|
+
set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING
|
3283
|
+
"Ignore sources with the listed file extensions from the generated unity source.")
|
3284
|
+
|
3285
|
+
set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "3" CACHE STRING
|
3286
|
+
"Minimum number of sources in target required to enable use of precompiled header.")
|
3287
|
+
|
3288
|
+
if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT)
|
3289
|
+
if (DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES)
|
3290
|
+
set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT ${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES})
|
3291
|
+
elseif ("${CMAKE_GENERATOR}" MATCHES "JOM|Ninja|Visual Studio")
|
3292
|
+
# enable parallelization for generators that run multiple jobs by default
|
3293
|
+
set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "-j")
|
3294
|
+
else()
|
3295
|
+
set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "0")
|
3296
|
+
endif()
|
3297
|
+
endif()
|
3298
|
+
set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT}" CACHE STRING
|
3299
|
+
"Maximum number of source files to include in a single unity source file.")
|
3300
|
+
|
3301
|
+
if (NOT COTIRE_PREFIX_HEADER_FILENAME_SUFFIX)
|
3302
|
+
set (COTIRE_PREFIX_HEADER_FILENAME_SUFFIX "_prefix")
|
3303
|
+
endif()
|
3304
|
+
if (NOT COTIRE_UNITY_SOURCE_FILENAME_SUFFIX)
|
3305
|
+
set (COTIRE_UNITY_SOURCE_FILENAME_SUFFIX "_unity")
|
3306
|
+
endif()
|
3307
|
+
if (NOT COTIRE_INTDIR)
|
3308
|
+
set (COTIRE_INTDIR "cotire")
|
3309
|
+
endif()
|
3310
|
+
if (NOT COTIRE_PCH_ALL_TARGET_NAME)
|
3311
|
+
set (COTIRE_PCH_ALL_TARGET_NAME "all_pch")
|
3312
|
+
endif()
|
3313
|
+
if (NOT COTIRE_UNITY_BUILD_ALL_TARGET_NAME)
|
3314
|
+
set (COTIRE_UNITY_BUILD_ALL_TARGET_NAME "all_unity")
|
3315
|
+
endif()
|
3316
|
+
if (NOT COTIRE_CLEAN_ALL_TARGET_NAME)
|
3317
|
+
set (COTIRE_CLEAN_ALL_TARGET_NAME "clean_cotire")
|
3318
|
+
endif()
|
3319
|
+
if (NOT COTIRE_CLEAN_TARGET_SUFFIX)
|
3320
|
+
set (COTIRE_CLEAN_TARGET_SUFFIX "_clean_cotire")
|
3321
|
+
endif()
|
3322
|
+
if (NOT COTIRE_PCH_TARGET_SUFFIX)
|
3323
|
+
set (COTIRE_PCH_TARGET_SUFFIX "_pch")
|
3324
|
+
endif()
|
3325
|
+
if (MSVC)
|
3326
|
+
# MSVC default PCH memory scaling factor of 100 percent (75 MB) is too small for template heavy C++ code
|
3327
|
+
# use a bigger default factor of 140 percent (105 MB)
|
3328
|
+
if (NOT DEFINED COTIRE_PCH_MEMORY_SCALING_FACTOR)
|
3329
|
+
set (COTIRE_PCH_MEMORY_SCALING_FACTOR "140")
|
3330
|
+
endif()
|
3331
|
+
endif()
|
3332
|
+
if (NOT COTIRE_UNITY_BUILD_TARGET_SUFFIX)
|
3333
|
+
set (COTIRE_UNITY_BUILD_TARGET_SUFFIX "_unity")
|
3334
|
+
endif()
|
3335
|
+
if (NOT DEFINED COTIRE_TARGETS_FOLDER)
|
3336
|
+
set (COTIRE_TARGETS_FOLDER "cotire")
|
3337
|
+
endif()
|
3338
|
+
if (NOT DEFINED COTIRE_UNITY_OUTPUT_DIRECTORY)
|
3339
|
+
if ("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
3340
|
+
# generated Ninja build files do not work if the unity target produces the same output file as the cotired target
|
3341
|
+
set (COTIRE_UNITY_OUTPUT_DIRECTORY "unity")
|
3342
|
+
else()
|
3343
|
+
set (COTIRE_UNITY_OUTPUT_DIRECTORY "")
|
3344
|
+
endif()
|
3345
|
+
endif()
|
3346
|
+
|
3347
|
+
# define cotire cache variables
|
3348
|
+
|
3349
|
+
define_property(
|
3350
|
+
CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH"
|
3351
|
+
BRIEF_DOCS "Ignore headers from these directories when generating the prefix header."
|
3352
|
+
FULL_DOCS
|
3353
|
+
"The variable can be set to a semicolon separated list of include directories."
|
3354
|
+
"If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header."
|
3355
|
+
"If not defined, defaults to empty list."
|
3356
|
+
)
|
3357
|
+
|
3358
|
+
define_property(
|
3359
|
+
CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS"
|
3360
|
+
BRIEF_DOCS "Ignore includes with the listed file extensions from the generated prefix header."
|
3361
|
+
FULL_DOCS
|
3362
|
+
"The variable can be set to a semicolon separated list of file extensions."
|
3363
|
+
"If a header file extension matches one in the list, it will be excluded from the generated prefix header."
|
3364
|
+
"Includes with an extension in CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS are always ignored."
|
3365
|
+
"If not defined, defaults to inc;inl;ipp."
|
3366
|
+
)
|
3367
|
+
|
3368
|
+
define_property(
|
3369
|
+
CACHED_VARIABLE PROPERTY "COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS"
|
3370
|
+
BRIEF_DOCS "Exclude sources with the listed file extensions from the generated unity source."
|
3371
|
+
FULL_DOCS
|
3372
|
+
"The variable can be set to a semicolon separated list of file extensions."
|
3373
|
+
"If a source file extension matches one in the list, it will be excluded from the generated unity source file."
|
3374
|
+
"Source files with an extension in CMAKE_<LANG>_IGNORE_EXTENSIONS are always excluded."
|
3375
|
+
"If not defined, defaults to m;mm."
|
3376
|
+
)
|
3377
|
+
|
3378
|
+
define_property(
|
3379
|
+
CACHED_VARIABLE PROPERTY "COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES"
|
3380
|
+
BRIEF_DOCS "Minimum number of sources in target required to enable use of precompiled header."
|
3381
|
+
FULL_DOCS
|
3382
|
+
"The variable can be set to an integer > 0."
|
3383
|
+
"If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target."
|
3384
|
+
"If not defined, defaults to 3."
|
3385
|
+
)
|
3386
|
+
|
3387
|
+
define_property(
|
3388
|
+
CACHED_VARIABLE PROPERTY "COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES"
|
3389
|
+
BRIEF_DOCS "Maximum number of source files to include in a single unity source file."
|
3390
|
+
FULL_DOCS
|
3391
|
+
"This may be set to an integer >= 0."
|
3392
|
+
"If 0, cotire will only create a single unity source file."
|
3393
|
+
"If a target contains more than that number of source files, cotire will create multiple unity source files for it."
|
3394
|
+
"Can be set to \"-j\" to optimize the count of unity source files for the number of available processor cores."
|
3395
|
+
"Can be set to \"-j jobs\" to optimize the number of unity source files for the given number of simultaneous jobs."
|
3396
|
+
"Is used to initialize the target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES."
|
3397
|
+
"Defaults to \"-j\" for the generators Visual Studio, JOM or Ninja. Defaults to 0 otherwise."
|
3398
|
+
)
|
3399
|
+
|
3400
|
+
# define cotire directory properties
|
3401
|
+
|
3402
|
+
define_property(
|
3403
|
+
DIRECTORY PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER"
|
3404
|
+
BRIEF_DOCS "Modify build command of cotired targets added in this directory to make use of the generated precompiled header."
|
3405
|
+
FULL_DOCS
|
3406
|
+
"See target property COTIRE_ENABLE_PRECOMPILED_HEADER."
|
3407
|
+
)
|
3408
|
+
|
3409
|
+
define_property(
|
3410
|
+
DIRECTORY PROPERTY "COTIRE_ADD_UNITY_BUILD"
|
3411
|
+
BRIEF_DOCS "Add a new target that performs a unity build for cotired targets added in this directory."
|
3412
|
+
FULL_DOCS
|
3413
|
+
"See target property COTIRE_ADD_UNITY_BUILD."
|
3414
|
+
)
|
3415
|
+
|
3416
|
+
define_property(
|
3417
|
+
DIRECTORY PROPERTY "COTIRE_ADD_CLEAN"
|
3418
|
+
BRIEF_DOCS "Add a new target that cleans all cotire generated files for cotired targets added in this directory."
|
3419
|
+
FULL_DOCS
|
3420
|
+
"See target property COTIRE_ADD_CLEAN."
|
3421
|
+
)
|
3422
|
+
|
3423
|
+
define_property(
|
3424
|
+
DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH"
|
3425
|
+
BRIEF_DOCS "Ignore headers from these directories when generating the prefix header."
|
3426
|
+
FULL_DOCS
|
3427
|
+
"See target property COTIRE_PREFIX_HEADER_IGNORE_PATH."
|
3428
|
+
)
|
3429
|
+
|
3430
|
+
define_property(
|
3431
|
+
DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH"
|
3432
|
+
BRIEF_DOCS "Honor headers from these directories when generating the prefix header."
|
3433
|
+
FULL_DOCS
|
3434
|
+
"See target property COTIRE_PREFIX_HEADER_INCLUDE_PATH."
|
3435
|
+
)
|
3436
|
+
|
3437
|
+
define_property(
|
3438
|
+
DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH"
|
3439
|
+
BRIEF_DOCS "Header paths matching one of these directories are put at the top of the prefix header."
|
3440
|
+
FULL_DOCS
|
3441
|
+
"See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH."
|
3442
|
+
)
|
3443
|
+
|
3444
|
+
define_property(
|
3445
|
+
DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS"
|
3446
|
+
BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each source file."
|
3447
|
+
FULL_DOCS
|
3448
|
+
"See target property COTIRE_UNITY_SOURCE_PRE_UNDEFS."
|
3449
|
+
)
|
3450
|
+
|
3451
|
+
define_property(
|
3452
|
+
DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS"
|
3453
|
+
BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each source file."
|
3454
|
+
FULL_DOCS
|
3455
|
+
"See target property COTIRE_UNITY_SOURCE_POST_UNDEFS."
|
3456
|
+
)
|
3457
|
+
|
3458
|
+
define_property(
|
3459
|
+
DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES"
|
3460
|
+
BRIEF_DOCS "Maximum number of source files to include in a single unity source file."
|
3461
|
+
FULL_DOCS
|
3462
|
+
"See target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES."
|
3463
|
+
)
|
3464
|
+
|
3465
|
+
define_property(
|
3466
|
+
DIRECTORY PROPERTY "COTIRE_UNITY_LINK_LIBRARIES_INIT"
|
3467
|
+
BRIEF_DOCS "Define strategy for setting up the unity target's link libraries."
|
3468
|
+
FULL_DOCS
|
3469
|
+
"See target property COTIRE_UNITY_LINK_LIBRARIES_INIT."
|
3470
|
+
)
|
3471
|
+
|
3472
|
+
# define cotire target properties
|
3473
|
+
|
3474
|
+
define_property(
|
3475
|
+
TARGET PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER" INHERITED
|
3476
|
+
BRIEF_DOCS "Modify this target's build command to make use of the generated precompiled header."
|
3477
|
+
FULL_DOCS
|
3478
|
+
"If this property is set to TRUE, cotire will modify the build command to make use of the generated precompiled header."
|
3479
|
+
"Irrespective of the value of this property, cotire will setup custom commands to generate the unity source and prefix header for the target."
|
3480
|
+
"For makefile based generators cotire will also set up a custom target to manually invoke the generation of the precompiled header."
|
3481
|
+
"The target name will be set to this target's name with the suffix _pch appended."
|
3482
|
+
"Inherited from directory."
|
3483
|
+
"Defaults to TRUE."
|
3484
|
+
)
|
3485
|
+
|
3486
|
+
define_property(
|
3487
|
+
TARGET PROPERTY "COTIRE_ADD_UNITY_BUILD" INHERITED
|
3488
|
+
BRIEF_DOCS "Add a new target that performs a unity build for this target."
|
3489
|
+
FULL_DOCS
|
3490
|
+
"If this property is set to TRUE, cotire creates a new target of the same type that uses the generated unity source file instead of the target sources."
|
3491
|
+
"Most of the relevant target properties will be copied from this target to the new unity build target."
|
3492
|
+
"Target dependencies and linked libraries have to be manually set up for the new unity build target."
|
3493
|
+
"The unity target name will be set to this target's name with the suffix _unity appended."
|
3494
|
+
"Inherited from directory."
|
3495
|
+
"Defaults to TRUE."
|
3496
|
+
)
|
3497
|
+
|
3498
|
+
define_property(
|
3499
|
+
TARGET PROPERTY "COTIRE_ADD_CLEAN" INHERITED
|
3500
|
+
BRIEF_DOCS "Add a new target that cleans all cotire generated files for this target."
|
3501
|
+
FULL_DOCS
|
3502
|
+
"If this property is set to TRUE, cotire creates a new target that clean all files (unity source, prefix header, precompiled header)."
|
3503
|
+
"The clean target name will be set to this target's name with the suffix _clean_cotire appended."
|
3504
|
+
"Inherited from directory."
|
3505
|
+
"Defaults to FALSE."
|
3506
|
+
)
|
3507
|
+
|
3508
|
+
define_property(
|
3509
|
+
TARGET PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH" INHERITED
|
3510
|
+
BRIEF_DOCS "Ignore headers from these directories when generating the prefix header."
|
3511
|
+
FULL_DOCS
|
3512
|
+
"The property can be set to a list of directories."
|
3513
|
+
"If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header."
|
3514
|
+
"Inherited from directory."
|
3515
|
+
"If not set, this property is initialized to \${CMAKE_SOURCE_DIR};\${CMAKE_BINARY_DIR}."
|
3516
|
+
)
|
3517
|
+
|
3518
|
+
define_property(
|
3519
|
+
TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH" INHERITED
|
3520
|
+
BRIEF_DOCS "Honor headers from these directories when generating the prefix header."
|
3521
|
+
FULL_DOCS
|
3522
|
+
"The property can be set to a list of directories."
|
3523
|
+
"If a header file is found in one of these directories or sub-directories, it will be included in the generated prefix header."
|
3524
|
+
"If a header file is both selected by COTIRE_PREFIX_HEADER_IGNORE_PATH and COTIRE_PREFIX_HEADER_INCLUDE_PATH,"
|
3525
|
+
"the option which yields the closer relative path match wins."
|
3526
|
+
"Inherited from directory."
|
3527
|
+
"If not set, this property is initialized to the empty list."
|
3528
|
+
)
|
3529
|
+
|
3530
|
+
define_property(
|
3531
|
+
TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" INHERITED
|
3532
|
+
BRIEF_DOCS "Header paths matching one of these directories are put at the top of prefix header."
|
3533
|
+
FULL_DOCS
|
3534
|
+
"The property can be set to a list of directories."
|
3535
|
+
"Header file paths matching one of these directories will be inserted at the beginning of the generated prefix header."
|
3536
|
+
"Header files are sorted according to the order of the directories in the property."
|
3537
|
+
"If not set, this property is initialized to the empty list."
|
3538
|
+
)
|
3539
|
+
|
3540
|
+
define_property(
|
3541
|
+
TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED
|
3542
|
+
BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file."
|
3543
|
+
FULL_DOCS
|
3544
|
+
"This may be set to a semicolon-separated list of preprocessor symbols."
|
3545
|
+
"cotire will add corresponding #undef directives to the generated unit source file before each target source file."
|
3546
|
+
"Inherited from directory."
|
3547
|
+
"Defaults to empty string."
|
3548
|
+
)
|
3549
|
+
|
3550
|
+
define_property(
|
3551
|
+
TARGET PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" INHERITED
|
3552
|
+
BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each target source file."
|
3553
|
+
FULL_DOCS
|
3554
|
+
"This may be set to a semicolon-separated list of preprocessor symbols."
|
3555
|
+
"cotire will add corresponding #undef directives to the generated unit source file after each target source file."
|
3556
|
+
"Inherited from directory."
|
3557
|
+
"Defaults to empty string."
|
3558
|
+
)
|
3559
|
+
|
3560
|
+
define_property(
|
3561
|
+
TARGET PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES" INHERITED
|
3562
|
+
BRIEF_DOCS "Maximum number of source files to include in a single unity source file."
|
3563
|
+
FULL_DOCS
|
3564
|
+
"This may be set to an integer > 0."
|
3565
|
+
"If a target contains more than that number of source files, cotire will create multiple unity build files for it."
|
3566
|
+
"If not set, cotire will only create a single unity source file."
|
3567
|
+
"Inherited from directory."
|
3568
|
+
"Defaults to empty."
|
3569
|
+
)
|
3570
|
+
|
3571
|
+
define_property(
|
3572
|
+
TARGET PROPERTY "COTIRE_<LANG>_UNITY_SOURCE_INIT"
|
3573
|
+
BRIEF_DOCS "User provided unity source file to be used instead of the automatically generated one."
|
3574
|
+
FULL_DOCS
|
3575
|
+
"If set, cotire will only add the given file(s) to the generated unity source file."
|
3576
|
+
"If not set, cotire will add all the target source files to the generated unity source file."
|
3577
|
+
"The property can be set to a user provided unity source file."
|
3578
|
+
"Defaults to empty."
|
3579
|
+
)
|
3580
|
+
|
3581
|
+
define_property(
|
3582
|
+
TARGET PROPERTY "COTIRE_<LANG>_PREFIX_HEADER_INIT"
|
3583
|
+
BRIEF_DOCS "User provided prefix header file to be used instead of the automatically generated one."
|
3584
|
+
FULL_DOCS
|
3585
|
+
"If set, cotire will add the given header file(s) to the generated prefix header file."
|
3586
|
+
"If not set, cotire will generate a prefix header by tracking the header files included by the unity source file."
|
3587
|
+
"The property can be set to a user provided prefix header file (e.g., stdafx.h)."
|
3588
|
+
"Defaults to empty."
|
3589
|
+
)
|
3590
|
+
|
3591
|
+
define_property(
|
3592
|
+
TARGET PROPERTY "COTIRE_UNITY_LINK_LIBRARIES_INIT" INHERITED
|
3593
|
+
BRIEF_DOCS "Define strategy for setting up unity target's link libraries."
|
3594
|
+
FULL_DOCS
|
3595
|
+
"If this property is empty or set to NONE, the generated unity target's link libraries have to be set up manually."
|
3596
|
+
"If this property is set to COPY, the unity target's link libraries will be copied from this target."
|
3597
|
+
"If this property is set to COPY_UNITY, the unity target's link libraries will be copied from this target with considering existing unity targets."
|
3598
|
+
"Inherited from directory."
|
3599
|
+
"Defaults to empty."
|
3600
|
+
)
|
3601
|
+
|
3602
|
+
define_property(
|
3603
|
+
TARGET PROPERTY "COTIRE_<LANG>_UNITY_SOURCE"
|
3604
|
+
BRIEF_DOCS "Read-only property. The generated <LANG> unity source file(s)."
|
3605
|
+
FULL_DOCS
|
3606
|
+
"cotire sets this property to the path of the generated <LANG> single computation unit source file for the target."
|
3607
|
+
"Defaults to empty string."
|
3608
|
+
)
|
3609
|
+
|
3610
|
+
define_property(
|
3611
|
+
TARGET PROPERTY "COTIRE_<LANG>_PREFIX_HEADER"
|
3612
|
+
BRIEF_DOCS "Read-only property. The generated <LANG> prefix header file."
|
3613
|
+
FULL_DOCS
|
3614
|
+
"cotire sets this property to the full path of the generated <LANG> language prefix header for the target."
|
3615
|
+
"Defaults to empty string."
|
3616
|
+
)
|
3617
|
+
|
3618
|
+
define_property(
|
3619
|
+
TARGET PROPERTY "COTIRE_<LANG>_PRECOMPILED_HEADER"
|
3620
|
+
BRIEF_DOCS "Read-only property. The generated <LANG> precompiled header file."
|
3621
|
+
FULL_DOCS
|
3622
|
+
"cotire sets this property to the full path of the generated <LANG> language precompiled header binary for the target."
|
3623
|
+
"Defaults to empty string."
|
3624
|
+
)
|
3625
|
+
|
3626
|
+
define_property(
|
3627
|
+
TARGET PROPERTY "COTIRE_UNITY_TARGET_NAME"
|
3628
|
+
BRIEF_DOCS "The name of the generated unity build target corresponding to this target."
|
3629
|
+
FULL_DOCS
|
3630
|
+
"This property can be set to the desired name of the unity target that will be created by cotire."
|
3631
|
+
"If not set, the unity target name will be set to this target's name with the suffix _unity appended."
|
3632
|
+
"After this target has been processed by cotire, the property is set to the actual name of the generated unity target."
|
3633
|
+
"Defaults to empty string."
|
3634
|
+
)
|
3635
|
+
|
3636
|
+
# define cotire source properties
|
3637
|
+
|
3638
|
+
define_property(
|
3639
|
+
SOURCE PROPERTY "COTIRE_EXCLUDED"
|
3640
|
+
BRIEF_DOCS "Do not modify source file's build command."
|
3641
|
+
FULL_DOCS
|
3642
|
+
"If this property is set to TRUE, the source file's build command will not be modified to make use of the precompiled header."
|
3643
|
+
"The source file will also be excluded from the generated unity source file."
|
3644
|
+
"Source files that have their COMPILE_FLAGS property set will be excluded by default."
|
3645
|
+
"Defaults to FALSE."
|
3646
|
+
)
|
3647
|
+
|
3648
|
+
define_property(
|
3649
|
+
SOURCE PROPERTY "COTIRE_DEPENDENCY"
|
3650
|
+
BRIEF_DOCS "Add this source file to dependencies of the automatically generated prefix header file."
|
3651
|
+
FULL_DOCS
|
3652
|
+
"If this property is set to TRUE, the source file is added to dependencies of the generated prefix header file."
|
3653
|
+
"If the file is modified, cotire will re-generate the prefix header source upon build."
|
3654
|
+
"Defaults to FALSE."
|
3655
|
+
)
|
3656
|
+
|
3657
|
+
define_property(
|
3658
|
+
SOURCE PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS"
|
3659
|
+
BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of this source file."
|
3660
|
+
FULL_DOCS
|
3661
|
+
"This may be set to a semicolon-separated list of preprocessor symbols."
|
3662
|
+
"cotire will add corresponding #undef directives to the generated unit source file before this file is included."
|
3663
|
+
"Defaults to empty string."
|
3664
|
+
)
|
3665
|
+
|
3666
|
+
define_property(
|
3667
|
+
SOURCE PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS"
|
3668
|
+
BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of this source file."
|
3669
|
+
FULL_DOCS
|
3670
|
+
"This may be set to a semicolon-separated list of preprocessor symbols."
|
3671
|
+
"cotire will add corresponding #undef directives to the generated unit source file after this file is included."
|
3672
|
+
"Defaults to empty string."
|
3673
|
+
)
|
3674
|
+
|
3675
|
+
define_property(
|
3676
|
+
SOURCE PROPERTY "COTIRE_START_NEW_UNITY_SOURCE"
|
3677
|
+
BRIEF_DOCS "Start a new unity source file which includes this source file as the first one."
|
3678
|
+
FULL_DOCS
|
3679
|
+
"If this property is set to TRUE, cotire will complete the current unity file and start a new one."
|
3680
|
+
"The new unity source file will include this source file as the first one."
|
3681
|
+
"This property essentially works as a separator for unity source files."
|
3682
|
+
"Defaults to FALSE."
|
3683
|
+
)
|
3684
|
+
|
3685
|
+
define_property(
|
3686
|
+
SOURCE PROPERTY "COTIRE_TARGET"
|
3687
|
+
BRIEF_DOCS "Read-only property. Mark this source file as cotired for the given target."
|
3688
|
+
FULL_DOCS
|
3689
|
+
"cotire sets this property to the name of target, that the source file's build command has been altered for."
|
3690
|
+
"Defaults to empty string."
|
3691
|
+
)
|
3692
|
+
|
3693
|
+
message (STATUS "cotire ${COTIRE_CMAKE_MODULE_VERSION} loaded.")
|
3694
|
+
|
3695
|
+
endif()
|