AlloSphere-Research-Group / allolib

Library for interactive multimedia application development
BSD 3-Clause "New" or "Revised" License
36 stars 15 forks source link

`./run.sh examples/xxx/yyy.cpp` only executes the compiled program the first time it runs #8

Closed kybr closed 6 years ago

kybr commented 6 years ago

Let's build and run with ./run.sh:

ix $ ./run.sh examples/graphics/lighting.cpp

...

[  0%] Linking C static library lib/libGLEW.a
[  1%] Built target glew_s
[  2%] Linking CXX static library lib/libGamma.a
[ 13%] Built target Gamma
[ 14%] Linking C static library libglfw3.a
[ 26%] Built target glfw
[ 27%] Linking CXX static library lib/libal.a
[ 98%] Built target al
Scanning dependencies of target lighting
[ 99%] Building CXX object CMakeFiles/lighting.dir/Users/ky/Projects/tmp/AlloLib/examples/graphics/lighting.cpp.o
[100%] Linking CXX executable /Users/ky/Projects/tmp/AlloLib/examples/graphics/bin/lighting
[100%] Built target lighting

A window opens; The program runs. We close the window and get our terminal back. Then we execute the same line again and again, but no window opens and our program does not run.

ix $ ./run.sh examples/graphics/lighting.cpp

...

Running target after build
[  1%] Built target glew_s
[ 13%] Built target Gamma
[ 26%] Built target glfw
[ 98%] Built target al
[100%] Built target lighting

After that first time, every subsequent ./run.sh invocation seems to do nothing.

mantaraya36 commented 6 years ago

Fixed 9e913a8

kybr commented 6 years ago

Actually, the fix is in this commit:

https://github.com/AlloSphere-Research-Group/allolib/commit/1664651d13988dec8c9b6947d2238b15b548234b