Release build via CMake vs raw Makefile
回答済みHello,
Going through this post, I observe that for CMake builds, explicitly user care has to be taken for release mode builds vs debug mode builds.
The same care does not seem to be required of raw Makefile builds. Looking at the official Makefile provided via the setup, available at examples/build/ folder of the installation, there is no -O2 flag I observe, for instance, to turn on optimizations which are common in release mode builds.
Likewise, general practice seems to suggest to have -g only for debug builds but not for release builds (See SO post here) while the example Makefile provided seems to apply -g regardless of build type (debug or release)
Thank you
-
The Makefile provided in the examples/build directory of the Gurobi installation is not intended as a template for building a production application. Rather, it is intended as a way to compile and run the examples across all the API languages that Gurobi supports. For a real application, yes, you might add optimization flags and/or remove debug symbols for some builds. Typically you would also separate the compiling and linking steps for larger applications.
CMake has its own built-in standard configurations (e.g. Release, Debug), which is why they're covered in the post you referenced. But it's also common to need further customisation for your own builds.
2
サインインしてコメントを残してください。
コメント
1件のコメント