Skip to content

Commit

Permalink
build: add cmake macros file
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Aug 3, 2022
1 parent 0a7db51 commit 9f61732
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmake/macros.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Macro to set definitions
macro(CFL_DEFINITION var)
add_definitions(-D${var})
set(CFL_BUILD_FLAGS "${CFL_BUILD_FLAGS}#ifndef ${var}\n#define ${var}\n#endif\n")
set(CFL_INFO_FLAGS "${CFL_INFO_FLAGS} ${var}")
endmacro()

macro(CFL_OPTION option value)
set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro()

0 comments on commit 9f61732

Please sign in to comment.