diff --git a/CMakeLists.txt b/CMakeLists.txt index 688dd42c54fe..c81670440338 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -674,7 +674,6 @@ if(UNIX) endif() target_link_libraries(mxnet PUBLIC mshadow) target_link_libraries(mxnet PUBLIC ${CMAKE_DL_LIBS}) - target_compile_definitions(mxnet PUBLIC DMLC_LOG_FATAL_THROW=$) if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") target_compile_options(mxnet PRIVATE "$<$:-Werror>") # Ignore erroneous compiler warnings: @@ -701,7 +700,6 @@ elseif(MSVC) foreach(arch ${arch_code_list}) add_library(mxnet_${arch} SHARED ${SOURCE}) target_link_libraries(mxnet_${arch} PUBLIC mshadow) - target_compile_definitions(mxnet_${arch} PUBLIC DMLC_LOG_FATAL_THROW=$) target_compile_options( mxnet_${arch} PRIVATE @@ -737,10 +735,10 @@ elseif(MSVC) endif(USE_SPLIT_ARCH_DLL) else() add_library(mxnet SHARED ${SOURCE}) - target_compile_definitions(mxnet PUBLIC DMLC_LOG_FATAL_THROW=$) target_link_libraries(mxnet PUBLIC mshadow) endif() endif() +target_compile_definitions(mxnet PUBLIC DMLC_LOG_FATAL_THROW=$) # extension libraries (custom operators, custom subgraphs) are built by default add_library(customop_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/gemm_lib.cc)