Skip to content

Commit

Permalink
Expect GOCMD to be set when cmake is called
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanas committed Jan 19, 2023
1 parent 66514a4 commit defada4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ file(GLOB_RECURSE WORMHOLE_WILLIAM_SRC_FILES
${WORMHOLE_WILLIAM_GO_DIR}/c/**.c
${WORMHOLE_WILLIAM_GO_DIR}/c/**.h)

# in case GOCMD is not set, try to find it
find_program(GOCMD go)
if(NOT GOCMD)
message(FATAL_ERROR "go executable not found")
else()
# still try to call for go, helps to run in CI
set(GOCMD go)
if(NOT DEFINED GOCMD)
find_program(GOCMD go)
if (NOT DEFINED GOCMD)
message(FATAL_ERROR "go executable not set")
endif()
endif()

add_custom_command(
Expand Down

0 comments on commit defada4

Please sign in to comment.