Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1497703
config-ix.cmake
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Size
3 KB
Referenced Files
None
Subscribers
None
config-ix.cmake
View Options
# available programs checks
function
(
rosa_find_program
name
)
string
(
TOUPPER
${
name
}
NAME
)
string
(
REGEX
REPLACE
"\\."
"_"
NAME
${
NAME
}
)
find_program
(
ROSA_PATH_
${
NAME
}
NAMES
${
ARGV
}
)
mark_as_advanced
(
ROSA_PATH_
${
NAME
}
)
if
(
ROSA_PATH_
${
NAME
}
)
set
(
HAVE_
${
NAME
}
1
CACHE
INTERNAL
"Is ${name} available ?"
)
mark_as_advanced
(
HAVE_
${
NAME
}
)
else
(
ROSA_PATH_
${
NAME
}
)
set
(
HAVE_
${
NAME
}
""
CACHE
INTERNAL
"Is ${name} available ?"
)
endif
(
ROSA_PATH_
${
NAME
}
)
endfunction
()
if
(
ROSA_ENABLE_CLANG_TIDY
)
message
(
STATUS
"Clang-tidy enabled."
)
# Make sure CMake knows about clang-tidy
cmake_minimum_required
(
VERSION
3.6.0
)
# clang-tidy specific options
set
(
ROSA_CLANG_TIDY_PATH
""
CACHE
STRING
"Custom path for clang-tidy executable."
)
option
(
ROSA_CLANG_TIDY_FIX
"Apply suggested clang-tidy fixes to the sources."
OFF
)
find_package
(
ClangTidy
REQUIRED
)
else
()
message
(
STATUS
"Clang-tidy disabled."
)
endif
()
if
(
ROSA_INCLUDE_CLANG_FORMAT
)
message
(
STATUS
"Clang-format enabled."
)
# Disable clang-format for Windows hosts because of unix-style path
# separators used below.
if
(
"${CMAKE_HOST_SYSTEM}"
MATCHES
".*Windows.*"
)
set
(
ROSA_INCLUDE_CLANG_FORMAT
OFF
)
message
(
WARNING
"Disabling clang-format on a Windows host."
)
else
()
#clang-format specific options
set
(
ROSA_CLANG_FORMAT_PATH
""
CACHE
STRING
"Custom path for clang-format executable."
)
# Find clang-format
find_package
(
ClangFormat
REQUIRED
)
file
(
GLOB_RECURSE
ALL_SOURCE_FILES
*.[ch]pp
*.c[c]
*.h[h]
)
add_custom_target
(
format-rosa
)
foreach
(
SOURCE_FILE
${
ALL_SOURCE_FILES
}
)
string
(
REGEX
REPLACE
"^${ROSA_MAIN_SRC_DIR}/"
""
SOURCE_RELPATH
${
SOURCE_FILE
}
)
string
(
REPLACE
"/"
"_"
SOURCE_TARGET
${
SOURCE_RELPATH
}
)
add_custom_target
(
format-
${
SOURCE_TARGET
}
COMMAND
${
CLANGFORMAT_EXECUTABLE
}
-i
-style=file
${
SOURCE_FILE
}
)
add_dependencies
(
format-rosa
format-
${
SOURCE_TARGET
}
)
endforeach
()
endif
()
else
()
message
(
STATUS
"Clang-format disabled."
)
endif
()
if
(
ROSA_ENABLE_DOXYGEN
)
rosa_find_program
(
dot
)
endif
()
if
(
ROSA_ENABLE_DOXYGEN
)
message
(
STATUS
"Doxygen enabled."
)
find_package
(
Doxygen
REQUIRED
)
if
(
DOXYGEN_FOUND
)
# If we find doxygen and we want to enable doxygen by default create a
# global aggregate doxygen target for generating llvm and any/all
# subprojects doxygen documentation.
if
(
ROSA_BUILD_DOCS
)
add_custom_target
(
doxygen
ALL
)
endif
()
option
(
ROSA_DOXYGEN_EXTERNAL_SEARCH
"Enable doxygen external search."
OFF
)
if
(
ROSA_DOXYGEN_EXTERNAL_SEARCH
)
set
(
ROSA_DOXYGEN_SEARCHENGINE_URL
""
CACHE
STRING
"URL to use for external search."
)
set
(
ROSA_DOXYGEN_SEARCH_MAPPINGS
""
CACHE
STRING
"Doxygen Search Mappings."
)
endif
()
endif
()
else
()
message
(
STATUS
"Doxygen disabled."
)
endif
()
if
(
ROSA_ENABLE_SPHINX
)
message
(
STATUS
"Sphinx enabled."
)
find_package
(
Sphinx
REQUIRED
)
if
(
ROSA_BUILD_DOCS
)
add_custom_target
(
sphinx
ALL
)
endif
()
else
()
message
(
STATUS
"Sphinx disabled."
)
endif
()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 1, 9:38 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
281294
Default Alt Text
config-ix.cmake (3 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment