Mercurial > hg > Members > anatofuz > CbC_xv6
comparison src/usr/CMakeLists.txt @ 71:6ebe7043702c
fix generated source at usr commands
author | anatofuz |
---|---|
date | Wed, 31 Jul 2019 18:50:53 +0900 |
parents | f236eba62a76 |
children | 4051ad3e0958 |
comparison
equal
deleted
inserted
replaced
70:1e1c6feb7d83 | 71:6ebe7043702c |
---|---|
41 COMMAND nvcc ${NVCCFLAG} -c -ptx -o ${j} ${i} | 41 COMMAND nvcc ${NVCCFLAG} -c -ptx -o ${j} ${i} |
42 ) | 42 ) |
43 list(APPEND _Gears_CBC_SOURCES ${j}) | 43 list(APPEND _Gears_CBC_SOURCES ${j}) |
44 else() | 44 else() |
45 set(j ${i}) | 45 set(j ${i}) |
46 file(COPY "${CMAKE_SOURCE_DIR}/context.h" DESTINATION "${CMAKE_BINARY_DIR}/usr/${_Gears_TARGET}.dir") | |
46 list(APPEND _Gears_CSOURCES ${j}) | 47 list(APPEND _Gears_CSOURCES ${j}) |
47 endif() | 48 endif() |
48 endforeach(i) | 49 endforeach(i) |
49 | 50 |
50 add_custom_command ( | 51 add_custom_command ( |
51 OUTPUT c/${_Gears_TARGET}-context.c | 52 OUTPUT ${_Gears_TARGET}.dir/c/${_Gears_TARGET}-context.c |
52 DEPENDS ${_Gears_CBC_SOURCES} | 53 DEPENDS ${_Gears_CBC_SOURCES} |
53 COMMAND "perl" "${CMAKE_SOURCE_DIR}/gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${_Gears_CBC_SOURCES} | 54 COMMAND "cd" "${_Gears_TARGET}.dir" ";" "perl" "${CMAKE_SOURCE_DIR}/gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${CMAKE_SOURCE_DIR}/usr/${_Gears_CSOURCES} |
54 ) | 55 ) |
55 add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} c/${_Gears_TARGET}-context.c ) | 56 add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${_Gears_TARGET}.dir/c/${_Gears_TARGET}-context.c ) |
56 target_link_libraries(${_Gears_TARGET} ulib) | 57 target_link_libraries(${_Gears_TARGET} ulib) |
57 endmacro() | 58 endmacro() |
58 | 59 |
59 add_library(ulib STATIC ulib.c usys.S printf.c umalloc.c) | 60 add_library(ulib STATIC ulib.c usys.S printf.c umalloc.c) |
60 #add_library(syslib string.c) | 61 #add_library(syslib string.c) |