diff --git a/CMakeLists.txt b/CMakeLists.txt index 55357bd..861e9bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,6 @@ add_subdirectory(indexer) add_subdirectory(data) add_subdirectory(tests) add_subdirectory(python) -add_subdirectory(examples/crystfel-integration) MESSAGE("ENV ${fast_feedback_indexer_ENV_SETUP}") configure_file(setup-env.sh.in diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 6f1a488..c01ac80 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,3 +1 @@ -project(data_top) - add_subdirectory(simple) diff --git a/data/simple/CMakeLists.txt b/data/simple/CMakeLists.txt index 0b303e7..81987ec 100644 --- a/data/simple/CMakeLists.txt +++ b/data/simple/CMakeLists.txt @@ -1,5 +1,3 @@ -project(simple_data_top) - add_subdirectory(reader) option(INSTALL_SIMPLE_DATA_FILES "Install simple data files" OFF) diff --git a/data/simple/reader/CMakeLists.txt b/data/simple/reader/CMakeLists.txt index ee81005..febd4f0 100644 --- a/data/simple/reader/CMakeLists.txt +++ b/data/simple/reader/CMakeLists.txt @@ -1,3 +1 @@ -project(simple_data_reader_top "CXX") - add_subdirectory(src) diff --git a/data/simple/reader/src/CMakeLists.txt b/data/simple/reader/src/CMakeLists.txt index d077670..089b819 100644 --- a/data/simple/reader/src/CMakeLists.txt +++ b/data/simple/reader/src/CMakeLists.txt @@ -12,7 +12,7 @@ if(BUILD_SIMPLE_DATA_READER) set(simple_data_PUB_HEADER_LIST ffbidx/simple_data.h) add_library(simple_data INTERFACE) set_target_properties(simple_data PROPERTIES - VERSION 1.0.0) + VERSION ${PROJECT_VERSION}) target_compile_features(simple_data INTERFACE cxx_std_17) target_sources(simple_data INTERFACE ${simple_data_PUB_HEADER_LIST}) target_include_directories(simple_data INTERFACE .) diff --git a/data/simple/reader/src/set-version.sh b/data/simple/reader/src/set-version.sh new file mode 100755 index 0000000..80aa02e --- /dev/null +++ b/data/simple/reader/src/set-version.sh @@ -0,0 +1,16 @@ +function usage() { + echo "usage: $0 [version]" + echo + echo "Replace version strings with new version" + exit -1 +} + +if (($# == 0)); then + grep VERSION meson.build +elif (($# == 1)); then + echo "replace version strings by $1" + sed -i 's/VERSION\(.*\)\w\.\w\.\w/VERSION\1'"$1"'/' CMakeLists.txt + sed -i 's/VERSION\(.*\)\w\.\w\.\w/VERSION\1'"$1"'/' meson.build +else + usage +fi diff --git a/indexer/CMakeLists.txt b/indexer/CMakeLists.txt index 8a891a9..febd4f0 100644 --- a/indexer/CMakeLists.txt +++ b/indexer/CMakeLists.txt @@ -1,3 +1 @@ -project(indexer_top) - add_subdirectory(src) diff --git a/indexer/src/CMakeLists.txt b/indexer/src/CMakeLists.txt index 62e3ebc..ee3f123 100644 --- a/indexer/src/CMakeLists.txt +++ b/indexer/src/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_policy(SET CMP0048 NEW) project(fast_indexer DESCRIPTION "Library for fast feedback indexing using brute force sampling" - VERSION 0.1.0 + VERSION 1.0.0 LANGUAGES CXX CUDA) option(BUILD_FAST_INDEXER "Build fast indexer library" ON) @@ -74,8 +74,8 @@ if(BUILD_FAST_INDEXER) add_dependencies(fast_indexer version_txt) set_target_properties(fast_indexer PROPERTIES CUDA_RUNTIME_LIBRARY Shared - SOVERSION 0 - VERSION 0.1.0 + SOVERSION ${PROJECT_VERSION_MAJOR} + VERSION ${PROJECT_VERSION} POSITION_INDEPENDENT_CODE ON) target_compile_features(fast_indexer PUBLIC cxx_std_17) target_include_directories(fast_indexer PUBLIC .) @@ -111,7 +111,7 @@ if(BUILD_FAST_INDEXER_STATIC) add_dependencies(fast_indexer_static version_txt) set_target_properties(fast_indexer_static PROPERTIES CUDA_RUNTIME_LIBRARY Static - VERSION 0.1.0) + VERSION ${PROJECT_VERSION}) target_compile_features(fast_indexer_static PUBLIC cxx_std_17) target_include_directories(fast_indexer_static PUBLIC .) target_link_libraries(fast_indexer_static diff --git a/indexer/src/meson.build b/indexer/src/meson.build index ae43f3a..225b82c 100644 --- a/indexer/src/meson.build +++ b/indexer/src/meson.build @@ -29,7 +29,7 @@ if get_option('build-ffbidx').enabled() endif conf_data = configuration_data() - conf_data.set('PROJECT_VERSION', '0.1.0') + conf_data.set('PROJECT_VERSION', '1.0.0') conf_data.set('CMAKE_INSTALL_PREFIX', get_option('prefix')) conf_data.set('CMAKE_INSTALL_INCLUDEDIR', get_option('includedir')) conf_data.set('CMAKE_INSTALL_LIBDIR', get_option('libdir')) diff --git a/indexer/src/set-version.sh b/indexer/src/set-version.sh new file mode 100755 index 0000000..80aa02e --- /dev/null +++ b/indexer/src/set-version.sh @@ -0,0 +1,16 @@ +function usage() { + echo "usage: $0 [version]" + echo + echo "Replace version strings with new version" + exit -1 +} + +if (($# == 0)); then + grep VERSION meson.build +elif (($# == 1)); then + echo "replace version strings by $1" + sed -i 's/VERSION\(.*\)\w\.\w\.\w/VERSION\1'"$1"'/' CMakeLists.txt + sed -i 's/VERSION\(.*\)\w\.\w\.\w/VERSION\1'"$1"'/' meson.build +else + usage +fi diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index b18b8e0..febd4f0 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,3 +1 @@ -project(python_top) - add_subdirectory(src) diff --git a/python/src/CMakeLists.txt b/python/src/CMakeLists.txt index 7adcf55..1abae1b 100644 --- a/python/src/CMakeLists.txt +++ b/python/src/CMakeLists.txt @@ -1,5 +1,6 @@ project(python_impl DESCRIPTION "Python module" + VERSION 1.0.0 LANGUAGES CXX) option(PYTHON_MODULE "Enable python module" OFF) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4d0f6a7..febd4f0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1 @@ -project(tests_top) - add_subdirectory(src) diff --git a/tests/src/CMakeLists.txt b/tests/src/CMakeLists.txt index 2953426..1eb4764 100644 --- a/tests/src/CMakeLists.txt +++ b/tests/src/CMakeLists.txt @@ -1,5 +1,6 @@ project(tests_impl DESCRIPTION "Tests" + VERSION 1.0.0 LANGUAGES CXX CUDA) # ---- Indexer Tests ----