From 804827a3802ab919c9568498f7b8ded7a8468479 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 06:54:32 +0100 Subject: [PATCH 01/24] attempt with OSX+conan --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c3a57cf351..103dfa4977 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -168,7 +168,8 @@ def get_osx_pipeline() dir("${project}/build") { try { - sh "cmake ../code" + // sh "conan install --file=../conanfile_ess.txt --build=missing" + sh "cmake -DWITH_CONAN=ON ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } @@ -201,10 +202,10 @@ node('docker && dmbuild03.dm.esss.dk') { } def builders = [:] - builders['centos'] = get_pipeline('centos') - builders['centos-gcc6'] = get_pipeline('centos-gcc6') - builders['fedora'] = get_pipeline('fedora') - builders['ubuntu1604'] = get_pipeline('ubuntu1604') + //builders['centos'] = get_pipeline('centos') + //builders['centos-gcc6'] = get_pipeline('centos-gcc6') + //builders['fedora'] = get_pipeline('fedora') + //builders['ubuntu1604'] = get_pipeline('ubuntu1604') builders['MocOSX'] = get_osx_pipeline() /* From 7dcf976788f8b2c3bd94ab2f168d309131dff27a Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 06:56:29 +0100 Subject: [PATCH 02/24] attempt with OSX+conan --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 103dfa4977..ba0cf4b58d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -108,6 +108,7 @@ def Object get_container(image_key) { def get_pipeline(image_key) { return { + node('docker && dmbuild03.dm.esss.dk') { stage("${image_key}") { try { def container = get_container(image_key) @@ -147,6 +148,7 @@ def get_pipeline(image_key) sh "docker rm -f ${container_name(image_key)}" } } + } } } @@ -186,11 +188,7 @@ def get_osx_pipeline() } } -node('docker && dmbuild03.dm.esss.dk') { - - // Delete workspace when build is done - cleanWs() - +node { stage('Checkout') { dir("${project}/code") { try { @@ -215,6 +213,9 @@ node('docker && dmbuild03.dm.esss.dk') { } */ parallel builders + + // Delete workspace when build is done + cleanWs() } node ("fedora") { From b7d723bdf1ab247b090fe00c0c94651d0e2e982a Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 06:59:06 +0100 Subject: [PATCH 03/24] ensure build type first; updates #184' --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20f094860e..4cf7f0fb4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,13 @@ project(h5cpp set(EXTRA_MODULES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake) list(APPEND CMAKE_MODULE_PATH ${EXTRA_MODULES_DIR}) +#============================================================================= +# ensure build type first +#============================================================================= + +include(${EXTRA_MODULES_DIR}/CoverageReports.cmake) +include(${EXTRA_MODULES_DIR}/EnsureBuildType.cmake) + #============================================================================= # setting up conan for use from within cmake #============================================================================= @@ -14,7 +21,6 @@ set(WITH_CONAN OFF CACHE BOOL "Enable dependency build with conan") set(CONAN_FILE "conanfile_default.txt" CACHE STRING "The conanfile to use for the build") if (WITH_CONAN) - include(${EXTRA_MODULES_DIR}/ConanSetup.cmake) conan_cmake_run(CONANFILE ${CONAN_FILE} BASIC_SETUP @@ -27,13 +33,10 @@ if (EXISTS ${PROJECT_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() endif () - #============================================================================= # some general configuration #============================================================================= -include(${EXTRA_MODULES_DIR}/CoverageReports.cmake) -include(${EXTRA_MODULES_DIR}/EnsureBuildType.cmake) include(${EXTRA_MODULES_DIR}/InstallConfig.cmake) include(${EXTRA_MODULES_DIR}/OutputDirConfig.cmake) include(${EXTRA_MODULES_DIR}/WindowsUtils.cmake) From 0071e1bf88adee05e6bb6d7cb29f0ac5ba648992 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 07:01:25 +0100 Subject: [PATCH 04/24] wrong conanfile; updates #184' --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ba0cf4b58d..14edc03ef7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -171,7 +171,7 @@ def get_osx_pipeline() dir("${project}/build") { try { // sh "conan install --file=../conanfile_ess.txt --build=missing" - sh "cmake -DWITH_CONAN=ON ../code" + sh "cmake -DWITH_CONAN=ON -DCONAN_FILE=../conanfile_ess.txt ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } From 2c8e260a0c848ce9a35d6bc0af59d80c99578ae2 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 07:02:33 +0100 Subject: [PATCH 05/24] wrong path for conanfile; updates #184' --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 14edc03ef7..9b733d568c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -171,7 +171,7 @@ def get_osx_pipeline() dir("${project}/build") { try { // sh "conan install --file=../conanfile_ess.txt --build=missing" - sh "cmake -DWITH_CONAN=ON -DCONAN_FILE=../conanfile_ess.txt ../code" + sh "cmake -DWITH_CONAN=ON -DCONAN_FILE=../code/conanfile_ess.txt ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } From a2aa7d5c4e0c1e2298875a1cd9f3823e0517a23a Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 07:09:33 +0100 Subject: [PATCH 06/24] maybe do conan manually; updates #184' --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9b733d568c..3bbd2486e8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -170,8 +170,8 @@ def get_osx_pipeline() dir("${project}/build") { try { - // sh "conan install --file=../conanfile_ess.txt --build=missing" - sh "cmake -DWITH_CONAN=ON -DCONAN_FILE=../code/conanfile_ess.txt ../code" + sh "conan install --file=../code/conanfile_ess.txt --build=missing" + sh "cmake ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } From beb94762acd89c7583a06eebb1f5b5f07b149304 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 07:32:56 +0100 Subject: [PATCH 07/24] ess conanfile fixed, hopefully... --- conanfile_ess.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile_ess.txt b/conanfile_ess.txt index e2ecadfa61..49156863c7 100644 --- a/conanfile_ess.txt +++ b/conanfile_ess.txt @@ -1,6 +1,6 @@ [requires] Boost/1.62.0@ess-dmsc/stable -hdf5/1.10.1-dm1@ess-dmsc/stable +hdf5/1.10.1-dm3@ess-dmsc/stable gtest/3121b20-dm1@ess-dmsc/testing #zlib/1.2.8@conan/stable cmake_installer/1.0@conan/stable From bbb0c84730aad0171959adc36b10804196345e84 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 07:35:59 +0100 Subject: [PATCH 08/24] maybe fixed now?; updates #184' --- conanfile_ess.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile_ess.txt b/conanfile_ess.txt index 49156863c7..1c225a83e0 100644 --- a/conanfile_ess.txt +++ b/conanfile_ess.txt @@ -1,6 +1,6 @@ [requires] Boost/1.62.0@ess-dmsc/stable -hdf5/1.10.1-dm3@ess-dmsc/stable +hdf5/1.10.1-dm3@ess-dmsc/testing gtest/3121b20-dm1@ess-dmsc/testing #zlib/1.2.8@conan/stable cmake_installer/1.0@conan/stable From ef70d5b385c27876c6e904fbd78dd7df1a7155e5 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 07:41:21 +0100 Subject: [PATCH 09/24] some changes to docker pipeline; updates #184' --- Jenkinsfile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3bbd2486e8..a6e6a7f399 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,13 +46,6 @@ def docker_dependencies(image_key) { sh """docker exec ${container_name(image_key)} ${custom_sh} -c \" mkdir build cd build - conan --version - set +x - conan remote add \ - desy-packages https://api.bintray.com/conan/eugenwintersberger/desy-packages - conan remote add \ - --insert 0 \ - ${conan_remote} ${local_conan_server} conan install --file=../${project}/conanfile_ess.txt --build=missing \"""" } @@ -203,8 +196,8 @@ node { //builders['centos'] = get_pipeline('centos') //builders['centos-gcc6'] = get_pipeline('centos-gcc6') //builders['fedora'] = get_pipeline('fedora') - //builders['ubuntu1604'] = get_pipeline('ubuntu1604') - builders['MocOSX'] = get_osx_pipeline() + builders['ubuntu1604'] = get_pipeline('ubuntu1604') + //builders['MocOSX'] = get_osx_pipeline() /* for (x in images.keySet()) { @@ -218,6 +211,7 @@ node { cleanWs() } +/* node ("fedora") { // Delete workspace when build is done cleanWs() @@ -304,5 +298,5 @@ node ("fedora") { } } } - } +*/ From 75b72372f581a38c8f3ed100b7f02293640c83ba Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 07:53:15 +0100 Subject: [PATCH 10/24] should go faster now; updates #184' --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a6e6a7f399..fc3ca0bfef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,23 +2,23 @@ project = "h5cpp" images = [ 'centos': [ - 'name': 'essdmscdm/centos-build-node:0.9.0', + 'name': 'essdmscdm/centos-build-node:0.9.4', 'sh': 'sh' ], 'centos-gcc6': [ - 'name': 'essdmscdm/centos-gcc6-build-node:0.3.0', + 'name': 'essdmscdm/centos-gcc6-build-node:0.3.4', 'sh': '/usr/bin/scl enable rh-python35 devtoolset-6 -- /bin/bash' ], 'fedora': [ - 'name': 'essdmscdm/fedora-build-node:0.4.1', + 'name': 'essdmscdm/fedora-build-node:0.4.2', 'sh': 'sh' ], 'ubuntu1604': [ - 'name': 'essdmscdm/ubuntu16.04-build-node:0.0.1', + 'name': 'essdmscdm/ubuntu16.04-build-node:0.0.2', 'sh': 'sh' ], 'ubuntu1710': [ - 'name': 'essdmscdm/ubuntu17.10-build-node:0.0.2', + 'name': 'essdmscdm/ubuntu17.10-build-node:0.0.3', 'sh': 'sh' ] ] From b246d8f1ff3a73048d63ea1b98aa3d9026534dcb Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 08:00:54 +0100 Subject: [PATCH 11/24] should actually go faster; updates #184' --- Jenkinsfile | 3 +++ conanfile_ess.txt | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fc3ca0bfef..52b810e7b5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,6 +46,9 @@ def docker_dependencies(image_key) { sh """docker exec ${container_name(image_key)} ${custom_sh} -c \" mkdir build cd build + conan remote add \ + --insert 0 \ + ${conan_remote} ${local_conan_server} conan install --file=../${project}/conanfile_ess.txt --build=missing \"""" } diff --git a/conanfile_ess.txt b/conanfile_ess.txt index 1c225a83e0..599fa02ab3 100644 --- a/conanfile_ess.txt +++ b/conanfile_ess.txt @@ -2,7 +2,6 @@ Boost/1.62.0@ess-dmsc/stable hdf5/1.10.1-dm3@ess-dmsc/testing gtest/3121b20-dm1@ess-dmsc/testing -#zlib/1.2.8@conan/stable cmake_installer/1.0@conan/stable [generators] From b0b9d5706c745e46b45c90f4736e7b8ff3643287 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 08:05:13 +0100 Subject: [PATCH 12/24] test centos nodes; updates #184' --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 52b810e7b5..f042767179 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -196,10 +196,10 @@ node { } def builders = [:] - //builders['centos'] = get_pipeline('centos') - //builders['centos-gcc6'] = get_pipeline('centos-gcc6') + builders['centos'] = get_pipeline('centos') + builders['centos-gcc6'] = get_pipeline('centos-gcc6') //builders['fedora'] = get_pipeline('fedora') - builders['ubuntu1604'] = get_pipeline('ubuntu1604') + //builders['ubuntu1604'] = get_pipeline('ubuntu1604') //builders['MocOSX'] = get_osx_pipeline() /* From 46f850964f908ab5e28b951cebc76d5e88b7c2f8 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 08:07:39 +0100 Subject: [PATCH 13/24] test other nodes; updates #184' --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f042767179..029e9e7864 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -196,10 +196,11 @@ node { } def builders = [:] - builders['centos'] = get_pipeline('centos') - builders['centos-gcc6'] = get_pipeline('centos-gcc6') - //builders['fedora'] = get_pipeline('fedora') + //builders['centos'] = get_pipeline('centos') + //builders['centos-gcc6'] = get_pipeline('centos-gcc6') + builders['fedora'] = get_pipeline('fedora') //builders['ubuntu1604'] = get_pipeline('ubuntu1604') + builders['ubuntu1710'] = get_pipeline('ubuntu1710') //builders['MocOSX'] = get_osx_pipeline() /* From 68c483fc07365acd3968f52ea98ab5e6df396188 Mon Sep 17 00:00:00 2001 From: MGS Date: Thu, 21 Dec 2017 08:22:59 +0100 Subject: [PATCH 14/24] most nodes and a bit simplified; updates #184' --- Jenkinsfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 029e9e7864..43d69623e6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,7 +59,7 @@ def docker_cmake(image_key) { sh """docker exec ${container_name(image_key)} ${custom_sh} -c \" cd build ${cmake_exec} --version - ${cmake_exec} -DCONAN_FILE=conanfile_ess.txt -DCMAKE_BUILD_TYPE=Release ../${project} + ${cmake_exec} ../${project} \"""" } @@ -196,19 +196,19 @@ node { } def builders = [:] - //builders['centos'] = get_pipeline('centos') - //builders['centos-gcc6'] = get_pipeline('centos-gcc6') + builders['centos'] = get_pipeline('centos') + builders['centos-gcc6'] = get_pipeline('centos-gcc6') builders['fedora'] = get_pipeline('fedora') - //builders['ubuntu1604'] = get_pipeline('ubuntu1604') - builders['ubuntu1710'] = get_pipeline('ubuntu1710') - //builders['MocOSX'] = get_osx_pipeline() + builders['ubuntu1604'] = get_pipeline('ubuntu1604') + //builders['ubuntu1710'] = get_pipeline('ubuntu1710') + builders['MocOSX'] = get_osx_pipeline() - /* + for (x in images.keySet()) { def image_key = x builders[image_key] = get_pipeline(image_key) } - */ + parallel builders // Delete workspace when build is done From 080ae5ff7c292ba2cd925bdd467ea8d26a826451 Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Thu, 21 Dec 2017 09:14:05 +0100 Subject: [PATCH 15/24] everything back in place; updates #184' --- Jenkinsfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 43d69623e6..e06eae41f6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -196,18 +196,11 @@ node { } def builders = [:] - builders['centos'] = get_pipeline('centos') - builders['centos-gcc6'] = get_pipeline('centos-gcc6') - builders['fedora'] = get_pipeline('fedora') - builders['ubuntu1604'] = get_pipeline('ubuntu1604') - //builders['ubuntu1710'] = get_pipeline('ubuntu1710') - builders['MocOSX'] = get_osx_pipeline() - - for (x in images.keySet()) { def image_key = x builders[image_key] = get_pipeline(image_key) } + builders['MocOSX'] = get_osx_pipeline() parallel builders @@ -215,7 +208,6 @@ node { cleanWs() } -/* node ("fedora") { // Delete workspace when build is done cleanWs() @@ -303,4 +295,3 @@ node ("fedora") { } } } -*/ From 2b245a81a85ff1106a0924b5ffc90e7143450c7d Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Thu, 21 Dec 2017 10:59:05 +0100 Subject: [PATCH 16/24] run tests in OSX; updates #184' --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e06eae41f6..ad8889f33c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -173,9 +173,10 @@ def get_osx_pipeline() } try { - sh "make h5cpp_shared" + sh "make run_tests" } catch (e) { - failure_function(e, 'MacOSX / build failed') + junit 'test/unit_tests_run.xml' + failure_function(e, 'MacOSX / build+test failed') } } From 128a2f30c0201d2d79ad19b31518fd73fc370efc Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Thu, 21 Dec 2017 12:01:06 +0100 Subject: [PATCH 17/24] RPATH business; updates #184' --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ad8889f33c..1c4b980315 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -167,7 +167,12 @@ def get_osx_pipeline() dir("${project}/build") { try { sh "conan install --file=../code/conanfile_ess.txt --build=missing" - sh "cmake ../code" + } catch (e) { + failure_function(e, 'MacOSX / getting dependencies failed') + } + + try { + sh "cmake -DCMAKE_OSX_RPATH=ON ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } From 00c014688f03a1f24cdf287137dde38f815b53a4 Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Thu, 21 Dec 2017 12:01:30 +0100 Subject: [PATCH 18/24] RPATH business; updates #184' --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1c4b980315..52fa27cf1c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -172,7 +172,7 @@ def get_osx_pipeline() } try { - sh "cmake -DCMAKE_OSX_RPATH=ON ../code" + sh "cmake -DCMAKE_MACOSX_RPATH=ON ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } From 4db48d9e013e0faa9363cd5ed64d53cb84f2b5a0 Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Thu, 21 Dec 2017 12:14:17 +0100 Subject: [PATCH 19/24] test osx only; updates #184' --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 52fa27cf1c..d321ce4a93 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -202,10 +202,12 @@ node { } def builders = [:] +/* for (x in images.keySet()) { def image_key = x builders[image_key] = get_pipeline(image_key) } +*/ builders['MocOSX'] = get_osx_pipeline() parallel builders From 45915cc000bee6932fa2f9490671333c14159c38 Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Thu, 21 Dec 2017 12:28:50 +0100 Subject: [PATCH 20/24] more rpath stuff?; updates #184' --- cmake/InstallConfig.cmake | 1 - src/h5cpp/CMakeLists.txt | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/InstallConfig.cmake b/cmake/InstallConfig.cmake index e7c7dbf309..954374e4e2 100644 --- a/cmake/InstallConfig.cmake +++ b/cmake/InstallConfig.cmake @@ -23,7 +23,6 @@ elseif(CMAKE_SYSTEM_NAME MATCHES Darwin) include(GNUInstallDirs) message(STATUS "==============================================================") message(STATUS "Installation directories for MacOSX: ") - set(CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}-${PROJECT_VERSION}) elseif(CMAKE_SYSTEM_NAME MATCHES Windows) diff --git a/src/h5cpp/CMakeLists.txt b/src/h5cpp/CMakeLists.txt index c3719cb747..aabb9d07e8 100644 --- a/src/h5cpp/CMakeLists.txt +++ b/src/h5cpp/CMakeLists.txt @@ -23,6 +23,11 @@ add_library(h5cpp_shared SHARED ${h5cpp_headers} ) +if(CMAKE_SYSTEM_NAME MATCHES Darwin) + set_target_properties(h5cpp_shared PROPERTIES INSTALL_RPATH "${INSTALL_PREFIX}/lib") + set_target_properties(h5cpp_shared PROPERTIES BUILD_WITH_INSTALL_RPATH ON) +endif() + target_compile_definitions(h5cpp_shared PRIVATE DLL_BUILD) set(H5CPP_LINKS ${HDF5_LIBRARIES} Boost::filesystem ${MPI_CXX_LIBRARIES}) target_include_directories(h5cpp_shared From 28fc179538cbab28af3739e7af2d0e82d5b933b0 Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Thu, 21 Dec 2017 12:32:03 +0100 Subject: [PATCH 21/24] or maybe off?; updates #184' --- Jenkinsfile | 2 +- src/h5cpp/CMakeLists.txt | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d321ce4a93..3c0f3cb1c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -172,7 +172,7 @@ def get_osx_pipeline() } try { - sh "cmake -DCMAKE_MACOSX_RPATH=ON ../code" + sh "cmake -DCMAKE_MACOSX_RPATH=OFF ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } diff --git a/src/h5cpp/CMakeLists.txt b/src/h5cpp/CMakeLists.txt index aabb9d07e8..de002f1880 100644 --- a/src/h5cpp/CMakeLists.txt +++ b/src/h5cpp/CMakeLists.txt @@ -23,11 +23,11 @@ add_library(h5cpp_shared SHARED ${h5cpp_headers} ) -if(CMAKE_SYSTEM_NAME MATCHES Darwin) - set_target_properties(h5cpp_shared PROPERTIES INSTALL_RPATH "${INSTALL_PREFIX}/lib") - set_target_properties(h5cpp_shared PROPERTIES BUILD_WITH_INSTALL_RPATH ON) -endif() - +#if(CMAKE_SYSTEM_NAME MATCHES Darwin) +# set_target_properties(h5cpp_shared PROPERTIES INSTALL_RPATH "${INSTALL_PREFIX}/lib") +# set_target_properties(h5cpp_shared PROPERTIES BUILD_WITH_INSTALL_RPATH ON) +#endif() + target_compile_definitions(h5cpp_shared PRIVATE DLL_BUILD) set(H5CPP_LINKS ${HDF5_LIBRARIES} Boost::filesystem ${MPI_CXX_LIBRARIES}) target_include_directories(h5cpp_shared From 2e2516ac3b15e5f51fd74028cea24a9eafeff18c Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Fri, 22 Dec 2017 04:56:29 +0100 Subject: [PATCH 22/24] RPATH fix for conan --- CMakeLists.txt | 2 +- cmake/InstallConfig.cmake | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cf7f0fb4f..403e3c7866 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ endif () if (EXISTS ${PROJECT_BINARY_DIR}/conanbuildinfo.cmake) message(STATUS "Using existing conanbuildinfo.cmake file") include(${PROJECT_BINARY_DIR}/conanbuildinfo.cmake) - conan_basic_setup() + conan_basic_setup(KEEP_RPATHS) endif () #============================================================================= diff --git a/cmake/InstallConfig.cmake b/cmake/InstallConfig.cmake index 954374e4e2..32c863657d 100644 --- a/cmake/InstallConfig.cmake +++ b/cmake/InstallConfig.cmake @@ -21,6 +21,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES Darwin) # on OSX we can also use GNUInstallDirs module to # determine the installation paths include(GNUInstallDirs) + message(STATUS "==============================================================") message(STATUS "Installation directories for MacOSX: ") set(CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}-${PROJECT_VERSION}) @@ -43,10 +44,6 @@ elseif(CMAKE_SYSTEM_NAME MATCHES Windows) message(STATUS "==============================================================") message(STATUS "Installation directories for Windows: ") - -elseif(CMAKE_SYSTEM_NAME MATCHES Darwin) - - # add here configuration for OSX endif() From 909e38179b91982172bf38461ea6dd418e86bf4d Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Fri, 22 Dec 2017 05:02:59 +0100 Subject: [PATCH 23/24] all platforms back in, cleaned up Jenkins script; updates #184' --- Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3c0f3cb1c6..6b5bd1c3bf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -172,7 +172,7 @@ def get_osx_pipeline() } try { - sh "cmake -DCMAKE_MACOSX_RPATH=OFF ../code" + sh "cmake ../code" } catch (e) { failure_function(e, 'MacOSX / CMake failed') } @@ -180,7 +180,7 @@ def get_osx_pipeline() try { sh "make run_tests" } catch (e) { - junit 'test/unit_tests_run.xml' + junit 'test/unit_tests_run.xml' failure_function(e, 'MacOSX / build+test failed') } } @@ -202,12 +202,10 @@ node { } def builders = [:] -/* for (x in images.keySet()) { def image_key = x builders[image_key] = get_pipeline(image_key) } -*/ builders['MocOSX'] = get_osx_pipeline() parallel builders From d933b11edcca1210064f54fbb336800c74c6694c Mon Sep 17 00:00:00 2001 From: Martin Shetty Date: Fri, 22 Dec 2017 05:11:02 +0100 Subject: [PATCH 24/24] more cleanup of cmake; updates #184' --- src/h5cpp/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/h5cpp/CMakeLists.txt b/src/h5cpp/CMakeLists.txt index de002f1880..c3719cb747 100644 --- a/src/h5cpp/CMakeLists.txt +++ b/src/h5cpp/CMakeLists.txt @@ -23,11 +23,6 @@ add_library(h5cpp_shared SHARED ${h5cpp_headers} ) -#if(CMAKE_SYSTEM_NAME MATCHES Darwin) -# set_target_properties(h5cpp_shared PROPERTIES INSTALL_RPATH "${INSTALL_PREFIX}/lib") -# set_target_properties(h5cpp_shared PROPERTIES BUILD_WITH_INSTALL_RPATH ON) -#endif() - target_compile_definitions(h5cpp_shared PRIVATE DLL_BUILD) set(H5CPP_LINKS ${HDF5_LIBRARIES} Boost::filesystem ${MPI_CXX_LIBRARIES}) target_include_directories(h5cpp_shared