ra3xdh / qucsator_rf

Qucsator-RF is RF circuit simulation kernel for Qucs-S
https://ra3xdh.github.io/
GNU General Public License v2.0
9 stars 3 forks source link

refactoring cmake #17

Closed dsm closed 1 week ago

dsm commented 3 weeks ago

Hi, this PR refactor cmake file to build with same flag for qucs-s and remove unnecessary checks so time consuming.

ra3xdh commented 3 weeks ago

Yes, I was considering to remove the check for functions. But the removing theses checks from CMake is not sufficient. The HAVE_COMPLEX_XXX definitions are used in src/math/complex.cpp and src/math/real.cpp If these macros are not defined the qucsator implies the complex funcitons are missing and emulates it by software means. Please check carefully if these macros are in use. The same concerns SIZEOF_DOUBLE etc.

It makes sense to disable software emulation of the complex functions, because it is part of C++ standard in the modern C++.

dsm commented 3 weeks ago

We use gcc 12 or later or clang so this checks not meaning for modern compiler, so maybe we check compiler version or we target above c++11 but yes code base needs some modernization and we should remove this macros in code.

ra3xdh commented 2 weeks ago

I will try to remove function wrappers in complex.cpp and real.cpp and then merge this PR.

ra3xdh commented 1 week ago

I have added #18 removing HAVE_CXX and HAVE_STD definitions usage. Now real.cpp and complex.cpp switched to C++11 implementation. Software emulation of the math functions disabled. Merging this PR become possible.