source: trunk/lib_ir/CMakeLists.txt @ 3918

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

have pack_16 work

File size: 1.1 KB
Line 
1cmake_minimum_required (VERSION 2.8)
2project (IR_Library)
3
4set(CXX_SSE_FLAGS "-msse2")
5set(CMAKE_CXX_FLAGS "${CXX_SSE_FLAGS} -O3 -std=c++11")
6
7set(LLVM_OPT "opt-svn")
8set(LLVM_LLC "llc-svn")
9set(LLVM_SSE_FLAGS "-mattr=+sse2,-avx,-avx2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3")
10
11add_executable(test_s2p test_s2p.cpp s2p_optimized.o)
12add_executable(test_link test_link.cpp s2p_optimized.o)
13add_executable(test_pack test_pack.cpp s2p_optimized.o)
14
15# compile s2p.ll, and make sure test_s2p depends on it.
16add_custom_command(
17  OUTPUT  s2p_optimized.o
18  COMMAND ${LLVM_OPT} -O3 ${LLVM_SSE_FLAGS} ${PROJECT_SOURCE_DIR}/s2p.ll -o s2p_optimized.bc
19  COMMAND ${LLVM_LLC} -O3 ${LLVM_SSE_FLAGS} -filetype=obj s2p_optimized.bc
20  DEPENDS ${PROJECT_SOURCE_DIR}/s2p.ll)
21
22enable_testing()
23add_test(
24  NAME ctest_s2p
25  COMMAND python ${PROJECT_SOURCE_DIR}/test_s2p.py)
26add_test(
27  NAME ctest_link
28  COMMAND python ${PROJECT_SOURCE_DIR}/test_link.py)
29add_test(
30  NAME ctest_pack
31  COMMAND ./test_pack)
32
33add_custom_target (check
34  COMMAND ${CMAKE_CTEST_COMMAND}
35  DEPENDS test_s2p test_link test_pack)
Note: See TracBrowser for help on using the repository browser.