631265909e
FossilOrigin-Name: 178a95074ac7af7d4193b789e6e485cedb30eefe2c25bd2c83ca325364bc7eb0
26 lines
755 B
CMake
26 lines
755 B
CMake
# For ease of development, you can enable and disable pages. This is useful if
|
|
# the code doesn't compile correctly, for which you can do an `#ifdef' with the
|
|
# C Preprocessor
|
|
|
|
# ugly btw, just wanted to let you know
|
|
function(append_and_def TARGET SCOPE NAME ...)
|
|
set(Y)
|
|
foreach(I RANGE 3 ${ARGC})
|
|
# Convert to uppercase for the definition
|
|
list(GET ARGV ${I} X)
|
|
get_filename_component(TEMP ${X} NAME_WE)
|
|
string(TOUPPER _TEMP ${TEMP})
|
|
|
|
# get_target_property(
|
|
# targ_comp
|
|
# ${TARGET}
|
|
# INTERFACE_COMPILE_DEFINITIONS)
|
|
|
|
# target_compile_definitions(${TARGET} ${SCOPE}
|
|
# ${targ_comp} -DCMP_ENABLE_${_TEMP})
|
|
|
|
list(APPEND Y ${_TEMP})
|
|
endforeach()
|
|
|
|
return(PROPAGATE ${Y} ${SCOPE} ${X})
|
|
endfunction()
|