Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
6e7f3f3d
Unverified
Commit
6e7f3f3d
authored
Feb 20, 2019
by
Quan (Andy) Gan
Committed by
GitHub
Feb 20, 2019
Browse files
Find OpenMP in CMake (#402)
parent
bd9171d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
CMakeLists.txt
CMakeLists.txt
+6
-4
src/graph/sampler.cc
src/graph/sampler.cc
+1
-1
No files found.
CMakeLists.txt
View file @
6e7f3f3d
...
@@ -43,10 +43,12 @@ else(MSVC)
...
@@ -43,10 +43,12 @@ else(MSVC)
check_cxx_compiler_flag
(
"-std=c++11"
SUPPORT_CXX11
)
check_cxx_compiler_flag
(
"-std=c++11"
SUPPORT_CXX11
)
set
(
CMAKE_C_FLAGS
"-O2 -Wall -fPIC
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_C_FLAGS
"-O2 -Wall -fPIC
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-O2 -Wall -fPIC -std=c++11
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-O2 -Wall -fPIC -std=c++11
${
CMAKE_CXX_FLAGS
}
"
)
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
set
(
CMAKE_C_FLAGS
"-fopenmp
${
CMAKE_C_FLAGS
}
"
)
include
(
FindOpenMP
)
set
(
CMAKE_CXX_FLAGS
"-fopenmp
${
CMAKE_CXX_FLAGS
}
"
)
if
(
OPENMP_FOUND
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
OpenMP_C_FLAGS
}
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
OpenMP_CXX_FLAGS
}
${
CMAKE_CXX_FLAGS
}
"
)
endif
(
OPENMP_FOUND
)
endif
(
MSVC
)
endif
(
MSVC
)
# Source file lists
# Source file lists
...
...
src/graph/sampler.cc
View file @
6e7f3f3d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#include <algorithm>
#include <algorithm>
#include <cstdlib>
#include <cstdlib>
#include <cmath>
#include <cmath>
#include <omp.h>
#include <
dmlc/
omp.h>
#ifdef _MSC_VER
#ifdef _MSC_VER
// rand in MS compiler works well in multi-threading.
// rand in MS compiler works well in multi-threading.
...
...
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