Am Dienstag, 27. Oktober 2015 um 12:34:47, schrieb Kornel Benko <kor...@lyx.org>
> Am Dienstag, 27. Oktober 2015 um 11:48:20, schrieb Vincent van Ravesteijn 
> <v...@lyx.org>
> > >>
> > >> Well yes, there is no "env" command on Windows.

...

I tried to remove 'env'. The attached still works for me.

> > Vincent
>
        Kornel
diff --git a/development/autotests/ExportTests.cmake b/development/autotests/ExportTests.cmake
index 50b4aa4..e241997 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -138,7 +138,9 @@ endmacro()
 loadTestList(revertedTests revertedTests)
 loadTestList(ignoredTests ignoredTests)

-foreach(libsubfolder doc examples templates)
+foreach(libsubfolderx lib/doc lib/examples lib/templates development/mathmacros)
+  set(LIBSUB_SRC_DIR "${TOP_SRC_DIR}/${libsubfolderx}")
+  string(REGEX REPLACE "^(lib|development)/" "" libsubfolder "${libsubfolderx}")
   set(LIBSUB_SRC_DIR "${TOP_SRC_DIR}/lib/${libsubfolder}")
   file(GLOB_RECURSE lyx_files RELATIVE "${LIBSUB_SRC_DIR}" "${LIBSUB_SRC_DIR}/*.lyx")
   list(SORT lyx_files)
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index bfbcdfd..3090222 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -42,7 +42,8 @@ foreach(bns ${layout_files} ${module_files})
     file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Format 55\n")
     file(APPEND "${LYX_TESTS_USERDIR}/layouts/test${bn}.layout" "Input ${bns}\n")
     add_test(NAME "check_layout/${bns}"
-      COMMAND env LYX_USERDIR_22x=${LYX_TESTS_USERDIR} $<TARGET_FILE:check_layout> "${LYX_TESTS_USERDIR}/layouts/test${bn}" "${CMAKE_CURRENT_BINARY_DIR}/${bn}.out${_checktype}")
+      COMMAND $<TARGET_FILE:check_layout> "${LYX_TESTS_USERDIR}/layouts/test${bn}" "${CMAKE_CURRENT_BINARY_DIR}/${bn}.out${_checktype}")
+    set_tests_properties("check_layout/${bns}" PROPERTIES ENVIRONMENT LYX_USERDIR_22x=${LYX_TESTS_USERDIR})
   else()
     add_test(NAME "check_layout/${bns}"
       COMMAND check_layout "${TOP_SRC_DIR}/lib/layouts/${bn}" "${CMAKE_CURRENT_BINARY_DIR}/${bn}.out${_checktype}")
diff --git a/src/tex2lyx/test/CMakeLists.txt b/src/tex2lyx/test/CMakeLists.txt
index c513d6e..7c62c63 100644
--- a/src/tex2lyx/test/CMakeLists.txt
+++ b/src/tex2lyx/test/CMakeLists.txt
@@ -64,8 +64,16 @@ add_dependencies(lyx_run_tests ${_tex2lyx} ${_lyx})
 add_custom_command(
   OUTPUT LyxTestFiles
   COMMAND ${CMAKE_COMMAND} -E touch LyxTestFiles
-  COMMAND env LYX_USERDIR_VER=${LYX_USERDIR_VER}
-    ${LYX_PYTHON_EXECUTABLE} "${runtestsScript}" $<TARGET_FILE:${_tex2lyx}> "${scriptDir}" "${CMAKE_CURRENT_SOURCE_DIR}"
+  COMMAND ${CMAKE_COMMAND}
+    -DENV1="${LYX_USERDIR_VER}=${LYX_TESTS_USERDIR}"
+    -DCOMMAND="${LYX_PYTHON_EXECUTABLE}"
+    -DPARAM1="${runtestsScript}"
+    -DPARAM2=$<TARGET_FILE:${_tex2lyx}>
+    -DPARAM3="${scriptDir}"
+    -DPARAM4="${CMAKE_CURRENT_SOURCE_DIR}"
+    -P ${TOP_SRC_DIR}/src/tex2lyx/test/env_custom_command.cmake
+  #COMMAND env LYX_USERDIR_VER=${LYX_USERDIR_VER}
+  #  ${LYX_PYTHON_EXECUTABLE} "${runtestsScript}" $<TARGET_FILE:${_tex2lyx}> "${scriptDir}" "${CMAKE_CURRENT_SOURCE_DIR}"
   WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
   DEPENDS ${_tex2lyx} ${_lyx}
 )

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to