Add cmake -DINIT_CONFIG= option that can point at any initial file.
"make clean" does not delete .config any more.
Note reconfiguration does NOT causes recompilation because -imacros
hides the generated .h from CMake's dependency scan. This is not a
regression, that problems exists since -imacros was introduced. At least
it's now possible to "make clean" and rebuild without losing the .config
file.
Fix for #3617
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
oss-fuzz does not support dynamic linking, therefore we need to add
support for static builds
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Change generated config.h default name to autoconfig.h to catch any
remaining #include config.h left in any other PR, branch or any other
concurrent work in progress unknown to this.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
No functional change for now.
This is needed because SOF is a CMake sub/"external" project when
building some host tools. We want to switch all projects to "-imacros
config.h" but subprojects cannot inform parents where their files are
located. So make parents able to dictate where config.h is instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In new version of rimage software, headers are located in
rimage/src/include/rimage directory to make it easily accessible
from another source code without include path collision.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This adds the necessary bits to update git submodules when
cmake is run, with the option to turn this behavior off if
needed. This is in preparation to use fw.h and manifest.h
from the rimage repo to prevent having two copies of each
file in two different repos. Obviously, the files in
the submodules must exist before building the firmware,
so run git submodule update to checkout the files.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add option for building FW for clang's scan-build.
This static analyzer works out-of-the-box only for compilers
compatible with Clang. For most of embedded compilers
there will be some adjustment needed when BUILD_CLANG_SCAN
is enabled. This flag is not suitable for every build scenario,
it has to be supported for given toolchain / architecture.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Use RELATIVE_FILE because __FILE__ makes binary output
dependent on project location.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Target dependencies have to be added in the same CMakeLists in which
they are declared. CMake interface library is needed to enable adding
static libraries to sof target from subdirectories.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
In function target_link_libraries visibility modifiers have to be
consistent, otherwise we will get error while trying to use modifier,
if it wasn't used in root CMakeLists.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit updates paths of installed headers to match
new headers folders structure.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>