mold
parent
928f73d9e0
commit
b041d1ffba
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
project(blt-gp VERSION 0.0.144)
|
project(blt-gp VERSION 0.0.145)
|
||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ find_package(Threads REQUIRED)
|
||||||
|
|
||||||
if (NOT TARGET BLT)
|
if (NOT TARGET BLT)
|
||||||
add_subdirectory(lib/blt)
|
add_subdirectory(lib/blt)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
file(GLOB_RECURSE PROJECT_BUILD_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
|
file(GLOB_RECURSE PROJECT_BUILD_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
|
||||||
|
@ -27,6 +27,12 @@ add_library(blt-gp ${PROJECT_BUILD_FILES})
|
||||||
target_compile_options(blt-gp PRIVATE -Wall -Wextra -Wpedantic -Wno-comment)
|
target_compile_options(blt-gp PRIVATE -Wall -Wextra -Wpedantic -Wno-comment)
|
||||||
target_link_options(blt-gp PRIVATE -Wall -Wextra -Wpedantic -Wno-comment)
|
target_link_options(blt-gp PRIVATE -Wall -Wextra -Wpedantic -Wno-comment)
|
||||||
|
|
||||||
|
find_program(MOLD "mold")
|
||||||
|
|
||||||
|
if (NOT ${MOLD} STREQUAL MOLD-NOTFOUND)
|
||||||
|
target_compile_options(blt-gp PUBLIC -fuse-ld=mold)
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_include_directories(blt-gp PUBLIC include/)
|
target_include_directories(blt-gp PUBLIC include/)
|
||||||
|
|
||||||
target_link_libraries(blt-gp PRIVATE BLT Threads::Threads)
|
target_link_libraries(blt-gp PRIVATE BLT Threads::Threads)
|
||||||
|
@ -51,6 +57,8 @@ macro(blt_add_project name source type)
|
||||||
|
|
||||||
project(${name}-${type})
|
project(${name}-${type})
|
||||||
|
|
||||||
|
#add_compile_options(-fuse-ld=mold)
|
||||||
|
|
||||||
add_executable(${name}-${type} ${source})
|
add_executable(${name}-${type} ${source})
|
||||||
|
|
||||||
target_link_libraries(${name}-${type} PRIVATE BLT blt-gp Threads::Threads)
|
target_link_libraries(${name}-${type} PRIVATE BLT blt-gp Threads::Threads)
|
||||||
|
@ -76,12 +84,12 @@ macro(blt_add_project name source type)
|
||||||
|
|
||||||
add_test(NAME ${name} COMMAND ${name}-${type})
|
add_test(NAME ${name} COMMAND ${name}-${type})
|
||||||
|
|
||||||
# set (passRegex "Pass" "Passed" "PASS" "PASSED")
|
# set (passRegex "Pass" "Passed" "PASS" "PASSED")
|
||||||
# set (failRegex "WARN" "FAIL" "ERROR" "FATAL")
|
# set (failRegex "WARN" "FAIL" "ERROR" "FATAL")
|
||||||
set (failRegex "\\[WARN\\]" "FAIL" "ERROR" "FATAL" "exception")
|
set(failRegex "\\[WARN\\]" "FAIL" "ERROR" "FATAL" "exception")
|
||||||
|
|
||||||
# set_property (TEST ${name} PROPERTY PASS_REGULAR_EXPRESSION "${passRegex}")
|
# set_property (TEST ${name} PROPERTY PASS_REGULAR_EXPRESSION "${passRegex}")
|
||||||
set_property (TEST ${name} PROPERTY FAIL_REGULAR_EXPRESSION "${failRegex}")
|
set_property(TEST ${name} PROPERTY FAIL_REGULAR_EXPRESSION "${failRegex}")
|
||||||
|
|
||||||
project(blt-gp)
|
project(blt-gp)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
Loading…
Reference in New Issue