From 6844874c01158906353333964962dc1974a27400 Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Thu, 14 Sep 2023 14:26:08 -0500 Subject: [PATCH] Added base files --- .gitignore | 2 ++ CMakeLists.txt | 19 +++++++++++++++++++ src/CMakeLists.txt | 6 ++++++ src/n-queens.cpp | 0 test/CMakeLists.txt | 7 +++++++ test/test.cpp | 0 6 files changed, 34 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/n-queens.cpp create mode 100644 test/CMakeLists.txt create mode 100644 test/test.cpp diff --git a/.gitignore b/.gitignore index e257658..ee52d22 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ *.out *.app +# Extras +build diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cee098e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.10) + +project( + n-queens + LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 11 CACHE STRING "The C++ standard to use") +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) +set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) + +include_directories(${proxy-network_SOURCE_DIR}/src) + +add_subdirectory(src) + +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + add_subdirectory(test) +endif() + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..03715a2 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(n-queens + ./n-queens.cpp +) + +target_include_directories(proxy-network PUBLIC ${CMAKE_CURRENT_LIST_DIR}) + diff --git a/src/n-queens.cpp b/src/n-queens.cpp new file mode 100644 index 0000000..e69de29 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..bb1f7c7 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,7 @@ +add_subdirectory(Unity) +include_directories("${CMAKE_CURRENT_SOURCE_DIR}") +add_executable(testing + ./test.cpp +) +set_target_properties(testing PROPERTIES LINKER_LANGUAGE CXX) +target_link_libraries(testing unity) diff --git a/test/test.cpp b/test/test.cpp new file mode 100644 index 0000000..e69de29