From c79dad80007ca6bd379937531bfd4de7c44b4e69 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Mon, 2 May 2016 23:32:52 -0500 Subject: [PATCH] add make_hip_executable_libcpp --- hipamd/tests/src/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hipamd/tests/src/CMakeLists.txt b/hipamd/tests/src/CMakeLists.txt index 4f461d6339..f750702b6e 100644 --- a/hipamd/tests/src/CMakeLists.txt +++ b/hipamd/tests/src/CMakeLists.txt @@ -85,7 +85,6 @@ add_library(test_common OBJECT test_common.cpp ) # usage : make_hip_executable (exe_name CPP_FILES) macro (make_hip_executable exe cpp) if (${HIP_PLATFORM} STREQUAL "hcc") - #add_executable (${exe} ${cpp} ${ARGN} $ ) if (${HIP_BUILD_LOCAL}) #target_link_libraries(${exe} hip_hcc) add_executable (${exe} ${cpp} ${ARGN} $ $ ) @@ -97,6 +96,13 @@ macro (make_hip_executable exe cpp) endif() endmacro() + +# Make a hip executable, using libc++ +macro (make_hip_executable_libcpp exe cpp) + make_hip_executable( ${exe} ${cpp} ${ARGN} ) + set_source_files_properties (${cpp} i${ARGN} PROPERTIES COMPILE_FLAGS --stdlib=libc++ ) +endmacro() + macro (make_named_test exe testname ) add_test (NAME ${testname} COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN} @@ -154,9 +160,12 @@ make_hip_executable (hipMemcpy hipMemcpy.cpp) make_hip_executable (hipMemcpyAsync hipMemcpyAsync.cpp) make_hip_executable (hipMemset hipMemset.cpp) make_hip_executable (hipEventRecord hipEventRecord.cpp) -make_hip_executable (hipLanguageExtensions hipLanguageExtensions.cpp) +make_hip_executable_libcpp (hipLanguageExtensions hipLanguageExtensions.cpp) make_hip_executable (hipGridLaunch hipGridLaunch.cpp) -make_hip_executable (hipHcc hipHcc.cpp) + +make_hip_executable_libcpp (hipHcc hipHcc.cpp) +#set_source_files_properties (hipHcc.cpp PROPERTIES COMPILE_FLAGS --stdlib=libc++ ) + make_hip_executable (hipSimpleAtomicsTest hipSimpleAtomicsTest.cpp) make_hip_executable (hipMathFunctionsHost hipMathFunctions.cpp hipSinglePrecisionMathHost.cpp hipDoublePrecisionMathHost.cpp) make_hip_executable (hipMathFunctionsDevice hipMathFunctions.cpp hipSinglePrecisionMathDevice.cpp hipDoublePrecisionMathDevice.cpp)