[ox] Fix incorrect setting of build config when passed in from another CMakeLists.txt
This commit is contained in:
parent
30ff7be0e4
commit
36d8aeabd3
21
deps/ox/CMakeLists.txt
vendored
21
deps/ox/CMakeLists.txt
vendored
@ -5,10 +5,23 @@ project(Ox)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
||||
include(address_sanitizer)
|
||||
|
||||
set(OX_BUILD_EXEC "ON" CACHE STRING "Build executables (ON/OFF)")
|
||||
set(OX_RUN_TESTS "ON" CACHE STRING "Run tests (ON/OFF)")
|
||||
set(OX_USE_STDLIB "ON" CACHE STRING "Build libraries that need the std lib (ON/OFF)")
|
||||
set(OX_BARE_METAL FALSE CACHE STRING "Bare metal build (TRUE/FALSE)")
|
||||
if(NOT DEFINED OX_RUN_TESTS)
|
||||
set(OX_RUN_TESTS "ON")
|
||||
endif()
|
||||
if(NOT DEFINED OX_RUN_TESTS)
|
||||
set(OX_RUN_TESTS "ON")
|
||||
endif()
|
||||
if(NOT DEFINED OX_USE_STDLIB)
|
||||
set(OX_USE_STDLIB "ON")
|
||||
endif()
|
||||
if(NOT DEFINED OX_BARE_METAL)
|
||||
set(OX_BARE_METAL FALSE)
|
||||
endif()
|
||||
|
||||
set(OX_RUN_TESTS ${OX_RUN_TESTS} CACHE STRING "Run tests (ON/OFF)")
|
||||
set(OX_RUN_TESTS ${OX_RUN_TESTS} CACHE STRING "Run tests (ON/OFF)")
|
||||
set(OX_USE_STDLIB ${OX_USE_STDLIB} CACHE STRING "Build libraries that need the std lib (ON/OFF)")
|
||||
set(OX_BARE_METAL ${OX_BARE_METAL} CACHE STRING "Bare metal build (TRUE/FALSE)")
|
||||
|
||||
# can't run tests without building them
|
||||
if(OX_BUILD_EXEC STREQUAL "OFF" OR OX_USE_STDLIB STREQUAL "OFF")
|
||||
|
1
deps/ox/src/ox/fs/CMakeLists.txt
vendored
1
deps/ox/src/ox/fs/CMakeLists.txt
vendored
@ -10,6 +10,7 @@ add_library(
|
||||
)
|
||||
|
||||
if(NOT OX_BARE_METAL)
|
||||
message("fs link c++fs")
|
||||
target_link_libraries(
|
||||
OxFS PUBLIC
|
||||
$<$<CXX_COMPILER_ID:Clang>:c++fs>
|
||||
|
Loading…
Reference in New Issue
Block a user