Project

General

Profile

Revision 2d6a9bb3 regression_tests/modules/Lustre_compile.cmake

View differences:

regression_tests/modules/Lustre_compile.cmake
17 17
#                  LUS_FILE <Lustre file>
18 18
#                  [USER_C_FILES <C files>]
19 19
#                  [VERBOSE <level>]
20
#		   [OPTIONS <options>])
20
#		   [OPTIONS <options>]
21
#				[DIR <directory dest>])
21 22
#
22 23
# When used the Lustre_Compile macro define the variable
23 24
# LUSTRE_GENERATED_C_FILES_<libraryName> in the parent scope
......
71 72
include(CMakeParseArguments)
72 73
function(Lustre_Compile)
73 74
  set(options "")
74
  set(oneValueArgs  NODE VERBOSE LUS_FILE)
75
  set(oneValueArgs  NODE VERBOSE LUS_FILE DIR)
75 76
  set(multiValueArgs  OPTS USER_C_FILES )
76 77
  cmake_parse_arguments(LUS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
77 78

  
......
119 120
	set(LUSTRE_GENERATED_FILES ${LUSTRE_OUTPUT_DIR}/${L}.h)
120 121
  endif()
121 122
  
122
  
123
  set(LUSTREC_ARGS ${LUSTREC_ARGS} -d ${LUSTRE_OUTPUT_DIR} ${LUS_LUS_FILE})
124
	
123
  if(LUS_DIR)
124
	set(LUSTRE_OUTPUT_DIR ${LUS_DIR} )
125
  endif()
126
	set(LUSTREC_ARGS ${LUSTREC_ARGS} -d ${LUSTRE_OUTPUT_DIR} ${LUS_LUS_FILE})
127

  
125 128
  set(LUSTRE_OPTS_POSTFIX_${L} "${LUS_OPTS_CUT}" PARENT_SCOPE)
126 129
  set(LUSTREC_ARGS_${L}_${LUS_NODE}_${LUS_OPTS_CUT} "${LUSTREC_ARGS}" PARENT_SCOPE)
127 130
  set(LUSTRE_GENERATED_FILES_${L}_${LUS_NODE}_${LUS_OPTS_CUT} "${LUSTRE_GENERATED_FILES}" PARENT_SCOPE)
......
162 165
ENDMACRO()
163 166

  
164 167

  
168
function(JOIN VALUES GLUE OUTPUT)
169
  string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}")
170
  string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
171
  set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
172
endfunction()
165 173

  

Also available in: Unified diff