Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
8b6f6cb9
Commit
8b6f6cb9
authored
Mar 21, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use -pthread option rather than CMake script
parent
b3963c04
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
60 deletions
+6
-60
CMakeLists.txt
CMakeLists.txt
+6
-4
FindPTHREAD.cmake
FindPTHREAD.cmake
+0
-56
No files found.
CMakeLists.txt
View file @
8b6f6cb9
...
...
@@ -162,11 +162,13 @@ if (BOOST_ROOT)
set
(
Boost_NO_SYSTEM_PATHS true
)
endif
()
find_package
(
PTHREAD REQUIRED
)
set
(
INCLUDE_DIRS .
${
PTHREAD_INCLUDE_DIR
}
)
set
(
INCLUDE_DIRS .
)
set
(
LD_DIRS
)
set
(
LD_FLAGS
${
CMAKE_LD_LIBS
}
${
PTHREAD_LIBRARIES
}
)
set
(
LD_FLAGS
${
CMAKE_LD_LIBS
}
)
if
(
UNIX
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-pthread"
)
endif
(
UNIX
)
if
(
ENABLE_OPENCL
)
find_package
(
OPENCL REQUIRED
)
...
...
FindPTHREAD.cmake
deleted
100644 → 0
View file @
b3963c04
# - Find pthread
# Find the native PTHREAD headers and libraries.
#
# PTHREAD_INCLUDE_DIR - where to find pthread.h, etc.
# PTHREAD_LIBRARIES - List of libraries when using pthread.
# PTHREAD_FOUND - True if pthread found.
GET_FILENAME_COMPONENT
(
module_file_path
${
CMAKE_CURRENT_LIST_FILE
}
PATH
)
# Look for the header file.
FIND_PATH
(
PTHREAD_INCLUDE_DIR NAMES pthread.h
PATHS $ENV{H3D_EXTERNAL_ROOT}/include
$ENV{H3D_EXTERNAL_ROOT}/include/pthread
$ENV{H3D_ROOT}/../External/include
$ENV{H3D_ROOT}/../External/include/pthread
../../External/include
../../External/include/pthread
${
module_file_path
}
/../../../External/include
${
module_file_path
}
/../../../External/include/pthread
)
MARK_AS_ADVANCED
(
PTHREAD_INCLUDE_DIR
)
# Look for the library.
IF
(
WIN32
)
FIND_LIBRARY
(
PTHREAD_LIBRARY NAMES pthreadVC2
PATHS $ENV{H3D_EXTERNAL_ROOT}/lib
$ENV{H3D_ROOT}/../External/lib
../../External/lib
${
module_file_path
}
/../../../External/lib
)
ELSE
(
WIN32
)
FIND_LIBRARY
(
PTHREAD_LIBRARY NAMES pthread
)
ENDIF
(
WIN32
)
MARK_AS_ADVANCED
(
PTHREAD_LIBRARY
)
# Copy the results to the output variables.
IF
(
PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY
)
SET
(
PTHREAD_FOUND 1
)
SET
(
PTHREAD_LIBRARIES
${
PTHREAD_LIBRARY
}
)
SET
(
PTHREAD_INCLUDE_DIR
${
PTHREAD_INCLUDE_DIR
}
)
ELSE
(
PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY
)
SET
(
PTHREAD_FOUND 0
)
SET
(
PTHREAD_LIBRARIES
)
SET
(
PTHREAD_INCLUDE_DIR
)
ENDIF
(
PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY
)
# Report the results.
IF
(
NOT PTHREAD_FOUND
)
SET
(
PTHREAD_DIR_MESSAGE
"PTHREAD was not found. Make sure PTHREAD_LIBRARY and PTHREAD_INCLUDE_DIR are set. Pthread is required to compile."
)
IF
(
PTHREAD_FIND_REQUIRED
)
MESSAGE
(
FATAL_ERROR
"
${
PTHREAD_DIR_MESSAGE
}
"
)
ELSEIF
(
NOT PTHREAD_FIND_QUIETLY
)
MESSAGE
(
STATUS
"
${
PTHREAD_DIR_MESSAGE
}
"
)
ENDIF
(
PTHREAD_FIND_REQUIRED
)
ENDIF
(
NOT PTHREAD_FOUND
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment