From db940d15304147b7843f8f402a31b82af9ad07ab Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 14:30:00 +0200 Subject: [PATCH 01/25] Require minimum CMake 2.8.11 INTERFACE_INCLUDE_DIRECTORIES and related commands were first added in CMake 2.8.11 --- CMakeLists.txt | 2 +- ChangeLog | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 090f4ac..2f960c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.3 FATAL_ERROR) +cmake_minimum_required (VERSION 2.8.11 FATAL_ERROR) project (SAXSVIEW C CXX) set (CMAKE_VERBOSE_MAKEFILE OFF) diff --git a/ChangeLog b/ChangeLog index 086d72c..acfa2b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Require minimum CMake 2.8.11 (for INTERFACE_INCLUDE_DIRECTORIES) + 2015-07-08 Daniel Franke * external/h5zlz4: New subdirectory; LZ4 comporession for HDF5. From 43d01dcfe53742fcb46d767006437f9bc5044fcd Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 14:51:54 +0200 Subject: [PATCH 02/25] external/edfpack: Use target_include_directories etc --- external/edfpack/CMakeLists.txt | 15 ++++----------- external/edfpack/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/external/edfpack/CMakeLists.txt b/external/edfpack/CMakeLists.txt index 0d53e1a..71388d2 100644 --- a/external/edfpack/CMakeLists.txt +++ b/external/edfpack/CMakeLists.txt @@ -4,23 +4,16 @@ find_package (ZLIB QUIET) if (ZLIB_FOUND) project (EDFPACK C) - set (EDFPACK_HEADERS angle.h arc.h bslio.h edfio.h filename.h gamma.h - gauss.h ipol.h isotime.h numio.h poisson.h polarization.h - project.h readascii.h reference.h waxs.h statfunc.h - rot3d.h tilt3d.h sx.h strlib.h raster.h cmpr.h r2t.h) - - set (EDFPACK_SOURCES angle.c arc.c bslio.c edfio.c filename.c gamma.c gauss.c ipol.c isotime.c numio.c poisson.c polarization.c project.c readascii.c waxs.c r2t.c rot3d.c tilt3d.c sx.c strlib.c raster.c cmpr.c statfunc.c) - include_directories(${ZLIB_INCLUDE_DIRS}) + add_library(edf SHARED ${EDFPACK_SOURCES}) + set_target_properties(edf PROPERTIES VERSION 2.233) + target_link_libraries(edf PRIVATE m ${ZLIB_LIBRARIES}) + target_include_directories(edf PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") - add_shared_library (edf - SOURCES ${EDFPACK_HEADERS} ${EDFPACK_SOURCES} - LIBRARIES m ${ZLIB_LIBRARIES} - VERSION 2.233) install_library (TARGETS edf) else (ZLIB_FOUND) diff --git a/external/edfpack/ChangeLog b/external/edfpack/ChangeLog index 1a18760..e3e4134 100644 --- a/external/edfpack/ChangeLog +++ b/external/edfpack/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use target_include_directories etc + 2014-04-07 Daniel Franke * Imported r269 of edfpack. From 7adef413071b34cdd5a7a44d5a2c5d3eb1a4f302 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 14:58:36 +0200 Subject: [PATCH 03/25] external/h5zlz4: Set target_link_libraries appropriately --- external/h5zlz4/CMakeLists.txt | 17 ++++++++++------- external/h5zlz4/ChangeLog | 4 ++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/external/h5zlz4/CMakeLists.txt b/external/h5zlz4/CMakeLists.txt index dae0da6..931ac19 100644 --- a/external/h5zlz4/CMakeLists.txt +++ b/external/h5zlz4/CMakeLists.txt @@ -9,14 +9,17 @@ find_file (HDF5_PLUGIN_HEADER if (HDF5_FOUND AND (NOT HDF5_PLUGIN_HEADER STREQUAL "HDF5_PLUGIN_HEADER-NOTFOUND")) project (H5ZLZ4 C) - set (H5ZLZ4_HEADERS lz4.h) set (H5ZLZ4_SOURCES lz4.c h5zlz4.c) - add_definitions (-DHAVE_HDF5 -std=gnu99) - add_shared_library (h5zlz4 - SOURCES ${H5ZLZ4_HEADERS} ${H5ZLZ4_SOURCES} - LIBRARIES ${HDF5_LIBRARIES} - VERSION 0.2) - + add_library(h5zlz4 SHARED ${H5ZLZ4_SOURCES}) + set_target_properties(h5zlz4 PROPERTIES VERSION 0.2) + if (CMAKE_VERSION VERSION_LESS 3.1) + target_compile_options(h5zlz4 PRIVATE --std=gnu99) + else() + set_target_properties(h5zlz4 PROPERTIES C_STANDARD 99) + endif() + # PUBLIC link_libraries means: + # targets linking to h5zlz4 will automatically include_directories(${HDF5_INCLUDE_DIRS}) + target_link_libraries(h5zlz4 PUBLIC ${HDF5_LIBRARIES}) install_library (TARGETS h5zlz4) endif (HDF5_FOUND AND (NOT HDF5_PLUGIN_HEADER STREQUAL "HDF5_PLUGIN_HEADER-NOTFOUND")) diff --git a/external/h5zlz4/ChangeLog b/external/h5zlz4/ChangeLog index cabedc1..0a024dc 100644 --- a/external/h5zlz4/ChangeLog +++ b/external/h5zlz4/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Set target_link_libraries appropriately + 2015-07-13 Chris Kerr * CMakeLists.txt: Check for a sufficiently recent version of HDF5 From 0bb4fca4b2bb39f85b2cd8b601c82a8f838506a2 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:06:57 +0200 Subject: [PATCH 04/25] external/muparser: Use target_include_directories etc --- external/muparser/CMakeLists.txt | 20 ++++---------------- external/muparser/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/external/muparser/CMakeLists.txt b/external/muparser/CMakeLists.txt index 867579b..8b98362 100644 --- a/external/muparser/CMakeLists.txt +++ b/external/muparser/CMakeLists.txt @@ -1,20 +1,6 @@ project (MUPARSER CXX) -set (MUPARSER_HEADERS muParserBase.h - muParserBytecode.h - muParserCallback.h - muParserDef.h - muParserDLL.h - muParserError.h - muParserFixes.h - muParser.h - muParserInt.h - muParserStack.h - muParserTemplateMagic.h - muParserToken.h - muParserTokenReader.h) - set (MUPARSER_SOURCES muParserBase.cpp muParserBytecode.cpp muParserCallback.cpp @@ -24,10 +10,12 @@ set (MUPARSER_SOURCES muParserBase.cpp muParserInt.cpp muParserTokenReader.cpp) -add_definitions (-DMUPARSERLIB_EXPORTS -DMUPARSER_DLL) add_shared_library (muparser - SOURCES ${MUPARSER_SOURCES} ${MUPARSER_HEADERS} + SOURCES ${MUPARSER_SOURCES} VERSION 2.2.2) +target_compile_definitions (muparser PRIVATE MUPARSERLIB_EXPORTS MUPARSER_DLL) +target_include_directories (muparser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") + install_library (TARGETS muparser) diff --git a/external/muparser/ChangeLog b/external/muparser/ChangeLog index 258530f..1bf6e01 100644 --- a/external/muparser/ChangeLog +++ b/external/muparser/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use target_include_directories etc + 2012-04-11 Daniel Franke * CMakeLists.txt: Use saxsview-convenience macros. From c66f735911f19cfad4fcaf63a71e7f3d64443ce7 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:11:46 +0200 Subject: [PATCH 05/25] qtpropertybrowser: Use target_include_directories etc --- external/qtsolutions/ChangeLog | 4 ++++ .../qtsolutions/qtpropertybrowser/CMakeLists.txt | 15 +++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/external/qtsolutions/ChangeLog b/external/qtsolutions/ChangeLog index 4cc6cad..703da3c 100644 --- a/external/qtsolutions/ChangeLog +++ b/external/qtsolutions/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * qtpropertybrowser/CMakeLists.txt: Use target_include_directories etc + 2012-04-11 Daniel Franke * qtpropertybrowser/CMakeLists.txt: Use saxsview-convenience macros. diff --git a/external/qtsolutions/qtpropertybrowser/CMakeLists.txt b/external/qtsolutions/qtpropertybrowser/CMakeLists.txt index 1cb3ad3..87f04a4 100644 --- a/external/qtsolutions/qtpropertybrowser/CMakeLists.txt +++ b/external/qtsolutions/qtpropertybrowser/CMakeLists.txt @@ -1,16 +1,5 @@ project (QTPROPERTYBROWSER CXX) -include_directories (${QTPROPERTYBROWSER_BINARY_DIR}) - -set (HEADERS qtbuttonpropertybrowser.h - qtpropertybrowser.h - qttreepropertybrowser.h - qteditorfactory.h - qtpropertybrowserutils_p.h - qtvariantproperty.h - qtgroupboxpropertybrowser.h - qtpropertymanager.h) - set (SOURCES qtbuttonpropertybrowser.cpp qtpropertybrowser.cpp qttreepropertybrowser.cpp @@ -62,9 +51,11 @@ qt4_add_resources (RES qtpropertybrowser.qrc) add_shared_library (qtpropertybrowser - SOURCES ${HEADERS} ${SOURCES} ${RES} moc_qtpropertybrowserutils_p.cpp + SOURCES ${SOURCES} ${RES} moc_qtpropertybrowserutils_p.cpp LIBRARIES ${QT_LIBRARIES} VERSION 2.5.1) +target_include_directories(qtpropertybrowser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" + PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") install_library (TARGETS qtpropertybrowser) From ac7773ea0a2cc219e6acefbe3fadcd3ab874f1d8 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:14:12 +0200 Subject: [PATCH 06/25] external/qwt: Use target_include_directories etc --- external/qwt/CMakeLists.txt | 40 +++---------------------------------- external/qwt/ChangeLog | 4 ++++ 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/external/qwt/CMakeLists.txt b/external/qwt/CMakeLists.txt index 5fb61c6..97990f9 100644 --- a/external/qwt/CMakeLists.txt +++ b/external/qwt/CMakeLists.txt @@ -11,40 +11,6 @@ qt4_wrap_cpp (MOC qwt_abstract_slider.h qwt_analog_clock.h qwt_compass.h qwt_abstract_legend.h qwt_legend_label.h qwt_abstract_scale.h) -set (HEADERS qwt.h qwt_dial_needle.h qwt_plot_magnifier.h - qwt_scale_div.h qwt_abstract_scale.h qwt_plot_abstract_barchart.h - qwt_painter.h qwt_plot_marker.h qwt_scale_draw.h - qwt_abstract_scale_draw.h qwt_panner.h - qwt_plot_panner.h qwt_scale_engine.h qwt_abstract_slider.h - qwt_picker.h qwt_plot_picker.h qwt_scale_map.h - qwt_analog_clock.h qwt_dyngrid_layout.h qwt_picker_machine.h - qwt_scale_widget.h - qwt_event_pattern.h qwt_plot.h qwt_plot_rasteritem.h - qwt_series_data.h qwt_arrow_button.h qwt_global.h - qwt_plot_canvas.h qwt_plot_rescaler.h qwt_slider.h qwt_clipper.h - qwt_interval_symbol.h qwt_plot_curve.h qwt_plot_scaleitem.h - qwt_spline.h qwt_color_map.h qwt_knob.h qwt_plot_dict.h - qwt_plot_seriesitem.h qwt_symbol.h qwt_column_symbol.h - qwt_plot_directpainter.h - qwt_plot_spectrogram.h qwt_text.h qwt_compass.h qwt_legend.h - qwt_plot_grid.h qwt_plot_svgitem.h qwt_text_engine.h - qwt_compass_rose.h qwt_plot_histogram.h - qwt_plot_zoomer.h qwt_text_label.h qwt_counter.h - qwt_plot_intervalcurve.h - qwt_thermo.h qwt_curve_fitter.h qwt_magnifier.h qwt_plot_item.h - qwt_raster_data.h qwt_dial.h qwt_math.h - qwt_plot_layout.h qwt_round_scale_draw.h qwt_wheel.h - qwt_plot_renderer.h qwt_sampling_thread.h - qwt_plot_spectrocurve.h qwt_system_clock.h qwt_compat.h - qwt_abstract_legend.h qwt_graphic.h qwt_interval.h qwt_legend_data.h - qwt_legend_label.h qwt_matrix_raster_data.h qwt_null_paintdevice.h - qwt_painter_command.h qwt_pixel_matrix.h qwt_plot_barchart.h - qwt_plot_legenditem.h qwt_plot_multi_barchart.h qwt_plot_tradingcurve.h - qwt_point_3d.h qwt_point_data.h qwt_point_mapper.h qwt_point_polar.h - qwt_samples.h qwt_series_store.h qwt_date.h qwt_date_scale_engine.h - qwt_widget_overlay.h qwt_plot_zoneitem.h qwt_transform.h - qwt_plot_shapeitem.h qwt_date_scale_draw.h qwt_plot_textlabel.h) - set (SOURCES qwt_abstract_scale.cpp qwt qwt_plot_abstract_barchart.cpp qwt_picker_machine.cpp qwt_plot_picker.cpp qwt_scale_engine.cpp @@ -81,11 +47,11 @@ set (SOURCES qwt_abstract_scale.cpp qwt qwt_plot_abstract_barchart.cpp qwt_date_scale_draw.cpp qwt_date_scale_engine.cpp qwt_transform.cpp qwt_date.cpp qwt_plot_textlabel.cpp) -add_definitions (-DQWT_NO_OPENGL) - add_shared_library(qwt - SOURCES ${HEADERS} ${SOURCES} ${MOC} + SOURCES ${SOURCES} ${MOC} LIBRARIES ${QT_LIBRARIES} VERSION 6.1.0) +target_compile_definitions(qwt PRIVATE QWT_NO_OPENGL) +target_include_directories(qwt PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") install_library(TARGETS qwt) diff --git a/external/qwt/ChangeLog b/external/qwt/ChangeLog index 9dbc3b0..ac056e4 100644 --- a/external/qwt/ChangeLog +++ b/external/qwt/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use target_include_directories etc + 2013-04-19 Daniel Franke * patches/003-legend-item-testattribute.patch: Updated. From fdf579559c4c6e9cab98190f9e328af25f802f2e Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:15:40 +0200 Subject: [PATCH 07/25] external/qwt: Use AUTOMOC --- external/qwt/CMakeLists.txt | 14 ++------------ external/qwt/ChangeLog | 4 ++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/external/qwt/CMakeLists.txt b/external/qwt/CMakeLists.txt index 97990f9..db3913d 100644 --- a/external/qwt/CMakeLists.txt +++ b/external/qwt/CMakeLists.txt @@ -1,16 +1,5 @@ project (QWT CXX) -qt4_wrap_cpp (MOC qwt_abstract_slider.h qwt_analog_clock.h qwt_compass.h - qwt_counter.h qwt_dial.h qwt_dyngrid_layout.h qwt_knob.h - qwt_legend.h qwt_magnifier.h - qwt_panner.h qwt_picker.h qwt_plot.h qwt_plot_canvas.h - qwt_plot_magnifier.h qwt_plot_panner.h qwt_plot_picker.h - qwt_plot_zoomer.h qwt_scale_widget.h qwt_slider.h - qwt_text_label.h qwt_thermo.h qwt_wheel.h - qwt_plot_renderer.h qwt_sampling_thread.h - qwt_abstract_legend.h qwt_legend_label.h - qwt_abstract_scale.h) - set (SOURCES qwt_abstract_scale.cpp qwt qwt_plot_abstract_barchart.cpp qwt_picker_machine.cpp qwt_plot_picker.cpp qwt_scale_engine.cpp @@ -48,9 +37,10 @@ set (SOURCES qwt_abstract_scale.cpp qwt qwt_plot_abstract_barchart.cpp qwt_transform.cpp qwt_date.cpp qwt_plot_textlabel.cpp) add_shared_library(qwt - SOURCES ${SOURCES} ${MOC} + SOURCES ${SOURCES} LIBRARIES ${QT_LIBRARIES} VERSION 6.1.0) +set_target_properties(qwt PROPERTIES AUTOMOC On) target_compile_definitions(qwt PRIVATE QWT_NO_OPENGL) target_include_directories(qwt PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/external/qwt/ChangeLog b/external/qwt/ChangeLog index ac056e4..79457ba 100644 --- a/external/qwt/ChangeLog +++ b/external/qwt/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use AUTOMOC + 2016-07-07 Chris Kerr * CMakeLists.txt: Use target_include_directories etc From a6190c2ccccc184fb4f719be627d7949bf775512 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:30:50 +0200 Subject: [PATCH 08/25] external/cbf: Use target_include_directories etc --- external/cbflib/CMakeLists.txt | 11 ++--------- external/cbflib/ChangeLog | 4 ++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/external/cbflib/CMakeLists.txt b/external/cbflib/CMakeLists.txt index c709d02..f431a27 100644 --- a/external/cbflib/CMakeLists.txt +++ b/external/cbflib/CMakeLists.txt @@ -1,13 +1,5 @@ project (CBFLIB C) -set (CBFLIB_HEADERS cbf.h cbf_alloc.h cbf_ascii.h cbf_binary.h - cbf_byte_offset.h cbf_canonical.h cbf_codes.h - cbf_compress.h cbf_context.h cbf_file.h cbf_lex.h - cbf_packed.h cbf_predictor.h cbf_read_binary.h - cbf_read_mime.h cbf_simple.h cbf_string.h cbf_stx.h - cbf_tree.h cbf_uncompressed.h cbf_write.h - cbf_write_binary.h global.h md5.h) - set (CBFLIB_SOURCES cbf.c cbf_alloc.c cbf_ascii.c cbf_binary.c cbf_byte_offset.c cbf_canonical.c cbf_codes.c cbf_compress.c cbf_context.c cbf_file.c cbf_lex.c @@ -17,9 +9,10 @@ set (CBFLIB_SOURCES cbf.c cbf_alloc.c cbf_ascii.c cbf_binary.c cbf_write_binary.c md5c.c) add_shared_library (cbf - SOURCES ${CBFLIB_HEADERS} ${CBFLIB_SOURCES} + SOURCES ${CBFLIB_SOURCES} LIBRARIES m VERSION 0.7.9.1) +target_include_directories(cbf PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") install_library (TARGETS cbf) diff --git a/external/cbflib/ChangeLog b/external/cbflib/ChangeLog index 6d3c2fe..6071ade 100644 --- a/external/cbflib/ChangeLog +++ b/external/cbflib/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use target_include_directories etc + 2012-04-11 Daniel Franke * CMakeLists.txt: Use saxsview-convenience macros. From 9ccf2ffccb8e3f6500279b168119e96a57b8657d Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:20:00 +0200 Subject: [PATCH 09/25] libsaxsdocument: Use target_include_directories etc --- libsaxsdocument/ChangeLog | 4 ++++ libsaxsdocument/src/CMakeLists.txt | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libsaxsdocument/ChangeLog b/libsaxsdocument/ChangeLog index ccfab68..aa3f416 100644 --- a/libsaxsdocument/ChangeLog +++ b/libsaxsdocument/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * src/CMakeLists.txt: Use target_include_directories etc + 2016-02-24 Chris Kerr * src/CMakeLists.txt: Disable libxml2 on Windows diff --git a/libsaxsdocument/src/CMakeLists.txt b/libsaxsdocument/src/CMakeLists.txt index c173ae4..81acae6 100644 --- a/libsaxsdocument/src/CMakeLists.txt +++ b/libsaxsdocument/src/CMakeLists.txt @@ -25,11 +25,6 @@ set (SOURCES saxsproperty.c maxlab_rad.c malvern_txt.c) -set (HEADERS saxsproperty.h - saxsdocument.h - saxsdocument_format.h - columns.h) - # conditional sources if (LIBXML2_FOUND) add_definitions (-DHAVE_LIBXML2 ${LIBXML2_DEFINITIONS}) @@ -38,8 +33,9 @@ if (LIBXML2_FOUND) endif (LIBXML2_FOUND) add_shared_library (saxsdocument - SOURCES ${HEADERS} ${SOURCES} + SOURCES ${SOURCES} LIBRARIES m ${LIBXML2_LIBRARIES} VERSION 1) +target_include_directories(saxsdocument PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") install_library (TARGETS saxsdocument) From 2856341b1d4646f799f3b98266f8df4d039b07b2 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:21:35 +0200 Subject: [PATCH 10/25] pysaxsdocument: include_directories() no longer needed ... because of target_include_directories on libsaxsdocument --- libsaxsdocument/python/CMakeLists.txt | 1 - libsaxsdocument/python/ChangeLog | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libsaxsdocument/python/CMakeLists.txt b/libsaxsdocument/python/CMakeLists.txt index b4e12c2..d6d9901 100644 --- a/libsaxsdocument/python/CMakeLists.txt +++ b/libsaxsdocument/python/CMakeLists.txt @@ -1,6 +1,5 @@ if (PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND) - include_directories (${LIBSAXSDOCUMENT_SOURCE_DIR}) add_python_module (pysaxsdocument SOURCES pysaxsdocument.c diff --git a/libsaxsdocument/python/ChangeLog b/libsaxsdocument/python/ChangeLog index e6fb4b9..5cd51f2 100644 --- a/libsaxsdocument/python/ChangeLog +++ b/libsaxsdocument/python/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: include_directories() no longer needed + 2016-02-11 Chris Kerr * pysaxsdocument.c: Added/improved docstrings From d9dee47275447d169278320da0e3ee91f59cf924 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:23:18 +0200 Subject: [PATCH 11/25] fsaxsdocument: Add INTERFACE_INCLUDE_DIRECTORY for the Fortran module output dir --- libsaxsdocument/ChangeLog | 4 ++++ libsaxsdocument/fortran/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/libsaxsdocument/ChangeLog b/libsaxsdocument/ChangeLog index aa3f416..7c32d58 100644 --- a/libsaxsdocument/ChangeLog +++ b/libsaxsdocument/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * fortran/CMakeLists.txt: Add INTERFACE_INCLUDE_DIRECTORY for the Fortran module output directory + 2016-07-07 Chris Kerr * src/CMakeLists.txt: Use target_include_directories etc diff --git a/libsaxsdocument/fortran/CMakeLists.txt b/libsaxsdocument/fortran/CMakeLists.txt index cd09010..9d9bf73 100644 --- a/libsaxsdocument/fortran/CMakeLists.txt +++ b/libsaxsdocument/fortran/CMakeLists.txt @@ -6,5 +6,6 @@ if (CMAKE_Fortran_COMPILER_WORKS) SOURCES fsaxsdocument.f90 LIBRARIES saxsdocument) + target_include_directories(fsaxsdocument INTERFACE "${CMAKE_Fortran_MODULE_DIRECTORY}") endif (CMAKE_Fortran_COMPILER_WORKS) From 7062322087e2c0382b67f5823de4ccdd5cb2b9e3 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:41:48 +0200 Subject: [PATCH 12/25] libsaxsimage: Use target_include_directories() etc. Don't call include_directories() for libraries which have INTERFACE_INCLUDE_DIRECTORIES set --- libsaxsimage/ChangeLog | 6 ++++++ libsaxsimage/src/CMakeLists.txt | 23 ++++++----------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/libsaxsimage/ChangeLog b/libsaxsimage/ChangeLog index d248634..7c1ce41 100644 --- a/libsaxsimage/ChangeLog +++ b/libsaxsimage/ChangeLog @@ -1,3 +1,9 @@ +2016-07-07 Chris Kerr + + * src/CMakeLists.txt: Use target_include_directories etc. + Don't call include_directories for libraries which + have INTERFACE_INCLUDE_DIRECTORIES set + 2015-07-13 Daniel Franke * src/hdf5.c (saxs_image_hdf5_read): Orient dimensions to match the diff --git a/libsaxsimage/src/CMakeLists.txt b/libsaxsimage/src/CMakeLists.txt index a0d5402..e6217c2 100644 --- a/libsaxsimage/src/CMakeLists.txt +++ b/libsaxsimage/src/CMakeLists.txt @@ -1,20 +1,11 @@ project (LIBSAXSIMAGE C) -# This is used for saxsproperty - is this absolutely necessary? -include_directories(${LIBSAXSDOCUMENT_SOURCE_DIR}) - -include_directories (${LIBTIFF_INCLUDE_DIR} - ${CBFLIB_SOURCE_DIR}) - set (SOURCES saxsimage.c saxsimage_format.c cbf.c msk.c tiff.c) -set (HEADERS saxsimage.h - saxsimage_format.h) - set (LIBRARIES saxsdocument cbf) @@ -25,26 +16,24 @@ set (LIBRARIES ${LIBRARIES} ${LIBTIFF_LIBRARIES}) # conditional sources if (TARGET edf) add_definitions (-DHAVE_EDF) - include_directories (${EDFPACK_SOURCE_DIR}) set (LIBRARIES ${LIBRARIES} edf) set (SOURCES ${SOURCES} edf.c) endif (TARGET edf) if (TARGET h5zlz4) - # find_package is needed again because the find_package - # in external/h5zlz4 does not set variables in its - # parent directories - find_package (HDF5) add_definitions (-DHAVE_HDF5) - include_directories (${HDF5_SOURCE_DIR}) - set (LIBRARIES ${LIBRARIES} ${HDF5_LIBRARIES}) set (SOURCES ${SOURCES} hdf5.c) + # N.B. not sure if this is the right thing to do + # perhaps h5zlz4 should not be linked but rather loaded as a plugin + set (LIBRARIES ${LIBRARIES} h5zlz4) endif (TARGET h5zlz4) add_shared_library (saxsimage - SOURCES ${HEADERS} ${SOURCES} + SOURCES ${SOURCES} LIBRARIES ${LIBRARIES} VERSION 1) +target_include_directories(saxsimage PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" + PRIVATE ${LIBTIFF_INCLUDE_DIR}) install_library (TARGETS saxsimage) From b16dda28e0b119d55590f1c41c68a9a4546d47e4 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:42:52 +0200 Subject: [PATCH 13/25] fsaxsimage: Add INTERFACE_INCLUDE_DIRECTORY for the Fortran module output dir --- libsaxsimage/ChangeLog | 4 ++++ libsaxsimage/fortran/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/libsaxsimage/ChangeLog b/libsaxsimage/ChangeLog index 7c1ce41..ed9c2de 100644 --- a/libsaxsimage/ChangeLog +++ b/libsaxsimage/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * fortran/CMakeLists.txt: Add INTERFACE_INCLUDE_DIRECTORY for the Fortran module output directory + 2016-07-07 Chris Kerr * src/CMakeLists.txt: Use target_include_directories etc. diff --git a/libsaxsimage/fortran/CMakeLists.txt b/libsaxsimage/fortran/CMakeLists.txt index a2de18e..4ca2152 100644 --- a/libsaxsimage/fortran/CMakeLists.txt +++ b/libsaxsimage/fortran/CMakeLists.txt @@ -6,5 +6,6 @@ if (CMAKE_Fortran_COMPILER_WORKS) SOURCES fsaxsimage.f90 LIBRARIES saxsimage) + target_include_directories(fsaxsimage INTERFACE "${CMAKE_Fortran_MODULE_DIRECTORY}") endif (CMAKE_Fortran_COMPILER_WORKS) From d10491285c63b80d324dd48ef32ddcc26e884954 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:46:05 +0200 Subject: [PATCH 14/25] libsaxsview: Use target_include_directories() etc. Don't call include_directories() for libraries which have INTERFACE_INCLUDE_DIRECTORIES set --- libsaxsview/CMakeLists.txt | 13 ++++--------- libsaxsview/ChangeLog | 6 ++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libsaxsview/CMakeLists.txt b/libsaxsview/CMakeLists.txt index 9d890e6..f3c8c78 100644 --- a/libsaxsview/CMakeLists.txt +++ b/libsaxsview/CMakeLists.txt @@ -24,20 +24,15 @@ qt4_wrap_cpp (MOC ${HEADERS}) qt4_add_resources (RES resources/saxsview.qrc) -# out-of-source builds need to include the ${CMAKE_CURRENT_*_DIR} -include_directories (${LIBSAXSDOCUMENT_SOURCE_DIR} - ${LIBSAXSIMAGE_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${QWT_SOURCE_DIR} - ${QTPROPERTYBROWSER_SOURCE_DIR} - ${MUPARSER_SOURCE_DIR}) + add_shared_library (saxsview - SOURCES ${SOURCES} ${HEADERS} ${MOC} ${RES} + SOURCES ${SOURCES} ${MOC} ${RES} LIBRARIES saxsdocument saxsimage muparser qwt qtpropertybrowser ${QT_LIBRARIES} VERSION 1) +target_include_directories(saxsview PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) install_library (TARGETS saxsview) diff --git a/libsaxsview/ChangeLog b/libsaxsview/ChangeLog index cd75302..25b4cea 100644 --- a/libsaxsview/ChangeLog +++ b/libsaxsview/ChangeLog @@ -1,3 +1,9 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use target_include_directories etc. + Don't call include_directories for libraries which + have INTERFACE_INCLUDE_DIRECTORIES set + 2015-02-11 Daniel Franke * saxsview_image.cpp (SaxsviewFrameData): Updated set_size call. From 65513ba51536652ec8e573f378f73f73062f2832 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:49:11 +0200 Subject: [PATCH 15/25] svconv: include_directories() no longer needed --- saxsview/svconv/CMakeLists.txt | 3 --- saxsview/svconv/ChangeLog | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/saxsview/svconv/CMakeLists.txt b/saxsview/svconv/CMakeLists.txt index 436c750..8000b87 100644 --- a/saxsview/svconv/CMakeLists.txt +++ b/saxsview/svconv/CMakeLists.txt @@ -1,7 +1,4 @@ -include_directories (${LIBSAXSDOCUMENT_SOURCE_DIR} - ${LIBSAXSIMAGE_SOURCE_DIR}) - add_application (svconv SOURCES svconv.cpp LIBRARIES saxsdocument saxsimage m) diff --git a/saxsview/svconv/ChangeLog b/saxsview/svconv/ChangeLog index ce51510..729e5ed 100644 --- a/saxsview/svconv/ChangeLog +++ b/saxsview/svconv/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: include_directories() no longer needed + 2012-09-27 Daniel Franke * CMakeLists.txt: Explicitely link libm for those who need it. From 9b191e622504b011c4ad3f7cf74e0400a166f2f3 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:50:13 +0200 Subject: [PATCH 16/25] svimage: include_directories() no longer needed --- saxsview/svimage/CMakeLists.txt | 6 ------ saxsview/svimage/ChangeLog | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/saxsview/svimage/CMakeLists.txt b/saxsview/svimage/CMakeLists.txt index e1845ae..1b89272 100644 --- a/saxsview/svimage/CMakeLists.txt +++ b/saxsview/svimage/CMakeLists.txt @@ -1,10 +1,4 @@ -include_directories (${QWT_SOURCE_DIR} - ${QTPROPERTYBROWSER_SOURCE_DIR} - ${LIBSAXSDOCUMENT_SOURCE_DIR} - ${LIBSAXSIMAGE_SOURCE_DIR} - ${LIBSAXSVIEW_SOURCE_DIR}) - set (svimage_headers svimagemainwindow.h svimagesubwindow.h svimagepropertydockwidget.h diff --git a/saxsview/svimage/ChangeLog b/saxsview/svimage/ChangeLog index 1e8adda..a55c348 100644 --- a/saxsview/svimage/ChangeLog +++ b/saxsview/svimage/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: include_directories() no longer needed + 2013-04-19 Daniel Franke * svimagesubwindow.cpp (ImagePicker): Updated to match changes in qwt. From 6f671e53f140616666ff5b4f14a7da2ae80b35fe Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:51:17 +0200 Subject: [PATCH 17/25] svimage: Use AUTOMOC --- saxsview/svimage/CMakeLists.txt | 10 ++-------- saxsview/svimage/ChangeLog | 4 ++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/saxsview/svimage/CMakeLists.txt b/saxsview/svimage/CMakeLists.txt index 1b89272..918bc6f 100644 --- a/saxsview/svimage/CMakeLists.txt +++ b/saxsview/svimage/CMakeLists.txt @@ -1,21 +1,15 @@ -set (svimage_headers svimagemainwindow.h - svimagesubwindow.h - svimagepropertydockwidget.h - svimagemaskthresholdsdialog.h) - set (svimage_sources main.cpp svimagemainwindow.cpp svimagesubwindow.cpp svimagepropertydockwidget.cpp svimagemaskthresholdsdialog.cpp) -qt4_wrap_cpp (svimage_moc ${svimage_headers}) - add_application (svimage - SOURCES ${svimage_headers} ${svimage_sources} ${svimage_moc} + SOURCES ${svimage_sources} LIBRARIES saxsview ${QT_LIBRARIES} m GUI) +set_target_properties(svimage PROPERTIES AUTOMOC On) install_application (TARGETS svimage) install_dependencies (svimage) diff --git a/saxsview/svimage/ChangeLog b/saxsview/svimage/ChangeLog index a55c348..f8cee9b 100644 --- a/saxsview/svimage/ChangeLog +++ b/saxsview/svimage/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use AUTOMOC + 2016-07-07 Chris Kerr * CMakeLists.txt: include_directories() no longer needed From 25f672df15ba754b13b7b5614c7e69e0bf7d84fa Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:52:12 +0200 Subject: [PATCH 18/25] svplot: include_directories() no longer needed --- saxsview/svplot/CMakeLists.txt | 6 ------ saxsview/svplot/ChangeLog | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/saxsview/svplot/CMakeLists.txt b/saxsview/svplot/CMakeLists.txt index 38c2f01..0624b8c 100644 --- a/saxsview/svplot/CMakeLists.txt +++ b/saxsview/svplot/CMakeLists.txt @@ -1,10 +1,4 @@ -include_directories (${QWT_SOURCE_DIR} - ${QTPROPERTYBROWSER_SOURCE_DIR} - ${LIBSAXSDOCUMENT_SOURCE_DIR} - ${LIBSAXSIMAGE_SOURCE_DIR} - ${LIBSAXSVIEW_SOURCE_DIR}) - set (svplot_headers svplotmainwindow.h svplotsubwindow.h svplotfiledockwidget.h diff --git a/saxsview/svplot/ChangeLog b/saxsview/svplot/ChangeLog index 7b5dd4c..5485f58 100644 --- a/saxsview/svplot/ChangeLog +++ b/saxsview/svplot/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: include_directories() no longer needed + 2013-04-16 Daniel Franke * svplotmainwindow.cpp (eventFilter): Check return values of From 0fc785110a652d6036e30d589c85a1df25ea6bc1 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 15:55:58 +0200 Subject: [PATCH 19/25] svplot: Use AUTOMOC --- saxsview/svplot/CMakeLists.txt | 12 ++---------- saxsview/svplot/ChangeLog | 4 ++++ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/saxsview/svplot/CMakeLists.txt b/saxsview/svplot/CMakeLists.txt index 0624b8c..2c13f6e 100644 --- a/saxsview/svplot/CMakeLists.txt +++ b/saxsview/svplot/CMakeLists.txt @@ -1,11 +1,4 @@ -set (svplot_headers svplotmainwindow.h - svplotsubwindow.h - svplotfiledockwidget.h - svplotfilebrowserdockwidget.h - svplotpropertydockwidget.h - svplotproject.h) - set (svplot_sources main.cpp svplotmainwindow.cpp svplotsubwindow.cpp @@ -14,12 +7,11 @@ set (svplot_sources main.cpp svplotpropertydockwidget.cpp svplotproject.cpp) -qt4_wrap_cpp (svplot_moc ${svplot_headers}) - add_application (svplot - SOURCES ${svplot_headers} ${svplot_moc} ${svplot_sources} + SOURCES ${svplot_sources} LIBRARIES saxsview saxsdocument m GUI) +set_target_properties(svplot PROPERTIES AUTOMOC On) install_application (TARGETS svplot) install_dependencies (svplot) diff --git a/saxsview/svplot/ChangeLog b/saxsview/svplot/ChangeLog index 5485f58..d4d052e 100644 --- a/saxsview/svplot/ChangeLog +++ b/saxsview/svplot/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use AUTOMOC + 2016-07-07 Chris Kerr * CMakeLists.txt: include_directories() no longer needed From a063abe601035a531f8cc23cc24a39a0d503544a Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 16:11:42 +0200 Subject: [PATCH 20/25] external/libtiff: Use target_include_directories etc --- external/tiff/CMakeLists.txt | 18 ++++++------------ external/tiff/ChangeLog | 5 +++++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/external/tiff/CMakeLists.txt b/external/tiff/CMakeLists.txt index 9f05cf5..b95c64a 100644 --- a/external/tiff/CMakeLists.txt +++ b/external/tiff/CMakeLists.txt @@ -3,7 +3,6 @@ find_package (TIFF) if (TIFF_FOUND) set (LIBTIFF_LIBRARIES ${TIFF_LIBRARY} CACHE FILEPATH "") - set (LIBTIFF_INCLUDE_DIR ${TIFF_INCLUDE_DIR} CACHE PATH "") else (TIFF_FOUND) @@ -22,9 +21,6 @@ else (TIFF_FOUND) tif_dirread.c tif_dirinfo.c tif_dir.c tif_compress.c tif_color.c tif_codec.c tif_close.c tif_aux.c) - set (LIBTIFF_HEADERS t4.h tif_dir.h tiff.h tiffio.h uvcode.h - tif_fax3.h tiffiop.h tif_predict.h tiffvers.h) - set (LIBTIFF_EXTRA_LIBS) if (JPEG_FOUND) @@ -52,8 +48,8 @@ else (TIFF_FOUND) configure_file (tif_config.apple.h tif_config.h COPYONLY) configure_file (tiffconf.apple.h tiffconf.h COPYONLY) - # Use tif_unix.c, not tif_apple.c, the latter results in - # some strange compile errors?! Works anyway. + # Use tif_unix.c, not tif_apple.c, the latter results in + # some strange compile errors?! Works anyway. set(LIBTIFF_SOURCES ${LIBTIFF_SOURCES} tif_unix.c) set (LIBTIFF_HEADERS ${LIBTIFF_HEADERS} tif_config.h) @@ -61,9 +57,6 @@ else (TIFF_FOUND) set (LIBTIFF_SOURCES ${LIBTIFF_SOURCES} tif_unix.c) endif(WIN32) - - include_directories (${LIBTIFF_BINARY_DIR}) - # # This target should be called 'tiff', but on MacOS, while there is no system # libtiff cmake could find, there is libTIFF in the ApplicationServices framework @@ -72,14 +65,15 @@ else (TIFF_FOUND) # this libtiff libtiff3 instead and all works. # add_shared_library (tiff3 - SOURCES ${LIBTIFF_HEADERS} ${LIBTIFF_SOURCES} + SOURCES ${LIBTIFF_SOURCES} LIBRARIES ${LIBTIFF_EXTRA_LIBS} VERSION 3.9.6) + target_include_directories(tiff3 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" + PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") install_library (TARGETS tiff3) - set (LIBTIFF_LIBRARIES tiff3 CACHE FILEPATH "") - set (LIBTIFF_INCLUDE_DIR ${LIBTIFF_SOURCE_DIR} ${LIBTIFF_BINARY_DIR} CACHE PATH "") + set (LIBTIFF_LIBRARIES tiff3 CACHE FILEPATH "") endif (TIFF_FOUND) diff --git a/external/tiff/ChangeLog b/external/tiff/ChangeLog index c165938..715a750 100644 --- a/external/tiff/ChangeLog +++ b/external/tiff/ChangeLog @@ -1,3 +1,8 @@ +2016-07-07 Chris Kerr + + * CMakeLists.txt: Use target_include_directories etc + find_package(TIFF) already sets this property on the found TIFF library + 2012-07-09 Daniel Franke * tif_config.win32.h: New. From c4ae2007261c657ae7fbe4008629ac513218d20c Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Thu, 7 Jul 2016 16:12:45 +0200 Subject: [PATCH 21/25] libsaxsimage: No need to add LIBTIFF to include_directories() --- libsaxsimage/ChangeLog | 4 ++++ libsaxsimage/src/CMakeLists.txt | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libsaxsimage/ChangeLog b/libsaxsimage/ChangeLog index ed9c2de..99f0f13 100644 --- a/libsaxsimage/ChangeLog +++ b/libsaxsimage/ChangeLog @@ -1,3 +1,7 @@ +2016-07-07 Chris Kerr + + * src/CMakeLists.txt: No need to add LIBTIFF to include_directories() + 2016-07-07 Chris Kerr * fortran/CMakeLists.txt: Add INTERFACE_INCLUDE_DIRECTORY for the Fortran module output directory diff --git a/libsaxsimage/src/CMakeLists.txt b/libsaxsimage/src/CMakeLists.txt index e6217c2..481b32f 100644 --- a/libsaxsimage/src/CMakeLists.txt +++ b/libsaxsimage/src/CMakeLists.txt @@ -33,7 +33,6 @@ add_shared_library (saxsimage SOURCES ${SOURCES} LIBRARIES ${LIBRARIES} VERSION 1) -target_include_directories(saxsimage PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" - PRIVATE ${LIBTIFF_INCLUDE_DIR}) +target_include_directories(saxsimage PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") install_library (TARGETS saxsimage) From 3242b3ba4b776c67d5289e68f83d809a298e00e7 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Fri, 25 Nov 2016 17:17:39 +0100 Subject: [PATCH 22/25] Request a newer Ubuntu version in .travis.yml to get a new enough CMake --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 51859f4..df21851 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,8 @@ +# We need a newer version of CMake than is installed on Ubuntu 12.04 +# Therefore request to use Ubuntu 14.04 instead +dist: trusty +sudo: false + language: c compiler: gcc From 355534623efc67342b681f34d975fcb3b7e49e87 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Fri, 25 Nov 2016 17:25:19 +0100 Subject: [PATCH 23/25] Work around: `gfortran` package is not allowed but `gfortran-4.8` is --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index df21851..8fb47c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,12 @@ language: c compiler: gcc +# N.B. `gfortran` is not allowed but `gfortran-4.8` is ?!? addons: apt: packages: - cmake - - gfortran + - gfortran-4.8 before_script: - mkdir build From 61a3c85cc78c6546d6a320f723df35bd22936ddd Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Mon, 5 Dec 2016 10:20:46 +0100 Subject: [PATCH 24/25] Updated the Fortran readtest code to use modern CMake Also needed to update the CMakeLists for fsaxsdocument itself, to account for CMAKE_Fortran_MODULE_DIRECTORY not being set --- libsaxsdocument/fortran/CMakeLists.txt | 6 +++++- testsuite/fsaxsdocument/CMakeLists.txt | 10 +++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libsaxsdocument/fortran/CMakeLists.txt b/libsaxsdocument/fortran/CMakeLists.txt index 9d9bf73..e6d3e53 100644 --- a/libsaxsdocument/fortran/CMakeLists.txt +++ b/libsaxsdocument/fortran/CMakeLists.txt @@ -6,6 +6,10 @@ if (CMAKE_Fortran_COMPILER_WORKS) SOURCES fsaxsdocument.f90 LIBRARIES saxsdocument) - target_include_directories(fsaxsdocument INTERFACE "${CMAKE_Fortran_MODULE_DIRECTORY}") + if (DEFINED CMAKE_Fortran_MODULE_DIRECTORY) + target_include_directories(fsaxsdocument INTERFACE "${CMAKE_Fortran_MODULE_DIRECTORY}") + else() + target_include_directories(fsaxsdocument INTERFACE "${CMAKE_CURRENT_BINARY_DIR}") + endif() endif (CMAKE_Fortran_COMPILER_WORKS) diff --git a/testsuite/fsaxsdocument/CMakeLists.txt b/testsuite/fsaxsdocument/CMakeLists.txt index 40aa394..9674ae7 100644 --- a/testsuite/fsaxsdocument/CMakeLists.txt +++ b/testsuite/fsaxsdocument/CMakeLists.txt @@ -2,17 +2,13 @@ enable_language(Fortran OPTIONAL) if (TARGET fsaxsdocument) - ## Set up include_directories() for the Fortran modules - ## TODO: do this with target_include_directories() - include_directories("${SAXSVIEW_BINARY_DIR}/libsaxsdocument/fortran") - - ## compiler flags to enable SIGFPE exceptions - ## TODO: use target_compile_options() - set(CMAKE_Fortran_COMPILER_FLAGS "${CMAKE_Fortran_COMPILER_FLAGS} -ffpe-trap=invalid,zero,overflow") add_executable(ftnreadtest readtest.f90) target_link_libraries(ftnreadtest fsaxsdocument) + ## compiler flags to enable SIGFPE exceptions + target_compile_options(ftnreadtest PRIVATE "-ffpe-trap=invalid,zero,overflow") + add_test (NAME read-columns-nan-inf COMMAND $ "${CMAKE_CURRENT_SOURCE_DIR}/columns-bad.dat") set_property (TEST read-columns-nan-inf PROPERTY PASS_REGULAR_EXPRESSION "Result: *0") From e10fe66660f7abd0660783a89556ecd56a25d9d7 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Mon, 19 Dec 2016 16:16:51 +0100 Subject: [PATCH 25/25] Use gfortran in .travis.yml A recent update to the Travis-CI allowed packages means that now I can require gfortran to be installed for the Trusty CI build. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4881c61..c3758fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,11 @@ cache: ccache compiler: gcc -# N.B. `gfortran` is not allowed but `gfortran-4.8` is ?!? addons: apt: packages: - cmake - - gfortran-4.8 + - gfortran before_script: - mkdir build