![]() VERBATIM All arguments to the commands will be escaped properly for theīuild tool so that the invoked command receives each argument Specified source files will be added to IDE project files forĬonvenience in editing even if they have no build rules. SOURCES Specify additional source files to be included in the custom target. COMMAND_EXPAND_LISTS Lists in COMMAND arguments will be expanded, including those ![]() Use the add_dependencies() command to add dependencies Reference files and outputs of custom commands created withĪdd_custom_command() command calls in the same directory COMMENT Display the given message before the commands are executed at The command and arguments are optional and if not specified an empty References to target names in generator expressions imply target-level If set, theĬROSSCOMPILING_EMULATOR executable target property willĪlso be prepended to the command to allow the executable to run onĪdditionally a target-level dependency will be added so that theĮxecutable target will be built before this custom target. If COMMAND specifies an executable target name (created by theĪdd_executable() command) it will automatically be replacedīy the location of the executable created at build time. (To run a full script, use the configure_file() command or theįile(GENERATE) command to create it, and then specify If more than one COMMAND is specified they will be executed in order,īut not necessarily composed into a stateful shell or batch script. Specify the command-line(s) to execute at build time. The BYPRODUCTS option is ignored on non-Ninja generatorsĮxcept to mark byproducts GENERATED. Order-only dependencies to ensure the byproducts will be Generated file on which another rule depends even if there are custom commands)ĭepend on the byproducts. It isĪlso useful when other build rules (e.g. How to regenerate byproducts when they are missing. Ninja generator to tell the ninja build tool Relative to the build tree directory corresponding to theĮach byproduct file will be marked with the GENERATEDĮxplicit specification of byproducts is supported by the If a byproduct name is a relative path it will be interpreted Modification time may or may not be updated on subsequent builds. ![]() Specify the files the command is expected to produce but whose Target so that it will be run every time (the command cannot be The options are: ALL Indicate that this target should be added to the default build The add_dependencies() command to add dependencies to or By default nothing depends on the custom target. Use the add_custom_command() command to generate a file withĭependencies. The target has no output file and is always considered out of dateĮven if the commands try to create a file with the name of the target. ] ] ])Īdds a target with the given name that executes the given commands. See ot-efr32 and ot-nrf528xx.Add_custom_target ( Name ]. Support for multiple platforms in a single repository is possible and several platform repositories can be used as reference. A good example of this file for a repository which supports only a single platform is from ot-cc2538. This is where you define the source files, include paths, and compiler flags for your platform library. A good starting point would be to copy the ot-efr32 version of this file and modify it to fit your platform. This is a toolchain file which defines some variables that CMake uses in the build process. It also contains a few other required files. This is the heart of the repository and is where the platform abstraction layer is implemented. If you would like to include sample applications in the repo, create an examples folder and add it to the build tree as well. The third_party folder contains any third-party code. The src folder is where the platform-abstration layer source code is located. Now that the top-level configuration is defined, it's time to add other subdirectories to the build tree. set_property(CACHE EFR32_PLATFORM PROPERTY STRINGS $/crypto The CMakeLists.txt file includes a check that aborts builds launched for unsupported platforms. For the sake of this example, we've defined multiple platforms, but having a single platform for the _PLATFORM_VALUES variable is fine as well. We also define a variable EFR32_PLATFORM_VALUES which is a list of efr32 platforms supported by ot-efr32. In this example, we set the project name to ot-efr32 with a version of 0.0.1. The very first values to define are the project name and the supported platforms. The CMakeLists.txt at the root of your repository is the top of the build tree and is a good place to start defining the various targets, options, and macros used in the build process. The CMake build system relies on CMakeLists.txt files which define build targets.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |