build-time

GCC/Make Build Time Optimizations

…衆ロ難τιáo~ 提交于 2019-12-31 10:01:53
问题 We have project which uses gcc and make files. Project also contains of one big subproject (SDK) and a lot of relatively small subprojects which use that SDK and some shared framework. We use precompiled headers, but that helps only for re-compilation to be faster. Is there any known techniques and tools to help with build-time optimizations? Or maybe you know some articles/resources about this or related topics? 回答1: You can tackle the problem from two sides: refactor the code to reduce the

GCC/Make Build Time Optimizations

最后都变了- 提交于 2019-12-31 10:01:47
问题 We have project which uses gcc and make files. Project also contains of one big subproject (SDK) and a lot of relatively small subprojects which use that SDK and some shared framework. We use precompiled headers, but that helps only for re-compilation to be faster. Is there any known techniques and tools to help with build-time optimizations? Or maybe you know some articles/resources about this or related topics? 回答1: You can tackle the problem from two sides: refactor the code to reduce the

Get build date and time in Swift

半城伤御伤魂 提交于 2019-12-18 04:37:11
问题 I'm using __DATE__ and __TIME__ in Objective-C to get the build date and time of my app. I can't find a way to get this information in Swift. Is it possible? 回答1: You can use #line , #column , and #function . Original answer: Create a new Objective-C file in your project, and when Xcode asks, say yes to creating the bridging header. In this new Objective-C file, add the following the the .h file: NSString *compileDate(); NSString *compileTime(); And in the .m implement these functions:

Is there a cross-compiler method to disable coverage flags for test executables using CMake?

两盒软妹~` 提交于 2019-12-13 03:39:49
问题 I am creating a generic C++, CMake, and Catch project template that I plan on using in the future, and want to enable code coverage reports for it. To do so, I decided to add the following CMake module into my list of Modules: CodeCoverage.cmake. My usage for this essentially boils down to the following snippet: if (ENABLE_COVERAGE AND NOT CMAKE_CONFIGURATION_TYPES) if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") message(STATUS "Coverage in a non-debug build may lead to misleading results! Setting

Does the number of projects in a Visual Studio 9 solution impact the solution load and build times?

半世苍凉 提交于 2019-12-03 12:53:30
问题 I'm specifically interested in solution load times & build times - does fewer solutions mean better performance? Note that I'm not referring to the performance of the built application. Are load times and build times more efficient when working with a smaller number of projects? As a guide, we have 50-60 projects in our Visual Studio solution. 回答1: I depends on your project, most of the time I work with 10-15. The less projects the shorter the build time. Projects I typically have are: base

Importing header in objective c

时光怂恿深爱的人放手 提交于 2019-11-30 09:35:12
In Objective-c when we using object of one class into another class by convention we should forward declare the class in .h file, i.e. @class classname; . And should import the header file in .m file, i.e. #import "header.h" . But if we import the header file in .h then we don't have to import it again in .m file . So what is the reason behind this convention? Which is efficient way? So what is the reason behind this convention? You should favor forward declarations ( @class MONClass; ) where possible because the compiler needs to know a typename is an objc class before it is used, and because

Importing header in objective c

末鹿安然 提交于 2019-11-29 14:13:31
问题 In Objective-c when we using object of one class into another class by convention we should forward declare the class in .h file, i.e. @class classname; . And should import the header file in .m file, i.e. #import "header.h" . But if we import the header file in .h then we don't have to import it again in .m file . So what is the reason behind this convention? Which is efficient way? 回答1: So what is the reason behind this convention? You should favor forward declarations ( @class MONClass; )

Get build date and time in Swift

风流意气都作罢 提交于 2019-11-29 06:21:10
I'm using __DATE__ and __TIME__ in Objective-C to get the build date and time of my app. I can't find a way to get this information in Swift. Is it possible? You can use #line , #column , and #function . Original answer: Create a new Objective-C file in your project, and when Xcode asks, say yes to creating the bridging header. In this new Objective-C file, add the following the the .h file: NSString *compileDate(); NSString *compileTime(); And in the .m implement these functions: NSString *compileDate() { return [NSString stringWithUTF8String:__DATE__]; } NSString *compileTime() { return