diff options
author | Brad King <brad.king@kitware.com> | 2010-01-04 15:18:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-01-04 15:18:44 (GMT) |
commit | cbfbb86b581643db8c1317b07d64743bd1c8a100 (patch) | |
tree | 39ce0b910bbd62458717263035e55d6cc53a146e /Tests/Fortran | |
parent | 40641e3cbaa0635616c870f987b0ef441d88da8c (diff) | |
download | CMake-cbfbb86b581643db8c1317b07d64743bd1c8a100.zip CMake-cbfbb86b581643db8c1317b07d64743bd1c8a100.tar.gz CMake-cbfbb86b581643db8c1317b07d64743bd1c8a100.tar.bz2 |
Fix escapes in Fortran depend.make entries
Makefile dependencies must be escaped using cmLocalGenerator::Convert
with the cmLocalGenerator::MAKEFILE option. This fixes Fortran module
dependencies with spaces in the path. We test the fix by adding a space
to one of the module paths in the Fortran test.
Diffstat (limited to 'Tests/Fortran')
-rw-r--r-- | Tests/Fortran/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/Fortran/Executable/CMakeLists.txt | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index 709ea5f..e66b7a0 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -171,13 +171,20 @@ if(TEST_MODULE_DEPENDS) set(External_CONFIG_TYPE) set(External_BUILD_TYPE -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}) endif(CMAKE_CONFIGURATION_TYPES) + set(External_SOURCE_DIR "${testf_SOURCE_DIR}/External") + set(External_BINARY_DIR "${testf_BINARY_DIR}/External") + if("${testf_BINARY_DIR}" MATCHES " ") + # Our build tree has a space, so the build tool supports spaces. + # Test using modules from a path with spaces. + set(External_BINARY_DIR "${External_BINARY_DIR} Build") + endif() add_custom_command( OUTPUT ${testf_BINARY_DIR}/ExternalProject COMMAND ${CMAKE_CTEST_COMMAND} ARGS ${External_CONFIG_TYPE} --build-and-test - ${testf_SOURCE_DIR}/External - ${testf_BINARY_DIR}/External + ${External_SOURCE_DIR} + ${External_BINARY_DIR} --build-noclean --build-two-config --build-project ExtFort diff --git a/Tests/Fortran/Executable/CMakeLists.txt b/Tests/Fortran/Executable/CMakeLists.txt index 40114e4..55f21ad 100644 --- a/Tests/Fortran/Executable/CMakeLists.txt +++ b/Tests/Fortran/Executable/CMakeLists.txt @@ -1,6 +1,6 @@ include_directories(${Library_MODDIR}) -include_directories(${testf_BINARY_DIR}/External) -link_directories(${testf_BINARY_DIR}/External) +include_directories(${External_BINARY_DIR}) +link_directories(${External_BINARY_DIR}) add_executable(subdir_exe2 main.f90) target_link_libraries(subdir_exe2 subdir_mods) |