cmake install installs debug and release builds into same folder with same name
Describe the bug debug build and install overwrites release install or vice versa (which ever is last wins) VS2017 results in link error LNK2038 (ITERATOR_DEBUG_LEVEL) when linking a debug against release build of abseil or vice versa
Include a clear and concise description of what the problem is, including what you expected to happen, and what actually happened.
Steps to reproduce the bug
cmake .. -G "Visual Studio 15 2017" Load absl.sln into Visual Studio Build Debug Build Install target (verify headers and libs get installed) Switch to Release Build Release Install Release Everything gets overwritten.
For google protofbuf the debug libarary names have a 'd' appended to them so even though they are installed to same folder they co-exist.
It's important that we are able to reproduce the problem that you are
experiencing. Please provide all code and relevant steps to reproduce the
problem, including your BUILD/CMakeLists.txt file and build commands. Links
to a GitHub branch or godbolt.org that demonstrate the
problem are also helpful.
What version of Abseil are you using? Live at head as of October 14 2020
What operating system and version are you using Windows 10 1903
If you are using a Linux distribution please include the name and version of the distribution as well.
What compiler and version are you using?
VS2017 15.9.24
Please include the output of gcc -v or clang -v, or the equivalent for your
compiler.
What build system are you using?
CMake
Please include the output of bazel --version or cmake --version, or the
equivalent for your build system.
Additional context
Add any other context about the problem here.
My work around is to commit the VS2017 build folders and link to those folders which use debug/release in folder names to differentiate. I would prefer to use cmake install process like I do with google protobuf.
Man I was so happy to see that Abseil LTS 20210324.2 supported CMAKE_BUILD_PREFIX. Alas...it still looks like the VS2017 build generator creates same lib names for after building the 'INSTALL' target for the Debug and Release variants. So its better that I don't have my build artifacts in my source tree; however I cannot link.