Commit graph

13 commits

Author SHA1 Message Date
Renz Christian Bagaporo
3882e48e8a cmake: use new signature form of target_link_library to link components
!4452 used setting LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES to link
components built under ESP-IDF build system. However, LINK_LIBRARIES does
not produce behavior same as linking PRIVATE. This MR uses the new
signature for target_link_libraries directly instead. This also moves
setting dependencies during component registration rather than after all
components have been processed.

The consequence is that internally, components have to use the new
signature form as well. This does not affect linking the components to
external targets, such as with idf_as_lib example. This only affects
linking additional libraries to ESP-IDF libraries outside component processing (after
idf_build_process), which is not even possible for CMake<v3.13 as
target_link_libraries is not valid for targets not created in current
directory. See https://cmake.org/cmake/help/v3.13/policy/CMP0079.html#policy:CMP0079
2019-06-11 18:09:26 +08:00
Renz Christian Bagaporo
297b2c5a39 cmake: evaluate component requirements in one go
!4452 simplified early expansion by using an early expansion script that
only does one thing: get the public and private requirements for each
component, albeit one by one. This was also dependent on parsing
the command output of the expansion script.  This commit makes it so that a list of all
components to be processed to passed to the expansion script, generating a cmake
file that sets each component requirements in one go.

This also makes sure that only components that registered themselves get
included in the final build list.
2019-06-11 18:09:26 +08:00
Renz Christian Bagaporo
33dd7011be cmake: expand build components before generating config
!4452 had config generation first before building the component list
to be used in the build. This proved to be detrimental when a new target
is added as config generation would consider configs from both targets.
2019-06-11 18:09:26 +08:00
Angus Gratton
22514c1dd9 cmake: For gcc8 use linker to find paths to libc, libm, libstdc++, etc
Removes the need to know/guess the paths to these libraries. Once we are gcc 8 only, we
can remove -nostdlib and no additional arguments are needed for system libraries.

The catch is: any time IDF overrides a symbol in the toolchain sysroot, we need
an undefined linker marker to make sure this symbol is seen by linker.
2019-05-28 12:54:37 +08:00
Renz Christian Bagaporo
25b539d4fc cmake: make project includes know gcc version as well 2019-05-23 18:39:31 +08:00
Renz Christian Bagaporo
74c6c926ea nghttp: move HAVE_CONFIG_H compile definition to component 2019-05-23 18:39:31 +08:00
Renz Christian Bagaporo
b4ad6c1426 cmake: refactor quick check given component dirs 2019-05-20 19:24:17 +08:00
Renz Christian Bagaporo
e1726a91ce cmake: project includes should know about ESP_PLATFORM variable 2019-05-20 18:24:34 +08:00
Renz Christian Bagaporo
e3eb945fd2 cmake: restore use of GNU extensions from libc 2019-05-20 18:24:34 +08:00
Renz Christian Bagaporo
5175a152d9 cmake: exclude dot-dirs from added components 2019-05-20 18:24:34 +08:00
Renz Christian Bagaporo
7493bd2e28 cmake: add command to get config value 2019-05-14 18:01:14 +08:00
Renz Christian Bagaporo
de9bb5a160 cmake: fix scope issues 2019-05-14 18:01:14 +08:00
Renz Christian Bagaporo
c6dc47b3e2 cmake: build system changes 2019-05-13 19:57:39 +08:00