Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
cb31b1d0
Commit
cb31b1d0
authored
Nov 02, 2018
by
lixiaoquan
Committed by
Tianqi Chen
Nov 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine CMakeLists.txt (#2049)
parent
c48812dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
CMakeLists.txt
+6
-2
No files found.
CMakeLists.txt
View file @
cb31b1d0
...
@@ -80,8 +80,12 @@ if(MSVC)
...
@@ -80,8 +80,12 @@ if(MSVC)
else
(
MSVC
)
else
(
MSVC
)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
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
}
"
)
if
(
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
"Debug"
)
set
(
CMAKE_CXX_FLAGS
"-O2 -Wall -fPIC -std=c++11
${
CMAKE_CXX_FLAGS
}
"
)
add_compile_options
(
-Wall -fPIC -std=c++11
)
else
()
set
(
CMAKE_C_FLAGS
"-O2 -Wall -fPIC
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-O2 -Wall -fPIC -std=c++11
${
CMAKE_CXX_FLAGS
}
"
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"GNU"
AND
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"GNU"
AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0
)
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0
)
set
(
CMAKE_CXX_FLAGS
"-faligned-new
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-faligned-new
${
CMAKE_CXX_FLAGS
}
"
)
...
...
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