CMake issueshttps://gitlab.kitware.com/cmake/cmake/-/issues2021-01-27T10:18:59-05:00https://gitlab.kitware.com/cmake/cmake/-/issues/18591CTest - Standard input ignored2021-01-27T10:18:59-05:00Jérôme VelutCTest - Standard input ignoredA simple program reading console input shows unexpected behaviour when executed from ctest: std::cin does not wait for user input and returns immediately.
[Here](/uploads/494aa3c21e24a4a2b755eb1a15e2f6d4/testBugCtest.zip) is a minimal e...A simple program reading console input shows unexpected behaviour when executed from ctest: std::cin does not wait for user input and returns immediately.
[Here](/uploads/494aa3c21e24a4a2b755eb1a15e2f6d4/testBugCtest.zip) is a minimal example reproducing the issue: just build with cmake/make then run ctest.
Tested version: 3.11.2
3.10.0 does not have this issue.
(maybe linked to #17672 ?)3.13.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/issues/18575ASM compiler id not found for Clang with CMake 3.13.0-rc32018-11-12T08:16:32-05:00Gregor JasnyASM compiler id not found for Clang with CMake 3.13.0-rc3Hello,
I noticed that CMake 3.13.0-rc3 has broken support for GNU assembly for Android. CMake 3.12.3 works as expected. Testcase:
Content of `CMakeLists.txt`:
```CMake
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(test...Hello,
I noticed that CMake 3.13.0-rc3 has broken support for GNU assembly for Android. CMake 3.12.3 works as expected. Testcase:
Content of `CMakeLists.txt`:
```CMake
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(testcase)
enable_language(ASM)
add_library(foo STATIC foo.S)
```
Content of `foo.S`
```
.arm
```
Configure with: `cmake -GNinja -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/opt/android-ndk-r16b -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_SYSTEM_VERSION=19 -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang ..`
Resulting compilation line with CMake 3.12: `/opt/android-ndk-r16b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7-none-linux-androideabi --sysroot=/opt/android-ndk-r16b/sysroot -g -fPIC -MD -MT CMakeFiles/foo.dir/foo.S.o -MF CMakeFiles/foo.dir/foo.S.o.d -o CMakeFiles/foo.dir/foo.S.o -c ../foo.S`
Faulty line with 3.13rc: `/opt/android-ndk-r16b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -o CMakeFiles/foo.dir/foo.S.o -c ../foo.S`
Thanks,
Gregor3.13.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/issues/18491Interface library warnings, but only when using cmake -E server mode2018-10-24T07:30:21-04:00Craig ScottInterface library warnings, but only when using cmake -E server modeThis is a regression with CMake 3.13.0-rc1.
Consider the following minimal project:
```cmake
cmake_minimum_required(VERSION 3.7)
project(CMakeTest)
add_library(realstuff foo.cpp)
add_library(myiface INTERFACE)
target_link_libraries(m...This is a regression with CMake 3.13.0-rc1.
Consider the following minimal project:
```cmake
cmake_minimum_required(VERSION 3.7)
project(CMakeTest)
add_library(realstuff foo.cpp)
add_library(myiface INTERFACE)
target_link_libraries(myiface INTERFACE realstuff)
```
If processing this with `cmake` or `cmake-gui`, there are no warnings. If you load this project in Qt Creator, which uses `cmake -E server` instead, there are many warnings about non-whitelisted properties that this project does not actually set. Here's an example of that output:
```
Starting to parse CMake project.
Configuring done
Generating done
CMake Error at CMakeLists.txt:6 (add_library):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "INTERPROCEDURAL_OPTIMIZATION_DEBUG" is not allowed.
CMake Error at CMakeLists.txt:6 (add_library):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "INTERPROCEDURAL_OPTIMIZATION" is not allowed.
CMake Error at CMakeLists.txt:6 (add_library):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "CXX_VISIBILITY_PRESET" is not allowed.
CMake Error at CMakeLists.txt:6 (add_library):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "COMPILE_FLAGS" is not allowed.
CMake Error at CMakeLists.txt:6 (add_library):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "CXX_EXTENSIONS" is not allowed.
CMake Error at CMakeLists.txt:6 (add_library):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "CXX_STANDARD" is not allowed.
CMake Error at CMakeLists.txt:6 (add_library):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "COMPILE_DEFINITIONS_DEBUG" is not allowed.
CMake Project was parsed successfully.
```
This does not occur when using 3.12.3, so it is a behaviour change with 3.13.0-rc1. Tested on Linux, if that matters.3.13.0https://gitlab.kitware.com/cmake/cmake/-/issues/18466DeployQt4.cmake warns about CMP00802018-10-19T10:15:07-04:00Robert MaynardDeployQt4.cmake warns about CMP0080The `DeployQt4.cmake` module provides a collection of configure and install time functionality to make it easy to install QT4 applications.
Due to CMP0080 it now warns as it includes `BundleUtilities` at configure time.
The solution l...The `DeployQt4.cmake` module provides a collection of configure and install time functionality to make it easy to install QT4 applications.
Due to CMP0080 it now warns as it includes `BundleUtilities` at configure time.
The solution looks to be that we need to break `DeployQt4.cmake` into two modules. The first provides the install time functions that use `BundleUtilities`. The second would only provide the configure time functions that setup the install code hooks. I expect that both of these files will need to be named respectively `DeployQt4Install.cmake`, `DeployQt4Configure.cmake`. Than the new `DeployQt4.cmake` can include the correct implementations based on if we are configure/installing and the setting of `CMP0080`.3.13.0Kyle EdwardsKyle Edwardshttps://gitlab.kitware.com/cmake/cmake/-/issues/18463Error "INTERFACE_LIBRARY targets may only have whitelisted properties" during...2019-08-14T07:39:50-04:00Kevin PuetzError "INTERFACE_LIBRARY targets may only have whitelisted properties" during "codemodel" server commandTesting our projects with cmake-3.13.0-rc1-win64-x64.zip, we are now seeing errors that are not present in 3.12
> CMake Error at CMakeLists.txt:8 (add_library):
> INTERFACE_LIBRARY targets may only have whitelisted properties. The
> ...Testing our projects with cmake-3.13.0-rc1-win64-x64.zip, we are now seeing errors that are not present in 3.12
> CMake Error at CMakeLists.txt:8 (add_library):
> INTERFACE_LIBRARY targets may only have whitelisted properties. The
> property "INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO" is not allowed.
>
>
> CMake Error at CMakeLists.txt:8 (add_library):
> INTERFACE_LIBRARY targets may only have whitelisted properties. The
> property "INTERPROCEDURAL_OPTIMIZATION" is not allowed.
>
>
> CMake Error at CMakeLists.txt:8 (add_library):
> INTERFACE_LIBRARY targets may only have whitelisted properties. The
> property "COMPILE_FLAGS" is not allowed.
>
>
> CMake Error at CMakeLists.txt:8 (add_library):
> INTERFACE_LIBRARY targets may only have whitelisted properties. The
> property "CXX_EXTENSIONS" is not allowed.
>
>
> CMake Error at CMakeLists.txt:8 (add_library):
> INTERFACE_LIBRARY targets may only have whitelisted properties. The
> property "CXX_STANDARD" is not allowed.
>
>
> CMake Error at CMakeLists.txt:8 (add_library):
> INTERFACE_LIBRARY targets may only have whitelisted properties. The
> property "COMPILE_DEFINITIONS_RELWITHDEBINFO" is not allowed.
These do not appear when running CMake on the command-line, because they are not occurring during configure or generate, but after generation when Qt Creator requests the codemodel. I think this seems to be fallout of !2282, since prior to that codemodel didn't process INTERFACE libraries at all (`DumpTarget` would just exit early). Now it goes on, So these errors are presumably coming from all the various calls to `GetTargetProperty` that are present for other target types, but not allowed for INTERFACE libraries.
This can be reproduced with the attached sample [interface_library_errors.7z](/uploads/fac86fb760db83739f1d94b66199a7b8/interface_library_errors.7z), using the below (substitute your paths for sourceDirectory/buildDirectory, of course)
cmake -E server --debug --experimental
> [== "CMake Server" ==[
> {"cookie":"zimtstern","type":"handshake","protocolVersion":{"major":1}, "sourceDirectory":"...", "buildDirectory":"...", "generator":"Ninja"}
> ]== "CMake Server" ==]
>
> [== "CMake Server" ==[
> {"type":"configure", "cacheArguments":[]}
> ]== "CMake Server" ==]
>
> [== "CMake Server" ==[
> {"type":"compute"}
> ]== "CMake Server" ==]
>
> [== "CMake Server" ==[
> {"type":"codemodel"}
> ]== "CMake Server" ==]3.13.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/issues/18435New 3.13-rc1 genex support in install(CODE|SCRIPT) may break legacy script code2018-10-12T08:11:52-04:00Nils GladitzNew 3.13-rc1 genex support in install(CODE|SCRIPT) may break legacy script codeGiven the following contrived example
```cmake
cmake_minimum_required(VERSION 3.11)
project(Foo NONE)
install(CODE [[
message("$<FOOBAR>")
]])
```
This will configure without error in e.g 3.11 but starting with 3.13-rc1 it will p...Given the following contrived example
```cmake
cmake_minimum_required(VERSION 3.11)
project(Foo NONE)
install(CODE [[
message("$<FOOBAR>")
]])
```
This will configure without error in e.g 3.11 but starting with 3.13-rc1 it will produce the following error:
```
CMake Error:
Error evaluating generator expression:
$<FOOBAR>
Expression did not evaluate to a known generator expression
```
This probably isn't too difficult to work around in existing code and may even be rare but may warrant a policy?3.13.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/issues/18433FindBISON declares output file twice when VERBOSE is specified2018-10-09T15:23:27-04:00Michael ForneyFindBISON declares output file twice when VERBOSE is specifiedI was taking a look at some `multiple rules generate XXX` warnings from ninja while investigating https://github.com/michaelforney/samurai/pull/11, and discovered that it was caused by `BISON_TARGET` and its verbose output.
The .txt fil...I was taking a look at some `multiple rules generate XXX` warnings from ninja while investigating https://github.com/michaelforney/samurai/pull/11, and discovered that it was caused by `BISON_TARGET` and its verbose output.
The .txt file is listed as an output of a copy action [here](https://gitlab.kitware.com/cmake/cmake/blob/2b836a01217a8e6f14ba5f0d8b89d660e6c5cfca/Modules/FindBISON.cmake#L162), and added to the main bison command outputs [here](https://gitlab.kitware.com/cmake/cmake/blob/2b836a01217a8e6f14ba5f0d8b89d660e6c5cfca/Modules/FindBISON.cmake#L172-173). I believe that the latter is incorrect, and simply removing those two lines will fix the issue.3.13.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/issues/18245Autogen: Qt5Autogen.MocOsMacros test failure on macOS nightly binary2018-08-10T10:50:49-04:00Brad KingAutogen: Qt5Autogen.MocOsMacros test failure on macOS nightly binaryThis test was added by !2230. Since it was merged the nightly binary on macOS has not succeeded due to this test failing:
```
458/511 Test #465: Qt5Autogen.MocOsMacros ...............................***Failed 2.46 sec
...
In file in...This test was added by !2230. Since it was merged the nightly binary on macOS has not succeeded due to this test failing:
```
458/511 Test #465: Qt5Autogen.MocOsMacros ...............................***Failed 2.46 sec
...
In file included from /.../Tests/Qt5Autogen/MocOsMacros/mocOsMacros_autogen/mocs_compilation.cpp:2:
/.../Tests/Qt5Autogen/MocOsMacros/mocOsMacros_autogen/EWIEGA46WW/moc_TestClass.cpp:86:21: error: no member named 'MacNotDef' in 'TestClass'; did you mean 'MacDef'?
case 0: _t->MacNotDef(); break;
^~~~~~~~~
MacDef
/.../Tests/Qt5Autogen/MocOsMacros/mocOsMacros_autogen/EWIEGA46WW/../../../../../../nightly/Tests/QtAutogen/MocOsMacros/TestClass.hpp:20:8: note: 'MacDef' declared here
void MacDef();
^
In file included from /.../Tests/Qt5Autogen/MocOsMacros/mocOsMacros_autogen/mocs_compilation.cpp:2:
/.../Tests/Qt5Autogen/MocOsMacros/mocOsMacros_autogen/EWIEGA46WW/moc_TestClass.cpp:87:21: error: no member named 'MacDefElse' in 'TestClass'; did you mean 'MacNotDefElse'?
case 1: _t->MacDefElse(); break;
^~~~~~~~~~
MacNotDefElse
/.../Tests/Qt5Autogen/MocOsMacros/mocOsMacros_autogen/EWIEGA46WW/../../../../../../nightly/Tests/QtAutogen/MocOsMacros/TestClass.hpp:16:8: note: 'MacNotDefElse' declared here
void MacNotDefElse();
^
2 errors generated.
```3.13.0Sebastian HoltermannSebastian Holtermann