Find file
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (45 sloc) 1.57 KB
project(ENVYTOOLS C)
cmake_minimum_required(VERSION 2.6)
enable_testing()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif (NOT CMAKE_BUILD_TYPE)
if (NOT DOC_PATH)
set(DOC_PATH "share/doc/envytools/")
endif (NOT DOC_PATH)
include_directories(include)
add_subdirectory(util)
add_subdirectory(easm)
add_subdirectory(nva)
add_subdirectory(rnn)
add_subdirectory(envydis)
add_subdirectory(nvbios)
add_subdirectory(vstream)
add_subdirectory(vdpow)
add_subdirectory(nvhw)
add_subdirectory(hwtest)
add_subdirectory(demmt)
add_subdirectory(cupti_trace)
# Get the list of hwdoc files to install them in a flat directory
file(GLOB_RECURSE HWDOCS_SRC docs/*)
# Get the full patch to .gitignore and remove it from the list
file(GLOB GITIGNORE docs/.gitignore)
list(REMOVE_ITEM HWDOCS_SRC ${GITIGNORE})
install(DIRECTORY include/ DESTINATION include/envytools)
install(DIRECTORY rnndb DESTINATION share PATTERN ".gitignore" EXCLUDE)
install(FILES ${HWDOCS_SRC} DESTINATION ${DOC_PATH}/hwdocs)
install(FILES README.rst DESTINATION ${DOC_PATH})
install(FILES docs/envydis/index.rst DESTINATION ${DOC_PATH} RENAME README-envydis)
message("")
message("-- Summary --")
message("")
message("General:")
message(" C-flags: '${CMAKE_C_FLAGS}' (-DCMAKE_C_FLAGS=\"...\")")
message(" Build type: ${CMAKE_BUILD_TYPE} (-DCMAKE_BUILD_TYPE=\"...\")")
message("")
message("Install:")
message(" Prefix: '${CMAKE_INSTALL_PREFIX}' (-DCMAKE_INSTALL_PREFIX=...)")
message(" Doc path: '${DOC_PATH}' (-DDOC_PATH=...)")
message(" Python: '${NVAPY_PATH}' (-DNVAPY_PATH)")
message("")