Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ if(LTO_SUPPORTED AND "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
endif()

message(STATUS "Install destination " ${CMAKE_INSTALL_PREFIX})
install(FILES LICENSE LICENSE-3rdparty.csv LICENSE.LGPLV3 NOTICE DESTINATION ddprof)
install(FILES LICENSE LICENSE-3rdparty.csv LICENSE.LGPLV3 NOTICE DESTINATION licenses)
install(FILES ${CMAKE_BINARY_DIR}/version.txt DESTINATION ".")

set(DDPROF_EXE_OBJECT "${CMAKE_BINARY_DIR}/ddprof.o")
set(DDPROF_EXE_HASH_HEADER "${CMAKE_BINARY_DIR}/ddprof_exe_hash.h")
Expand Down Expand Up @@ -428,10 +429,10 @@ endif()

install(
TARGETS ddprof dd_profiling-static dd_profiling-shared
RUNTIME DESTINATION ddprof/bin
LIBRARY DESTINATION ddprof/lib
ARCHIVE DESTINATION ddprof/lib
PUBLIC_HEADER DESTINATION ddprof/include)
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include)

# ---- Unit tests ----

Expand Down
14 changes: 11 additions & 3 deletions bench/collatz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ add_exe(
DEFINITIONS ${COLLATZ_DEFINITION_LIST} USE_DD_PROFILING)
target_include_directories(collatz-profiling-static PRIVATE ${STATSD_INCLUDE_DIR})

install(TARGETS collatz DESTINATION collatz)
install(TARGETS collatz-profiling-shared DESTINATION collatz)
install(TARGETS collatz-profiling-static DESTINATION collatz)
set(COLLATZ_INSTALL_PREFIX
""
CACHE PATH "Override install prefix for collatz (defaults to CMAKE_INSTALL_PREFIX)")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this adds some complexity (to avoid having collatz in the same folder...) but it should not bother us too often

set(_collatz_dest "${COLLATZ_INSTALL_PREFIX}")
if(NOT _collatz_dest)
set(_collatz_dest "${CMAKE_INSTALL_PREFIX}")
endif()
install(TARGETS collatz DESTINATION "${_collatz_dest}")
install(TARGETS collatz-profiling-shared DESTINATION "${_collatz_dest}")
install(TARGETS collatz-profiling-static DESTINATION "${_collatz_dest}")
install(FILES ${CMAKE_BINARY_DIR}/version.txt DESTINATION "${_collatz_dest}")
2 changes: 0 additions & 2 deletions cmake/Version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ list(APPEND DDPROF_DEFINITION_LIST "VER_PATCH=${PROJECT_VERSION_PATCH}")

file(WRITE ${CMAKE_BINARY_DIR}/version.txt
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}+${BUILD_REV}\n")

install(FILES ${CMAKE_BINARY_DIR}/version.txt DESTINATION .)
5 changes: 3 additions & 2 deletions setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ done


SCRIPTDIR="$(cd -- $( dirname -- "${BASH_SOURCE[0]}" ) && pwd)" # no "$0" when sourcing
DDPROF_INSTALL_PREFIX="../deliverables"
DDPROF_INSTALL_PREFIX="../deliverables/ddprof"
DDPROF_COLLATZ_INSTALL_PREFIX="../deliverables/collatz"
DDPROF_BUILD_BENCH="ON"
COMPILER_SETTING="-DCMAKE_CXX_COMPILER=\"${CXX:-${DDPROF_CXX_DEFAULT}}\" -DCMAKE_C_COMPILER=\"${CC:-${DDPROF_CC_DEFAULT}}\""

Expand Down Expand Up @@ -59,7 +60,7 @@ GetDirectoryExtention() {
echo "_${DDPROF_EXTENSION_CC}_${DDPROF_EXTENSION_OS}_${1}"
}

COMMON_OPT="${COMPILER_SETTING} ${DEFAULT_ALLOCATOR_OPT} -DCMAKE_INSTALL_PREFIX=${DDPROF_INSTALL_PREFIX} -DBUILD_BENCHMARKS=${DDPROF_BUILD_BENCH}"
COMMON_OPT="${COMPILER_SETTING} ${DEFAULT_ALLOCATOR_OPT} -DCMAKE_INSTALL_PREFIX=${DDPROF_INSTALL_PREFIX} -DCOLLATZ_INSTALL_PREFIX=${DDPROF_COLLATZ_INSTALL_PREFIX} -DBUILD_BENCHMARKS=${DDPROF_BUILD_BENCH}"

# echoerr "Cmake settings--\n ${COMMON_OPT}"

Expand Down