Chapter 9.2 : La compilation
Comme toujours, on créer un dossier build, dans notre projet, puis on va dedans :
1 2 |
mkdir build cd build |
On appelle cmake :
cmake .. -- The C compiler identification is GNU 11.3.0 -- The CXX compiler identification is GNU 11.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Use nvc++ compiler at /opt/nvidia/hpc_sdk/Linux_x86_64/22.11/compilers/bin/nvc++ -- Configuring done -- Generating done -- Build files have been written to: XXX/CURANDReduceVector/build
Note : si vous n'avez pas d'autre compilateurs que nvc++, vous pouver appeler directement cmake .. -DCMAKE_CXX_COMPILER=${NVCPP}
On appelle make :
1 2 3 |
[ 50%] Building CXX object CMakeFiles/test_curand_reduce_vector.dir/main.cpp.o [100%] Linking CXX executable test_curand_reduce_vector [100%] Built target test_curand_reduce_vector |