diff options
author | bd <bdunahu@operationnull.com> | 2025-03-24 12:17:41 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-24 12:17:41 -0400 |
commit | 46c79e6e929ab784eb12417028dd43740b1a561e (patch) | |
tree | a99c2895027f22c4dbb4191fb132db36700bd0bf /CMakeLists.txt | |
parent | 63fe56a0638b53477579ca37df3bfce30613e4ed (diff) |
Added gui folder with its own CMake to house GUI+main.cc
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d4be3ee..9daac12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,58 +1,45 @@ cmake_minimum_required(VERSION 3.5) +set(CMAKE_CXX_COMPILER "g++") project(risc_vector) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -set(CMAKE_AUTOUIC ON) # automatically process .ui files into headers -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -add_compile_options(-Wall -lstdc++) +add_compile_options(-Wall -lstdc++ -g -O0) add_compile_options(-Wextra -Wpedantic) # cpp standard set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_COMPILER "g++") - # header files include_directories( ${PROJECT_SOURCE_DIR}/inc ) +# add gui +add_subdirectory(gui) + # gather source files file(GLOB_RECURSE SRCS "src/*.cc") -list(REMOVE_ITEM SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cc") # find QT components find_package(Qt6 COMPONENTS Widgets REQUIRED) +qt_standard_project_setup() # binary executable -add_executable(${PROJECT_NAME} ${SRCS}) -qt_add_resources(GUI_RESOURCES "src/gui/resources.qrc") -target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Widgets) - -# find_package(Catch2 REQUIRED) - -# #gather test files -# file(GLOB_RECURSE TESTS "tests/*.cc") - -# # test executable -# add_executable(tests ${SRCS} ${TESTS}) -# target_link_libraries(tests PRIVATE Catch2::Catch2WithMain PRIVATE Qt6::Widgets) - -# # test discovery -# include(CTest) -# include(Catch) -# catch_discover_tests(tests) +add_library(${PROJECT_NAME}_lib ${SRCS}) +target_link_libraries(${PROJECT_NAME}_lib) +find_package(Catch2 REQUIRED) -# # Gather GUI Source Files -# file(GLOB_RECURSE GUI_SRCS "src/gui/*.cc") +#gather test files +file(GLOB_RECURSE TESTS "tests/*.cc") -# # Gather GUI Resources -# qt_add_resources(GUI_RESOURCES "src/gui/resources.qrc") +# test executable +add_executable(tests ${SRCS} ${TESTS}) +target_link_libraries(tests PRIVATE Catch2::Catch2WithMain PRIVATE) -# # GUI executable -# qt_add_executable("${PROJECT_NAME}_gui" ${GUI_SRCS} ${SRCS} ${GUI_RESOURCES}) -# target_link_libraries("${PROJECT_NAME}_gui" PRIVATE Qt6::Widgets) +# test discovery +include(CTest) +include(Catch) +catch_discover_tests(tests) |