Commit Graph

3 Commits

Author SHA1 Message Date
Jun Zhang
8c5ecd1c01
Fix incorrectly CMAKE_BINARY_DIR usage
Similiar to CMAKE_SOURCE_DIR. Using CMAKE_BINARY_DIR will put the
generated header (stdlib.h) in build/include/solidity/libstdlib but it
should start with build/third-party/solidity or the library can't find
the header.

Signed-off-by: Jun Zhang <jun@junz.org>
2023-06-10 00:35:24 +08:00
Jun Zhang
74a38fc3d8
Fix incorrect CMAKE_SOURCE_DIR usage
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>
2023-06-08 19:17:34 +08:00
Nikola Matic
47969adf91 Experimental standard library
Change import syntax and cover with tests
2023-06-06 17:16:23 +02:00