STYLE: Convert CMake-language commands to lower case

Ancient CMake versions required upper-case commands.  Later command names
became case-insensitive.  Now the preferred style is lower-case.
This commit is contained in:
Hans Johnson
2019-10-31 11:36:37 -05:00
parent 6fb3e5f176
commit 8c8cab1afd
16 changed files with 209 additions and 209 deletions

View File

@@ -1,6 +1,6 @@
# - MACRO_OPTIONAL_ADD_SUBDIRECTORY() combines ADD_SUBDIRECTORY() with an OPTION()
# - MACRO_OPTIONAL_ADD_SUBDIRECTORY() combines add_subdirectory() with an option()
# MACRO_OPTIONAL_ADD_SUBDIRECTORY( <dir> )
# If you use MACRO_OPTIONAL_ADD_SUBDIRECTORY() instead of ADD_SUBDIRECTORY(),
# If you use MACRO_OPTIONAL_ADD_SUBDIRECTORY() instead of add_subdirectory(),
# this will have two effects
# 1 - CMake will not complain if the directory doesn't exist
# This makes sense if you want to distribute just one of the subdirs
@@ -16,16 +16,16 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
MACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir )
GET_FILENAME_COMPONENT(_fullPath ${_dir} ABSOLUTE)
IF(EXISTS ${_fullPath})
IF(${ARGC} EQUAL 2)
OPTION(BUILD_${_dir} "Build directory ${_dir}" ${ARGV1})
ELSE(${ARGC} EQUAL 2)
OPTION(BUILD_${_dir} "Build directory ${_dir}" TRUE)
ENDIF(${ARGC} EQUAL 2)
IF(BUILD_${_dir})
ADD_SUBDIRECTORY(${_dir})
ENDIF(BUILD_${_dir})
ENDIF(EXISTS ${_fullPath})
ENDMACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY)
macro (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir )
get_filename_component(_fullPath ${_dir} ABSOLUTE)
if(EXISTS ${_fullPath})
if(${ARGC} EQUAL 2)
option(BUILD_${_dir} "Build directory ${_dir}" ${ARGV1})
else(${ARGC} EQUAL 2)
option(BUILD_${_dir} "Build directory ${_dir}" TRUE)
endif(${ARGC} EQUAL 2)
if(BUILD_${_dir})
add_subdirectory(${_dir})
endif(BUILD_${_dir})
endif(EXISTS ${_fullPath})
endmacro (MACRO_OPTIONAL_ADD_SUBDIRECTORY)