Benefits of ‘Optimize code’ option in Visual Studio build

You are the only person who can answer the “performance hit” question. Try it both ways, measure the performance, and see what happens. The hit could be enormous or it could be nonexistant; no one reading this knows whether “enormous” to you means one microsecond or twenty minutes. If you’re interested in what optimizations are … Read more

Can I get a report of ALL the libraries linked when building my C++ executable (gcc)? (including statically linked)

I had similar problem and found solution: add -Wl,–verbose option when linking. It will switch linker to verbose mode: gcc -o test main.o -ltest -L. -Wl,–verbose Here is example output: GNU ld (GNU Binutils) 2.23.52.20130604 Supported emulations: i386pep i386pe using internal linker script: ================================================== /* Default linker script, for normal executables */ [many lines here] … Read more

Check gcc minor in cmake

Use if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.2) as mentioned by onqtam. This obsolete answer was back from the 2.6 CMake days. You could run gcc -dumpversion and parse the output. Here is one way to do that: if (CMAKE_COMPILER_IS_GNUCC) execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) string(REGEX MATCHALL “[0-9]+” GCC_VERSION_COMPONENTS ${GCC_VERSION}) list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR) list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR) message(STATUS … Read more

Visual Studio solution file – what does the “Build.0” mean?

Yes, your hunch was right. It does mean that the project has its Build option ticked to build under the build configuration. I just tested this by opening the solution in one instance of Visual Studio and the .sln file in the text editor (open with) of another Visual Studio instance. If you change the … Read more

Xcode 4 terms “Build for testing / Build for running / build for profiling / build for archiving”

Running is for running your app (on the Mac for Mac OS X, in the simulator or on the device for iOS). Profiling is for running your app with Instruments (for finding memory leaks, bottlenecks etc.). Testing is for running unit tests. Archiving is building a distributable package of you app (incl. Ad-hoc iPhone distributions … Read more