Procházet zdrojové kódy

ENH: Change ctkMacroGenerateProjectXml into ctkFunctionGenerateProjectXml

In CMake, since functions have their own scope, they are preferred over macro
Jean-Christophe Fillion-Robin před 15 roky
rodič
revize
750f6ba137
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 2 2
      CMake/ctkMacroGenerateProjectXml.cmake
  2. 2 2
      CMakeLists.txt

+ 2 - 2
CMake/ctkMacroGenerateProjectXml.cmake

@@ -3,7 +3,7 @@
 #
 #
 
-MACRO(ctkMacroGenerateProjectXml dir name target_directories is_superbuild)
+FUNCTION(ctkFunctionGenerateProjectXml dir name target_directories is_superbuild)
   IF(NOT EXISTS ${dir})
     MESSAGE(FATAL_ERROR "Directory ${dir} doesn't exist!")
   ENDIF()
@@ -76,4 +76,4 @@ MACRO(ctkMacroGenerateProjectXml dir name target_directories is_superbuild)
 
   FILE(WRITE ${filename} ${xml_content})
   MESSAGE(STATUS "Generated: ${filename}")
-ENDMACRO()
+ENDFUNCTION()

+ 2 - 2
CMakeLists.txt

@@ -103,7 +103,7 @@ INCLUDE(CMake/ctkFunctionExtractOptionNameAndValue.cmake)
 INCLUDE(CMake/ctkMacroValidateBuildOptions.cmake)
 INCLUDE(CMake/ctkMacroAddCtkLibraryOptions.cmake)
 INCLUDE(CMake/ctkMacroGenerateDGraphInput.cmake)
-INCLUDE(CMake/ctkMacroGenerateProjectXml.cmake)
+INCLUDE(CMake/ctkFunctionGenerateProjectXml.cmake)
 
 # Used by CTKGenerateCTKConfig.cmake
 SET(CTK_CMAKE_DIR ${CTK_SOURCE_DIR}/CMake)
@@ -383,7 +383,7 @@ CONFIGURE_FILE(${CTK_SOURCE_DIR}/CTestConfigSubProject.cmake.in
 #
 
 # Generate Project.xml file expected by the CTest driver script
-ctkMacroGenerateProjectXml(${CTK_BINARY_DIR} ${PROJECT_NAME} "${target_directories}" ${CTK_SUPERBUILD})
+ctkFunctionGenerateProjectXml(${CTK_BINARY_DIR} ${PROJECT_NAME} "${target_directories}" ${CTK_SUPERBUILD})
 
 #-----------------------------------------------------------------------------
 # Superbuild script