summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-12 20:21:12 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-12 20:21:12 (GMT)
commit3af48083a24676025590e1e3a8db2cfef0317901 (patch)
treed2d4327f2173d387704f856c9c990f1e5a1f7c6a
parent366746bbef613f9d258e66a32f8fbacd407acfba (diff)
parentf84d2045e916a3656e3c72f8be268c4a0c9f4dcc (diff)
downloadCMake-3af48083a24676025590e1e3a8db2cfef0317901.zip
CMake-3af48083a24676025590e1e3a8db2cfef0317901.tar.gz
CMake-3af48083a24676025590e1e3a8db2cfef0317901.tar.bz2
Merge branch 'FindBISON-CMP0088-SourcePath' into release-3.14
Merge-request: !3549
-rw-r--r--Help/release/3.14.rst8
-rw-r--r--Modules/FindBISON.cmake12
2 files changed, 17 insertions, 3 deletions
diff --git a/Help/release/3.14.rst b/Help/release/3.14.rst
index e3a7a62..229d8dc 100644
--- a/Help/release/3.14.rst
+++ b/Help/release/3.14.rst
@@ -420,3 +420,11 @@ Changes made since CMake 3.14.0 include the following.
from explicit use via :command:`include_directories` and
:command:`target_include_directories` as they were in CMake 3.14.0
through 3.14.4.
+
+3.14.6
+------
+
+* In CMake 3.14.0 through 3.14.5, the :module:`FindBISON` module
+ policy :policy:`CMP0088` ``NEW`` behavior accidentally interpreted
+ a relative path to the ``.y`` input as relative to the build tree
+ directory instead of the source tree directory. This has been fixed.
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index 06ac2d9..c6c8de0 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()
#