Skip to content

Commit 4e71edb

Browse files
yangflicculus
authored andcommitted
cmake: obey CMP0026 and do not read LOCATION property
ADD_CUSTOM_COMMAND knows about target names. You don't need to fetch the location yourself. Otherwise, CMake version 3.21.0 will warn this.
1 parent 7d5cc1c commit 4e71edb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,11 @@ ENDIF(MSVC)
8787
# We build lemon, then use it to generate parser C code.
8888
IF(COMPILER_SUPPORT)
8989
ADD_EXECUTABLE(lemon "misc/lemon.c")
90-
GET_TARGET_PROPERTY(LEMON lemon LOCATION)
9190
ADD_CUSTOM_COMMAND(
9291
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/mojoshader_parser_hlsl.h"
9392
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/mojoshader_parser_hlsl.lemon"
9493
DEPENDS lemon "${CMAKE_CURRENT_SOURCE_DIR}/misc/lempar.c"
95-
COMMAND "${LEMON}"
94+
COMMAND lemon
9695
ARGS -q "-T${CMAKE_CURRENT_SOURCE_DIR}/misc/lempar.c" "${CMAKE_CURRENT_SOURCE_DIR}/mojoshader_parser_hlsl.lemon"
9796
)
9897
ENDIF(COMPILER_SUPPORT)

0 commit comments

Comments
 (0)