I am using abseil-cpp in my C++ project built under Visual Studio 2019 / Windows 10.
Using CMake (not Visual Studio built-in makefile support) and following the static binaries instructions I have built a set of libraries and header files which I can then successfully link into a standard Visual Studio solution.
The issue I have is that the library builds with a build type of Debug
, which means that I cannot link them into a Release
build of my application.
What I need is to build a Release
version of the abseil-cpp libraries. However the for the life of me I cannot figure out how to coax CMake / Abseil build process to do this!
I have tried the following, all of which are either ignored or error:
- Add
set(CMAKE_BUILD_TYPE Release)
to the CMakeLists.txt file in the root of theabseil-cpp
source tree - Add
-DCMAKE_BUILD_TYPE=Release
to thecmake .. -DCMAKE_INSTALL_PREFIX=~/Source/CMakeProject/install
step given in the instructions - Add
-DCMAKE_BUILD_TYPE=Release to the cmake --build . --target install
step given in the instructions
Can anyone suggest what I need to do to build a Release version of static binary libraries?
Ian