mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-19 02:37:11 +02:00
merge with organizing targets
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
|
||||
FetchContent_Declare(json
|
||||
GIT_REPOSITORY https://github.com/nlohmann/json
|
||||
GIT_TAG v3.11.3
|
||||
)
|
||||
FetchContent_MakeAvailable(json)
|
||||
|
||||
set(SourceFiles
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/File.cpp
|
||||
@ -13,18 +17,6 @@ set(SourceFiles
|
||||
|
||||
add_library(file_io STATIC ${SourceFiles})
|
||||
target_include_directories(file_io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_link_libraries(file_io PUBLIC fmt::fmt core nlohmann_json::nlohmann_json)
|
||||
target_link_libraries(file_io PRIVATE fmt::fmt core nlohmann_json::nlohmann_json aare_compiler_flags)
|
||||
set_property(TARGET file_io PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
|
||||
# if(AARE_BUILD_TESTS)
|
||||
# set(TestSources
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/src/defs.test.cpp
|
||||
# )
|
||||
# target_sources(tests PRIVATE ${TestSources} )
|
||||
|
||||
# #Work around to remove, this is not the way to do it =)
|
||||
# # target_include_directories(tests PRIVATE ${CMAKE_SOURCE_DIR}/include/common)
|
||||
# target_link_libraries(tests PRIVATE file_io)
|
||||
|
||||
# endif()
|
||||
|
@ -10,9 +10,9 @@ class FileHandler{
|
||||
File<detector,DataType>* f;
|
||||
|
||||
public:
|
||||
FileHandler<detector,DataType>(std::filesystem::path fpath){
|
||||
this->fpath = fpath;
|
||||
this->fileFactory= FileFactory<detector,DataType>::get_factory(fpath);
|
||||
FileHandler<detector,DataType>(std::filesystem::path fname){
|
||||
this->fpath = fname;
|
||||
this->fileFactory= FileFactory<detector,DataType>::get_factory(fname);
|
||||
this->f= fileFactory->load_file();
|
||||
delete fileFactory;
|
||||
}
|
||||
|
Reference in New Issue
Block a user