aca-tasks/task1/CMakeLists.txt
2023-11-03 11:32:02 +01:00

30 lines
1.0 KiB
CMake

find_package(Qt6 COMPONENTS Core REQUIRED)
find_package(fmt)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dataset.dat
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dataset-gen.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dataset-gen.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating random dataset")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dataset.dat
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dataset.dat
COMMAND cmake -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/dataset.dat ${CMAKE_CURRENT_BINARY_DIR}/dataset.dat
COMMENT "Copying dataset")
add_custom_target(task1_7_dataset
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/dataset.dat
${CMAKE_CURRENT_BINARY_DIR}/dataset.dat)
add_executable(task1_7 main.cpp
mergesort.h
mergesort_mt.h)
target_link_libraries(task1_7
fmt::fmt
Qt::Core)
add_dependencies(task1_7 task1_7_dataset)