Conversation
|
Yes, it is better to remove requirement for C++ standard as mpreal can work with anything down to C++ 2003 and even older. |
|
Please consider removing the restriction on C++ standard. It is really has no sense for MPFR C++. Besides, GMP cannot be used in MSVC (MPIR is used instead). So that including GMP scripts has no sense for a lot of target users. |
…all the way back to 2003.
|
I'm removing the standard requirement. That's a good idea. |
|
I took out the GMP and MPFR scripts also. |
|
The CMakeLists does still have mpfr as a target link library for the example but it doesn't seem to need a script if mpfr is on your system. |
|
Ok, now I've pushed the changes to my branch. No sure what happened. I also merged the latest. |
|
Could you please elaborate a bit why do you think CMake is needed for mpreal at all? I use CMake in most of my projects, but I have difficulties in understanding how it can be useful for mpreal. Would appreciate to see some real example why this can be useful. |
|
This came up when I added mpreal as a submodule in a larger cmake project. This allows another part of the library to have add_executable(thing ...) So everywhere I use mpreal it's just adding one word in target_link_libraries. I agree that there's no reason intrinsic to mpreal to have CMakeLists (it does build the example) - it's just easier to integrate into a larger cmake project. Not that it's that hard anyway. |
|
I don't think having CMake would break other ways of using mpreal. |
This adds cmake support. This is useful to use mpreal as a submodule in another git project that uses cmake. The only targets are the interface (header-only) library mpreal and mpreal_example - the test/example utility. I left the makefile in the example directory as it doesn't impact cmake.
We could set the C++ version back to 11 if you want to.
Ed Smith-Rowland