A little background: I'm writing a game in SFML and I want certain lines of code to be ommitted in Release build. I want to check during compile time for build type, so that is doesn't impact game's performance.
void Tile::draw(sf::RenderTarget& target, sf::RenderStates states) const {
states.transform *= getTransform();
target.draw(m_sprite, states);
#if(DEBUG)
target.draw(m_collision_shape, states);
#endif
}
I'm relatively new to CMake world, so I don't even know if it's possible.
EDIT: It's probably worth mentioning I use ninja as a build system.