Permalink
Browse files

Enable optimizations in a platform-independent way

  • Loading branch information...
myint
myint committed Mar 30, 2012
1 parent a041911 commit b2ed8a876dbc4f0bfed2e2cbffa7265ccaf5d95e
Showing with 2 additions and 5 deletions.
  1. +1 −4 CMakeLists.txt
  2. +1 −1 coverage.bash
View
@@ -16,7 +16,7 @@ FIND_PACKAGE(FreeImage)
include_directories(${FREEIMAGE_INCLUDE_DIRS})
target_link_libraries(perceptualdiff ${FREEIMAGE_LIBRARIES})
-option(DIFF_USE_COMPILER_OPTIMIZATIONS "Enable compiler optimizations." TRUE)
+set(CMAKE_BUILD_TYPE Release)
FIND_PACKAGE(OpenMP)
if(OPENMP_FOUND)
@@ -26,9 +26,6 @@ endif()
# Compiler options
if(UNIX)
- if(DIFF_USE_COMPILER_OPTIMIZATIONS)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
- endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -ansi -pedantic -Wcast-qual -Wpointer-arith -Winit-self -Wswitch-default -Wmissing-include-dirs -Wold-style-cast -Wnon-virtual-dtor")
endif()
View
@@ -8,7 +8,7 @@ export LDFLAGS='-coverage'
rm -f CMakeCache.txt
rm -rf CMakeFiles
-cmake DIFF_USE_COMPILER_OPTIMIZATIONS=FALSE .
+cmake -D CMAKE_BUILD_TYPE=Debug .
make check

0 comments on commit b2ed8a8

Please sign in to comment.