Skip to content

Commit

Permalink
Changed config hoping for tests to complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon Markiewicz committed Jun 10, 2024
1 parent 7360e16 commit f113108
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
30 changes: 16 additions & 14 deletions homework/schedule/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
cmake_minimum_required(VERSION 3.5.0)
project(student-database VERSION 0.1.0 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS Off)
cmake_minimum_required(VERSION 3.10)
project(schedule)

project(lambdas)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(
lambdas
main.cpp
schedule.cpp
)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
include_directories(.)

add_executable(${PROJECT_NAME} main.cpp)
add_executable(${PROJECT_NAME}-ut tests/catch/catch_amalgamated.cpp tests/catch/catch_main.cpp tests/tests.cpp)
add_executable(${PROJECT_NAME}-ut-bonus tests/catch/catch_amalgamated.cpp tests/catch/catch_main.cpp tests/tests-bonus.cpp)

target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra)
target_compile_options(${PROJECT_NAME}-ut PRIVATE -Wall -Wextra)
target_compile_options(${PROJECT_NAME}-ut-bonus PRIVATE -Wall -Wextra)

enable_testing()
add_test(NAME schedule-tests COMMAND ${PROJECT_NAME}-ut)
1 change: 0 additions & 1 deletion homework/schedule/schedule.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion homework/schedule/schedule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <thread>

template <typename Func, typename... A>
void schedule(Func func, std::chrono::seconds sec, A... a){
void schedule(Func func, std::chrono::seconds sec, A... a) {
std::this_thread::sleep_for(sec);
func(a...);
}

0 comments on commit f113108

Please sign in to comment.