summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2017-10-20 10:22:42 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2017-10-20 18:25:40 (GMT)
commit975fb19eb07bc65ef48ddd5f26bf6be2736d0e0a (patch)
treebca159d7f80622743ddd49f99bf1024b53972fd5
parentaf7dfa6d51dcbdbcba4196c244e4609ff249d83c (diff)
downloadDoxygen-975fb19eb07bc65ef48ddd5f26bf6be2736d0e0a.zip
Doxygen-975fb19eb07bc65ef48ddd5f26bf6be2736d0e0a.tar.gz
Doxygen-975fb19eb07bc65ef48ddd5f26bf6be2736d0e0a.tar.bz2
CMake: remove needless variable expansions
-rw-r--r--CMakeLists.txt29
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt5
3 files changed, 18 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05db71d..79a53e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,12 +41,12 @@ if (use_libclang)
set(clang "1" CACHE INTERNAL "used in settings.h")
find_package(LLVM CONFIG REQUIRED)
find_package(Clang CONFIG REQUIRED)
- if (${CMAKE_SYSTEM} MATCHES "Darwin")
+ if (CMAKE_SYSTEM MATCHES "Darwin")
set(MACOS_VERSION_MIN 10.11)
endif()
endif()
-if (${CMAKE_SYSTEM} MATCHES "Darwin")
+if (CMAKE_SYSTEM MATCHES "Darwin")
set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=${MACOS_VERSION_MIN} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "-Wno-deprecated-register -mmacosx-version-min=${MACOS_VERSION_MIN} ${CMAKE_C_FLAGS}")
find_library(CORESERVICES_LIB CoreServices)
@@ -54,7 +54,7 @@ if (${CMAKE_SYSTEM} MATCHES "Darwin")
endif()
if (WIN32)
- if (NOT "${CMAKE_GENERATOR}" MATCHES ".*MinGW Makefiles.*")
+ if (NOT CMAKE_GENERATOR MATCHES "MinGW Makefiles")
if (NOT ICONV_DIR)
set(ICONV_DIR "${CMAKE_SOURCE_DIR}/winbuild")
endif()
@@ -71,13 +71,13 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
-if ("${CMAKE_GENERATOR}" MATCHES "Ninja")
+if (CMAKE_GENERATOR MATCHES "Ninja")
set(LEX_FLAGS )
set(YACC_FLAGS )
-else ("${CMAKE_GENERATOR}" MATCHES "Ninja")
+else ()
set(LEX_FLAGS $(LEX_FLAGS))
set(YACC_FLAGS $(YACC_FLAGS))
-endif ("${CMAKE_GENERATOR}" MATCHES "Ninja")
+endif ()
find_program(DOT NAMES dot)
find_package(PythonInterp REQUIRED)
@@ -111,22 +111,23 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${EXECUTABLE_OUTPUT_PATH})
# gather lang codes for translation
file(GLOB lang_files RELATIVE "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/translator_??.h")
-set(lcodes "")
-foreach (_lang ${lang_files})
- string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
- string(TOUPPER ${_lang_code} lang_code)
- list(APPEND lcodes "${lang_code}")
-endforeach()
if (english_only) # user only wants English
set(lcodes "ENONLY")
+else ()
+ set(lcodes "")
+ foreach (_lang ${lang_files})
+ string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
+ string(TOUPPER ${_lang_code} lang_code)
+ list(APPEND lcodes "${lang_code}")
+ endforeach()
endif()
set(LANG_CODES ${lcodes} CACHE STRING "List of language codes for which translations should be compiled in")
-if (${CUSTOM_INCLUDE_DIR})
+if (CUSTOM_INCLUDE_DIR)
include_directories(${CUSTOM_INCLUDE_DIR})
endif()
-if (${CUSTOM_LINK_DIR})
+if (CUSTOM_LINK_DIR)
link_directories(${CUSTOM_LINK_DIR})
endif()
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 8b51134..9ba4b44 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -182,4 +182,4 @@ install(DIRECTORY
DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}"
)
-endif(build_doc)
+endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3b5d3cc..8362bee 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -248,12 +248,12 @@ add_executable(doxygen main.cpp)
if (use_libclang)
find_package(LLVM REQUIRED CONFIG)
find_package(Clang REQUIRED CONFIG)
- if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_features(_doxygen PRIVATE cxx_alignof)
target_compile_features(doxygen PRIVATE cxx_alignof)
target_compile_options(_doxygen PRIVATE -stdlib=libc++ -std=c++11)
target_compile_options(doxygen PRIVATE -stdlib=libc++ -std=c++11)
- elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(_doxygen PRIVATE -std=c++11)
target_compile_options(doxygen PRIVATE -std=c++11)
endif()
@@ -278,4 +278,3 @@ target_link_libraries(doxygen
)
install(TARGETS doxygen DESTINATION bin)
-