Hello, The cmake’s automoc functionality has stopped working in my codebase since version 3.8.2 and 3.9.1.
My code base was compiling/building fine until I updated CMake. If I downgrade it to 3.7.9 or lower then it compiles fine again. The error code that I get is the following: Scanning dependencies of target analysis [ 65%] Building CXX object src/model/CMakeFiles/model.dir/GeneItemModel.cpp.o [ 66%] Building CXX object src/analysis/CMakeFiles/analysis.dir/AnalysisDEA.cpp.o [ 67%] Building CXX object src/viewRenderer/CMakeFiles/viewRenderer.dir/GraphicItemGL.cpp.o [ 68%] Built target viewPages [ 70%] Building CXX object src/model/CMakeFiles/model.dir/SpotItemModel.cpp.o [ 71%] Built target viewRenderer [ 72%] Building CXX object src/analysis/CMakeFiles/analysis.dir/AnalysisQC.cpp.o [ 73%] Building CXX object src/analysis/CMakeFiles/analysis.dir/AnalysisCorrelation.cpp.o [ 74%] Built target model [ 75%] Building CXX object src/analysis/CMakeFiles/analysis.dir/AnalysisClustering.cpp.o [ 76%] Building CXX object src/analysis/CMakeFiles/analysis.dir/ChartView.cpp.o [ 77%] Built target analysis Scanning dependencies of target STViewer make[2]: *** No rule to make target `src/dialogs/CMakeFiles/dialogs.dir/dialogs_autogen/moc_compilation.cpp.o', needed by `STViewer.app/Contents/MacOS/STViewer'. Stop. make[2]: *** Waiting for unfinished jobs.... [ 78%] Building CXX object src/CMakeFiles/STViewer.dir/main.cpp.o [ 81%] Building CXX object src/CMakeFiles/STViewer.dir/STViewer_autogen/moc_compilation.cpp.o [ 82%] Building CXX object src/CMakeFiles/STViewer.dir/mainWindow.cpp.o [ 82%] Building CXX object src/CMakeFiles/STViewer.dir/STViewer_autogen/AXPSB5LYZJ/qrc_application.cpp.o make[1]: *** [src/CMakeFiles/STViewer.dir/all] Error 2 make: *** [all] Error 2 The source is structured in different source folders and I use the cmake’s automoc set(CMAKE_AUTOMOC ON) Has anybody experienced similar issues? Has anything changed in the way cmake performs automoc since version 3.8.x? Thanks in advance! Best, Jose
-- 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