Changeset 14d3171 in tol
- Timestamp:
- Oct 2, 2015, 7:12:19 AM (11 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 0064724
- Parents:
- 00fb955
- File:
-
- 1 edited
-
tol/CMakeLists.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/CMakeLists.txt
r00fb955 r14d3171 1 1 cmake_minimum_required( VERSION 2.8 ) 2 2 project( TOL ) 3 4 #----------------------------------------------------------------------------- 5 # 6 # To fix compilation problem: relocation R_X86_64_32 against `a local symbol' can not be 7 # used when making a shared object; recompile with -fPIC 8 # See http://www.cmake.org/pipermail/cmake/2007-May/014350.html 9 # 10 if( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT WIN32 ) 11 set( NEED_FPIC "-fPIC" ) 12 else( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT WIN32 ) 13 unset( NEED_FPIC ) 14 endif( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT WIN32 ) 3 15 4 16 if( TOL_EXTERNAL_DEVEL_DIR ) … … 73 85 #message( STATUS "add_library( ${name} OBJECT ${ARGN} )" ) 74 86 if( CMAKE_BUILD_TYPE MATCHES Debug ) 75 # -fstack-protector-all -Wstack-protector -fno-omit-frame-pointer76 # versiones recientes de gcc tienen estas opciones que pueden ser utiles: -fsanitize=address -fsanitize=alignment77 set_property(TARGET ${name} PROPERTY COMPILE_FLAGS "-fPIC -mno-align-double -Wall")78 else()79 set_property(TARGET ${name} PROPERTY COMPILE_FLAGS "-O2 -fPIC -mno-align-double")80 endif( )87 #set_property(TARGET ${name} PROPERTY COMPILE_FLAGS "-fPIC -Wall") 88 target_compile_options( ${name} PRIVATE "-Wall" ) 89 endif( CMAKE_BUILD_TYPE MATCHES Debug ) 90 if( NEED_FPIC ) 91 target_compile_options( ${name} PRIVATE "-fPIC" ) 92 endif( NEED_FPIC ) 81 93 if( TOL_SUBLIBRARIES STREQUAL "" ) 82 94 set( TOL_SUBLIBRARIES $<TARGET_OBJECTS:${name}> CACHE INTERNAL "" )
Note: See TracChangeset
for help on using the changeset viewer.
