Skip to content

Commit

Permalink
github actions: changes to support building and testing on arm64 for …
Browse files Browse the repository at this point in the history
…mac and linux
  • Loading branch information
StephenCzarnecki committed Oct 29, 2024
1 parent 880f027 commit ee17bf2
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ add_library( ${LIB_NAME}
Parser.cpp
ProductData.hpp
ProductData.cpp)

# Create a wrapper interface library for nlohmann_json
add_library(nlohmann_json_custom INTERFACE)

target_link_libraries(${LIB_NAME} PRIVATE nlohmann_json::nlohmann_json)
# Link the original nlohmann_json target to the custom one
target_link_libraries(nlohmann_json_custom INTERFACE nlohmann_json::nlohmann_json)

# Add compile options to suppress the warnings for GCC and Clang
if (CMAKE_COMPILER_IS_GNUCC)
target_compile_options(nlohmann_json_custom INTERFACE -Wno-type-limits)
endif()

target_link_libraries(${LIB_NAME} PRIVATE nlohmann_json_custom)
target_link_libraries(${LIB_NAME} PRIVATE xmlParser)
target_link_libraries(${LIB_NAME} PRIVATE FileParse)

Expand All @@ -37,9 +48,4 @@ if (MSVC)
target_compile_options(${LIB_NAME} PRIVATE /W4 /WX)
endif()

if (CMAKE_COMPILER_IS_GNUCC)
target_compile_options(nlohmann_json::nlohmann_json INTERFACE -Wno-type-limits)
endif()


target_compile_features(${LIB_NAME} PRIVATE cxx_std_17)

0 comments on commit ee17bf2

Please sign in to comment.