source: trunk/lib_ir/AgnerTestP/PMCTest/CMakeLists.txt @ 4224

Last change on this file since 4224 was 4224, checked in by linmengl, 5 years ago

Makefile for IR inline compilation is ready, now working on the auto script.

File size: 675 bytes
RevLine 
[4224]1set(CMAKE_CXX_FLAGS "-O2 -m64 -lpthread")
2include_directories(${PROJECT_SOURCE_DIR})
3
4add_executable(PMCTest PMCTestA.cpp B_llc_opt.o)
5
6add_custom_target (testp
7  COMMAND ./PMCTest
8  DEPENDS PMCTest)
9
10add_custom_command(
11  OUTPUT B_llc_opt.o
12  COMMAND clang PMCTestB.cpp -c -emit-llvm -msse2 -m64 -o B.bc -I ../../ -lpthread
13  COMMAND llvm-as-3.5 llc_func.ll -o llc_func.bc
14  COMMAND llvm-link B.bc llc_func.bc -o B_llc.bc
15  COMMAND opt-svn -O3 -std-compile-opts -mattr=+sse2 B_llc.bc -o B_llc_opt.bc
16  COMMAND llc-svn -O3 -mattr=+sse2 -filetype=obj B_llc_opt.bc -o B_llc_opt.o
17  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
18  DEPENDS PMCTestA.cpp PMCTestB.cpp llc_func.ll)
Note: See TracBrowser for help on using the repository browser.