Skip to content

Commit

Permalink
FileParse_Branch stored as global variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Oct 28, 2024
1 parent 5d1d646 commit 727bb0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ include(FetchContent)
# Test from FileParse should not be visible here
set(BUILD_FileParse_tests OFF CACHE BOOL "Build FileParse tests" FORCE)

set(FileParse_Branch "main")

FetchContent_Declare(
FileParse
GIT_REPOSITORY https://github.com/LBNL-ETA/FileParse.git
GIT_TAG main
GIT_TAG ${FileParse_Branch}
)
FetchContent_MakeAvailable(FileParse)

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ add_library( ${LIB_NAME}
target_link_libraries(${LIB_NAME} PRIVATE xmlParser)
target_link_libraries(${LIB_NAME} PRIVATE FileParse)

# Set a property on the existing target
set_property(TARGET ${LIB_NAME} PROPERTY variable_name "test")
# Setting variable for parent projects so it can be checked if same version is used
set_property(TARGET ${LIB_NAME} PROPERTY FileParse_Branch ${FileParse_Branch})

if(NOT "${fPIC}")
set(fPIC ON)
Expand Down

0 comments on commit 727bb0b

Please sign in to comment.