Fix hierchical tests. Set compiler before project to avoid loop

Change-Id: Icede4e76cb47820b39403a7f1ba3f4bd3f47ed03
Этот коммит содержится в:
Ben Sander
2016-06-17 12:07:14 -05:00
родитель ae12867774
Коммит bcbeee6f2c
2 изменённых файлов: 12 добавлений и 7 удалений
+10 -7
Просмотреть файл
@@ -1,4 +1,13 @@
cmake_minimum_required (VERSION 2.6)
# Must set CMAKE_CXX_COMPILER before any project commands to appease CMAKE
set(HIP_PATH $ENV{HIP_PATH})
if (NOT DEFINED HIP_PATH)
get_filename_component (HIP_PATH ../.. ABSOLUTE)
endif()
set (HIPCC ${HIP_PATH}/bin/hipcc)
set (CMAKE_CXX_COMPILER ${HIPCC})
project (HIP_Unit_Tests)
include(CTest)
@@ -22,10 +31,6 @@ if(NOT DEFINED HIP_BUILD_LOCAL)
endif()
endif()
set(HIP_PATH $ENV{HIP_PATH})
if (NOT DEFINED HIP_PATH)
get_filename_component (HIP_PATH ../.. ABSOLUTE)
endif()
execute_process(COMMAND ${HIP_PATH}/bin/hipconfig --platform OUTPUT_VARIABLE HIP_PLATFORM)
@@ -77,8 +82,6 @@ else()
MESSAGE (FATAL_ERROR "UNKNOWN HIP_PLATFORM=" ${HIP_PLATFORM})
endif()
set (HIPCC ${HIP_PATH}/bin/hipcc)
set (CMAKE_CXX_COMPILER ${HIPCC})
add_library(test_common OBJECT test_common.cpp )
@@ -199,7 +202,7 @@ make_hip_executable (hipPeerToPeer_simple hipPeerToPeer_simple.cpp)
make_hip_executable (hipMemcpyAll hipMemcpyAll.cpp)
make_hip_executable (hipMultiThreadDevice hipMultiThreadDevice.cpp)
make_hip_executable (hipTestMemcpyPin hipTestMemcpyPin.cpp)
make_hip_executable (hipDynamicShared hipDynamicShared.cpp)
#make_hip_executable (hipDynamicShared hipDynamicShared.cpp)
make_hip_executable (hipTestDevice hipTestDevice.cpp)
make_hip_executable (hipTestDeviceDouble hipTestDeviceDouble.cpp)
+2
Просмотреть файл
@@ -1,5 +1,7 @@
cmake_minimum_required (VERSION 2.6)
project (launch_bounds)
include_directories( ${HIPTEST_SOURCE_DIR} )
make_hip_executable (hip_launch_bounds hip_launch_bounds.cpp)