Skip to content

Commit

Permalink
[Feature](mlu-ops): compiled by cpp17 (#1136)
Browse files Browse the repository at this point in the history
  • Loading branch information
chqy99 authored Nov 5, 2024
1 parent 9dd607e commit a5d94e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/test")
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wdeprecated-declarations -fPIC -std=c++11 -pthread -pipe")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wdeprecated-declarations -fPIC -std=c++17 -pthread -pipe")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Wl,--gc-sections -fPIC")

################################################################################
Expand Down Expand Up @@ -123,7 +123,7 @@ endif()

find_package(fmt REQUIRED)
# setup cncc flags
set(BANG_CNCC_FLAGS "${BANG_CNCC_FLAGS} -Werror -Wdeprecated-declarations -Wall -std=c++11 -fPIC -pthread --neuware-path=${NEUWARE_HOME}")
set(BANG_CNCC_FLAGS "${BANG_CNCC_FLAGS} -Werror -Wdeprecated-declarations -Wall -std=c++17 -fPIC -pthread --neuware-path=${NEUWARE_HOME}")
if(${_CMAKE_BUILD_TYPE_LOWER} MATCHES "debug")
message(STATUS "build debug version")
set(BANG_CNCC_FLAGS "${BANG_CNCC_FLAGS} -g3 -O0")
Expand Down Expand Up @@ -175,7 +175,7 @@ endif()

list(SORT build_kernel)
message(STATUS "build_kernel:[${build_kernel}]")

file(GLOB all_kernels "${CMAKE_CURRENT_LIST_DIR}/kernels/*")
foreach(kernel ${build_kernel} )
set(kernel_parent_dir '')
Expand All @@ -197,7 +197,7 @@ foreach(kernel ${build_kernel} )
continue()
endif()
endforeach()

file(GLOB_RECURSE src_helper_files ${src_helper_files} "${CMAKE_CURRENT_SOURCE_DIR}/kernels/utils/cnnl_helper.cpp")
file(GLOB_RECURSE core_src_files ${core_src_files} "${CMAKE_CURRENT_SOURCE_DIR}/core/*.cpp")
# set(src_files ${src_files} "${CMAKE_CURRENT_SOURCE_DIR}/test/main.cpp")
Expand Down

0 comments on commit a5d94e8

Please sign in to comment.