mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37393 Simplify the code analyzer by removing some unused flags and moving the different format printer logic to python script. It's easier to add other post processing logic to adapt to different BUCK build configs. Test Plan: Imported from OSS Differential Revision: D21280836 Pulled By: ljk53 fbshipit-source-id: 0d66d5891d850f012c4ab4f39eabbd9aecc1caa9
22 lines
510 B
CMake
22 lines
510 B
CMake
cmake_minimum_required(VERSION 3.1)
|
|
|
|
project(code_analyzer)
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
find_package(LLVM REQUIRED CONFIG)
|
|
add_definitions(${LLVM_DEFINITIONS})
|
|
include_directories(${LLVM_INCLUDE_DIRS})
|
|
link_directories(${LLVM_LIBRARY_DIRS})
|
|
|
|
# Main executable
|
|
add_executable(analyzer
|
|
analyzer.cpp
|
|
op_deps_pass.cpp
|
|
)
|
|
|
|
set_target_properties(analyzer PROPERTIES
|
|
COMPILE_FLAGS "-fno-rtti -O3")
|
|
|
|
llvm_map_components_to_libnames(llvm_libs core irreader support)
|
|
|
|
target_link_libraries(analyzer ${llvm_libs})
|