mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
Update
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
# flex
|
||||
|
||||
# execute FindFLEX script by "find_package (Flex)" is required to define FLEX_TARGET macro
|
||||
|
||||
# delete obsolete 3RDPARTY_FLEX_EXECUTABLE cache variable (not used anymore)
|
||||
unset (3RDPARTY_FLEX_EXECUTABLE CACHE)
|
||||
|
||||
# delete FLEX_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
|
||||
# without reasonable diagnostic
|
||||
if (NOT FLEX_EXECUTABLE OR NOT EXISTS "${FLEX_EXECUTABLE}")
|
||||
unset (FLEX_EXECUTABLE CACHE)
|
||||
endif()
|
||||
if (NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}")
|
||||
unset (FLEX_INCLUDE_DIR CACHE)
|
||||
endif()
|
||||
|
||||
# Add paths to 3rdparty subfolders containing name "flex" to CMAKE_PROGRAM_PATH and
|
||||
# CMAKE_INCLUDE_PATH variables to make these paths searhed by find_package
|
||||
if (3RDPARTY_DIR)
|
||||
file (GLOB FLEX_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*flex*")
|
||||
foreach (candidate_path ${FLEX_PATHS})
|
||||
if (IS_DIRECTORY ${candidate_path})
|
||||
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
|
||||
list (APPEND CMAKE_INCLUDE_PATH ${candidate_path})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
find_package (FLEX 2.6.4)
|
||||
|
||||
if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_INCLUDE_DIR)
|
||||
endif()
|
||||
# flex
|
||||
|
||||
# execute FindFLEX script by "find_package (Flex)" is required to define FLEX_TARGET macro
|
||||
|
||||
# delete obsolete 3RDPARTY_FLEX_EXECUTABLE cache variable (not used anymore)
|
||||
unset (3RDPARTY_FLEX_EXECUTABLE CACHE)
|
||||
|
||||
# delete FLEX_EXECUTABLE cache variable if it is empty, otherwise find_package will fail
|
||||
# without reasonable diagnostic
|
||||
if (NOT FLEX_EXECUTABLE OR NOT EXISTS "${FLEX_EXECUTABLE}")
|
||||
unset (FLEX_EXECUTABLE CACHE)
|
||||
endif()
|
||||
if (NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}")
|
||||
unset (FLEX_INCLUDE_DIR CACHE)
|
||||
endif()
|
||||
|
||||
# Add paths to 3rdparty subfolders containing name "flex" to CMAKE_PROGRAM_PATH and
|
||||
# CMAKE_INCLUDE_PATH variables to make these paths searhed by find_package
|
||||
if (3RDPARTY_DIR)
|
||||
file (GLOB FLEX_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*flex*")
|
||||
foreach (candidate_path ${FLEX_PATHS})
|
||||
if (IS_DIRECTORY ${candidate_path})
|
||||
list (APPEND CMAKE_PROGRAM_PATH ${candidate_path})
|
||||
list (APPEND CMAKE_INCLUDE_PATH ${candidate_path})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
find_package (FLEX 2.6.4)
|
||||
|
||||
if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_INCLUDE_DIR)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user