2.1.1.2 : The CMakeLists.txt file

First, we have to define the name of ou project and the minimal version of cmake we can use to build our project :
1
2
project(HadamardProduct)
cmake_minimum_required(VERSION 3.0)
We compile the program in -O3 mode to have some optimisation
1
add_definitions(-O3)
Then, we create the program with cmake (called executable in cmake)
1
add_executable(hadamard_product main.cpp)
The full CMakeLists.txt file :
1
2
3
4
5
6
project(HadamardProduct)
cmake_minimum_required(VERSION 3.0)

add_definitions(-O3)

add_executable(hadamard_product main.cpp)
You can get the file here.