Skip to content

Commit

Permalink
Update build settings for MacOSX.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsuya Yatagawa authored and Tatsuya Yatagawa committed Jun 27, 2016
1 parent 7a41547 commit bb58820
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ output
data/tmp
.cccc
spica_dirs.h

.DS_Store
17 changes: 13 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ project(spica)
if (NOT WIN32)
# Linux or Mac OS X
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pthread")
if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fprofile-arcs -ftest-coverage")
endif()
if (NOT MACOS AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp=libomp")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
Expand All @@ -28,6 +29,14 @@ set(spica_USE_STATIC_LIBS OFF CACHE BOOL OFF)
if (WIN32)
set(LIB_PREFIX "")
set(LIB_SUFFIX ".lib")
elseif(APPLE)
if (spica_USE_STATIC_LIBS)
set(LIB_PREFIX "lib")
set(LIB_SUFFIX ".a")
else()
set(LIB_PREFIX "lib")
set(LIB_SUFFIX ".dylib")
endif()
else()
if (spica_USE_STATIC_LIBS)
set(LIB_PREFIX "lib")
Expand Down
4 changes: 2 additions & 2 deletions example/pathtracing_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ int main(int argc, char **argv) {
params.set("GATHER_RADIUS", 64.0);
params.set("GATHER_PHOTONS", 64);

VolPathIntegrator integr(camera, sampler);
//PathIntegrator integr(camera, sampler);
//VolPathIntegrator integr(camera, sampler);
PathIntegrator integr(camera, sampler);

//IrradCacheIntegrator integr(camera, sampler);
//HierarchicalIntegrator integr(camera, sampler);
Expand Down
1 change: 1 addition & 0 deletions sources/integrator/integrator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void SamplerIntegrator::render(const Scene& scene,
proc++;
if (proc % 1000 == 0) {
printf("%6.2f %% processed...\r", 100.0 * proc / numPixels);
fflush(stdout);
}
});

Expand Down

0 comments on commit bb58820

Please sign in to comment.