From accb9f2fe8fd8f6a1e114adac5b15304b0e0012d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 20 Jul 2011 19:04:32 -0700 Subject: gr: squashed cmakelists.txt into one commit --- cmake/Modules/GrTest.cmake | 111 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 cmake/Modules/GrTest.cmake (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake new file mode 100644 index 000000000..707c0c452 --- /dev/null +++ b/cmake/Modules/GrTest.cmake @@ -0,0 +1,111 @@ +# Copyright 2010-2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +IF(NOT DEFINED INCLUDED_GR_TEST_CMAKE) +SET(INCLUDED_GR_TEST_CMAKE TRUE) + +######################################################################## +# Add a unit test and setup the environment for a unit test. +# Takes the same arguments as the ADD_TEST function. +# +# Before calling set the following variables: +# GR_TEST_TARGET_DEPS - built targets for the library path +# GR_TEST_LIBRARY_DIRS - directories for the library path +# GR_TEST_PYTHON_DIRS - directories for the python path +######################################################################## +FUNCTION(GR_ADD_TEST test_name) + + IF(WIN32) + #Ensure that the build exe also appears in the PATH. + LIST(APPEND GR_TEST_TARGET_DEPS ${ARGN}) + + #In the land of windows, all libraries must be in the PATH. + #Since the dependent libraries are not yet installed, + #we must manually set them in the PATH to run tests. + #The following appends the path of a target dependency. + FOREACH(target ${GR_TEST_TARGET_DEPS}) + GET_TARGET_PROPERTY(location ${target} LOCATION) + IF(location) + GET_FILENAME_COMPONENT(path ${location} PATH) + STRING(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path}) + LIST(APPEND GR_TEST_LIBRARY_DIRS ${path}) + ENDIF(location) + ENDFOREACH(target) + + #SWIG generates the python library files into a subdirectory. + #Therefore, we must append this subdirectory into PYTHONPATH. + #Only do this for the python directories ending with "swig". + FOREACH(pydir ${GR_TEST_PYTHON_DIRS}) + GET_FILENAME_COMPONENT(name ${pydir} NAME) + IF(name MATCHES "^(swig|lib)$") + LIST(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE}) + ENDIF() + ENDFOREACH(pydir) + ENDIF(WIN32) + + FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} srcdir) + FILE(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list? + FILE(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list? + + SET(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}") + + #http://www.cmake.org/pipermail/cmake/2009-May/029464.html + + IF(UNIX) + #set both LD and DYLD paths to cover multiple UNIX OS library paths + LIST(APPEND libpath "$LD_LIBRARY_PATH" "$DYLD_LIBRARY_PATH") + LIST(APPEND pypath "$PYTHONPATH") + + #replace list separator with the path separator + STRING(REPLACE ";" ":" libpath "${libpath}") + STRING(REPLACE ";" ":" pypath "${pypath}") + LIST(APPEND environs "LD_LIBRARY_PATH=${libpath}" "DYLD_LIBRARY_PATH=${libpath}" "PYTHONPATH=${pypath}") + + ADD_TEST(${ARGV}) + SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") + ENDIF(UNIX) + + IF(WIN32) + LIST(APPEND libpath ${DLL_PATHS} "%PATH%") + LIST(APPEND pypath "%PYTHONPATH%") + + #replace list separator with the path separator (escaped) + STRING(REPLACE ";" "\\;" libpath "${libpath}") + STRING(REPLACE ";" "\\;" pypath "${pypath}") + LIST(APPEND environs "PATH=${libpath}" "PYTHONPATH=${pypath}") + + #generate a bat file that sets the environment and runs the test + SET(bat_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.bat) + FILE(WRITE ${bat_file} "@echo off\n") + #each line sets an environment variable + FOREACH(environ ${environs}) + FILE(APPEND ${bat_file} "SET ${environ}\n") + ENDFOREACH(environ) + #load the command to run with its arguments + FOREACH(arg ${ARGN}) + FILE(APPEND ${bat_file} "${arg} ") + ENDFOREACH(arg) + FILE(APPEND ${bat_file} "\n") + + ADD_TEST(${test_name} ${bat_file}) + ENDIF(WIN32) + +ENDFUNCTION(GR_ADD_TEST) + +ENDIF(NOT DEFINED INCLUDED_GR_TEST_CMAKE) -- cgit From 513febb1932f18f1123e530632032263c2322d9e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 22 Jul 2011 11:52:24 -0700 Subject: cmake: generate shell script for each test because its nicer to diagnose problems --- cmake/Modules/GrTest.cmake | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index 707c0c452..a3605f198 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -66,8 +66,13 @@ FUNCTION(GR_ADD_TEST test_name) SET(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}") #http://www.cmake.org/pipermail/cmake/2009-May/029464.html + #Replaced this add test + set environs code with the shell script generation. + #Its nicer to be able to manually run the shell script to diagnose problems. + #ADD_TEST(${ARGV}) + #SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") IF(UNIX) + SET(binpath "${CMAKE_CURRENT_BINARY_DIR}:$PATH") #set both LD and DYLD paths to cover multiple UNIX OS library paths LIST(APPEND libpath "$LD_LIBRARY_PATH" "$DYLD_LIBRARY_PATH") LIST(APPEND pypath "$PYTHONPATH") @@ -75,10 +80,24 @@ FUNCTION(GR_ADD_TEST test_name) #replace list separator with the path separator STRING(REPLACE ";" ":" libpath "${libpath}") STRING(REPLACE ";" ":" pypath "${pypath}") - LIST(APPEND environs "LD_LIBRARY_PATH=${libpath}" "DYLD_LIBRARY_PATH=${libpath}" "PYTHONPATH=${pypath}") + LIST(APPEND environs "PATH=${binpath}" "LD_LIBRARY_PATH=${libpath}" "DYLD_LIBRARY_PATH=${libpath}" "PYTHONPATH=${pypath}") + + #generate a bat file that sets the environment and runs the test + FIND_PROGRAM(SHELL sh) + SET(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh) + FILE(WRITE ${sh_file} "#!${SHELL}\n") + #each line sets an environment variable + FOREACH(environ ${environs}) + FILE(APPEND ${sh_file} "export ${environ}\n") + ENDFOREACH(environ) + #load the command to run with its arguments + FOREACH(arg ${ARGN}) + FILE(APPEND ${sh_file} "${arg} ") + ENDFOREACH(arg) + FILE(APPEND ${sh_file} "\n") + + ADD_TEST(${test_name} ${SHELL} ${sh_file}) - ADD_TEST(${ARGV}) - SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") ENDIF(UNIX) IF(WIN32) -- cgit From aad02c6dc09d044c112f29bebec4cc79b0e13aab Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 24 Jul 2011 12:27:21 -0700 Subject: video-sdl: solution for proper swig directory windows --- cmake/Modules/GrTest.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index a3605f198..308579008 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -50,10 +50,10 @@ FUNCTION(GR_ADD_TEST test_name) #SWIG generates the python library files into a subdirectory. #Therefore, we must append this subdirectory into PYTHONPATH. - #Only do this for the python directories ending with "swig". + #Only do this for the python directories matching the following: FOREACH(pydir ${GR_TEST_PYTHON_DIRS}) GET_FILENAME_COMPONENT(name ${pydir} NAME) - IF(name MATCHES "^(swig|lib)$") + IF(name MATCHES "^(swig|lib|src)$") LIST(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE}) ENDIF() ENDFOREACH(pydir) -- cgit From bed68a6d8545b9b24f3933fc4c6f792de34939c2 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 24 Jul 2011 12:53:32 -0700 Subject: cmake: changed module include guards to model after builtin cmake modules --- cmake/Modules/GrTest.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index 308579008..1851437af 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -17,8 +17,10 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -IF(NOT DEFINED INCLUDED_GR_TEST_CMAKE) -SET(INCLUDED_GR_TEST_CMAKE TRUE) +IF(DEFINED __INCLUDED_GR_TEST_CMAKE) + RETURN() +ENDIF() +SET(__INCLUDED_GR_TEST_CMAKE TRUE) ######################################################################## # Add a unit test and setup the environment for a unit test. @@ -126,5 +128,3 @@ FUNCTION(GR_ADD_TEST test_name) ENDIF(WIN32) ENDFUNCTION(GR_ADD_TEST) - -ENDIF(NOT DEFINED INCLUDED_GR_TEST_CMAKE) -- cgit From c468f4903f8ade606bbfe0889954007f3b70198f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 3 Aug 2011 11:58:52 -0700 Subject: atsc: forgot to add gruel to the list of deps for unit test, also chmod +x unix unit test scripts --- cmake/Modules/GrTest.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index 1851437af..e9e2a0c2e 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -98,6 +98,9 @@ FUNCTION(GR_ADD_TEST test_name) ENDFOREACH(arg) FILE(APPEND ${sh_file} "\n") + #make the shell file executable + EXECUTE_PROCESS(COMMAND chmod +x ${sh_file}) + ADD_TEST(${test_name} ${SHELL} ${sh_file}) ENDIF(UNIX) -- cgit From 5f7e76b4fd89fbaf4c0cf72ff53c7c91381ccfad Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 20 Aug 2011 09:07:57 -0700 Subject: cmake: set the library path for unix machines --- cmake/Modules/GrTest.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index e9e2a0c2e..8a73de3ce 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -33,7 +33,6 @@ SET(__INCLUDED_GR_TEST_CMAKE TRUE) ######################################################################## FUNCTION(GR_ADD_TEST test_name) - IF(WIN32) #Ensure that the build exe also appears in the PATH. LIST(APPEND GR_TEST_TARGET_DEPS ${ARGN}) @@ -50,6 +49,7 @@ FUNCTION(GR_ADD_TEST test_name) ENDIF(location) ENDFOREACH(target) + IF(WIN32) #SWIG generates the python library files into a subdirectory. #Therefore, we must append this subdirectory into PYTHONPATH. #Only do this for the python directories matching the following: @@ -74,15 +74,19 @@ FUNCTION(GR_ADD_TEST test_name) #SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") IF(UNIX) + SET(LD_PATH_VAR "LD_LIBRARY_PATH") + IF(APPLE) + SET(LD_PATH_VAR "DYLD_LIBRARY_PATH") + ENDIF() + SET(binpath "${CMAKE_CURRENT_BINARY_DIR}:$PATH") - #set both LD and DYLD paths to cover multiple UNIX OS library paths - LIST(APPEND libpath "$LD_LIBRARY_PATH" "$DYLD_LIBRARY_PATH") + LIST(APPEND libpath "$${LD_PATH_VAR}") LIST(APPEND pypath "$PYTHONPATH") #replace list separator with the path separator STRING(REPLACE ";" ":" libpath "${libpath}") STRING(REPLACE ";" ":" pypath "${pypath}") - LIST(APPEND environs "PATH=${binpath}" "LD_LIBRARY_PATH=${libpath}" "DYLD_LIBRARY_PATH=${libpath}" "PYTHONPATH=${pypath}") + LIST(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}" "PYTHONPATH=${pypath}") #generate a bat file that sets the environment and runs the test FIND_PROGRAM(SHELL sh) -- cgit From 71c0f14a46f85027b95f2f5f6d3d219cc9e3783e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 8 Oct 2011 17:11:12 -0700 Subject: gr: the CMakeLists.txt took a chill pill --- cmake/Modules/GrTest.cmake | 138 ++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index 8a73de3ce..bbb525dcc 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -17,10 +17,10 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -IF(DEFINED __INCLUDED_GR_TEST_CMAKE) - RETURN() -ENDIF() -SET(__INCLUDED_GR_TEST_CMAKE TRUE) +if(DEFINED __INCLUDED_GR_TEST_CMAKE) + return() +endif() +set(__INCLUDED_GR_TEST_CMAKE TRUE) ######################################################################## # Add a unit test and setup the environment for a unit test. @@ -31,41 +31,41 @@ SET(__INCLUDED_GR_TEST_CMAKE TRUE) # GR_TEST_LIBRARY_DIRS - directories for the library path # GR_TEST_PYTHON_DIRS - directories for the python path ######################################################################## -FUNCTION(GR_ADD_TEST test_name) +function(GR_ADD_TEST test_name) #Ensure that the build exe also appears in the PATH. - LIST(APPEND GR_TEST_TARGET_DEPS ${ARGN}) + list(APPEND GR_TEST_TARGET_DEPS ${ARGN}) #In the land of windows, all libraries must be in the PATH. #Since the dependent libraries are not yet installed, #we must manually set them in the PATH to run tests. #The following appends the path of a target dependency. - FOREACH(target ${GR_TEST_TARGET_DEPS}) - GET_TARGET_PROPERTY(location ${target} LOCATION) - IF(location) - GET_FILENAME_COMPONENT(path ${location} PATH) - STRING(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path}) - LIST(APPEND GR_TEST_LIBRARY_DIRS ${path}) - ENDIF(location) - ENDFOREACH(target) - - IF(WIN32) + foreach(target ${GR_TEST_TARGET_DEPS}) + get_target_property(location ${target} LOCATION) + if(location) + get_filename_component(path ${location} PATH) + string(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path}) + list(APPEND GR_TEST_LIBRARY_DIRS ${path}) + endif(location) + endforeach(target) + + if(WIN32) #SWIG generates the python library files into a subdirectory. #Therefore, we must append this subdirectory into PYTHONPATH. #Only do this for the python directories matching the following: - FOREACH(pydir ${GR_TEST_PYTHON_DIRS}) - GET_FILENAME_COMPONENT(name ${pydir} NAME) - IF(name MATCHES "^(swig|lib|src)$") - LIST(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE}) - ENDIF() - ENDFOREACH(pydir) - ENDIF(WIN32) + foreach(pydir ${GR_TEST_PYTHON_DIRS}) + get_filename_component(name ${pydir} NAME) + if(name MATCHES "^(swig|lib|src)$") + list(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE}) + endif() + endforeach(pydir) + endif(WIN32) - FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} srcdir) - FILE(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list? - FILE(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list? + file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} srcdir) + file(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list? + file(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list? - SET(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}") + set(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}") #http://www.cmake.org/pipermail/cmake/2009-May/029464.html #Replaced this add test + set environs code with the shell script generation. @@ -73,65 +73,65 @@ FUNCTION(GR_ADD_TEST test_name) #ADD_TEST(${ARGV}) #SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") - IF(UNIX) - SET(LD_PATH_VAR "LD_LIBRARY_PATH") - IF(APPLE) - SET(LD_PATH_VAR "DYLD_LIBRARY_PATH") - ENDIF() + if(UNIX) + set(LD_PATH_VAR "LD_LIBRARY_PATH") + if(APPLE) + set(LD_PATH_VAR "DYLD_LIBRARY_PATH") + endif() - SET(binpath "${CMAKE_CURRENT_BINARY_DIR}:$PATH") - LIST(APPEND libpath "$${LD_PATH_VAR}") - LIST(APPEND pypath "$PYTHONPATH") + set(binpath "${CMAKE_CURRENT_BINARY_DIR}:$PATH") + list(APPEND libpath "$${LD_PATH_VAR}") + list(APPEND pypath "$PYTHONPATH") #replace list separator with the path separator - STRING(REPLACE ";" ":" libpath "${libpath}") - STRING(REPLACE ";" ":" pypath "${pypath}") - LIST(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}" "PYTHONPATH=${pypath}") + string(REPLACE ";" ":" libpath "${libpath}") + string(REPLACE ";" ":" pypath "${pypath}") + list(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}" "PYTHONPATH=${pypath}") #generate a bat file that sets the environment and runs the test - FIND_PROGRAM(SHELL sh) - SET(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh) - FILE(WRITE ${sh_file} "#!${SHELL}\n") + find_program(SHELL sh) + set(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh) + file(WRITE ${sh_file} "#!${SHELL}\n") #each line sets an environment variable - FOREACH(environ ${environs}) - FILE(APPEND ${sh_file} "export ${environ}\n") - ENDFOREACH(environ) + foreach(environ ${environs}) + file(APPEND ${sh_file} "export ${environ}\n") + endforeach(environ) #load the command to run with its arguments - FOREACH(arg ${ARGN}) - FILE(APPEND ${sh_file} "${arg} ") - ENDFOREACH(arg) - FILE(APPEND ${sh_file} "\n") + foreach(arg ${ARGN}) + file(APPEND ${sh_file} "${arg} ") + endforeach(arg) + file(APPEND ${sh_file} "\n") #make the shell file executable - EXECUTE_PROCESS(COMMAND chmod +x ${sh_file}) + execute_process(COMMAND chmod +x ${sh_file}) - ADD_TEST(${test_name} ${SHELL} ${sh_file}) + add_test(${test_name} ${SHELL} ${sh_file}) - ENDIF(UNIX) + endif(UNIX) - IF(WIN32) - LIST(APPEND libpath ${DLL_PATHS} "%PATH%") - LIST(APPEND pypath "%PYTHONPATH%") + if(WIN32) + list(APPEND libpath ${DLL_PATHS} "%PATH%") + list(APPEND pypath "%PYTHONPATH%") #replace list separator with the path separator (escaped) - STRING(REPLACE ";" "\\;" libpath "${libpath}") - STRING(REPLACE ";" "\\;" pypath "${pypath}") - LIST(APPEND environs "PATH=${libpath}" "PYTHONPATH=${pypath}") + string(REPLACE ";" "\\;" libpath "${libpath}") + string(REPLACE ";" "\\;" pypath "${pypath}") + list(APPEND environs "PATH=${libpath}" "PYTHONPATH=${pypath}") #generate a bat file that sets the environment and runs the test - SET(bat_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.bat) - FILE(WRITE ${bat_file} "@echo off\n") + set(bat_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.bat) + file(WRITE ${bat_file} "@echo off\n") #each line sets an environment variable - FOREACH(environ ${environs}) - FILE(APPEND ${bat_file} "SET ${environ}\n") - ENDFOREACH(environ) + foreach(environ ${environs}) + file(APPEND ${bat_file} "SET ${environ}\n") + endforeach(environ) #load the command to run with its arguments - FOREACH(arg ${ARGN}) - FILE(APPEND ${bat_file} "${arg} ") - ENDFOREACH(arg) - FILE(APPEND ${bat_file} "\n") + foreach(arg ${ARGN}) + file(APPEND ${bat_file} "${arg} ") + endforeach(arg) + file(APPEND ${bat_file} "\n") - ADD_TEST(${test_name} ${bat_file}) - ENDIF(WIN32) + add_test(${test_name} ${bat_file}) + endif(WIN32) -ENDFUNCTION(GR_ADD_TEST) +endfunction(GR_ADD_TEST) -- cgit From f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 13 Apr 2012 18:36:53 -0400 Subject: Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future. The sed script was provided by Moritz Fischer. --- cmake/Modules/GrTest.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmake/Modules/GrTest.cmake') diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index bbb525dcc..4723cca58 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, -- cgit