Fix Debug mode for ONNX-MLIR on Windows (#311)
* correct debug flags * add bigobj to prevent debug error * better use Release instead of release * correct debug flags Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * add bigobj to prevent debug error Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * better use Release instead of release Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> Co-authored-by: Tian Jin <tjingrant@gmail.com>
This commit is contained in:
parent
6500f27f80
commit
71b8ca28aa
|
@ -8,7 +8,6 @@ cmake_minimum_required(VERSION 3.3)
|
|||
cmake_policy(SET CMP0057 NEW)
|
||||
project(onnx-mlir)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||
|
||||
set(ONNX_MLIR_SRC_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
@ -24,7 +23,7 @@ include(MLIR.cmake)
|
|||
if (MSVC)
|
||||
# Disable warnings that prevent building of dependencies
|
||||
# like onnx
|
||||
set(CMAKE_CXX_FLAGS "-wd4244 -wd4267 -wd4530 -wd4624")
|
||||
set(CMAKE_CXX_FLAGS "-wd4244 -wd4267 -wd4530 -wd4624 /bigobj")
|
||||
endif()
|
||||
add_subdirectory(third_party/onnx)
|
||||
add_subdirectory(third_party/googletest)
|
||||
|
|
|
@ -32,7 +32,7 @@ else()
|
|||
if (CMAKE_BUILD_TYPE)
|
||||
set(LLVM_PROJECT_LIB ${LLVM_PROJ_BUILD}/${CMAKE_BUILD_TYPE}/lib)
|
||||
else()
|
||||
set(LLVM_PROJECT_LIB ${LLVM_PROJ_BUILD}/release/lib)
|
||||
set(LLVM_PROJECT_LIB ${LLVM_PROJ_BUILD}/Release/lib)
|
||||
endif()
|
||||
else()
|
||||
set(LLVM_PROJECT_LIB ${LLVM_PROJ_BUILD}/lib)
|
||||
|
|
Loading…
Reference in New Issue