-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should conan_output_dirs_setup in conanbuildinfo.cmake be optional? #1448
Comments
Actually, the Another easy solution is to redefine/restore the paths just after the call to In any case, I am not opposed to adding that argument to disable it, anyone else feels that it deserves an argument? Thanks! |
My first thought was to simply copy the contents of I agree that adding arguments to enable or disable each and every part of the setup can result in a large number of arguments being available, which can make understanding the generated file more complex. So for now I'll just redefine the paths after the |
Hi, I'm also for making this optional. Disabled by default IMO. I don't know in what scenarios this would be desired, so my actual current opinion is to simply remove it. For now I've also redefined the paths after the |
Agree, it should be optional. Disabled by default is not possible, it would break many, many builds, so we need to make it opt-in. It is a very useful default for Windows build in which Visual Studio will put binaries under Debug/Release subfolders, and then the But, yes, lets make it opt-in. |
The conditional inside the This does not seem to cause problems, as in all cases I tested referencing arguments beyond the last, I got empty strings, but maybe it would be a good idea not to rely on this. The issue is the only solution I can think to it requires adding an extra check:
Any ideas on this? |
Thanks @amues for the reference, yes, you are right, |
Finally, I am using cmake_parse_arguments(), check #1665 |
Done, you have NO_OUTPUT_DIRS as argument to |
Running conan 0.24.0 installed with pip.
When consuming libraries, the
conan install <path>
step generates a conanbuildinfo.cmake file with the macroconan_basic_setup
, which in turn callsconan_output_dirs_setup
. This macro sets CMake variables that cause binary and library files to be moved to <build_dir>/bin and <build_dir>/lib, respectively.This can be easily changed by commenting out that line (e.g. running grep in an automated setup), but if the user wants to keep those files in their original location in the build directory, would it make sense for
conan_output_dirs_setup
to be inside a conditional (could test a CMake variable or an argument toconan_basic_setup
, as is done withTARGETS
)?The text was updated successfully, but these errors were encountered: