diff --git a/distrib/core/HOWTO b/distrib/core/HOWTO index 5354eac2f63ee6c8792a050a1e5a33baf7d9a563..470c97f4ea7a4c2251d12c312b5ae2a156b742c3 100755 --- a/distrib/core/HOWTO +++ b/distrib/core/HOWTO @@ -1,17 +1,13 @@ cd /G/f2 - -### merge devel into master -# git rebase -i HEAD~99 # correct commit messages; do not go past last tag or branch from master git checkout master git pull origin master git merge --no-ff devel -git push origin master -### prepare +git push origin master vi pub/CMakeLists.txt # increment version number, remove "post-" + vi pub/CHANGELOG -### purge rm -r /G/f2/pub/build rm -r /G/f2/pub/qtbuild cd /G/f2/pub @@ -19,18 +15,16 @@ rm *~ rm */*~ rm */*/*~ rm */Doxyfile.bak - -### pack export V=2. # 2.<major>.<minor><bugfix> + export A=frida$V cd /tmp rm $A slink /G/f2/pub $A tar czvfh ~/data/tgz/$A.tgz $A/* dl ~/data/tgz/frida2.* # CHECK size -rm $A -### update git +rm $A cd /G/f2 kcom -m "This is release $V" kush @@ -38,10 +32,10 @@ k tag v$V # Yes! Our IT wants version tags to start with "v". # to delete erroneous tag: git tag -d $X; git push origin :refs/tags/$X kush --tags -### upload tgz - ssh wuttke@a mv /www/apps/src/frida/frida2.* /www/apps/src/frida/old/ + scp ~/data/tgz/$A.tgz wuttke@a:/www/apps/src/frida/ + scp /G/f2/pub/CHANGELOG wuttke@a:/www/apps/src/frida/frida2-CHANGELOG ### advertise @@ -54,10 +48,9 @@ git checkout devel git rebase master cd /G/f2/pub vi CMakeLists.txt # version becomes "post-<release>" + kcom -m "Starting post-$V" kush - -### rebuild cd /G/f2/pub mkdir build cd build diff --git a/pub/CHANGELOG b/pub/CHANGELOG index eb061f0e28b779f3278a664351bcde31476fb644..5cf3b1b870779d8c0a89480d33159c44d5d3c082 100644 --- a/pub/CHANGELOG +++ b/pub/CHANGELOG @@ -1,3 +1,10 @@ +Release 2.3.5a of 01feb17: + +- CMake machinery now uses variables like ${library_name}_LIBRARY +- Renamed libfrida -> libfridacore, libtrivia -> libfridatrivia +- Fully relying on implicit library dependencies (frida -> libfridacore -> libfridatrivia -> GSL) +- Ensure termination of functional tests by including the one-line script "exit(1)" + Release 2.3.4d of 28jan17: - mpgi,mpgr now using NOlo::j2j for spectrum correspondence diff --git a/pub/CMakeLists.txt b/pub/CMakeLists.txt index ae8d3819aba9af1ecc2f083dc63a987cebe70c60..c8dba3c8746c43a5bfc4c5288337e4a7db5abbfd 100644 --- a/pub/CMakeLists.txt +++ b/pub/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) project(Frida) -set(Frida_VERSION post-2.3.4d) +set(Frida_VERSION post-2.3.5a) include(CTest) # equivalent to "enable_testing() ??? add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) # => 'make check' is an alias for 'ctest' @@ -22,6 +22,8 @@ configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/CTestCustom.cmake.in #option(FRIDA_MAN "Build a user manual" OFF) #option(BUILD_DEBIAN "Build a debian package" OFF) +set(destination_lib ${CMAKE_INSTALL_PREFIX}/lib) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -O2 -pedantic -Wall -Wno-sign-compare -Wno-unused-result -Wno-parentheses -Wno-unknown-pragmas -Werror") # to use C99 _Complex, add -fext-numeric-literals to CXX_FLAGS diff --git a/pub/cmake/scripts/CTestCustom.cmake.in b/pub/cmake/scripts/CTestCustom.cmake.in index 85ee881065af6d348b71d02d7525c35000e80d58..a6cae54447a736bae3c88129627a507015391f75 100644 --- a/pub/cmake/scripts/CTestCustom.cmake.in +++ b/pub/cmake/scripts/CTestCustom.cmake.in @@ -1 +1,2 @@ +set(CTEST_CUSTOM_PRE_TEST "echo To run ctest before make install, unset LD_LIBRARY_PATH") set(CTEST_CUSTOM_POST_TEST "echo For details, see the log files in Testing/Temporary/") diff --git a/pub/ftest/CMakeLists.txt b/pub/ftest/CMakeLists.txt index 742c691c1bc256100b12d240e85d1594ca23031d..60297f8499bd5083e4c6ca8cf1edc1a1f66b6251 100644 --- a/pub/ftest/CMakeLists.txt +++ b/pub/ftest/CMakeLists.txt @@ -11,6 +11,11 @@ enable_testing() file(GLOB test_sources "*.f2t") list(SORT test_sources) +# This one-line script ensures termination of the functional test. +# It is only executed if the test script terminates without reaching an 'exit' command. +set(exit1file "${CMAKE_BINARY_DIR}/exit1file.f2s") +file(WRITE ${exit1file} "exit(1)") + foreach(test_src ${test_sources}) # remove directory path and suffix, to retain just the name of the test string(REGEX REPLACE ".*/" "" test_name "${test_src}") @@ -18,6 +23,6 @@ foreach(test_src ${test_sources}) add_test( NAME ${test_name} COMMAND ${CMAKE_BINARY_DIR}/src/frida - ARGUMENTS ${test_src} + ARGUMENTS ${test_src} ${exit1file} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endforeach(test_src) diff --git a/pub/lib/CMakeLists.txt b/pub/lib/CMakeLists.txt index 8bb758396f4cdb21f31863be993f5ae1d092ee10..d57ae7585b41850096a756c74e717ef6953ed1f6 100644 --- a/pub/lib/CMakeLists.txt +++ b/pub/lib/CMakeLists.txt @@ -1,5 +1,9 @@ # frida: lib/CMakeLists.txt +set(library_name fridacore) +set(${library_name}_LIBRARY ${library_name} PARENT_SCOPE) +set(${library_name}_LIBRARY_TYPE SHARED) + bison_target(xaxyacc xax_yacc.ypp ${CMAKE_CURRENT_BINARY_DIR}/xax_yacc.cpp COMPILE_FLAGS "-p xax -y" ) flex_target(xaxlex @@ -81,25 +85,23 @@ set(inc_files xax_lex.hpp ) -add_library(libfrida SHARED +add_library(${library_name} SHARED ${src_files} ${BISON_xaxyacc_OUTPUTS} ${FLEX_xaxlex_OUTPUTS} ) -set_target_properties(libfrida PROPERTIES OUTPUT_NAME frida) - -target_link_libraries(libfrida - libreadplus - libtrivia - libfridaplot +target_link_libraries(${library_name} + ${readplus_LIBRARY} + ${fridatrivia_LIBRARY} + ${fridaplot_LIBRARY} pthread - ${GSL_LIBRARIES} ${FFTW_LIBRARIES} ${KWW_LIBRARIES} ${Cerf_LIBRARIES} - ${YAMLCPP_LIBRARY} ${LMFit_LIBRARIES} ) -install(TARGETS libfrida DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +set_target_properties(${library_name} PROPERTIES OUTPUT_NAME ${library_name}) + +install(TARGETS ${library_name} LIBRARY DESTINATION ${destination_lib} COMPONENT Libraries) diff --git a/pub/plot/CMakeLists.txt b/pub/plot/CMakeLists.txt index a00656e46c995849c0685ecd998e3374c76dfc2b..a686e24cb2b4752943d0bb7b2c4868637fd9e946 100644 --- a/pub/plot/CMakeLists.txt +++ b/pub/plot/CMakeLists.txt @@ -1,23 +1,27 @@ # frida: trivia/CMakeLists.txt +set(library_name fridaplot) +set(${library_name}_LIBRARY ${library_name} PARENT_SCOPE) +set(${library_name}_LIBRARY_TYPE SHARED) + include_directories(${Frida_SOURCE_DIR}/plot ${CMAKE_CURRENT_BINARY_DIR}) set(src_files -axis.cpp -dualplot.cpp -plowin.cpp -) + axis.cpp + dualplot.cpp + plowin.cpp + ) set(inc_files -axis.hpp -dualplot.hpp -plowin.hpp -) + axis.hpp + dualplot.hpp + plowin.hpp + ) -add_library(libfridaplot SHARED ${src_files}) +add_library(${library_name} SHARED ${src_files}) -set_target_properties(libfridaplot PROPERTIES OUTPUT_NAME fridaplot) +set_target_properties(${library_name} PROPERTIES OUTPUT_NAME ${library_name}) -target_link_libraries(libfridaplot) +target_link_libraries(${library_name} ${Readline_LIBRARIES}) -install(TARGETS libfridaplot DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +install(TARGETS ${library_name} LIBRARY DESTINATION ${destination_lib}) diff --git a/pub/readplus/CMakeLists.txt b/pub/readplus/CMakeLists.txt index b710eefa48576d9a6e9f1c4fece375b12fb691fc..45d7b4c348782d40b1b87cc89f75207101f57979 100644 --- a/pub/readplus/CMakeLists.txt +++ b/pub/readplus/CMakeLists.txt @@ -1,23 +1,27 @@ # frida: readplus/CMakeLists.txt +set(library_name readplus) +set(${library_name}_LIBRARY ${library_name} PARENT_SCOPE) +set(${library_name}_LIBRARY_TYPE SHARED) + include_directories(${Frida_SOURCE_DIR}/readplus READLINE_INCLUDE_DIR ${Boost_INCLUDE_DIRS}) set(src_files -ask.cpp -macro.cpp -readln.cpp -) + ask.cpp + macro.cpp + readln.cpp + ) set(inc_files -ask.hpp -macro.hpp -readln.hpp -) + ask.hpp + macro.hpp + readln.hpp + ) -add_library(libreadplus SHARED ${src_files}) +add_library(${library_name} SHARED ${src_files}) -set_target_properties(libreadplus PROPERTIES OUTPUT_NAME readplus) +set_target_properties(${library_name} PROPERTIES OUTPUT_NAME ${library_name}) -target_link_libraries(libreadplus ${Readline_LIBRARIES}) +target_link_libraries(${library_name} ${Readline_LIBRARIES}) -install(TARGETS libreadplus DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +install(TARGETS ${library_name} LIBRARY DESTINATION ${destination_lib} COMPONENT Libraries) diff --git a/pub/src/CMakeLists.txt b/pub/src/CMakeLists.txt index e65bfd3b9ee32c1e0151b5fb4f11588a925d17cc..4a61e7e206d8c38106e2dfd0128cecf7cf675573 100644 --- a/pub/src/CMakeLists.txt +++ b/pub/src/CMakeLists.txt @@ -9,9 +9,10 @@ set(src_files frida2.cpp) add_executable(frida frida2.cpp) target_link_libraries(frida - libtrivia - libreadplus - ${GSL_LIBRARIES} - libfrida) +# ${trivia_LIBRARY} +# ${readplus_LIBRARY} +# ${plot_LIBRARY} +# ${GSL_LIBRARIES} + ${fridacore_LIBRARY}) install(TARGETS frida DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) diff --git a/pub/trivia/CMakeLists.txt b/pub/trivia/CMakeLists.txt index b2818757cf2bad12e4a69dafa0b1377a4bcf4cc8..de0ce03c4f1e08b0dcd10510a66c07be88c07954 100644 --- a/pub/trivia/CMakeLists.txt +++ b/pub/trivia/CMakeLists.txt @@ -1,34 +1,41 @@ # frida: trivia/CMakeLists.txt +set(library_name fridatrivia) +set(${library_name}_LIBRARY ${library_name} PARENT_SCOPE) +set(${library_name}_LIBRARY_TYPE SHARED) + include_directories(${Frida_SOURCE_DIR}/trivia ${CMAKE_CURRENT_BINARY_DIR}) set(src_files -file_ops.cpp -integrate.cpp -math.cpp -rng.cpp -string_convs.cpp -string_ops.cpp -vector_ops.cpp -yaml_out.cpp -) + file_ops.cpp + integrate.cpp + math.cpp + rng.cpp + string_convs.cpp + string_ops.cpp + vector_ops.cpp + yaml_out.cpp + ) set(inc_files -file_ops.hpp -integrate.hpp -math.hpp -rng.hpp -singleton.hpp -string_convs.hpp -string_ops.hpp -vector_ops.hpp -yaml_out.hpp -) + file_ops.hpp + integrate.hpp + math.hpp + rng.hpp + singleton.hpp + string_convs.hpp + string_ops.hpp + vector_ops.hpp + yaml_out.hpp + ) -add_library(libtrivia SHARED ${src_files}) +add_library(${library_name} SHARED ${src_files}) -set_target_properties(libtrivia PROPERTIES OUTPUT_NAME trivia) +set_target_properties(${library_name} PROPERTIES OUTPUT_NAME ${library_name}) -target_link_libraries(libtrivia) +target_link_libraries(${library_name} + ${GSL_LIBRARIES} + ${YAMLCPP_LIBRARY} +) -install(TARGETS libtrivia DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +install(TARGETS ${library_name} LIBRARY DESTINATION ${destination_lib} COMPONENT Libraries) diff --git a/pub/utest/CMakeLists.txt b/pub/utest/CMakeLists.txt index 0bb8d006fb4ffdbbf2769fc32d8d6387bf220b18..cdc55efb75534f7a180e305951c761b67c5bc35d 100644 --- a/pub/utest/CMakeLists.txt +++ b/pub/utest/CMakeLists.txt @@ -25,10 +25,10 @@ link_directories( set(test_link_libs gtest_main - libtrivia - libreadplus - ${GSL_LIBRARIES} - libfrida +# ${fridatrivia_LIBRARY} +# ${readplus_LIBRARY} +# ${GSL_LIBRARIES} + ${fridacore_LIBRARY} ) # We glob test sources, though this is often considered evil.