Fossil

Check-in [27c4e7b0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the MSVC specific link flags.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | cmake-ide
Files: files | file ages | folders
SHA3-256:27c4e7b02d6d90a232aa98b10ef91719bd6883119142acdf0c156f3d9469e543
User & Date: ashepilko 2018-08-08 01:27:21
Context
2018-09-14
19:13
Merge updates from trunk. check-in: f59c9ecb user: ashepilko tags: cmake-ide
2018-08-08
01:27
Fix the MSVC specific link flags. check-in: 27c4e7b0 user: ashepilko tags: cmake-ide
2018-08-07
17:55
Adjust include directories list to pick up autoconfig.h check-in: ad12f35c user: ashepilko tags: cmake-ide
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to CMakeLists.txt.

213
214
215
216
217
218
219

220
221
222
223
224
225
226
227


228
229
230
231
232
233
234
file(WRITE "${CMAKE_BINARY_DIR}/app.c" "int main(){ return 0; }\n")
add_executable(app app.c)

set_target_properties(app PROPERTIES
    OUTPUT_NAME "${app_NAME}"
    RUNTIME_OUTPUT_DIRECTORY "${app_DIR}"
)

set_target_properties(app PROPERTIES
    LINK_FLAGS "/INCREMENTAL:NO /MANIFEST:NO"
)
if(MSVC AND isDebugBuild)
    set_target_properties(app PROPERTIES
        PDB_NAME "${app_NAME}"
    )
endif()


add_custom_command(TARGET app PRE_LINK
    COMMAND "${CMAKE_COMMAND}" -E chdir  "$<TARGET_FILE_DIR:app>"
            "${CMAKE_COMMAND}" -E rename "$<TARGET_FILE_NAME:app>"
                                         "$<TARGET_FILE_NAME:app>-imported"
)
if(MSVC AND isDebugBuild)
    add_custom_command(TARGET app PRE_LINK







>
|
|
|
|
|
|
|
|
>
>







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
file(WRITE "${CMAKE_BINARY_DIR}/app.c" "int main(){ return 0; }\n")
add_executable(app app.c)

set_target_properties(app PROPERTIES
    OUTPUT_NAME "${app_NAME}"
    RUNTIME_OUTPUT_DIRECTORY "${app_DIR}"
)
if(MSVC)
    set_target_properties(app PROPERTIES
        LINK_FLAGS "/INCREMENTAL:NO /MANIFEST:NO"
    )
    if(isDebugBuild)
        set_target_properties(app PROPERTIES
            PDB_NAME "${app_NAME}"
        )
    endif()
endif()

add_custom_command(TARGET app PRE_LINK
    COMMAND "${CMAKE_COMMAND}" -E chdir  "$<TARGET_FILE_DIR:app>"
            "${CMAKE_COMMAND}" -E rename "$<TARGET_FILE_NAME:app>"
                                         "$<TARGET_FILE_NAME:app>-imported"
)
if(MSVC AND isDebugBuild)
    add_custom_command(TARGET app PRE_LINK