summaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d
AgeCommit message (Collapse)AuthorFilesLines
2018-10-23set default link flags to the target propertyRomain Forlot1-0/+9
set default link flags to the target property for binding target. Change-Id: I12387d310abd993a5a3861f04c7bc0cef941d2b7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-23Use a custom test-config.xml file for test widgetRomain Forlot1-3/+7
Change-Id: I2c71f5cd1bbfa6d6e2d2c48aaf004b24811dbee1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-23Convert app-templates to a cmake moduleRomain Forlot4-50/+24
- Changes PATH to find correctly all cmake files. - Clean useless code now it's integrated as CMake module - Clean variable usage - Create module entry point Bugs-AGL: SPEC-1682 Change-Id: I6943129677603b786c7144a92880d82795a916cd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fix: missing gcov symbol in compiled binariesRomain Forlot1-2/+2
Missing link option because of a wrong test against CMAKE_BUILD_TYPE value. Change-Id: I3b0a4cb090f4c53df8868a5f757a11f6046b3e3e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Rollback about TEST build typeRomain Forlot2-25/+25
This implies to much side effects over a complete AGL image build. So it's better to not affect the CMAKE_BUILD_TYPE variable to determine wether or not the test WGT file is generated. Change-Id: I77e8bdb085d164a4dd387ac48c425c011840473b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Adding a TEST build typeRomain Forlot2-32/+17
Change-Id: Id2a2ede0f01bfc48757904f43b01e52a1c8b110d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Change default compilation options.Romain Forlot1-3/+14
This changes the default build type to RELEASE as it would be built using Yocto. Debug build should be activated if needed temporary as the other type: coverage and profiling. Doing this you are able to detect compilation error that would happens when building with Yocto and if you need to debug your program you only need to recompile changing temporary the build type to DEBUG. Bugs-AGL: SPEC-1644 Change-Id: I1823509a1a48415d3d440dd84d1e43ef48736ebe Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Test widget only if there are test materialsRomain Forlot1-5/+13
This checks if there is a target with a TEST LABELS property which would indicate that there is something to pack in the test widget, else it would generate an empty and useless test widget. Change-Id: If2a3eb32762f5d62877ea19faed70d4b6e68a0a0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Handles more test LABELS.Romain Forlot1-2/+22
You may need everything except for a binding since the afb-test binding offers the possibility to emulate other Apis. Or you can rely on platform binding if needed but developping bindings only used for testing purpose isn't a good solution and should be avoided. Change-Id: I39e1a43bbe4d73b36f0155913125f0df837d2ec5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Missing flag for COVERAGE build typeRomain Forlot1-0/+3
Change-Id: Icebe1850e5949c277722ac83958f73c0eed493c7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Create a test widgetRomain Forlot1-20/+56
Create a test widget in addition of the normal one when you use any build type except of RELEASE. This widget will only provide the test files (configuration + test + fixtures ...). It joins the test framework binding to your binding or app then you only have to access to your defined test API and launch the tests. The entry point is a bash script which is in charge to launch all tests it finds. Change-Id: I8f4a670f17fd4e4319c53a861074fb5e10b63aad Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Add support to binding version 3.Romain Forlot1-4/+13
Add a new LABELS "BINDINGV3" to handle the v3 case. This implies the same things than for v2 but generates the API definition using the new version capabilities through afb-genskel tool. Change-Id: Ib7b60f3f79c3634f27c90b2f9bf4aaf5b3ef2fcb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Warning if not using wgtpkg-pack to make a widgetRomain Forlot1-1/+6
Also use zip host command instead of embedded CMake zip command which could not be unzipped on a board. Using the host zip command it allows to build the wgt file as a zip archive but it can't be installed using afm-util like a real widget file but could still be unzipped manually. Change-Id: I5e13c27164294d99de1918df8d84cb04fc439317 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Rework CMAKE_INSTALL_PREFIX and INSTALL_PREFIX varSebastien Douheret1-0/+4
Following change ID 1ec753146f, CMAKE_INSTALL_PREFIX has been replaced by INSTALL_PREFIX. So differ CMAKE_PREFIX_PATH and LD_LIBRARY_PATH setting in 03-macros in order to be sure that CMAKE_INSTALL_PREFIX has been set correctly. Change-Id: I6effcaaab658fd24c929cd4a30fa38ad8f4df145 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-10-15Be able to overwrite BUILD_TYPE using CLIRomain Forlot1-1/+8
If not defined using CLI CMake set the variable CMAKE_BUILD_TYPE to an empty value. As it is a CACHE variable it can't be overwritten except if you force it. This fix setting this variable the first defined value wins: CLI > Config.cmake > Default value (DEBUG) Change-Id: I7ff3c9063febf71b898fa7f19058ce2fb25fae01 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Use CACHE variable for other common CMAKE variableRomain Forlot1-0/+7
This is done to be able to overwite from CLI those variables. CMAKE_INSTALL_PREFIX is a special case since it is set by default to '/usr/local' at CMake invocation. So overwriting by CLI is fine but set it up using config.cmake file not. So since CMake v3.7 there is a variable to know if this variable has been set by default or not. Change-Id: I60c5161fa9a4134d100ef709d0966d599871ad44 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fix:: wrong wgt using RELEASE BUILD TYPERomain Forlot1-0/+2
The wgt filename is suffixed with the build type except for RELEASE build type. In this case, the name wasn't set. This fix this issue. Change-Id: I5a0be07c5f380676ba9ecfdd1b51ebab95aca3dd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Change the default debug compilation options.Romain Forlot1-4/+27
Because fortify source need optimization then the most correct optimization to chose is -0g for debugging purpose. Also be able to specify options for Clang which could differ slightly from GNU. Change-Id: I166c0cb62cbf9fc171cffc29c29df993f5ccb8f5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Clearer coverage compilation options configurationRomain Forlot2-11/+12
Rename CCOV to COVERAGE to make it more clearer which compilation profile use and add a suffix to the built widget name except for the RELEASE built type which output the normal name. Change-Id: Ied0dfb47c25402c4146ebb190d65d17cff9ec360 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Don't overwrite the autobuild script if it existsRomain Forlot1-3/+7
Bug-AGL: SPEC-1529 Change-Id: I0c048e8bfe4f8eb23f31fb22808168b706cf12f8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fix: wrong compile options addedRomain Forlot1-3/+0
Change-Id: I697e3812be657abc0b1877e55044225cc001c93e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fallback using zip format if no wgtpkg-pack foundRomain Forlot1-1/+11
wgtpkg-pack tool is part of "application-framework-main" project and not mandatory when developing natively. As a wgt package is a zip file then use the zip format to simulate a real wgt package. Change-Id: If2d5a86e93b9c9dc707658b2367f59a7824eddf6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-1502-variables.cmake: Avoid checking CXX version if not requiredJosé Bollo1-1/+1
Change-Id: Id5a8987d3222df9cfaa258cdce8353dad6ca9a4a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-15Added -D_FORTIFY_SOURCE=2 to CFLAGSThierry Bultel1-5/+5
Added this option, to match the given ones when building from yocto with bitbake. Also fixed the sample example, and some copy-paste issues on build targets (RELEASE/DEBUG/PROFILING/CCOV). Change-Id: I759305e54d427e6763f32b1a86207fe35add1b3f Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-10-15Fix filename pattern to match .cmake filesRomain Forlot1-1/+1
Change-Id: I1c659045f178f5e45d31b0203abcd91485b55838 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Adding cmake file at the root directoryRomain Forlot1-0/+2
It may be needed to include additionnal files from the root dir as populate and remote_target_populate targets are created at inclusion parts you can't adds target using app-template macros after the config.cmake first inclusion. Change-Id: I92a98d997aa239ab56183da8dc95f6db993c17a2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Adds commit hash to the version.Romain Forlot1-1/+10
Added the short hash coming from git lastest git commit to the version number. In addition of the dirty flag it make possible to know from where modifications divergences begin. Change-Id: Id25256f896c8179009d8588f79e7801cc2c90821 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Use LFSH named, rename data to varRomain Forlot1-1/+1
Change-Id: I63ad812fc69c0ac38db0b16af405614fa68f6d54 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Use new CPP generation from afb-genskelRomain Forlot1-2/+5
Include a new options calling afb-genskel depending on PROJECT_LANGUAGES variable Change-Id: Id7719b399eac58f0ced54a49e09350a587e4e997 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Doesn't set rpath for built target and update docRomain Forlot1-3/+9
Rpath could be set using a target property if needed in the mean time no rpath is used by default. Change-Id: Ia704b00972545ed73dee98ea88e17d0ef08cf014 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Deprecate PROJECT_LIBDIR and PROJECT_RESOURCES varRomain Forlot1-2/+2
Change-Id: I9fc0e4389ade90e22e4ede77720effeff87834b7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Make sure to point to correct dir for cmake scriptRomain Forlot1-2/+2
Change-Id: I1ec3541aa5ab6f82a91e150193c954e586cb06f8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fix variables checking.Romain Forlot1-2/+2
Change-Id: Ifbe95bbcb7f192ec9e84c26a73dc260926360b37 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15CMake doesn't path protection.Romain Forlot2-3/+5
Keep using a classic CMake variable not escape with quote for path PKG_TEMPLATE_PREFIX else path isn't correct for internal cmake usage. Change-Id: I9ebff240e28c5cc8922ff6bbc5e6c14a62997f65 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Compare to manual Project version if not from gitRomain Forlot1-0/+7
Change-Id: I7e83d2e587757edf5cfa22709ead85ce82f52dcc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15No failure if none tags found on project git repoRomain Forlot1-5/+9
Change-Id: Idb46117feb860c84a14b6c256ee809e31546fd7c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Protect path with space in it.Romain Forlot2-14/+3
Bug-AGL: SPEC-1117 Change-Id: I36ba8047c3dc722c6c99ecbd90e14d5d717cb808 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Check version between app-templates and project.Romain Forlot2-0/+37
PROJECT_VERSION could be detected if project is located in AGL gerrit repo or with personal tags when in personal repository This version is checked against app-templates version which is aligned on AGL tags. A warning is displayed if app-templates version is outdated related to project_version. Also a "dirty" flag is appended to the project version if git repo isn't in sync with its remote counterpart. Then you could know if see an installed widget on a target that got that "-dirty" flag appended to the version that this widget include code that could not be merged in the git repository. Bug-AGL: SPEC-951 Change-Id: I99687560d19d746c887fc7a095e71407bda34325 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15CleaningRomain Forlot1-101/+0
Change-Id: Ia040321ddf86d80c04b63f56041b571b24a802ec Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Could specify others default install directoriesRomain Forlot2-5/+7
Path to default package BINDIR, LIBDIR, ETCDIR, DATADIR and HTTPDIR. Change-Id: I0e820f48f60e5e18053077fdbaa1d45912d5bb12 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fix finding config templateScott Murray1-1/+3
Commit 9a73785 ("Better handling icon&config.xml to build widget") seems to have accidentally broken an application providing its own config template, resulting in the stock templates always being used. That results in breakage like extra permissions in the app's version not being picked up. The logic for setting WIDGET_CONFIG_TEMPLATE has been reverted to what it was previously to fix the behavior. Change-Id: I245bc08f466b883b61c286faed933a5e57a74845 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2018-10-15Disallow build in-source.Romain Forlot1-26/+37
Change-Id: If606d1ad283a37b7a2c1d4e45d8459ace2ba76c5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Keep libraries and binding in the same directoryRomain Forlot1-5/+3
Change-Id: I40a3424b689d03e3f6cf471495ed869511a30d2d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15CleaningRomain Forlot1-12/+0
Change-Id: Id06766a8c24dd21fdee6211a384bfccf7c6535ad Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Handle imported target to populate package folderRomain Forlot1-113/+91
Can use an external library builded as an external project or an already built library/executable to include it into a widget. Change-Id: Ia3282f875fe0f6f9e8f1153d87ccfbecf8559dbb Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Control install destination directoryRomain Forlot1-3/+11
Either put all in a dedicated binding directory like a classic widget install, either put all directly a CMAKE_INSTALL_PREFIX root directory. Change-Id: I54ebe8a680ea09af73c7fc9e6646fdd203fdeb98 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fix: wrong if closure...Romain Forlot1-1/+1
Change-Id: I6b8964c0c7db970b88e636222fb8394a51dbde8e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Make use of LibEfence optionalRomain Forlot1-1/+1
Change-Id: I22b52611dab0be6021b08d6c6d63bc369df0b4d4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Fix: No build error on input files checkedRomain Forlot2-17/+53
Output a warning if no checker found but at usage must crash the build if input files has errors. Change-Id: I282c4eb2303922ce1cd7055b51182ed222b62d08 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-15Handle controller plugin populate and installRomain Forlot1-7/+16
Change-Id: Ib48817e4634990b6369de29ce81fa86354d73652 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>