Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Aug 12, 2024
1 parent 5f9d09e commit 96c5cbf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
10 changes: 10 additions & 0 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,13 @@ function(redhat_based _RESULT)
endif()
set(${_RESULT} ${_REDHAT_BASED} PARENT_SCOPE)
endfunction()

function(apply_libxml2_settings _TARGET)
if(HAVE_LIBXML2_CONFIG)
target_link_libraries(${_TARGET} PUBLIC ${LIBXML2_TARGET_NAME})
else()
target_include_directories(${_TARGET} PUBLIC ${LIBXML2_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
target_link_libraries(${_TARGET} PUBLIC ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARIES})
target_compile_definitions(${_TARGET} PUBLIC ${LIBXML2_DEFINITIONS})
endif()
endfunction()
10 changes: 3 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,7 @@ else()
target_include_directories(cellml PUBLIC ${ZLIB_INCLUDE_DIRS})
endif()

if(HAVE_LIBXML2_CONFIG)
target_link_libraries(cellml PUBLIC ${LIBXML2_TARGET_NAME})
else()
target_include_directories(cellml PUBLIC ${LIBXML2_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS})
target_link_libraries(cellml PUBLIC ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARIES})
target_compile_definitions(cellml PUBLIC ${LIBXML2_DEFINITIONS})
endif()
apply_libxml2_settings(cellml)

# Use target compile features to propagate features to consuming projects.
target_compile_features(cellml PUBLIC cxx_std_17)
Expand Down Expand Up @@ -231,6 +225,8 @@ target_include_directories(cellml_debug_utilities
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/api>
)

apply_libxml2_settings(cellml_debug_utilities)

set_target_properties(cellml_debug_utilities PROPERTIES
CXX_VISIBILITY_PRESET hidden
DEBUG_POSTFIX d
Expand Down
4 changes: 2 additions & 2 deletions src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ limitations under the License.
#include "libcellml/model.h"
#include "libcellml/variable.h"

#include "libcellml/undefines.h"

#include "commonutils.h"
#include "utilities.h"

#include "libcellml/undefines.h"

namespace libcellml {

std::string astAsCode(const AnalyserEquationAstPtr &ast)
Expand Down

0 comments on commit 96c5cbf

Please sign in to comment.