From 91498e200292ef5f309fc0b7420f8a5bc8e308cc Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 4 Feb 2015 11:39:06 -0500 Subject: Use foreach(IN LISTS) syntax in CMake code It avoids extra separation on semicolons if there are any and skips a variable expansion. --- src/vm/wks/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vm/wks/CMakeLists.txt') diff --git a/src/vm/wks/CMakeLists.txt b/src/vm/wks/CMakeLists.txt index 2f7c16d69f..a0d2745f8b 100644 --- a/src/vm/wks/CMakeLists.txt +++ b/src/vm/wks/CMakeLists.txt @@ -9,7 +9,7 @@ get_directory_property(COMPILE_DEFINITIONS_LIST COMPILE_DEFINITIONS) # Extract the definitions for the ASM code. Since there is a bug in the cmake that prevents us from # using the generator expressions, we split the definitions into lists based on the configuration. -foreach(DEFINITION ${COMPILE_DEFINITIONS_LIST}) +foreach(DEFINITION IN LISTS COMPILE_DEFINITIONS_LIST) if (${DEFINITION} MATCHES "^\\$<\\$]+)>:([^>]+)>$") # The entry contains generator expression, so insert the definition into a definitions list # corresponding to the config @@ -23,7 +23,7 @@ endforeach() # Add defines for the ASM. Unfortunately setting it on the target is ignored for asm by the cmake, so we have # to set it on the sources. set_property(SOURCE ${VM_SOURCES_WKS_AMD64_ASM} PROPERTY COMPILE_DEFINITIONS ${ASM_DEFINITIONS}) -foreach(CONFIG ${CMAKE_CONFIGURATION_TYPES}) +foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES) string(TOUPPER ${CONFIG} CONFIG) set_property(SOURCE ${VM_SOURCES_WKS_AMD64_ASM} PROPERTY COMPILE_DEFINITIONS_${CONFIG} ${ASM_DEFINITIONS_${CONFIG}}) endforeach() -- cgit v1.2.3