Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permitting non-Apple builds by not requiring IOKit #296

Conversation

pfarner
Copy link

@pfarner pfarner commented May 4, 2015

Linux builds fail because the AppleSensors addon is requiring that IOKit is present:

{code}
% ./build.sh
-- Configuration set to: DebugFast
CMake Error at addons/AppleSensors/CMakeLists.txt:28 (message):
IOKit not found

-- Configuring incomplete, errors occurred!
See also "/home/presto/software/io/build/CMakeFiles/CMakeOutput.log".
See also "/home/presto/software/io/build/CMakeFiles/CMakeError.log".
-- Configuration set to: DebugFast
CMake Error at addons/AppleSensors/CMakeLists.txt:28 (message):
IOKit not found

-- Configuring incomplete, errors occurred!
See also "/home/presto/software/io/build/CMakeFiles/CMakeOutput.log".
See also "/home/presto/software/io/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
{code}

It appears that just making the definition of that module conditional on the presence of IOKit would allow builds to succeed on non-Apple operating systems. If any other variations are desired (somehow checking the OS directly, and then requiring IOKit if on MacOS?), that could be a good modification.

@mkroehnert
Copy link
Contributor

Hi, a better fix would be to only replace

    message(FATAL_ERROR "IOKit not found")
endif()

with

    message(STATUS "Not building AppleSensors because IOKit was not found")
elseif()

This would tell you in any case that the AppleSensors addon does not get built.

@mkroehnert
Copy link
Contributor

Updates to existing posts don't get published via email, so please take a look at the update on the web.
I changed the previous reply so it doesn't sound (unintentionally) unfriendly.

stevedekorte added a commit that referenced this pull request May 4, 2015
…ilable

Permitting non-Apple builds by not requiring IOKit
@stevedekorte stevedekorte merged commit 7bd51db into IoLanguage:master May 4, 2015
@stevedekorte
Copy link
Member

Thanks for the fix, Preston.
Manfred, I'd be happy to merge your change too.

@mkroehnert
Copy link
Contributor

@stevedekorte my suggestion would revert the merged patch and apply what I wrote in the comment.
However, I would not like to undo the work of this pull request.
@pfarner would you like to submit a followup patch?

@pfarner
Copy link
Author

pfarner commented May 5, 2015

Per mkroehnert's suggestion, I've filed another PR: #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants