Add cmake option to tell whether architectures should be included by default#1463
Add cmake option to tell whether architectures should be included by default#1463aquynh merged 9 commits intocapstone-engine:masterfrom
Conversation
|
but we already had this: did you look at https://github.com/aquynh/capstone/blob/master/cmake-x86.sh? |
|
@aquynh Oh, I totally missed this, sorry. I didn't look for anything x86 specific in the CMakeLists file, just at what the default was :) I guess this is only supported for x86 specifically? |
|
Yes feel free to extend this for next non-x86 archs
|
…use the CAPSTONE_ARCHITECUTRE_DEFAULT option, which can be used with any architecture.
…into arch_default
|
How is this? I removed the This should work equally for other architectures as well, and allows building multiple architectures without having to disable all others first. But, I haven't added shell scripts for every one of them (seems a bit excessive?) |
|
we can modify cmake.sh, and build architecture as option (so that if nothing is passed in, we compile all)? |
|
we also have https://github.com/aquynh/capstone/blob/master/nmake-x86.bat (and nmake.bat) for Windows, that should be changed too. |
I don't see any
I've updated nmake-x86.bat already :) |
|
yes, then you can create |
|
i think we can make |
|
Ok. I've updated those scripts and removed For x86, etc. I was not able to fully test |
|
can you please update https://github.com/aquynh/capstone/blob/master/COMPILE_CMAKE.TXT with these new scripts? |
|
I've updated the documentation w.r.t. this PR, and added some more instructions as well, like how to use the |
|
very nice, can you update the section about |
|
@aquynh I've put that at (3), together with a list of all the supported architectures. I mention that the option works for either |
|
ah i see, that is ok then. |
|
merged, thanks! |
|
Great 😄 |
|
would you please make similar pull req for "next" & "v4" branches? these branches either have or do not have some architectures, so i cannot cherry pick this pull req. |
|
Sure, I'll take a look |
I'm statically linking capstone, and my compiler is Visual Studio. But, some of the architecture specific code relies on gcc extensions it seems, so the linking fails. As a result I have to disable these architectures, but really I only need x86 support any ways.
It would be nice if the default for including architectures could be configured, so I'd only have to pass 2 flags, e.g.
Instead of having to explicitly disable all the other architectures.
So, that's what this PR does.