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
gaoqiong
MIGraphX
Commits
a7200610
Unverified
Commit
a7200610
authored
Oct 17, 2023
by
Paul Fultz II
Committed by
GitHub
Oct 17, 2023
Browse files
Fix cmake build type to add the properties (#2339)
parent
650ba45f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
CMakeLists.txt
CMakeLists.txt
+9
-11
No files found.
CMakeLists.txt
View file @
a7200610
...
@@ -27,20 +27,18 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
...
@@ -27,20 +27,18 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message
(
FATAL_ERROR
"The binary and source directroy cannot be the same"
)
message
(
FATAL_ERROR
"The binary and source directroy cannot be the same"
)
endif
()
endif
()
get_property
(
_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG
)
# Setup valid strings for build type
if
(
NOT CMAKE_CONFIGURATION_TYPES
)
set
(
CMAKE_CONFIGURATION_TYPES
"Debug;Release;RelWithDebInfo;MinSizeRel"
CACHE STRING
"Configs"
)
endif
()
get_property
(
MIGRAPHX_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG
)
# This has to be initialized before the project() command appears
# This has to be initialized before the project() command appears
# Set the default of CMAKE_BUILD_TYPE to be release, unless user specifies with -D. MSVC_IDE does not use CMAKE_BUILD_TYPE
# Set the default of CMAKE_BUILD_TYPE to be release, unless user specifies with -D. MSVC_IDE does not use CMAKE_BUILD_TYPE
if
(
_GENERATOR_IS_MULTI_CONFIG
)
if
(
NOT MIGRAPHX_GENERATOR_IS_MULTI_CONFIG
)
if
(
NOT CMAKE_CONFIGURATION_TYPES
)
set
(
CMAKE_BUILD_TYPE Release CACHE STRING
set
(
CMAKE_CONFIGURATION_TYPES
"Debug;Release;RelWithDebInfo;MinSizeRel"
CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
)
"Available build types (configurations) on multi-config generators"
)
set_property
(
CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
${
CMAKE_CONFIGURATION_TYPES
}
)
endif
()
else
()
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
)
endif
()
endif
()
endif
()
set
(
CMAKE_INSTALL_PREFIX
"/opt/rocm"
CACHE PATH
""
)
set
(
CMAKE_INSTALL_PREFIX
"/opt/rocm"
CACHE PATH
""
)
...
...
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