-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
39 lines (29 loc) · 1.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required (VERSION 2.6)
project (HSA-Conformance-Tests-PRM)
set(HSAIL-Tools-PATH "${CMAKE_SOURCE_DIR}/HSAIL-Tools" CACHE PATH "Path to HSAIL-Tools root.")
set(HSA-Runtime-Inc-PATH "${CMAKE_SOURCE_DIR}/include/hsa/1.0" CACHE PATH "Path to HSA 1.0 includes (hsa.h, hsa_ext_image.h).")
set(HSA-Runtime-Ext-Inc-PATH "${CMAKE_SOURCE_DIR}/include/hsa/1.0" CACHE PATH "Path to HSA 1.0 extension includes (hsa_ext_finalize.h).")
add_definitions(-DENABLE_HEXL_HSARUNTIME=1)
add_definitions(-DENABLE_HEXL_HSAILTESTGEN=1)
if(MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
endif()
if(UNIX)
add_compile_options(-Wall -Werror -std=c++11 -pthread -fno-rtti)
add_definitions(-D__STDC_LIMIT_MACROS)
add_definitions(-D__STDC_CONSTANT_MACROS)
add_definitions(-D__STDC_FORMAT_MACROS)
endif()
option(BUILD_LIBBRIGDWARF "" OFF)
option(VENDOR_EXTENSIONS "" OFF)
option(BUILD_HSAILASM "" OFF)
add_subdirectory(${HSAIL-Tools-PATH})
include_directories(${HSA-Runtime-Inc-PATH})
include_directories(${HSA-Runtime-Ext-Inc-PATH})
enable_testing()
add_subdirectory(src/libTestGen)
add_subdirectory(src/hexl)
add_subdirectory(src/hsail_conformance)
install(FILES README.md DESTINATION . COMPONENT hsail_conformance)
install(FILES docs/HsaPrmConformance.md docs/ReleaseNotes DESTINATION docs COMPONENT hsail_conformance)