@@ -66,7 +66,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
6666
6767include (GNUInstallDirs)
6868 ## Define supported version of clang and llvm
69-
7069 set (CLANG_MIN_SUPPORTED 13.0)
7170 set (CLANG_MAX_SUPPORTED "19.1.x" )
7271 set (CLANG_VERSION_UPPER_BOUND 20.0.0)
@@ -78,12 +77,10 @@ include(GNUInstallDirs)
7877 set (LLVM_VERSION_UPPER_BOUND 20.0.0)
7978
8079 ## Set Cmake packages search order
81-
8280 set (CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
8381 set (CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)
8482
8583 ## Search packages HINTS and PATHS
86-
8784 if (DEFINED LLVM_DIR)
8885 set (llvm_search_hints PATHS ${LLVM_DIR} HINTS "${LLVM_DIR} /lib/cmake/llvm" "${LLVM_DIR} /cmake" "${LLVM_CONFIG_EXTRA_PATH_HINTS} " )
8986 set (clang_search_hints PATHS ${LLVM_DIR} HINTS "${LLVM_DIR} /lib/cmake/clang" "${LLVM_DIR} /cmake" )
@@ -102,7 +99,6 @@ include(GNUInstallDirs)
10299 endif ()
103100
104101 ## Find supported LLVM
105-
106102 if (CPPINTEROP_USE_CLING)
107103 message (STATUS "Mode CPPINTEROP_USE_CLING = ON" )
108104 find_package (LLVM REQUIRED CONFIG ${llvm_search_hints} NO_DEFAULT_PATH)
@@ -154,8 +150,7 @@ include(GNUInstallDirs)
154150 message (STATUS "Found supported version: LLVM ${LLVM_PACKAGE_VERSION} " )
155151 message (STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR} " )
156152
157- ## Find supported LLD only while building for webassembly against emscripten
158-
153+ ## Find supported LLD only while building for webassembly against emscripten
159154if (EMSCRIPTEN)
160155 if (DEFINED LLD_VERSION)
161156 if (LLD_VERSION VERSION_GREATER_EQUAL LLD_VERSION_UPPER_BOUND)
@@ -194,7 +189,6 @@ if(EMSCRIPTEN)
194189endif ()
195190
196191 ## Find supported Clang
197-
198192 if (DEFINED CLANG_VERSION)
199193 if (CLANG_VERSION VERSION_GREATER_EQUAL CLANG_VERSION_UPPER_BOUND)
200194 set (CLANG_VERSION ${CLANG_VERSION_UPPER_BOUND} )
@@ -236,19 +230,18 @@ endif()
236230 set (CMAKE_CXX_STANDARD 17)
237231 endif ()
238232 if (CMAKE_CXX_STANDARD LESS 17)
239- message (fatal "LLVM/CppInterOp requires c ++17 or later" )
233+ message (fatal "LLVM/CppInterOp requires C ++17 or later" )
240234 endif ()
241235 elseif (CLANG_VERSION_MAJOR GREATER_EQUAL 13)
242236 if (NOT CMAKE_CXX_STANDARD)
243237 set (CMAKE_CXX_STANDARD 14)
244238 endif ()
245239 if (CMAKE_CXX_STANDARD LESS 14)
246- message (fatal "LLVM/CppInterOp requires c ++14 or later" )
240+ message (fatal "LLVM/CppInterOp requires C ++14 or later" )
247241 endif ()
248242 endif ()
249243
250244 ## Find supported Cling
251-
252245 if (CPPINTEROP_USE_CLING)
253246 if (NOT Cling_FOUND AND DEFINED Cling_DIR)
254247 find_package (Cling REQUIRED CONFIG ${cling_extra_hints} NO_DEFAULT_PATH)
@@ -274,8 +267,6 @@ endif()
274267 # For consistency we should set it to the correct value.
275268 set (LLVM_CONFIG_HAS_RTTI NO CACHE BOOL "" FORCE)
276269
277- ## Init
278-
279270 # In case this was a path to a build folder of llvm still try to find AddLLVM
280271 list (APPEND CMAKE_MODULE_PATH "${LLVM_DIR} " )
281272
@@ -352,7 +343,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE )
352343"`CMakeFiles'. Please delete them." )
353344endif ()
354345
355- # Add appropriate flags for GCC
346+ ## Add appropriate flags for GCC
356347if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
357348 if (APPLE OR EMSCRIPTEN)
358349 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings" )
@@ -383,7 +374,7 @@ include_directories(BEFORE SYSTEM
383374 ${CMAKE_CURRENT_SOURCE_DIR} /include
384375 )
385376
386- #Removes flag due to issue with Google test download when LLVM_ENABLE_WERROR=On
377+ # Removes flag due to issue with Google test download when LLVM_ENABLE_WERROR=On
387378string (REPLACE "-Wcovered-switch-default" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
388379
389380file (STRINGS "VERSION" CPPINTEROP_VERSION)
@@ -406,7 +397,6 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/CppInterOp/
406397 PATTERN "*.cmake"
407398 )
408399
409-
410400install (DIRECTORY include /
411401 DESTINATION include
412402 FILES_MATCHING
0 commit comments