Copy README.md/amalgamate_demo.cpp only if output dir isn't the same as ${SCRIPTPATH} - #1113
Conversation
|
If we are concerned with the case where they are the same file... and that's the only scenario we care about, then we can check add a check. What do you think of the following... Is there any other instances where you'd like for us to ignore the error? |
|
Note that FreeBSD remains broken with this PR. |
6a9e5de to
11cfd78
Compare
PR updated |
|
You do a string comparison when comparing the paths, but that is not safe. It can still be the same directory. |
If #1115 doesn't have the issue, then it's a better fix. |
|
If neither of them ends up being acceptable, we have code in jsonexamples/CMakeLists.txt that uses cmake for this purpose :) |
11cfd78 to
bcf7c9d
Compare
|
PR updated to expand |
940f52f to
72391c2
Compare
…as ${SCRIPTPATH}
+ use test's `-ef` file operator to check if ${SCRIPTPATH} and ${AMALGAMATE_OUTPUT_PATH} are not the same
72391c2 to
bae36aa
Compare
|
Let us try this. Yes. CMake can definitive copy files and that would be the right move... but let us go with this PR for now. |
No description provided.