-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
67 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit $1 | ||
npx --no-install commitlint -x $(npm root -g)/@commitlint/config-conventional --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,11 +149,39 @@ message( | |
"-- Building for ${CMAKE_BUILD_TYPE} with OPTION_CONTRACT_MODE : ${OPTION_CONTRACT_MODE}" | ||
) | ||
|
||
include(FetchContent) | ||
# ------------------------------------------------------------------------------ | ||
# RPATH setup | ||
# ------------------------------------------------------------------------------ | ||
|
||
if(APPLE) | ||
set(CMAKE_MACOSX_RPATH ON) | ||
endif() | ||
|
||
# Set runtime path | ||
set(CMAKE_SKIP_BUILD_RPATH FALSE) # Add absolute path to all dependencies for | ||
# BUILD | ||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) | ||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) | ||
|
||
if(NOT SYSTEM_DIR_INSTALL) | ||
set(CMAKE_INSTALL_RPATH "$ORIGIN/${ASAP_INSTALL_LIB}") | ||
endif() | ||
|
||
# ---- Add dependencies via CPM ---- | ||
# see https://github.com/TheLartians/CPM.cmake for more info | ||
|
||
include(cmake/CPM.cmake) | ||
# We make sure that we have 'third_party' in the name so that the targets get | ||
# excluded from the generated target lists for the various tools. | ||
set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/third_party_deps) | ||
|
||
# ---- Speedup build using ccache ---- | ||
# see https://github.com/TheLartians/Ccache.cmake enables CCACHE support through | ||
# the USE_CCACHE flag possible values are: YES, NO or equivalent | ||
if(USE_CCACHE) | ||
cpmaddpackage("gh:TheLartians/[email protected]") | ||
endif() | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Testing | ||
# ------------------------------------------------------------------------------ | ||
|
@@ -165,28 +193,20 @@ if(ASAP_BUILD_TESTS) | |
# asap_add_code_coverage_all_targets( EXCLUDE */test/* *googlemock* | ||
# *googletest* /usr/*) | ||
include(Valgrind) | ||
include(FetchGoogleTest) | ||
include(GoogleTest) | ||
include(CTest) | ||
endif() | ||
|
||
# ------------------------------------------------------------------------------ | ||
# RPATH setup | ||
# ------------------------------------------------------------------------------ | ||
cpmaddpackage( | ||
NAME | ||
googletest | ||
GIT_TAG | ||
main | ||
GITHUB_REPOSITORY | ||
google/googletest | ||
OPTIONS | ||
"gtest_force_shared_crt ON" | ||
"INSTALL_GTEST OFF") | ||
|
||
# Set runtime path | ||
set(CMAKE_SKIP_BUILD_RPATH FALSE) # Add absolute path to all dependencies for | ||
# BUILD | ||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) | ||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) | ||
|
||
if(NOT SYSTEM_DIR_INSTALL) | ||
# Find libraries relative to binary | ||
if(APPLE) | ||
set(CMAKE_INSTALL_RPATH "@loader_path/../../../${ASAP_INSTALL_LIB}") | ||
else() | ||
set(CMAKE_INSTALL_RPATH "$ORIGIN/${ASAP_INSTALL_LIB}") | ||
endif() | ||
include(GoogleTest) | ||
include(CTest) | ||
endif() | ||
|
||
# ------------------------------------------------------------------------------ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
set(CPM_DOWNLOAD_VERSION 0.35.0) | ||
|
||
if(CPM_SOURCE_CACHE) | ||
# Expand relative path. This is important if the provided path contains a tilde (~) | ||
get_filename_component(CPM_SOURCE_CACHE ${CPM_SOURCE_CACHE} ABSOLUTE) | ||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
elseif(DEFINED ENV{CPM_SOURCE_CACHE}) | ||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
else() | ||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
endif() | ||
|
||
if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) | ||
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}") | ||
file(DOWNLOAD | ||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake | ||
${CPM_DOWNLOAD_LOCATION} | ||
) | ||
endif() | ||
|
||
include(${CPM_DOWNLOAD_LOCATION}) |
This file was deleted.
Oops, something went wrong.