Commit 5bb78986 authored by Antoine Regimbeau's avatar Antoine Regimbeau

Replace macro when small and used once

parent aa583b14
......@@ -379,8 +379,17 @@ endif()
file(WRITE "${OTB_BINARY_DIR}/OTBTargets.cmake"
"# Generated by CMake, do not edit!")
# Override CMake's built-in add_* commands: assign LABELS to tests and targets
# automatically. Depends on the CMake variable otb-module being set to the
# "current" module when add_* is called.
macro(verify_otb_module_is_set)
endmacro()
macro(init_module_vars)
verify_otb_module_is_set()
if( "${otb-module}" STREQUAL "" )
message(FATAL_ERROR "CMake variable otb-module is not set")
endif()
set(${otb-module}-targets OTBTargets)
set(${otb-module}-targets-install "${OTB_INSTALL_PACKAGE_DIR}/OTBTargets.cmake")
set(${otb-module}-targets-build "${OTB_BINARY_DIR}/OTBTargets.cmake")
......
......@@ -180,15 +180,6 @@ endif()
#convert path to native for reconfiguring otbcli.bat.in
file(TO_NATIVE_PATH "${OTB_INSTALL_APP_DIR}" OTB_INSTALL_APP_DIR_NATIVE)
# Override CMake's built-in add_* commands: assign LABELS to tests and targets
# automatically. Depends on the CMake variable otb-module being set to the
# "current" module when add_* is called.
macro(verify_otb_module_is_set)
if("" STREQUAL "${otb-module}")
message(FATAL_ERROR "CMake variable otb-module is not set")
endif()
endmacro()
#-----------------------------------------------------------------------------
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment