Fix #906, Update variable checks in read_targetconfig #907
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.
Describe the contribution
CMake script was using a "DEFINED" test to check if these variables were set. Problem discovered is that this is always true because "SIMULATION" is a cache var set from an environment variable, so it ALWAYS defined, it is just empty if not being used.
Fix is to use
if (SIMULATION)
rather thanif (DEFINED SIMULATION)
which should only be true if the string is not empty, as intended. Also applying this to${CPUNAME}_SYSTEM
so if someone does e.g.set(cpu1_SYSTEM)
then it won't try to use that empty string either.Fixes #906
Testing performed
Build for Vxworks 6.9 using GSFC build machine
Build for native using both SIMULATION=native and without SIMULATION (using toolchain-cpu1.cmake)
Expected behavior changes
Builds without SIMULATION directive work as expected
System(s) tested on
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.