diff --git a/readLib/CMakeLists.txt b/readLib/CMakeLists.txt index 377c0d758bc48acfe49606e24d6171c0e5f407e8..5073dd1599d80b271baea3c291df6aec7e8711b5 100644 --- a/readLib/CMakeLists.txt +++ b/readLib/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package (Boost COMPONENTS iostreams OPTIONAL) +find_package (Boost OPTIONAL_COMPONENTS iostreams) if (Boost_iostreams_FOUND) set ( @@ -6,41 +6,41 @@ if (Boost_iostreams_FOUND) source/Interface.boost.cc ) else (Boost_iostreams_FOUND) - message (Boost::iostreams not found, data tables need to be unpacked with gzip2 manually!) + message (STATUS "Boost::iostreams not found, data tables need to be unpacked with bunzip2 manually!") set ( files source/Interface.dummy.cc ) endif (Boost_iostreams_FOUND) -add_library(libCorsikaData STATIC ${files}) +add_library(CorsikaData STATIC ${files}) if (Boost_iostreams_FOUND) - target_link_libraries(libCorsikaData PUBLIC Boost::iostreams) + target_link_libraries(CorsikaData PUBLIC Boost::iostreams) endif (Boost_iostreams_FOUND) set_target_properties ( - libCorsikaData + CorsikaData PROPERTIES PUBLIC_HEADER corsika_data/Interface.h ) target_include_directories ( - libCorsikaData + CorsikaData PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/> ) install ( - TARGETS libCorsikaData + TARGETS CorsikaData LIBRARY DESTINATION lib ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/corsika_data ) #add_executable (readLZMA source/read.cc) -#target_link_libraries (readLZMA libCorsikaData) +#target_link_libraries (readLZMA CorsikaData) # -------------------- # code unit testing diff --git a/readLib/corsika_data/Interface.h b/readLib/corsika_data/Interface.h index 71083c40bd58129dcdb72be81a534002311620a7..a6236c222418c65d22d248ea0f20a624cc84f3de 100644 --- a/readLib/corsika_data/Interface.h +++ b/readLib/corsika_data/Interface.h @@ -8,8 +8,7 @@ * the license. */ -#ifndef _include__interface_h_ -#define _include__interface_h_ +#pragma once #include <string> @@ -30,8 +29,8 @@ namespace corsika_data { void cordataclosefile_(); double cordatanextnumber_(); int cordatanexttext_(char* data, int length); - int cordatacandecompress(); + int cordatacandecompress_(); + } } // namespace corsika_data -#endif diff --git a/readLib/source/Interface.boost.cc b/readLib/source/Interface.boost.cc index fbac9670bf3bbbc758735ba76dbdbdacd9f44029..07b854ddff6632f999b98c44a9409fdd0ff78ccb 100644 --- a/readLib/source/Interface.boost.cc +++ b/readLib/source/Interface.boost.cc @@ -81,6 +81,6 @@ namespace corsika_data { return CorDataNextText(data, length); } void cordataclosefile_() { global_DataFile.Close(); } - int cordatacandecompress() { return 1; } + int cordatacandecompress_() { return 1; } } } // namespace corsika_data diff --git a/readLib/source/Interface.dummy.cc b/readLib/source/Interface.dummy.cc index 9045399b19476a8c678b7f87f3452d0c198a2cbb..00c641e541b3f1e326f1d5a888289340d81843ff 100644 --- a/readLib/source/Interface.dummy.cc +++ b/readLib/source/Interface.dummy.cc @@ -45,6 +45,7 @@ namespace corsika_data { std::runtime_error("Cannot read compressed data files with dummy library."); return 0; } - int cordatacandecompress() { return 0; } + int cordatacandecompress_() { return 0; } + } } // namespace corsika_data