View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014447 | CMake | CMake | public | 2013-09-28 14:41 | 2016-06-10 14:31 | ||||
Reporter | Veniamin Gvozdikov | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | high | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014447: Support $<TARGET_OBJECT:obj> as DEPENDS in add_custom_command | ||||||||
Description | Hello, I had a strange trouble with add DEPENDS in add_custom_command by $<TARGET_OBJECTS:obj> and I hacked that with set(cjson_obj_2 ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cjson_objs.dir/lua_cjson.c.o) in real path to object. This is bad way for depends, please add support in new version. set(cjson_obj) add_library(cjson_objs OBJECT lua_cjson.c strbuf.c ${FPCONV_SOURCES}) set_target_properties(cjson_objs PROPERTIES POSITION_INDEPENDENT_CODE ON) set(cjson_obj ${cjson_obj} $<TARGET_OBJECTS:cjson_objs>) if(ENABLE_DTRACE AND DTRACE) message(STATUS "DTrace found and enabled") add_definitions(-DENABLE_DTRACE) set(D_FILE ${PROJECT_SOURCE_DIR}/cjson_dtrace) execute_process( COMMAND ${DTRACE} -h -s ${D_FILE}.d -o ${D_FILE}.h ) if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") set(cjson_obj_2 ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cjson_objs.dir/lua_cjson.c.o) set(dtrace_obj ${CMAKE_CURRENT_BINARY_DIR}/dtrace.o) add_custom_command(OUTPUT ${dtrace_obj} COMMAND ${DTRACE} -G -s ${D_FILE}.d -o ${dtrace_obj} ${cjson_obj_2} DEPENDS ${cjson_obj_2} ) set_source_files_properties(${dtrace_obj} PROPERTIES EXTERNAL_OBJECT true GENERATED true ) set(cjson_obj ${cjson_obj} ${dtrace_obj}) unset(cjson_obj_2) unset(dtrace_obj) unset(D_FILE) endif() endif() add_library(cjson MODULE ${cjson_obj}) set_target_properties(cjson PROPERTIES PREFIX "") target_link_libraries(cjson ${_MODULE_LINK}) | ||||||||
Steps To Reproduce | Try my example of cmake code. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0042379) Kitware Robot (administrator) 2016-06-10 14:29 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-09-28 14:41 | Veniamin Gvozdikov | New Issue | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042379 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |