I want to add my build type to cmake to call cmake like this:
cmake -DCMAKE_BUILD_TYPE=mytype
I've written strings to my CMakeLists.txt:
set(CMAKE_CXX_FLAGS_DEBUG "-fPIC -o0 -g")
set(CMAKE_CXX_FLAGS_MYTYPE "-fPIC -o0 -g -m32)
set(CMAKE_CXX_FLAGS_RELEASE "-fPIC -o3)
But cmake uses compiler flags which were wrote in CMAKE_CXX_FLAGS_DEBUG
.
What I should do to add my build type correctly?