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

Better handling external capstone #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

XVilka
Copy link

@XVilka XVilka commented May 16, 2017

If you want to build it against capstone outside of standard prefix.

If you want to build it against capstone outside of standard prefix.
@@ -41,7 +45,7 @@ add_custom_command(OUTPUT ${pythonbindingsfile}
COMMAND "${CMAKE_C_COMPILER}" -E ${LLVM_DEFINITIONS} -isystem ${LLVM_INCLUDE_DIRS} "${LLVM_INCLUDE_DIRS}/llvm-c/Core.h" | python "${CMAKE_SOURCE_DIR}/fcd/python/bindings.py" > ${pythonbindingsfile})

### header search paths file ###
execute_process(COMMAND "${CMAKE_CXX_COMPILER}" -E -x c++ -v /dev/null OUTPUT_VARIABLE dummy ERROR_VARIABLE defaultHeaderSearchPathList)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-std=gnu++14 is not necessary, this command is preprocessing /dev/null to get the default include path from the stderr output. In fact, it almost certainly should be invoking ${CMAKE_C_COMPILER}, because right now it gets the C++ include path and fcd wouldn't know what to do with it.

@fay59
Copy link
Owner

fay59 commented May 16, 2017

The failure is just Travis being Travis on macOS.

Are we happy adding /include to the include path and /lib to the library search path when CAPSTONE_DIR is unset/is there a normal way to deal with that issue?

I'm not very knowledgeable about CMake, so I'd like to wait until @Trass3r gets a chance to look at it (or affirmatively declines to).

@XVilka
Copy link
Author

XVilka commented May 17, 2017

I think there is a better way. Will push better version bit later.

@Trass3r
Copy link
Contributor

Trass3r commented May 17, 2017

An import target might be a bit cleaner than manually messing with the flags.

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.

3 participants