diff --git a/.gitattributes b/.gitattributes index 00f10aea77ef536712309f8162f02311a1a80d37..4f764221441bd5e73c9fefae00586aba96bfa7a2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -274,7 +274,6 @@ LCS/Blob/test/tBlobField.in_be -text svneol=unset#unset LCS/Blob/test/tBlobField.in_le -text svneol=unset#unset LCS/Blob/test/tBlobStream.in_be -text svneol=unset#unset LCS/Blob/test/tBlobStream.in_le -text svneol=unset#unset -LCS/CMakeLists.txt -text LCS/Common/config.h.cmake -text LCS/Common/src/Common-Model.cat -text LCS/LACE/bootstrap -text @@ -471,7 +470,6 @@ MAC/GCF/RTDB/test/readScript.ctl -text MAC/GCF/RTDB/test/writeScript.ctl -text MAC/GCF/TM/Makefile.am -text svneol=native#application/octet-stream MAC/GCF/TM/bootstrap -text svneol=native#application/octet-stream -MAC/GCF/TM/src/Makefile.am -text svneol=native#application/octet-stream MAC/GCF/TM/test/Echo_Protocol.prot -text svneol=native#application/octet-stream MAC/GCF/TM/test/tGCFTask1.cc -text MAC/GCF/TM/test/tGCFTask2.cc -text @@ -997,7 +995,6 @@ MAC/_System/lofar30.sysconf -text svneol=native#application/octet-stream MAC/bootstrap -text svneol=native#application/octet-stream MAC/lofarconf.in -text svneol=native#application/octet-stream RTCP/CNProc/bootstrap -text -RTCP/CNProc/lofar_config.h.cmake -text RTCP/CNProc/src/ArenaMapping.h -text RTCP/CNProc/src/BeamFormer.cc -text RTCP/CNProc/src/BeamFormer.h -text @@ -1010,9 +1007,7 @@ RTCP/CNProc/src/PencilBeams.h -text RTCP/CNProc/src/Stokes.cc -text RTCP/CNProc/src/Stokes.h -text RTCP/FCNP/bootstrap -text -RTCP/FCNP/lofar_config.h.cmake -text RTCP/IONProc/bootstrap -text -RTCP/IONProc/lofar_config.h.cmake -text RTCP/IONProc/test/CMakeLists.txt -text RTCP/IONProc/test/Makefile.am -text RTCP/IONProc/test/tDelayCompensation.cc -text @@ -1025,7 +1020,6 @@ RTCP/Interface/include/Interface/PencilCoordinates.h -text RTCP/Interface/include/Interface/PipelineOutput.h -text RTCP/Interface/include/Interface/StokesData.h -text RTCP/Interface/include/Interface/StreamableData.h -text -RTCP/Interface/lofar_config.h.cmake -text RTCP/Interface/src/CN_Mode.cc -text RTCP/Interface/src/PencilCoordinates.cc -text RTCP/LofarStMan/bootstrap -text @@ -1056,7 +1050,6 @@ RTCP/Storage/include/Storage/MSWriterFile.h -text RTCP/Storage/include/Storage/MSWriterNull.h -text RTCP/Storage/include/Storage/MeasurementSetFormat.h -text RTCP/Storage/include/Storage/RTStorage.h -text -RTCP/Storage/lofar_config.h.cmake -text RTCP/Storage/src/Format.cc -text RTCP/Storage/src/MSWriterCasa.cc -text RTCP/Storage/src/MSWriterFile.cc -text @@ -1446,7 +1439,6 @@ autoconf_share/variants.bgfen0 -text autoconf_share/variants.frontend-4 -text autoconf_share/variants.kis001 -text autoconf_share/variants.lioffen -text -/config.h.cmake -text doc/UML/CPA-Packages-Model.mdl -text doc/papers/2008/IEEE-SIG/LBA_calibrated.png -text doc/papers/2008/IEEE-SIG/LBA_observed.png -text diff --git a/CEP/CMakeLists.txt b/CEP/CMakeLists.txt index a9d3621eea9df9abf5b23435ffa24bf508fbd600..b7cb34782cc774ec760539f442ece39d56ca1905 100644 --- a/CEP/CMakeLists.txt +++ b/CEP/CMakeLists.txt @@ -34,14 +34,14 @@ include(LofarGeneral) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(MWCommon) -add_subdirectory(MS) -add_subdirectory(ParmDB) -add_subdirectory(Calibration) -#add_subdirectory(DP3) -#add_subdirectory(Imager) -#add_subdirectory(Pipeline) -#add_subdirectory(pyparmdb) +lofar_add_subdirectory(MWCommon) +lofar_add_subdirectory(MS) +lofar_add_subdirectory(ParmDB) +lofar_add_subdirectory(Calibration) +lofar_add_subdirectory(DP3) +lofar_add_subdirectory(Imager) +lofar_add_subdirectory(Pipeline) +#lofar_add_subdirectory(pyparmdb) ## --------------------------------------------------------------------------- ## Generate configuration header file. diff --git a/CEP/Calibration/BBSControl/include/BBSControl/CMakeLists.txt b/CEP/Calibration/BBSControl/include/BBSControl/CMakeLists.txt index a5b5553a6e061705861a9d20dec0a1b02408205e..d412d43f47397cbb217eb2d53b92d4f4cccd5898 100644 --- a/CEP/Calibration/BBSControl/include/BBSControl/CMakeLists.txt +++ b/CEP/Calibration/BBSControl/include/BBSControl/CMakeLists.txt @@ -62,3 +62,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/CEP/Calibration/BBSControl/src/CMakeLists.txt b/CEP/Calibration/BBSControl/src/CMakeLists.txt index 714ee071542b6b88b51ebc9dde3eab235903cb1f..dae0f036090708d9736a55d423317f821f6a6182 100644 --- a/CEP/Calibration/BBSControl/src/CMakeLists.txt +++ b/CEP/Calibration/BBSControl/src/CMakeLists.txt @@ -64,7 +64,7 @@ set(bbscontrol_PROGRAMS lofar_add_library(bbscontrol ${bbscontrol_LIB_SRCS}) foreach(prog ${bbscontrol_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) + lofar_add_bin_program(${prog} ${prog}.cc) endforeach(prog ${bbscontrol_PROGRAMS}) install(PROGRAMS diff --git a/CEP/Calibration/BBSKernel/include/BBSKernel/CMakeLists.txt b/CEP/Calibration/BBSKernel/include/BBSKernel/CMakeLists.txt index 7bde594d55ed28de5374897b052fd94cf6ee454a..c37ab0190aa806923e91416c12e53831297993c6 100644 --- a/CEP/Calibration/BBSKernel/include/BBSKernel/CMakeLists.txt +++ b/CEP/Calibration/BBSKernel/include/BBSKernel/CMakeLists.txt @@ -89,3 +89,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/CEP/Calibration/BBSKernel/src/CMakeLists.txt b/CEP/Calibration/BBSKernel/src/CMakeLists.txt index cd20c434a0c9da895c5112360f4016ccdb497555..d196c03ee365ddbeca3883fffb24a6349e4fe17b 100644 --- a/CEP/Calibration/BBSKernel/src/CMakeLists.txt +++ b/CEP/Calibration/BBSKernel/src/CMakeLists.txt @@ -84,5 +84,5 @@ set(bbskernel_PROGRAMS lofar_add_library(bbskernel ${bbskernel_LIB_SRCS}) foreach(prog ${bbskernel_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) + lofar_add_bin_program(${prog} ${prog}.cc) endforeach(prog ${bbskernel_PROGRAMS}) diff --git a/CEP/Calibration/CMakeLists.txt b/CEP/Calibration/CMakeLists.txt index 99010fd7c6e908e250e6bb871901a7972b1ab8ab..26991fb4d485b372d117a7ee5ec683bcf8648011 100644 --- a/CEP/Calibration/CMakeLists.txt +++ b/CEP/Calibration/CMakeLists.txt @@ -34,8 +34,8 @@ include(LofarGeneral) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(BBSKernel) -add_subdirectory(BBSControl) +lofar_add_subdirectory(BBSKernel) +lofar_add_subdirectory(BBSControl) ## --------------------------------------------------------------------------- ## Generate configuration header file. diff --git a/CEP/DP3/CMakeLists.txt b/CEP/DP3/CMakeLists.txt index af763783f15256e0ea4abfa45e09fde6ee2bd2b9..bde180eae0f86a9e8d870664de8616512e007aa2 100644 --- a/CEP/DP3/CMakeLists.txt +++ b/CEP/DP3/CMakeLists.txt @@ -34,8 +34,8 @@ include(LofarGeneral) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(DPPP) -add_subdirectory(SPWCombine) +lofar_add_subdirectory(DPPP) +lofar_add_subdirectory(SPWCombine) ## --------------------------------------------------------------------------- ## Generate configuration header file. diff --git a/CEP/DP3/DPPP/CMakeLists.txt b/CEP/DP3/DPPP/CMakeLists.txt index 139152666d276cfa303060bee5097d24631a19dc..e1ffb0f02c061752016f0043cc2126c51450752f 100644 --- a/CEP/DP3/DPPP/CMakeLists.txt +++ b/CEP/DP3/DPPP/CMakeLists.txt @@ -32,7 +32,7 @@ project(DPPP) include(LofarGeneral) include(LofarAddPackage) -lofar_add_package(${PROJECT_NAME} 1.0 DEPENDS Common PLC) +lofar_add_package(${PROJECT_NAME} 1.0 DEPENDS Common MS PLC) ## --------------------------------------------------------------------------- ## External packages @@ -48,6 +48,6 @@ include(LofarConfig) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(include/CS1_pp_lib) +add_subdirectory(include/DPPP) add_subdirectory(src) add_subdirectory(test) diff --git a/CEP/DP3/DPPP/src/CMakeLists.txt b/CEP/DP3/DPPP/src/CMakeLists.txt index db0c07903cd86b9ec0e0d68ed3083d93d56cbb86..10287ac3dd3db2a5d61cc13b8b293a528ffb475f 100644 --- a/CEP/DP3/DPPP/src/CMakeLists.txt +++ b/CEP/DP3/DPPP/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(dppp_LIB_SRCS +lofar_add_library(dppp Package__Version.cc FlaggerStatistics.cc MsInfo.cc @@ -35,12 +35,5 @@ set(dppp_LIB_SRCS RunDetails.cc Pipeline.cc) -set(dppp_PROGRAMS - versioncs1_pp_lib - CS1_IDPPP -) - -lofar_add_library(dppp ${dppp_LIB_SRCS}) - -lofar_add_executable(CS1_IDPPP IDPPP.cc PipelineProcessControl.cc) -lofar_add_executable(versioncs1_pp_lib versiondppp.cc) +lofar_add_bin_program(CS1_IDPPP IDPPP.cc PipelineProcessControl.cc) +lofar_add_bin_program(versiondppp versiondppp.cc) diff --git a/CEP/Imager/CMakeLists.txt b/CEP/Imager/CMakeLists.txt index 1e18ab2781a23c2bc5d08187bc84f94e5b70dc69..750415e1796fc528e87574f53cf70f4bd0e8355f 100644 --- a/CEP/Imager/CMakeLists.txt +++ b/CEP/Imager/CMakeLists.txt @@ -34,8 +34,8 @@ include(LofarGeneral) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(MWControl) -#add_subdirectory(MWImager) +lofar_add_subdirectory(MWControl) +lofar_add_subdirectory(MWImager) ## --------------------------------------------------------------------------- ## Generate configuration header file. diff --git a/CEP/Imager/MWControl/include/MWControl/CMakeLists.txt b/CEP/Imager/MWControl/include/MWControl/CMakeLists.txt index 1adba3b44bd3235561a3c6ffc4bf81b7a692617c..04f83650621c66de74ff935f29cf00fe7f3dcf18 100644 --- a/CEP/Imager/MWControl/include/MWControl/CMakeLists.txt +++ b/CEP/Imager/MWControl/include/MWControl/CMakeLists.txt @@ -39,3 +39,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/CEP/Imager/MWControl/src/CMakeLists.txt b/CEP/Imager/MWControl/src/CMakeLists.txt index dfa99517ee8865a7d6f3dce6a75a430784c1aa49..6a5739f94e8da0b431b5aea95e9688e60141f164 100644 --- a/CEP/Imager/MWControl/src/CMakeLists.txt +++ b/CEP/Imager/MWControl/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(mwcontrol_LIB_SRCS +lofar_add_library(mwcontrol Package__Version.cc MWGlobalSpec.cc MWLocalSpec.cc @@ -33,6 +33,4 @@ set(mwcontrol_LIB_SRCS SolverBBS.cc SolverProxy.cc) -lofar_add_library(mwcontrol ${mwcontrol_LIB_SRCS}) - -lofar_add_executable(versionmwcontrol versionmwcontrol.cc) +lofar_add_bin_program(versionmwcontrol versionmwcontrol.cc) diff --git a/CEP/MS/include/MS/CMakeLists.txt b/CEP/MS/include/MS/CMakeLists.txt index dd49b965675f0f7b0d002fc5ea1d101025c03cd1..68cc7248120e75d07c190b46b9d5377650a8620c 100644 --- a/CEP/MS/include/MS/CMakeLists.txt +++ b/CEP/MS/include/MS/CMakeLists.txt @@ -30,3 +30,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/CEP/MS/src/CMakeLists.txt b/CEP/MS/src/CMakeLists.txt index 0b64df554386c22055710c03d7195f64c6d17163..a87e22a0b8a241b949b668e81fa9d99018043365 100644 --- a/CEP/MS/src/CMakeLists.txt +++ b/CEP/MS/src/CMakeLists.txt @@ -36,7 +36,7 @@ set(ms_PROGRAMS lofar_add_library(ms ${ms_LIB_SRCS}) foreach(prog ${ms_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) + lofar_add_bin_program(${prog} ${prog}.cc) endforeach(prog ${ms_PROGRAMS}) install(PROGRAMS diff --git a/CEP/MWCommon/include/MWCommon/CMakeLists.txt b/CEP/MWCommon/include/MWCommon/CMakeLists.txt index 713c1338163c615efe73c7e6cab6be224c3508dc..997b281e0efe8db8cbe2f9705f708f0dd3b2161d 100644 --- a/CEP/MWCommon/include/MWCommon/CMakeLists.txt +++ b/CEP/MWCommon/include/MWCommon/CMakeLists.txt @@ -63,3 +63,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/CEP/MWCommon/src/CMakeLists.txt b/CEP/MWCommon/src/CMakeLists.txt index 4c4e68ff577c3e739f09aa246e0e97dd37ad6c01..ecc195aec4179ebb27ccc11f6076c81c81b5bf9e 100644 --- a/CEP/MWCommon/src/CMakeLists.txt +++ b/CEP/MWCommon/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(mwcommon_LIB_SRCS +lofar_add_library(mwcommon Package__Version.cc ClusterDesc.cc ControllerBase.cc @@ -55,10 +55,8 @@ set(mwcommon_LIB_SRCS WorkerProxy.cc WorkersDesc.cc) -lofar_add_library(mwcommon ${mwcommon_LIB_SRCS}) - -lofar_add_executable(versionmwcommon versionmwcommon.cc) -lofar_add_executable(finddproc finddproc.cc) +lofar_add_bin_program(versionmwcommon versionmwcommon.cc) +lofar_add_bin_program(finddproc finddproc.cc) install(PROGRAMS startdistproc diff --git a/CEP/ParmDB/include/ParmDB/CMakeLists.txt b/CEP/ParmDB/include/ParmDB/CMakeLists.txt index a647d1b3467ff4f3313d6e5dce543efad1bf3273..9b6865b42d6d6b9a229478eb4b28c58b7f38298a 100644 --- a/CEP/ParmDB/include/ParmDB/CMakeLists.txt +++ b/CEP/ParmDB/include/ParmDB/CMakeLists.txt @@ -49,3 +49,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/CEP/ParmDB/src/CMakeLists.txt b/CEP/ParmDB/src/CMakeLists.txt index 6a6a53a4416cd393b546028b981b1a5e5a95439b..6ad02a37a0eca8ec8e7b406ec6c94b1948891564 100644 --- a/CEP/ParmDB/src/CMakeLists.txt +++ b/CEP/ParmDB/src/CMakeLists.txt @@ -51,7 +51,7 @@ set(parmdb_PROGRAMS lofar_add_library(parmdb ${parmdb_LIB_SRCS}) foreach(prog ${parmdb_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) + lofar_add_bin_program(${prog} ${prog}.cc) endforeach(prog ${parmdb_PROGRAMS}) install(PROGRAMS diff --git a/CMake/FindBacktrace.cmake b/CMake/FindBacktrace.cmake index a4156289cfc7192f2b627fc8d064c43eee788462..d8b7a5f928e27c739e2b7163fbb7ada9bd73bb78 100644 --- a/CMake/FindBacktrace.cmake +++ b/CMake/FindBacktrace.cmake @@ -34,7 +34,6 @@ include(CheckIncludeFile) include(CheckFunctionExists) include(CheckLibraryExists) include(FindPackageHandleStandardArgs) -include(LofarMacros) if(NOT BACKTRACE_FOUND) set(BACKTRACE_LIBRARIES) @@ -48,20 +47,21 @@ if(NOT BACKTRACE_FOUND) if(BFD_LIBRARY) set(HAVE_BFD 1 CACHE INTERNAL "Have bfd library") list(APPEND BACKTRACE_LIBRARIES ${BFD_LIBRARY}) - check_include_file(demangle.h HAVE_DEMANGLE_H) - if(HAVE_DEMANGLE_H) - find_library(IBERTY_LIBRARY iberty) - set(CMAKE_REQUIRED_LIBRARIES ${IBERTY_LIBRARY}) - check_function_exists(cplus_demangle HAVE_CPLUS_DEMANGLE) - if(HAVE_CPLUS_DEMANGLE) - list(APPEND BACKTRACE_LIBRARIES ${IBERTY_LIBRARY}) - endif(HAVE_CPLUS_DEMANGLE) - endif(HAVE_DEMANGLE_H) + find_library(IBERTY_LIBRARY iberty) + if(IBERTY_LIBRARY) + list(APPEND BACKTRACE_LIBRARIES ${IBERTY_LIBRARY}) + check_include_file(demangle.h HAVE_DEMANGLE_H) + if(HAVE_DEMANGLE_H) + set(CMAKE_REQUIRED_LIBRARIES ${IBERTY_LIBRARY}) + check_function_exists(cplus_demangle HAVE_CPLUS_DEMANGLE) + endif(HAVE_DEMANGLE_H) + endif(IBERTY_LIBRARY) + # Newer version of libbfd also depend on libz. + find_library(Z_LIBRARY z) + if(Z_LIBRARY) + list(APPEND BACKTRACE_LIBRARIES ${Z_LIBRARY}) + endif(Z_LIBRARY) endif(BFD_LIBRARY) - # Newer version fo libbfd also depend on libz. We need to specify libz - # explicity when linking statically. - find_library(Z_LIBRARY z) - list_append_if(Z_LIBRARY BACKTRACE_LIBRARIES ${Z_LIBRARY}) endif(HAVE_BFD_H) endif(HAVE_BACKTRACE) endif(HAVE_EXECINFO_H) diff --git a/CMake/LofarCTest.cmake b/CMake/LofarCTest.cmake index 987f49087dbfdf53742cfc29555d5d567f637b5c..05aa23727dacfeac9930ae82ead1f496be2456b0 100644 --- a/CMake/LofarCTest.cmake +++ b/CMake/LofarCTest.cmake @@ -31,5 +31,5 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ## ---------------------------------------------------------------------------- ## Configure the LOFAR CTest wrapper script in the current binary directory ## ---------------------------------------------------------------------------- -configure_file(${LOFAR_ROOT}/autoconf_share/runctest.sh +configure_file(${LOFAR_ROOT}/autoconf_share/runctest.sh.in ${CMAKE_CURRENT_BINARY_DIR}/runctest.sh) diff --git a/CMake/LofarMacros.cmake b/CMake/LofarMacros.cmake index 21be4cae56c636e808a7b24b8c91c924aaea1251..9425629ccb3b89ab503f18663325a959a486e138 100644 --- a/CMake/LofarMacros.cmake +++ b/CMake/LofarMacros.cmake @@ -26,8 +26,10 @@ # Defines the following macros: # join_arguments(var) # list_append_if(condition var value1..valuen) +# lofar_add_bin_program(name) # lofar_add_executable(name) # lofar_add_library(name) +# lofar_add_sbin_program(name) # lofar_add_subdirectory(name) # lofar_add_test(name) # lofar_get_date(date) @@ -54,6 +56,7 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) set(${var} ${_var}) endmacro(join_arguments) + # -------------------------------------------------------------------------- # list_append_if(condition var value1..valuen) # @@ -66,6 +69,18 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) endmacro(list_append_if _cond _list) + # -------------------------------------------------------------------------- + # lofar_add_bin_program(name) + # + # Add <name> to the list of programs that need to be compiled, linked and + # installed into the <prefix>/bin directory. + # -------------------------------------------------------------------------- + macro(lofar_add_bin_program _name) + lofar_add_executable(${_name} ${ARGN}) + install(TARGETS ${_name} DESTINATION bin) + endmacro(lofar_add_bin_program _name) + + # -------------------------------------------------------------------------- # lofar_add_executable(name) # @@ -90,7 +105,7 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) # -------------------------------------------------------------------------- # lofar_add_library(name) # - # Adds a library like add_library() does. + # Add a library like add_library() does. # Furthermore: # - add the library to the list of libraries for the current project # (global property ${PROJECT_NAME}_LIBRARIES). @@ -117,6 +132,18 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) endmacro(lofar_add_library _name) + # -------------------------------------------------------------------------- + # lofar_add_sbin_program(name) + # + # Add <name> to the list of programs that need to be compiled, linked and + # installed into the <prefix>/sbin directory. + # -------------------------------------------------------------------------- + macro(lofar_add_sbin_program _name) + lofar_add_executable(${_name} ${ARGN}) + install(TARGETS ${_name} DESTINATION sbin) + endmacro(lofar_add_sbin_program _name) + + # -------------------------------------------------------------------------- # lofar_add_subdirectory(name) # @@ -156,23 +183,25 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) # it will be compiled, linked and run when you do a 'make check'. # -------------------------------------------------------------------------- macro(lofar_add_test _name) - string(REGEX REPLACE ";?DEPENDS.*" "" _srcs "${ARGN}") - string(REGEX MATCH "DEPENDS;.*" _deps "${ARGN}") - string(REGEX REPLACE "^DEPENDS;" "" _deps "${_deps}") - if(_srcs MATCHES "^.+$") - lofar_add_executable(${_name} EXCLUDE_FROM_ALL ${_srcs}) - else() - add_custom_target(${_name}) - endif(_srcs MATCHES "^.+$") - if(_deps MATCHES "^.+$") - add_dependencies(${_name} ${_deps}) - endif(_deps MATCHES "^.+$") - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_name}.sh) - add_test(${_name} ${CMAKE_CURRENT_SOURCE_DIR}/${_name}.sh) - else() - add_test(${_name} ${_name}) - endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_name}.sh) - add_dependencies(check ${_name}) + if(BUILD_TESTING) + string(REGEX REPLACE ";?DEPENDS.*" "" _srcs "${ARGN}") + string(REGEX MATCH "DEPENDS;.*" _deps "${ARGN}") + string(REGEX REPLACE "^DEPENDS;" "" _deps "${_deps}") + if(_srcs MATCHES "^.+$") + lofar_add_executable(${_name} ${_srcs}) + else() + add_custom_target(${_name}) + endif(_srcs MATCHES "^.+$") + if(_deps MATCHES "^.+$") + add_dependencies(${_name} ${_deps}) + endif(_deps MATCHES "^.+$") + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_name}.sh) + add_test(${_name} ${CMAKE_CURRENT_SOURCE_DIR}/${_name}.sh) + else() + add_test(${_name} ${_name}) + endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_name}.sh) + add_dependencies(check ${_name}) + endif(BUILD_TESTING) endmacro(lofar_add_test _name) @@ -187,6 +216,7 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) OUTPUT_STRIP_TRAILING_WHITESPACE) endmacro(lofar_get_date _date) + # -------------------------------------------------------------------------- # lofar_get_hostname(name) # @@ -198,29 +228,4 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) OUTPUT_STRIP_TRAILING_WHITESPACE) endmacro(lofar_get_hostname _hostname) - - ## ------------------------------------------------------------------------- - ## STUFF BELOW THIS LINE IS NOT BEING USED (AT THE MOMENT) - ## ------------------------------------------------------------------------- - if(0) - - # -------------------------------------------------------------------------- - # lofar_add_bin_program(name) - # -------------------------------------------------------------------------- - macro(lofar_add_bin_program _name) - lofar_add_executable(${_name}) - install(TARGETS ${_name} DESTINATION bin) - endmacro(lofar_add_bin_program _name) - - - # -------------------------------------------------------------------------- - # lofar_add_sbin_program(name) - # -------------------------------------------------------------------------- - macro(lofar_add_sbin_program _name) - lofar_add_executable(${_name}) - install(TARGETS ${_name} DESTINATION sbin) - endmacro(lofar_add_sbin_program _name) - - endif(0) - endif(NOT DEFINED LOFAR_MACROS_INCLUDED) diff --git a/CMake/LofarPackageVersion.cmake b/CMake/LofarPackageVersion.cmake index d3557de02c818012f5d1721aa6e7ebafe06d09e6..d2fa053f1140489802b7d14cdcf6a4ed5f88e017 100644 --- a/CMake/LofarPackageVersion.cmake +++ b/CMake/LofarPackageVersion.cmake @@ -15,8 +15,10 @@ endif(result) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/FillPackage__VersionInc.h" "/* Generated by CMake for project ${PROJECT_NAME} */\n\n") foreach(dep ${${PROJECT_NAME}_DEPENDENCIES}) + message(STATUS "${dep}_INCLUDE_PATH_SUFFIX = ${${dep}_INCLUDE_PATH_SUFFIX}") file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/FillPackage__VersionInc.h" - "#include <${dep}/Package__Version.h>\n") +# "#include <${dep}/Package__Version.h>\n") + "#include <${${dep}_INCLUDE_PATH_SUFFIX}/Package__Version.h>\n") endforeach(dep ${${PROJECT_NAME}_DEPENDENCIES}) # Create FillPackage__VersionFunc.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 4550bc1b00720cd25cf007fec26db0b7ba61c588..79bd9818cf244c73b2f3a811d4f0e47c4337bf34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,11 +34,11 @@ include(LofarGeneral) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(LCS) -#add_subdirectory(CEP) -#add_subdirectory(RTCP) -#add_subdirectory(SAS) -#add_subdirectory(MAC) +lofar_add_subdirectory(LCS) +lofar_add_subdirectory(CEP) +#lofar_add_subdirectory(RTCP) +lofar_add_subdirectory(SAS) +lofar_add_subdirectory(MAC) ## --------------------------------------------------------------------------- ## Generate configuration header file. diff --git a/LCS/ACC/ALC/include/ALC/CMakeLists.txt b/LCS/ACC/ALC/include/ALC/CMakeLists.txt index 28c7cddcff46b98470c5467d66168ae84c52d9c7..26b99f2b019429db20a50d7c69c01eebc7da3432 100644 --- a/LCS/ACC/ALC/include/ALC/CMakeLists.txt +++ b/LCS/ACC/ALC/include/ALC/CMakeLists.txt @@ -18,3 +18,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/ACC/ALC/src/CMakeLists.txt b/LCS/ACC/ALC/src/CMakeLists.txt index 761fc0745d3996b2639e9f6b65b8d89b5e79f796..42209b3299c5c8eb4fe0fa547d5a8eb6ce3500ae 100644 --- a/LCS/ACC/ALC/src/CMakeLists.txt +++ b/LCS/ACC/ALC/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(alc_LIB_SRCS +lofar_add_library(alc Package__Version.cc ACCmd.cc DH_ApplControl.cc @@ -30,12 +30,4 @@ set(alc_LIB_SRCS ACAsyncClient.cc ApplControlServer.cc) -set(alc_PROGRAMS - versionalc -) - -lofar_add_library(alc ${alc_LIB_SRCS}) - -foreach(prog ${alc_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) -endforeach(prog ${alc_PROGRAMS}) +lofar_add_bin_program(versionalc versionalc.cc) diff --git a/LCS/ACC/PLC/include/PLC/CMakeLists.txt b/LCS/ACC/PLC/include/PLC/CMakeLists.txt index 29b1ad8d8d7223b3cea465eb1bdf752820bc2431..cee0455bc68e6461097e53748d486fa4cf26a173 100644 --- a/LCS/ACC/PLC/include/PLC/CMakeLists.txt +++ b/LCS/ACC/PLC/include/PLC/CMakeLists.txt @@ -18,3 +18,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/ACC/PLC/src/CMakeLists.txt b/LCS/ACC/PLC/src/CMakeLists.txt index 38cfa68b6fad96b9577871d5eec8684f232ab735..550e8c2a77f06385e1cb573049ee379891e47acb 100644 --- a/LCS/ACC/PLC/src/CMakeLists.txt +++ b/LCS/ACC/PLC/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(plc_LIB_SRCS +lofar_add_library(plc Package__Version.cc DH_ProcControl.cc PCCmd.cc @@ -31,11 +31,4 @@ set(plc_LIB_SRCS ProcCtrlRemote.cc ACCmain.cc) -set(plc_PROGRAMS - versionplc) - -lofar_add_library(plc ${plc_LIB_SRCS}) - -foreach(prog ${plc_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) -endforeach(prog ${plc_PROGRAMS}) +lofar_add_bin_program(versionplc versionplc.cc) diff --git a/LCS/AMC/AMCBase/include/AMCBase/CMakeLists.txt b/LCS/AMC/AMCBase/include/AMCBase/CMakeLists.txt index da466436418289ed799e7c2d6a83e4da400797a8..c8f0030cce28d984828e7a4520b46cf5da30119f 100644 --- a/LCS/AMC/AMCBase/include/AMCBase/CMakeLists.txt +++ b/LCS/AMC/AMCBase/include/AMCBase/CMakeLists.txt @@ -23,3 +23,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/AMC/AMCBase/src/CMakeLists.txt b/LCS/AMC/AMCBase/src/CMakeLists.txt index aa692b3886494bd06cfd3a38d176c9c496d64d74..acc2e2cd541295a81befaa9b8b95393f1949e4fb 100644 --- a/LCS/AMC/AMCBase/src/CMakeLists.txt +++ b/LCS/AMC/AMCBase/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(amcbase_LIB_SRCS +lofar_add_library(amcbase Package__Version.cc BlobIO.cc ConverterClient.cc @@ -33,12 +33,4 @@ set(amcbase_LIB_SRCS Epoch.cc Position.cc) -set(amcbase_PROGRAMS - versionamcbase -) - -lofar_add_library(amcbase ${amcbase_LIB_SRCS}) - -foreach(prog ${amcbase_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) -endforeach(prog ${amcbase_PROGRAMS}) +lofar_add_bin_program(versionamcbase versionamcbase.cc) diff --git a/LCS/AMC/AMCImpl/include/AMCImpl/CMakeLists.txt b/LCS/AMC/AMCImpl/include/AMCImpl/CMakeLists.txt index afc2fe98ab776d14111bb399fda4617e58e5f4d3..7de4a4c413c6ab2bdbf19fc6d877bf2c2eca6cf1 100644 --- a/LCS/AMC/AMCImpl/include/AMCImpl/CMakeLists.txt +++ b/LCS/AMC/AMCImpl/include/AMCImpl/CMakeLists.txt @@ -12,3 +12,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/AMC/AMCImpl/src/CMakeLists.txt b/LCS/AMC/AMCImpl/src/CMakeLists.txt index d2d22fda13071b3283b06efce8cca3a56ccebdbd..193aee65e0f43e1eceb18b06fde62d4b000cfe30 100644 --- a/LCS/AMC/AMCImpl/src/CMakeLists.txt +++ b/LCS/AMC/AMCImpl/src/CMakeLists.txt @@ -39,5 +39,5 @@ set(amcimpl_PROGRAMS lofar_add_library(amcimpl ${amcimpl_LIB_SRCS}) foreach(prog ${amcimpl_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) + lofar_add_bin_program(${prog} ${prog}.cc) endforeach(prog ${amcimpl_PROGRAMS}) diff --git a/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt b/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt index 832473a66fecd7d23ada400ba472b28e24274933..29086202ee43a9191b923ebaaba2013eece19b14 100644 --- a/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt +++ b/LCS/ApplCommon/include/ApplCommon/CMakeLists.txt @@ -31,3 +31,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/ApplCommon/src/CMakeLists.txt b/LCS/ApplCommon/src/CMakeLists.txt index c3d1d846e78f7f744670b38a78b9696a24f74145..ea8e296a83516e9ab4f927ac86514bc685d0306f 100644 --- a/LCS/ApplCommon/src/CMakeLists.txt +++ b/LCS/ApplCommon/src/CMakeLists.txt @@ -20,16 +20,9 @@ include(LofarPackageVersion) -set(applcommon_LIB_SRCS +lofar_add_library(applcommon Package__Version.cc Observation.cc) -set(applcommon_PROGRAMS - versionapplcommon) - -lofar_add_library(applcommon ${applcommon_LIB_SRCS}) - -foreach(prog ${stream_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) -endforeach(prog ${stream_PROGRAMS}) +lofar_add_bin_program(versionapplcommon versionapplcommon.cc) diff --git a/LCS/Blob/include/Blob/CMakeLists.txt b/LCS/Blob/include/Blob/CMakeLists.txt index a256c2116a1f9ad7b8bbe39197ccdb82191e882d..365c9969330432ffb644bc4c6c162e6261858b1d 100644 --- a/LCS/Blob/include/Blob/CMakeLists.txt +++ b/LCS/Blob/include/Blob/CMakeLists.txt @@ -61,3 +61,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/Blob/src/CMakeLists.txt b/LCS/Blob/src/CMakeLists.txt index f62e4574911203860c8b78186afbf5cb88e5dffd..7af37af2b22b38df28e595115e523dae376d918d 100644 --- a/LCS/Blob/src/CMakeLists.txt +++ b/LCS/Blob/src/CMakeLists.txt @@ -20,9 +20,7 @@ include(LofarPackageVersion) -## ---------------------------------------------------------------------------- -## Process input files for Flex and Bison -## ---------------------------------------------------------------------------- +# Process input files for Flex and Bison find_package(BISON REQUIRED) find_package(FLEX REQUIRED) @@ -30,6 +28,12 @@ bison_target(KeyParse KeyParse.yy ${CMAKE_CURRENT_BINARY_DIR}/KeyParse.cc COMPILE_FLAGS "-y -pKeyParse") +flex_target(KeyTokenize KeyTokenize.ll + ${CMAKE_CURRENT_BINARY_DIR}/KeyTokenize.cc + COMPILE_FLAGS "-PKeyTokenize") + +add_flex_bison_dependency(KeyTokenize KeyParse) + # Create symbolic link from KeyParse.h -> KeyParse.hh, because KeyParser.cc # #include's KeyParse.h. execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink @@ -41,13 +45,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # will output the files they generate. include_directories(${CMAKE_CURRENT_BINARY_DIR}) -flex_target(KeyTokenize KeyTokenize.ll - ${CMAKE_CURRENT_BINARY_DIR}/KeyTokenize.cc - COMPILE_FLAGS "-PKeyTokenize") - -add_flex_bison_dependency(KeyTokenize KeyParse) - -set(blob_LIB_SRCS +lofar_add_library(blob Package__Version.cc BlobAipsIO.cc BlobArray.cc @@ -71,12 +69,4 @@ set(blob_LIB_SRCS KeyValue.cc KeyValueMap.cc) -set(blob_PROGRAMS - versionblob -) - -lofar_add_library(blob ${blob_LIB_SRCS}) - -foreach(prog ${blob_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) -endforeach(prog ${blob_PROGRAMS}) +lofar_add_bin_program(versionblob versionblob.cc) diff --git a/LCS/CMakeLists.txt b/LCS/CMakeLists.txt index 42c4cc7dd0f02e8393f8604fd8706dcd265b3727..73d19968c2c1a109c637ecd786164d5f257878bf 100644 --- a/LCS/CMakeLists.txt +++ b/LCS/CMakeLists.txt @@ -42,6 +42,7 @@ lofar_add_subdirectory(Transport) # Low-level transport library lofar_add_subdirectory(ACC) # Application Configuration & Control lofar_add_subdirectory(AMC) # Astronomical Measures Conversions lofar_add_subdirectory(ApplCommon) # Application common stuff + ## --------------------------------------------------------------------------- ## Generate configuration header file. ## --------------------------------------------------------------------------- diff --git a/LCS/Common/include/Common/CMakeLists.txt b/LCS/Common/include/Common/CMakeLists.txt index c98a0af1057fd98e3f11b7359b3c8a8a8d2c0352..3141a43aee300492114184deb1cb9d976d6058a1 100644 --- a/LCS/Common/include/Common/CMakeLists.txt +++ b/LCS/Common/include/Common/CMakeLists.txt @@ -97,3 +97,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/Common/src/CMakeLists.txt b/LCS/Common/src/CMakeLists.txt index 1cb2220526fcd0efdbdad95b64f56f12584c1c38..e048255700677fbd9bdd7ed3eb16b609d1288a98 100644 --- a/LCS/Common/src/CMakeLists.txt +++ b/LCS/Common/src/CMakeLists.txt @@ -85,5 +85,5 @@ endif(HAVE_SHMEM) lofar_add_library(common ${common_LIB_SRCS}) foreach(prog ${common_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) + lofar_add_bin_program(${prog} ${prog}.cc) endforeach(prog ${common_PROGRAMS}) diff --git a/LCS/Stream/include/Stream/CMakeLists.txt b/LCS/Stream/include/Stream/CMakeLists.txt index 1a922d0c812025eda8262c2190073b600d82b681..f2adc7b283c6940b759651a51b4662c5f61ef889 100644 --- a/LCS/Stream/include/Stream/CMakeLists.txt +++ b/LCS/Stream/include/Stream/CMakeLists.txt @@ -15,3 +15,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/Stream/src/CMakeLists.txt b/LCS/Stream/src/CMakeLists.txt index 2b33043f57f69eaad7c22b66939f798876fa5272..584f34d6c780b0bd215facdb312a2055dc42fa75 100644 --- a/LCS/Stream/src/CMakeLists.txt +++ b/LCS/Stream/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(stream_LIB_SRCS +lofar_add_library(stream Package__Version.cc FileDescriptorBasedStream.cc FileStream.cc @@ -29,12 +29,4 @@ set(stream_LIB_SRCS Stream.cc SystemCallException.cc) -set(stream_PROGRAMS - versionstream -) - -lofar_add_library(stream ${stream_LIB_SRCS}) - -foreach(prog ${stream_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) -endforeach(prog ${stream_PROGRAMS}) +lofar_add_bin_program(versionstream versionstream.cc) diff --git a/LCS/Tools/CMakeLists.txt b/LCS/Tools/CMakeLists.txt index 13cd493b51abfd185d2172699f7331675d0cdff3..20686b251b15a428699d47fe94739b546ed165b9 100644 --- a/LCS/Tools/CMakeLists.txt +++ b/LCS/Tools/CMakeLists.txt @@ -31,6 +31,9 @@ include(LofarInit) project(Tools) include(LofarGeneral) +include(LofarAddPackage) +lofar_add_package(${PROJECT_NAME} 1.3) + ## --------------------------------------------------------------------------- ## Generate configuration-specific header file ## --------------------------------------------------------------------------- diff --git a/LCS/Tools/src/CMakeLists.txt b/LCS/Tools/src/CMakeLists.txt index 044a29183314020e6edb2f671e72a3a1d747ff20..148caef8797f2453ba3541cc139387be2087420c 100644 --- a/LCS/Tools/src/CMakeLists.txt +++ b/LCS/Tools/src/CMakeLists.txt @@ -18,13 +18,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -add_executable(LimitExec LimitExec.cc) -add_executable(pkgdep pkgdep.cc) - -install(TARGETS - LimitExec - pkgdep - DESTINATION sbin) +lofar_add_sbin_program(LimitExec LimitExec.cc) +lofar_add_sbin_program(pkgdep pkgdep.cc) install(PROGRAMS checkrun diff --git a/LCS/Transport/include/Transport/CMakeLists.txt b/LCS/Transport/include/Transport/CMakeLists.txt index 19dd3646f3fff5ada84f735769604832b236e9da..284b7d7fb8891da4b27437e28874637cd94191e2 100644 --- a/LCS/Transport/include/Transport/CMakeLists.txt +++ b/LCS/Transport/include/Transport/CMakeLists.txt @@ -25,3 +25,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/LCS/Transport/src/CMakeLists.txt b/LCS/Transport/src/CMakeLists.txt index 6c86cffe9282510410478b8347672a48466a3be1..95ad726f47630d6bd25b3db57b3de4430c0d8144 100644 --- a/LCS/Transport/src/CMakeLists.txt +++ b/LCS/Transport/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(transport_LIB_SRCS +lofar_add_library(transport Package__Version.cc BGLConnection.cc Connection.cc @@ -35,16 +35,7 @@ set(transport_LIB_SRCS TH_MPI.cc TH_ShMem.cc TH_Socket.cc - TransportHolder.cc -) + TransportHolder.cc) -set(transport_PROGRAMS - versiontransport -) - -lofar_add_library(transport ${transport_LIB_SRCS}) - -foreach(prog ${transport_PROGRAMS}) - lofar_add_executable(${prog} ${prog}.cc) -endforeach(prog ${transport_PROGRAMS}) +lofar_add_bin_program(versiontransport versiontransport.cc) diff --git a/MAC/GCF/CMakeLists.txt b/MAC/GCF/CMakeLists.txt index 69b55a6baf98bb8f4b14bffe13429e2ea35559b0..ba59ce31b7ea0b809a965cbd90d466a005043b36 100644 --- a/MAC/GCF/CMakeLists.txt +++ b/MAC/GCF/CMakeLists.txt @@ -31,6 +31,13 @@ include(LofarInit) project(GCF) include(LofarGeneral) +## --------------------------------------------------------------------------- +## Create directory GCF in the binary include directory; it will hold symbolic +## links to the different subcomponents of GCF. +## --------------------------------------------------------------------------- +execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory + ${CMAKE_BINARY_DIR}/include/GCF) + ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- diff --git a/MAC/GCF/TM/include/GCF/TM/CMakeLists.txt b/MAC/GCF/TM/include/GCF/TM/CMakeLists.txt index 10a2b711ee8d6ce8be3557c01ca7cdff30115045..33e1ec8256420230435bc5c672f78bfa636dd078 100644 --- a/MAC/GCF/TM/include/GCF/TM/CMakeLists.txt +++ b/MAC/GCF/TM/include/GCF/TM/CMakeLists.txt @@ -22,6 +22,7 @@ set(inst_HEADERS Package__Version.h GCF_Control.h + GCF_Scheduler.h GCF_DevicePort.h GCF_ETHRawPort.h GCF_Fsm.h @@ -43,3 +44,5 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/GCF/TM) +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX GCF/TM + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/MAC/GCF/TM/src/CMakeLists.txt b/MAC/GCF/TM/src/CMakeLists.txt index a7090eb587c0f3e800c063a490feb8850565dc97..148317d724a0ec0da075899b2106e9cd792e03da 100644 --- a/MAC/GCF/TM/src/CMakeLists.txt +++ b/MAC/GCF/TM/src/CMakeLists.txt @@ -27,11 +27,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) # Add the directory where the generated C++ headers are stored to the -I path. include_directories(${CMAKE_BINARY_DIR}/include/MAC) -set(gcftm_LIB_SRCS +lofar_add_library(gcftm Package__Version.cc + GCF_Handler.cc + GCF_Scheduler.cc GCF_Fsm.cc GCF_Protocols.cc - GCF_Task.cc Port/GCF_PortInterface.cc Port/GCF_Port.cc Port/GCF_RawPort.cc @@ -50,6 +51,4 @@ set(gcftm_LIB_SRCS ServiceBroker/GTM_SBTCPPort.cc ServiceBroker/ServiceBrokerTask.cc) -lofar_add_library(gcftm ${gcftm_LIB_SRCS}) - -lofar_add_executable(versiongcftm versiongcftm.cc) +lofar_add_bin_program(versiongcftm versiongcftm.cc) diff --git a/MAC/GCF/TM/test/CMakeLists.txt b/MAC/GCF/TM/test/CMakeLists.txt index ab6b3e01be95ebff55f987d9d7430ed5b91b4c84..ed098602236077802ba1d15ba8aabaf5ab3abb52 100644 --- a/MAC/GCF/TM/test/CMakeLists.txt +++ b/MAC/GCF/TM/test/CMakeLists.txt @@ -28,26 +28,18 @@ mac_add_protocol(Echo_Protocol "${MACIO_SOURCE_DIR}/autogen") # files can be found. include_directories(${CMAKE_CURRENT_BINARY_DIR}) -# Tests were not run in the "old" autotools environment and they all seem to -# hang when being run. Therefore we will only build them for the time being. -if(0) - lofar_add_test(tmEcho Echo_Protocol.cc Echo.cc) - lofar_add_test(tmPing Echo_Protocol.cc Ping.cc) - lofar_add_test(tGCFPort Echo_Protocol.cc tGCFPort.cc) - lofar_add_test(tGCFTimer tTimer.cc) - lofar_add_test(tGCFTask1 tGCFTask1.cc testTask.cc) - lofar_add_test(tGCFTask2 tGCFTask2.cc testTask.cc) - lofar_add_test(tGCFTask3 tGCFTask3.cc testTask.cc) - lofar_add_test(tGCFTask4 tGCFTask4.cc testTask.cc) - lofar_add_test(tGCFTask5 tGCFTask5.cc testTask.cc) -else() - lofar_add_executable(tmEcho Echo_Protocol.cc Echo.cc) - lofar_add_executable(tmPing Echo_Protocol.cc Ping.cc) - lofar_add_executable(tGCFPort Echo_Protocol.cc tGCFPort.cc) - lofar_add_executable(tGCFTimer tTimer.cc) - lofar_add_executable(tGCFTask1 tGCFTask1.cc testTask.cc) - lofar_add_executable(tGCFTask2 tGCFTask2.cc testTask.cc) - lofar_add_executable(tGCFTask3 tGCFTask3.cc testTask.cc) - lofar_add_executable(tGCFTask4 tGCFTask4.cc testTask.cc) - lofar_add_executable(tGCFTask5 tGCFTask5.cc testTask.cc) -endif(0) +# Tests cannot be run at this stage, because they all need to connect to a +# Service Broker, which has not been built yet. Therefore we will only build +# the test programs. +lofar_add_executable(tAutoOpen tAutoOpen.cc tServer.cc Echo_Protocol.cc) +lofar_add_executable(tEventQueue tEventQueue.cc tClient.cc Echo_Protocol.cc) +lofar_add_executable(tStateResult tStateResult.cc tServer.cc Echo_Protocol.cc) +lofar_add_executable(tmEcho Echo_Protocol.cc Echo.cc) +lofar_add_executable(tmPing Echo_Protocol.cc Ping.cc) +lofar_add_executable(tGCFPort Echo_Protocol.cc tGCFPort.cc) +lofar_add_executable(tGCFTimer tTimer.cc) +lofar_add_executable(tGCFTask1 tGCFTask1.cc testTask.cc) +lofar_add_executable(tGCFTask2 tGCFTask2.cc testTask.cc) +lofar_add_executable(tGCFTask3 tGCFTask3.cc testTask.cc) +lofar_add_executable(tGCFTask4 tGCFTask4.cc testTask.cc) +lofar_add_executable(tGCFTask5 tGCFTask5.cc testTask.cc) diff --git a/MAC/GCF/TM/test/Makefile.am b/MAC/GCF/TM/test/Makefile.am index b361623e4fc5585b53ca1543ef9080d00c86addf..fb14efd875cda2ccc7c75386baa445fa3ec57d25 100644 --- a/MAC/GCF/TM/test/Makefile.am +++ b/MAC/GCF/TM/test/Makefile.am @@ -6,7 +6,7 @@ SUFFIXES = .ph %.cc: %.prot $(AUTOGEN) --writable -L $(datadir)/MACIO $< -check_PROGRAMS = tAutoOpen tEventQueue tStateResult tmEcho tmPing tGCFPort tTimer \ +check_PROGRAMS = tAutoOpen tEventQueue tStateResult tmEcho tmPing tGCFPort tGCFTimer \ tGCFTask1 tGCFTask2 tGCFTask3 tGCFTask4 tGCFTask5 tmEcho_SOURCES = $(BUILT_SOURCES) Echo.cc Echo_Protocol.cc @@ -22,9 +22,9 @@ tGCFPort_SOURCES = $(BUILT_SOURCES) Echo_Protocol.cc \ tGCFPort_LDADD = ../src/libgcftm.la tGCFPort_DEPENDENCIES = ../src/libgcftm.la $(LOFAR_DEPEND) -tTimer_SOURCES = $(BUILT_SOURCES) tTimer.cc -tTimer_LDADD = ../src/libgcftm.la -tTimer_DEPENDENCIES = ../src/libgcftm.la tTimer.h $(LOFAR_DEPEND) +tGCFTimer_SOURCES = $(BUILT_SOURCES) tTimer.cc +tGCFTimer_LDADD = ../src/libgcftm.la +tGCFTimer_DEPENDENCIES = ../src/libgcftm.la tTimer.h $(LOFAR_DEPEND) tEventQueue_SOURCES = $(BUILT_SOURCES) tEventQueue.cc tClient.cc Echo_Protocol.cc tEventQueue_LDADD = ../src/libgcftm.la diff --git a/MAC/MACIO/include/MACIO/CMakeLists.txt b/MAC/MACIO/include/MACIO/CMakeLists.txt index a4d8269509898ea0664904244626e94c1c37f811..9f1b4d003a1ba9d68458a4341388c01e48346c07 100644 --- a/MAC/MACIO/include/MACIO/CMakeLists.txt +++ b/MAC/MACIO/include/MACIO/CMakeLists.txt @@ -36,3 +36,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/MAC/MACIO/src/CMakeLists.txt b/MAC/MACIO/src/CMakeLists.txt index e2835366fee1a0c6cf1ddbad5e537ceb4fcc2a3a..caa0d55d26da05e7c5f32d39ab8b98bcfdb0b86b 100644 --- a/MAC/MACIO/src/CMakeLists.txt +++ b/MAC/MACIO/src/CMakeLists.txt @@ -24,9 +24,9 @@ include(LofarPackageVersion) ## Add MAC protocols (generates a .ph and .cc file from a .prot file) ## --------------------------------------------------------------------------- include(MACAddProtocol) -mac_add_protocol(LOG_Protocol "${${PROJECT_NAME}_SOURCE_DIR}/autogen") -mac_add_protocol(KVT_Protocol "${${PROJECT_NAME}_SOURCE_DIR}/autogen") -mac_add_protocol(SB_Protocol "${${PROJECT_NAME}_SOURCE_DIR}/autogen") +mac_add_protocol(LOG_Protocol "${PROJECT_SOURCE_DIR}/autogen") +mac_add_protocol(KVT_Protocol "${PROJECT_SOURCE_DIR}/autogen") +mac_add_protocol(SB_Protocol "${PROJECT_SOURCE_DIR}/autogen") ## --------------------------------------------------------------------------- ## Add libraries to be generated diff --git a/RTCP/CNProc/lofar_config.h.cmake b/RTCP/CNProc/lofar_config.h.cmake deleted file mode 100644 index 5f4a2507e12bdc8a591164db2413292950e02ebf..0000000000000000000000000000000000000000 --- a/RTCP/CNProc/lofar_config.h.cmake +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated by lofar_init.m4 */ - -#ifndef LOFAR_CONFIG_H -#define LOFAR_CONFIG_H - -#if defined(HAVE_CONFIG_H) -#include <config.h> -#endif - -#define HAVE_LOFAR_CNPROC 1 - -#define LOFARLOGGER_PACKAGE "RTCP.CNProc" - -#if !defined(HAVE_BOOST) -# define HAVE_BOOST 1 -#endif - -#if !defined(HAVE_READLINE) -# define HAVE_READLINE 1 -#endif - -#if !defined(HAVE_TOOLS) -# define HAVE_TOOLS 1 -#endif - -#if !defined(HAVE_APPLCOMMON) -# define HAVE_APPLCOMMON 1 -#endif - -#endif diff --git a/RTCP/FCNP/lofar_config.h.cmake b/RTCP/FCNP/lofar_config.h.cmake deleted file mode 100644 index db83db02aef6c095b3e86d88f0c85a22fe1581db..0000000000000000000000000000000000000000 --- a/RTCP/FCNP/lofar_config.h.cmake +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated by lofar_init.m4 */ - -#ifndef LOFAR_CONFIG_H -#define LOFAR_CONFIG_H - -#if defined(HAVE_CONFIG_H) -#include <config.h> -#endif - -#define HAVE_LOFAR_FCNP 1 - -#define LOFARLOGGER_PACKAGE "RTCP.FCNP" - -#if !defined(HAVE_BOOST) -# define HAVE_BOOST 1 -#endif - -#if !defined(HAVE_READLINE) -# define HAVE_READLINE 1 -#endif - -#if !defined(HAVE_TOOLS) -# define HAVE_TOOLS 1 -#endif - -#endif diff --git a/RTCP/IONProc/CMakeLists.txt b/RTCP/IONProc/CMakeLists.txt index c938dec92fc1a17b565c47b2c09dba00400b60f0..c136c91db52531ad0f4656db98d2df0d77e1b2e8 100644 --- a/RTCP/IONProc/CMakeLists.txt +++ b/RTCP/IONProc/CMakeLists.txt @@ -1,27 +1,20 @@ + ## ------------------------------------------------------------------------------ ## Project characteristics -project (IONProc) +project (CS1_IONProc) -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.5) ## ------------------------------------------------------------------------------ -## Enable test? - -option (IONPROC_ENABLE_TESTING "Enable building and executing test programs?" NO ) +## Dependency on other packages -## ------------------------------------------------------------------------------ -## Directories to be included in the build +if (HAVE_APS) + add_definitions (-DHAVE_APS) +endif (HAVE_APS) -include_directories (${IONProc_BINARY_DIR}/include) +if (HAVE_TINYCEP) + add_definitions (-DHAVE_TINYCEP) +endif (HAVE_TINYCEP) -configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake - ${IONProc_BINARY_DIR}/include/config.h) -configure_file(${IONProc_SOURCE_DIR}/lofar_config.h.cmake - ${IONProc_BINARY_DIR}/include/lofar_config.h) - add_subdirectory (src) - -if (IONPROC_ENABLE_TESTING) - add_subdirectory (test) -endif (IONPROC_ENABLE_TESTING) diff --git a/RTCP/IONProc/lofar_config.h.cmake b/RTCP/IONProc/lofar_config.h.cmake deleted file mode 100644 index 4078aa9c07fad1c8777151a267fcda65da5c04cf..0000000000000000000000000000000000000000 --- a/RTCP/IONProc/lofar_config.h.cmake +++ /dev/null @@ -1,42 +0,0 @@ -/* Generated by lofar_init.m4 */ - -#ifndef LOFAR_CONFIG_H -#define LOFAR_CONFIG_H - -#if defined(HAVE_CONFIG_H) -#include <config.h> -#endif - -#define HAVE_LOFAR_IONPROC 1 - -#define LOFARLOGGER_PACKAGE "RTCP.IONProc" - -#if !defined(HAVE_BOOST) -# define HAVE_BOOST 1 -#endif - -#if !defined(HAVE_READLINE) -# define HAVE_READLINE 1 -#endif - -#if !defined(HAVE_TOOLS) -# define HAVE_TOOLS 1 -#endif - -#if !defined(HAVE_AIPSPP) -# define HAVE_AIPSPP 1 -#endif - -#if !defined(HAVE_BLOB) -# define HAVE_BLOB 1 -#endif - -#if !defined(HAVE_TRANSPORT) -# define HAVE_TRANSPORT 1 -#endif - -#if !defined(HAVE_APPLCOMMON) -# define HAVE_APPLCOMMON 1 -#endif - -#endif diff --git a/RTCP/IONProc/src/CMakeLists.txt b/RTCP/IONProc/src/CMakeLists.txt index 0f98a0e4d84a2c4c884e9a306d7bdf41e0d3580a..36022ba5d66dc70b709398b6e485103bc49b4660 100644 --- a/RTCP/IONProc/src/CMakeLists.txt +++ b/RTCP/IONProc/src/CMakeLists.txt @@ -1,95 +1,36 @@ -find_path (HAVE_LINK_IONPROC IONProc ${CMAKE_CURRENT_SOURCE_DIR}) -if (HAVE_LINK_IONPROC) - set (HAVE_LINK_IONPROC TRUE CACHE BOOL "Have link IONProc?" FORCE) - execute_process(COMMAND rm -rf ${CMAKE_CURRENT_SOURCE_DIR}/IONProc ) -endif (HAVE_LINK_IONPROC) - -execute_process(COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/IONProc ) - - -## ------------------------------------------------------------------------------ -## Include files - -file (GLOB libinterface_HEADERS BeamletBuffer.h - CN_Personality.h - InputSection.h - InputThread.h - InputThreadAsm.h - ION_Allocator.h - LockedRanges.h - LogThread.h - OutputThread.h - OutputSection.h - ReaderWriterSynchronization.h - RSP.h - Scheduling.h - SlidingPointer.h - WallClockTime.h - WH_DelayCompensation.h - Lock.h - FCNP_ServerStream.h) - -enable_language(ASM-BGP) - -if (CMAKE_ASM-BGP_COMPILER_WORKS) - set(amsSrcs InputThreadAsm.S) -endif (CMAKE_ASM-BGP_COMPILER_WORKS) ## ------------------------------------------------------------------------------ ## Build the library -file (GLOB libionproc_SOURCES BeamletBuffer.cc - CN_Personality.cc - InputSection.cc - InputThread.cc - ION_Allocator.cc - LogThread.cc - OutputThread.cc - OutputSection.cc - ReaderWriterSynchronization.cc - Scheduling.cc - WH_DelayCompensation.cc - FCNP_ServerStream.cc - Lock.cc - ${amsSrcs}) - -add_library (ionproc ${libionproc_SOURCES}) - -## linker instructions -target_link_libraries ( ionproc - amcimpl - amcbase - plc - transport - blob - interface - stream - fcnp_cn - fcnp_ion - applcommon - common - ${Boost_LIBRARIES} - ${CASA_LIBRARIES} - ${BACKTRACE_LIBRARIES} - ) +file (GLOB liblofar_impl_SOURCES *.cc) + +add_library (lofar_impl SHARED ${liblofar_impl_SOURCES}) + +target_link_libraries (lofar_impl + amcimpl + amcbase + cepframe + cs1_interface + tinycep + plc + transport + applcommon + blob + aps + common + ) -set_target_properties (ionproc +set_target_properties (lofar_impl PROPERTIES - LINK_FLAGS "-lpthread" + LINK_FLAGS "-fPIC --whole-archive" ) -add_executable(IONProc ION_main.cc) - -target_link_libraries (IONProc - ionproc - ) - ## ------------------------------------------------------------------------------ ## Installation install ( - TARGETS ionproc IONProc + TARGETS lofar_impl LIBRARY DESTINATION lib ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin ) + diff --git a/RTCP/Interface/include/Interface/CMakeLists.txt b/RTCP/Interface/include/Interface/CMakeLists.txt index 75e2f833c3263234758ee56e21c4bc92a02eacfb..3a48c378beb4eeb3d8e3c482955bc0e57f433d4a 100644 --- a/RTCP/Interface/include/Interface/CMakeLists.txt +++ b/RTCP/Interface/include/Interface/CMakeLists.txt @@ -32,3 +32,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/RTCP/Interface/lofar_config.h.cmake b/RTCP/Interface/lofar_config.h.cmake deleted file mode 100644 index fa8015f4825e391702d52ddbf4fe943f36a58000..0000000000000000000000000000000000000000 --- a/RTCP/Interface/lofar_config.h.cmake +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated by lofar_init.m4 */ - -#ifndef LOFAR_CONFIG_H -#define LOFAR_CONFIG_H - -#if defined(HAVE_CONFIG_H) -#include <config.h> -#endif - -#define HAVE_LOFAR_INTERFACE 1 - -#define LOFARLOGGER_PACKAGE "RTCP.Interface" - -#if !defined(HAVE_BOOST) -# define HAVE_BOOST 1 -#endif - -#if !defined(HAVE_READLINE) -# define HAVE_READLINE 1 -#endif - -#if !defined(HAVE_TOOLS) -# define HAVE_TOOLS 1 -#endif - -#endif diff --git a/RTCP/Storage/include/Storage/CMakeLists.txt b/RTCP/Storage/include/Storage/CMakeLists.txt index b2e0cdba212daf4dd9b46c911e5a88c1ed6ae9b8..188b611a7c0836506a81e1bd15938e7fc9457af2 100644 --- a/RTCP/Storage/include/Storage/CMakeLists.txt +++ b/RTCP/Storage/include/Storage/CMakeLists.txt @@ -10,3 +10,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/RTCP/Storage/lofar_config.h.cmake b/RTCP/Storage/lofar_config.h.cmake deleted file mode 100644 index 59fee3866ce7e16d9e7059dea464eff62361e8be..0000000000000000000000000000000000000000 --- a/RTCP/Storage/lofar_config.h.cmake +++ /dev/null @@ -1,42 +0,0 @@ -/* Generated by lofar_init.m4 */ - -#ifndef LOFAR_CONFIG_H -#define LOFAR_CONFIG_H - -#if defined(HAVE_CONFIG_H) -#include <config.h> -#endif - -#define HAVE_LOFAR_STORAGE 1 - -#define LOFARLOGGER_PACKAGE "RTCP.Storage" - -#if !defined(HAVE_BOOST) -# define HAVE_BOOST 1 -#endif - -#if !defined(HAVE_READLINE) -# define HAVE_READLINE 1 -#endif - -#if !defined(HAVE_TOOLS) -# define HAVE_TOOLS 1 -#endif - -#if !defined(HAVE_BLOB) -# define HAVE_BLOB 1 -#endif - -#if !defined(HAVE_TRANSPORT) -# define HAVE_TRANSPORT 1 -#endif - -#if !defined(HAVE_APPLCOMMON) -# define HAVE_APPLCOMMON 1 -#endif - -#if !defined(HAVE_STREAM) -# define HAVE_STREAM 1 -#endif - -#endif diff --git a/SAS/CMakeLists.txt b/SAS/CMakeLists.txt index 86cfa2abdda9303a54ec613e2b8f810dc30eccd9..32ac900db17ceec2ccf8ccc922bf3bb81b41a70b 100644 --- a/SAS/CMakeLists.txt +++ b/SAS/CMakeLists.txt @@ -34,8 +34,8 @@ include(LofarGeneral) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(OTDB) -add_subdirectory(OTB) +lofar_add_subdirectory(OTDB) +lofar_add_subdirectory(OTB) ## --------------------------------------------------------------------------- ## Generate configuration header file. diff --git a/SAS/OTB/CMakeLists.txt b/SAS/OTB/CMakeLists.txt index 9a4d5442d32d42eee6647a6dd34fdd39b9a08b08..cef6c2f7deb9f77ef859e3c9dd97e5ff0268d8e2 100644 --- a/SAS/OTB/CMakeLists.txt +++ b/SAS/OTB/CMakeLists.txt @@ -34,8 +34,8 @@ include(LofarGeneral) ## --------------------------------------------------------------------------- ## Subdirectories ## --------------------------------------------------------------------------- -add_subdirectory(jOTDB2) -add_subdirectory(OTB) +lofar_add_subdirectory(jOTDB2) +lofar_add_subdirectory(OTB) ## --------------------------------------------------------------------------- ## Generate configuration header file. diff --git a/SAS/OTB/jOTDB2/include/jOTDB2/CMakeLists.txt b/SAS/OTB/jOTDB2/include/jOTDB2/CMakeLists.txt index e17d26a3b6098e435c10e8ae376c9e2be9dcf064..e25d0f24a445d15f250413a69c5a74f9a64551a4 100644 --- a/SAS/OTB/jOTDB2/include/jOTDB2/CMakeLists.txt +++ b/SAS/OTB/jOTDB2/include/jOTDB2/CMakeLists.txt @@ -38,3 +38,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/SAS/OTDB/include/OTDB/CMakeLists.txt b/SAS/OTDB/include/OTDB/CMakeLists.txt index 4682e330f3c0f9df29b8693b50790b912264e579..05a89867584cada334889fba3fece40279c0becb 100644 --- a/SAS/OTDB/include/OTDB/CMakeLists.txt +++ b/SAS/OTDB/include/OTDB/CMakeLists.txt @@ -47,3 +47,6 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink # Install header files. install(FILES ${inst_HEADERS} DESTINATION include/${PROJECT_NAME}) + +set(${PROJECT_NAME}_INCLUDE_PATH_SUFFIX ${PROJECT_NAME} + CACHE INTERNAL "Include path suffix for package \"${PROJECT_NAME}\"") diff --git a/SAS/OTDB/src/CMakeLists.txt b/SAS/OTDB/src/CMakeLists.txt index a866b74c97bd938c65ca3cf33b19147d5a2cc45e..620bddc988c07e3cba4b124e6c25e584da5d4411 100644 --- a/SAS/OTDB/src/CMakeLists.txt +++ b/SAS/OTDB/src/CMakeLists.txt @@ -20,7 +20,7 @@ include(LofarPackageVersion) -set(otdb_LIB_SRCS +lofar_add_library(otdb Package__Version.cc OTDBconnection.cc misc.cc @@ -36,6 +36,4 @@ set(otdb_LIB_SRCS TreeValue.cc loadCompFile.cc) -lofar_add_library(otdb ${otdb_LIB_SRCS}) - -lofar_add_executable(versionotdb versionotdb.cc) +lofar_add_bin_program(versionotdb versionotdb.cc) diff --git a/autoconf_share/runctest.sh b/autoconf_share/runctest.sh deleted file mode 100755 index 4a2933e696a9683c06eafc608cffa454f80d6d3a..0000000000000000000000000000000000000000 --- a/autoconf_share/runctest.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# runctest.sh: CTest wrapper script for runtest.sh -# -# Copyright (C) 2009 -# ASTRON (Netherlands Foundation for Research in Astronomy) -# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# $Id$ - -export lofar_sharedir=${lofar_sharedir} -export srcdir=${srcdir} - -$lofar_sharedir/runtest.sh "$@" - -# The Autotools use the magic return value 77 for skipped tests. CMake can -# only handle zero and non-zero return values. To avoid that CMake will flag a -# skipped test as failed, we will silently change the return value 77 to 0. -STATUS=$? -if [ $STATUS -eq 77 ]; then - STATUS=0 -fi -exit $STATUS diff --git a/config.h.cmake b/config.h.cmake deleted file mode 100644 index 7e6c5886db154bc28f2c23c6f7902abd738d1ae2..0000000000000000000000000000000000000000 --- a/config.h.cmake +++ /dev/null @@ -1,148 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#cmakedefine AC_APPLE_UNIVERSAL_BUILD 1 - -/* Define as __PRETTY_FUNCTION__, __FUNCTION__, or "<unknown>" */ -#define AUTO_FUNCTION_NAME __PRETTY_FUNCTION__ - -/* Define if DbgAssert is enabled */ -#cmakedefine ENABLE_DBGASSERT 1 - -/* Define if TRACER is enabled */ -#cmakedefine ENABLE_TRACER 1 - -/* Define if backtrace() is available */ -#cmakedefine HAVE_BACKTRACE 1 - -/* Define if libbfd is available */ -#cmakedefine HAVE_BFD 1 - -/* Define if MPICH is installed */ -#cmakedefine HAVE_BGLMPICH 1 - -/* Define if BOOST is installed */ -#cmakedefine HAVE_BOOST 1 - -/* Define to 1 if you have the `cplus_demangle' function. */ -#cmakedefine HAVE_CPLUS_DEMANGLE 1 - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#cmakedefine HAVE_DLFCN_H 1 - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#cmakedefine HAVE_DOPRNT 1 - -/* Define to 1 if you have the <inttypes.h> header file. */ -#cmakedefine HAVE_INTTYPES_H 1 - -/* Define if LAM is installed */ -#cmakedefine HAVE_LAM 1 - -/* Define if LOG4CPLUS is installed */ -#cmakedefine HAVE_LOG4CPLUS 1 - -/* Define if LOG4CXX is installed */ -#cmakedefine HAVE_LOG4CXX 1 - -/* Define if `long long' is supported */ -#cmakedefine HAVE_LONG_LONG 1 - -/* Define to 1 if you have the <memory.h> header file. */ -#cmakedefine HAVE_MEMORY_H 1 - -/* Define if we have an MPI implementation installed */ -#cmakedefine HAVE_MPI 1 - -/* Define if MPICH is installed */ -#cmakedefine HAVE_MPICH 1 - -/* Define if MPI profiler should be enabled */ -#cmakedefine HAVE_MPI_PROFILER 1 - -/* Define if using Rational Purify */ -#cmakedefine HAVE_PURIFY 1 - -/* Define if ScaMPI is installed */ -#cmakedefine HAVE_SCAMPI 1 - -/* Defined if shared memory is used */ -#cmakedefine HAVE_SHMEM 1 - -/* Define to 1 if you have the <stdint.h> header file. */ -#cmakedefine HAVE_STDINT_H 1 - -/* Define to 1 if you have the <stdlib.h> header file. */ -#cmakedefine HAVE_STDLIB_H 1 - -/* Define to 1 if you have the <strings.h> header file. */ -#cmakedefine HAVE_STRINGS_H 1 - -/* Define to 1 if you have the <string.h> header file. */ -#cmakedefine HAVE_STRING_H 1 - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#cmakedefine HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the <sys/types.h> header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 - -/* Define if TOOLS is installed */ -#cmakedefine HAVE_TOOLS 1 - -/* Define if `uint' is supported */ -#cmakedefine HAVE_UINT 1 - -/* Define if `ulong' is supported */ -#cmakedefine HAVE_ULONG 1 - -/* Define to 1 if you have the <unistd.h> header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -/* Define if `ushort' is supported */ -#cmakedefine HAVE_USHORT 1 - -/* Define to 1 if you have the `vprintf' function. */ -#cmakedefine HAVE_VPRINTF 1 - -/* Define if we are compiling with debugging information */ -#cmakedefine LOFAR_DEBUG 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#cmakedefine LT_OBJDIR 1 - -/* Define to the address where bug reports for this package should be sent. */ -#cmakedefine PACKAGE_BUGREPORT 1 - -/* Define to the full name of this package. */ -#cmakedefine PACKAGE_NAME 1 - -/* Define to the full name and version of this package. */ -#cmakedefine PACKAGE_STRING 1 - -/* Define to the one symbol short name of this package. */ -#cmakedefine PACKAGE_TARNAME 1 - -/* Define to the version of this package. */ -#cmakedefine PACKAGE_VERSION 1 - -/* Define RPM release nr */ -#cmakedefine RPM_RELEASE 1 - -/* Define to 1 if you have the ANSI C header files. */ -#cmakedefine STDC_HEADERS 1 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#cmakedefine WORDS_BIGENDIAN 1 - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#cmakedefine YYTEXT_POINTER 1 - -/* Define to empty if `const' does not conform to ANSI C. */ -#cmakedefine const 1 - -/* Define to `unsigned int' if <sys/types.h> does not define. */ -#cmakedefine size_t 1