CMake: Support configure -force_debug_info
Task-number: QTBUG-85373 Change-Id: Ia798fc2cf715aed9157e1d9e2f64187c16e38bcf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
dd77597252
commit
26fbf8082c
@ -112,6 +112,8 @@ while(configure_args)
|
|||||||
set(build_configs "Debug")
|
set(build_configs "Debug")
|
||||||
elseif(arg STREQUAL "-debug-and-release")
|
elseif(arg STREQUAL "-debug-and-release")
|
||||||
set(build_configs Debug Release)
|
set(build_configs Debug Release)
|
||||||
|
elseif(arg STREQUAL "-force-debug-info")
|
||||||
|
set(force_debug_info ON)
|
||||||
elseif(arg STREQUAL "--")
|
elseif(arg STREQUAL "--")
|
||||||
# Everything after this argument will be passed to CMake verbatim.
|
# Everything after this argument will be passed to CMake verbatim.
|
||||||
push(${configure_args})
|
push(${configure_args})
|
||||||
@ -121,6 +123,10 @@ while(configure_args)
|
|||||||
endif()
|
endif()
|
||||||
endwhile()
|
endwhile()
|
||||||
|
|
||||||
|
if(force_debug_info)
|
||||||
|
list(TRANSFORM build_configs REPLACE "^Release$" "RelWithDebInfo")
|
||||||
|
endif()
|
||||||
|
|
||||||
list(LENGTH build_configs nr_of_build_configs)
|
list(LENGTH build_configs nr_of_build_configs)
|
||||||
if(nr_of_build_configs EQUAL 1)
|
if(nr_of_build_configs EQUAL 1)
|
||||||
push("-DCMAKE_BUILD_TYPE=${build_configs}")
|
push("-DCMAKE_BUILD_TYPE=${build_configs}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user