Issue
Is it possible to set certain header files to be compiled under "Release" mode in Visual Studio with CMake?
Scenario:
The entire project is set up with CMake (not generating proj/sln files, pointing directly at the project's directory)
We are bringing in a header-only dependency via CMake that runs quite fast when ran in Release mode, however, it does not run as fast when ran in debug mode.
Is it possible to set this dependency to build in release mode while the rest of the application runs in Debug mode? If this is not possible are there any work arounds?
For reference I am using Visual Studio 2019 Community 16.1.6
Solution
(Posting comment to answer the question)
For anyone else that may stumble upon this, Richard is 100% right about header files not being compiled, however, i was able to get the speed I was looking for an still use the debugger by switching "Configuration Type" to "RelWithDebInfo" under CMakeSettings.json.
Answered By - Matt