Procházet zdrojové kódy

cmake default build is release now

Carlos Aguilar před 8 roky
rodič
revize
a9391c967d
2 změnil soubory, kde provedl 5 přidání a 4 odebrání
  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: