-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
Describe the bug
Removing the 'd' suffix for debug libs broke the CMake workflow.
The FindGTest.cmake of cmake expects the debug libraries of gtest to have this suffix : https://github.com/Kitware/CMake/blob/master/Modules/FindGTest.cmake#L248
Similarly, the export of targets is now broken, if you build both the Release and the Debug version and install them at the same location, you end up with the two generated config files referencing the same libraries (which have been overwritten by the latest configuration built).
Steps to reproduce the bug
mkdir gtest && cd gtest
git clone [email protected]:google/googletest.git
mkdir build-debug build-release install
cmake -S googletest/ -B build-debug/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install
cmake --build build-debug
cmake --build build-debug -- install
cmake -S googletest/ -B build-release/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install
cmake --build build-release
cmake --build build-release -- install
grep IMPORTED_LOCATION install/lib64/cmake/GTest/GTest*.cmake
Does the bug persist in the most recent commit?
Yes
What operating system and version are you using?
Linux, Windows, Mac
What compiler and version are you using?
Irrelevant
What build system are you using?
CMake, version irrelevant