-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stable/2025: copy fix of pthread and sthread problems from master.
- Loading branch information
Showing
4 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later | ||
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]> | ||
# SPDX-FileContributor: 2003-24 Bradley M. Bell | ||
# SPDX-FileContributor: 2003-25 Bradley M. Bell | ||
# ---------------------------------------------------------------------------- | ||
|
||
# initialize list as empty | ||
|
@@ -14,18 +14,15 @@ SET(check_example_multi_thread_depends "") | |
# VARIABLE - variable to store the result | ||
INCLUDE(CheckLibraryExists) | ||
|
||
# | ||
# sthread | ||
ADD_SUBDIRECTORY(sthread) | ||
# | ||
# openmp | ||
IF ( OpenMP_CXX_FOUND ) | ||
# OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support | ||
ADD_SUBDIRECTORY(openmp) | ||
ENDIF ( OpenMP_CXX_FOUND ) | ||
# | ||
# pthread | ||
SET(pthread_lib "pthread") | ||
# pthread_lib_path | ||
SET( pthread_ok FALSE ) | ||
FIND_LIBRARY(pthread_lib_path pthread) | ||
MESSAGE(STATUS "pthread library path = ${pthread_lib_path}") | ||
IF ( pthread_lib_path ) | ||
|
@@ -40,6 +37,14 @@ IF ( pthread_lib_path ) | |
ADD_SUBDIRECTORY(pthread) | ||
ENDIF ( pthread_ok ) | ||
ENDIF ( pthread_lib_path ) | ||
IF( NOT pthread_ok ) | ||
SET( pthread_lib_path "" ) | ||
ENDIF( NOT pthread_ok ) | ||
# | ||
# sthread | ||
# Put sthread after pthread because it can somtimes require pthread_lib_path | ||
# https://stackoverflow.com/questions/46994982 | ||
ADD_SUBDIRECTORY(sthread) | ||
# | ||
# bthread | ||
IF ( Boost_FOUND ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later | ||
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]> | ||
# SPDX-FileContributor: 2003-24 Bradley M. Bell | ||
# SPDX-FileContributor: 2003-25 Bradley M. Bell | ||
# ---------------------------------------------------------------------------- | ||
# Build the example/multi_thread/pthread directory tests | ||
# Inherit build type from ../CMakeList.txt | ||
|
@@ -27,15 +27,11 @@ set_compile_flags( example_multi_thread_pthread "${cppad_debug_which}" "${source | |
# | ||
ADD_EXECUTABLE( example_multi_thread_pthread EXCLUDE_FROM_ALL ${source_list} ) | ||
|
||
# Paths in which the linker will search for libraries, | ||
# only applies to targets created after it is called | ||
LINK_DIRECTORIES( ${pthread_lib_path} ) | ||
|
||
# List of libraries to be linked into the specified target | ||
TARGET_LINK_LIBRARIES(example_multi_thread_pthread | ||
${cppad_lib} | ||
${colpack_libs} | ||
${pthread_lib} | ||
${pthread_lib_path} | ||
) | ||
|
||
# check_example_multi_thread_pthread | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later | ||
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]> | ||
# SPDX-FileContributor: 2003-24 Bradley M. Bell | ||
# SPDX-FileContributor: 2003-25 Bradley M. Bell | ||
# ---------------------------------------------------------------------------- | ||
# Build the example/multi_thread/sthread directory tests | ||
# Inherit build type from ../CMakeList.txt | ||
|
@@ -33,6 +33,7 @@ ADD_EXECUTABLE( example_multi_thread_sthread EXCLUDE_FROM_ALL ${source_list} ) | |
TARGET_LINK_LIBRARIES(example_multi_thread_sthread | ||
${cppad_lib} | ||
${colpack_libs} | ||
${pthread_lib_path} | ||
) | ||
|
||
# check_example_multi_thread_sthread | ||
|