CodeBlocks: Generator behaviour change in object libraries 3.6->3.7 (Regression?)
I have noticed after upgrading to Cmake 3.7 (3.8.2 problem still exists): when using object libraries, generated object files now persist in project tree (just after configuration).
You can see Qt Creator screenshot at https://bugreports.qt.io/browse/QTCREATORBUG-18308
Actually, when using generator CodeBlocks + Ninja, .cbp files are different, e.g:
<Unit filename="/home/mapron/bugs/lib.cpp">
<Option target="demoLib_"/>
</Unit>
<Unit filename="/home/mapron/bugs/test.cpp">
<Option target="demo"/>
</Unit>
<Unit filename="/home/mapron/bugs/CMakeLists.txt">
<Option virtualFolder="CMake Files\"/>
</Unit>
for 3.6, and
<Unit filename="/home/mapron/bugs/lib.cpp">
<Option target="demoLib_"/>
</Unit>
<Unit filename="/home/mapron/bugs/test.cpp">
<Option target="demo"/>
</Unit>
<Unit filename="/home/mapron/build-bugs-cmake382-Default/CMakeFiles/demoLib_.dir/lib.cpp.o">
<Option target="demoLib"/>
</Unit>
<Unit filename="/home/mapron/bugs/CMakeLists.txt">
<Option virtualFolder="CMake Files\"/>
for 3.8.2
cmake file have these contents:
cmake_minimum_required(VERSION 3.5.0)
project(demo)
set(libSources lib.cpp)
add_library(demoLib_ OBJECT ${libSources})
set(libSources $<TARGET_OBJECTS:demoLib_>)
add_library(demoLib STATIC ${libSources})
add_executable(demo test.cpp)
As you see, after 3.7 generated object files now present in sources list. Is this bug or documented change?