mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
When using solidity as a third-party library (include it into our project using FetchContent), we encountered a strange compilation error. For some reason, cmake considers the root directory of the project as the root directory of the dependency (solidity). This is because solidity is incorrectly using CMAKE_SOURCE_DIR variable, which should be PROJECT_SOURCE_DIR (The former one refers to the top-level source directory that contains a CMakeLists.txt, while the latter refers to the source directory of the most recent project() command) I've created a repo for demonstration (https://github.com/junaire/test-solidity-fetch-content) Signed-off-by: Jun Zhang <jun@junz.org> |
||
|---|---|---|
| .. | ||
| Algorithms.h | ||
| AnsiColorized.h | ||
| Assertions.h | ||
| CMakeLists.txt | ||
| Common.h | ||
| CommonData.cpp | ||
| CommonData.h | ||
| CommonIO.cpp | ||
| CommonIO.h | ||
| cxx20.h | ||
| ErrorCodes.h | ||
| Exceptions.cpp | ||
| Exceptions.h | ||
| FixedHash.h | ||
| FunctionSelector.h | ||
| IndentedWriter.cpp | ||
| IndentedWriter.h | ||
| IpfsHash.cpp | ||
| IpfsHash.h | ||
| JSON.cpp | ||
| JSON.h | ||
| Keccak256.cpp | ||
| Keccak256.h | ||
| LazyInit.h | ||
| LEB128.h | ||
| Numeric.cpp | ||
| Numeric.h | ||
| picosha2.h | ||
| Result.h | ||
| SetOnce.h | ||
| StackTooDeepString.h | ||
| StringUtils.cpp | ||
| StringUtils.h | ||
| SwarmHash.cpp | ||
| SwarmHash.h | ||
| TemporaryDirectory.cpp | ||
| TemporaryDirectory.h | ||
| UTF8.cpp | ||
| UTF8.h | ||
| vector_ref.h | ||
| Views.h | ||
| Visitor.h | ||
| Whiskers.cpp | ||
| Whiskers.h | ||