|
|
@ -2,15 +2,12 @@ include_guard()
|
|
|
|
|
|
|
|
|
|
|
|
# Disable cmkr if no cmake.toml file is found
|
|
|
|
# Disable cmkr if no cmake.toml file is found
|
|
|
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml)
|
|
|
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml)
|
|
|
|
message(STATUS "[cmkr] Not found: ${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
|
|
|
|
message(AUTHOR_WARNING "[cmkr] Not found: ${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
|
|
|
|
macro(cmkr)
|
|
|
|
macro(cmkr)
|
|
|
|
endmacro()
|
|
|
|
endmacro()
|
|
|
|
return()
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
# Add a build-time dependency on the contents of cmake.toml to regenerate the CMakeLists.txt when modified
|
|
|
|
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml ${CMAKE_CURRENT_BINARY_DIR}/cmake.toml COPYONLY)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Helper macro to execute a process (COMMAND_ERROR_IS_FATAL ANY is 3.19 and higher)
|
|
|
|
# Helper macro to execute a process (COMMAND_ERROR_IS_FATAL ANY is 3.19 and higher)
|
|
|
|
macro(cmkr_exec)
|
|
|
|
macro(cmkr_exec)
|
|
|
|
execute_process(COMMAND ${ARGV} RESULT_VARIABLE CMKR_EXEC_RESULT)
|
|
|
|
execute_process(COMMAND ${ARGV} RESULT_VARIABLE CMKR_EXEC_RESULT)
|
|
|
|