mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
cmake: create .bat with cmake command and options
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39261 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
62ee3c8291
commit
f8c077adfc
@ -264,10 +264,16 @@ endmacro()
|
||||
macro(LYX_OPTION_LIST_ALL)
|
||||
if(UNIX)
|
||||
set(run_cmake ${CMAKE_BINARY_DIR}/run_cmake.sh)
|
||||
file(WRITE ${run_cmake} "#!/bin/bash\n")
|
||||
file(APPEND ${run_cmake} "cmake ${CMAKE_SOURCE_DIR} \\\n")
|
||||
file(WRITE ${run_cmake} "#!/bin/bash \n")
|
||||
execute_process(COMMAND chmod 755 ${run_cmake})
|
||||
set(cont "\\\n")
|
||||
elseif(WIN32)
|
||||
set(run_cmake ${CMAKE_BINARY_DIR}/run_cmake.bat)
|
||||
file(WRITE ${run_cmake} "")
|
||||
set(cont "<nul ^\n")
|
||||
endif()
|
||||
file(APPEND ${run_cmake} "cmake ${CMAKE_SOURCE_DIR} ${cont}")
|
||||
file(APPEND ${run_cmake} " -G\"${CMAKE_GENERATOR}\" ${cont}")
|
||||
foreach(_option ${LYX_OPTIONS})
|
||||
if(${_option}_show_message OR ${ARGV0} STREQUAL "help")
|
||||
string(SUBSTRING "${_option} " 0 25 _var)
|
||||
@ -278,17 +284,13 @@ macro(LYX_OPTION_LIST_ALL)
|
||||
endif()
|
||||
string(SUBSTRING "${_isset} " 0 4 _val)
|
||||
message(STATUS "${_var}= ${_val} : ${${_option}_description}")
|
||||
endif()
|
||||
if(UNIX)
|
||||
file(APPEND ${run_cmake} " -D${_option}=${${_option}} \\\n")
|
||||
file(APPEND ${run_cmake} " -D${_option}=${${_option}} ${cont}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(UNIX)
|
||||
file(APPEND ${run_cmake} "\n")
|
||||
message(STATUS)
|
||||
message(STATUS "CMake command with options is available in shell script")
|
||||
message(STATUS " '${run_cmake}'")
|
||||
endif()
|
||||
file(APPEND ${run_cmake} "\n")
|
||||
message(STATUS)
|
||||
message(STATUS "CMake command with options is available in shell script")
|
||||
message(STATUS " '${run_cmake}'")
|
||||
endmacro()
|
||||
|
||||
macro(lyx_add_info_files group)
|
||||
|
Loading…
Reference in New Issue
Block a user