Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmake/clang_tidy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ if(RUN_CLANG_TIDY_NAMES)
set(CLANG_TIDY_CSA_CONFIG "-config={InheritParentConfig: true, Checks: '-*,clang-analyzer-*,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-core.NullDereference,-clang-analyzer-unix.Stream,-clang-analyzer-alpha.clone.CloneChecker,-clang-analyzer-alpha.webkit.*'}")
if (ENABLE_CSA_ALPHA)
set(CLANG_TIDY_CSA_ALPHA_OPTS "-allow-enabling-alpha-checkers" "-extra-arg=-Xclang" "-extra-arg=-analyzer-config" "-extra-arg=-Xclang" "-extra-arg=aggressive-binary-operation-simplification=true")
else()
set(CLANG_TIDY_CSA_ALPHA_OPTS "")
endif()

# TODO: exclude moc_*.cpp
Expand Down
7 changes: 6 additions & 1 deletion cmake/findDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ if(HAVE_RULES)
if(NOT PCRE_LIBRARY OR NOT PCRE_INCLUDE)
message(FATAL_ERROR "pcre dependency for RULES has not been found")
endif()
else()
set(PCRE_LIBRARY "")
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down Expand Up @@ -70,6 +72,9 @@ if(NOT USE_BUNDLED_TINYXML2)
endif()

find_package(Threads REQUIRED)
if(NOT DEFINED CMAKE_THREAD_LIBS_INIT)
set(CMAKE_THREAD_LIBS_INIT "")
endif()

if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
# avoid legacy warning about Boost lookup in CMake
Expand All @@ -90,7 +95,7 @@ if(USE_BOOST)
endif()
set(Boost_FOUND ON)
set(Boost_INCLUDE_DIRS "${BOOST_INCLUDEDIR}")
# TODO: set Boost_VERSION_STRING
set(Boost_VERSION_STRING "") # TODO: set proper value
elseif(USE_BOOST STREQUAL "Auto")
find_package(Boost)
else()
Expand Down
20 changes: 14 additions & 6 deletions cmake/printInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ if(BUILD_GUI)
message(STATUS "QT_VERSION = ${QT_VERSION}")
message(STATUS "Qt6Core_LIBRARIES = ${Qt6Core_LIBRARIES}")
message(STATUS "Qt6Core_INCLUDE_DIRS = ${Qt6Core_INCLUDE_DIRS}")
message(STATUS "QHELPGENERATOR = ${QHELPGENERATOR}")
if(BUILD_ONLINE_HELP)
message(STATUS "QHELPGENERATOR = ${QHELPGENERATOR}")
endif()
endif()
message(STATUS)
message(STATUS "HAVE_RULES = ${HAVE_RULES}")
Expand All @@ -83,16 +85,22 @@ message(STATUS "CMAKE_THREAD_LIBS_INIT = ${CMAKE_THREAD_LIBS_INIT}")
message(STATUS)
message(STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}")
if(NOT USE_BUNDLED_TINYXML2)
message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
message(STATUS "tinyxml2_INCLUDE_DIRS = ${tinyxml2_INCLUDE_DIRS}")
if(TARGET tinyxml2::tinyxml2)
# TODO: print libraries and include dirs
else()
message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
message(STATUS "tinyxml2_INCLUDE_DIRS = ${tinyxml2_INCLUDE_DIRS}")
endif()
endif()
message(STATUS)
message(STATUS "USE_BOOST = ${USE_BOOST}")
if(USE_BOOST)
message(STATUS "Boost_FOUND = ${Boost_FOUND}")
message(STATUS "Boost_VERSION_STRING = ${Boost_VERSION_STRING}")
message(STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
message(STATUS "USE_BOOST_INT128 = ${USE_BOOST_INT128}")
if(Boost_FOUND)
message(STATUS "Boost_VERSION_STRING = ${Boost_VERSION_STRING}")
message(STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
message(STATUS "USE_BOOST_INT128 = ${USE_BOOST_INT128}")
endif()
endif()
message(STATUS)
message(STATUS "USE_LIBCXX = ${USE_LIBCXX}")
Expand Down
3 changes: 3 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ function(build_src output filename)
set(${output} ${${output}} ${outfile} PARENT_SCOPE)
if (USE_MATCHCOMPILER_OPT STREQUAL "Verify")
set(verify_option "--verify")
else()
set(verify_option "")
endif()
add_custom_command(
OUTPUT ${outfile}
Expand All @@ -28,6 +30,7 @@ function(build_src output filename)
endfunction()

if (NOT USE_MATCHCOMPILER_OPT STREQUAL "Off")
set(srcs_build "")
foreach(file ${srcs})
build_src(srcs_build ${file})
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if (BUILD_TESTING)
set(oneValueArgs PLATFORM NAME)
set(multiValueArgs ADD_LIBRARY)

cmake_parse_arguments(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
cmake_parse_arguments(PARSE "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
get_filename_component(LIBRARY ${CFG_TEST} NAME_WE)
# TODO: get rid of this
if(PARSE_ADD_LIBRARY)
Expand Down
Loading