aca-tasks/task1/CMakeLists.txt

31 lines
1.1 KiB
CMake
Raw Normal View History

2023-10-31 14:06:08 +00:00
find_package(Python3 COMPONENTS Interpreter REQUIRED)
2023-11-07 10:33:16 +00:00
find_package(fmt)
2023-10-31 14:06:08 +00:00
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)
2023-10-31 20:11:31 +00:00
add_executable(task1_7 main.cpp
2023-11-03 10:32:02 +00:00
mergesort.h
mergesort_mt.h)
2023-10-31 20:11:31 +00:00
2023-11-07 10:33:16 +00:00
target_link_libraries(task1_7 PRIVATE
fmt::fmt)
install(TARGETS task1_7 DESTINATION bin)
install(IMPORTED_RUNTIME_ARTIFACTS task1_7 DESTINATION bin)
2023-10-31 14:06:08 +00:00
add_dependencies(task1_7 task1_7_dataset)