[PATCH] D82120: [flang]Fix individual tests with lit when building out of tree
sameeran joshi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 21 22:13:42 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfa5d416efdcb: [flang]Fix individual tests with lit when building out of tree (authored by sameeranjoshi, committed by orequest <Osi.Request at amd.com>).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82120/new/
https://reviews.llvm.org/D82120
Files:
flang/CMakeLists.txt
flang/test/CMakeLists.txt
Index: flang/test/CMakeLists.txt
===================================================================
--- flang/test/CMakeLists.txt
+++ flang/test/CMakeLists.txt
@@ -45,7 +45,13 @@
)
set_target_properties(check-flang PROPERTIES FOLDER "Tests")
-add_lit_testsuites(FLANG ${CMAKE_CURRENT_SOURCE_DIR}
- PARAMS ${FLANG_TEST_PARAMS}
- DEPENDS ${FLANG_TEST_DEPENDS})
-
+# In case of standalone builds.
+if (FLANG_STANDALONE_BUILD)
+ add_lit_testsuites(FLANG ${CMAKE_CURRENT_BINARY_DIR}
+ PARAMS ${FLANG_TEST_PARAMS}
+ DEPENDS ${FLANG_TEST_DEPENDS})
+else()
+ add_lit_testsuites(FLANG ${CMAKE_CURRENT_SOURCE_DIR}
+ PARAMS ${FLANG_TEST_PARAMS}
+ DEPENDS ${FLANG_TEST_DEPENDS})
+endif()
Index: flang/CMakeLists.txt
===================================================================
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -50,6 +50,7 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message("Building Flang as a standalone project.")
project(Flang)
+ set(FLANG_STANDALONE_BUILD ON)
set(FLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
if (NOT MSVC_IDE)
@@ -179,6 +180,7 @@
endif()
else()
+ set(FLANG_STANDALONE_BUILD OFF)
option(FLANG_INCLUDE_TESTS
"Generate build targets for the Flang unit tests."
${LLVM_INCLUDE_TESTS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82120.272333.patch
Type: text/x-patch
Size: 1300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200622/16f3a4cb/attachment.bin>
More information about the llvm-commits
mailing list