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
bd4b896a
Commit
bd4b896a
authored
Jul 01, 2009
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preparation for using CMake for more than Windows by only checking for WIN_ATOMICS32/64 on Windows
parent
eed527ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
storage/innobase/CMakeLists.txt
storage/innobase/CMakeLists.txt
+19
-18
No files found.
storage/innobase/CMakeLists.txt
View file @
bd4b896a
...
...
@@ -25,27 +25,28 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
PROPERTIES COMPILE_FLAGS -Od
)
ENDIF
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
AND CMAKE_SIZEOF_VOID_P MATCHES 8
)
IF
(
NOT WITHOUT_ATOMICS
)
IF
(
WIN32
)
IF
(
NOT WITHOUT_ATOMICS
)
# Check if this Windows version supports atomic instructions
IF
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
IF
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
# Check for 64 bit atomics
TRY_RUN
(
RUN_RES COMPILE_RES
${
CMAKE_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
/storage/innobase/win_atomics64_test.c
)
IF
(
COMPILE_RES AND NOT RUN_RES
)
MESSAGE
(
"Adding support for Win64 atomics"
)
ADD_DEFINITIONS
(
-DWIN_ATOMICS64
)
ENDIF
(
COMPILE_RES AND NOT RUN_RES
)
ELSE
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
TRY_RUN
(
RUN_RES COMPILE_RES
${
CMAKE_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
/storage/innobase/win_atomics64_test.c
)
IF
(
COMPILE_RES AND NOT RUN_RES
)
MESSAGE
(
"Adding support for Win64 atomics"
)
ADD_DEFINITIONS
(
-DWIN_ATOMICS64
)
ENDIF
(
COMPILE_RES AND NOT RUN_RES
)
ELSE
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
# Check for 32 bit atomics
TRY_RUN
(
RUN_RES COMPILE_RES
${
CMAKE_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
/storage/innobase/win_atomics32_test.c
)
IF
(
COMPILE_RES AND NOT RUN_RES
)
MESSAGE
(
"Adding support for Win32 atomics"
)
ADD_DEFINITIONS
(
-DWIN_ATOMICS32
)
ENDIF
(
COMPILE_RES AND NOT RUN_RES
)
ENDIF
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
ENDIF
(
NOT WITHOUT_ATOMICS
)
TRY_RUN
(
RUN_RES COMPILE_RES
${
CMAKE_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
/storage/innobase/win_atomics32_test.c
)
IF
(
COMPILE_RES AND NOT RUN_RES
)
MESSAGE
(
"Adding support for Win32 atomics"
)
ADD_DEFINITIONS
(
-DWIN_ATOMICS32
)
ENDIF
(
COMPILE_RES AND NOT RUN_RES
)
ENDIF
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
ENDIF
(
NOT WITHOUT_ATOMICS
)
ENDIF
(
WIN32
)
INCLUDE_DIRECTORIES
(
${
CMAKE_SOURCE_DIR
}
/include
${
CMAKE_SOURCE_DIR
}
/zlib
${
CMAKE_SOURCE_DIR
}
/storage/innobase/include
${
CMAKE_SOURCE_DIR
}
/storage/innobase/handler
...
...
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