Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libfortran-support
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libfortran-support
Commits
c5691ed7
Commit
c5691ed7
authored
1 year ago
by
Jonas Jucker
Browse files
Options
Downloads
Patches
Plain Diff
add cache variable for pthread-flag
parent
fec8d61e
No related branches found
No related tags found
1 merge request
!21
[NAG] Add to CI, use -lpthreads instead of -phtread
Pipeline
#47752
passed
1 year ago
Stage: lint
Stage: build
Stage: build_and_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/CMakeLists.txt
+12
-4
12 additions, 4 deletions
src/CMakeLists.txt
with
12 additions
and
4 deletions
src/CMakeLists.txt
+
12
−
4
View file @
c5691ed7
...
@@ -46,11 +46,19 @@ add_library(fortran-support
...
@@ -46,11 +46,19 @@ add_library(fortran-support
add_library
(
${
PROJECT_NAME
}
::fortran-support ALIAS fortran-support
)
add_library
(
${
PROJECT_NAME
}
::fortran-support ALIAS fortran-support
)
#
if(CMAKE_Fortran_COMPILER_ID MATCHES "^NAG")
if
(
CMAKE_Fortran_COMPILER_ID MATCHES
"^NAG"
)
set
(
THREADS_PREFER_PTHREAD_FLAG OFF
)
set
(
THREADS_PREFER_PTHREAD_FLAG OFF
)
#else()
if
(
DEFINED HAVE_PTHREAD_H
)
# set(THREADS_PREFER_PTHREAD_FLAG ON)
set
(
PTHREADS_LINK_FLAG
"-lpthread"
CACHE STRING
"Flag used to make pthread available"
)
#endif()
endif
()
else
()
set
(
THREADS_PREFER_PTHREAD_FLAG ON
)
if
(
DEFINED HAVE_PTHREAD_H
)
set
(
PTHREADS_LINK_FLAG
"-pthread"
CACHE STRING
"Flag used to make pthread available"
)
endif
()
endif
()
find_package
(
Threads REQUIRED
)
find_package
(
Threads REQUIRED
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE Threads::Threads
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE Threads::Threads
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment