mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2393 from ethereum/license_char_array
Convert license to character array.
This commit is contained in:
commit
0b99c81f85
@ -25,7 +25,12 @@ include(EthExecutableHelper)
|
||||
include(EthUtils)
|
||||
|
||||
# Create license.h from LICENSE.txt and template
|
||||
file(READ ${CMAKE_SOURCE_DIR}/LICENSE.txt LICENSE_TEXT)
|
||||
# Converting to char array is required due to MSVC's string size limit.
|
||||
file(READ ${CMAKE_SOURCE_DIR}/LICENSE.txt LICENSE_TEXT HEX)
|
||||
string(REGEX MATCHALL ".." LICENSE_TEXT "${LICENSE_TEXT}")
|
||||
string(REGEX REPLACE ";" ",\n\t0x" LICENSE_TEXT "${LICENSE_TEXT}")
|
||||
set(LICENSE_TEXT "0x${LICENSE_TEXT}")
|
||||
|
||||
configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/license.h.in" "license.h")
|
||||
|
||||
include(EthOptions)
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
static char const* licenseText = R"(@LICENSE_TEXT@)";
|
||||
static char const licenseText[] = {
|
||||
@LICENSE_TEXT@
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user