Kaynağa Gözat

cmake default build is release now

Carlos Aguilar 8 yıl önce
ebeveyn
işleme
a9391c967d
2 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. 4 4
      CMakeCompilers.txt
  2. 1 0
      README.md

+ 4 - 4
CMakeCompilers.txt

@@ -18,7 +18,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
 set(CMAKE_EXE_LINKER_FLAGS "-fopenmp")
 
 # optimization flags support
-if(CMAKE_BUILD_TYPE MATCHES Release)
+if(CMAKE_BUILD_TYPE MATCHES Debug)
+  add_definitions(-DCHECK_STRICTMOD)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
+else()
 	set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3")
 	foreach(FLAG -march=native -mtune=native -funroll-loops)
 		string(REGEX REPLACE -= _ FLAG_ID ${FLAG})
@@ -30,8 +33,5 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
   if(APPLE)
 	    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse -Wa,-q")
   endif()
-else()
-    add_definitions(-DCHECK_STRICTMOD)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
 endif()
 

+ 1 - 0
README.md

@@ -80,6 +80,7 @@ Option                             | Description
 `-DSEND_CATALOG=OFF`               | Do not send the catalog to client (default is send catalog if |catalog|<1000)
 `-DMULTI_THREAD=OFF`               | Do not use multi-threading
 `-DPERF_TIMERS=OFF`                | Do not show performance measurements during execution
+`-DCMAKE_BUILD_TYPE=Debug`         | Add debugging options and remove optimization
 
 
 Usage of XPIR as a library: