Skip to content

Commit

Permalink
update CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanhaoGong committed Oct 21, 2015
1 parent 7f74bfe commit f8725fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CONFIGURATION_TYPES Release)
project( CF )
find_package( OpenCV REQUIRED )
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "set build type to release")
include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable( CF main.cpp )
target_link_libraries( CF ${OpenCV_LIBS} )
target_link_libraries( CF ${OpenCV_LIBS} )
set(CMAKE_BUILD_TYPE Release)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -march=native") ## Optimize
endif()
if(CMAKE_COMPILER_IS_GNUC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -march=native") ## Optimize
endif()
if(MSVC)

endif(MSVC)
2 changes: 1 addition & 1 deletion DM.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ void DM::Solver(int Type, double & time, int MaxItNum, float lambda, float DataF

//output the total energy profile
ofstream energyProfile;
energyProfile.open ("TotalEnergy.txt");
energyProfile.open ("Energy_total.txt");
for (int i = 0; i <= count; ++i)
{
energyProfile<<i<<" "<<energyRecord[i]<<endl;
Expand Down

0 comments on commit f8725fe

Please sign in to comment.