https://bugs.kde.org/show_bug.cgi?id=360249
--- Comment #10 from Hohyeis <hohy...@eml.cc> --- I wish to know how to disable tests. I sought the information but did not find it. I also had CXXFLAGS set and exported when I ran CMake, '-Og' is a fairly new debugging level -- only a few years old. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html >enables optimizations that do not interfere with debugging. It should be the >optimization level of choice for the standard edit-compile-debug cycle, >offering a reasonable level of optimization while maintaining fast compilation >and a good debugging experience. I have a multi-core processor of about 4 years ago, but compile with only 1 core so that it is well measurable. I did 'time make -j1' . I've used Google Ninja because CMake generates Makefiles which are broken for multi-process/threaded compilation, depending on what is in the script. I have not observed that problem in the generated Makefiles for Trojita. A disadvantage of Google Ninja is that doesn't use environment variables, such as CFLAGS, CXXFLAGS, LDFLAGS. Here is a full execution line from the build with 'make'. In a new directory with export CXXFLAGS='-pipe -march=native -O0' cmake -DCMAKE_CXX_FLAGS=-O0 ../trojita make -j1 VERBOSE=1 /usr/bin/c++ -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_STRICT_ITERATORS -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_QSTRINGBUILDER -I/Source/trojita/src -I/Build -isystem /usr/include/qt -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -isystem /usr/lib/qt/mkspecs/linux-g++ -Wall -Wsign-compare -O2 -O0 -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -DNDEBUG -fPIC -fPIC -o CMakeFiles/Streams.dir/src/Streams/IODeviceSocket.cpp.o -c /Source/trojita/src/Streams/IODeviceSocket.cpp So, the optimization level is '-O2' even though I specified '-O0'. The CXXFLAGS variable in the shell when cmake was called also had '-pipe -march=native' which are missing, so we see that the variable from the shell passed to CMake was not used. I don't see where it is getting double '-O2' from. It is not coming from my CXXFLAGS or CFLAGS environment variable. It could be - the line adding -O2 to CMAKE_CXX_FLAGS is being called twice. - there is some rule where CMAKE_CXX_FLAGS is used twice. This could happen by being used once directly as CMAKE_CXX_FLAGS and another being appended to CXXFLAGS. -- You are receiving this mail because: You are watching all bug changes.