Define simple configuration on INI files.
Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- cmake_minimum_required(VERSION 3.24)
- project(ini-config C)
- set(CMAKE_C_STANDARD 11)
-
- include(CTest)
-
- include_directories(
- "${CMAKE_HOME_DIRECTORY}/subprojects/minIni/dev"
- )
-
- add_library(
- ini-config STATIC
- source/ini-config.c
- source/ini-config.h
- source/types/int.c
- source/types/int.h
- source/types/string.c
- source/types/string.h
- )
-
- add_executable(
- test-int
- subprojects/minIni/dev/minIni.h
- subprojects/minIni/dev/minIni.c
- tests/test-int.c
- source/ini-config.c
- source/ini-config.h
- source/types/int.c
- source/types/int.h
- )
-
- set_target_properties (test-int PROPERTIES RUNTIME_OUTPUT_DIRECTORY tests)
-
- add_test(
- NAME test-int
- COMMAND test-int
- WORKING_DIRECTORY tests
- )
-
- add_custom_command(
- TARGET test-int POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${CMAKE_HOME_DIRECTORY}/fixtures/test-int.ini"
- $<TARGET_FILE_DIR:test-int>
- )
|