Commit graph

15 commits

Author SHA1 Message Date
Adrian Danis
ccac858da8 cmake: Remove GenCPPCommand
This helper was ugly when written and simply should not be used over the CPPFile helper.
2018-02-22 14:51:48 +11:00
Adrian Danis
a19a2b3b8d cmake: CPPFile New helper for just pre-processing files
This is a new version of GenCPPCommand that uses an OBJECT library intermediate to get
cmake to do 'arbitrary' compilation (by adding the -E flag) where the result does not
need to be linkable. The advantage of this over the GenCPPCommand version is there is
no need for trying to manually invoke GCC with all the correct arguments lists.
2018-02-22 14:51:48 +11:00
Adrian Danis
118a7869f4 cmake: get_absolute_source_or_binary is a function
As a macro this helper would not operate as expected if output and input were defined
as the same variable. Making a function and explicitly writing into the PARENT_SCOPE
fixes this and also makes the code simpler
2018-02-22 14:51:48 +11:00
Adrian Danis
4b8a3e24d2 config: Reset options to default when enabled
This change makes values take on more intuitive and expected defaults when gradually
configuring the kernel, either programatically or through the graphic interfaces
2018-02-07 11:49:28 +11:00
Kent McLeod
33192cd8ae cmake config_choice: save options in cache var
This is to make it possible to enumerate all config options instead of
just the 'valid' ones that are saved as the STRINGS property.
2018-02-01 15:11:43 +11:00
Adrian Danis
9a89cbe4c6 cmake: TOPLEVELTYPES declared as target property
TOPLEVELTYPES is not intended to be configurable by the user, rather is a reflection
on the types defined by the source. This changes the TOPLEVELTYPES argument to be
a property, allowing it to be constructed as a generator expression when generating
BF files. By being a property, and not something like a global property, it removes
the need to ensure that additions to TOPLEVELTYPES are done prior to any bitfield
target definitions.
2017-11-15 17:33:13 +11:00
Adrian Danis
a2c8462efb cmake: Expand lists in BF generation
Uses the COMMAND_EXPAND_LISTS flag to allow for generator expressions in parameters
to GenBFCommand. As lists are now being expanded the 'args' variable must also be
quoted.
2017-11-15 17:33:13 +11:00
Adrian Danis
aa3fc06c79 cmake: Make variables show up if previously hidden
Previously if a variable had unmet dependencies and had been hidden, by being made
an internal variable, it would not have been unhidden by the use of `option`. This
emulates the behaviour of `option` that we were wanting, but additionally using `FORCE`
to override the `INTERNAL` setting
2017-11-03 16:39:45 +11:00
Adrian Danis
24a69963e7 cmake: Directly generate configuration files
Uses file(GENERATE) to directly create the contents of generated configuration files instead of
awkwardly using custom commands to echo the contents of multi line strings into files.
2017-11-03 13:49:37 +11:00
Adrian Danis
89fb678db8 cmake: Invoke compilations without echo and xargs
Newer versions of cmake provide a COMMAND_EXPAND_LISTS option that allows a quoted string,
such as "a;b" to be given to a COMMAND parameter and have it expand into multiple arguments.
Using this we can much more nicely generate some of our COMMAND invocations, at the cost of
requiring a more recent cmake version
2017-11-03 13:49:37 +11:00
Gerwin Klein
38cc67e821 slightly more Mac friendly cmake commands
Mac has BSD sed, not GNU sed; tr seems to be more portable.
2017-11-02 13:39:13 +11:00
Adrian Danis
3a48b9fa33 cmake: Unset CACHE variables from the CACHE
These variables were meant to be removed from the cache
2017-10-27 14:13:31 +11:00
Adrian Danis
777f19645b cmake: Correctly set options to their DEFAULT_DISABLED values
The config_option helper was previously using cmake_dependent_option, which supposedly took
a value to set the option to in the case where it was disabled. However, this only sets
the value in the current function context, and not the cache. I do not understand why this
is the case and it seems to make that functionality completely useless. This commit simply
does the dependency checking itself and correctly sets the disabled value.
2017-10-27 14:13:05 +11:00
Adrian Danis
eac4f6bfa2 proof: Defer theory dependencies to isabelle
Instead of explicitly depending on Kernel_C.thy prior to generating proofs, this removes
the dependency check and leaves isabelle to check the dependency upon import.
2017-09-20 14:22:14 +10:00
Adrian Danis
0b73072016 Add a CMake based build system
This commit adds an alternate build system using CMake that operates indepenently of
the existing Kconfig+Kbuild+make based build system
2017-08-22 13:56:26 +10:00