diff --git a/CMakeLists.txt b/CMakeLists.txt index 9438c31cdd..bf64ec04c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,7 +121,8 @@ include(cmake/SetupCompilers.cmake) include (cmake/RAJAMacros.cmake) # Configure `style` target for enforcing code style -raja_add_code_checks() +# TODO(bowen) Add examples, exercises, test, and benchmark to the list below +raja_add_code_checks(DIRS "RAJA" "include" "src") set (raja_sources src/AlignedRangeIndexSetBuilders.cpp diff --git a/cmake/RAJAMacros.cmake b/cmake/RAJAMacros.cmake index 848f5779e4..96b02fa63e 100644 --- a/cmake/RAJAMacros.cmake +++ b/cmake/RAJAMacros.cmake @@ -222,7 +222,7 @@ macro(raja_add_code_checks) set(options) set(singleValueArgs) - set(multiValueArgs) + set(multiValueArgs DIRS) # Parse the arguments to the macro cmake_parse_arguments(arg @@ -232,14 +232,12 @@ macro(raja_add_code_checks) # another project if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") # Create file globbing expressions that only include directories that contain source - # TODO(bowen) Add examples, exercises, test, and benchmark to the list below - set(_base_dirs "RAJA" "include" "src") set(_ext_expressions "*.cpp" "*.hpp" "*.inl" "*.cxx" "*.hxx" "*.cc" "*.c" "*.h" "*.hh") set(_glob_expressions) foreach(_exp ${_ext_expressions}) - foreach(_base_dir ${_base_dirs}) + foreach(_base_dir ${arg_DIRS}) list(APPEND _glob_expressions "${PROJECT_SOURCE_DIR}/${_base_dir}/${_exp}") endforeach() endforeach()