Skip to content

Commit

Permalink
Fixed issue reported by github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ernst-bablick committed Dec 24, 2024
1 parent 49afc16 commit 2f3d7d1
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions source/libs/sgeobj/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@
#___INFO__MARK_END_NEW__

# source/libs/sgeobj
file(GLOB INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/json/*.json)
file(GLOB OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cull)
set(OUTPUT_FILES
${OUTPUT_DIR}/sge_sub_object.cc
${OUTPUT_DIR}/sge_all_listsL.h
${OUTPUT_DIR}/sge_boundaries.h
# no need to list other files here, they are included in the above files
)
add_custom_command(
OUTPUT ${OUTPUT_FILES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND gen_types json CULL cull
DEPENDS ${INPUT_FILES} gen_types
COMMENT "Generating CULL header files"
)
add_custom_target(cull_header DEPENDS ${OUTPUT_FILES})
if (PROJECT_FEATURES MATCHES "gcs-extensions")
file(GLOB INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/json/*.json)
file(GLOB OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cull)
set(OUTPUT_FILES
${OUTPUT_DIR}/sge_sub_object.cc
${OUTPUT_DIR}/sge_all_listsL.h
${OUTPUT_DIR}/sge_boundaries.h
# no need to list other files here, they are included in the above files
)
add_custom_command(
OUTPUT ${OUTPUT_FILES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND gen_types json CULL cull
DEPENDS ${INPUT_FILES} gen_types
COMMENT "Generating CULL header files"
)
add_custom_target(cull_header DEPENDS ${OUTPUT_FILES})
endif()

set(LIBRARY_NAME sgeobj)
set(LIBRARY_SOURCES
Expand Down Expand Up @@ -108,7 +110,9 @@ set(LIBRARY_SOURCES
set(LIBRARY_INCLUDES ${SGE_INCLUDES} "./")

add_library(${LIBRARY_NAME} STATIC ${LIBRARY_SOURCES} ${OUTPUT_FILES})
add_dependencies(${LIBRARY_NAME} cull_header)
if (PROJECT_FEATURES MATCHES "gcs-extensions")
add_dependencies(${LIBRARY_NAME} cull_header)
endif ()
target_include_directories(${LIBRARY_NAME} PUBLIC ${LIBRARY_INCLUDES})

#add_subdirectory(cpp)

0 comments on commit 2f3d7d1

Please sign in to comment.