Skip to content

Commit

Permalink
{cmake} Use POSITION_INDEPENDENT_CODE
Browse files Browse the repository at this point in the history
This is an attempt to fix a Linux build problem.

Also turns on interprocedural optimization in release mode.

Part of #9
  • Loading branch information
asmaloney committed Jun 14, 2024
1 parent 97fa989 commit fd4c098
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ if ( PLUGIN-3rdParty_MESH_IO )
cxx_std_17
)

set_target_properties( ${PROJECT_NAME}
PROPERTIES
CXX_EXTENSIONS NO
EXPORT_COMPILE_COMMANDS ON
POSITION_INDEPENDENT_CODE ON
INTERPROCEDURAL_OPTIMIZATION ON
INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF
)

include_directories( BEFORE extern/assimp/include )

add_subdirectory( include )
Expand Down

0 comments on commit fd4c098

Please sign in to comment.