Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
chronoxor committed Sep 24, 2023
1 parent 919a591 commit 8020970
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-linux-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup required packages"
run: sudo apt-get install -y binutils-dev libssl-dev uuid-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-linux-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup required packages"
run: sudo apt-get install -y binutils-dev libssl-dev uuid-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup python"
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
shell: cmd
run: git config --global core.autocrlf input

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup Cygwin"
uses: cygwin/cygwin-install-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup cmake"
run: cmake --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup MSYS2"
uses: msys2/setup-msys2@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-vs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup Visual Studio"
uses: egor-tensin/vs-shell@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup cmake"
run: cmake --version
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ if(NOT CPPBENCHMARK_MODULE)
file(GLOB TESTS_SOURCE_FILES "tests/*.cpp")
add_executable(cppbenchmark-tests ${TESTS_HEADER_FILES} ${TESTS_INLINE_FILES} ${TESTS_SOURCE_FILES})
set_target_properties(cppbenchmark-tests PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}" FOLDER "tests")
target_include_directories(cppbenchmark-tests PRIVATE Catch2::Catch2)
target_link_libraries(cppbenchmark-tests ${LINKLIBS} Catch2::Catch2WithMain)
target_include_directories(cppbenchmark-tests PRIVATE Catch2)
target_link_libraries(cppbenchmark-tests ${LINKLIBS} Catch2)
list(APPEND INSTALL_TARGETS cppbenchmark-tests)
list(APPEND INSTALL_TARGETS_PDB cppbenchmark-tests)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016-2023 Ivan Shynkarenka
Copyright (c) 2016-2024 Ivan Shynkarenka

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 4 additions & 11 deletions modules/Catch2.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
if(NOT TARGET Catch2)

# Restore origin compile flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ORIGIN}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_ORIGIN}")

# Module subdirectory
add_subdirectory("Catch2")
# Module library
file(GLOB SOURCE_FILES "Catch2/extras/catch_amalgamated.cpp")
add_library(Catch2 ${SOURCE_FILES})
target_include_directories(Catch2 PUBLIC "Catch2/extras")

# Module folder
set_target_properties(Catch2 PROPERTIES FOLDER "modules/Catch2")
set_target_properties(Catch2WithMain PROPERTIES FOLDER "modules/Catch2")

# Restore custom compile flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_CUSTOM}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_CUSTOM}")

endif()
2 changes: 1 addition & 1 deletion tests/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// Created by Ivan Shynkarenka on 09.07.2015
//

#include <catch2/catch_test_macros.hpp>
#include <catch_amalgamated.hpp>

0 comments on commit 8020970

Please sign in to comment.