'How to set xcode debugger working directory with CMake

I searched for an equivalent of VS_DEBUGGER_WORKING_DIRECTORY for xcode in cmake documentation, but I couldn't find one. If it indeed doesn't exist, how I can use existing cmake functions to achieve setting the working directory to what I want while running the xcode debugger for my c++ application?



Solution 1:[1]

Just in case anyone is interested, I figured it out. It's

set_target_properties(<your-target> PROPERTIES 
                      XCODE_GENERATE_SCHEME TRUE
                      XCODE_SCHEME_WORKING_DIRECTORY <desired-directory>)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user3667089