mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #29 from ethereum/cmake-add_sources
Fix "add_sources" cmake macro
This commit is contained in:
commit
66552f46a6
@ -2,8 +2,10 @@ cmake_policy(SET CMP0015 NEW)
|
|||||||
|
|
||||||
aux_source_directory(. SRC_LIST)
|
aux_source_directory(. SRC_LIST)
|
||||||
|
|
||||||
|
get_filename_component(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
|
||||||
|
|
||||||
macro (add_sources)
|
macro (add_sources)
|
||||||
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}/test" "${CMAKE_CURRENT_SOURCE_DIR}")
|
file (RELATIVE_PATH _relPath ${TESTS_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
foreach (_src ${ARGN})
|
foreach (_src ${ARGN})
|
||||||
if (_relPath)
|
if (_relPath)
|
||||||
list (APPEND SRC "${_relPath}/${_src}")
|
list (APPEND SRC "${_relPath}/${_src}")
|
||||||
|
Loading…
Reference in New Issue
Block a user