Skip to content

Commit

Permalink
Add function to generate header file to reduce specific variable scope
Browse files Browse the repository at this point in the history
  • Loading branch information
s-Nick committed Sep 20, 2024
1 parent 3e73ce3 commit e8256f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ endforeach()

# Generate header with enabled backends for testing

function(generate_header_file)
# Following if-conditions allow to decouple cmake configuration variables with
# the corresponding generated macro. This is done to be conformant with ES.33
# C++ Core Guidelines
Expand Down Expand Up @@ -68,6 +69,9 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/oneapi/mkl/detail/config.hpp"
DESTINATION include/oneapi/mkl/detail
COMPONENT Devel
)
endfunction()

generate_header_file()

# Add recipe for onemkl loader library
if(BUILD_SHARED_LIBS)
Expand Down

0 comments on commit e8256f5

Please sign in to comment.