-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #311 from eranpeer/improve-cmake-support
Moved everything to CMake and cleaned old stuff.
- Loading branch information
Showing
25 changed files
with
226 additions
and
993 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
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,33 @@ | ||
name: CI Windows/MSVC | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
msvc-windows-2022: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build project | ||
run: | | ||
cmake -S . -B build -G "Visual Studio 17 2022" | ||
cmake --build build --config Debug -j | ||
- name: Run tests | ||
run: | | ||
echo "Not yet because bugged but it needs to be fixed." | ||
msvc-windows-2019: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build project | ||
run: | | ||
cmake -S . -B build -G "Visual Studio 16 2019" | ||
cmake --build build --config Debug -j | ||
- name: Run tests | ||
run: | | ||
echo "Not yet because bugged but it needs to be fixed." |
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 |
---|---|---|
|
@@ -41,6 +41,7 @@ tests/x64/ | |
|
||
# CLion files | ||
.idea/ | ||
cmake-build-*/ | ||
|
||
# bii | ||
bii/ | ||
|
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,51 +1,18 @@ | ||
|
||
#ARCH_INDEPENDENT option at write_basic_package_version_file | ||
#requires 3.14 version of CMake | ||
# ARCH_INDEPENDENT option at write_basic_package_version_file requires 3.14 version of CMake. | ||
cmake_minimum_required(VERSION 3.14) | ||
|
||
project(FakeIt VERSION 2.0.5 LANGUAGES CXX) | ||
|
||
#Add GNU Coding Standards support. | ||
include(GNUInstallDirs) | ||
|
||
#Create library with INTERFACE parameter because we want to use headers from outside. | ||
add_library(FakeIt INTERFACE) | ||
|
||
#Add include directories to the interface library. | ||
#If we use FakeIt from build-tree then we use BUILD_INTERFACE wrapper. | ||
#If we use FakeIt from install-tree then we use INSTALL_INTERFACE wrapper. | ||
target_include_directories(FakeIt INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/single_header/standalone> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
) | ||
|
||
#Add alias for the library with namespace. | ||
add_library(FakeIt::FakeIt ALIAS FakeIt) | ||
|
||
#Install single_header file to install directory to include subdirectory. | ||
#Trailing slash at "single_header/standalone/" string means that | ||
#the header will be installed like ${CMAKE_INSTALL_PREFIX}/include/fakeit.hpp | ||
#instead of ${CMAKE_INSTALL_PREFIX}/include/standalone/fakeit.hpp. | ||
install(DIRECTORY single_header/standalone/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
project(FakeIt VERSION 2.3.2 LANGUAGES CXX) | ||
|
||
#Add FakeIt target to the FakeItConfig.cmake file | ||
#which will be used to find FakeIt from outside. | ||
install(TARGETS FakeIt EXPORT FakeItConfig) | ||
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang." OFF) | ||
|
||
set(FakeIt_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/FakeIt) | ||
# Directory containing main targets of FakeIt. | ||
add_subdirectory(include) | ||
|
||
#Install FakeItConfig.cmake file to the ${CMAKE_INSTALL_PREFIX}/${FakeIt_CONFIG_DIR} directory | ||
#and all correlated targets should be called from outside by the namespace. | ||
install(EXPORT FakeItConfig NAMESPACE FakeIt:: DESTINATION ${FakeIt_CONFIG_DIR}) | ||
# Directory containing config targets of FakeIt. | ||
add_subdirectory(config) | ||
|
||
#Add version control. | ||
include(CMakePackageConfigHelpers) | ||
write_basic_package_version_file("${PROJECT_BINARY_DIR}/FakeItConfigVersion.cmake" | ||
VERSION | ||
${PROJECT_VERSION} | ||
COMPATIBILITY | ||
AnyNewerVersion | ||
ARCH_INDEPENDENT | ||
) | ||
install(FILES "${PROJECT_BINARY_DIR}/FakeItConfigVersion.cmake" DESTINATION ${FakeIt_CONFIG_DIR}) | ||
# Directory containing test targets of FakeIt. | ||
add_subdirectory(tests) | ||
|
||
# Directory containing single header targets of FakeIt. | ||
add_subdirectory(single_header) |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.