mirror of
https://github.com/progsource/maddy.git
synced 2026-03-25 07:50:39 +01:00
ci: create release workflow
This commit is contained in:
@@ -1,6 +1,21 @@
|
||||
# This project is licensed under the MIT license. For more information see the
|
||||
# LICENSE file.
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER}
|
||||
-fuse-ld=gold -Wl,--version
|
||||
ERROR_QUIET OUTPUT_VARIABLE ld_version)
|
||||
if ("${ld_version}" MATCHES "GNU gold")
|
||||
message(STATUS "Found Gold linker, use faster linker")
|
||||
set(CMAKE_EXE_LINKER_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS
|
||||
"${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
@@ -25,4 +40,8 @@ target_include_directories(MaddyTests PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
target_link_libraries(MaddyTests maddy gmock_main)
|
||||
set_target_properties(MaddyTests PROPERTIES
|
||||
CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} -g -Wall -Wpedantic -Wextra -Wno-ignored-qualifiers -fno-rtti -fno-exceptions -fsanitize=address -fno-omit-frame-pointer"
|
||||
)
|
||||
add_test(NAME MaddyTests COMMAND MaddyTests)
|
||||
|
||||
Reference in New Issue
Block a user