Hello,

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_>)

#set_source_files_properties(${libSources} PROPERTIES EXTERNAL_OBJECT true GENERATED true)
add_library(demoLib STATIC ${libSources})
add_executable(demo test.cpp)

Any ideas? Is this bug or feature?

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to