Project

General

Profile

« Previous | Next » 

Revision 2f07a237

Added by Pierre-Loïc Garoche almost 6 years ago

Tiny modif on cmake target

View differences:

share/FindLustre.cmake
82 82
  endif()
83 83

  
84 84
  if(LUS_NODE)
85
    set(LUSTRE_NODE_OPT "-node ${LUS_NODE}")
85
    set(LUSTRE_NODE_OPT "-node;${LUS_NODE}")
86 86
    set(LUSTRE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/lus_${LUS_LIBNAME}/${LUS_NODE}")
87 87
  else()
88 88
    set(LUSTRE_NODE_OPT "")
......
90 90
  endif()
91 91

  
92 92
  if (LUS_VERBOSE)
93
    set(LUSTRE_VERBOSE_OPT "-verbose ${LUS_VERBOSE}")
93
    set(LUSTRE_VERBOSE_OPT "-verbose;${LUS_VERBOSE}")
94 94
  else()
95 95
    # the default is to be quiet.
96 96
    set(LUSTRE_VERBOSE_OPT "-verbose;0")
......
105 105
    get_filename_component(E ${LFILE} EXT)
106 106
    if ("${E}" STREQUAL ".lus")
107 107
      set(LUSTRE_GENERATED_FILES ${LUSTRE_OUTPUT_DIR}/${L}.h ${LUSTRE_OUTPUT_DIR}/${L}.c ${LUSTRE_OUTPUT_DIR}/${L}_alloc.h)
108
      if(LUS_NODE)
109
         list(APPEND LUSTRE_GENERATED_FILES ${LUSTRE_OUTPUT_DIR}/${L}_main.c)
110
         list(APPEND LUSTRE_GENERATED_FILES ${LUSTRE_INCLUDE_DIR}/io_frontend.c)
111
      endif()
108 112
    elseif("${E}" STREQUAL ".lusi")
109 113
      set(LUSTRE_GENERATED_FILES ${LUSTRE_OUTPUT_DIR}/${L}.h)
110 114
    endif()
......
121 125
  endforeach()
122 126

  
123 127
  include_directories(${LUSTRE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LUSTRE_OUTPUT_DIR})
128
  if(LUS_NODE)
129
  add_executable(${LUS_LIBNAME}
130
              ${GLOBAL_LUSTRE_GENERATED_C_FILES} ${LUS_USER_C_FILES}
131
              )
132
  else()
124 133
  add_library(${LUS_LIBNAME} SHARED
125 134
              ${GLOBAL_LUSTRE_GENERATED_C_FILES} ${LUS_USER_C_FILES}
126 135
              )
136
  endif()
127 137
  set_target_properties(${LUS_LIBNAME} PROPERTIES COMPILE_FLAGS "-std=c99")
128 138
  set(LUSTRE_GENERATED_C_FILES_${LUS_LIBNAME} "${GLOBAL_LUSTRE_GENERATED_C_FILES}" PARENT_SCOPE)
129 139
  message(STATUS "Lustre: Added rule for building lustre library: ${LUS_LIBNAME}")

Also available in: Unified diff