A
A
Amasur2020-10-21 07:04:39
CMake
Amasur, 2020-10-21 07:04:39

Why could the contents of the .cpp file disappear after the Cmake build of the corresponding C++ project?

I have written a simple program for parallel calculation of the sum of matrix elements using MPI.
After creating the Cmake file (I'm attaching it to the question) and successfully building the project using it through the terminal, the contents of the .cpp file disappeared. With what it can be connected?

project(Parallel_matrix_sum)

cmake_minimum_required(VERSION 2.8) 

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")

add_executable(Parallel_matrix_sum Parallel_matrix_sum.cpp)

include_directories(TARGET_DIRECTORY "C:/Program Files (x86)/Microsoft SDKs/MPI/Include")

target_link_libraries(${PROJECT_NAME} TARGET_DIRECTORY "C:/Program Files (x86)/Microsoft SDKs/MPI/Include")

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question