Skip to content

Commit 79159cc

Browse files
committed
cmake: use the release flags
1 parent 9148785 commit 79159cc

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

CMakeLists.txt

+4-6
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,22 @@ function(alaska_switch OPT DEFAULT)
2424
endfunction()
2525

2626

27-
function(alaska_int_option OPT DEFAULT)
27+
function(alaska_option OPT DEFAULT)
2828
set(${OPT} ${DEFAULT} CACHE STRING "")
2929
add_compile_definitions(${OPT}=${${OPT}})
3030
message(STATUS "${Purple}OPTION${ColorReset} ${OPT} ${Green}${${OPT}}${ColorReset}")
3131
endfunction()
3232

3333

34-
3534
alaska_switch(ALASKA_ENABLE_COMPILER ON)
3635
alaska_switch(ALASKA_ENABLE_TESTING ON)
3736

38-
alaska_int_option(ALASKA_SIZE_BITS 24)
39-
40-
# set(ALASKA_ENABLE_COMPILER ON CACHE BOOL "Build the Alaska Compiler, binding to LLVM")
41-
# set(ALASKA_DISABLE_TESTING OFF CACHE BOOL "Disable testing the core runtime with gtest")
37+
alaska_option(ALASKA_SIZE_BITS 24)
38+
alaska_option(CMAKE_BUILD_TYPE Release)
4239

4340
set(ALASKA_VERSION 2)
4441

42+
4543
# -------------------------------------------------------------------------------------------
4644

4745
cmake_minimum_required(VERSION 3.13)

compiler/include/alaska/graph_lite.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1256,8 +1256,8 @@ namespace graph_lite {
12561256
num_edges_removed = detail::container::erase_all(src_neighbors, tgt_full);
12571257
}
12581258
if (src_pos!=tgt_pos or direction==EdgeDirection::DIRECTED) {
1259-
int num_tgt_removed = detail::container::erase_all(get_in_neighbors(tgt_pos), src_full);
1260-
assert(num_edges_removed == num_tgt_removed);
1259+
// int num_tgt_removed = detail::container::erase_all(get_in_neighbors(tgt_pos), src_full);
1260+
// assert(num_edges_removed == num_tgt_removed);
12611261
}
12621262
if constexpr(logging == Logging::ALLOWED){
12631263
if (num_edges_removed==0) {

runtime/CMakeLists.txt

+10-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@
33
set(WARNINGS "-Wall -Werror -Wno-multichar -Wno-unused-function -Wno-attributes ")
44

55
# Compile the runtime with some special flags
6-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -gdwarf-4 ${WARNINGS} ")
6+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gdwarf-4 ${WARNINGS} ")
77
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++2a -Wno-deprecated -fno-exceptions -Wno-ctad-maybe-unsupported -Wno-reorder -fno-rtti ")
88

99

1010

11+
set(CMAKE_C_FLAGS_DEBUG "-O0")
12+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
13+
14+
15+
16+
set(CMAKE_C_FLAGS_RELEASE "-O3")
17+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
18+
19+
1120
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
1221

1322

0 commit comments

Comments
 (0)