Move the solver code to its own library
This commit is contained in:
parent
dd89c1fd6c
commit
dc3f23d111
|
@ -5,11 +5,14 @@ project(Sudoku)
|
|||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
set(SOURCE_FILES
|
||||
set(LIB_SOURCE_FILES
|
||||
solver/cell.cpp
|
||||
solver/puzzle.cpp
|
||||
solver/solver.cpp
|
||||
solver.cpp
|
||||
)
|
||||
|
||||
add_executable(solver ${SOURCE_FILES})
|
||||
add_library(solver ${LIB_SOURCE_FILES})
|
||||
target_include_directories(solver PUBLIC "${PROJECT_SOURCE_DIR}")
|
||||
|
||||
add_executable(test_solver solver.cpp)
|
||||
target_link_libraries(test_solver PUBLIC solver)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "cell.h"
|
||||
#include "solver/cell.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "puzzle.h"
|
||||
#include "solver/puzzle.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "cell.h"
|
||||
#include "solver/cell.h"
|
||||
|
||||
class Puzzle {
|
||||
public:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "solver.h"
|
||||
#include "solver/solver.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "puzzle.h"
|
||||
#include "solver/puzzle.h"
|
||||
|
||||
class Solver {
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue