Remove excess arguments to endfunction() and else()
authorBen Boeckel <mathstuf@gmail.com>
Wed, 4 Feb 2015 16:34:34 +0000 (11:34 -0500)
committerBen Boeckel <mathstuf@gmail.com>
Sun, 8 Feb 2015 01:51:05 +0000 (20:51 -0500)
Arguments to else() are always confusing and endfunction only needs to
match the first argument.

16 files changed:
CMakeLists.txt
src/CMakeLists.txt
src/coreclr/hosts/coreconsole/CMakeLists.txt
src/coreclr/hosts/corerun/CMakeLists.txt
src/debug/daccess/CMakeLists.txt
src/debug/ee/CMakeLists.txt
src/debug/ee/wks/CMakeLists.txt
src/dlls/mscordac/CMakeLists.txt
src/dlls/mscoree/CMakeLists.txt
src/dlls/mscoree/coreclr/CMakeLists.txt
src/inc/CMakeLists.txt
src/jit/CMakeLists.txt
src/md/md_dbi.cmake
src/utilcode/dac/CMakeLists.txt
src/utilcode/dyncrt/CMakeLists.txt
src/vm/CMakeLists.txt

index 56e4ee8..ae7e9de 100644 (file)
@@ -33,7 +33,7 @@ function(get_compile_definitions DefinitionName)
         set(DEFINITIONS ${DEFINITIONS} ${DEFINITION})
     endforeach()
     set(${DefinitionName} ${DEFINITIONS} PARENT_SCOPE)
-endfunction(get_compile_definitions DefinitionName)
+endfunction(get_compile_definitions)
 
 # Build a list of include directories by putting -I in front of each include dir.
 function(get_include_directories IncludeDirectories)
@@ -42,7 +42,7 @@ function(get_include_directories IncludeDirectories)
         set(INC_DIRECTORIES ${INC_DIRECTORIES} -I${dir})
     endforeach()
     set(${IncludeDirectories} ${INC_DIRECTORIES} PARENT_SCOPE)
-endfunction(get_include_directories IncludeDirectories)
+endfunction(get_include_directories)
 
 # Set the passed in RetSources variable to the list of sources with added current source directory
 # to form absolute paths. 
@@ -78,17 +78,17 @@ if (WIN32)
   # First DEBUG
   foreach (Definition ${CLR_DEFINES_DEBUG_INIT})
     set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:${Definition}>)
-  endforeach (Definition ${CLR_DEFINES_DEBUG_INIT})
+  endforeach (Definition)
 
   # Then RELEASE
   foreach (Definition ${CLR_DEFINES_RELEASE_INIT})
     set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:RELEASE>:${Definition}>)
-  endforeach (Definition ${CLR_DEFINES_RELEASE_INIT})
+  endforeach (Definition)
 
   # And then RELWITHDEBINFO
   foreach (Definition ${CLR_DEFINES_RELWITHDEBINFO_INIT})
     set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:RELWITHDEBINFO>:${Definition}>)
-  endforeach (Definition ${CLR_DEFINES_RELWITHDEBINFO_INIT})
+  endforeach (Definition)
 
 elseif (CLR_CMAKE_PLATFORM_UNIX)
   # Set the values to display when interactively configuring CMAKE_BUILD_TYPE
@@ -331,7 +331,7 @@ if (IS_64BIT_BUILD EQUAL 1)
   endif (CLR_CMAKE_PLATFORM_UNIX_TARGET_AMD64)
   add_definitions(-D_TARGET_AMD64_=1)
   add_definitions(-DDBG_TARGET_AMD64)
-else (IS_64BIT_BUILD EQUAL 1)
+else ()
   # TODO: Support this
   message(FATAL_ERROR "Not Implemented!")
 endif (IS_64BIT_BUILD EQUAL 1)
@@ -439,7 +439,7 @@ add_definitions(-D_AMD64_SIMULATOR_PERF_)
 add_definitions(-D_AMD64_WORKAROUND_)
 add_definitions(-D_WIN64)
 add_definitions(-DAMD64)
-else (IS_64BIT_BUILD EQUAL 1)
+else ()
 # TODO - Support this
 endif (IS_64BIT_BUILD EQUAL 1)
 
@@ -454,7 +454,7 @@ add_definitions(-D_UNICODE)
 
 if (IS_64BIT_BUILD EQUAL 1)
   set(ARCH_SOURCES_DIR amd64)
-else (IS_64BIT_BUILD EQUAL 1)
+else ()
   set(ARCH_SOURCES_DIR i386)
 endif (IS_64BIT_BUILD EQUAL 1)
 
index 642e66a..6401672 100644 (file)
@@ -12,7 +12,7 @@ include_directories("classlibnative/inc")
 
 if(WIN32)
 enable_language(ASM_MASM)
-else(WIN32)
+else()
 enable_language(ASM)
 # This prevents inclusion of standard C compiler headers
 add_compile_options(-nostdinc)
index 00b6391..8848ff7 100644 (file)
@@ -16,7 +16,7 @@ if(CLR_CMAKE_PLATFORM_UNIX)
         )
     endif(CAN_BE_COMPILED_ON_LINUX)
 
-else(CLR_CMAKE_PLATFORM_UNIX)
+else()
     add_executable(CoreConsole
       ${CoreConsole_SOURCES}
       ${CoreConsole_RESOURCES}
index 4442610..841a714 100644 (file)
@@ -16,7 +16,7 @@ if(CLR_CMAKE_PLATFORM_UNIX)
         )
     endif(CAN_BE_COMPILED_ON_LINUX)
 
-else(CLR_CMAKE_PLATFORM_UNIX)
+else()
     add_executable(CoreRun
       ${CoreRun_SOURCES}
       ${CoreRun_RESOURCES}
index 5c012ce..0920bd8 100644 (file)
@@ -40,7 +40,7 @@ if(IS_64BIT_BUILD EQUAL 1)
     ${DACCESS_SOURCES}
     amd64/primitives.cpp
   )
-else(IS_64BIT_BUILD EQUAL 1)
+else()
   set(DACCESS_SOURCES
     ${DACCESS_SOURCES}
     i386/primitives.cpp
index fff144a..4cbfe4c 100644 (file)
@@ -44,7 +44,7 @@ endif(WIN32)
 
 if (IS_64BIT_BUILD EQUAL 1)
   set(CORDBEE_SOURCES_WKS ${CORDBEE_SOURCES_WKS} amd64/amd64walker.cpp)
-else (IS_64BIT_BUILD EQUAL 1)
+else ()
   set(CORDBEE_SOURCES_WKS ${CORDBEE_SOURCES_WKS} i386/x86walker.cpp)
 endif (IS_64BIT_BUILD EQUAL 1)
 
index 82b4d74..13c575d 100644 (file)
@@ -3,7 +3,7 @@ if (WIN32)
 
 if (IS_64BIT_BUILD EQUAL 1)
   FIND_PROGRAM(ASM_COMPILER ml64.exe)
-else (IS_64BIT_BUILD EQUAL 1)
+else ()
   FIND_PROGRAM(ASM_COMPILER ml.exe)
 endif (IS_64BIT_BUILD EQUAL 1)
 
@@ -21,7 +21,7 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj PROPERTIE
 
 add_library(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj)
 
-else (WIN32)
+else ()
 
 add_compile_options(-fPIC)
 add_library(cordbee_wks ${CORDBEE_SOURCES_WKS} ../amd64/dbghelpers.S)
index 4e01205..d50ab5d 100644 (file)
@@ -64,7 +64,7 @@ if(WIN32)
         user32.lib
         ${STATIC_MT_CRT_LIB}
     )
-else(WIN32)
+else()
     set(COREDAC_LIBRARIES
         ${COREDAC_LIBRARIES}
         palrt
index b5262d1..5ed608a 100644 (file)
@@ -15,7 +15,7 @@ set (DEF_SOURCES
   mscorwks_ntdef.src
 )
 convert_to_absolute_path(DEF_SOURCES ${DEF_SOURCES})
-else(WIN32)
+else()
 set(CLR_SOURCES ${CLR_SOURCES}
     unixinterface.cpp
 )
index 8393cbc..2d346b2 100644 (file)
@@ -9,7 +9,7 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ENTRY:CoreDllMain")
 set(START_LIBRARY_GROUP)
 set(END_LIBRARY_GROUP)
 
-else(WIN32)
+else()
 
 add_definitions(-DNO_CRT_INIT)
 
@@ -77,7 +77,7 @@ if(WIN32)
         crypt32.lib
         RuntimeObject.lib
     )
-else(WIN32)
+else()
     set(CORECLR_LIBRARIES
         ${CORECLR_LIBRARIES}
         CoreClrPal
index cdfa7a2..e8f52de 100644 (file)
@@ -47,7 +47,7 @@ set_source_files_properties(${CORGUIDS_SOURCES}
 # Compile *_i.c as C files
 add_compile_options(/TC)
 
-else(WIN32)
+else()
 
 #The MIDL tool exists for Windows only, so for other systems, we have the prebuilt xxx_i.c files checked in
 foreach(IDL_SOURCE ${CORGUIDS_IDL_SOURCES})
index dce4f59..59d66bd 100644 (file)
@@ -97,7 +97,7 @@ if(CLR_CMAKE_PLATFORM_UNIX)
       ${SHARED_LIB_SOURCES}
     )
     add_dependencies(ClrJit CoreClrPal gcinfo)
-else(CLR_CMAKE_PLATFORM_UNIX)
+else()
     add_library(ClrJit
        ${SOURCES}
     )
index 6e7166b..7622cf0 100644 (file)
@@ -11,7 +11,7 @@ if(WIN32)
     # using static crt for dbi
     if (CMAKE_BUILD_TYPE STREQUAL DEBUG)
       add_definitions(-MTd) 
-    else(CMAKE_BUILD_TYPE STREQUAL DEBUG)
+    else()
       add_definitions(-MT) 
     endif(CMAKE_BUILD_TYPE STREQUAL DEBUG)
-endif(WIN32)
\ No newline at end of file
+endif(WIN32)
index d792c4c..ff6c485 100644 (file)
@@ -4,7 +4,7 @@ include(${CLR_DIR}/dac.cmake)
 if(CLR_CMAKE_PLATFORM_UNIX)
     add_library(utilcode_dac STATIC ${UTILCODE_SOURCES})
     add_dependencies(utilcode_dac CoreClrPal)
-else(CLR_CMAKE_PLATFORM_UNIX)
+else()
     add_definitions(-DSELF_NO_HOST)
     add_library(utilcode_dac STATIC ${UTILCODE_SOURCES} ../hostimpl.cpp)
 endif(CLR_CMAKE_PLATFORM_UNIX)
\ No newline at end of file
index ceb0cff..36f2ef4 100644 (file)
@@ -2,6 +2,6 @@
 if(CLR_CMAKE_PLATFORM_UNIX)
     add_library(utilcode STATIC ${UTILCODE_SOURCES})
     add_dependencies(utilcode CoreClrPal)
-else(CLR_CMAKE_PLATFORM_UNIX)
+else()
     add_library(utilcode STATIC ${UTILCODE_SOURCES})
 endif(CLR_CMAKE_PLATFORM_UNIX)
\ No newline at end of file
index 489b5c7..14591c3 100644 (file)
@@ -326,7 +326,7 @@ set(VM_SOURCES_WKS_AMD64_ASM
     ${AMD64_SOURCES_DIR}/VirtualCallStubAMD64.asm
 )
 
-else(WIN32)
+else()
 set(VM_SOURCES_WKS_AMD64_ASM
     ${AMD64_SOURCES_DIR}/jithelpers_fastwritebarriers.S
     ${AMD64_SOURCES_DIR}/jithelpers_slow.S