Add install for OxStd and add OX_RUN_TESTS CMake flag
This commit is contained in:
@@ -6,6 +6,12 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
|||||||
include(address_sanitizer)
|
include(address_sanitizer)
|
||||||
|
|
||||||
set(OX_BUILD_EXEC "ON" CACHE STRING "Build executables (ON/OFF)")
|
set(OX_BUILD_EXEC "ON" CACHE STRING "Build executables (ON/OFF)")
|
||||||
|
set(OX_RUN_TESTS "ON" CACHE STRING "Run tests (ON/OFF)")
|
||||||
|
|
||||||
|
# can't run tests without building them
|
||||||
|
if(OX_BUILD_EXEC STREQUAL "OFF")
|
||||||
|
set(OX_RUN_TESTS "OFF")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
|
|||||||
@@ -23,13 +23,17 @@ install(
|
|||||||
include/ox/fs
|
include/ox/fs
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS OxFS
|
install(
|
||||||
LIBRARY DESTINATION lib/ox
|
TARGETS
|
||||||
ARCHIVE DESTINATION lib/ox
|
OxFS
|
||||||
|
LIBRARY DESTINATION lib/ox
|
||||||
|
ARCHIVE DESTINATION lib/ox
|
||||||
)
|
)
|
||||||
|
|
||||||
if(OX_BUILD_EXEC STREQUAL "ON")
|
if(OX_BUILD_EXEC STREQUAL "ON")
|
||||||
add_subdirectory(test)
|
if(OX_RUN_TESTS STREQUAL "ON")
|
||||||
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
install(TARGETS oxfstool
|
install(TARGETS oxfstool
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ install(
|
|||||||
include/ox/std
|
include/ox/std
|
||||||
)
|
)
|
||||||
|
|
||||||
if(OX_BUILD_EXEC STREQUAL "ON")
|
install(TARGETS OxStd
|
||||||
|
LIBRARY DESTINATION lib/ox
|
||||||
|
ARCHIVE DESTINATION lib/ox
|
||||||
|
)
|
||||||
|
|
||||||
|
if(OX_RUN_TESTS STREQUAL "ON")
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user