The configuration library has been refactored to make use of nlohmann macros to reduce boilerplate code. The nlohmann parser callback is used to decide whether to include configuration json objects directly, or if they need to be loaded from a sperate file.
27 lines
774 B
CMake
27 lines
774 B
CMake
###############################################
|
|
### tests_configuration ###
|
|
###############################################
|
|
|
|
cmake_minimum_required(VERSION 3.1.0)
|
|
|
|
project(test_configuration)
|
|
|
|
add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/test_configuration.cpp)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER tests/configuration)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
|
DRAMSys::config
|
|
gtest_main
|
|
)
|
|
|
|
gtest_discover_tests(${PROJECT_NAME}
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
|
|
add_executable(jsonconverter ${CMAKE_CURRENT_SOURCE_DIR}/jsonconverter.cpp)
|
|
target_link_libraries(jsonconverter PRIVATE DRAMSys::config)
|
|
set_target_properties(jsonconverter PROPERTIES FOLDER tests/configuration)
|
|
|
|
build_source_group()
|