Add llvm.py configure
Add a subcommand that runs CMake in a given build directory, with a
custom generator and custom CMake definitions. Also update llvm-build to
use it instead of calling CMake directly, and add calls to it in
llvm-projs as well to make sure we update the build directories whenever
we enable or disable a project.
One known issue with the current code is that the output of the CMake
command is not printed out live, but rather after the command has
finished execution. This is going to be more important for llvm.py build
than for llvm.py configure, so we can fix it in a future commit.
Change-Id: I263b2d47c2083a1778608253bbd437149375c539
diff --git a/tests/unittests/testllvmsourceconfig.py b/tests/unittests/testllvmsourceconfig.py
index 2c69fa3..0baf7e3 100644
--- a/tests/unittests/testllvmsourceconfig.py
+++ b/tests/unittests/testllvmsourceconfig.py
@@ -58,6 +58,11 @@
def tearDown(self):
self.proj.cleanup()
+ def test_get_path(self):
+ sourcePath = self.temporaryLLVM.repodir
+ config = LLVMSourceConfig(self.proj, sourcePath)
+ self.assertEqual(config.get_path(), sourcePath)
+
def test_detect_enabled_all(self):
subprojs = LLVMSubproject.get_all_subprojects()
sourcePath = self.temporaryLLVM.repodir