Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Compile pthread-mutex-simple in a way that allows its model-checking
[simgrid.git] / examples / sthread / CMakeLists.txt
index 784b55af44a9f2bb71f6e135768bee90dd89d04a..6a91932067bd038677f68429cbbbef3c36fc1bca 100644 (file)
@@ -11,9 +11,10 @@ foreach(x
     add_executable       (pthread-${x} EXCLUDE_FROM_ALL pthread-${x}.c)
     set_target_properties(pthread-${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
     target_link_libraries(pthread-${x} PRIVATE Threads::Threads)
+    target_link_options(pthread-${x} PUBLIC "-Wl,-znorelro -Wl,-znoseparate-code")
 
     add_dependencies(tests pthread-${x})
-    ADD_TESH_FACTORIES(pthread-${x} "^thread" --setenv LD_PRELOAD=${CMAKE_BINARY_DIR}/lib/libsthread.so --cd ${CMAKE_BINARY_DIR}/examples/sthread ${CMAKE_CURRENT_SOURCE_DIR}/pthread-${x}.tesh)
+    ADD_TESH_FACTORIES(pthread-${x} "^thread" --setenv libdir=${CMAKE_BINARY_DIR}/lib --cd ${CMAKE_BINARY_DIR}/examples/sthread ${CMAKE_CURRENT_SOURCE_DIR}/pthread-${x}.tesh)
   endif()
 
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/pthread-${x}.tesh)