refactor: cleanup cmake, fix benchmar/tests
This commit is contained in:
114
CMakeLists.txt
114
CMakeLists.txt
@@ -12,23 +12,18 @@ set(CMAKE_AUTORCC ON)
|
||||
# setup project
|
||||
project(enzo_project)
|
||||
|
||||
set(ENGINE_SOURCES
|
||||
src/Engine/Operator/Attribute.cpp
|
||||
src/Engine/Operator/Geometry.cpp
|
||||
src/Engine/Operator/GeometryOperator.cpp
|
||||
src/Engine/Operator/GeometryConnection.cpp
|
||||
src/Engine/Operator/GeometryOpDef.cpp
|
||||
src/Engine/Operator/GOP_test.cpp
|
||||
src/Engine/Operator/GOP_transform.cpp
|
||||
src/Engine/Network/NetworkManager.cpp
|
||||
)
|
||||
|
||||
# qt
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Widgets SvgWidgets OpenGLWidgets)
|
||||
qt_standard_project_setup()
|
||||
|
||||
# glm
|
||||
find_package(glm REQUIRED)
|
||||
|
||||
# eigen (math)
|
||||
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
|
||||
|
||||
# tbb
|
||||
find_package(TBB REQUIRED COMPONENTS TBB::tbb)
|
||||
|
||||
|
||||
|
||||
qt_add_executable(${AppExec}
|
||||
set(GUI_SOURCES
|
||||
static/resources.qrc
|
||||
src/Gui/main.cpp
|
||||
src/Gui/Interface.cpp
|
||||
@@ -47,62 +42,59 @@ qt_add_executable(${AppExec}
|
||||
src/Gui/Network/FloatingEdgeGraphic.cpp
|
||||
src/Gui/Network/DisplayFlagButton.cpp
|
||||
src/Gui/Network/NodeIconGraphic.cpp
|
||||
)
|
||||
|
||||
src/Engine/Operator/Attribute.cpp
|
||||
src/Engine/Operator/Geometry.cpp
|
||||
src/Engine/Operator/GeometryOperator.cpp
|
||||
src/Engine/Operator/GeometryConnection.cpp
|
||||
src/Engine/Operator/GeometryOpDef.cpp
|
||||
src/Engine/Network/NetworkManager.cpp
|
||||
# qt
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Widgets SvgWidgets OpenGLWidgets)
|
||||
qt_standard_project_setup()
|
||||
|
||||
src/Engine/Operator/GOP_test.cpp
|
||||
src/Engine/Operator/GOP_transform.cpp
|
||||
# glm
|
||||
find_package(glm REQUIRED)
|
||||
|
||||
# eigen (math)
|
||||
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
|
||||
|
||||
# tbb
|
||||
find_package(TBB REQUIRED COMPONENTS TBB::tbb)
|
||||
|
||||
|
||||
|
||||
qt_add_executable(${AppExec}
|
||||
${GUI_SOURCES}
|
||||
${ENGINE_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(${AppExec} PRIVATE Qt6::Core Qt6::Widgets Qt6::SvgWidgets Qt6::OpenGLWidgets glm::glm Eigen3::Eigen TBB::tbb)
|
||||
target_include_directories(${AppExec} PUBLIC src)
|
||||
|
||||
# tests
|
||||
# Include(FetchContent)
|
||||
Include(FetchContent)
|
||||
|
||||
# FetchContent_Declare(
|
||||
# Catch2
|
||||
# GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
# GIT_TAG v3.8.1 # or a later release
|
||||
# )
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.8.1 # or a later release
|
||||
)
|
||||
|
||||
# FetchContent_MakeAvailable(Catch2)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
|
||||
# add_executable(${TestExec}
|
||||
# tests/main-tests.cpp
|
||||
# tests/OperatorTests.cpp
|
||||
# tests/NetworkTests.cpp
|
||||
add_executable(${TestExec}
|
||||
${ENGINE_SOURCES}
|
||||
tests/main-tests.cpp
|
||||
tests/OperatorTests.cpp
|
||||
tests/NetworkTests.cpp
|
||||
)
|
||||
target_link_libraries(${TestExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb)
|
||||
target_compile_definitions(${TestExec} PRIVATE UNIT_TEST)
|
||||
target_include_directories(${TestExec} PUBLIC src)
|
||||
|
||||
# src/Engine/Operator/Attribute.cpp
|
||||
# src/Engine/Operator/Geometry.cpp
|
||||
# src/Engine/Operator/GeometryOperator.cpp
|
||||
# src/Engine/Network/NetworkManager.cpp
|
||||
# src/Engine/Operator/GeometryConnection.cpp
|
||||
# src/Engine/Operator/GeometryOpDef.cpp
|
||||
# src/Engine/Operator/GOP_test.cpp
|
||||
# )
|
||||
# target_link_libraries(${TestExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb)
|
||||
# target_compile_definitions(${TestExec} PRIVATE UNIT_TEST)
|
||||
# target_include_directories(${TestExec} PUBLIC src)
|
||||
# benchmarks
|
||||
add_executable(${BenchExec}
|
||||
${ENGINE_SOURCES}
|
||||
|
||||
# # benchmarks
|
||||
# add_executable(${BenchExec}
|
||||
# tests/Benchmarks.cpp
|
||||
|
||||
# src/Engine/Operator/Attribute.cpp
|
||||
# src/Engine/Operator/Geometry.cpp
|
||||
# src/Engine/Operator/GeometryOperator.cpp
|
||||
# src/Engine/Network/NetworkManager.cpp
|
||||
# src/Engine/Operator/GeometryConnection.cpp
|
||||
# src/Engine/Operator/GeometryOpDef.cpp
|
||||
# src/Engine/Operator/GOP_test.cpp
|
||||
# )
|
||||
# target_link_libraries(${BenchExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb)
|
||||
# target_compile_definitions(${BenchExec} PRIVATE UNIT_TEST)
|
||||
# target_include_directories(${BenchExec} PUBLIC src)
|
||||
tests/Benchmarks.cpp
|
||||
)
|
||||
target_link_libraries(${BenchExec} PRIVATE Catch2::Catch2WithMain Eigen3::Eigen Qt6::Core TBB::tbb)
|
||||
target_compile_definitions(${BenchExec} PRIVATE UNIT_TEST)
|
||||
target_include_directories(${BenchExec} PUBLIC src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user