4.1.3.2 : Le fichier CMakeLists.txt
Écrivons le fichier CMakeLists.txt :
On créé notre programme naïf :
1 |
add_executable(naive_gray_scott main.cpp)
|
On change les options de compilation :de cette manière car nous aurons besoin par la suite de compiler avec différentes options nos autres programmes et bibliothèque :
1 |
set_property(TARGET naive_gray_scott PROPERTY COMPILE_FLAGS "-O3") |
Enfin on ajoute les dépendences de notre programme :
1 |
target_link_libraries(naive_gray_scott gray_scott_data_format gray_scott_naive tensor_alloc option_parser data_stream string_utils ${HDF5_CXX_LIBRARIES} TBB::tbb) |
Le fichier CMakeLists.txt complet :
1 2 3 |
add_executable(naive_gray_scott main.cpp) set_property(TARGET naive_gray_scott PROPERTY COMPILE_FLAGS "-O3") target_link_libraries(naive_gray_scott gray_scott_data_format gray_scott_naive tensor_alloc option_parser data_stream string_utils ${HDF5_CXX_LIBRARIES} TBB::tbb) |
Vous pouvez le télécharger ici.