MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0015459 | CMake | CMake | public | 2015-03-19 00:54 | 2015-11-02 09:13 |
|
Reporter | Norbert Pfeiler | |
Assigned To | Brad King | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | CMake 3.2.1 | |
Target Version | CMake 3.3 | Fixed in Version | CMake 3.3 | |
|
Summary | 0015459: autogen broken for ninja generator |
Description | Using automoc and autorcc,
cmake_autogen is only triggered when the resources change, leaving new or changed header files unprocessed.
Ironically (at least on linux) the target is now ›cmake_automoc‹ and not ›cmake_autogen‹ anymore.
Additionally on Windows all resources get assigned to »ident*« variables whose lines end with CRCRCRLF.
Ninja complains: »carriage returns are not allowed, use newlines«
The first 4 ident variables also only specify the source directory and no file |
Steps To Reproduce | use automoc and autorcc with the ninja generator
on windows: can’t build in the first place due to ninja complaining
on linux or after fixing the newlines on windows:
build → remove a generated moc file → build again → fail |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0015074 | closed | Stephen Kelly | Qt 5: resources aren't being updated when CMAKE_AUTORCC is used | related to | 0015523 | closed | Brad King | ninja AUTORCC with AUTOGEN_TARGET_DEPENDS generated resources |
|
Attached Files | cmake_autogen_test.7z (629) 2015-03-21 09:26 https://public.kitware.com/Bug/file/5410/cmake_autogen_test.7z cmake_generated_resource_test.7z (664) 2015-04-18 14:51 https://public.kitware.com/Bug/file/5434/cmake_generated_resource_test.7z |
|
Issue History |
Date Modified | Username | Field | Change |
2015-03-19 00:54 | Norbert Pfeiler | New Issue | |
2015-03-21 06:21 | Stephen Kelly | Note Added: 0038269 | |
2015-03-21 06:23 | Stephen Kelly | Note Added: 0038270 | |
2015-03-21 09:26 | Norbert Pfeiler | Note Added: 0038271 | |
2015-03-21 09:26 | Norbert Pfeiler | File Added: cmake_autogen_test.7z | |
2015-03-22 07:53 | Stephen Kelly | Note Added: 0038273 | |
2015-03-27 15:38 | Brad King | Note Added: 0038353 | |
2015-03-27 15:38 | Brad King | Assigned To | => Brad King |
2015-03-27 15:38 | Brad King | Status | new => resolved |
2015-03-27 15:38 | Brad King | Resolution | open => fixed |
2015-03-27 15:38 | Brad King | Fixed in Version | => CMake 3.3 |
2015-03-27 15:38 | Brad King | Target Version | => CMake 3.3 |
2015-03-27 15:38 | Brad King | Note Added: 0038354 | |
2015-03-27 15:39 | Brad King | Relationship added | related to 0015074 |
2015-04-15 20:57 | Norbert Pfeiler | Note Added: 0038528 | |
2015-04-15 20:57 | Norbert Pfeiler | Status | resolved => feedback |
2015-04-15 20:57 | Norbert Pfeiler | Resolution | fixed => reopened |
2015-04-16 08:25 | Brad King | Assigned To | Brad King => |
2015-04-16 08:25 | Brad King | Status | feedback => acknowledged |
2015-04-16 08:25 | Brad King | Resolution | reopened => open |
2015-04-16 08:25 | Brad King | Fixed in Version | CMake 3.3 => |
2015-04-16 08:25 | Brad King | Target Version | CMake 3.3 => |
2015-04-17 10:52 | Brad King | Note Added: 0038537 | |
2015-04-17 10:52 | Brad King | Assigned To | => Brad King |
2015-04-17 10:52 | Brad King | Status | acknowledged => resolved |
2015-04-17 10:52 | Brad King | Resolution | open => fixed |
2015-04-17 10:52 | Brad King | Fixed in Version | => CMake 3.3 |
2015-04-17 10:52 | Brad King | Target Version | => CMake 3.3 |
2015-04-18 14:51 | Norbert Pfeiler | File Added: cmake_generated_resource_test.7z | |
2015-04-18 14:57 | Norbert Pfeiler | Note Added: 0038540 | |
2015-04-18 14:57 | Norbert Pfeiler | Status | resolved => feedback |
2015-04-18 14:57 | Norbert Pfeiler | Resolution | fixed => reopened |
2015-04-20 08:37 | Brad King | Note Added: 0038543 | |
2015-04-20 08:37 | Brad King | Status | feedback => resolved |
2015-04-20 08:37 | Brad King | Resolution | reopened => fixed |
2015-04-20 08:52 | Norbert Pfeiler | Note Added: 0038545 | |
2015-04-20 10:00 | Brad King | Relationship added | related to 0015523 |
2015-11-02 09:13 | Robert Maynard | Note Added: 0039781 | |
2015-11-02 09:13 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0038269)
|
Stephen Kelly
|
2015-03-21 06:21
|
|
It works for me:
stephen@hal:~/dev/src/playground/cmake/build{master}$ cmake .. -G Ninja
-- The C compiler identification is GNU 4.9.1
-- The CXX compiler identification is GNU 4.9.1
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stephen/dev/src/playground/cmake/build
stephen@hal:~/dev/src/playground/cmake/build{master}$ ninja -v
[1/5] cd /home/stephen/dev/src/playground/cmake/build && /home/stephen/dev/prefix/qtbase/kde/bin/cmake -E cmake_autogen /home/stephen/dev/src/playground/cmake/build/CMakeFiles/mn_automoc.dir/ ""
Generating main.moc
[2/5] /usr/lib/ccache/c++ -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QML_LIB -fPIE -I. -I../ -isystem /home/stephen/dev/prefix/qtbase/include -isystem /home/stephen/dev/prefix/qtbase/include/QtQml -isystem /home/stephen/dev/prefix/qtbase/include/QtNetwork -isystem /home/stephen/dev/prefix/qtbase/include/QtCore -isystem /home/stephen/dev/prefix/qtbase/mkspecs/linux-g++ -MMD -MT CMakeFiles/mn.dir/main.cpp.o -MF CMakeFiles/mn.dir/main.cpp.o.d -o CMakeFiles/mn.dir/main.cpp.o -c ../main.cpp
[3/5]
[4/5] /usr/lib/ccache/c++ -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QML_LIB -fPIE -I. -I../ -isystem /home/stephen/dev/prefix/qtbase/include -isystem /home/stephen/dev/prefix/qtbase/include/QtQml -isystem /home/stephen/dev/prefix/qtbase/include/QtNetwork -isystem /home/stephen/dev/prefix/qtbase/include/QtCore -isystem /home/stephen/dev/prefix/qtbase/mkspecs/linux-g++ -MMD -MT CMakeFiles/mn.dir/mn_automoc.cpp.o -MF CMakeFiles/mn.dir/mn_automoc.cpp.o.d -o CMakeFiles/mn.dir/mn_automoc.cpp.o -c mn_automoc.cpp
[5/5] : && /usr/lib/ccache/c++ CMakeFiles/mn.dir/main.cpp.o CMakeFiles/mn.dir/mn_automoc.cpp.o -o mn -rdynamic /home/stephen/dev/prefix/qtbase/lib/libQt5Qml.so.5.5.0 /home/stephen/dev/prefix/qtbase/lib/libQt5Network.so.5.5.0 /home/stephen/dev/prefix/qtbase/lib/libQt5Core.so.5.5.0 -Wl,-rpath,/home/stephen/dev/prefix/qtbase/lib && :
stephen@hal:~/dev/src/playground/cmake/build{master}$ rm main.moc
stephen@hal:~/dev/src/playground/cmake/build{master}$ ninja -v
[1/3] cd /home/stephen/dev/src/playground/cmake/build && /home/stephen/dev/prefix/qtbase/kde/bin/cmake -E cmake_autogen /home/stephen/dev/src/playground/cmake/build/CMakeFiles/mn_automoc.dir/ ""
Generating main.moc
[2/3] /usr/lib/ccache/c++ -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QML_LIB -fPIE -I. -I../ -isystem /home/stephen/dev/prefix/qtbase/include -isystem /home/stephen/dev/prefix/qtbase/include/QtQml -isystem /home/stephen/dev/prefix/qtbase/include/QtNetwork -isystem /home/stephen/dev/prefix/qtbase/include/QtCore -isystem /home/stephen/dev/prefix/qtbase/mkspecs/linux-g++ -MMD -MT CMakeFiles/mn.dir/main.cpp.o -MF CMakeFiles/mn.dir/main.cpp.o.d -o CMakeFiles/mn.dir/main.cpp.o -c ../main.cpp
[3/3] : && /usr/lib/ccache/c++ CMakeFiles/mn.dir/main.cpp.o CMakeFiles/mn.dir/mn_automoc.cpp.o -o mn -rdynamic /home/stephen/dev/prefix/qtbase/lib/libQt5Qml.so.5.5.0 /home/stephen/dev/prefix/qtbase/lib/libQt5Network.so.5.5.0 /home/stephen/dev/prefix/qtbase/lib/libQt5Core.so.5.5.0 -Wl,-rpath,/home/stephen/dev/prefix/qtbase/lib && :
stephen@hal:~/dev/src/playground/cmake/build{master}$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
project(cmaketest)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(mn main.cpp)
find_package(Qt5Qml REQUIRED)
target_link_libraries(mn Qt5::Qml) |
|
|
(0038270)
|
Stephen Kelly
|
2015-03-21 06:23
|
|
I tested with master and with `cmake version 2.8.12.2` |
|
|
(0038271)
|
Norbert Pfeiler
|
2015-03-21 09:26
|
|
That’s because you didn’t include resources.
I took the time and uploaded a minimal test case. |
|
|
(0038273)
|
Stephen Kelly
|
2015-03-22 07:53
|
|
Thanks, confirmed.
It works with Makefiles, but not with Ninja. I don't know enough about Ninja to know why. |
|
|
(0038353)
|
Brad King
|
2015-03-27 15:38
|
|
|
|
(0038354)
|
Brad King
|
2015-03-27 15:38
|
|
Re 0015459:0038353: Steve, please look at updating the test suite to cover this case. |
|
|
(0038528)
|
Norbert Pfeiler
|
2015-04-15 20:57
|
|
The test case still doesn’t work on Windows. (the second part of the issue)
> ninja --version && cmake --version && mkdir build && cd build && cmake -G Ninja .. && ninja
1.5.3
cmake version 3.2.20150415-g8469b
CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/cmake_autogen_test/build
ninja: error: build.ninja:108: lexing error
ident0 = ../
^ near here |
|
|
(0038537)
|
Brad King
|
2015-04-17 10:52
|
|
|
|
(0038540)
|
Norbert Pfeiler
|
2015-04-18 14:57
|
|
I attached a new test case.
It has a resource which is generated and marked as »AUTOGEN_TARGET_DEPENDS«.
Works with make, doesn’t with ninja. |
|
|
(0038543)
|
Brad King
|
2015-04-20 08:37
|
|
|
|
(0038545)
|
Norbert Pfeiler
|
2015-04-20 08:52
|
|
OK, i just thought it may have to do with the fixes for this bug… |
|
|
(0039781)
|
Robert Maynard
|
2015-11-02 09:13
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|