Fix broken indentation introduced by previous commit
[ROCm/clr commit: 72c9767b1d]
This commit is contained in:
@@ -13,6 +13,7 @@ if (NOT ${LLVM_FOUND})
|
||||
message(STATUS "hipify-clang will not be built. To build it please specify absolute path to LLVM 3.8 or LLVM 3.9 package/dist using -DHIPIFY_CLANG_LLVM_DIR")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (${LLVM_FOUND})
|
||||
list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR})
|
||||
include(AddLLVM)
|
||||
@@ -52,55 +53,54 @@ if (${LLVM_FOUND})
|
||||
LLVMOption
|
||||
LLVMCore)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(hipify-clang version)
|
||||
endif()
|
||||
if(WIN32)
|
||||
target_link_libraries(hipify-clang version)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR- /EHs- /EHc-")
|
||||
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} /SUBSYSTEM:WINDOWS")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -fno-rtti -fvisibility-inlines-hidden")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR- /EHs- /EHc-")
|
||||
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} /SUBSYSTEM:WINDOWS")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -fno-rtti -fvisibility-inlines-hidden")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHIPIFY_CLANG_RES=\\\"${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}\\\"")
|
||||
|
||||
install(TARGETS hipify-clang DESTINATION bin)
|
||||
|
||||
if (HIPIFY_CLANG_TESTS)
|
||||
# tests
|
||||
set(Python_ADDITIONAL_VERSIONS 2.7)
|
||||
include(FindPythonInterp)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Unable to find Python interpreter, required for builds and testing.\n\n"
|
||||
"Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||
if (HIPIFY_CLANG_TESTS)
|
||||
# tests
|
||||
set(Python_ADDITIONAL_VERSIONS 2.7)
|
||||
include(FindPythonInterp)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Unable to find Python interpreter, required for builds and testing.\n\n"
|
||||
"Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||
endif()
|
||||
|
||||
find_program(LIT_COMMAND lit)
|
||||
|
||||
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/tests/hipify-clang/lit.site.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg
|
||||
@ONLY)
|
||||
|
||||
add_lit_testsuite(test-hipify "Running HIPify regression tests"
|
||||
${CMAKE_SOURCE_DIR}/tests/hipify-clang
|
||||
PARAMS site_config=${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg
|
||||
DEPENDS hipify-clang lit
|
||||
)
|
||||
|
||||
add_custom_target(test-hipify-clang)
|
||||
add_dependencies(test-hipify-clang test-hipify)
|
||||
set_target_properties(test-hipify-clang PROPERTIES FOLDER "Tests")
|
||||
endif()
|
||||
|
||||
find_program(LIT_COMMAND lit)
|
||||
|
||||
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/tests/hipify-clang/lit.site.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg
|
||||
@ONLY)
|
||||
|
||||
add_lit_testsuite(test-hipify "Running HIPify regression tests"
|
||||
${CMAKE_SOURCE_DIR}/tests/hipify-clang
|
||||
PARAMS site_config=${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg
|
||||
DEPENDS hipify-clang lit
|
||||
)
|
||||
|
||||
add_custom_target(test-hipify-clang)
|
||||
add_dependencies(test-hipify-clang test-hipify)
|
||||
set_target_properties(test-hipify-clang PROPERTIES FOLDER "Tests")
|
||||
endif()
|
||||
|
||||
if (PARENT_SCOPE)
|
||||
set(BUILD_HIPIFY_CLANG 1 PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if (PARENT_SCOPE)
|
||||
set(BUILD_HIPIFY_CLANG 1 PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user