summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-15 11:33:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-15 11:34:01 (GMT)
commit0964a969728e416b2abbedf41517c46e5cf2cb1c (patch)
tree3bfad9830500666fec434122302ac6818d9f13c0 /Modules
parent1b8fdad269711da81a4f93526247e14057d7c0c7 (diff)
parentf84d2045e916a3656e3c72f8be268c4a0c9f4dcc (diff)
downloadCMake-0964a969728e416b2abbedf41517c46e5cf2cb1c.zip
CMake-0964a969728e416b2abbedf41517c46e5cf2cb1c.tar.gz
CMake-0964a969728e416b2abbedf41517c46e5cf2cb1c.tar.bz2
Merge topic 'FindBISON-CMP0088-SourcePath'
f84d2045e9 FindBISON: Fix CMP0088 NEW behavior for non-absolute input paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3549
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBISON.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index e75981c..6b5828e 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -257,15 +257,19 @@ if(BISON_EXECUTABLE)
PARENT_SCOPE # undocumented, do not use outside of CMake
)
set(_BISON_WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ set(_BisonInput "${BisonInput}")
if("x${_BISON_CMP0088}x" STREQUAL "xNEWx")
set(_BISON_WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ if(NOT IS_ABSOLUTE "${_BisonInput}")
+ set(_BisonInput "${CMAKE_CURRENT_SOURCE_DIR}/${_BisonInput}")
+ endif()
endif()
unset(_BISON_CMP0088)
add_custom_command(OUTPUT ${BISON_TARGET_outputs}
- COMMAND ${BISON_EXECUTABLE} ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput}
+ COMMAND ${BISON_EXECUTABLE} ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${_BisonInput}
VERBATIM
- DEPENDS ${BisonInput}
+ DEPENDS ${_BisonInput}
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
WORKING_DIRECTORY ${_BISON_WORKING_DIRECTORY})
@@ -273,12 +277,14 @@ if(BISON_EXECUTABLE)
# define target variables
set(BISON_${Name}_DEFINED TRUE)
- set(BISON_${Name}_INPUT ${BisonInput})
+ set(BISON_${Name}_INPUT ${_BisonInput})
set(BISON_${Name}_OUTPUTS ${BISON_TARGET_outputs} ${BISON_TARGET_extraoutputs})
set(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt})
set(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}")
set(BISON_${Name}_OUTPUT_HEADER "${BISON_TARGET_output_header}")
+ unset(_BisonInput)
+
endif()
endmacro()
#