Skip to content

Commit

Permalink
Add utility to find subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
mic84 committed Jul 25, 2017
1 parent abff22e commit 96d6723
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Tools/CMake/AMReX_Utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@ function ( list_to_string list )
set ( ${list} "${tmp}" PARENT_SCOPE)
endfunction ()

#
# Create list of all include directories
# cmake must be re-run if new dirs with Headers are introduced
#
function ( list_include_dirs dirlist root_dir)

file ( GLOB_RECURSE includes
LIST_DIRECTORIES false
${root_dir}/*.h ${root_dir}/*.H
)

foreach (file ${includes})
get_filename_component ( path ${file} PATH)
list ( APPEND tmp ${path} )
endforeach ()

list ( REMOVE_DUPLICATES tmp )
set ( ${dirlist} ${tmp} PARENT_SCOPE )

endfunction ()

#
# Append new_var to all_var
Expand Down Expand Up @@ -58,8 +78,6 @@ function (set_F77_properties OUTVAR)
endfunction (set_F77_properties)




function(preprocess_boxlib_fortran OUTVAR)
set_source_files_properties(${ARGN} PROPERTIES COMPILE_DEFINITIONS "BL_LANG_FORT")
set(${OUTVAR} ${ARGN} PARENT_SCOPE)
Expand Down

0 comments on commit 96d6723

Please sign in to comment.