Previous The CMakeLists.txt file |
Parent Developping the test program |
Outline | Next Dammit, I have memory leak in my program |
mkdir buildThen we go into it :
cd buildWe call cmake :
cmake .. -- The C compiler identification is GNU 7.2.0 -- The CXX compiler identification is GNU 7.2.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: XXX/build
The .. is to call the parent directory as ../Finally we call make :
1 2 3 4 5 |
make Scanning dependencies of target hadamard_product_memory_leak [ 50%] Building CXX object CMakeFiles/hadamard_product_memory_leak.dir/main.cpp.o [100%] Linking CXX executable hadamard_product_memory_leak [100%] Built target hadamard_product_memory_leak |
./hadamard_product_memory_leak Hadamard product tabResult[0] = 0 tabResult[0] = 0 tabResult[0] = 0 tabResult[0] = 0 tabResult[0] = 0It seems, the execution is ok, but we will check this with valgrind.
Previous The CMakeLists.txt file |
Parent Developping the test program |
Outline | Next Dammit, I have memory leak in my program |