Merge pull request #41 from bska/041_cmake

Synchronise build system with opm-core to restore debugging on MacOS X
This commit is contained in:
Atgeirr Flø Rasmussen
2013-10-07 00:11:39 -07:00
4 changed files with 11 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ find_opm_package (
"${ewoms_DEPS}"
# header to search for
"ewoms/common/start.h"
"ewoms/common/start.hh"
# library to search for
""

View File

@@ -21,7 +21,7 @@ find_opm_package (
"${opm-material_DEPS}"
# header to search for
"opm/material/constants.hh"
"opm/material/Constants.hpp"
# library to search for
""
@@ -30,7 +30,7 @@ find_opm_package (
""
# test program
"#include <opm/material/constants.hh>
"#include <opm/material/Constants.hpp>
int main (void) {
double c = Opm::Constants<double>::c;
return 0;

View File

@@ -44,8 +44,14 @@ macro (opm_install opm)
# static libraries don't have their debug info stripped, so there is
# only a separate file when we are building shared objects
if (${opm}_LIBRARY_TYPE STREQUAL "SHARED" AND ${opm}_TARGET AND ${opm}_DEBUG)
# on MacOS X, debug files are actually bundles (directories)
if (APPLE)
set (_dbg_type DIRECTORY)
else ()
set (_dbg_type FILES)
endif ()
install (
FILES ${PROJECT_BINARY_DIR}/${${opm}_DEBUG}
${_dbg_type} ${PROJECT_BINARY_DIR}/${${opm}_DEBUG}
DESTINATION ${_dbg_prefix}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${${opm}_VER_DIR}
)
endif (${opm}_LIBRARY_TYPE STREQUAL "SHARED" AND ${opm}_TARGET AND ${opm}_DEBUG)

View File

@@ -106,7 +106,7 @@ function (strip_debug_symbols targets)
add_custom_command (TARGET ${target}
POST_BUILD
WORKING_DIRECTORY ${_dir}
COMMAND ${DSYMUTIL} ARGS --flat --out=${_target_file}${_debug_ext} ${_target_file}
COMMAND ${DSYMUTIL} ARGS --out=${_target_file}${_debug_ext} ${_target_file}
COMMAND ${OBJCOPY} ARGS -S ${_target_file}
VERBATIM
)