Fix issue #159: Failure when cross-compiling for VxWorks#160
Fix issue #159: Failure when cross-compiling for VxWorks#160moberhuber wants to merge 4 commits into
Conversation
| @@ -1,3 +1,4 @@ | |||
| if(${MSVC_VERSION}) | |||
There was a problem hiding this comment.
Per CMake style, we can use if(MSVC_VERSION) here.
| @@ -21,6 +22,7 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12) | |||
| set(ENABLE_CTYPES_TEST OFF CACHE BOOL "${warn}" FORCE) | |||
| endif() | |||
| endif() | |||
There was a problem hiding this comment.
Please indent the code with two spaces contained in the conditional.
thewtex
left a comment
There was a problem hiding this comment.
Thanks for the PR! Please see a few minor inline comments.
…- cosmetic cleanup
|
Thanks for the feedback, I've cleaned up as requested (wanted a minimal source diff initially). |
|
@moberhuber Thanks for the update! 👍 @jcfr This LGTM. |
|
I've added 2 more fixes for cross-compiling VxWorks, could these be considered please? - Thx :) |
|
@moberhuber thanks! LGTM CC @jcfr |
|
@moberhuber Thanks again for your patches Fixes related to |
|
Fix related to |
|
Now for de1ffdf and fdd2c56, the exclusion of MSVC is already done when the version is empty or doesn't match, the issue happen because With a working toolchain, I would expect this variable to be set to either For reference this variable is set within CMake here using the content of the variable Looking at the @moberhuber Let us know what you find out. |
|
Hi @jcfr , regarding fdd2c56 I can confirm that the issue does not occur with the GNU toolchain which does set But for VxWorks, we also want to build with the Diab toolchain which isn't supported by stock CMake so far. So we use our own (very basic) cross-toolchain information. This works fine everywhere else, in my fork I could build a basic Python that works even without |
|
May be you could add the following to the toolchain file: Or we could add a statement like this in the python cmake build system: Let me know what you think. Jc |
|
To summarize:
If the last issue related to |
When cross-compiling, the cmake/extensions/CMakeLists.txt may be loaded without ${MSVC_VERSION} set. Protect against errors by making the code conditional.