3 ms·
(How) do you have no control over the environment variables you call CMake with?
by dataflow 2y ago
(How) do you have no control over the environment variables you call CMake with?
- coffeeaddict1 2y agoI don't quite get what you mean. Of course, I could get CMake to pass a specific compiler flag at the configuration stage, but that misses the point. What I'm saying is that there is a super-easy way to configure CMake to enable optimisations (CMAKE_BUILD_TYPE=Release), but this cannot be said for bounds checking. Note that my own code does have bounds checking enabled for Clang, GCC and MSVC. What I'm arguing is that setting up the latter is significantly more effort than enabling optimisations. I'm not arguing that it isn't possible or that one shouldn't do that.
- dataflow 2y ago> I don't quite get what you mean. [...] What I'm saying is that there is a super-easy way to configure CMake to enable optimisations (CMAKE_BUILD_TYPE=Release), but this cannot be said for bounds checking Maybe I'm not getting what you mean. You are saying you already run cmake ... So I am saying you can just change that to CXXFLAGS="-Dblah" cmake -U CMAKE_CXX_FLAGS ... That genuinely seems pretty darn easy to me. In any case, any beef you have is clearly with CMake here. You'd have the same issue(s) with any other flag, for any language, if you use CMake.