-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation Folder & rpath urls #103
Conversation
This is now pretty fine -> executable work in build the output of
where as the binary in the build folder works and has
this is the reason it work in the build folder, I dont understand why cmake has not correctly adapted the RPATH after installing, there is a misconfiguration I think... |
CMake/utility.cmake
Outdated
@@ -165,7 +165,7 @@ function(loadFolder FOLDER _HEADER_FILES _SOURCE_FILES) | |||
getNameOfDir(CMAKE_CURRENT_SOURCE_DIR DIRNAME) | |||
if (${shouldInstall}) | |||
if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$") # we don't want to install header files which are marked as private | |||
install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this removed? I want that the installed header files should not be modified by accident.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong merge, I will correct that
thanks, its a mistake! |
CMakeLists.txt
Outdated
@@ -31,7 +31,7 @@ | |||
# the build configuration options are initialized. # | |||
#################################################################################### | |||
|
|||
cmake_minimum_required (VERSION 2.8.12) | |||
cmake_minimum_required (VERSION 3.10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.10 version is too strict, IMO 3.0 is enough, unless you use something specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
ok, cmake version 3.0 is fine for me, I rather work with the newest, since there is better behavior :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and it is not a problem for the user to have higher version
$ mkdir build
$ cd build
$ cmake ..
$ make fails with
Linux Ubuntu 16.04 |
@Warchant : Could you extract some information in the unit_test binaries (I could not build them I mean what is the RPATH the unit tests executable is searching for the library, https://cmake.org/Wiki/CMake_RPATH_handling I think we miss some configuration for rttr/src/unit_tests/CMakeLists.txt Line 46 in 47d576c
but that line I added to the other exes, is for installation only, I think I have to check on my linux machine
|
Building with gcc4.9 (macOs).... lets see whats the problem |
ok found the error, I think I mistakenly misscorrected the beahvior for rpath... |
lets look on the tests, the unit tests build with gcc4.9 on mac, libraries are loaded, but no executable does run (unit_tests and benchmarks),
@acki-m: Any idea? Supposed wrong linking, ...? |
seems to compile now, apple travis is missing, they have problems I think... |
OK: only https://travis-ci.org/rttrorg/rttr/jobs/332456069 still fails due to some installation problems , probably re-run it again.... |
What are you fixing here? What is the problem on MacOSX? |
Changed the PR title: I made more consistent cmake code, for linux and mac, windows, and set the settings for the rpath urls in the binaries.
These fixes are also incorporated for the PR #100 (which is on good way I think, since, clang 7.0 compiles fine with all warning on, except for benchmarks and unit_tests there I have disabled some minor ones... (see the PR) |
Can we merge this? |
I checked it out and compiled it with MSVC. It works so far, however.
PS: I would merge this first, because this fixes the path handling |
that would be great!,
|
Damn't it I checked out master from your fork ^^ |
Oh pitty, ehm -> let me know if something is not working, so we can fix it =) |
At least appveyor succeded, the others are a bit stuck |
CMake/config.cmake
Outdated
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}") | ||
endif() | ||
|
||
set(CMAKE_DEBUG_POSTFIX CACHE STRING "_d") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The postfix is necessary, otherwise we cannot copy the debug and release libraries, into one folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sure! but why is it not working? the CMAKE_DEBUG_POSTFIX is set...?
CMake/config.cmake
Outdated
COMPONENT Devel) | ||
|
||
install(FILES "${LICENSE_FILE}" "${README_FILE}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license files are missing
CMake/config.cmake
Outdated
@@ -134,10 +161,6 @@ write_basic_package_version_file( | |||
|
|||
if (BUILD_INSTALLER) | |||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CMake/rttr-config-version.cmake" | |||
DESTINATION cmake | |||
DESTINATION ${CMAKE_INSTALL_DATADIR}/rttr/cmake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the lib folder should be empty? isnt it? the libraries should all go into the bin folder...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be we could symlink on windows into the lib folder, and install all everythin properly in the lib folder?, why is the lib folder even constructed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lib folder has to be there, there are the *.lib files placed.
necessary to link the libraries on windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, where is this path hardcoded into cmake? i didnt see that one? maybe I missed something?
CMakeLists.txt
Outdated
@@ -31,7 +31,7 @@ | |||
# the build configuration options are initialized. # | |||
#################################################################################### | |||
|
|||
cmake_minimum_required (VERSION 2.8.12) | |||
cmake_minimum_required (VERSION 3.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to 3.0
fixed, strange with the debug post fix? does it work with a reconfigure?
|
…rttr-config.cmake
This will fix it:
|
think I found the error, fixing it
|
@@ -0,0 +1,2 @@ | |||
.vscode | |||
build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line
CMake/config.cmake
Outdated
endif() | ||
|
||
set(CMAKE_DEBUG_POSTFIX "_d") | ||
set(CMAKE_DEBUG_POSTFIX CACHE STRING "_d") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed.
You have to add the DEBUG_POSTFIX _d
to all target properties
It seems to work now, I wait for the MSVC builds to finish, then I will merge |
jup, for me to, on mac os, installation folder looks clean. tests passed... |
Oh, it dont know why I changed, -stdlib=libstdc++ -static -lstdc++ |
@gabyx |
Jeah, thats a good thing to do,
sorry, I was a bit profusely with comitting Thanks for your time! |
the same as in #101 ,