cpp-best-practices / cmake_template

CMake for C++ Best Practices
The Unlicense
1.09k stars 118 forks source link

Hard-coding of `out/` directory causes problems with multiple build methods. #91

Open dabrahams opened 1 month ago

dabrahams commented 1 month ago

For example, I was developing from the command-line, and Sean said, “I can't get this to work with VSCode.” So I fired up VSCode to check it out. It had an entirely different build directory, but the two build methods collided over the use of the out/ directory. Hours were wasted until I figured it out.

dabrahams commented 1 month ago

Specifically, this line in CMakePresets.json caused problems. Of course, deleting it totally borks CI.

            "binaryDir": "${sourceDir}/out/build/${presetName}",