Skip to content

Commit

Permalink
Remove use of GLOB.
Browse files Browse the repository at this point in the history
Using GLOB is against recommend CMake best practices.
  • Loading branch information
jeannielynnmoulton committed Jul 25, 2024
1 parent 1805ba0 commit 92bd1dc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
10 changes: 8 additions & 2 deletions lib/tinyxml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
file(GLOB sources *.cpp)
# set source files
set(SOURCES
tinystr.cpp
tinyxml.cpp
tinyxmlerror.cpp
tinyxmlparser.cpp
)

add_library(tinyxml STATIC ${sources})
add_library(tinyxml STATIC ${SOURCES})
target_include_directories(tinyxml PUBLIC ${CMAKE_SOURCE_DIR})
22 changes: 20 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
file(GLOB sources *.cpp)
add_executable(transfil_N ${sources})

# set source files
set(SOURCES
BedNetEvent.cpp
Host.cpp
ImportationRateEvent.cpp
MDAEvent.cpp
Model.cpp
Output.cpp
Population.cpp
PrevalenceEvent.cpp
RecordedPrevalence.cpp
Scenario.cpp
ScenariosList.cpp
Statistics.cpp
Vector.cpp
Worm.cpp
main.cpp
)
add_executable(transfil_N ${SOURCES})

find_package(GSL REQUIRED)
# Include the library directories for linking
Expand Down

0 comments on commit 92bd1dc

Please sign in to comment.