Skip to content

Commit

Permalink
cmake: Add option to pass flags not used for host tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jbruechert committed Dec 21, 2024
1 parent abac709 commit fb47410
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project(motis)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

option(MOTIS_MIMALLOC "use mimalloc" OFF)
option(MOTIS_TARGET_FLAGS "Flags to use to build code that ends up in the resulting executable. They are not used for host tools." "")

if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
if (MOTIS_MIMALLOC)
Expand Down Expand Up @@ -198,3 +199,9 @@ add_custom_target(motis-web-ui
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ui"
VERBATIM
)

foreach(t mimalloc adr osr nigiri gtfsrt
geo tiles tiles-import-library
motis motis-api motislib)
target_compile_options(${t} PUBLIC ${MOTIS_TARGET_FLAGS})
endforeach()

0 comments on commit fb47410

Please sign in to comment.