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:
Chun-Wei Chen 2020-09-25 06:58:03 -07:00 committed by GitHub
parent 6500f27f80
commit 71b8ca28aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -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)

View File

@ -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)