File tree 7 files changed +12
-12
lines changed
7 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})
5
5
6
6
# Set the build type, if none was specified.
7
7
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES )
8
- if (EXISTS "${CMAKE_SOURCE_DIR } /.git" )
8
+ if (EXISTS "${PROJECT_SOURCE_DIR } /.git" )
9
9
set (DEFAULT_BUILD_TYPE "RelWithDebInfo" )
10
10
else ()
11
11
set (DEFAULT_BUILD_TYPE "Release" )
@@ -66,12 +66,12 @@ include(EthUtils)
66
66
67
67
# Create license.h from LICENSE.txt and template
68
68
# Converting to char array is required due to MSVC's string size limit.
69
- file (READ ${CMAKE_SOURCE_DIR } /LICENSE.txt LICENSE_TEXT HEX)
69
+ file (READ ${PROJECT_SOURCE_DIR } /LICENSE.txt LICENSE_TEXT HEX)
70
70
string (REGEX MATCHALL ".." LICENSE_TEXT "${LICENSE_TEXT} " )
71
71
string (REGEX REPLACE ";" ",\n\t 0x" LICENSE_TEXT "${LICENSE_TEXT} " )
72
72
set (LICENSE_TEXT "0x${LICENSE_TEXT} " )
73
73
74
- configure_file ("${CMAKE_SOURCE_DIR } /cmake/templates/license.h.in" include /license.h)
74
+ configure_file ("${PROJECT_SOURCE_DIR } /cmake/templates/license.h.in" include /license.h)
75
75
76
76
include (EthOptions)
77
77
configure_project(TESTS)
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ if(PEDANTIC)
28
28
endif ()
29
29
30
30
# Prevent the path of the source directory from ending up in the binary via __FILE__ macros.
31
- eth_add_cxx_compiler_flag_if_supported("-fmacro-prefix-map=${CMAKE_SOURCE_DIR } =/solidity" )
31
+ eth_add_cxx_compiler_flag_if_supported("-fmacro-prefix-map=${PROJECT_SOURCE_DIR } =/solidity" )
32
32
33
33
# -Wpessimizing-move warns when a call to std::move would prevent copy elision
34
34
# if the argument was not wrapped in a call. This happens when moving a local
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ include(FetchContent)
3
3
FetchContent_Declare(
4
4
fmtlib
5
5
PREFIX "${CMAKE_BINARY_DIR} /deps"
6
- DOWNLOAD_DIR "${CMAKE_SOURCE_DIR } /deps/downloads"
6
+ DOWNLOAD_DIR "${PROJECT_SOURCE_DIR } /deps/downloads"
7
7
DOWNLOAD_NAME fmt-8.0.1.tar.gz
8
8
URL https://github.com/fmtlib/fmt/archive/8.0.1.tar.gz
9
9
URL_HASH SHA256=b06ca3130158c625848f3fb7418f235155a4d389b2abc3a6245fb01cb0eb1e01
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ endif()
42
42
43
43
ExternalProject_Add(jsoncpp-project
44
44
PREFIX "${prefix} "
45
- DOWNLOAD_DIR "${CMAKE_SOURCE_DIR } /deps/downloads"
45
+ DOWNLOAD_DIR "${PROJECT_SOURCE_DIR } /deps/downloads"
46
46
DOWNLOAD_NAME jsoncpp-1.9.3.tar.gz
47
47
URL https://github.com/open-source -parsers/jsoncpp/archive/1.9.3.tar.gz
48
48
URL_HASH SHA256=8593c1d69e703563d94d8c12244e2e18893eeb9a8a9f8aa3d09a327aa45c8f7d
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ set(RANGE_V3_INCLUDE_DIR "${prefix}/include")
11
11
12
12
ExternalProject_Add(range-v3-project
13
13
PREFIX "${prefix} "
14
- DOWNLOAD_DIR "${CMAKE_SOURCE_DIR } /deps/downloads"
14
+ DOWNLOAD_DIR "${PROJECT_SOURCE_DIR } /deps/downloads"
15
15
DOWNLOAD_NAME range-v3-0.12.0.tar.gz
16
16
URL https://github.com/ericniebler/range-v3/archive/0.12.0.tar.gz
17
17
URL_HASH SHA256=015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ set(sources
46
46
47
47
add_library (solutil ${sources} )
48
48
target_link_libraries (solutil PUBLIC jsoncpp Boost::boost Boost::filesystem Boost::system range-v3 fmt::fmt-header-only)
49
- target_include_directories (solutil PUBLIC "${CMAKE_SOURCE_DIR } " )
49
+ target_include_directories (solutil PUBLIC "${PROJECT_SOURCE_DIR } " )
50
50
add_dependencies (solutil solidity_BuildInfo.h)
51
51
52
52
if (SOLC_LINK_STATIC)
Original file line number Diff line number Diff line change 1
1
# This will re-generate the headers if any file within src was modified.
2
- set_directory_properties (PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR } /stdlib/src/)
2
+ set_directory_properties (PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR } /stdlib/src/)
3
3
4
4
set (STDLIB stub)
5
5
set (GENERATED_STDLIB_HEADERS)
6
6
foreach (src IN LISTS STDLIB)
7
- set (STDLIB_FILE ${CMAKE_SOURCE_DIR } /libstdlib/src/${src} .sol)
7
+ set (STDLIB_FILE ${PROJECT_SOURCE_DIR } /libstdlib/src/${src} .sol)
8
8
file (READ ${STDLIB_FILE} STDLIB_FILE_CONTENT HEX)
9
9
string (REGEX MATCHALL ".." STDLIB_FILE_CONTENT "${STDLIB_FILE_CONTENT} " )
10
10
list (REMOVE_ITEM STDLIB_FILE_CONTENT "0d" )
11
11
string (REGEX REPLACE ";" ",\n\t 0x" STDLIB_FILE_CONTENT "${STDLIB_FILE_CONTENT} " )
12
12
set (STDLIB_FILE_CONTENT "0x${STDLIB_FILE_CONTENT} " )
13
13
set (STDLIB_FILE_NAME ${src} )
14
- configure_file ("${CMAKE_SOURCE_DIR } /libstdlib/stdlib.src.h.in" ${CMAKE_BINARY_DIR} /include /libstdlib/${src} .h NEWLINE_STYLE LF @ONLY)
14
+ configure_file ("${PROJECT_SOURCE_DIR } /libstdlib/stdlib.src.h.in" ${CMAKE_BINARY_DIR} /include /libstdlib/${src} .h NEWLINE_STYLE LF @ONLY)
15
15
list (APPEND GENERATED_STDLIB_HEADERS ${CMAKE_BINARY_DIR} /include /libstdlib/${src} .h)
16
16
endforeach ()
17
17
18
- configure_file ("${CMAKE_SOURCE_DIR } /libstdlib/stdlib.h.in" ${CMAKE_BINARY_DIR} /include /libstdlib/stdlib.h NEWLINE_STYLE LF @ONLY)
18
+ configure_file ("${PROJECT_SOURCE_DIR } /libstdlib/stdlib.h.in" ${CMAKE_BINARY_DIR} /include /libstdlib/stdlib.h NEWLINE_STYLE LF @ONLY)
You can’t perform that action at this time.
0 commit comments