diff --git a/CMakeLists.txt b/CMakeLists.txt index e6b49bf72..70598f614 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,9 +88,9 @@ function(createBuildInfo) # Generate header file containing useful build information add_custom_target(BuildInfo.h ALL WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND cmake -DETH_SOURCE_DIR=${CMAKE_SOURCE_DIR} -DETH_DST_DIR=${CMAKE_BINARY_DIR} - -DETH_BUILD_TYPE=${_cmake_build_type} -DETH_BUILD_PLATFORM=${ETH_BUILD_PLATFORM} - -P ${ETH_SCRIPTS_DIR}/buildinfo.cmake + COMMAND cmake -DETH_SOURCE_DIR="${CMAKE_SOURCE_DIR}" -DETH_DST_DIR="${CMAKE_BINARY_DIR}" + -DETH_BUILD_TYPE="${_cmake_build_type}" -DETH_BUILD_PLATFORM="${ETH_BUILD_PLATFORM}" + -P "${ETH_SCRIPTS_DIR}/buildinfo.cmake" ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/cmake/scripts/buildinfo.cmake b/cmake/scripts/buildinfo.cmake index 5b9f2fbf1..e61e3fa15 100644 --- a/cmake/scripts/buildinfo.cmake +++ b/cmake/scripts/buildinfo.cmake @@ -42,8 +42,8 @@ set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp") set(OUTFILE "${ETH_DST_DIR}/BuildInfo.h") # create outfile if it doesn't exist -if (NOT (EXISTS ${OUTFILE})) - execute_process(COMMAND touch ${OUTFILE}) +if (NOT (EXISTS "${OUTFILE}")) + execute_process(COMMAND touch "${OUTFILE}") endif() configure_file("${INFILE}" "${TMPFILE}")