Skip to content

Commit

Permalink
cmake: allow binary directory to be specified
Browse files Browse the repository at this point in the history
Extend the add_subdirectory_ifdef extension to allow specifying
the binary directory.

Signed-off-by: Rafał Kuźnia <[email protected]>
  • Loading branch information
e-rk authored and carlescufi committed Apr 1, 2021
1 parent d9a89fb commit e68cfb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit e68cfb5

Please sign in to comment.