Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
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
nexedi
MariaDB
Commits
97c268f8
Commit
97c268f8
authored
Jun 30, 2019
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows, compiling . various cleanups, use /Zi instead of /Z7
parent
0efe50ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
cmake/os/Windows.cmake
cmake/os/Windows.cmake
+8
-18
No files found.
cmake/os/Windows.cmake
View file @
97c268f8
...
...
@@ -107,6 +107,7 @@ IF(MSVC)
SET
(
DYNAMIC_UCRT_LINKER_OPTION
" /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib"
)
IF
(
WITH_ASAN
)
SET
(
MSVC_CRT_TYPE /MD CACHE STRING FORCE
)
ENABLE_ASAN
()
ENDIF
()
...
...
@@ -119,19 +120,11 @@ IF(MSVC)
"
${
CMAKE_
${
type
}
_LINKER_FLAGS_MINSIZEREL
}
/debug"
)
ENDFOREACH
()
# Force static runtime libraries
# - Choose debugging information:
# /Z7
# Produces an .obj file containing full symbolic debugging
# information for use with the debugger. The symbolic debugging
# information includes the names and types of variables, as well as
# functions and line numbers. No .pdb file is produced by the compiler.
#
# - Remove preprocessor flag _DEBUG that older cmakes use with Config=Debug,
# it is as defined by Debug runtimes itself (/MTd /MDd)
# Force runtime libraries
# Compile with /Zi to get debugging information
FOREACH
(
lang C CXX
)
SET
(
CMAKE_
${
lang
}
_FLAGS_RELEASE
"
${
CMAKE_
${
lang
}
_FLAGS_RELEASE
}
/Z
7
"
)
SET
(
CMAKE_
${
lang
}
_FLAGS_RELEASE
"
${
CMAKE_
${
lang
}
_FLAGS_RELEASE
}
/Z
i
"
)
ENDFOREACH
()
FOREACH
(
flag
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
...
...
@@ -141,10 +134,8 @@ IF(MSVC)
CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL
)
STRING
(
REGEX REPLACE
"/M[TD][d]?"
"
${
MSVC_CRT_TYPE
}
"
"
${
flag
}
"
"
${${
flag
}}
"
)
STRING
(
REGEX REPLACE
"/D[ ]?_DEBUG"
""
"
${
flag
}
"
"
${${
flag
}}
"
)
STRING
(
REPLACE
"/Zi"
"/Z7"
"
${
flag
}
"
"
${${
flag
}}
"
)
IF
(
NOT
"
${${
flag
}}
"
MATCHES
"/Z7"
)
STRING
(
APPEND
${
flag
}
" /Z7"
)
IF
(
NOT
"
${${
flag
}}
"
MATCHES
"/Zi"
)
STRING
(
APPEND
${
flag
}
" /Zi"
)
ENDIF
()
ENDFOREACH
()
...
...
@@ -157,7 +148,6 @@ IF(MSVC)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CLANG_CL_FLAGS
}
"
)
ENDIF
()
# Fix CMake's predefined huge stack size
FOREACH
(
type EXE SHARED MODULE
)
STRING
(
REGEX REPLACE
"/STACK:([^ ]+)"
""
CMAKE_
${
type
}
_LINKER_FLAGS
"
${
CMAKE_
${
type
}
_LINKER_FLAGS
}
"
)
STRING
(
REGEX REPLACE
"/INCREMENTAL:([^ ]+)"
"/INCREMENTAL:NO"
CMAKE_
${
type
}
_LINKER_FLAGS_RELWITHDEBINFO
"
${
CMAKE_
${
type
}
_LINKER_FLAGS_RELWITHDEBINFO
}
"
)
...
...
@@ -180,7 +170,7 @@ IF(MSVC)
ENDIF
()
# Speed up multiprocessor build
IF
(
MSVC_VERSION GREATER 1400
AND
(
NOT CMAKE_CXX_COMPILER_ID MATCHES Clang
)
)
IF
(
NOT CMAKE_CXX_COMPILER_ID MATCHES Clang
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
/MP"
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/MP"
)
ENDIF
()
...
...
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