Browse Source

build system: set PIC property for odr target explicitly

Michele Caini 3 years ago
parent
commit
006822c7fc
1 changed files with 1 additions and 0 deletions
  1. 1 0
      test/CMakeLists.txt

+ 1 - 0
test/CMakeLists.txt

@@ -84,6 +84,7 @@ function(SETUP_TARGET TARGET_NAME)
 endfunction()
 
 add_library(odr OBJECT odr.cpp)
+set_target_properties(odr PROPERTIES POSITION_INDEPENDENT_CODE ON)
 SETUP_TARGET(odr)
 
 function(SETUP_BASIC_TEST TEST_NAME TEST_SOURCES)