Mercurial > hg > Members > tobaru > CbC_xv6
diff src/CMakeLists.txt @ 86:765449889623
fix translate interface routine
author | anatofuz |
---|---|
date | Tue, 15 Oct 2019 20:03:48 +0900 |
parents | d33e6b5adb57 |
children | add5e775339c |
line wrap: on
line diff
--- a/src/CMakeLists.txt Tue Oct 15 16:14:18 2019 +0900 +++ b/src/CMakeLists.txt Tue Oct 15 20:03:48 2019 +0900 @@ -22,7 +22,7 @@ if (${USE_CUDA}) include_directories("/usr/local/cuda/include") - include_directories(${CMAKE_SOURCE_DIR}) + #include_directories(${CMAKE_SOURCE_DIR}) set(NVCCFLAG "-std=c++11" "-g" "-O0" ) if (UNIX AND NOT APPLE) # LINUX set(CUDA_LINK_FLAGS "-L/usr/local/cuda/lib64 -lcuda -lcudart") @@ -77,16 +77,19 @@ #target_link_libraries(syslib) file(COPY "${CMAKE_SOURCE_DIR}/interface/" DESTINATION ${CMAKE_KERNEL_DIR_C}) - file(COPY "${CMAKE_SOURCE_DIR}/context.h" DESTINATION ${CMAKE_KERNEL_DIR_C}) + file(COPY "${CMAKE_SOURCE_DIR}/origin-context.h" DESTINATION ${CMAKE_KERNEL_DIR_C}) + file(RENAME "${CMAKE_KERNEL_DIR_C}/origin-context.h" "${CMAKE_KERNEL_DIR_C}/context.h") add_custom_command ( - OUTPUT ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c + OUTPUT ${CMAKE_KERNEL_DIR_C}/c/${_Gears_TARGET}-context.c DEPENDS ${_Gears_CBC_SOURCES} fs.img initcode COMMAND "cd" "CMakeFiles/kernel.dir" ";" "perl" "${CMAKE_SOURCE_DIR}/gearsTools/generate_context.pl" "-o" ${_Gears_TARGET} ${_Gears_CBC_SOURCES} ) # add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c ) - include_directories(${_Gears_TARGET} PUBLIC ".") - include_directories(${_Gears_TARGET} PUBLIC ${CMAKE_KERNEL_DIR_C}) - add_executable(${_Gears_TARGET} ${CMAKE_KERNEL_DIR_C} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${CMAKE_KERNEL_DIR}/c/${_Gears_TARGET}-context.c ) + include_directories(${CMAKE_KERNEL_DIR_C}) + file(GLOB XV6_HEADERS "${CMAKE_SOURCE_DIR}/*.h") + file(COPY ${XV6_HEADERS} DESTINATION ${CMAKE_KERNEL_DIR_C}) + file(COPY "${CMAKE_SOURCE_DIR}/device" DESTINATION "${CMAKE_KERNEL_DIR_C}") + add_executable(${_Gears_TARGET} ${_Gears_CBC_SOURCES} ${_Gears_CSOURCES} ${CMAKE_KERNEL_DIR_C}/c/${_Gears_TARGET}-context.c ) # target_link_libraries(${_Gears_TARGET} m pthread) endmacro()