use cmake everywhere for desktop build, fix build warnings

This commit is contained in:
Jeff Wang
2019-11-14 02:40:07 -05:00
parent f25a71b74c
commit f70510e46a
7 changed files with 32 additions and 12 deletions

View File

@ -467,6 +467,7 @@ static int8_t compare_magn(void){ //returns a<b: -1, a==b: 0, a>b: 1
return a_signif_b;
}
#ifdef USE_COMPARE_DECN
static int8_t compare_decn(void){ //returns a<b: -1, a==b: 0, a>b: 1
int8_t is_neg;
@ -497,6 +498,7 @@ static int8_t compare_decn(void){ //returns a<b: -1, a==b: 0, a>b: 1
return is_neg * compare_magn();
}
#endif //USE_COMPARE_DECN
//WARNING: for add_decn() and sub_mag() functions only
//acc and the number from which exponent was taken MUST be stripped of leading 0s first

View File

@ -0,0 +1,9 @@
add_executable(div div_mfp.cpp)
target_link_libraries(div gmp)
add_executable(ln ln_mfp.cpp)
target_link_libraries(ln mpfr)
add_executable(exp exp.cpp)
target_link_libraries(exp mpfr)

View File

@ -1,10 +0,0 @@
all: div ln exp
div: div_mfp.cpp
g++ -Wall div_mfp.cpp -o div -lgmp
ln: ln_mfp.cpp
g++ -Wall ln_mfp.cpp -o ln -lmpfr
exp: exp.cpp
g++ -Wall exp.cpp -o exp -lmpfr