[cmake,buildflags] replace CMAKE_SOURCE_DIR and CMAKE_BUILD_DIR
replace source and build directories with palceholders
This commit is contained in:
parent
ebcf4c44a9
commit
c43242fdde
@ -1,5 +1,8 @@
|
|||||||
function(CFlagsToVar NAME)
|
function(CFlagsToVar NAME)
|
||||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||||
|
string(REPLACE "${CMAKE_SOURCE_DIR}" "<src dir>" C_FLAGS "${C_FLAGS}")
|
||||||
|
string(REPLACE "${CMAKE_BINARY_DIR}" "<build dir>" C_FLAGS "${C_FLAGS}")
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE)
|
if (CMAKE_BUILD_TYPE)
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||||
|
Loading…
Reference in New Issue
Block a user