Skip to content

Commit

Permalink
Merge pull request #62 from USEPA/triplet_build
Browse files Browse the repository at this point in the history
Triplet build
  • Loading branch information
cbuahin authored Nov 14, 2023
2 parents 2b3c2e9 + c2224b3 commit 9f1da79
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: Build and Test EPANET 2.2
on:
push:
branches: [ master ]
branches: [ master, triplet_build ]
pull_request:
branches: [ master ]

Expand Down
11 changes: 11 additions & 0 deletions SRC_engines/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
#
# CMakeLists.txt - CMake configuration file for EPANET
#
# Created: Nov 13, 2023
# Modified: Nov 13, 2023
#
# Author: Caleb Buahin
# US EPA ORD/CESER
#


cmake_minimum_required(VERSION 3.9)

if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
Expand Down
16 changes: 10 additions & 6 deletions SRC_engines/src/run/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#
# CMakeLists.txt - CMake configuration file for EPANET Runner
#
# Created: Nov 13, 2023
# Modified: Nov 13, 2023
#
# Author: Caleb Buahin
# US EPA ORD/CESER
#

if(APPLE)
set(RPATH_ROOT "@loader_path")
else()
Expand Down Expand Up @@ -37,9 +47,3 @@ install(TARGETS runepanet
)


# # copy runswmm to build tree for testing
# add_custom_command(TARGET runepanet POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E copy
# $<TARGET_FILE:runepanet>
# ${CMAKE_BINARY_DIR}/bin/$<CONFIGURATION>/$<TARGET_FILE_NAME:runepanet>
# )
33 changes: 19 additions & 14 deletions SRC_engines/src/solver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
#
# CMakeLists.txt - CMake configuration file for EPANET solver
#
# Created: Nov 13, 2023
# Modified: Nov 13, 2023
#
# Author: Caleb Buahin
# US EPA ORD/CESER
#


include(../../extern/version.cmake)

set(EPANET_PUBLIC_HEADERS
${PROJECT_SOURCE_DIR}/include/epanet2_2.h
${PROJECT_SOURCE_DIR}/include/epanet2.h
${PROJECT_SOURCE_DIR}/include/epanet2_2.h
${PROJECT_SOURCE_DIR}/include/epanet2_enums.h
)

file(GLOB
Expand Down Expand Up @@ -49,23 +61,16 @@ target_link_options(epanet2
">"
)

if(UNIX)
target_link_libraries(epanet2
PRIVATE
m
)
endif()
target_link_libraries(epanet2
PUBLIC
$<$<NOT:$<BOOL:$<C_COMPILER_ID:MSVC>>>:m>
)


target_include_directories(epanet2
PUBLIC
$<INSTALL_INTERFACE:${INCLUDE_DIST}>
PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
)

include(GenerateExportHeader)
generate_export_header(epanet2
STATIC_DEFINE SHARED_EXPORTS_BUILT_AS_STATIC
$<INSTALL_INTERFACE:${INCLUDE_DIST}>
)

if(APPLE)
Expand Down
6 changes: 3 additions & 3 deletions SRC_engines/src/solver/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
#define VERSION_MAJOR 2
#define VERSION_MINOR 2
#define VERSION_PATCH 0
#define GIT_HASH "31eb962b1f7c65ac739899105d27617c2a94b7f3"
#define GIT_HASH "5480e100e626b479a866da4bdd867f69400b4e31"

#define PLATFORM "Windows"
#define COMPILER "MSVC"
#define COMPILER_VERSION "19.37.32824.0"
#define BUILD_ID "2023-10-23T18:30:13Z"
#define COMPILER_VERSION "19.37.32825.0"
#define BUILD_ID "2023-11-13T22:04:14Z"


static inline int get_version_legacy() { \
Expand Down

0 comments on commit 9f1da79

Please sign in to comment.