compilation-time


How to improve Visual C++ compilation times?

∥☆過路亽.° 提交于 2019-12-18 10:15:03
问题 I am compiling 2 C++ projects in a buildbot, on each commit. Both are around 1000 files, one is 100 kloc, the other 170 kloc. Compilation times are very different from gcc (4.4) to Visual C++ (2008). Visual C++ compilations for one project take in the 20 minutes. They cannot take advantage of the multiple cores because a project depend on the other. In the end, a full compilation of both projects in Debug and Release, in 32 and 64 bits takes more than 2 1/2 hours. gcc compilations for one

How to reduce compile time for large C++ library of individual .cpp files?

筅森魡賤 提交于 2019-12-13 07:57:37
问题 We're developing a C++ library with currently over 500 hundred individual .cpp files. These are each compiled and archived into a static library. Even with a parallel build, this takes some minutes. I'd like to reduce this compilation time. Each file is on average 110 lines with a function or two inside. However, for each .cpp file there is a corresponding .h header and these are often included by many of the .cpp files. For example, A.h might be included by A.cpp , B.cpp , C.cpp , and so on.

How can I check if a library is available before compiling a C program

拜拜、爱过 提交于 2019-12-07 06:44:44
问题 Is there a way to include a library only if it is available to the compiler? I thought about checking it with #ifndef (as shown below) but it just checks if a macro name is not defined and what I really need is to check if the compiler can reach to a C library in the compilation time. #ifndef _MY_LIBRARY_H #include "my_library.h" #endif Is there a way to do this verification? 回答1: Clang and GCC have had a __has_include macro for a very long time, which you can use like this: #if __has_include

How can I check if a library is available before compiling a C program

爷,独闯天下 提交于 2019-12-05 08:27:56
Is there a way to include a library only if it is available to the compiler? I thought about checking it with #ifndef (as shown below) but it just checks if a macro name is not defined and what I really need is to check if the compiler can reach to a C library in the compilation time. #ifndef _MY_LIBRARY_H #include "my_library.h" #endif Is there a way to do this verification? Clang and GCC have had a __has_include macro for a very long time, which you can use like this: #if __has_include("my_library.h") #include "my_library.h" #endif It works with angle brackets too (in fact, it works with

Speed up compilation in GHC

老子叫甜甜 提交于 2019-12-04 19:09:33
问题 Is there options, except -O0 , that can speed up compilation time? It's not matter if resulting programs will be not optimised. Actually I want to just type-check large haskell package often and fast. Flag -fno-code dramatically speeds up compilation but it's not possible to use it because TemplateHaskell is used by this program. 回答1: Looks like a task for hdevtools! Hdevtools is used to as a backend for vim-plugin of the same name and it provides speedy syntax and type checking, directly

Speed up compilation in GHC

匆匆过客 提交于 2019-12-03 12:23:05
Is there options, except -O0 , that can speed up compilation time? It's not matter if resulting programs will be not optimised. Actually I want to just type-check large haskell package often and fast. Flag -fno-code dramatically speeds up compilation but it's not possible to use it because TemplateHaskell is used by this program. Looks like a task for hdevtools ! Hdevtools is used to as a backend for vim-plugin of the same name and it provides speedy syntax and type checking, directly from the editor. It is about as fast as ghci when reloading modules. I assume that it can be used from the

How to reduce compilation times with Boost Asio

廉价感情. 提交于 2019-12-01 06:50:11
问题 Boost.Asio is great library but it has one huge drawback -- extreamly slow compilation times. A simple implementation (really simple) of HTTP protocol (about 1k lines of code) requires about 13.5s to compile under GCC 4.4! I tryed to use PCH but it does not improve compilation times too much (about 1s. only). So are there any tutorials on how to make Boost.Asio compilation times faster? For example what headers should I exactly include for what class. I use for example: io_service , tcp::ip:

How to improve Visual C++ compilation times?

半世苍凉 提交于 2019-11-29 20:45:12
I am compiling 2 C++ projects in a buildbot, on each commit. Both are around 1000 files, one is 100 kloc, the other 170 kloc. Compilation times are very different from gcc (4.4) to Visual C++ (2008). Visual C++ compilations for one project take in the 20 minutes. They cannot take advantage of the multiple cores because a project depend on the other. In the end, a full compilation of both projects in Debug and Release, in 32 and 64 bits takes more than 2 1/2 hours. gcc compilations for one project take in the 4 minutes. It can be parallelized on the 4 cores and takes around 1 min 10 secs. All 8

How to speed up MonoTouch compilation time?

风流意气都作罢 提交于 2019-11-28 16:58:47
It is well known that If compiling takes even 15 seconds, programmers will get bored while the compiler runs and switch over to reading The Onion , which will suck them in and kill hours of productivity. Our MonoTouch app takes 40 seconds to compile on Macbook Air in Debug/Simulator configuration. We have about 10 assemblies in the solution. We're also linking against some native libraries with gcc_flags . I'm sure there are ways to optimize compilation time that I'm not aware of, which might have to do with references, linker, whatever. I'm asking this question in hope that someone with

How to speed up MonoTouch compilation time?

梦想与她 提交于 2019-11-27 10:07:54
问题 It is well known that If compiling takes even 15 seconds, programmers will get bored while the compiler runs and switch over to reading The Onion, which will suck them in and kill hours of productivity. Our MonoTouch app takes 40 seconds to compile on Macbook Air in Debug/Simulator configuration. We have about 10 assemblies in the solution. We're also linking against some native libraries with gcc_flags . I'm sure there are ways to optimize compilation time that I'm not aware of, which might

工具导航Map