Commits

Woojong Koh committed 1684858

SConstruct에 parallel build 기능 추가

  • Participants
  • Parent commits 633f728

Comments (0)

Files changed (2)

                   LINKFLAGS=['-framework', 'OpenGL', '-framework', 'GLUT', '-fopenmp']
                  )
 
+# Parallel build
+import os
+num_cpu = int(os.environ.get('NUM_CPU', 2))
+SetOption('num_jobs', num_cpu)
+print "running with -j", GetOption('num_jobs')
+
 srcs = ['hw5.cpp', 'ray_tracer.cpp', 'object.cpp', 'triangle.cpp', 'polyhedron.cpp', 'bsp_tree.cpp', 'octree.cpp', 'scene.cpp', 'obj_file.cpp']
 prog = env.Program('hw5', srcs)
 
 
     s.lights.push_back(light(vector3(0, 2, 2)));
     s.lights.back().dir = vector3(0, -1, -1);
+    s.lights.push_back(light(vector3(0, 0, 0)));
+    s.lights.back().dir = vector3(0, 0, -1);
 }
 
     scene::scene(int scene_num)