cmake: allow binary directory to be specified
Extend the add_subdirectory_ifdef extension to allow specifying the binary directory. Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
This commit is contained in:
parent
d9a89fb40b
commit
e68cfb5683
1 changed files with 2 additions and 2 deletions
|
@ -1311,9 +1311,9 @@ endfunction()
|
|||
# ifdef functions are added on an as-need basis. See
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
|
||||
# a list of available functions.
|
||||
function(add_subdirectory_ifdef feature_toggle dir)
|
||||
function(add_subdirectory_ifdef feature_toggle source_dir)
|
||||
if(${${feature_toggle}})
|
||||
add_subdirectory(${dir})
|
||||
add_subdirectory(${source_dir} ${ARGN})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue