CMake:如何仅在Link Executable命令中为链接库添加后缀?

时间:2019-11-22 08:43:04

标签: cmake armcc

我在cmake作业中使用 ARMCC 工具链。 以我的经验,当使用armlink链接目标文件和库时,如果库是由armar -rc或其他选项打包的。无论如何,在最后一个链接命令中,我们需要为后缀添加后缀“(*)”。库,以便armlink可以将库与对象相同。 但在工具链文件中。链接命令写为:

--Alter Proc spCreateCustomerChartTables
--As
Begin
Declare
@mycursorMARKET Cursor,
@mycursorCUSTOMER Cursor, 
@MarketNameEnglish nchar(30),
@CustomerID nchar(10),
@DDate date,
@textdate as nchar(12),
@tableName nchar(100),
@sqlcmd as nvarchar(500)


    Set @DDate = GETDATE()

    Set @mycursorMARKET = Cursor for Select Distinct MarketNameEnglish From dbo.tableMarketName Order by MarketNameEnglish ASC
    Open @mycursorMARKET
    Fetch Next From @mycursorMARKET Into @MarketNameEnglish
    While @@FETCH_STATUS = 0
    Begin

        Set @mycursorCUSTOMER = Cursor for Select Distinct CustomerID From dbo.CustomerEmployeeDetail Order by CustomerID ASC
        Open @mycursorCUSTOMER
        Fetch Next From @mycursorCUSTOMER Into @CustomerID
        While @@FETCH_STATUS =0
        Begin
            Set @textdate = cast(@DDate as NCHAR(12))
            Set @tableName = RTrim(@MarketNameEnglish) + '_' + RTrim(@CustomerID) + '_' + RTrim(@textdate )


            If OBJECT_ID(@tableName , 'U') IS Not Null
            --IF Not EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES 
            --  WHERE TABLE_NAME = @tableName )
                Begin
                Print 'Table Does Not Exist'
                Set @sqlcmd = 'Select * Into ' + RTrim(@tableName) + ' From BlankChart'
                Set @sqlcmd = RTRIM(@sqlcmd)
                Set @sqlcmd = REPLACE (@sqlcmd, '-', '_')
                Exec(@sqlcmd)
                End
            Else 
                Begin
                Print 'Table Exists'
                Set @sqlcmd = 'Drop Table ' + @tableName 
                Set @sqlcmd = RTRIM(@sqlcmd)
                Set @sqlcmd = REPLACE (@sqlcmd, '-', '_')
                Exec(@sqlcmd)
                End


            --Print @sqlcmd --Create chart tables here
            Fetch Next From @mycursorCUSTOMER Into @CustomerID
        End
        --Print @MarketNameEnglish
        Fetch Next From @mycursorMARKET Into @MarketNameEnglish
    End

Close @mycursorMARKET
Deallocate @mycursorMARKET
Close @mycursorCUSTOMER
Deallocate @mycursorCUSTOMER

End

我想不出一种在库中添加后缀的方法,同时使用Armar打包库时,没有后缀“(*)”

armlink --partial可以从另一个方面解决此问题,但我希望有一种仅在此link命令中添加后缀的方法。谢谢!

0 个答案:

没有答案