### Install and Run Vespa Client Source: https://github.com/vespa-engine/vespa/blob/master/client/js/app/README.md Instructions for installing Node.js dependencies and starting the Vespa client development server. ```bash nvm install --lts node # in case the installed node.js is too old yarn install yarn dev # then open link, like http://127.0.0.1:3000/ ``` ```bash docker run -v `pwd`:/w -w /w --publish 3000:3000 node:lts sh -c 'yarn install && yarn dev --host' ``` -------------------------------- ### Install Logserver Start Script Source: https://github.com/vespa-engine/vespa/blob/master/logserver/CMakeLists.txt Installs the logserver start script to the Vespa bin directory. This makes the script executable for starting the logserver. ```cmake vespa_install_script(bin/logserver-start.sh vespa-logserver-start bin) ``` -------------------------------- ### Install Configuration Definition Source: https://github.com/vespa-engine/vespa/blob/master/document/src/vespa/document/config/CMakeLists.txt Installs a configuration definition file. ```cmake install_config_definition(documenttypes.def document.documenttypes.def) ``` -------------------------------- ### Install Java Tools with Homebrew Source: https://github.com/vespa-engine/vespa/blob/master/README.md Installs OpenJDK 17, Maven Version Manager, and jEnv using Homebrew. Ensure Homebrew is installed first. ```sh brew install jenv mvnvm openjdk@17 ``` -------------------------------- ### Basic VespaContainer Setup in JUnit Test Source: https://github.com/vespa-engine/vespa/blob/master/integration/vespa-testcontainers/README.md Example of setting up and tearing down a VespaContainer for use in JUnit 5 tests. Ensure Docker or Podman is running. ```java import ai.vespa.testcontainers.VespaContainer; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; class MySearchTest { static VespaContainer vespa; // Other containers etc. @BeforeAll static void setUp() { vespa = new VespaContainer().withApplicationPackage("app"); vespa.start(); // feed documents, set up clients, etc. } @Test void testOne() { ... } @Test void testTwo() { ... } @AfterAll static void tearDown() { vespa.close(); // Close other containers, clients, etc. } } ``` -------------------------------- ### Install Configuration XML Source: https://github.com/vespa-engine/vespa/blob/master/config-model-fat/CMakeLists.txt Installs the config-models.xml file to the destination conf/configserver-app. ```cmake install(FILES src/main/resources/config-models.xml DESTINATION conf/configserver-app) ``` -------------------------------- ### Install JAR file Source: https://github.com/vespa-engine/vespa/blob/master/config-model-fat/CMakeLists.txt Installs the config-model-fat.jar file into the build. ```cmake install_jar(config-model-fat.jar) ``` -------------------------------- ### Start Logstash with Configuration Source: https://github.com/vespa-engine/vespa/blob/master/integration/logstash-plugins/logstash-output-vespa/README.md Start Logstash by pointing it to your Logstash configuration file. ```bash bin/logstash -f logstash.conf ``` -------------------------------- ### Install JAR file Source: https://github.com/vespa-engine/vespa/blob/master/config-proxy/CMakeLists.txt Installs a JAR file for the configuration proxy. This is typically done during the build process. ```cmake install_jar(config-proxy-jar-with-dependencies.jar) ``` -------------------------------- ### Install Document Manager Definition Source: https://github.com/vespa-engine/vespa/blob/master/document/src/vespa/document/config/CMakeLists.txt Installs the document manager configuration definition file. ```cmake install_config_definition(documentmanager.def document.config.documentmanager.def) ``` -------------------------------- ### Install JAR File Source: https://github.com/vespa-engine/vespa/blob/master/config-model/CMakeLists.txt Installs a JAR file, typically a dependency, into the build environment. ```cmake install_jar(config-model-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/cloud/tenant-cd-api/CMakeLists.txt Installs the tenant-cd-api-jar-with-dependencies.jar. This is typically used to make the JAR available for the build or deployment. ```cmake install_jar(tenant-cd-api-jar-with-dependencies.jar) ``` -------------------------------- ### Example QEMU Emulation Output Source: https://github.com/vespa-engine/vespa/blob/master/vespalib/src/vespa/vespalib/hwaccelerated/README.md This is an example of the output when running the test application with QEMU emulating a 512-bit vector width. ```text $ qemu-aarch64 -cpu max,sve-default-vector-length=64 ./vespalib_hwaccelerated_test_app [==========] Running 2 tests from 1 test suite. [----------] Global test environment set-up. [----------] 2 tests from HwAcceleratedTest Testing accelerators: AutoVec - NEON AutoVec - NEON_FP16_DOTPROD Highway - SVE2 (512 bit vector width) Highway - SVE (512 bit vector width) Highway - NEON_BF16 (128 bit vector width) Highway - NEON (128 bit vector width) [ RUN ] HwAcceleratedTest.euclidean_distance_impls_match_source_of_truth [ OK ] HwAcceleratedTest.euclidean_distance_impls_match_source_of_truth (3079 ms) [ RUN ] HwAcceleratedTest.dot_product_impls_match_source_of_truth [ OK ] HwAcceleratedTest.dot_product_impls_match_source_of_truth (3651 ms) [----------] 2 tests from HwAcceleratedTest (6731 ms total) ``` -------------------------------- ### Install Header Files Source: https://github.com/vespa-engine/vespa/blob/master/defaults/src/vespa/CMakeLists.txt Installs the 'defaults.h' and the generated 'config.h' header files into the Vespa include directory. ```cmake install(FILES defaults.h DESTINATION include/vespa) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/vespa) ``` -------------------------------- ### Install Vespa Configuration Definitions Source: https://github.com/vespa-engine/vespa/blob/master/config-provisioning/CMakeLists.txt Installs the Vespa configuration definitions. ```cmake install_config_definitions() ``` -------------------------------- ### Install JAR File Source: https://github.com/vespa-engine/vespa/blob/master/clustercontroller-core/CMakeLists.txt Installs a JAR file with its dependencies. This is typically used for build system configurations. ```cmake install_jar(clustercontroller-core-jar-with-dependencies.jar) ``` -------------------------------- ### Install Feed Client JAR Source: https://github.com/vespa-engine/vespa/blob/master/vespa-feed-client-cli/CMakeLists.txt Installs the Vespa Feed Client JAR file with its dependencies. ```cmake install_jar(vespa-feed-client-cli-jar-with-dependencies.jar) ``` -------------------------------- ### Benchmark Execution Commands Source: https://github.com/vespa-engine/vespa/blob/master/vespalib/src/tests/dotproduct/CMakeLists.txt Provides example commands for running the dot product benchmark with different configurations and parameters. ```shell # benchmark: dotproductbenchmark # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark sparse-ordered 1000 1000 1000 1000 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark sparse-unordered 1000 1000 1000 1000 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark full 1000 1000 1000 1000 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark sparse-ordered 1000 1000 100 1000 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark sparse-unordered 1000 1000 100 1000 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark full 1000 1000 100 1000 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark sparse-ordered 1000 1000 1000 100 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark sparse-unordered 1000 1000 1000 100 # $(HIDE)$(LDL) time $(VALGRIND) ./dotproductbenchmark full 1000 1000 1000 100 ``` -------------------------------- ### Install Logging Properties Source: https://github.com/vespa-engine/vespa/blob/master/vespa-feed-client-cli/CMakeLists.txt Installs the logging.properties file to the conf directory for the Vespa Feed Client. ```cmake install(FILES src/main/resources/logging.properties DESTINATION conf/vespa-feed-client) ``` -------------------------------- ### Install Logserver JAR Source: https://github.com/vespa-engine/vespa/blob/master/logserver/CMakeLists.txt Installs the logserver JAR file. Ensure the JAR file is available in the build environment. ```cmake install_jar(logserver-jar-with-dependencies.jar) ``` -------------------------------- ### Install HTTP Client JAR Source: https://github.com/vespa-engine/vespa/blob/master/http-client/CMakeLists.txt Installs the necessary JAR file for the HTTP client. Ensure the JAR file is available in the build environment. ```cmake install_jar(http-client-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR File Source: https://github.com/vespa-engine/vespa/blob/master/container-onnxruntime/CMakeLists.txt Installs the specified JAR file into the container. This is typically done during the build process to make the library available. ```cmake install_jar(container-onnxruntime.jar) ``` -------------------------------- ### Install ZKFacade JAR Source: https://github.com/vespa-engine/vespa/blob/master/zkfacade/CMakeLists.txt Installs the ZKFacade JAR file with its dependencies. This is typically done during the build process. ```cmake install_jar(zkfacade-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR File Source: https://github.com/vespa-engine/vespa/blob/master/container-spifly/CMakeLists.txt Installs a specified JAR file into the container. This is typically used for deploying custom libraries or components. ```cmake install_jar(container-spifly.jar) ``` -------------------------------- ### Install Feed Client Script Source: https://github.com/vespa-engine/vespa/blob/master/vespa-feed-client-cli/CMakeLists.txt Installs the Vespa Feed Client shell script to the bin directory. ```cmake vespa_install_script(src/main/sh/vespa-feed-client.sh vespa-feed-client bin) ``` -------------------------------- ### Install Cloud Tenant CD JAR Source: https://github.com/vespa-engine/vespa/blob/master/cloud/cloud-tenant-cd/CMakeLists.txt Installs the cloud-tenant-cd-jar-with-dependencies.jar. This is a build-time dependency required for the Cloud Tenant CD component. ```cmake install_jar(cloud-tenant-cd-jar-with-dependencies.jar) ``` -------------------------------- ### Add Test for Current Index Setup Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/expression/current_index_setup/CMakeLists.txt Registers the 'searchlib_current_index_setup_test_app' executable as a test case to be run by the testing framework. This ensures the current index setup logic is verified. ```cmake vespa_add_test(NAME searchlib_current_index_setup_test_app COMMAND searchlib_current_index_setup_test_app) ``` -------------------------------- ### Install Zookeeper JAR Source: https://github.com/vespa-engine/vespa/blob/master/zookeeper-server/zookeeper-server/CMakeLists.txt Installs the Zookeeper server JAR file with dependencies. This is a prerequisite for running Zookeeper. ```cmake install_jar(zookeeper-server-3.9.5-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/linguistics-components/CMakeLists.txt Installs a JAR file along with its dependencies. Use this to make external libraries available to the project. ```cmake install_jar(linguistics-components-jar-with-dependencies.jar) ``` -------------------------------- ### Install VSM Summary Configuration Definition Source: https://github.com/vespa-engine/vespa/blob/master/streamingvisitors/src/vespa/vsm/config/CMakeLists.txt Installs the generated vsmsummary.def file to the Vespa configuration path. This makes the summary configuration available to the Vespa configuration system. ```cmake install_config_definition(vsmsummary.def vespa.config.search.vsm.vsmsummary.def) ``` -------------------------------- ### Install Metrics Proxy JAR Source: https://github.com/vespa-engine/vespa/blob/master/metrics-proxy/CMakeLists.txt Installs the metrics proxy JAR file, including its dependencies, into the build environment. ```cmake install_jar(metrics-proxy-jar-with-dependencies.jar) ``` -------------------------------- ### Install security-utils JAR Source: https://github.com/vespa-engine/vespa/blob/master/security-utils/CMakeLists.txt Installs the security-utils.jar file. This is typically used in build systems like CMake to make the utility available. ```cmake install_jar(security-utils.jar) ``` -------------------------------- ### Start Vespa Grammar Playground Development Server Source: https://github.com/vespa-engine/vespa/blob/master/integration/tmgrammar/README.md Starts a local development server for the browser-based playground, which visualizes `.sd` file colorization across VS Code themes. Requires Node.js 18+. ```bash cd playground && npm install && npm run dev ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/config-model-api/CMakeLists.txt Installs a JAR file containing dependencies for the config model API. ```cmake install_jar(config-model-api-jar-with-dependencies.jar) ``` -------------------------------- ### Install a Shell Script Source: https://github.com/vespa-engine/vespa/blob/master/README-cmake.md Use `vespa_install_script` to copy a shell script to a specified destination directory under the install prefix, ensuring it has executable permissions. An optional second argument can rename the script during installation. ```cmake vespa_install_script( [] ) ``` -------------------------------- ### Install VSCode Extension Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/integration/schema-language-server/README.md Install the necessary Node.js dependencies for the VSCode extension before running it. ```bash npm install ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/container-search-and-docproc/CMakeLists.txt Installs a JAR file along with its dependencies. This is typically used for plugins or libraries that need to be available at runtime. ```cmake install_jar(container-search-and-docproc-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR File Source: https://github.com/vespa-engine/vespa/blob/master/container-llama/CMakeLists.txt Installs the specified JAR file into the build environment. This is typically used for including external libraries or modules. ```cmake install_jar(container-llama.jar) ``` -------------------------------- ### Install Apache HTTP Client Bundle Source: https://github.com/vespa-engine/vespa/blob/master/container-apache-http-client-bundle/CMakeLists.txt Installs the Apache HTTP client bundle JAR with its dependencies. This is typically done during the build or deployment process. ```cmake install_jar(container-apache-http-client-bundle-jar-with-dependencies.jar) ``` -------------------------------- ### Install BATS Testing Framework Source: https://github.com/vespa-engine/vespa/blob/master/README.md Installs Node.js and the BATS testing framework along with its essential plugins using npm. ```bash brew install node sudo npm install -g bats bats-assert bats-support bats-mock ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/jdisc_core/CMakeLists.txt Installs a JAR file along with its dependencies. This is typically used for packaging and deploying applications. ```cmake install_jar(jdisc_core-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR File Source: https://github.com/vespa-engine/vespa/blob/master/model-integration/CMakeLists.txt Installs a specified JAR file into the Vespa environment. Ensure the JAR file exists at the specified path. ```cmake install_jar(model-integration-jar-with-dependencies.jar) ``` -------------------------------- ### Install Vespa JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/config-provisioning/CMakeLists.txt Installs the Vespa configuration provisioning JAR file along with its dependencies. ```cmake install_jar(config-provisioning-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/clustercontroller-reindexer/CMakeLists.txt Installs a JAR file along with its dependencies. This is typically used for packaging applications or libraries. ```cmake install_jar(clustercontroller-reindexer-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/configserver-flags/CMakeLists.txt Installs a JAR file that includes all its dependencies. This is typically used for packaging applications or libraries. ```cmake install_jar(configserver-flags-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/flags/CMakeLists.txt Installs a JAR file that includes all its dependencies. This is typically used for plugins or libraries that need to be self-contained. ```cmake install_jar(flags-jar-with-dependencies.jar) ``` -------------------------------- ### Install Directory with Exclusions Source: https://github.com/vespa-engine/vespa/blob/master/config-model/CMakeLists.txt Installs a directory and its contents, excluding specific files like .gitignore and version files. ```cmake install(DIRECTORY src/main/resources/schema DESTINATION share/vespa PATTERN ".gitignore" EXCLUDE PATTERN "version" EXCLUDE) ``` -------------------------------- ### Install JAR file with install_jar Source: https://github.com/vespa-engine/vespa/blob/master/vespajlib/CMakeLists.txt Installs a JAR file into the build system. This is typically used for libraries that need to be available during the build process. ```cmake install_jar(vespajlib.jar) ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/clustercontroller-utils/CMakeLists.txt Installs a JAR file containing cluster controller utilities and their dependencies. This is typically done during the build process to make the utilities available. ```cmake install_jar(clustercontroller-utils-jar-with-dependencies.jar) ``` -------------------------------- ### Install EchoModelBuilder Source: https://github.com/vespa-engine/vespa/blob/master/config-lib/doc/cloudconfig-model-plugins.html Configuration to load the EchoModelBuilder plugin on the configserver host. ```xml ``` -------------------------------- ### Install JAR with Dependencies Source: https://github.com/vespa-engine/vespa/blob/master/model-evaluation/CMakeLists.txt Installs a JAR file containing model evaluation components and their dependencies into the Vespa application. ```cmake install_jar(model-evaluation-jar-with-dependencies.jar) ``` -------------------------------- ### Install Logstash Input Plugin for Vespa Source: https://github.com/vespa-engine/vespa/blob/master/integration/logstash-plugins/logstash-input-vespa/README.md Install the plugin using the Logstash plugin manager. ```bash bin/logstash-plugin install logstash-input-vespa ``` -------------------------------- ### Install Standalone Container JAR Source: https://github.com/vespa-engine/vespa/blob/master/standalone-container/CMakeLists.txt Installs the Vespa standalone container JAR file with all its dependencies. ```cmake install_jar(standalone-container-jar-with-dependencies.jar) ``` -------------------------------- ### Install Directory to Specific Version Path Source: https://github.com/vespa-engine/vespa/blob/master/config-model/CMakeLists.txt Installs a directory to a version-specific path, excluding .gitignore and version files. ```cmake install(DIRECTORY src/main/resources/schema DESTINATION share/vespa/schema/version/8.x PATTERN ".gitignore" EXCLUDE PATTERN "version" EXCLUDE) ``` -------------------------------- ### Field Match Benchmark Configuration Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/features/benchmark/fieldmatch/readme.txt Example configuration file format for the benchmark. 'x' denotes field length and 'y' is maxAlternativeSegmentations. ```plaintext c-x-y.txt ``` -------------------------------- ### Install Configuration File Source: https://github.com/vespa-engine/vespa/blob/master/model-integration/CMakeLists.txt Installs a configuration XML file to the specified destination within the Vespa configuration directory. This is used for application configuration. ```cmake install(FILES src/main/config/model-integration.xml DESTINATION conf/configserver-app) ``` -------------------------------- ### Retrieve Config using vespa-get-config Source: https://github.com/vespa-engine/vespa/blob/master/config-lib/doc/cloudconfig-model-plugins.html Example command to retrieve configuration using the vespa-get-config tool. ```bash $ vespa-get-config -n echo.echo -i echo/server -a path/to/echo.def ``` -------------------------------- ### Install Vespa Client Container Plugin Source: https://github.com/vespa-engine/vespa/blob/master/vespaclient-container-plugin/CMakeLists.txt Installs the Vespa client container plugin JAR file. This is typically used in a CMakeLists.txt file to make the plugin available. ```cmake install_jar(vespaclient-container-plugin-jar-with-dependencies.jar) ``` -------------------------------- ### Install JAR Dependency Source: https://github.com/vespa-engine/vespa/blob/master/hosted-zone-api/CMakeLists.txt Installs a JAR file with its dependencies. Ensure the JAR file exists in the build path. ```cmake install_jar(hosted-zone-api-jar-with-dependencies.jar) ``` -------------------------------- ### Verify Java and Maven Configuration Source: https://github.com/vespa-engine/vespa/blob/master/README.md Checks the Java and Maven versions to confirm the setup. The output should reflect the configured JDK and Maven versions. ```sh mvn -v ``` -------------------------------- ### Add Vespa fnet Example Executable and Test Source: https://github.com/vespa-engine/vespa/blob/master/fnet/src/tests/examples/CMakeLists.txt Configures a test executable for fnet examples, linking against the vespa_fnet library and Google Test. It also sets up a test to run this executable. ```cmake vespa_add_executable(fnet_examples_test_app TEST SOURCES examples_test.cpp DEPENDS vespa_fnet GTest::gtest ) vespa_add_test(NAME fnet_examples_test_app NO_VALGRIND COMMAND fnet_examples_test_app) ``` -------------------------------- ### Install Absolute Symlink Source: https://github.com/vespa-engine/vespa/blob/master/storageserver/src/apps/storaged/CMakeLists.txt Creates an absolute symbolic link for the storaged binary, aliasing it to vespa-distributord-bin. ```cmake install_absolute_symlink(vespa-storaged-bin sbin/vespa-distributord-bin) ``` -------------------------------- ### Build and Install Logstash Vespa Plugin Source: https://github.com/vespa-engine/vespa/blob/master/integration/logstash-plugins/logstash-output-vespa/README.md Steps to build the Logstash Vespa output plugin as a gem, run tests, and install it locally for development. ```bash # build the gem ./gradlew gem # run tests ./gradlew test # install it as a Logstash plugin /opt/logstash/bin/logstash-plugin install /path/to/logstash-output-vespa/logstash-output-vespa_feed-1.0.0.gem # profit /opt/logstash/bin/logstash ``` -------------------------------- ### Install VSM Core Configuration Definition Source: https://github.com/vespa-engine/vespa/blob/master/streamingvisitors/src/vespa/vsm/config/CMakeLists.txt Installs the generated vsm.def file to the Vespa configuration path. This makes the core VSM configuration available to the Vespa configuration system. ```cmake install_config_definition(vsm.def vespa.config.search.vsm.vsm.def) ``` -------------------------------- ### Install Logstash Vespa Output Plugin Source: https://github.com/vespa-engine/vespa/blob/master/integration/logstash-plugins/logstash-output-vespa/README.md Install the Logstash Vespa output plugin using the Logstash plugin manager. ```bash bin/logstash-plugin install logstash-output-vespa_feed ``` -------------------------------- ### Add Vespa OTel Collector Executable Source: https://github.com/vespa-engine/vespa/blob/master/logforwarder/src/apps/vespa-otelcol-start/CMakeLists.txt Defines the executable for the Vespa OpenTelemetry Collector start application. Specifies source files, output name, installation path, and build dependencies. ```cmake vespa_add_executable(otelcol_start_app SOURCES main.cpp cf-handler.cpp child-handler.cpp file-watcher.cpp wrapper.cpp OUTPUT_NAME vespa-otelcol-start INSTALL bin DEPENDS vespa_config vespa_configdefinitions vespalib ) ``` -------------------------------- ### Configure Shell for jEnv Source: https://github.com/vespa-engine/vespa/blob/master/README.md Configures the shell environment for jEnv by adding it to the PATH and initializing it. This example is for zsh. ```sh echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc echo 'eval "$(jenv init -)"' >> ~/.zshrc eval "$(jenv init -)" jenv enable-plugin export exec $SHELL -l ``` -------------------------------- ### Install Vespa Scripts Source: https://github.com/vespa-engine/vespa/blob/master/container-disc/CMakeLists.txt Installs Vespa-specific shell scripts to their designated locations within the Vespa installation directory. These scripts are essential for various Vespa operations. ```cmake vespa_install_script(src/main/sh/find-pid libexec/vespa) ``` ```cmake vespa_install_script(src/main/sh/vespa-load-balancer-status libexec/vespa) ``` ```cmake vespa_install_script(src/main/sh/vespa-jvm-dumper bin) ``` -------------------------------- ### Generate and Install Logd Configuration Source: https://github.com/vespa-engine/vespa/blob/master/logd/src/logd/CMakeLists.txt Generates configuration files for the logd module and installs them to the cloud.config.log namespace. This is essential for logd's runtime configuration. ```cmake vespa_generate_config(logd ../main/resources/configdefinitions/logd.def) install_config_definition(../main/resources/configdefinitions/logd.def cloud.config.log.logd.def) ``` -------------------------------- ### Install JAR Dependency Source: https://github.com/vespa-engine/vespa/blob/master/predicate-search/CMakeLists.txt Installs a JAR file required for the predicate search component. Ensure the JAR file exists in the same directory or provide a correct path. ```cmake install_jar(predicate-search-jar-with-dependencies.jar) ``` -------------------------------- ### Retrieve Configuration using C++ API Source: https://github.com/vespa-engine/vespa/blob/master/config-lib/doc/configapi-dev-cpp.html After subscribing, use ConfigHandle to get the current configuration. This method guarantees a correct config if subscription succeeded and valid configs were returned. ```cpp std::unique_ptr cfg = handle->getConfig(); ``` -------------------------------- ### Install VSM Field Configuration Definition Source: https://github.com/vespa-engine/vespa/blob/master/streamingvisitors/src/vespa/vsm/config/CMakeLists.txt Installs the generated vsmfields.def file to the Vespa configuration path. This makes the field definitions available to the Vespa configuration system. ```cmake install_config_definition(vsmfields.def vespa.config.search.vsm.vsmfields.def) ``` -------------------------------- ### Add Executable for Current Index Setup Test Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/expression/current_index_setup/CMakeLists.txt Defines a test executable for the current index setup functionality. It specifies the source files, dependencies, and links against the vespa_searchlib and GTest libraries. ```cmake vespa_add_executable(searchlib_current_index_setup_test_app TEST SOURCES current_index_setup_test.cpp DEPENDS vespa_searchlib GTest::gtest ) ``` -------------------------------- ### Configure Ranking Expression Benchmark Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/features/benchmark/rankingexpression/c-5.txt Set up benchmark parameters for ranking expressions. Specify the ranking script and number of runs. ```text case=rankingExpression feature=rankingExpression numruns=1000000 rankingExpression.rankingScript=1+1+1+1+1 ``` -------------------------------- ### Install OpenTelemetry JAR Source: https://github.com/vespa-engine/vespa/blob/master/container-opentelemetry/CMakeLists.txt Installs the specified OpenTelemetry JAR file, including its dependencies, into the Vespa container build. Ensure the JAR file name matches the one generated by your build system. ```cmake install_jar(container-opentelemetry-jar-with-dependencies.jar) ``` -------------------------------- ### Configure Tokenizer with Custom Parameters Source: https://github.com/vespa-engine/vespa/blob/master/lucene-linguistics/README.md Example of configuring a tokenizer with custom parameters, such as 'standard' tokenizer with 'maxTokenLength'. This is used within the linguistics configuration. ```xml standard 255 ``` -------------------------------- ### Add Executable for fsainfo Application Source: https://github.com/vespa-engine/vespa/blob/master/fsa/src/apps/fsainfo/CMakeLists.txt Configures the build system to create an executable for the fsainfo application. It specifies source files, output name, installation directory, and dependencies. ```cmake vespa_add_executable(fsa_fsainfo_app SOURCES fsainfo.cpp OUTPUT_NAME vespa-fsainfo INSTALL bin DEPENDS vespafsa ) ``` -------------------------------- ### Install Standalone Container Script Source: https://github.com/vespa-engine/vespa/blob/master/standalone-container/CMakeLists.txt Installs the standalone container shell script to the Vespa executable directory. ```cmake install(PROGRAMS src/main/sh/standalone-container.sh DESTINATION libexec/vespa) ``` -------------------------------- ### Unit Testing Config with ConfigSet and Builders Source: https://github.com/vespa-engine/vespa/blob/master/config-lib/doc/configapi-dev-cpp.html Use ConfigSet and builder classes to simulate configuration for unit tests. Populate the set with builders, set values, create a context, and then subscribe. ```cpp ConfigSet set; FooConfigBuilder fooBuilder; BarConfigBuilder barBuilder; set.addBuilder("id1", &fooBuilder); set.addBuilder("id1", &barBuilder); fooBuilder.foobar = 13; barBuilder.barfoo = 12; IConfigContext::SP ctx(new ConfigContext(set)); ConfigSubscriber subscriber(ctx); ConfigHandle::UP fooHandle = subscriber.subscribe("id1"); ConfigHandle::UP barHandle = subscriber.subscribe("id1"); subscriber.nextConfig() // returns true first time ``` ```cpp subscriber.nextConfig() // should return false if called before fooBuilder.foobar = 188; ctx->reload(); subscriber.nextConfig() // should return true now ``` -------------------------------- ### Build Plugin Zip Source: https://github.com/vespa-engine/vespa/blob/master/integration/schema-language-server/clients/intellij/README.md Use this command to build the plugin and package it into a zip file for distribution. The output will be located in the build/distributions/ directory. ```bash gradle buildPlugin ``` -------------------------------- ### Install Verification Shell Script Source: https://github.com/vespa-engine/vespa/blob/master/config-proxy/CMakeLists.txt Installs the vespa-config-verification shell script to the bin directory. This script is used for verifying configuration. ```cmake vespa_install_script(src/main/sh/vespa-config-verification.sh vespa-config-verification bin) ``` -------------------------------- ### Install JAR Dependency Source: https://github.com/vespa-engine/vespa/blob/master/container-disc/CMakeLists.txt Installs a JAR file with its dependencies. This is typically used for libraries or components that need to be included in the build. ```cmake install_jar(container-disc-jar-with-dependencies.jar) ``` -------------------------------- ### Install Shell Script Source: https://github.com/vespa-engine/vespa/blob/master/config-proxy/CMakeLists.txt Installs a shell script to a specified destination directory. Used for utility scripts like vespa-config-ctl. ```cmake vespa_install_script(src/main/sh/vespa-config-ctl.sh vespa-config-ctl bin) ``` -------------------------------- ### Run Vespa Grammar Comparison Wrapper Script Source: https://github.com/vespa-engine/vespa/blob/master/integration/tmgrammar/README.md Convenience script to tokenize .sd files with vscode-textmate and compare them against Java LSP tokens. Can regenerate the grammar first. ```bash ./tools/run_comparison.sh ``` ```bash ./tools/run_comparison.sh --regenerate ``` -------------------------------- ### Install JAR Dependency Source: https://github.com/vespa-engine/vespa/blob/master/clustercontroller-apps/CMakeLists.txt Installs a JAR file required for the cluster controller applications. This is typically done during the build process. ```cmake install_jar(clustercontroller-apps-jar-with-dependencies.jar) ``` -------------------------------- ### Add fbench_clientstatus_app Executable and Test Source: https://github.com/vespa-engine/vespa/blob/master/fbench/src/test/CMakeLists.txt Defines the `fbench_clientstatus_app` executable and registers it as a test. This executable is used for testing client status reporting within fbench. ```cmake vespa_add_executable(fbench_clientstatus_app TEST SOURCES clientstatus.cpp DEPENDS fbench_util ) vespa_add_test(NAME fbench_clientstatus_app COMMAND fbench_clientstatus_app) ``` -------------------------------- ### Build Vespa Schema Language Server Source: https://github.com/vespa-engine/vespa/blob/master/integration/schema-language-server/README.md Build the schema language server using Maven. This command should be run from the project root directory. ```bash mvn install -pl :schema-language-server -Pschema-language-server -amd ``` -------------------------------- ### Install Loadtester Shell Script Source: https://github.com/vespa-engine/vespa/blob/master/config-proxy/CMakeLists.txt Installs the vespa-config-loadtester shell script to the bin directory. This script is used for load testing the configuration system. ```cmake vespa_install_script(src/main/sh/vespa-config-loadtester.sh vespa-config-loadtester bin) ``` -------------------------------- ### Install JAR Dependencies with CMake Source: https://github.com/vespa-engine/vespa/blob/master/vespa-3party-jars/CMakeLists.txt Use this function to install third-party JAR dependencies for your Vespa project. Ensure the target directory is correctly specified. ```cmake install_jar_dependencies(vespa-3party-jars) ``` -------------------------------- ### Add searchlib engine proto rpc adapter test Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/engine/proto_rpc_adapter/CMakeLists.txt Registers the 'searchlib_engine_proto_rpc_adapter_test_app' executable as a test to be run by the testing framework. It specifies the name of the test and the command to execute it. ```cmake vespa_add_test(NAME searchlib_engine_proto_rpc_adapter_test_app COMMAND searchlib_engine_proto_rpc_adapter_test_app) ``` -------------------------------- ### Install JAR Dependency in CMake Source: https://github.com/vespa-engine/vespa/blob/master/config-bundle/CMakeLists.txt Installs a specified JAR file, including its dependencies, into the build environment. This is typically used for including external Java libraries. ```cmake install_jar(config-bundle-jar-with-dependencies.jar) ``` -------------------------------- ### Configure Search Library Beta Features Test Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/features/beta/CMakeLists.txt Configures the test application, setting the command to execute and environment variables for logging. ```cmake vespa_add_test( NAME searchlib_beta_features_test_app COMMAND searchlib_beta_features_test_app ENVIRONMENT "VESPA_LOG_TARGET=file:vlog1.txt" ) ``` -------------------------------- ### Simple Ranking Expression Benchmark Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/features/benchmark/rankingexpression/c-100.txt This configuration sets up a benchmark for a simple ranking expression. It defines the case, feature, number of runs, and the ranking script itself. Use this for basic performance testing of ranking expressions. ```cfg case=rankingExpression feature=rankingExpression numruns=1000000 rankingExpression.rankingScript=1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 ``` -------------------------------- ### Run config-gen Goal from Command Line Source: https://github.com/vespa-engine/vespa/blob/master/config-class-plugin/README.md Execute the config-gen goal directly using Maven from the command line. ```bash $ mvn com.yahoo.vespa:vespa-configgen-plugin:config-gen ``` -------------------------------- ### Add VBench QPS Tagger Executable and Test Source: https://github.com/vespa-engine/vespa/blob/master/vbench/src/tests/qps_tagger/CMakeLists.txt Configures a test executable for the VBench QPS Tagger. This involves defining the executable, its source files, dependencies (including GTest), and then registering it as a test case. ```cmake vespa_add_executable(vbench_qps_tagger_test_app TEST SOURCES qps_tagger_test.cpp DEPENDS vbench_test vespa_vbench GTest::gtest ) vespa_add_test(NAME vbench_qps_tagger_test_app COMMAND vbench_qps_tagger_test_app) ``` -------------------------------- ### Add searchcore_matchengine Library Source: https://github.com/vespa-engine/vespa/blob/master/searchcore/src/vespa/searchcore/proton/matchengine/CMakeLists.txt Defines the searchcore_matchengine as a static library, listing its source files and dependencies. ```cmake vespa_add_library(searchcore_matchengine STATIC SOURCES matchengine.cpp DEPENDS ) ``` -------------------------------- ### Add Test Executable and Test Source: https://github.com/vespa-engine/vespa/blob/master/vespalib/src/tests/datastore/free_list/CMakeLists.txt Defines a test executable named 'vespalib_datastore_free_list_test_app' using 'free_list_test.cpp' as its source. It also sets up a test case with the same name that runs this executable. Dependencies include 'vespalib' and 'GTest::gtest'. ```cmake vespa_add_executable(vespalib_datastore_free_list_test_app TEST SOURCES free_list_test.cpp DEPENDS vespalib GTest::gtest ) vespa_add_test(NAME vespalib_datastore_free_list_test_app COMMAND vespalib_datastore_free_list_test_app) ``` -------------------------------- ### Package and Deploy Vespa Application Source: https://github.com/vespa-engine/vespa/blob/master/lucene-linguistics/README.md Command to package the Vespa application and deploy it. The -DskipTests=true flag skips running tests during packaging. ```shell (mvn clean -DskipTests=true -U package && vespa deploy -w 100) ``` -------------------------------- ### Add Searchlib Posting List Benchmark Executable Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/postinglistbm/CMakeLists.txt Defines an executable for benchmarking the posting list functionality. It specifies the source files and dependencies needed for the benchmark application. ```cmake vespa_add_executable(searchlib_postinglistbm_app TEST SOURCES postinglistbm.cpp stress_runner.cpp DEPENDS searchlib_test vespa_searchlib ) ``` -------------------------------- ### Add Executable and Test Source: https://github.com/vespa-engine/vespa/blob/master/vespalib/src/tests/approx/CMakeLists.txt Defines a test executable named 'vespalib_approx_test_app' using C++ sources and links it against the 'vespalib' library and Google Test. It then registers this executable as a test to be run by the build system. ```cmake vespa_add_executable(vespalib_approx_test_app TEST SOURCES approx_test.cpp DEPENDS vespalib GTest::gtest ) vespa_add_test(NAME vespalib_approx_test_app COMMAND vespalib_approx_test_app) ``` -------------------------------- ### Run Plugin in IDE Sandbox Source: https://github.com/vespa-engine/vespa/blob/master/integration/schema-language-server/clients/intellij/README.md Execute this command to build the plugin and run it within an IntelliJ IDEA Ultimate sandbox environment for testing. This requires IntelliJ IDEA Ultimate edition. ```bash gradle runIde ``` -------------------------------- ### Define Vespa Defaults Library Source: https://github.com/vespa-engine/vespa/blob/master/defaults/src/vespa/CMakeLists.txt Defines the 'vespadefaults' library, specifying its source files and installation directory. ```cmake vespa_add_library(vespadefaults SOURCES defaults.cpp INSTALL lib64 DEPENDS ) ``` -------------------------------- ### Add Test Executable and Test Source: https://github.com/vespa-engine/vespa/blob/master/slobrok/src/tests/service_map_mirror/CMakeLists.txt Configures a test executable named 'slobrok_service_map_mirror_test_app' using C++ sources and specifies its dependencies. It then registers this executable as a test to be run by CMake. ```cmake vespa_add_executable(slobrok_service_map_mirror_test_app TEST SOURCES service_map_mirror_test.cpp DEPENDS vespa_slobrok_slobrokserver GTest::gtest ) vespa_add_test(NAME slobrok_service_map_mirror_test_app COMMAND slobrok_service_map_mirror_test_app) ``` -------------------------------- ### Configure Ranking Expression Benchmark Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/features/benchmark/rankingexpression/c-50.txt Configuration for a ranking expression benchmark. Specifies the ranking script to be evaluated. ```cfg case=rankingExpression feature=rankingExpression numruns=1000000 rankingExpression.rankingScript=1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 ``` -------------------------------- ### Emulate SVE/SVE2 Vector Widths with QEMU Source: https://github.com/vespa-engine/vespa/blob/master/vespalib/src/vespa/vespalib/hwaccelerated/README.md Use QEMU user mode emulation to test vector kernels with specific SVE vector widths. Replace $n with the desired width in bytes (e.g., 16, 32, 64, 128, 256). ```shell qemu-aarch64 -cpu max,sve-default-vector-length=$n ./vespalib_hwaccelerated_test_app ``` -------------------------------- ### Add Vespa Persistence Library Source: https://github.com/vespa-engine/vespa/blob/master/persistence/src/vespa/persistence/CMakeLists.txt Defines the main Vespa persistence library, specifying its source objects and installation directory. ```cmake vespa_add_library(vespa_persistence SOURCES $ $ INSTALL lib64 DEPENDS ) ``` -------------------------------- ### Add storage_teststorageserver Library Source: https://github.com/vespa-engine/vespa/blob/master/storage/src/tests/storageserver/CMakeLists.txt Defines a test library for the storage server, including its source files and dependencies. ```cmake vespa_add_library(storage_teststorageserver TEST SOURCES testvisitormessagesession.cpp DEPENDS storage_testcommon vespa_storage ) ``` -------------------------------- ### Configure StandardTokenizerFactory with maxTokenLength Source: https://github.com/vespa-engine/vespa/blob/master/lucene-linguistics/README.md Example of configuring the StandardTokenizerFactory with a specific maxTokenLength. This configuration is used within a field type definition. ```xml ``` -------------------------------- ### Add Executable for storaged Source: https://github.com/vespa-engine/vespa/blob/master/storageserver/src/apps/storaged/CMakeLists.txt Defines the storaged executable, specifying source files, output name, installation path, and build dependencies. ```cmake vespa_add_executable(storageserver_storaged_app SOURCES storage.cpp forcelink.cpp OUTPUT_NAME vespa-storaged-bin INSTALL sbin DEPENDS storageserver_storageapp protobuf::libprotobuf absl::failure_signal_handler absl::symbolize ) ``` -------------------------------- ### Add Executable for Mockup Server Source: https://github.com/vespa-engine/vespa/blob/master/jrt_test/src/tests/mockup-invoke/CMakeLists.txt Defines an executable for the mockup server used in tests. It specifies the source file and dependencies. ```cmake vespa_add_executable(jrt_test_mockup-server_app TEST SOURCES mockup-server.cpp DEPENDS ) ``` -------------------------------- ### frt.rpc.getMethodList Source: https://github.com/vespa-engine/vespa/blob/master/jrt_test/src/tests/mandatory-methods/ref.txt Obtain a list of all available methods. ```APIDOC ## frt.rpc.getMethodList ### Description Obtain a list of all available methods. ### Method Not specified (RPC call) ### Endpoint Not specified (RPC call) ### Return #### Success Response - **names** (string array) - Method names - **params** (string array) - Method parameter types - **return** (string array) - Method return types ``` -------------------------------- ### Add Executable for logd Application Source: https://github.com/vespa-engine/vespa/blob/master/logd/src/apps/logd/CMakeLists.txt Defines the logd executable, including its source files, output name, installation path, and dependencies. ```cmake vespa_add_executable( logd_app SOURCES main.cpp OUTPUT_NAME vespa-logd INSTALL sbin DEPENDS logd ) ``` -------------------------------- ### Add Executable for Logd Dummy Server Source: https://github.com/vespa-engine/vespa/blob/master/logd/src/tests/rotate/CMakeLists.txt Defines a CMake executable for the logd dummy server application. Specify source files and dependencies. ```cmake vespa_add_executable(logd_dummyserver_app SOURCES dummyserver.cpp DEPENDS ) ``` -------------------------------- ### Add JDK 17 to jEnv Source: https://github.com/vespa-engine/vespa/blob/master/README.md Adds the installed JDK 17 to jEnv for management. This command dynamically finds the JDK path. ```sh jenv add $(/usr/libexec/java_home -v 17) ``` -------------------------------- ### Symlink JDK for System Recognition Source: https://github.com/vespa-engine/vespa/blob/master/README.md Creates a symbolic link for the installed OpenJDK 17 to be recognized by the system's Java wrappers. ```sh sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk ``` -------------------------------- ### Configure FlushEngine Test Execution Source: https://github.com/vespa-engine/vespa/blob/master/searchcore/src/tests/proton/flushengine/CMakeLists.txt Sets up the execution of the FlushEngine test application, including the command to run and environment variables. This ensures tests are run with specific configurations. ```cmake vespa_add_test( NAME searchcore_flushengine_test_app COMMAND searchcore_flushengine_test_app ENVIRONMENT "VESPA_LOG_LEVEL=all" ) ``` -------------------------------- ### Define vespalog_vlogconv_app Executable Source: https://github.com/vespa-engine/vespa/blob/master/vespalog/src/logger/CMakeLists.txt Defines the vespalog_vlogconv_app executable, which is a log converter. It installs the output binary to the 'bin' directory and depends on the 'vespalog' library. ```cmake vespa_add_executable(vespalog_vlogconv_app SOURCES logger.cpp llreader.cpp OUTPUT_NAME vespa-log-conv INSTALL bin DEPENDS vespalog ) ``` -------------------------------- ### Run Field Match Benchmark Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/features/benchmark/fieldmatch/readme.txt Execute the benchmark script. The 'folder' argument specifies where to store output files. ```bash ruby run.rb folder ``` -------------------------------- ### Add Executable for Dummy Implementation Conformance Test Source: https://github.com/vespa-engine/vespa/blob/master/persistence/src/tests/dummyimpl/CMakeLists.txt Defines a test executable for conformance testing of a dummy persistence implementation. It lists the source files and dependencies required. ```cmake vespa_add_executable(persistence_dummyimpl_conformance_test_app TEST SOURCES dummyimpltest.cpp DEPENDS persistence_persistence_conformancetest vespa_persistence ) vespa_add_test( NAME persistence_dummyimpl_conformance_test_app COMMAND persistence_dummyimpl_conformance_test_app ) ``` -------------------------------- ### Add Vespa RPM Repository Source: https://github.com/vespa-engine/vespa/blob/master/dist/README.md Use this command to add the Vespa repository to your CentOS 7 system. This is a prerequisite for installing Vespa packages. ```bash yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/vespa/vespa/repo/epel-7/group_vespa-vespa-epel-7.repo ``` -------------------------------- ### EchoProxyModel Constructor Source: https://github.com/vespa-engine/vespa/blob/master/config-lib/doc/cloudconfig-model-plugins.html Demonstrates how to declare a dependency on another config model in the constructor. ```java public class EchoProxyModel extends ConfigModel { public EchoProxyModel(ConfigModelContext context, EchoModel echoModel) { // Store away model for use in builder. } } ``` -------------------------------- ### Add Ranksetup Test Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/tests/ranksetup/CMakeLists.txt Registers the searchlib_ranksetup_test_app executable as a test to be run by the testing framework. ```cmake vespa_add_test(NAME searchlib_ranksetup_test_app COMMAND searchlib_ranksetup_test_app) ``` -------------------------------- ### Define vespalog_vespa-runserver_app Executable Source: https://github.com/vespa-engine/vespa/blob/master/vespalog/src/logger/CMakeLists.txt Defines the vespalog_vespa-runserver_app executable, used for running a server. It installs the output binary to the 'bin' directory and depends on the 'vespalog' library. ```cmake vespa_add_executable(vespalog_vespa-runserver_app SOURCES runserver.cpp llreader.cpp OUTPUT_NAME vespa-runserver INSTALL bin DEPENDS vespalog ) ``` -------------------------------- ### Add Tests for Dot Product Benchmark Source: https://github.com/vespa-engine/vespa/blob/master/vespalib/src/tests/dotproduct/CMakeLists.txt Configures tests for the dot product benchmark executable, specifying test names and commands with arguments. ```cmake vespa_add_test(NAME vespalib_dotproductbenchmark_app_sparse-ordered COMMAND vespalib_dotproductbenchmark_app 10 10 1000 1000 BENCHMARK) ``` ```cmake vespa_add_test(NAME vespalib_dotproductbenchmark_app_sparse-unordered COMMAND vespalib_dotproductbenchmark_app 10 10 1000 1000 BENCHMARK) ``` ```cmake vespa_add_test(NAME vespalib_dotproductbenchmark_app_full COMMAND vespalib_dotproductbenchmark_app 10 10 1000 1000 BENCHMARK) ``` -------------------------------- ### Add Executable for vespa-detect-hostname Source: https://github.com/vespa-engine/vespa/blob/master/vespalib/src/apps/vespa-detect-hostname/CMakeLists.txt Defines the vespa-detect-hostname executable using CMake. It specifies the source file, output name, installation directory, and build dependencies. ```cmake vespa_add_executable(vespalib_vespa-detect-hostname_app SOURCES detect_hostname.cpp OUTPUT_NAME vespa-detect-hostname INSTALL bin DEPENDS vespalib ) ``` -------------------------------- ### Add Vespa VDSL Library Source: https://github.com/vespa-engine/vespa/blob/master/vdslib/src/vespa/vdslib/CMakeLists.txt Use this command to add the Vespa VDSL library to your CMake project. It specifies source objects and installation directories. ```cmake vespa_add_library(vespa_vdslib SOURCES $ $ $ INSTALL lib64 DEPENDS ) ``` -------------------------------- ### Generate Configuration Files Source: https://github.com/vespa-engine/vespa/blob/master/config/src/tests/subscriber/CMakeLists.txt Generates configuration files for the 'config_subscriber_test_app' from specified definition files. ```cmake vespa_generate_config(config_subscriber_test_app ../../test/resources/configdefinitions/foo.def) ``` ```cmake vespa_generate_config(config_subscriber_test_app ../../test/resources/configdefinitions/bar.def) ``` ```cmake vespa_generate_config(config_subscriber_test_app ../../test/resources/configdefinitions/baz.def) ``` -------------------------------- ### Add Executable for Vespa File Header Inspect Source: https://github.com/vespa-engine/vespa/blob/master/searchlib/src/apps/vespa-fileheader-inspect/CMakeLists.txt Defines the vespa-fileheader-inspect executable, specifying its source files, output name, installation directory, and dependencies. ```cmake vespa_add_executable(searchlib_vespa-fileheader-inspect_app SOURCES vespa-fileheader-inspect.cpp OUTPUT_NAME vespa-fileheader-inspect INSTALL bin DEPENDS vespa_searchlib ) ``` -------------------------------- ### Regenerate Vespa TextMate Grammar Source: https://github.com/vespa-engine/vespa/blob/master/integration/tmgrammar/README.md Use this command to regenerate the TextMate grammar file from the source code. Ensure Python 3.10+ with uv is installed. ```bash uv run tools/generate_tmgrammar.py ``` -------------------------------- ### Add Searchcorespi Index Disk Layout Test Source: https://github.com/vespa-engine/vespa/blob/master/searchcore/src/tests/index/index_disk_layout/CMakeLists.txt Configures a test case named 'searchcorespi_index_disk_layout_test_app' that runs the previously defined executable. ```cmake vespa_add_test(NAME searchcorespi_index_disk_layout_test_app COMMAND searchcorespi_index_disk_layout_test_app) ``` -------------------------------- ### Define Vespa Executable Source: https://github.com/vespa-engine/vespa/blob/master/defaults/src/apps/printdefault/CMakeLists.txt Defines a Vespa executable named 'vespa-print-default-bin' from the 'printdefault.cpp' source file. It is installed to the 'bin' directory and depends on the 'vespadefaults' library. ```cmake vespa_add_executable(defaults_vespa-print-default_app SOURCES printdefault.cpp OUTPUT_NAME vespa-print-default-bin INSTALL bin DEPENDS vespadefaults ) ``` -------------------------------- ### Add Vespa Executable: config_pingproxy_app Source: https://github.com/vespa-engine/vespa/blob/master/config/src/apps/vespa-ping-configproxy/CMakeLists.txt Defines the vespa-ping-configproxy executable using vespa_add_executable. Specifies source files, output name, installation directory, and dependencies. ```cmake vespa_add_executable( config_pingproxy_app SOURCES pingproxy.cpp OUTPUT_NAME vespa-ping-configproxy INSTALL bin DEPENDS ) ``` -------------------------------- ### Compare Vespa Grammar with Java LSP Tokens Source: https://github.com/vespa-engine/vespa/blob/master/integration/tmgrammar/README.md Compare the generated TextMate grammar with the semantic tokens from the Java LSP. Requires `tools/java_tokens.json` to be generated first. ```bash uv run tools/compare_tokens.py ``` ```bash uv run tools/compare_tokens.py --fixable-only ``` ```bash uv run tools/compare_tokens.py --file embed.sd ``` -------------------------------- ### Add Mockup Server Test Source: https://github.com/vespa-engine/vespa/blob/master/jrt_test/src/tests/mockup-invoke/CMakeLists.txt Configures a test case for the mockup server application. It specifies the test name, execution command, and dependencies. ```cmake vespa_add_test(NAME jrt_test_mockup-server_app NO_VALGRIND COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mockup-invoke_test.sh DEPENDS jrt_test_mockup-server_app) ``` -------------------------------- ### Add Vespa ConfigProxy Executable Source: https://github.com/vespa-engine/vespa/blob/master/config/src/apps/vespa-configproxy-cmd/CMakeLists.txt Defines the Vespa configproxy command-line executable. Specify source files, output name, installation path, and dependencies. ```cmake vespa_add_executable(config_configproxy-cmd_app SOURCES main.cpp methods.cpp proxycmd.cpp OUTPUT_NAME vespa-configproxy-cmd-bin INSTALL bin DEPENDS ) ``` -------------------------------- ### Configure CORS for Vespa Query Serving Source: https://github.com/vespa-engine/vespa/blob/master/client/js/app/README.md Example configuration for enabling CORS in Vespa's http container to allow access from the Query Builder. ```xml * http://*/search/ * http://*/search/ ```