Skip to content

Commit

Permalink
Merge pull request #49 from eseiler/infra/ccache
Browse files Browse the repository at this point in the history
[INFRA] Search for ccache earlier
  • Loading branch information
eseiler authored Aug 21, 2023
2 parents 0cce459 + cc12273 commit 6ccdaaf
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 15 deletions.
7 changes: 7 additions & 0 deletions cmake/configuration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION V
hibf_config_error ("Clang < 17 is not supported. The detected compiler version is ${CMAKE_CXX_COMPILER_VERSION}.")
endif ()

# ----------------------------------------------------------------------------
# ccache
# ----------------------------------------------------------------------------

include ("${HIBF_SOURCE_DIR}/test/cmake/hibf_require_ccache.cmake")
hibf_require_ccache ()

# ----------------------------------------------------------------------------
# Require C++20
# ----------------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions test/cmake/hibf_require_ccache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ macro (hibf_require_ccache)
set (HIBF_FPROFILE_ABS_PATH "-fprofile-abs-path")
if (HIBF_USE_CCACHE)
find_program (CCACHE_PROGRAM ccache)
find_package_message (CCACHE_PROGRAM_PRE "Finding program ccache" "[${CCACHE_PROGRAM}]")

if (NOT CCACHE_PROGRAM)
find_package_message (CCACHE_PROGRAM "Finding program ccache - Failed" "[${CCACHE_PROGRAM}]")
find_package_message (CCACHE_PROGRAM " Ccache program: not available" "[${CCACHE_PROGRAM}]")
else ()
find_package_message (CCACHE_PROGRAM "Finding program ccache - Success" "[${CCACHE_PROGRAM}]")
find_package_message (CCACHE_PROGRAM " Ccache program: available" "[${CCACHE_PROGRAM}]")
set (HIBF_FPROFILE_ABS_PATH "--ccache-skip -fprofile-abs-path")
# New option since cmake >= 3.4:
# https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_LAUNCHER.html
Expand Down
3 changes: 0 additions & 3 deletions test/coverage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
cmake_minimum_required (VERSION 3.10...3.22)
project (hibf_test_coverage CXX)

include (../cmake/hibf_require_ccache.cmake)
hibf_require_ccache ()

# Add a custom build type: Coverage

set (CMAKE_CXX_FLAGS_COVERAGE
Expand Down
1 change: 0 additions & 1 deletion test/header/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ macro (hibf_header_test component header_base_path exclude_regex)
unset (header_target)
endmacro ()

hibf_require_ccache ()
hibf_require_benchmark ()
hibf_require_test ()

Expand Down
1 change: 0 additions & 1 deletion test/hibf-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ endif ()

include (hibf_test_component)
include (hibf_test_files)
include (hibf_require_ccache)
include (hibf_require_benchmark)
include (hibf_require_test)
include (hibf_add_subdirectories)
Expand Down
1 change: 0 additions & 1 deletion test/performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ macro (hibf_benchmark benchmark_cpp)
unset (test_name)
endmacro ()

hibf_require_ccache ()
hibf_require_benchmark ()

add_subdirectories ()
1 change: 0 additions & 1 deletion test/snippet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ macro (hibf_snippets test_name_prefix snippet_base_path)
endforeach ()
endmacro ()

hibf_require_ccache ()
hibf_require_test ()

hibf_snippets ("snippet" "${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down
1 change: 0 additions & 1 deletion test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ macro (hibf_test unit_test_cpp)
unset (test_name)
endmacro ()

hibf_require_ccache ()
hibf_require_test ()

add_subdirectories ()
Expand Down
4 changes: 0 additions & 4 deletions util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,5 @@ FetchContent_Populate (sharg)
list (APPEND CMAKE_PREFIX_PATH "${sharg_SOURCE_DIR}/build_system")
find_package (sharg 1.0 REQUIRED)

## ccache
include ("${HIBF_ROOT_DIR}/test/cmake/hibf_require_ccache.cmake")
hibf_require_ccache ()

add_executable (fpr_quality fpr_quality.cpp)
target_link_libraries (fpr_quality seqan::hibf sharg::sharg)

1 comment on commit 6ccdaaf

@vercel
Copy link

@vercel vercel bot commented on 6ccdaaf Aug 21, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

hibf – ./

hibf.vercel.app
hibf-git-main-seqan.vercel.app
hibf-seqan.vercel.app

Please sign in to comment.