|
Notes |
|
|
(0040588)
|
|
Clinton Stimpson
|
|
2016-03-02 09:25
|
|
This snippet from Qt5CoreConfigExtras.cmake which is part of a Qt5 installation may be relevant.
# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The
# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module
# macro to add it.
set(Qt5_POSITION_INDEPENDENT_CODE True)
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS "-fPIC")
if (CMAKE_VERSION VERSION_LESS 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE "ON")
else()
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS -fPIC)
endif() |
|
|
|
(0040589)
|
|
Jordan
|
|
2016-03-02 10:16
|
|
I use SET(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "") and I SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILEFLAGS}" CACHE BOOL "" FORCE)
neither works. |
|
|
|
(0042954)
|
|
Kitware Robot
|
|
2016-06-10 14:29
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|