Closed rnburn closed 9 years ago
I agree that ignoring user-specified CXXFLAGS is bad.
Is the technique at the referenced web page the right way to resolve this issue? Does a similar fix need to be made for CMAKE_CXX_FLAGS_RELEASE?
I am not a CMake user, so I need advice.
I'll mention that the logic for setting CXXFLAGS the CMakeLists various files is a bit different from that in the Automake files. Notably, (as far as I understand), the CMake rote doesn't try to pull flags out of "llvm-config --cxxflags".
Perhaps the primary contributor of the CMake files can offer some advice, if I mention his GitHub ID here :-). @mpflanzer
Do you have time to investigate this issue in the near future, @mpflanzer ?
Sorry for my late response. I have been busy with relocating over the last weeks. I will try to have a look this weekend. However, I am also in now way an expert in terms of CMake. ;-)
I believe that @mpflanzer's patch has resolved this issue.
In the CMakeLists.txt file, this isn't the proper way to add CXXFLAGS
set(CMAKE_CXX_FLAGS "-std=c++11 -fno-rtti -Wall -Wextra -Wno-long-long -Wno-unused-parameter")
as it ignores those specified on the command line. (See http://voices.canonical.com/jussi.pakkanen/2013/03/26/a-list-of-common-cmake-antipatterns/)