[Lldb-commits] [PATCH] D25751: [CMake] Don't include LLDB_TEST_COMPILER in cached variable

2016-10-18 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL284551: [CMake] Don't include LLDB_TEST_COMPILER in cached 
variable (authored by cbieneman).

Changed prior to commit:
  https://reviews.llvm.org/D25751?vs=75073&id=75097#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D25751

Files:
  lldb/trunk/test/CMakeLists.txt


Index: lldb/trunk/test/CMakeLists.txt
===
--- lldb/trunk/test/CMakeLists.txt
+++ lldb/trunk/test/CMakeLists.txt
@@ -43,10 +43,15 @@
${LLDB_DEFAULT_TEST_ARCH}
CACHE STRING "Specify the architecture to run LLDB tests as (x86|x64).  
Determines whether tests are compiled with -m32 or -m64")
 
+# Scrub LLDB_TEST_COMPILER out of the CMake caches
+# TODO: remove the replace lines and the FORCE parameter in a few days once the
+# change has made its way through bots to clean up their CMake caches.
+string(REPLACE "-C;${LLDB_TEST_COMPILER}" "" LLDB_TEST_USER_ARGS_New 
"${LLDB_TEST_USER_ARGS}")
+
 # Users can override LLDB_TEST_USER_ARGS to specify arbitrary arguments to 
pass to the script
 set(LLDB_TEST_USER_ARGS
-  -C ${LLDB_TEST_COMPILER}
-  CACHE STRING "Specify additional arguments to pass to test runner. For 
example: '-C gcc -C clang -A i386 -A x86_64'")
+  "${LLDB_TEST_USER_ARGS_New}"
+  CACHE STRING "Specify additional arguments to pass to test runner. For 
example: '-C gcc -C clang -A i386 -A x86_64'" FORCE)
 
 set(LLDB_TEST_COMMON_ARGS
   --arch=${LLDB_TEST_ARCH}
@@ -56,6 +61,7 @@
   -S nm
   -u CXXFLAGS
   -u CFLAGS
+  -C ${LLDB_TEST_COMPILER}
   )
 
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )


Index: lldb/trunk/test/CMakeLists.txt
===
--- lldb/trunk/test/CMakeLists.txt
+++ lldb/trunk/test/CMakeLists.txt
@@ -43,10 +43,15 @@
 	${LLDB_DEFAULT_TEST_ARCH}
 	CACHE STRING "Specify the architecture to run LLDB tests as (x86|x64).  Determines whether tests are compiled with -m32 or -m64")
 
+# Scrub LLDB_TEST_COMPILER out of the CMake caches
+# TODO: remove the replace lines and the FORCE parameter in a few days once the
+# change has made its way through bots to clean up their CMake caches.
+string(REPLACE "-C;${LLDB_TEST_COMPILER}" "" LLDB_TEST_USER_ARGS_New "${LLDB_TEST_USER_ARGS}")
+
 # Users can override LLDB_TEST_USER_ARGS to specify arbitrary arguments to pass to the script
 set(LLDB_TEST_USER_ARGS
-  -C ${LLDB_TEST_COMPILER}
-  CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'")
+  "${LLDB_TEST_USER_ARGS_New}"
+  CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'" FORCE)
 
 set(LLDB_TEST_COMMON_ARGS
   --arch=${LLDB_TEST_ARCH}
@@ -56,6 +61,7 @@
   -S nm
   -u CXXFLAGS
   -u CFLAGS
+  -C ${LLDB_TEST_COMPILER}
   )
 
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25751: [CMake] Don't include LLDB_TEST_COMPILER in cached variable

2016-10-18 Thread Chris Bieneman via lldb-commits
beanz created this revision.
beanz added reviewers: tfiala, zturner, labath.
beanz added a subscriber: lldb-commits.
Herald added a subscriber: mgorny.

CMake has no builtin mechanism for cache invalidation. As a general convention 
you want to not expand user-specified variables in other cached variables 
because they will not get updated when the user changes their specified value.

This patch moves the "-C" option for dotest.py into the LLDB_TEST_COMMON_ARGS 
and out of the CMake cache. In order to prevent issues with out-of-date cache 
files on builders I've added code to scrub "-C ${LLDB_TEST_COMPILER}" out of 
the CMake caches, by Force writing the variable. This code can be removed in a 
few days once the change has trickled through CI systems.


https://reviews.llvm.org/D25751

Files:
  test/CMakeLists.txt


Index: test/CMakeLists.txt
===
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -43,10 +43,15 @@
${LLDB_DEFAULT_TEST_ARCH}
CACHE STRING "Specify the architecture to run LLDB tests as (x86|x64).  
Determines whether tests are compiled with -m32 or -m64")
 
+# Scrub LLDB_TEST_COMPILER out of the CMake caches
+# TODO: remove the replace lines and the FORCE parameter in a few days once the
+# change has made its way through bots to clean up their CMake caches.
+string(REPLACE "-C;${LLDB_TEST_COMPILER}" "" LLDB_TEST_USER_ARGS_New 
"${LLDB_TEST_USER_ARGS}")
+
 # Users can override LLDB_TEST_USER_ARGS to specify arbitrary arguments to 
pass to the script
 set(LLDB_TEST_USER_ARGS
-  -C ${LLDB_TEST_COMPILER}
-  CACHE STRING "Specify additional arguments to pass to test runner. For 
example: '-C gcc -C clang -A i386 -A x86_64'")
+  "${LLDB_TEST_USER_ARGS_New}"
+  CACHE STRING "Specify additional arguments to pass to test runner. For 
example: '-C gcc -C clang -A i386 -A x86_64'" FORCE)
 
 set(LLDB_TEST_COMMON_ARGS
   --arch=${LLDB_TEST_ARCH}
@@ -56,6 +61,7 @@
   -S nm
   -u CXXFLAGS
   -u CFLAGS
+  -C ${LLDB_TEST_COMPILER}
   )
 
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )


Index: test/CMakeLists.txt
===
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -43,10 +43,15 @@
 	${LLDB_DEFAULT_TEST_ARCH}
 	CACHE STRING "Specify the architecture to run LLDB tests as (x86|x64).  Determines whether tests are compiled with -m32 or -m64")
 
+# Scrub LLDB_TEST_COMPILER out of the CMake caches
+# TODO: remove the replace lines and the FORCE parameter in a few days once the
+# change has made its way through bots to clean up their CMake caches.
+string(REPLACE "-C;${LLDB_TEST_COMPILER}" "" LLDB_TEST_USER_ARGS_New "${LLDB_TEST_USER_ARGS}")
+
 # Users can override LLDB_TEST_USER_ARGS to specify arbitrary arguments to pass to the script
 set(LLDB_TEST_USER_ARGS
-  -C ${LLDB_TEST_COMPILER}
-  CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'")
+  "${LLDB_TEST_USER_ARGS_New}"
+  CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'" FORCE)
 
 set(LLDB_TEST_COMMON_ARGS
   --arch=${LLDB_TEST_ARCH}
@@ -56,6 +61,7 @@
   -S nm
   -u CXXFLAGS
   -u CFLAGS
+  -C ${LLDB_TEST_COMPILER}
   )
 
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits