Commit 8280c9e1 authored by Vicente Mataix Ferrándiz's avatar Vicente Mataix Ferrándiz Committed by GILLES Sebastien
Browse files

Direct execution CMake

parent 4d4d7313
......@@ -786,6 +786,67 @@
"SHARED may be replaced by STATIC to use a static library instead."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can run these commands directly with the ! symbol as follows:"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-- The C compiler identification is GNU 9.3.0\n",
"-- The CXX compiler identification is GNU 9.3.0\n",
"-- Detecting C compiler ABI info\n",
"-- Detecting C compiler ABI info - done\n",
"-- Check for working C compiler: /home/vmataixf/bin/anaconda3/envs/formation_cpp/bin/x86_64-conda-linux-gnu-cc - skipped\n",
"-- Detecting C compile features\n",
"-- Detecting C compile features - done\n",
"-- Detecting CXX compiler ABI info\n",
"-- Detecting CXX compiler ABI info - done\n",
"-- Check for working CXX compiler: /home/vmataixf/bin/anaconda3/envs/formation_cpp/bin/x86_64-conda-linux-gnu-c++ - skipped\n",
"-- Detecting CXX compile features\n",
"-- Detecting CXX compile features - done\n",
"-- Configuring done\n",
"-- Generating done\n",
"-- Build files have been written to: /home/vmataixf/src/gettingstartedwithmoderncpp/6-InRealEnvironment/2c-Demo/7-CMake/build\n",
"Scanning dependencies of target hello\n",
"[ 25%] Building CXX object CMakeFiles/hello.dir/main.cpp.o\n",
"[ 50%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o\n",
"[ 75%] Building CXX object CMakeFiles/hello.dir/who-are-you.cpp.o\n",
"[100%] Linking CXX executable hello\n",
"[100%] Built target hello\n"
]
}
],
"source": [
"!cd ./2c-Demo/7-CMake/ && mkdir build && cd build && cmake .. && make"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"What's your name? Hello \n"
]
}
],
"source": [
"!cd ./2c-Demo/7-CMake/build && ./hello "
]
},
{
"cell_type": "markdown",
"metadata": {},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment