2020-12-02 22:57:43 -06:00
|
|
|
include(CheckCXXCompilerFlag)
|
|
|
|
|
check_cxx_compiler_flag(-Wno-invalid-offsetof HAS_NO_INVALID_OFFSETOF)
|
2020-12-02 22:56:09 -06:00
|
|
|
|
2020-09-08 21:22:23 -05:00
|
|
|
file(GLOB STORM_SOURCES
|
|
|
|
|
"*.cpp"
|
2023-01-23 22:10:24 -06:00
|
|
|
"big/*.cpp"
|
2023-03-23 12:48:16 -05:00
|
|
|
"crypto/*.cpp"
|
2023-03-23 12:51:42 -05:00
|
|
|
"error/*.cpp"
|
2020-11-15 13:20:10 -06:00
|
|
|
"hash/*.cpp"
|
2020-12-06 23:28:15 -06:00
|
|
|
"queue/*.cpp"
|
2020-11-14 17:18:49 -06:00
|
|
|
"string/*.cpp"
|
2020-09-09 00:45:46 -05:00
|
|
|
"thread/*.cpp"
|
2020-09-08 21:22:23 -05:00
|
|
|
)
|
|
|
|
|
|
2020-12-02 20:04:02 -06:00
|
|
|
if(WHOA_SYSTEM_WIN)
|
2020-12-01 17:40:37 -06:00
|
|
|
file(GLOB STORM_WIN_SOURCES
|
|
|
|
|
"win/*.cpp"
|
2023-03-20 22:51:46 -04:00
|
|
|
"error/win/*.cpp"
|
2023-03-23 12:51:42 -05:00
|
|
|
"thread/win/*.cpp"
|
|
|
|
|
)
|
2020-12-01 17:40:37 -06:00
|
|
|
list(APPEND STORM_SOURCES ${STORM_WIN_SOURCES})
|
|
|
|
|
endif()
|
|
|
|
|
|
2020-12-02 20:04:02 -06:00
|
|
|
if(WHOA_SYSTEM_MAC)
|
2020-09-08 21:22:23 -05:00
|
|
|
file(GLOB STORM_MAC_SOURCES
|
|
|
|
|
"mac/*.cpp"
|
|
|
|
|
"mac/*.mm"
|
2024-08-30 18:04:21 -04:00
|
|
|
"error/unix/*.cpp"
|
2020-09-09 00:45:46 -05:00
|
|
|
"thread/mac/*.cpp"
|
|
|
|
|
"thread/mac/*.mm"
|
2020-09-08 21:22:23 -05:00
|
|
|
)
|
|
|
|
|
list(APPEND STORM_SOURCES ${STORM_MAC_SOURCES})
|
|
|
|
|
endif()
|
2020-09-07 17:00:14 -05:00
|
|
|
|
2022-12-28 20:03:31 -06:00
|
|
|
if(WHOA_SYSTEM_LINUX)
|
|
|
|
|
file(GLOB STORM_LINUX_SOURCES
|
|
|
|
|
"linux/*.cpp"
|
2024-08-30 18:04:21 -04:00
|
|
|
"error/unix/*.cpp"
|
2022-12-28 20:03:31 -06:00
|
|
|
"thread/linux/*.cpp"
|
|
|
|
|
)
|
|
|
|
|
list(APPEND STORM_SOURCES ${STORM_LINUX_SOURCES})
|
|
|
|
|
endif()
|
|
|
|
|
|
2020-09-07 17:00:14 -05:00
|
|
|
add_library(storm STATIC
|
|
|
|
|
${STORM_SOURCES}
|
|
|
|
|
)
|
2020-09-08 18:58:50 -05:00
|
|
|
|
|
|
|
|
target_include_directories(storm
|
2020-11-01 17:50:27 -06:00
|
|
|
PUBLIC
|
2020-11-01 17:45:45 -06:00
|
|
|
${PROJECT_SOURCE_DIR}
|
2020-09-08 18:58:50 -05:00
|
|
|
)
|
2020-12-02 20:04:02 -06:00
|
|
|
|
|
|
|
|
target_link_libraries(storm
|
2023-08-04 20:59:35 -04:00
|
|
|
PUBLIC
|
|
|
|
|
mem
|
2020-12-02 20:04:02 -06:00
|
|
|
PRIVATE
|
|
|
|
|
system
|
2023-08-14 16:40:45 -04:00
|
|
|
bc
|
2020-12-02 20:04:02 -06:00
|
|
|
)
|
2020-12-02 21:45:17 -06:00
|
|
|
|
2020-12-02 22:56:09 -06:00
|
|
|
if(HAS_NO_INVALID_OFFSETOF)
|
|
|
|
|
target_compile_options(storm
|
|
|
|
|
PUBLIC
|
|
|
|
|
-Wno-invalid-offsetof
|
|
|
|
|
)
|
|
|
|
|
endif()
|