Add option to append MachineCodeComputer_SystemdDBusInodes_SHA256.cpp
to list of source files
#17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change solves an issue I ran into when attempting to use the Cryptolens C++ API with the
MachineCodeComputer_SystemdDBusInodes_SHA256
machine code computer (on Linux).Issue Description
The issue can be recreated as follows:
examples/unix/example_activate.cpp
with example_activate.zipA linker error similar to the following should be displayed:
Proposed Solution
This change mirrors the same option already present to enable compiling with access to
MachineCodeComputer_COM
:cryptolens-cpp/CMakeLists.txt
Lines 36 to 40 in 68a9dc2
With this change, the cache variable
CRYPTOLENS_BUILD_MACHINE_CODE_SYSTEMDDBUSINODES
can be set (for instance, inexamples/unix/cmake/CMakeLists.txt
) if using theMachineCodeComputer_SystemdDBusInodes_SHA256
machine code computer.I'm not super familiar with compilers, but I suspect this works because if
MachineCodeComputer_SystemdDBusInodes_SHA256.cpp
is not explicitly specified, GCC still finds and compiles it but without the desired flags that CMake otherwise adds for options such as C++ standard.