2022-07-05 11:26:52 +00:00
|
|
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2022-08-19 13:21:34 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2022-07-05 11:26:52 +00:00
|
|
|
|
2020-04-09 08:02:47 +00:00
|
|
|
# special case skip regeneration
|
2021-09-22 13:11:47 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2020-02-26 10:41:20 +00:00
|
|
|
project(objcopytest LANGUAGES CXX)
|
|
|
|
add_executable(objcopytest main.cpp)
|
|
|
|
add_custom_command(
|
|
|
|
TARGET objcopytest
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $<TARGET_FILE:objcopytest> objcopytest.debug
|
|
|
|
COMMAND ${CMAKE_OBJCOPY} --strip-debug $<TARGET_FILE:objcopytest>
|
2022-03-15 16:37:11 +00:00
|
|
|
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=objcopytest.debug $<TARGET_FILE:objcopytest>
|
|
|
|
VERBATIM)
|