Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
a86bd502
There was an error fetching the commit references. Please try again later.
Commit
a86bd502
authored
7 years ago
by
Jakub Klinkovský
Browse files
Options
Downloads
Patches
Plain Diff
Fixed OpenMP in CMakeLists.txt
parent
29b5ea69
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+10
-9
10 additions, 9 deletions
CMakeLists.txt
with
10 additions
and
9 deletions
CMakeLists.txt
+
10
−
9
View file @
a86bd502
...
...
@@ -26,6 +26,11 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include
(
OptimizeForArchitecture
)
# Note that in cmake 3.10 the FindOpenMP module is broken - it does not work when
# CMAKE_EXECUTABLE_SUFFIX is not empty, see https://www.mail-archive.com/cmake@cmake.org/msg56886.html
# Hence, we find OpenMP before setting CMAKE_EXECUTABLE_SUFFIX.
find_package
(
OpenMP
)
####
# Settings for debug/release version
#
...
...
@@ -34,8 +39,8 @@ if( CMAKE_BUILD_TYPE STREQUAL "Debug")
set
(
PROJECT_TOOLS_PATH
${
PROJECT_SOURCE_DIR
}
/Debug/bin
)
set
(
LIBRARY_OUTPUT_PATH
${
PROJECT_SOURCE_DIR
}
/Debug/lib
)
set
(
EXECUTABLE_OUTPUT_PATH
${
PROJECT_SOURCE_DIR
}
/Debug/bin
)
set
(
CMAKE_EXECUTABLE_SUFFIX
"-dbg"
)
# suffix for executables
set
(
CMAKE_DEBUG_POSTFIX
"-dbg"
)
# suffix for libraries
set
(
CMAKE_EXECUTABLE_SUFFIX
"-dbg
${
CMAKE_EXECUTABLE_SUFFIX
}
"
)
# suffix for executables
set
(
CMAKE_DEBUG_POSTFIX
"-dbg"
)
# suffix for libraries
else
()
set
(
PROJECT_BUILD_PATH
${
PROJECT_SOURCE_DIR
}
/Release/src
)
set
(
PROJECT_TOOLS_PATH
${
PROJECT_SOURCE_DIR
}
/Release/bin
)
...
...
@@ -212,14 +217,10 @@ endif( WITH_CUDA STREQUAL "yes" )
####
# Check for OpenMP
#
# FIXME: in cmake 3.10 the OpenMP module is broken - it does not work when CMAKE_EXECUTABLE_SUFFIX
# is not empty, see https://www.mail-archive.com/cmake@cmake.org/msg56886.html
#find_package( OpenMP )
#if( OPENMP_FOUND )
if
(
OPENMP_FOUND
)
message
(
"Compiler supports OpenMP."
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DHAVE_OPENMP -fopenmp"
)
#endif()
#set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_OPENMP -fopenmp=libgomp" )
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DHAVE_OPENMP
${
OpenMP_CXX_FLAGS
}
"
)
endif
()
####
# Check for MPI
...
...
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