Rename IRCV3 to BUILD_IRCV3 and fix tests linking, add headers to filesystem
This commit is contained in:
parent
93e8a5b2a5
commit
23dcf01dfe
|
@ -8,7 +8,7 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
|
||||
if ( IRCV3 )
|
||||
if ( BUILD_IRCV3 )
|
||||
add_definitions(-DUIRC_IRCV3)
|
||||
endif()
|
||||
if ( BUILD_TESTS )
|
||||
|
@ -28,4 +28,9 @@ endif()
|
|||
add_library(uirc SHARED ${build_FILES})
|
||||
set_property(TARGET uirc PROPERTY C_STANDARD 99)
|
||||
|
||||
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
|
||||
DESTINATION "include/uirc"
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
|
||||
install(TARGETS uirc DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
First, create the required build files (usually the Makefile)
|
||||
```sh
|
||||
cmake -H. -Bbuild/ -DBUILD_HELPERS=1 -DCMAKE_BUILD_TYPE=Release -DIRCV3=1
|
||||
cmake -H . -B build/ -DBUILD_HELPERS=1 -DCMAKE_BUILD_TYPE=Release -DBUILD_IRCV3=1
|
||||
```
|
||||
| Option | Description | Type | Supported since |
|
||||
|:-------------:|:---------------------------------------------------------------------:|:--------:|:---------------:|
|
||||
| BUILD_HELPERS | Build simple assemblers and tokenizers that handle the heavy lifting | boolean | - |
|
||||
| BUILD_TESTS | Build tests that check if the build results behave as they should | boolean | - |
|
||||
| IRCV3 | Build IRCv3 support (WIP) | boolean | - |
|
||||
| BUILD_IRCV3 | Build IRCv3 support (WIP) | boolean | - |
|
||||
|
||||
Following that, just use your build system and compile it
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.16)
|
||||
find_library(UIRC_PATH NAMES uirc libuirc REQUIRED)
|
||||
|
||||
add_executable(tokenizer tokenizer.c)
|
||||
add_executable(overflow overflow.c)
|
||||
|
@ -9,14 +10,14 @@ add_executable(notrail notrail.c)
|
|||
add_executable(spacedargs spacedargs.c)
|
||||
add_executable(strtokmr strtokmr.c)
|
||||
|
||||
target_link_libraries(tokenizer uirc)
|
||||
target_link_libraries(overflow uirc)
|
||||
target_link_libraries(prefixassm uirc)
|
||||
target_link_libraries(msgassm uirc)
|
||||
target_link_libraries(numericmds uirc)
|
||||
target_link_libraries(notrail uirc)
|
||||
target_link_libraries(spacedargs uirc)
|
||||
target_link_libraries(strtokmr uirc)
|
||||
target_link_libraries(tokenizer ${UIRC_PATH})
|
||||
target_link_libraries(overflow ${UIRC_PATH})
|
||||
target_link_libraries(prefixassm ${UIRC_PATH})
|
||||
target_link_libraries(msgassm ${UIRC_PATH})
|
||||
target_link_libraries(numericmds ${UIRC_PATH})
|
||||
target_link_libraries(notrail ${UIRC_PATH})
|
||||
target_link_libraries(spacedargs ${UIRC_PATH})
|
||||
target_link_libraries(strtokmr ${UIRC_PATH})
|
||||
|
||||
add_test(NAME Tokenizer COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tokenizer)
|
||||
add_test(NAME Overflow COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/overflow)
|
||||
|
@ -27,17 +28,17 @@ add_test(NAME IncorrectTrailing COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/notrai
|
|||
add_test(NAME SpacedArguments COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/spacedargs)
|
||||
add_test(NAME StrTokMoveSave COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/strtokmr)
|
||||
|
||||
if ( IRCV3 )
|
||||
if ( BUILD_IRCV3 )
|
||||
add_executable(tagtok tagtok.c)
|
||||
add_executable(tagassm tagassm.c)
|
||||
if ( BUILD_HELPERS )
|
||||
add_executable(timestamp timestamp.c)
|
||||
endif()
|
||||
|
||||
target_link_libraries(tagtok uirc)
|
||||
target_link_libraries(tagassm uirc)
|
||||
target_link_libraries(tagtok ${UIRC_PATH})
|
||||
target_link_libraries(tagassm ${UIRC_PATH})
|
||||
if ( BUILD_HELPERS )
|
||||
target_link_libraries(timestamp uirc)
|
||||
target_link_libraries(timestamp ${UIRC_PATH})
|
||||
endif()
|
||||
|
||||
add_test(NAME TagParser COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tagtok)
|
||||
|
|
Reference in New Issue