CMake issueshttps://gitlab.kitware.com/cmake/cmake/-/issues2018-04-28T09:16:26-04:00https://gitlab.kitware.com/cmake/cmake/-/issues/8277Need better return values from ctest_*() (and documentation)2018-04-28T09:16:26-04:00Kitware RobotNeed better return values from ctest_*() (and documentation)This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=8277). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=8277). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/7882[STGZ] Call a hook script2018-04-28T09:16:27-04:00Kitware Robot[STGZ] Call a hook scriptThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=7882). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=7882). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/7827FindEXPAT finds expat.h in /Library/Frameworks/Mono.framework/Headers instead...2018-04-28T09:16:27-04:00Kitware RobotFindEXPAT finds expat.h in /Library/Frameworks/Mono.framework/Headers instead of /usr/include on Mac OS X.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=7827). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=7827). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/5977Add VERBOSE_TESTING setting for make runs of CTest2018-04-28T09:16:27-04:00Kitware RobotAdd VERBOSE_TESTING setting for make runs of CTestThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=5977). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=5977). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/14155FindQt4: define QT_IMPORTS_DIR variable even if the directory is not present ...2018-05-16T10:04:42-04:00Kitware RobotFindQt4: define QT_IMPORTS_DIR variable even if the directory is not present on the system.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14155). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14155). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/16001"cmake -E copy_directory" do not display error when directory to copy is not ...2018-05-17T09:05:16-04:00Kitware Robot"cmake -E copy_directory" do not display error when directory to copy is not existsThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=16001). Further discussion may take place here.
---
Run Command and make sure that "dupa" directory is not exists:
```console
$ cma...This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=16001). Further discussion may take place here.
---
Run Command and make sure that "dupa" directory is not exists:
```console
$ cmake -E copy_directory dupa target
```
Currently:
```
The copy_directory command will silently ignore, that "dupa" directory is not exists. Directory "target" will be created if not exists.
```
Expected:
```
The copy_directory command should display error, that "dupa" directory is not exists. Directory "target" will be created if not exists.
```
3.12.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/issues/11753int main() can cause warnings when -Wstrict-prototypes and -Werror is used2018-05-24T06:29:57-04:00Kitware Robotint main() can cause warnings when -Wstrict-prototypes and -Werror is usedThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=11753). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=11753). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/15585Add support for the if / else construct to generator expressions2018-05-24T11:09:08-04:00Kitware RobotAdd support for the if / else construct to generator expressionsThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=15585). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=15585). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/18119[documentation] link_directories documentation should say what is the default...2018-06-25T11:15:46-04:00yurivict[documentation] link_directories documentation should say what is the default and how to get the current valueTwo items remain unclear after reading the docs: https://cmake.org/cmake/help/v3.0/command/link_directories.html
1. What is the default value of ```link_directories```?
2. How to retrieve the current value?
Please correct the documenta...Two items remain unclear after reading the docs: https://cmake.org/cmake/help/v3.0/command/link_directories.html
1. What is the default value of ```link_directories```?
2. How to retrieve the current value?
Please correct the documentation.https://gitlab.kitware.com/cmake/cmake/-/issues/18168CMAKE_CACHEFILE_DIR should not be documented for public use2018-07-12T08:44:55-04:00Simeon MirgorodskiyCMAKE_CACHEFILE_DIR should not be documented for public use# First running
```shell
$ cmake --version
cmake version 3.9.6
$ ls -1
build
CMakeLists.txt
main.cpp
$ cd build
$ cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Configuring do...# First running
```shell
$ cmake --version
cmake version 3.9.6
$ ls -1
build
CMakeLists.txt
main.cpp
$ cd build
$ cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Configuring done
...
-- Generating done
-- Build files have been written to: /home/sem/tmp/test-proj/build
```
Making project:
```shell
$ make
Scanning dependencies of target hello
[ 50%] Building CXX object CMakeFiles/hello.dir/main.cpp.o
[100%] Linking CXX executable hello
[100%] Built target hello
```
Cleaning project build dir:
```shell
$ make clean-all
Scanning dependencies of target clean-all
Removing build dir: rm -rf /bin /boot /dev /etc /home /lib /lib32 /lib64 /lost+found /media /mnt /opt /proc /root /run /sbin /sys /tmp /usr /var
Built target clean-all
```
Variable `${CMAKE_CACHEFILE_DIR}` is **NOT** expanded into '/home/sem/tmp/test-proj/build' !
{- ERROR!-} **Remove entire root file system / .**
# Second running
```shell
$ cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sem/tmp/test-proj/build
```
Cleaning project build dir:
```shell
$ make clean-all
Removing build dir: rm -rf /home/sem/tmp/test-proj/build/CMakeCache.txt /home/sem/tmp/test-proj/build/CMakeFiles /home/sem/tmp/test-proj/build/cmake_install.cmake /home/sem/tmp/test-proj/build/hello /home/sem/tmp/test-proj/build/Makefile
Built target clean-all
```
Everything is fine!
Variable `${CMAKE_CACHEFILE_DIR}` is expanded into '/home/sem/tmp/test-proj/build' as it should be.
[CMakeLists.txt](/uploads/f2b2544f63fd8b2ad8f6b5d8939d7602/CMakeLists.txt)https://gitlab.kitware.com/cmake/cmake/-/issues/17754set_directory_properties must be called before the directory is processed2018-09-11T08:26:45-04:00Sebastian Bøeset_directory_properties must be called before the directory is processedHi,
there is a bug/documentation update needed for set_directory_properties.
If you have a CMake project that looks like this:
CMakeLists.txt:
```
cmake_minimum_required(VERSION 3.8)
add_subdirectory(sub)
```
sub/CMakeL...Hi,
there is a bug/documentation update needed for set_directory_properties.
If you have a CMake project that looks like this:
CMakeLists.txt:
```
cmake_minimum_required(VERSION 3.8)
add_subdirectory(sub)
```
sub/CMakeLists.txt:
```
add_executable(
sub_app
sub_source.c
)
set_directory_properties(
PROPERTIES
INCLUDE_DIRECTORIES
some_path
)
```
then "set_directory_properties" will have no affect, but moving it to just above the "add_executable" invocation will cause it to have the intended behaviour.
The documentation for "set_directory_properties" looks like this:
https://cmake.org/cmake/help/latest/command/set_directory_properties.html
~~Note that the documentation for set_property(), does imply that the order that subdirectories are processed and the order that properties are added matters with this documentation:~~
~~"Scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path."~~
~~But there is no such indication in the "set_directory_properties" documentation.~~https://gitlab.kitware.com/cmake/cmake/-/issues/10749CMakeDetermineSystem.cmake gets the wrong O/S version on AIX 4 & 52018-10-03T19:05:30-04:00Kitware RobotCMakeDetermineSystem.cmake gets the wrong O/S version on AIX 4 & 5This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=10749). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=10749). Further discussion may take place here.3.9.0Gregor JasnyGregor Jasnyhttps://gitlab.kitware.com/cmake/cmake/-/issues/14452Provide means to prevent ExternalProject module from using git submodules2018-11-07T07:17:33-05:00Kitware RobotProvide means to prevent ExternalProject module from using git submodulesThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14452). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14452). Further discussion may take place here.https://gitlab.kitware.com/cmake/cmake/-/issues/16212cmake-packages documentation suggests to install CMake config files in a dire...2018-12-05T10:35:56-05:00Silvio Traversarocmake-packages documentation suggests to install CMake config files in a directory that is not found automatically in WindowsThe `cmake-packages` documentation suggests to install CMake config files to `lib/cmake/<package_name>` [1], however that path is not searched for by `find_package` on Windows when the package is installed in the default `CMAKE_INSTALL_P...The `cmake-packages` documentation suggests to install CMake config files to `lib/cmake/<package_name>` [1], however that path is not searched for by `find_package` on Windows when the package is installed in the default `CMAKE_INSTALL_PREFIX` [3] .
A more multi-platform alternative to suggest would be:
~~~
if(WIN32 AND NOT CYGWIN)
set(ConfigPackageLocation CMake)
else()
set(ConfigPackageLocation lib/cmake/ClimbingStats)
endif()
~~~
This is a common pitfall for libraries developed on *nix system to work correctly out of the box in Windows [3][4][5], so fixing it in the main CMake documentation would be highly beneficial.
[1] : https://gitlab.kitware.com/cmake/cmake/blame/v3.6.1/Help/manual/cmake-packages.7.rst#L327
[2] : https://cmake.org/cmake/help/v3.6/command/find_package.html#command:find_package
[3] : https://github.com/flexible-collision-library/fcl/pull/116#discussion_r58436663
[4] : https://bitbucket.org/ignitionrobotics/ign-math/pull-requests/63/fix-logic-of-installation-of-cmake/diff
[5] : https://bitbucket.org/ignitionrobotics/ign-math/pull-requests/63/fix-logic-of-installation-of-cmake/diffhttps://gitlab.kitware.com/cmake/cmake/-/issues/16184BasicConfigVersion and architecture-independent projects2018-12-06T09:01:01-05:00RichBasicConfigVersion and architecture-independent projectsThe BasicConfigVersion templates include a section that tries to determine whether the architecture of the project calling find_package matches the architecture that the package to be found was built for. There are two problems with thi...The BasicConfigVersion templates include a section that tries to determine whether the architecture of the project calling find_package matches the architecture that the package to be found was built for. There are two problems with this:
1. This architecture check is not documented in the CMakePackageConfigHelpers documentation. The documentation for ```write_basic_package_version_file``` does mention the BasicConfigVersion templates, but does not explicitly state that architecture is being tied to the version check (at least not in version 3.5.2 that I have installed.)
2. Not all C++ projects are architecture dependent, so this check can lead to breakage in some cases. For example, a header-only template library like eigen3 can be shared between 32 and 64 bit projects.
I propose that the documentation be updated to explicitly state that CMake is testing for version AND architecture with the BasicConfigVersion templates. I also recommend that ```write_basic_package_version_file``` be updated so that the architecture check can be disabled by a project that does not require it. Projects can make copies of the BasicConfigVersion templates and remove the architecture check as a work-around, but I think it would be worthwhile to make it a supported option.https://gitlab.kitware.com/cmake/cmake/-/issues/15783ALIASED_TARGET property is always set2018-12-07T09:57:23-05:00Kitware RobotALIASED_TARGET property is always setThis issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=15783). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=15783). Further discussion may take place here.3.7.0Gregor JasnyGregor Jasnyhttps://gitlab.kitware.com/cmake/cmake/-/issues/14461No way to specify destination directory of share/aclocal.m42018-12-07T09:58:16-05:00Kitware RobotNo way to specify destination directory of share/aclocal.m4This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14461). Further discussion may take place here.
---
My distribution uses a prefix of `/usr/${arch}/` for architecture dependent ...This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14461). Further discussion may take place here.
---
My distribution uses a prefix of `/usr/${arch}/` for architecture dependent executables, libraries, and headers, and `/usr/share/` remains for architecture independent files. This is mostly fine because I can pass `--datadir=../share/cmake --docdir=../share/doc/cmake-${version}/ --mandir=../share/man` to `./bootstrap` and things get installed to the right places.
The exception is `share/aclocal/cmake.m4`. After looking at `Utilities/CMakeFiles.txt`, it seems that this file is being installed to `${prefix}/share/aclocal/`, when I want it to be installed to `${prefix}/../share/aclocal/` (e.g. `/usr/share/aclocal/`). However, there doesn't appear to be an option I can use to get this behavior.
I'm not sure the best way to solve this issue (apart from adding a new directory option, `--aclocaldir` or something), but for now I can patch `Utilities/CMakeFiles.txt` to install `cmake.m4` to `${CMAKE_DATA_DIR}/../aclocal/`.
https://gitlab.kitware.com/cmake/cmake/-/issues/14460AC_ARG_VARs ignored in CMAKE_FIND_PACKAGE macro in cmake.m42018-12-07T09:58:16-05:00Kitware RobotAC_ARG_VARs ignored in CMAKE_FIND_PACKAGE macro in cmake.m4This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14460). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14460). Further discussion may take place here.3.9.0https://gitlab.kitware.com/cmake/cmake/-/issues/14362Can't add attr directive to CPACK_RPM_USER_FILELIST (some symbols not allowed)2018-12-07T09:58:20-05:00Kitware RobotCan't add attr directive to CPACK_RPM_USER_FILELIST (some symbols not allowed)This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14362). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14362). Further discussion may take place here.3.7.0https://gitlab.kitware.com/cmake/cmake/-/issues/14335CMake does not error on duplicate else()2018-12-07T09:58:21-05:00Kitware RobotCMake does not error on duplicate else()This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14335). Further discussion may take place here.This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=14335). Further discussion may take place here.3.9.0Gregor JasnyGregor Jasny